/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?
Previously

Other urls found in this thread:

durka.github.io/blog/2017/08/06/du-evolution.html
amazon.com/Java-Beginners-Guide-Herbert-Schildt/dp/0071809252
youtube.com/watch?v=QM1iUe6IofM
twitter.com/SFWRedditImages

first for 'grammin' in the ood

...

Haskell!

re-writing Scala in Go

I'd like to some text filter so I don't have to see the same dumb memes you losers say on here. Idk how though lol

>say on here
say here*

too late now. do you know how to do the shit I want?

Yes, the best way is going to reddit

what a fag

Create a basic ass script in TamperMonkey, I did it, that shit's easy as hell. You can even change what the posts say if you want.

D is better than C++ --top to bottom.
C was created by Electronic Engineers
D was created by Compiler Engineers
C++ was created by a literal uneducated faggot because C was too hard for him
D is better than C++ --top to bottom.
C was created by Electronic Engineers
D was created by Compiler Engineers
C++ was created by a literal uneducated faggot because C was too hard for him

Why do people dislike C++ so much?

And D creators are the people who first implemented C++ because Bjarne is not a smart programmer himself. D creators knew, from the very beginning, what's wrong with C++
And D creators are the people who first implemented C++ because Bjarne is not a smart programmer himself. D creators knew, from the very beginning, what's wrong with C++

Because it's a shitty language

>C++ has like twenty different ways to initialize a variable
How shit can you get

thanks. will do this later but I found the filter in this site's settings menu

Why though, I don't see any problems with C so how can a superset of the features be that bad?

It's dogshit. It's like a government designed language. So it's worse than ADA because ADA was contracted out with abstract specifications.

C++ was fucking designed by the goddamn senate. So much fucking pork in the C++ standard. So many retarded decisions made by power tripping retards.

C is C++ without the bullshit

Sick of static typing.

Sick of broken promises of productivity. Sick of dealing with pointless incompatibilities. Sick of everybody and reinventing the wheel so that no two libraries can be used together. Sick of compiler bugs.

durka.github.io/blog/2017/08/06/du-evolution.html

Is that short for, "programming in the nude?"

Sick of dynamic typing.

Sick of broken promises of productivity. Sick of dealing with pointless incompatibilities. Sick of everybody and reinventing the wheel so that no two libraries can be used together. Sick of interpreter bugs.

The superset is bad because almost every single misfeature that C++ has over C is a terrible, terrible mistake. The pitfalls are so tightly bound that you can't escape just by using a subset because the pitfalls pollute any shred of good in C++ exclusive features. Even worse is that because it's a superset, it has all the flaws of C, most notably the preprocessor.

I don't have it but someone post the image. You know the one.

Then pick one of 1000 static langs that compiler to JS. Unless you mean Python.

Hello

I would like to apply for the position of Code Artisan.

C macros and the preprocessor are cancer.

C is cancer*

how to concatenate two strings in C
#define concatenate (a,b) a ## b

programming in the HOOD, hence the welfare frog

>concat isnt an operator

>worse than ADA
>hfw
It's "Ada", you fucking computer illiterate.

4/10 if trolling

What's a good beginner book for learning Java?

>js is the new bytecode

want to fucking SLAP a nigga

It's easier to just put the strings together
printf("Hello" " cruel " "world!\n");

>he doesn't know about strcat

lmao

amazon.com/Java-Beginners-Guide-Herbert-Schildt/dp/0071809252

Can we all agree that C has the best community?

Not really, its just people want to do webdev, but not have to spend an entire afternoon setting up 78k tools and frameworks and then get a bunch of undefined errors.

Do you know what an operator is?

no why?

thanks

No because it doesnt. Its more fragmented than hasklet and scala combined.

What would be the choice then for OOP at a lower level than python? Everyone hates Java as well don't they?

at least is not infected with SJW

>two strings
>##
That's token concatenation, which is different.
Two string literals next to each other will automatically concatenate.
"a" "b" "c" is equivalent to "abc"

hey /dpt/ I'm curious why you guys always shit on OOP? is it a meme or is it really that bad?

not him but while c development is pretty fragmented, c programmers irl are some of the most humble yet most intelligent people i have ever seen in the tech sector

>why you guys always shit on OOP?

because OOP reversed is POO

>irl
Older ones are yeah, but then you also have your fair share of luddites.

it's highly structured and formulaic. no room for creativity.

this makes oop perfect for business use since your codemonkeys don't need their brains to pump out code, but makes it INCREDIBLY boring and frustrating when you're working on a personal project to develop your own skills.

OOP is fine but Java left a sour taste in everybodys mouth because ENCAPSULATE EVERYTHING

Fucking around with the javascript framework react native for my capstone project.

>inb4 javascript cuck
I need the capstone m8

ty, seems reasonable

youtube.com/watch?v=QM1iUe6IofM

can you list all 20?

>react native
had to use that trash for a mandatory "software design" class.
i will keep you in my prayers, user

I see, it makes sense. Thank you.

I just finished a couple of semesters in uni and the introductory course was Java + OPP second semester was sql, php , design patterns and data structures. I

'm not in software Eng nor CS so I won't be seeing anymore of that, but I'm interested to keep learning on my own. What do you guys recommend I should look into now?

Yes, can you?

ugh MOM!!

Fact: Pascal is the most powerful programming language in the world.

redpill me on Pascal pyramid vs Pascal wager

You better disregard anything this thread (or board) says regarding programming if you want to move forward, unless backed by serious reference (and I don't mean some tweet or quote from an interview but data about actual usage in industry).

Fuck off C++ baby.

newfag here. engineering undergrad, kinda new to programming. but have done some python stuff, learned theoretical algo, some advanced linear algebra, done some hadoop, and bit of java but not much. little bit of c. trying to reboot.
i was gonna do cs50 for C real quick, and do C++ and Java after that. thoughts?

is sicp a good book to learn programming (and scheme)? I saw a book recommendation list for programming/computing on /sci/ and I thought it was strange and notable that they left off sicp

Riddle me this Sup Forums
proc = subprocess.Popen(r'C:\asdf.exe', stdin=subprocess.PIPE, stdout=subprocess.PIPE)
proc.stdin.write('asdf')
output = proc.stdout.readline()
print(output)

Why can't I read and write input to this? It just hangs like a limp noodle.

sicp is hard. It was written to make brainchads at mit feel dumb. It was probably left off because it made the image creator feel stupid.

Go for it man

ppl here are just shitting on c++. from what i heard, newfag should focus on c++,java,python. c++ for speed, java for legacy stuff, python for new stuff. also, any recommendation for good c,c++,python courses? i thought cs50.net was good enough. idk about c++, python tho. ive done some ai/ML stuff with python but i think i dont really know the language

>limp noodle.
>python2fag

C++ and Java are not only useless to an engineer, but suck dick. C++ especially.

What engineering are you majoring in? Computer? Mechanical? What's your goals for programming though? That changes things. If you wanna just work out your mind and learn to think differently then you should use SICP. If you have concrete goals then it really depends desu.

C + Assembly + Scheme is probably pretty good for an engineer.

ive switched to cs for masters

C++ IS GOOD YOURE JUST AT IT

DELET THIS RN

my goal is to get some AI/ML/quant job in bay-ish, and do for like 5y, and do mba and be manager or something.

>java for legacy stuff
Legacy is COBOL or FORTRAN or Pascal, not Java. Java's 22 years old and only got big in the 2000's.

i've already studied programming superficially, few languages, now I want to actually seriously learn C. thing is I am a bit of a brainlet, is it a good idea to start at pic related and then move to a C book? if so, which? (heard that K&R might not be the best for beginners)

>YOURE JUST AT IT

>Sepplets so mad they cant even form sentences

These days, if you work on embedded systems or any kind of embedded software, you will need to know C++.

>tfw typing so fucking fast you forget to type a word
>tfw too smart to type

also SICP, better before or after learning C?

I was typing so fucking fast I forgot to type fucking "BAD"

j

Why are you C-fags so cancerous? C has been useless for years now.

>embedded systems
>C++
wat

In my experience embedded is either C, Assembly, Labview, or Java

Python is good to know desu and one of the biggest for AI since it's a language intended for scientists. A lot of backend code for python is in C though so that's good to know too.

>ppl here are just shitting on c++.
They also never post any sort of significant project and the ones who do often do so in C++, so you shouldn't really pay attention to what "ppl here" are doing.
For C you can start with Modern C (Gustedt) or C Programming: a Modern Approach (King), I recommend starting both and seeing which one seems better to you. Modern C has the advantage of being free, even though you can get King's book through the usual means.
There's no easy way to get in C++. I did so by learning how to do C with classes and then forgetting it. Usually people recommend Stroustrup's book.

It is a bad idea to start with Algorithms.
I'd recomend you to start with CS50, it is a course, not a book. It is from Harvard and free online. The structure of the course is divided by weeks, the first five or six weeks are C only. Complete them and you'll have a good understanding of C. I'm serious now, Four weeks of CS50 and you'll be pretty decent with C.
After four or five weeks, you'll be able to finish K&R (which is a slim book) in like two or three weeks, depending on how hard you study.

>C has been useless for years now
That's as retarded as the C++ bashing

who the FUCK is "Martin Herkt"???

C++ is used very often, because it turns out OOP is very useful. And when performance and memory are at a premium, that throws Java out. It's generally always a subset of the language, I don't think I've seen anything more complex than classes and try catch blocks in embedded C++.

Java works. Syntax isn't bad.

D feels like C and Java had a baby and only inherited the good parts of both language minus a decent debugger.

Very good book but I wouldn't start with it, may be a little difficult unless you have a strong mathematics background; beside that you may not appropriate it's brilliance without some experience in another language first.

Just learn Python first if you want to get shit done, or C if you want to understand programming.

i have tcpl. is it way over my league? i also read c primer plus (years ago, just read it) for c++, i have prata, if that helps. my background is matlab, if it counts at all. anyway, i think ill do cs50 briefly, and do stein algo book (which i had done previously) and do c++ simultaenous. thx.
also, sicp - is it still relevant? worth my time?

>tcpl
Maybe, maybe no. Just start reading a book, don't think too hard about it. Worst case it won't suit you and you can fall back on one of those I recommended.
I haven't read SICP, I know it uses LISP to illustrate concepts which imo (isn't the (hottest (nor friendliest (language to) write))). It's quite simple though.

Just write some nuclear.
public static class Program
{
private static void Main()
{
Console.WriteLine("Hello Sup Forums");
//Some nuclear things
}
}

>(isn't the (hottest (nor friendliest (language to) write)))

excuse me SIR, i find these antisemetic punctuation VERY offensive, plese DELET this comment posthaste.

thank you for your cooperation,
rajpaat bhalapapurania

thx m8

I was planning on watching the cs50 lectures, yes. but do you mind explaining why is it bad to start with algorithms (do you mean this specific book?)? genuinely curious

I read two textbooks on Bash but I have nothing to do with Bash.

>rajpaat bhalapapurania