[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 312
Thread images: 29

File: share2.png (300KB, 600x600px) Image search: [Google]
share2.png
300KB, 600x600px
Previous thread: >>56473311

What are you working on, /g/?
>>
Applicatives are just lax monoidal (product) endofunctors with strength, what's the issue?
>>
First for C
>>
3st for cherish and protect your sysadmin
>>
>>56479369
They're strong lax monoidal functors. That's all.
>>
File: 1463712307430.jpg (265KB, 700x987px) Image search: [Google]
1463712307430.jpg
265KB, 700x987px
I am making a lisp implementation in C, how can I in a portable way create a struct in runtime that I do not know about in the compile time when I use libffi? It looks like libffi does not provide any facilities for that.
>>
how familiar should I be with quotient space topology if I want to implement a ring buffer
>>
I didn't think it would end this way.

End? No, the journey doesn't end here. Death is just another path, one that we all must take. The grey rain-curtain of this world rolls back, and all turns to silver glass, and then you see it.

What? Gandalf? See what?

White shores, and beyond, a far green country under a swift sunrise.

Well, that isn't so bad.

No. No, it isn't.”
>>
>>56479386
No, just make sure to kill him before he leaves the faraday cage room after being informed of his dismissal.
>>
>>56479398
All a struct does is give you offsets and a size.
>>
File: QxoWiuB.png (35KB, 846x615px) Image search: [Google]
QxoWiuB.png
35KB, 846x615px
learning python from some british poo in the loo on udemy
>>
>>56479412
enterprise managers OUT
>>
>>56479414
>british
>poo in the loo
u wot m8?
>>
>>56479408
Basic modular arithmetic is fine.
>>
>>56479413
But there are also stuff like padding and the format may not be the same in every system.
>>
>>56479414
but that's true
>>
File: tek.webm (1MB, 720x1280px) Image search: [Google]
tek.webm
1MB, 720x1280px
>>56479441
britain is only like 60% white m8, what are you on about?

>>56479447
well, of course it is.
>>
>>56479445
The C standard guarantees a portable layout, assuming known sizes and alignments.
>>
>be me
>minor in compsci
>took functional programming over cryptography

Did I dun goof, /g/?
>>
>>56479474
82% on average, higher outside London. Sorry martsharter
>>
>>56479486
I would do the same.
>>
>>56479486
nah
>>
>>56479486
>taking classes for something you can learn on your own time
>>
>>56479414
better than zed shaw
>>
>>56479513
But now he can be qualified in meme languages.
>>
Rate my meme fizzbuzz
No imports edition

mOr x y | x /= mempty  = x
| otherwise = y

logFactor n msg x | x `mod` n == 0 = (msg, ())
| otherwise = (mempty, ())

tag loggers n = fst $ traverse ($n) loggers

main = mapM_ (putStrLn . disp) [1..100]
where disp x = tag' x `mOr` show x
tag' = tag [ logFactor 3 "Fizz",
logFactor 5 "Buzz" ]
>>
>>56479486
cryptography is a topic in math, and is worth taking
security is a topic in CS/IT
>>
>>56479519
Everyone is better than Zed Shaw.
>>
>>56479557
The set of all people who are worse than Zed Shaw somehow contains Zed Shaw.
>>
>>56479539
>do you know how to write c++ programs?
>no my comsci class never taught me that we only did the first excercises in C then we went to python and ruby
>hysterical laughter ensues, secretaries pointing and laughing about how he uses VS as an IDE
>>
>>56479547
NoPrelude it and maybe I'll be impressed.
>>
File: tip-fak.jpg (54KB, 450x450px) Image search: [Google]
tip-fak.jpg
54KB, 450x450px
>>56479486
you fucked up m8
>>
>>56479270
what does this have to do with programming? if you are doing programming you better get used to learning straight from books and looking at videos.

some of the best classes, the ones I learned the most, were the ones who gave a general assignment and references then told you to program.

>>56479530
yeah where would I go to first learn about doing this? That literally went over my head.

I do feel dumb in asking this.


Also I am supposed to be dealing with Lisp in my Intro to AI class. Should I be expecting to get any interest in Lisp or is that a langauge that I would have to be an expert in and its not even worth talking about.
>>
>>56479611
it uses the prelude monad instance for
Monoid m => Monad ((,) m)
(effectively the writer monad)
there's a prelude Monad ((->) r) for reader too

unfortunately there's no prelude state monad,
I guess because you can't partially apply type sigs
it would have to be
{-# LANGUAGE TypeSynonymInstances #-}
type State s a = s -> (s, a)
instance Monad (State s) where ...
>>
File: Bored-Woman.jpg (47KB, 507x338px) Image search: [Google]
Bored-Woman.jpg
47KB, 507x338px
>pattern matching isn't an expression in his language
>>
>>56479717
newtype State s a = { runState :: s -> (s, a) }
>>
>>56479693
>Should I be expecting to get any interest in Lisp or is that a langauge that I would have to be an expert in and its not even worth talking about.


This describes all meme languages, but some have uses (none that I know since I never veer from c++)
>>
File: 1470973297480.png (77KB, 250x250px) Image search: [Google]
1470973297480.png
77KB, 250x250px
>>56479741
>newtype
>>
>>56479749
What's wrong with newtype? Don't tell me you're one of those eternally butthurt people who throw autistic fits about newtypes.
>>
>>56479500
Pretty delusional
>>
>>56479717
>>56479741
Forgot the constructor.
newtype State s a = State { runState :: s -> (s, a) }


>>56479749
What's wrong with that?
>>
writing cheats for online games in x86 asm because i have nothing better to do with my life
>>
>>56479769
https://en.wikipedia.org/wiki/Ethnic_groups_in_the_United_Kingdom#Ethnic_Groups_-_2011_Census_data
>>
>>56479763
>>56479780
you've missed the entire point

Monoid m => (,) m
is a monad

(->) r
is a monad

("Hello", ()) >> (" World!", ())
zip <*> tail
>>
Which language handles memory allocation the best for medium-small projects (I don't care about scalability for my first shit) and is easiest to handle so I don't have to worry constantly about stack overflows?

No meme languages.
>>
>>56479744
true true. I guess thats where I would need to do more studying of basic CS methods and more actual programming projects.
>>
>>56479500
your definition of white is pretty fucked
>>
>>56479818
>2011
>muh kikepedia
>>
>>56479867
assembly
>>
non shit http library for ruby?
prior experience: requests from python
>>
>>56479839
What do you think the partial application of "s" to your "State" alias should be?
>>
Sup /dpt/fags. Can I run WPF applications on Linux yet? I would hate to go to some inferior shit like GTK or whatever freetards use these days.
>>
>>56479924
any s
>>
>>56479900
Okay, I mean actual high level languages you word parsing fuck
>>
>>56479885
says the martsharter. have you looked at the mirror?
>>
>>56479932
Rephrase: what do you think your "State s" should evaluate to?
>>
>>56479934
i'm not a shart in mart
>>
>>56479958
What are you then?
>>
>>56479918
curl
>>
>>56479950
Double -> (Double, a)
Char -> (Char, a)
etc

This would overlap with (->) though
>>
File: 1426172956332.jpg (9KB, 300x200px) Image search: [Google]
1426172956332.jpg
9KB, 300x200px
>post bait about memory allocation
>/dpt/ too low brow (or just actual script kiddies in their first week of CS courses) to even understand let alone be mad at it

Such is life as a high tech shitposter
>>
>>56479986
How do you make a type constructor out of that? You'd need type-level lambdas, which Haskell doesn't have since they make unification way harder.
>>
File: hmm, yes.jpg (34KB, 396x303px) Image search: [Google]
hmm, yes.jpg
34KB, 396x303px
>>56480013
>>
>>56480013
Have fun being a "l33t h4x0r", the rest of us are busy being productive using high-level languages.
>>
>>56480041
>I'm writing a data analyzer in C# mum I'm a real programmer
>>
@56480013
I was going to answer "Rust" but then you saw you had a no "meme language" policy and knew you'd shit up the thread about it.
>>
>>56480064
>@
>>
To: 56480116
What's the issue?
>>
>>56480064
>>56480143
That isn't how you quote someone can you please do it correctly
>>
>>56479928
Nope. WPF will not likely go cross platform.

Use Unity if you really need slick GUI cross platform with C#; it's good for graphical applications that aren't games.

GTK really isn't that bad, either.
>>
>>56480017
At some point it probably should.
In this specific case, the typeclass completes the application anyway, so I don't _think_ they'd need full lambdas.
>>
>>56480013
>allocating memory manually
>2016
>>
ATTN 56480158
Please advise on the proper way to quote on this subchan.
>>
FWD: FWD: FWD: MSG:
This thread has gone to shit.
>>
56480158:

Please to be doing the needful.
>>
>56480201
>subchan
*subreddit
>>
>>56480201
>>56480216
>>56480223
>>56480251
Single left-click on the post number or use double meme arrows
captcha: CALLE CALLE
>>
>>56480280
>>56480280
>>
>>56480190
Type-level lambdas would turn first order unification into higher order unification. The latter is very difficult, to the point of being undecidable outside of a limited fragment.

You need some kind of quantifier to turn a type with free variable "a" into a type constructor, and Haskell doesn't have this outside of named type constructors, which is why you need newtype (or data).

Newtypes are mostly zero-cost in Haskell, anyways.
>>
COMPOSE MSG
ADDR::56480280
Like this?
>>
<<56480280
I see
>>
how can a programming forum be THIS BAD at knowing how to quote!!!!!!!!!


Its Unbelievable! You numskulls!
>>
>>56480320
(quote '())
>>
>>56480316
having a giggle m8
>>
@56480116
@56480158
@56480280
its to deny (You)s faggot
>>
<<56480336
I'm sorry, I don't speak British
>>
$reply < 56480316
>>
>>56480017
type families
>>
>>56480320
>not using bbcode
>>
>>56480371
Are beefed up type aliases.
>>
EHLO 127.0.0.1
MAIL FROM:<[email protected]>
RCPT TO: [email protected]
DATA
From: An Onymous <[email protected]>
To: 56480280 <[email protected]>
Subject: What did he mean by this?

What did he mean by this?


.
QUIT
>>
>>56480385
everything is a beefed up type alias
>>
Delivered-To: [email protected]
list-Id: 56479338
list-Post: 56480320
Date: Fri, 02 Sep 2016 22:57:00 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

I think we should probably add this to the FAQ.
>>
>>56480418
As in you still can't partially apply them, as there are no type-level lambdas.
>>
(quote >>56480320
how can a programming forum be THIS BAD at knowing how to quote!!!!!!!!!


Its Unbelievable! You numskulls!)

lol fag
>>
>>56480450
hasklel doesn't even have types
>>
"56480320"

what?
>>
>>56480469
Do you enjoy coming on here and being retarded
>>
>>56480406
>>56480419
TOP KEK! I'll post this on /r/ProgrammerHumor
>>
>>56480483
prove me wrong
protip: you can't
>>
File: Screenshot_2016-09-07_16-04-16.png (14KB, 328x32px) Image search: [Google]
Screenshot_2016-09-07_16-04-16.png
14KB, 328x32px
>>56480510
(you)
>>
>mfw can "program" in any language that's not gay/functional
>I.E C,C++,C#,Java,VB.NET, PHP, Matlab
>but my problem solving skills are shit tier

What do? My solutions are always ass, I think.
>>
>>56480540
what's you're point?
>>
56480574
>you're
(yore)
>>
>>56480545
gain experience
do project euler and look at the solutions of others
>>
Reminder if you're not a framer and a programmer you're a fag
>>
File: Extra4.jpg (45KB, 650x698px) Image search: [Google]
Extra4.jpg
45KB, 650x698px
What would be a good, security-related project?
>>
>>56480346
>>56480393
is this something you guys could help me with? I want to get better!
>>
Hello I am an artist looking for a geeky type guy to help me with my game =)
>>
>>56480660
Try to program something that will stop random people from penetrating your mom.
>>
>>56480173
>Use Unity if you really need slick GUI cross platform with C#; it's good for graphical applications that aren't games.
Please be bait.
>>
>>56480545
>functional languages are gay t. shit programmer
>>
>>56480675
I think my DB classes used the same sample database to teach us basics.
>>
>>56480173
Unity isn't even that great for games. People like it because it's 3D, free, and it has an asset store.
>>
>>56480660
I've never done that, but...
there are tons of things to learn and improve, m8
>>
>>56480691
Do the following
>specify engine/framework/language
>specify payment
>>
>>56480749
Um I think like a fantasy jrpg like?
Lol hoping to find someone interested not pay
>>
>>56479476
I am pretty sure that this is not the case.
>>
File: 1460200745189.webm (1MB, 640x360px) Image search: [Google]
1460200745189.webm
1MB, 640x360px
What's your experience with programming offices, /dpt/?
>>
>>56480781
If it weren't the case, C would not be the FFI standard.
>>
>>56480780
>>>/vg/agdg
>>
>>56480789
No one knows what I do and they can't figure it out from looking at my screen for 5 minutes, so I can basically work on personal projects all day.
>>
>>56480789
It pretty much like that anime desu desu ne~
>>
File: 1461005231404.jpg (687KB, 826x1167px) Image search: [Google]
1461005231404.jpg
687KB, 826x1167px
>>56480660
Just found this, might be interesting
https://www.eecs.umich.edu/courses/eecs398.f09/projects/398-f09-proj1-spec.3.pdf
>>
>>56480789
ssh [email protected] in a vim tab has been my experience
>>
>>56480805
The ABIs that different systems use for C are the FFI standards, not the actual C standard.
>>
>>56481010
C has a standard ABI for structs, assuming the primitive types have matching sizes and alignments.
>>
>>56481040
>C has a standard ABI for structs
Where does the standard say that? You can't reply to that because the answer is nowhere.
>>
>>56480836
>OOP vs FP
>>
>>56481093
Don't fucking reply to me you mongrel.
>>
>>56480726
And your solution is...? And more importantly, why?

Thanks for any replies.
>>
>>56480780
Just as a side note
fantasy jrpg is a genre not a engine/framework or language.
>>
>>56481151
dont talk down to me k thx =)
>>
>>56481061
It adds padding in a well-defined manner such that every field is aligned. Given the sizes and alignments of primitive types on the platform, you can figure out the struct layouts.

That is, unless you use a compiler extension like #pragma pack, but then the guarantees are off.
>>
>>56481234
Again, not in the standard.
>>
>buy new towel
>shower
>dry off
>i'm covered in fibre from the towel

Such is life in neetdom
>>
>>56481249
All but guaranteed, then. Practically, it's guaranteed. Fuck off standards autist.
>>
>>56481325
You're supposed to first wash newly bought clothes, towels and such before using.
>>
File: Capture.png (96KB, 1364x722px) Image search: [Google]
Capture.png
96KB, 1364x722px
all my notes now compile into LaTeX
>>
>>56481386
why wouldn't you just write in LaTeX, it's practically english
>>
>>56481386
.... you write your notes in code, then compile it into notes? or am I seeing this backwards?
>>
>>56481427
He's an economics student; he isn't too bright.
>>
>>56481435
Haha this is what I was thinking. But then again, this is /g/.
>>
>>56481435
because that's tedious, you have to precede all your lines with a \paragraph{} or subsection tag
>>
you have 5 minutes to draw a horse only using TikZ
>>
Pajeet game in ARM64 assembly
>>
>>56481435
It's notes written in a format which matches a markup syntax
they are interpreted into latex and then built into a pdf
>>
>>56481480
meant for >>56481427
>>
>>56481427
>LaTeX is practically english
\expandafter\expandafter\expandafter\edef\top{\expandafter\unexpanded kek}
>>
>>56481511
Why not just write the fucking notes?
>>
>>56481496
Roller Coaster Tycoon ?
>>
>>56481386
>windows
>sublime
>>
>>56481511
i think you took the "compile to pdf" meme a bit too seriously
>>
>>56481541
kek
but instead of rails you set up designated shitting streets and slide on poo
>>
char *toString(int *v)
{
*v = rand() % RAND_MAX;

char buffer[64];
return itoa(*v, &buffer, 10);
}
>>
File: 1359486969668.png (31KB, 271x310px) Image search: [Google]
1359486969668.png
31KB, 271x310px
>>56481624
>
rand() % RAND_MAX

What.
>>
>>56481624
what
>>
IDE color theme poll, bright vs dark
'http://www.strawpoll.me/11177177
>>
>>56481786
I was going to vote for dark theme, then niggers from /pol/ started tonguing my anus and I closed the tab.
>>
>>56481786
dark as my soul
>>
>>56479867
> handles memory allocation the best
what do you mean by this?
literally though
>>
>>56481893
it's bait, see >>56480013
>>
>>56481349

>Practically, it's guaranteed.
Works on every platform libffi has been ported to. That's all you need.
>>
File: image.jpg (36KB, 500x371px) Image search: [Google]
image.jpg
36KB, 500x371px
What programming knowledge is needed to make an App Store app from scratch?

I know Python and bash shell scripting for simple stuff but I want to make an app to make money and don't know where to start with learning useful programming stuffs.

TLDR; how do you create an app?
>>
>>56481786
Dark with large font. Not voting on this /pol/ meme though.
>>
>>56481786
if you're in the dark you like dark colors

if you're in the light you'll need brighter colors

people on 4chan like darker schemes because they code in the dark
>>
>>56481996
> What programming knowledge is needed to make an App Store app from scratch?

bout tree fiddy
>>
>>56481996
>>56482045
Thanks for helping numbnuts
>>
>>56481786

I use a dark colorscheme
My font size is 11, not 16+ or 8
I'm voting for Gary Johnson, not Trump or Hillary.
I don't use an IDE, just Sublime Text 3

I honestly couldn't choose either of your two options because you bind too much information to one answer. Consider making a poll with multiple questions instead of one question that assumes that every user of a dark theme also likes large fonts and Donald Trump.
>>
>>56481996
Swift
>>
>>56481786
i-is emacs (with flycheck and company) an ide?
zenburn, 11pt consolas/16px terminus
Jeremy Corbyn for PM
>>
>>56482122
>I'm voting for Gary Johnson
https://www.youtube.com/watch?v=ENbmHdgE9N0
>>
>>56482122
Are you coming to CLOP, the Conference for Lovers of Original Ponies? It's in Portland this year.
>>
>>56482120
Not true.
There are plenty of cases where you do function manipulations.
(a -> b), even (a -> IO b) is fine.
>>
Is there something like strace that ouputs C rather than sys calls?
>>
>>56482335
ltrace
>>
>>56482245
(a -> b) is an uninhabited type
>>
>>56479338
on my game
>>
File: 1448933748959.jpg (79KB, 653x590px) Image search: [Google]
1448933748959.jpg
79KB, 653x590px
>>56482405
Actually, it's inhabited by undefined/an infinite loop.
>>
>>56482440
>using a language that allows non-termination
Disgusting
>>
>>56482480
You are talking about Haskell, you know. Not saying I like it.
>>
>>56482389
wow thanks man
>>
>>56482495
I pretend that people who write non-terminating Haskell functions don't exist.
>>
>>56482525
Do you consider corecursion under terminating? Because corecursion is fine.
>>
Hey scrub here learning Java.
I'm fresh at this and I'm having someone teach me but are there any resources that I can read before I start next month?
Also I do plan to learn more but my friend says Java would be good. Realistically speaking how long does it take to learn each language?
>>
>>56482525
Just saw this thread, you need to deal with being btfo anon, shit happens, chill out
>>
>>56482440
dumb frogposter
>>
>>56482561
Once you learn one the others are just syntax difference and possible new features.

Java is going to teach you a lot of bad habits though.
>>
>>56482626
Such as it's best I know before hand
>>
>tfw literally shitposting
>>
>>56482525
so it's undecidable who exists or not?
>>
>>56482525
forever :: Applicative f => f () -> f ()
>>
>>56482827
forever x = x

Dumbass.
>>
File: 1453656893900.png (1021KB, 870x717px) Image search: [Google]
1453656893900.png
1021KB, 870x717px
>>56482854
This is an elaborate troll, you can't fool me.
>>
>>56482864
forever = id
>>
Programming noob here. About to start learning C# for my Business Application Development class. Any tips for a beginner?

We are get the choice to build either a web app or a mobile app at the end of the semester. Web App would be easier but I think it would be cool to make something I could use on my Android
>>
>>56482186

No one's perfect, but quite frankly, he's more sensible on foreign policy than either Hillary or Trump, and he also has a much greater respect for the constitution.

>>56482480

If a language could not do non-termination, it would not be turing complete, and the class of problems it could solve would be severely limited.

>>56482525

If you wanted to develop a video game in Haskell, how would you do so without an infinite loop or infinite tail recursion? The concept of a game loop isn't too difficult to describe in a functional manner. You update the game state, draw the updated game state, and then call the game loop function again with the updated game state. If the game state was a quit message, you terminate the function. The program does not quit until user input allows this, however, making the function effectively non-terminating. This is a basic application of infinite loops, but there are many other useful applications. I am not sure why anyone would cripple themselves to not allow this.
>>
>>56482916
I don't think he minds if main is non-terminating

main = forever loop
>>
>>56482864
>>56482868
Oh, I thought you just made up that type signature and were saying it was uninhabited by any non-terminating function, along the lines of >>56482405.

Now I see what it is. It's kind of special because, depending on the operation >>, it could be corecursive.
>>
I have an idea for a game with a fictional language. Think of any science fiction game with random alien runes and shit.

I want to include some way of translating real words to my made up language. The problem is, I don't want it to just be a straight up look up table, I want to fuck around with word order, prefixes/suffixes, short forms, etc...

I can't seem to find anything that allows me to make my own translator, so I've been trying to make one myself, but holy dicks is this hard.

Anyone have any tips/resources to help out? Language independent, as long as I can embed it into my game.
>>
>>56482916
johnson's foreign policy is to erase the US border, and his running mate is a gun grabber. your party is a joke that sells its ass out to whoever can pump it full of the most funding and votes
>>
>>56482958
in the case of Alternatives, a *> empty = empty (monadplus laws), so if you give it
>an empty list
>a Nothing
>an exception
it will terminate the infinite expression in finite time
>>
>>56482916
Even (well-behaved) applications with a main loop eventually terminate when given the input to do so. Totality doesn't imply non-Turing-completeness - in theory.
>>
>>56483001
Whoops, a *> empty = a
(Since you're calling "forever", it would have to be empty anyway)

>>56483008
Coq and Agda use COIC - calculus of (co) inductive constructions

Co induction allows for well behaved infinities
>>
>2017
>year of Haskell gamedev
>>
>>56483028
For instance

fibs = 1 : 2 : zipWith (+) fibs (tail fibs)
This is technically corecursive, and it builds an infinite list
>>
>>56483028
Corecursion isn't enough to prove that a main loop, only terminating on a given input, is terminating.

>>56483067
You still need to prove that whatever consumes that list will terminate some other way.
>>
>>56482984
>NLP is hard
No shit.
>>
>>56483080
No, because there's nothing inherently wrong with non-termination.
Agda and COQ allow it
>>
>>56483122
Corecursion can only produce a possibly infinite data structure, which needs to be consumed by something that terminates on some other measure, like taking a finite number of elements from an infinite list or running some computation until a certain input is given.
>>
>>56483164
>until a certain input
which may never be given
>>
>>56483175
Either the input will be given or the universe will end.
>>
>>56483242
>or the universe will end
prove it in Coq
>>
>>56483251
If the universe is the system, is it possible to prove that property from within the system itself?
>>
>>56483291
>complains that he can't prove what he said was true
>>
>>56483312
It might not even be provable for mere inhabitants of the universe.
>>
is a static const char * the same as creating a static const char *[]?

Or do different semantics apply?
Because I'm not entirely familiar with the way const applies to pointers when creating read-only strings.
>>
>>56482988

While I don't know much about his running mate, Johnson himself has been consistent in his defense of the second amendment. Also, Johnson doesn't believe in not having borders. He just believes in making legal immigration easier. That said, he does support background checks on work visas, so he clearly isn't completely for open borders.

Of course, if you prefer Trump or Hillary, you might consider that both of them support restricting our ability to use encryption, among other things.
>>
I want to build a network system that isn't fucking garbage. Basically, zeronet without the need to sign all your posts, with an f2f mode, and with some kind of mixing.

On top of that, I want to build new web standards so we can all get rid of the html5/css/js garbage and to serve as an example program.

While the latter is fairly easy to implement when the former is in place, where do I start with the network itself? Zeronet is fundamentally flawed and I don't think its code is any use. Freenet and gnunet are too slow. I don't think ipfs does anonymity. Retroshare got buttfucked and I'm not sure how useful the new code can be.
>>
>>56483368

static const char* is a pointer to a const char, with static scope
static const char*[] is an array of pointers to const char with static scope
>>
>>56482988
>>56483429
Cool programming
>>
>>56483500
can I also make the pointers themselves const?
>>
>>56483429

Johnson has been saying some very stupid shit lately. The whole cake-baking debacle, for instance.
>>
File: pro-font.png (9KB, 538x316px) Image search: [Google]
pro-font.png
9KB, 538x316px
Also, I detest the accusation.

>use blindingly bright theme & 8-point pro-font
>not #MentallyHill
>>
Javascript frameworks... WHat the fuck is going on, really?
>>
File: 1464988239571.png (509KB, 454x642px) Image search: [Google]
1464988239571.png
509KB, 454x642px
>>56483584
>imperative
>>
>>56483616

i-it just works!
>>
>>56483547
this is valid C
static const char const *const c[SIZE];
>>
>>56483584
>GetPixel
>SetPixel
>Not using LockBits and pointers

What's wrong with you OSGTP? Are you okay?

Here take my implementation.

http://hastebin.com/zesehevuzu.cs

Much faster than the apocalyptically slow Get/Set pixel.
>>
>>56483653
>const char const *const
What the ass is this shit?
Why 3 consts?
>>
>>56483713
for const correctness
>>
>>56483547

Yes.

This is const pointer to a non-constant:
char *const a;


This is a non-const pointer to a constant:
const char *b;


This is a const pointer to a constant:
const char *const c;


>>56483548

Like I said, he's not perfect. I wouldn't say I like him as much as I liked him in 2012. But he's still the best candidate available, IMO. I do not like either of the Republican or Democratic candidates, and with regards to the Green Party candidate, Jill Stein... I've met her. Heart's in the right place (at least judging from the talk she did at my university), but not necessarily her brain. Although I'd still trust her over the Republicrats.
>>
>>56483682

Yes, I'm aware of that method because I also read the blogpost that you got the idea from.

In this case, the apocalypse is more than fast enough for my purposes.

If I ever need anything faster, I'll go with the Pointery bitlocky wrapper.
>>
>>56482122
>I'm voting for <person who has no chance>
It's like you're literally
>tripcode
Oh.
>muh statement by throwing away my vote
Good job, you sure showed them a thing or two.
>>
>>56483771

I miss Ron Paul.
>>
>>56481238
Was in class.

X86 is not a simpler memory model, it's more complex, it is faster though. I agree it's a bad idea, we have more and more die space for more complex decoders, and clocks aren't increasing at a large pace for the foreseeable future. Something in between x86 and a RISC architecture is terms of complexity would be good for mobile, smaller dies are better for price and heat. And ideally vector processors will become more advanced and general, so new instructions have to be created for ever increasing vector sizes.

Have you read Agner Fog's new paper on his theoretical architecture. Honestly it's well done. There is a couple rough edges in it, but I think I might try implementing the architecture on FPGA for my master's to accelerate development of an open architecture similar to it.
>>
Making a bot for Akaribbs, what commands should it have. Something like "!info" or some shit like that
>>
>>56483896
New instructions DON'T have to be made for wider vector units*
>>
>tripfags talking about US politics
it's cool because we like their opinions a lot, that's why they put on trips right?
>>
Why are C++ libraries so shit when it comes to any form of documentation or help

I'm trying to use curlpp (sjwhub/jpbarrette/curlpp) to create HTTP requests. The examples tell me I can use
curlpp::options::Url myUrl("http://google.com/");
, but my editor tells me that the namespace 'options' cannot be found. The include folder on github also doesn't contain the namespace; however if I look in the src folder the namespace is present there

Does this mean I have to build the library manually/kms?
>>
>>56483584
illary for hospital 2016
>>
>>56483882

Better than voting for a crappy candidate.

>>56483891

Ron Paul was pretty legit.
>>
File: 1472425944877.jpg (39KB, 460x460px) Image search: [Google]
1472425944877.jpg
39KB, 460x460px
>>56479338
Currently working my way through "python numerical methods for engineering", although I`m doing it all in F# because I`m a certified MS shill.

How can I take subtract from an array slice in F#?

The python code in the book:
def coeffts(xData,yData): m = len(xData) # Number of data points a = yData.copy() for k in range(1,m): a[k:m] = (a[k:m] - a[k-1])/(xData[k:m] - xData[k-1]) return a


In this code, I get "double does not match type double[]":
let coefficients (xData : double[], yData : double[]) : double =
let m : int = xData.Length
let mutable a : double[] = yData
for i = 1 to m do
a.[i..m] <- (a.[i..m] - a.[i - 1.0])/(xData.[i..m] - xData.[k - 1.0])
done
a


Any ideas??
>>
>>56483961
It's not that the documentation is shit. It's that both your editor and you are shit. The options namespace exists within the curlpp namespace and Url is a template.

Also:
>The include folder on github also doesn't contain the namespace

https://github.com/datacratic/curlpp/blob/master/include/curlpp/Options.hpp#L50
>>
>>56484063
ughhh why does quick reply always fuck up my code formatting? -_-
>>
what is the Hillary clinton of programming languages?
>>
>>56484066
>was including option.hpp all the time, not options.hpp
>;-;
thanks famalam
>>
>>56479586
Could you recommend me something learn Python then? Keep in mind I know 0 programing languages.
>>
>>56484115
Kill yourself.

>>>/pol/
>>
File: mysql oracle.png (83KB, 1614x217px) Image search: [Google]
mysql oracle.png
83KB, 1614x217px
>>56484115
something owned by oracle
>>
>>56484079
If you're pasting from Visual Studio, you've got to first highlight the block and Shift+Tab the code over to the left margin, then copy/paste into 4chan.

It's detecting the leading tabs on your page.
>>
>>56484115
C#
>>
>>56484286
Wouldn't Java fit more?

Java is:
>well established(ment)
>been in the arena for quite a while now (politics/programming)
>in poor health (losing market share to other languages)
>>
>>56479338
>4
PO
>>
File: 1472150793669.jpg (41KB, 540x540px) Image search: [Google]
1472150793669.jpg
41KB, 540x540px
I have a idea for a iOS app and as a UI designer I also created all assets for the interface including the animations/transitions. The app is pretty simple, nothing too complicated I guess.

How much money do you guys think does it take to let someone develop it? As a student I thought about hiring someone at my university as I'm not that rich, or is it better to find someone in India?
>>
>>56484327

C# is a lot more like the Donald.

- Tons of money behind it
- Relatively new to the arena
- Doesn't take orders from anyone, and therefore can implement features way before Java's committees get around to them
>>
>>56484392
Nah, it's way more like hillary for the reasons you name except the last point is really the reverse of what you say: it's 100% controlled in every way by M$.

Donald doesn't "have tons of money behind him" (that's hillary). The donald is self-funded, that's the important aspect here.
>>
>>56479398
template out of macros?
>>
>>56484419
>it's 100% controlled in every way by M$.

It's actually controlled by dictator Hejlsberg who does whatever he damn well pleases.
>>
>>56484477
I would have to know the struct at compile time.
>>
And re: Donald, the "tons of money behind him" is his own.
>>
>>56484332
?
>>
I wonder if I could bribe Hejlsberg to get free functions added to C#.

That would be so sweet.
>>
>>56484387
it'd be best to make it yourself, a real app developer is too expensive, someone at your university is about as clueless and lazy and you are, and an indian shop is just going to be an endless money sink with no result to show for it
>>
>>56484569
>and you are
*as you are
>>
>>56484551
>wants free functions
>bitches about
using static


Make up your goddamn mind. If anything, free functions are much more harmful than using static headers.
>>
>>56484551
that would be more horrible than it already is
>>
>>56481786
>IDE
weak
>>
>>56484643
>using a language without free values
>>
>>56484643
>>56484644

These are both incorrect assessments.
>>
Anyone know where I'd be able to find some documentation/a primer on programming for MSDOS?
>>
File: opinion discarded.jpg (77KB, 680x680px) Image search: [Google]
opinion discarded.jpg
77KB, 680x680px
>>56484713
>C# shart in mart
>>
That's it, I'm learning MUMPS
>>
I'd also be very interested to know how free functions would be ""worse"" than using static.

They'd still be in namespaces.
>>
>>56484718

Why do you want to program for MSDOS?
>>
>>56484895
Fun
>>
>>56484115
Ada because she is fat and old and never used or liked except by government people who shill for her.
>>
>>56484880
I`d like to know how free functions are practically any different from using static and why you`re actually wasting time contemplating such a pointless difference.
>>
>>56484880
Non-static functions always must be generated by the compiler. If a static function isn't called or is always inlined the compiler doesn't have to implement that standalone function.
>>
>>56484880

>They'd still be in namespaces
You can make a class in C# that is not in a namespace. If you were to allow free functions, why would they not be allowed to operate outside of namespaces?

In any case, there is absolutely nothing wrong with using static.

>>56484908

Mmkay. Are you looking to do 32-bit or 16-bit shit?
>>
Writing a flash translation layer. For some reason the instructors basically told us exactly how to do it, including what design to use. Not upset about it though b/c I have a lot of OS work to do.
>>
>>56484908
There is very, very little about programming for MSDOS that could be called "fun".
>>
>>56484923

Except Ada is good. It's what Pascal really wanted to be.

>>56484933

Because static using statements are a hack, and frankly, static imports & free functions are two different things.
>>
>>56484946
16
>>
>>56484947

>For some reason the instructors basically told us exactly how to do it, including what design to use

The idea is this: You don't have a ton of time to develop this program, you will likely have to extend it, and they want to focus on the actual tasks associated with translation, rather than wasting large amounts of your time trying to come up with a design. It's a test of implementation, rather than design.

I've had a couple of classes that follow a similar structure.
>>
File: 1445214734389.jpg (157KB, 600x690px) Image search: [Google]
1445214734389.jpg
157KB, 600x690px
I feel like I'm taking crazy pills! Everybody is wrong except for me!
>>
File: image.jpg (148KB, 890x670px) Image search: [Google]
image.jpg
148KB, 890x670px
>>
>>56485022
>reddit.jpg
>reddit.txt
>!!reddit
Nothing to see here.
>>
File: c.png (63KB, 449x498px) Image search: [Google]
c.png
63KB, 449x498px
>>56485048
>I disagree with this guy's feature request and therefore reddit.
>>
>>56485098
see >>56485048
>>
File: 1462666392038.jpg (57KB, 415x440px) Image search: [Google]
1462666392038.jpg
57KB, 415x440px
>t-there's nothing reddit about usernames!
>t-there's nothing reddit about my shitty meme comics!
>t-there's nothing reddit about shitty reddit movie references!
downvoted

back to r/microsoft you go
enjoy your shitty programming language
>>
>>56485152

but Zoolander came out several years for Ribbit even existed.
>>
>>56485002

Welp, not many tools in that area. You looking to do C, or some other language?
>>
>>56479474
I really need to know the name of that whore.
pls tell me
>>
>>56485232
C or Asm. I'm not looking for tools moreso just documentation on it. It's been surprisingly hard actually finding anything presumably because the relevant materials were mostly pre-internet.
>>
How do I get my compiler to stop nagging me about signedness in a ternary statement that includes pointer arithmetic?
Only j is unsigned.
unsigned j = (!pos) ? strlen(str) : pos - str;
>>
>>56482525
iterate is pretty useful you fucking retard
>>
>>56485243
pistol from tek syndicate

furfag tranny
>>
>>56485243

She looks like a cracked out chipmunk.
>>
>>56483771
i wish the first one would be writte
char const *a
>>
File: unimaginable dissapointment.jpg (67KB, 606x496px) Image search: [Google]
unimaginable dissapointment.jpg
67KB, 606x496px
>>56485351
>furfag
>>
>>56485544
The lip piercings had no effect on you?
>>
>>56485271
unsigned j = (!pos) ? strlen(str) : (unsigned)(pos - str);


Should work.
>>
>>56485559
not really, as long as she doesn't have one in her cock
>>
>>56484286
That doesn't work because some people actually like C#.
>>
>took college class on C++
>three hours twice a week
>old Jewish nigga would not let us use computers until after 3 hour lecture
>took 3 hours on simple shit
>would talk about irrelevant shit for 2
>teach myself years later
>get competent in things that took weeks to do that the whole class struggled with
>been 5 years since class but having proper concise resources I can actually learn
>realize I can learn code
>realize I have friends here that can help me
>realize this old bitter fruit made things harder for no reason
>realize the flaw in institional education
>>
>>56485827
>be me, a dumbass
>>
>>56485827
>be retarded
>post retarded shit on /g/
It's like pottering
>>
trying to do interpolation via newtons method:

(python)
yData = [1, 2, 3, 4, 5, 6]
xData = [6, 5, 4, 3, 2, 1]
m = len(xData)
a = yData

for k in range(1,m):
a[k:m] = (a[k:m] - a[k-1])/(xData[k:m] - xData[k - 1])

print(a)


What am I doing wrong? This code is straight from the text book yet it keeps throwing a "TypeError: unsupported operand type(s) for -: 'list' and 'int'" at me. I can`t get it to work in F# either...

Also, here`s a free copy of "numerical methods in engineering with python" if anyone is interested: https://dropfile.to/zTlmjd3
>>
>>56485865
>be put in first exposure to new subject
>poorly taught
>given no direction
>get shit tier text book written by "close friend"
>Every class must sit there and hear how much better we have it and his daughters internet boyfriend
>would over complicate simple shit
>had to give answers on final due to nobody knowing what's going on and the final being departmental
>actually outright admits to us he didn't forsee this and that he didn't teach us a chunk of it
Passed class with bitter taste in mouth
>>
new thread! >>56485995
>>
>>56485252

I'm not sure where I would find some C programming guides dedicated around MSDOS programming. With regards to assembly stuff... I know there's a real mode assembly guide on the OSdev wiki, although that assumes that there isn't an operating system present.
Thread posts: 312
Thread images: 29


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.