/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Old meme!

Previous thread:

Attached: composite_15383304354212.jpg (1600x1600, 498K)

Other urls found in this thread:

csharpindepth.com/
codeblog.jonskeet.uk/2008/03/21/book-review-head-first-c/
github.com/miloyip/game-programmer
wiki.call-cc.org/eggref/4/sdl2
gnu.org/software/guile-sdl/
hardcoreprocessing.com/Freeware/SDLML.html
twitter.com/NSFWRedditImage

LOL

I just want to build my entire program as a set of hot-reloadable AOT compiled database queries that run entirely in memory at 60fps. Is that so much to ask?

Attached: 31450823;800x600.png (800x600, 579K)

bowsette has a big hat

So monads?

for you

Yes I know his story well, why have you literally copy pasted in a reply to me?
That is what I struggle with most, how to effectively search (google) so my question is answered, how do I even improve this?

What ever happened to ol’ Bum Tickley?

Attached: 1502143062772.jpg (387x772, 31K)

in bigGuy:

>how to effectively search (google) so my question is answered
you ask one question
it didn't work
you ask a slightly different question
it worked a little better
recurse

if you have no search terms, go ask a human for search terms

Same as ever. He still does comics. He actually did a Loss edit for its 10 year anniversary which is interesting because he said multiple times he hates that Loss turned into a meme.

He commit suicide when he woke up with a B^U tattooed on his ass.

does that mean he finally learned how to handle the banter?

post = (++" for Haskell") . toOrdinal

Well, I just gave you a bunch of topics to start researching. Just start googling them, maybe get some books on the lower-level stuff. Look up examples of how they work in your preferred language.

Also, when you just want some background noise you should have a Computerphile and Numberphile playlist running. Those will give you some great starting points for a lot of topics.

What you need right now isn't necessarily deep knowledge of any of this. You're still too new to make much use of it. Instead what you want is exposure so you'll have some idea of what things are when you encounter them. Exposure will also help you identify where you don't need to reinvent the wheel because you'll have sense enough to know there's already a solution for what you're trying to do.

X is -10 to 10. If X is -10, then Y is 0. If X is 10, Y is 0. If X is 0, then Y is 10. If X is -5 then Y is 5. If X is 5 then Y is 5.

Trying to figure out how to code this and it feels like it should be bloody obvious.....

Excuse me, X is 0 then Y is -10.

Graph it and it should be obvious.

What books would you recommend? I am using C#. What is computerphile and numberphile? What playlists should I listen to?

if(x > 10)
{
x = 10;
}

if(x < -10)
{
x = -10;
}

y = 10 - Math.abs(x);

I didn't learn from books, but I know some people do. I don't have any book recommendations, sorry. Computerphile and Numberphile are Youtube channels that talk about obscure CS and math subjects. Just look 'em up and start watching videos.

Hey Jow Forumsuys, im actually looking for help on starting to learn c#, it'll be the first language i ever learn. What books should I get and how should I go through this?

Attached: froggy.gif (400x267, 1.56M)

How did you learn then if not through books?

read the fucking manual

The documentation that goes with the language?

yes

>it'll be the first language I ever learn
Well, it's a better choice than Java.

Introductory books are hard--they universally suck.

This book, by the guy who answers the most C# questions on StackOverflow, is pretty much the authoritative source on C#. Somewhere in-between a reference book and an introductory book. Easy to understand, for people who already know how to program.
csharpindepth.com/

Check out the rest of his book reviews on C#.
codeblog.jonskeet.uk/2008/03/21/book-review-head-first-c/

Gosh, that was a long time ago. I just started looking at stuff other people had made and tried to make my own stuff. It took a long time before I really knew what anything was, but I picked up the basics, like assignment, operators, boolean expressions, if statements, and loops pretty quickly. Over time I just picked up more and more stuff, like how structs work, how objects work, how type systems work, how memory works, how multi-threading works, etc. A lot of that I gained from just dicking around on my own, and a lot of it gained by reading autismogons argue about the stuff.

Lurking is now, and always has been, a powerful tool.

Thank you user. Just downloaded that book. Any videos or tutorials or anything that could get me started?

>Lurking is now, and always has been, a powerful tool.

Well said, now stop replying to that tard so he has to lurk moar. "want to be an excellent programmer" my ass, he's just an attention whore

How do I gauge my performance at work? I really feel like I shouldn't have wasted 5 days (not the whole day mind you) hunting down this one logic error in this codebase I've spent the last 4 months in. But it's not like I slacked off or was particularly careless.

Interesting I guess as long as I lurk on the programming forums I should be able to pick up something and can ask questions about it.

Oh yeah I had this information linked to me from the previous thread, what do you think of it? github.com/miloyip/game-programmer
Oh shut up you are boring mate.

Bug hunting is always time consuming and can easily take more than one day.
4 days seems excessive.

>videos or tutorials
absolutely none
never do this
ever
waste of time

every time you have a question, go to StackOverflow.
Jon Skeet has invariably answered your question, no matter how dumb it was.

>github.com/miloyip/game-programmer
that's a fucking joke
are you going to read 50 books on a 12 step path before you write your first line of code?
I would suggest steps 2 and 5 only

No of course not, I will read step 2 and program along with the book on step 3, does that sound good?

step 3 isn't relevant until you are at least an intermediate level programmer, where you're actually concerned about software architecture and have enough experience to make informed decisions about it
step 4 isn't relevant unless you are writing fucking renderers or something (also not a beginner topic). The math required for basic game dev is simple. Basic trig and vectors from high school

Does anybody have experience using Chapel? Also how comes people say it didn't have a proper "matrix vector multiplication" until 2015? (Eg that Quora answer about what happened to the language)

Okay. What about this book here?
HeadFirst C# by Andrew Stellman.

lol holy shit ty

Good books for teaching myself NLP? There was a taster course at uni but now I wanna know more

Opps I said the wrong steps, I meant I will read step 1 and program along with the book on step 2 my mistake.

Why not OCaml?

Stay away from Scratch and Python. The first is a drag-and-drop "language", which is useless. The second is deceptively difficult because it removes all of the safety features that make other languages seem "unfriendly" to people who don't know any better.

Reaching runtime is NOT a useful measure of accessibility.

What you really want is a compiler that will scream at you for every mistake you ever make. There's absolutely no sense in reaching runtime if you already know your program is fucked up. You should start by learning a statically typed language. C++ is probably a bit much, so C# or Java are your best bets. Most people will tell you that Java is a terrible language, and it kind of is, but a beginner usually won't encounter the really awful stuff. Except for some minor syntax differences I'd be surprised if a novice could tell the difference between the languages.

You don't need to know everything immediately. While some of those advanced books might be fantastic, you won't need to know 90% of what they teach to make, for example, a simple Flappy Birds clone. If books are how you want to learn I'd use the study path as a reference for books you might read in the future, but your best bet right now is to just start throwing yourself at the problem until you manage to make something simple that mostly works.

There's little sense talking much more about this until you actually get some experience under your belt and you have some idea of what questions you should be asking.

Jon Skeet reviewed that one. Just check his book reviews. He's reviewed all the ones worth mentioning.

>NLP
recurrent neural networks lmao done
20 years of research
down the drain
PhD status: worthless
career status: ended
future status: over

Attached: 1523117077550.jpg (639x624, 52K)

Jon Skeet is the Chuck Norris of SO.

Attached: 6d8ebb117e8d83d74ea95fbdd0f87e13.jpg (328x328, 22K)

I think everybody should definitely learn Scheme and ML as their first languages. Order doesn't matter too much, but it's crucial to be exposed to (among other things):
>an expressive static type system
>recursion and deriving the Y combinator
>continuations
>complexity
>higher-order functions
>algebraic data types
>separation of interface and implementation
Together Scheme and ML can cover all of them and concepts which may a learner may find unclear in one might be clearer to them in the other. You could argue for substituting Haskell or Idris for ML but let's not run before we can walk eh?

I am on a computing course that will get me into university at the moment, programming is most lessons and he is teaching us C#. On the link I gave, it says the recommend path is C then C++, what is the difference between C and C#? Should I try to learn both at the same time?

>what is the difference between C and C#?
C# is a semitone higher

Is there much support for making games in those languages?

What?

it's true.

what the fuck is this normie shit jesus christ this site is doomed

Attached: xzza.gif (480x275, 2M)

>the recommended path is [...]
bullshit
as long as you're not using some godawful language like BASIC there's no such thing as an optimal path.

Programming language theory is the foundation of every programming language, and as such, most programming languages are similar to most other programming languages.

As you learn your second language, you begin to think that it kind of reminds you of the first.
As you learn your third language, everything starts blending together and you start having to look up syntax and minor details because arr programming languages rook same and function same.
Eventually you realize that they pretty much are all the same so you research programming language theory to see what implications the minor differences in syntax have for the programs that you write

>gnu assembler always uses some weird as custom syntax completely unlike all other assemblers

Sometime I think they do this shit intentionally just for the sake of being different

There are SDL bindings for CHICKEN and GNU Guile and probably for other Scheme implementations too:
wiki.call-cc.org/eggref/4/sdl2
gnu.org/software/guile-sdl/

There's also some for ML, apparently: hardcoreprocessing.com/Freeware/SDLML.html

C/C++ are lower level. Compile to machine code.
C# is higher level. C# runs managed environment. Compile to intermediate code.

>normie shit

Apparently it's a tranny or something, so it's probably the same mentally ill faggot who always posts tranny shit

>what is JIT compilation

>He still does comics.
Wow, I'm surprised. I guess I gotta give him credit, it's had a pretty long run, especially so long after webcomics went out of vogue. Other web comic authors have certainly faced worse fates--the VG Cats guy draws porn of the cats now, for example.

>normie
reddit BTFO

please someone tell me why Indians on github are all so fucking weird

what the fuck is going on

normalfag*

please kindly do the needful
thank you sir

post example

C# code are compiled into intermediate code (or bytecode in Java), then it's compile again when it's running. The second compile process is called JIT (Just-In-Time) compilation.

Attached: longlongpoo.jpg (475x767, 48K)

>I think everybody should definitely learn Scheme and ML as their first languages
stop posting

long long ago; // in a far far away

what online programming communities does /dpt/ use, besides /dpt/?

i want bowsette's fangs on my body user

Attached: Screenshot_20180919_210729.png (907x181, 50K)

I wish there was though, I just want that best path so I don't fall off track.
I don't understand, does lower level mean a stronger language?

no

Attached: poointheloo5.jpg (1057x918, 136K)

programming forum in local country. almost dead now.
programming group in facebook. don't have a real account. facebook closed my accounts.

lower level = faster performance, more control, harder to write programs in

lmao

nobody railroaded you on a premade lesson plan on how to cook either
same thing.
billion ways to cook a dish.
everyone starts cooking different things
eventually you'll all get to the same place.

Attached: 1536534936372.jpg (1280x720, 87K)

Low level = machine code or assembly language. C can use assembly language.

Everyday I thank the Emperor that programming languages favor English

any more example?
that one could be trolling.

C is an elegant language from a more civilized age. It's also about as dangerous as a light saber is. It's a low-level language that demands complete respect at all times. You absolutely should learn it because it will teach you so much about how memory works, which in turn will help you understand different data structures.

If C is a classic stick muscle car, then C# is a modern automatic sedan. It won't go nearly as fast, and you don't have nearly as much control, but everything generally works the way you'd want it to work. More things happen under the hood, but unless you become an expert you probably won't care too much about what those things are. C# is a good language for learning how type systems work and all the things you can do with them.

Should have been Latin if we're being honest here

>If C is a classic stick muscle car, then C# is a modern automatic sedan
C is an engine with two axels attached and wheels that aren't screwed on properly

Indians understand English
Maybe not as well as their native language (they got 13 of em), but in principle when they read English they'll understand the intention.

The problem is that there is varying levels of stupidity over there, and you can equate their knowledge of anything remotely technical as the equivalent of a road covered all over with potholes.

It's because they're rewarded for taking shortcuts.
Kids who were good enough to go to America for a master's degree and get H1Bs don't have this problem nearly as much.

I see so that is why game developers use C++
So in the case of C and C++ what do they compile into, machine code or assembly? Which is better for a language to compile into?
Can I learn two languages at once though? I have to learn C# because my course demands it so would it be a good idea to learn C alongside? If so what program should I use and what book?

No, that's ASM.

>machine code or assembly
Same thing, it's just that assembly is the textual form and machine code is the binary, executable form.

>yet another autistic car analogy
C#, and all modern .NET languages really, are built on the concept of static analysis first.

If you can have a program parse your code and mathematically prove some facts about your program, that is amazing news, because it means you can leave all of the performance and maintenance guarantees to eggheads who have dedicated decades of research into this exact subject, and just worry about how easy it might be to write and maintain your program.

C# in Depth 3rd Edition, but this book is not for beginners.

don't bother with C, just learn C#, you don't need to learn how to babysit memory and wrangle pointers

ASM is just the engine

>C#, and all modern .NET languages really, are built on the concept of static analysis first.
No they're built on the concept of portable enterprise code, nobody gives a shit about static analysis

>Jon Skeet answered your question
When will Jon Skeet senpai notice me?

Attached: takao_bucho.jpg (1919x1077, 167K)

Don't sign your posts, user.

Assembly, and then your CPU will do some magic bullshit to convert that into whatever its underlying architecture wants.

Yes, you can absolutely learn two languages at once. You might get some syntax mixed up, and you might get put-out when you realized language A doesn't have a feature from language B, but unless you're an absolute moron there's no issue. Just don't get lazy and assume one language is better than another because it's "easier".

Programming isn't easy. It will never be easy. If it seems easy, then you're too ignorant to understand the price you're paying.

t. faggot whose multithreaded code always deadlocks and constantly wastes memory

>"So long ... Gay Bowser ..."
>beep beep beeeeeeeeee--

This post contains three wrong assertions good job man

>C#, and all modern .NET languages really, are built on the concept of static analysis first.
>If you can have a program parse your code and mathematically prove some facts about your program
Great! Except C# has:
>exceptions
>null
>general recursion
>side effects
>mutation
>dynamic
So in practice you can't prove anything useful about most programs written in C#. You would have to limit yourself to an almost completely impractical subset of the language and libraries available for it.