[–]▶ No.808095>>808112 >>808120 >>808197 >>808264 >>808495 >>816752 [Watch Thread][Show All Posts]
I've been reading K&R and I was told to read "SEI CERT C Coding Standard" afterwards, but while I may learn C from K&R, I won't be taught programming.
What's a good book for actually learning how to program? Something in C would be nice but not necessary.
▶ No.808100>>808506
It has become a meme here, but SICP is quite good (free). There's also this, which is perhaps a little easier.
http://www.ccs.neu.edu/home/matthias/HtDP2e/
The latter uses Racket, which is what I'd also recommend using for the first test. Once you understand the concepts, learning another language is quite easy.
▶ No.808104
SICP: https://mitpress.mit.edu/sicp/
I'm sure there are more "modern" approaches in Python and Javascript, but I'm not familiar with them.
▶ No.808112
>>808095 (OP)
I wonder what you think "programming" is?
▶ No.808120
>>808095 (OP)
But that book already teaches you how to program.
Maybe SICP then is what you're looking for or some algorithm books.
▶ No.808124>>808212
SICP is awful and will fill your head full of bad ideas that will take years to unlearn.
▶ No.808132>>816533
The best way to learn to program is to throw yourself at the code again and again until you know what mistakes you are making and you know how to avoid them. These aren't books, but they'll help a lot:
https://learnxinyminutes.com/ : Quick rundown of a programming language
http://rosettacode.org/wiki/Rosetta_Code : Different programming problems solved with different languages, so you can compare the answers
https://www.daniweb.com/programming/software-development/threads/440954/can-t-fix-error-in-my-program : What not to do. Ctrl + f the phrase "new averaging system" for a laugh
Switch statements: A simple feature that solves problems that otherwise require a fuckton of if statements. It makes code like pic related a lot more tolerable although it's not the only thing wrong in the pic
Human Resource Machine: A game about programming. Teaches data structures and algorithms really well, but it's a bit on the easy side if you know what you're doing. If there's one thing to try here, it's this
▶ No.808197
>>808095 (OP)
If you do the exercises in K&R, you'll learn a lot, m8. After that, try to reproduce simple coreutils like cat.
▶ No.808212>>808215 >>816285
>>808124
Care to explain why? I am interested in going through the book at some time in the future. Should I instead read other books about algorithms and data structures instead?
▶ No.808215
>>808212
SICP is a fine book, ignore that fool.
▶ No.808257
What you sound like you want to learn from a book is something you learn from doing. The book shows you the path, but you have to walk it.
▶ No.808263>>808267 >>808269
>Learning how to program
>I've been reading K&R
memory unsafe
data races
undefined behavior
▶ No.808264
>>808095 (OP)
K&R C assumes that you are already familiar with the concepts of programming (what are variables, loops, functions, and why do we have them?). If you need to get yourself into the mindset first you should look for a different book.
SICP got name-dropped here, and I agree that it is a very good book that anyone should read through (and do the exercises!), but it uses Scheme and is very far removed from the metal, whereas C is very close to the metal. It will also teach you a style of programming very different from what you would do in C; for example, in C mutating variables (changing their value) is something you do all the time, but in SICP the first two chapters (two thirds of the book) have no notion of mutation whatsoever. The first chapter is all about functional programming, a paradigm which is not possible to do in C. The lessons in SICP are all applicable to any programming language, but you might have to adapt the way you think instead of simply changing the syntax a bit.
▶ No.808267
>>808263
Se this post anons ?
>memory unsafe
>undefined behavior
This is why rustaceans can't have freedom.
▶ No.808269>>808271 >>808406
>>808263
And how do you expect that new programmers will learn about concepts you listed? By reading your posts without experiencing problems themselves? Or are we just gonna pretend that those don't exist? At some point you'll have to realize that there is no special voodoo magic going on inside your computer. C is a great way to ease in to low level concepts. You shouldn't be ignorant of what is going on behind the scenes and have at least a basic understanding of inner workings of a computer.
▶ No.808271>>808278
>>808269
c is absolute garbage. c is not great for anything. c is never the right tool for any job.
someone who wants to learn programming shouldn't start with a badly designed language.
someone who wants to learn low level concepts should learn assembly.
▶ No.808278>>808300 >>808308 >>808330 >>816470
>>808271
/*[*/#include<stdio.h>//
#include<stdlib.h>//]++++[->++[->+>++++<<]<][(c)2013]
#ifndef e//[o
#include<string.h>//]![misaka.c,size=3808,crc=d0ec3b36][
#define e 0x1//
typedef struct{int d,b,o,P;char*q,*p;}f;int p,q,d,b,_=0//|
#include __FILE__//]>>>[->+>++<<]<[-<<+>>>++<]>>+MISAKA*IMOUTO
#undef e//[->[-<<+<+<+>>>>]<<<<<++[->>+>>>+<<<<<]>+>+++>+++[>]]b
#define e(c)/**/if((_!=__LINE__?(_=__LINE__):0)){c;}//[20002,+[-.+]
,O,i=0,Q=sizeof(f);static f*P;static FILE*t;static const char*o[]={//
"\n\40\"8oCan\40not\40open %s\n\0aaFbfeccdeaEbgecbbcda6bcedd#e(bbed$bbd",
"a6bgcdbbccd#ead$c%bcdea7bccde*b$eebbdda9bsdbeccdbbecdcbbcceed#eaa&bae$cbe",
"e&cbdd$eldbdeedbbdede)bdcdea&bbde1bedbbcc&b#ccdee&bdcdea'bbcd)e'bad(bae&bccd",
"e&bbda1bdcdee$bbce#b$c&bdedcd%ecdca4bhcdeebbcd#e$b#ecdcc$bccda7bbcc#e#d%c*bbda",
">bad/bbda"};static int S(){return(o[p][q]);}static/**/int/**/Z=0 ;void/**/z(int//
l){if(/**/Z-l){Z=l;q++;if(p<b*5&&!S()){p+=b;q=0;}}}int main(int I, /**/char**l){//
d=sizeof(f*);if(1<(O=_)){b=((sizeof(o)/sizeof(char*))-1)/4;q=22; p= 0;while(p<b*5){
/*<*/if(Z-1){d=S()>96;i=S()-(d?96:32) ;q++;if(p<b*5&&!S()){p+=b; q= 0;}Z=1;}/*[[*/
while(i){_=o[0][S()-97];I=_-10?b:1; for( ;I--;)putchar(_ );if (! --i||d)z(~i );}
if(p==b*5&&O){p-=b;O--;}}return 0U; }if(! (P=( f*)calloc /*]*/ (Q ,I)))return 1;
{;}for(_=p=1;p<I;p++){e(q=1);while (q< p&& strcmp( l[p ] ,l[(q)]))++ q;
t=stdin;if(q<p){(void)memcpy/* " */ (&P [p],&P [q ] ,Q);continue ;}
if(strcmp(l[p],"-")){t=fopen(l [ p] ,"rb" ) ;if(!t ){{;} ;
printf(05+*o,l[p ]);return+1; {;} }}_=b= 1<<16 ;
*&O=5;do{if(!(P[p].q=realloc (P[p].q,(P[p].P += b)+1))){return 01;}O &=72 /
6/*][*/;P[p].o+=d=fread(P[p] .q +P[ p ]. o, 1,b,t) ;}//
while(d==b) ;P [p].q[ P[ p] .o ]= 012;d =0;
e(fclose(t ) );P [p] .p =P[ p] .q;if (O)
{for(;d<P[ p] .o ;d= q+ 1) {q= d;
while(q<P[ p].o&&P[ p].q[q]- 10 ){
q++;}b=q-d; _=P [p]. d ;
if(b>_){/*]b */
P[p].d=b;}{; }
#undef/*pqdz'.*/ e// ;
#define/*s8qdb]*/e/**/0 //
//<<.<<.----.>.<<.>++.++< .[>]
/*P[*/P[p].b++;continue;}}}t= stdout;
for (p=1;p<I;p++){/**/if(P[p].b>i ){i=P[p].b;}}
if (O){for(p=0;p<i;p++){q=0;/*[*/while(I >++q){_=P[q].p-P[q ].q;
b= 0;if(_<P[q ].o){while(012-*P[q].p) {putchar(*(P[q].p++));b++;}P[q]. p++;
} ;while (P[ q].d>b++)putchar(040);} putchar(10);}return 0;}p =1;
for(; p<I ;p++)fwrite(P[p] .q,P[ p].o,1,t);return 0 ;}//
#/*] ]<. [-]<[-]<[- ]<[ -]< [- ]<;*/elif e //b
|(1 << ( __LINE__ /* >> `*//45)) | 01U
# /* */ endif //
When compiled outputs longcat:
o""8o
o" "8
o88ooo o8 8
"8 ""8ooo8"""" 8o
"8o oooo 88
8 o""8 o"8" ""oo8ooo
o""""oo""""""88oooo8 8oo8 8o8o "8o
8o 8 "" """8oo "8o
"8ooooooooo 8 o "8o 8
"8oo "o """" o8"8ooooo8"
"8oo "8ooo ooo8"" "8
""ooo888""""" 8
8 8
8 8
8 8
8 8
8 8
8 8
8 8
Could you rewrite that in rust for me?
▶ No.808300>>808304
>>808278
Is that true? If so, it's the most beautiful thing I've ever seen.
▶ No.808304
>>808300
But wait there is more:
Not only can the program output longcat can also concatenate files vertically (like "cat" command) and horizontally. Using program itself you can stack together original program source together to control length of longcat or if you stack it horizontally you set the width of longcat. To find out how many misakas have you stacked together you can feed concatenated program into brainfuck interpreter to get an overview of how many misakas have you stacked.
http://www.ioccc.org/2013/misaka/
More interesting C programs at http://www.ioccc.org/
▶ No.808308>>808309
>>808278
thats a very short longcat
▶ No.808309
>>808308
I had to cut it as post was too long.
▶ No.808341
Let Us C is pretty good, for beginner programmers
▶ No.808406>>808420
>>808269
> atmega16/32/64/128
shit taste m8, use 90S2313! No adc or other useless crap.
▶ No.808495
>>808095 (OP)
>What's a good book for actually learning how to program?
The main thing is to get lots and lots of practice. Try some of the exercises on /r/the_daily_programmer.
▶ No.808506
>>808100
>racket
Eh, it will teach you the concepts pretty well, as well as why you never want to do functional programming again.
▶ No.816285>>816294 >>816321
>>808212
SICP is garbage made to scare away newfags, ignore people that recommend it. It might be useful for seasoned programmers but for a novice that is trying to get an actual output and learn an actually useful language, its worth nothing. Its also terribly structured.
I wish I could recommend something but I have had yet to come across a useful book. My best guess is to just picked a language you like (in your case, C) and try to write simple programs. Look something up if you dont know how to do it and slowly develop your skills.
▶ No.816294
If you're fairly bright, SICP is hard to beat (this is what MIT taught their freshman students), if you're more of a mediocre person like >>816285, then it's probably best to stick to some easier python materials.
▶ No.816321>>816323 >>816379
>>816285
SICP is garbage even at an intermediate level. Almost all of it is teaching you to think about problems in ways that computers do not. There's really no value to this as you'll learn much faster how to write useful software by learning how computers want to work instead of how to map a meme language to some approximation of them to satisfy mathfag autism.
Worse are the insufferable faggots that claim this is a good programming book. Imagine a Structure and Locomotion of Bicycles book which creates a mathematical language around riding a bike and a bunch of anons lying in a jumbled pile of bicycles recommending it to onlookers as the best way to learn to ride a bike.
▶ No.816323>>816325
>>816321
> The way computers work.
> Not constructs by mathematicians.
mfw.
▶ No.816325>>816380
>>816323
How much of the software you use was written by mathematicians? In the extremely rare case we get a mathfag programmer who can actually accomplish something, they tend to go berserk and murder everyone like Hans Reiser. The only mathfag programmer I know IRL is obsessed with taking pictures of sluts dangling off of ledges or being held underwater and I fully expect to hear he's a serial killer someday.
▶ No.816379>>816383 >>818362
>>816321
You're confused about what is SICP. SICP is about the structure and interpretation of computer programs. SICP isn't about the structure of computers. You are confused and this is why you judge SICP for things that it never intends to do.
▶ No.816380>>816384
>>816325
Amazing. Truly you are a master of computers.
▶ No.816383>>816398 >>816408 >>816486
>>816379
I judge it as a first year CS book that makes students less able to write good software. I wouldn't let them read it, most schools agreed and didn't make it part of the syllabus, and MIT has even dropped it. It was a mistake.
▶ No.816384
>>816380
Don't be jealous, qt. Get to work.
▶ No.816398>>816412
>>816383
You are correct in that SICP is an introductory CS book. However, you seem to believe that the purpose of computer science is to teach people to write computer software. This is a mistake as computer science is not a course whose intent is to train software engineers. SICP has no intent to teach people to "write good software". The intent of SICP is to introduce people to fundamental computer science lessons.
▶ No.816408>>816413
>>816383
Having non mathfags start programming was a mistake. The only way computer security is ever going to be accomplished is with theorem provers .
▶ No.816412>>816440
>>816398
>you seem to believe that the purpose of computer science is to teach people to write computer software. This is a mistake
The Jews really got you good didn't they, anon? Keep telling yourself this when you have your $100k piece of paper in hand and are literally the CS Grad meme bombing fizzbuzz in interviews.
▶ No.816413>>816418
>>816408
Mathfags never get anything done. Go look at the Haskell community, they're all over it and they don't do shit.
▶ No.816418>>816425
>>816413
That's because it's hard to do things right. You may be able to do things rapidly but what use are they if they are not secure or predictable. There is no such thing as provably secure computing because no one wants to put in the time to do it, not because it's impossible. If the mathfags who never get anything done could establish a bedrock of well designed and reasoned software non mathfags might be able to develop secure software more easily on top of that. But, as it stands there is an entire industry built around the fact that modern software seemingly has an infinite number of bugs and the way to deal with this is to squash them one by one, not stop the terrible practices and software that lead to the bug infestation. Doing shit wrong is only better than not doing shit at all when money is involved.
▶ No.816425>>816432
>>816418
You're never going to have bug-free software, anon. Just like mathematical proofs that turn out faulty, mathfags would produce faulty software.
▶ No.816432>>816450
>>816425
I'm sure mistakes would be made but you're ignoring the fact that it would lead to a major reduction of mistakes. That's like saying condoms aren't 100% effective why bother.
▶ No.816440>>816451
>>816412
I really don't care if a trained computer scientist has bad programming skills or even non-existent programming skills. A trained computer scientist shouldn't have much trouble getting through a beginner's programmer course.
I do care for a trained computer scientist to have a solid theory about mathematics and more specifically, the mathematics that is computer science. I need my computer scientists to formally prove the computations of any information system that they analyze. It is merely a bonus if they can transform that computation into computer software.
▶ No.816450>>816456
>>816432
I'd take sex with a small risk vs no sex any day. Mathfags produce nothing. I guess technically, that nothing is very safe.
▶ No.816451>>816453 >>816474 >>816479
>>816440
>A trained computer scientist shouldn't have much trouble getting through a beginner's programmer course.
You're in for a surprise.
>I do care for a trained computer scientist to have a solid theory about mathematics and more specifically, the mathematics that is computer science.
k, you can take the guys who spend all their time masturbating over Haskell while producing nothing but papers that you can't view as they require journal subscriptions and I'll take people like Linus and Carmack.
▶ No.816453>>816455
>>816451
linus is too dumb for haskell
▶ No.816455
>>816453
Only the smartest people who never actually write any software use Haskell.
▶ No.816456>>816464
>>816450
Mathfags were corrupted by government welfare to produce AIs to fight the soviets. Most lisp machines were subsidized for AI research. So many of the early "mit hackers" learned how to lie about what they could deliver for funding.
Charles H. Moore who invented forth is a borderline mathfag who has gotten shit done. Just ignore all the university bound welfare queens when looking at the situation.
▶ No.816464
>>816456
I'd not say inventing forth was getting anything done. It's one of the canonical examples against extensibility, and very little was ever made with it. Kinda like lisp.
▶ No.816470
>>808278
I have a feeling this actually does something terrible
▶ No.816473
This book is being used by the KGB to spread false information about the United States. My fear is that people will believe it.
▶ No.816474>>816502
>>816451
>Carmack
That's funny, I recall Carmack praising Racket a few years back.
▶ No.816479>>816505
>>816451
Linus is a trained computer scientist.
▶ No.816486
>>816383
>t. Vacuous sad sack who cannot read SICP and wishes to find fellow travellers he can find consolation in, to ward off a sense of acute inadequacy and deteriorating self-worth.
▶ No.816502>>816520
>>816474
I seem to recall him praising Minecraft, too. But he's retired and no longer writes much of anything.
▶ No.816505>>816510
>>816479
He was just a student when he wrote it. And 'trained computer scientist' professors would have given him an F.
▶ No.816508
If SICP feels heavy you can always start with HTDP, taking it has definitely made me a better programmer.
▶ No.816510
>>816505
What does that have to do with anything? Linus Torvalds is a trained computer scientist. Getting an F is irrelevant to anything because Linus has a computer science degree.
▶ No.816520>>816525
>>816502
I thought he was heavy into VR programming for Oculus?
▶ No.816525
>>816520
He was doing some light engineering for the sensors before it was bought and re-purposed as an advertisement delivery device. I haven't heard of him doing any real work on it since. The whole project is frozen in time from the Facebook purchase - the hardware is essentially Crescent Bay from 2014.
▶ No.816533>>816538 >>816646
>>808132
just for the newfags in this thread, a pseudocode fix for the code in that image is
if (!this.WitnessedCorpse)
{
this.Subtitle.UpdateLabel("Teacher " + CleanWitnessed(this.Witnessed) + " Reaction", 1, (float)6);
this.GameOverCause = CleanWitnessed(this.Witnessed);
//obviously you could just set this.Witnessed = CleanWitnessed(this.Witnessed) if you didn't want to run the function everytime you need to use the variable
}
string CleanWitnessed(witnessed)
{
//function that takes this.Witnessed and cleans it down to one "word", i.e. input is "weapon and blood" and output is "weapon", on the basis that Insanity > Weapon > Blood [which is what I can tell from what's provided])
if (this.Witnessed.contains("Insanity")
{
return "Insanity";
}
else if (this.Witnessed.contains("Weapon")
{
return "Weapon";
}
else if (this.Witnessed.contains("Blood")
{
return "Blood";
}
else
(error)
}
▶ No.816538>>816577
>>816533
just realized i fucked up the parenthesis on the conditionals
(this.Witnessed.contains("yadayadayada"))
and the first part could be streamlined to
this.GameOverCause = CleanWitnessed(this.Witnessed);
this.Subtitle.UpdateLabel("Teacher " + this.GameOverCause + " Reaction", 1, (float)6);
I'm not so sure about the efficiency of this solution because it still contains a conditional chain, however this time the conditionals serve the most concise/required purpose because they're used to handle the arbitrary state names for the this.Witnessed variable. However, it's a ton more efficient than having a conditional for EVERY FUCKING GODDAMN SCENARIO AND COMBINATION
so i'm fine with it
▶ No.816570>>816575
Learning C will turn you into a Ctard. You're going to think C limitations are fundamental hardware limitations, but you won't even think of them as limitations because Ctards think C is "the most powerful" language.
▶ No.816575
>>816570
>You're going to think C limitations are fundamental hardware limitations
What are these C limitations? There are a few things I need compiler builtins for, but other than those, I can do pretty much anything but self-modifying code and I can get close with call patching like glibc does.
▶ No.816577>>816588
>>816538
His code will be much faster than yours. Mono can convert his code into a hash lookup while yours has to scan the string several times due to using contains(). You're also generating garbage on that UpdateLabel() that he might not be doing, although what he does with those values isn't shown.
t. gamedev
▶ No.816588>>816589 >>816600
>>816577
iirc the conditional goes on for a few hundred "else if" functions, what about that?
>mono can convert to a hash lookup
does it do that automatically?
>his game will run faster
yeah but that's a function for displaying game over text, ideally its runnimg like once every 10 minutes, it shouldnt be running like 1000 times a second
the point is anyways its super bad form
▶ No.816589
>>816588
>iirc the conditional goes on for a few hundred "else if" functions, what about that?
It's no problem.
>does it do that automatically?
Yes. Try making a simple switch statement that compares a bunch of strings and returns a number for each, compile it with Mono, then use dnSpy or whatever to view what it generated. You'll notice it converted all the string comparisons to a Dictionary lookup at compile time. MS .NET probably does too but I'm more familiar with Mono.
▶ No.816600>>818363
>>816588
>the point is anyways its super bad form
Good form is meaningless if it provides bad results.
▶ No.816603>>816631 >>816632
Is this book a good place to start or should I get something written this decade? I'm not a complete beginner, I've taken Java and Python classes in uni.
▶ No.816631
>>816603
As a rule, it's almost always best to read a book on a language from the author. Yes, read it. Afterwards you should read the C11 standard.
▶ No.816632
>>816603
Also read SICP at some point, and ignore the simpletons in this thread stating otherwise.
▶ No.816646>>816647 >>816651 >>816676
Any way to get a 2 bit value in java?
I need to work with variables that could only assume 4 values.
I was thinking of using enums, but apparently they are regarded as objects and objects are 8 bytes and up.
The closest I got was the byte type, which is 8 bits and still has an retarded overhead of 300%.
Two booleans could be a good idea, but it's already going into an array, so it'd turn into a two dimensional array which has an overhead the size of the observable fucking universe, plus no one knows what size the VM will give the boolean.
What is the deal with "new" languages and shitty bloated data types?
>>816533
>still using strings
Just use booleans or numeric variables. Contains and equals are fucking functions, which should already be redflags, basic operators are always faster.
Considering there's only "weapon" and "insanity" for brevity purposes, I'd probably do something like this
short WEAPON= 0;
short INSANITY= 1;
boolean witnessed[] = new boolean[2];
//random code
if(witnessed[WEAPON]){
if(witnessed[INSANITY]){
//insanity and weapon
}
else{
//weapon only
}
}else{
if(witnessed[INSANITY]){
//insanity only
}
else{
//error
}
}
▶ No.816647>>816648
>>816646
> Worried about bloat
> Java
If you need to go that low level use C. The only high level language I recall that has really good bit handling built in is Erlang.
http://erlang.org/doc/programming_examples/bit_syntax.html
▶ No.816648
>>816647
>>Worried about bloat
>>Java
I know, I usually do shit in C or python since I haven't learned Lua yet, but it's for uni.
▶ No.816651>>816655 >>816699
>>816646
>Any way to get a 2 bit value in java?
2 bit variables will have more overhead than a regular int or byte. Whenever you use them they will always need to be unpacked and packed.
If you still want to use them, you implement it by packing them into a byte (any integer value data type works). Every 2 bits of the value of the variable represents one of your 2 bit variables.
▶ No.816655>>818091
>>816651
>If you still want to use them, you implement it by packing them into a byte
That seems useful, but I guess it's not the best alternative in this case. I'll be going through an vector of hundreds of values and only accessing each value once, so the packing and unpacking would most likely slow it down a lot.
I guess I'll just stick to bytes then.
Thanks anyway, have a dank anti-turk maymay.
▶ No.816676>>816705
>>816646
>Any way to get a 2 bit value in java?
>I need to work with variables that could only assume 4 values.
You can do this in Ada.
with Ada.Text_IO;
use Ada.Text_IO;
procedure Meme is
type Data is mod 4;
type Data_Array is array (Positive range <>) of Data;
type Unpacked_Data_Array is array (Positive range <>) of Data;
pragma Pack(Data_Array);
A : Data_Array(1..1024);
B : Unpacked_Data_Array(1..1024);
begin
Put_Line("A uses " & Integer'Image(A'Size) & " bits.");
Put_Line("B uses " & Integer'Image(B'Size) & " bits.");
end;
Output:
A uses 2048 bits.
B uses 8192 bits.
▶ No.816699
>>816651
It's generally a bad idea to do bit-based datastructures in Javalikes, but you can do them like in C with tightly packed integer arrays. People usually avoid using the sign bit in Java, and avoid uint in C# due to compatibility problems. Be sure you know why you're using them before you do. In the game I work on, they're used to represent various aspects of base building in a 3D grid, where players might create huge megabases of 100M grid cells so size of the data matters.
▶ No.816705>>816741
>>816676
I remember the greybeard Ada types in the '90s complaining about Ada and playing the blame game for who was responsible for its decisions but it's always looked like a reasonable language to me as someone who didn't have to use it. I wonder what horrors only become apparent when trying to build large software projects with it.
▶ No.816741>>816784
>>816705
Same. I looked through Ada's libraries recently (in response to another thread) and the code was such a joy to read. I suppose the complaints you recall could be down to the vocal minority having the loudest voice.
▶ No.816752>>816766 >>816771
>>808095 (OP)
If you have 0 experience with programming, pick a language like Python or JavaScript.
Autists here are gonna reee simply because they're easier languages to learn for beginners, and heavens forbid anyone who browses /tech/ take the easier option ever.
Once you gain a better understanding of programming you'll see the flaws those languages have and move to a more /tech/-approved language such as C or Rust.
▶ No.816766
>>816752
>python
>having flaws
LOL
▶ No.816771>>816779
>>816752
Isn't it's much harder to understand what happens on the machine when you code in Python and JavaScript?
▶ No.816779>>816785 >>816787
>>816771
Anything that isn't assembly abstracts what's happening under the hood. And assemblers will sometimes change the code on-the-fly as well. Anything that isn't binary coding using op code tables abstracts what's happening under the hood.
▶ No.816784>>816796 >>816805 >>816831 >>816864 >>817217
>>816741
>I suppose the complaints you recall could be down to the vocal minority having the loudest voice.
Heh, that was no vocal minority. That whole industry imploded violently. Think of PHP where it looks ok from an initial glance yet everyone seems to loathe it and projects try to avoid developing with it. There's obviously something terribly wrong, but exactly what might take actually using it to understand.
▶ No.816785
>>816779
You're forgetting about microcode m8.
▶ No.816787
>>816779
>And assemblers will sometimes change the code on-the-fly as well.
Not really. Only thing I can think of is LEA shortening on x86 but that's a pretty big stretch to say it was changed.
▶ No.816796
>>816784
>PHP where it looks ok from an initial glance
It doesn't.
▶ No.816805
>>816784
>Think of PHP where it looks ok from an initial glance yet everyone seems to loathe it and projects try to avoid developing with it.
As you say this on a website running PHP...
▶ No.816831>>816859 >>816861 >>816869
>>816784
>Think of PHP where it looks ok from an initial glance yet everyone seems to loathe it and projects try to avoid developing with it
Only hipsters. Everyone else knows PHP is pretty solid.
▶ No.816859>>816868 >>816869
>>816831
Sounds like you're at that "might take actually using it to understand" stage. You'll write some code someday, anon. I believe in you.
▶ No.816861>>816869
>>816831
PHP is a mess.
PHP is a big fat mistake.
▶ No.816864
>>816784
Ada stopped being used because of a greater demand for programmers, and in the supply of programmers there was more familiarity with C++. On paper, it was cheaper to hire a C++ programmer instead of the Ada programmer. If we base quality on this metric, Javascript is the greatest language in existence, and we should use it for everything.
▶ No.816868
>>816859
I've written a lot in PHP(5). It's solid.
▶ No.816869>>816873
>>816831
>>816861
>>816859
PHP sucks primarily because it lacked conventions initially, so you end up with a disgusting inconsistency. Very disgraceful.
That said, Laravel is probably the best web framework I've worked with of any language. Neatens shit up and very easy to dev with.
PHP7 is also pretty fast.
Personally, for the simple reason that frontend code is written in JS, I'd like Web Frameworks to be built on Node. Parts of frontend/backend sometimes need to share same code and it's a real shit in the bush having to write it twice: once in PHP, once in JS.
▶ No.816873>>816898 >>816968
>>816869
If you like the front end and backend to share code, give Clojure and ClojureScript a try. It's pretty neat and not nearly as difficult as hipster bloggers make it out to be.
▶ No.816898>>816905
>>816873
> Clojure
It's disgusting JVM shit which is only nice if you like to watch your memory ballon.
▶ No.816905>>816909 >>816924
>>816898
>The most mature and optimized virtual machine is shit
LARP
▶ No.816907
>/tech/ is full of PHP Pros
How delightfully amusing.
▶ No.816909>>816926
>>816905
The fastest go-kart is still a go-kart.
▶ No.816924>>816929
>>816905
>virtual machine
There's your problem.
▶ No.816926
>>816909
pro-fact: build a car with 4 wheels and a chair and as long as it doesn't go over 5 mph call it a wheelchair and you won't need a license or insurance. true story.
▶ No.816929>>816931 >>816972
>>816924
>hurr durr i only run native code
>please rape my face NSA i want your buffer overflows
▶ No.816931
>>816929
>VMs will save me from my backdoored processor
▶ No.816968
>>816873
>ClojureScript
Even more disgusting. Tell me, how many megabytes of bloat do you bundle on the end user just so they have the privilege of running your generated garbage?
▶ No.816972>>817099 >>817159
>>816929
> i want your buffer overflows
The JVM has a horrible track record for exploits. Count yourself as a moron.
▶ No.817099>>817123
>>816972
Name at least one unsoundness bug in JVM found in last 4 years, for example.
Compare it to total number of bugs found in "native" applications.
▶ No.817123>>817201
>>817099
> Attempting to shift goalposts
I would have to wade through way too many JVM exploits to find it, can you imagine how many there have been in four years?
▶ No.817159>>817188 >>817203
>>816972
>The JVM has a horrible track record for exploits. Count yourself as a moron.
C/C++ has a horrible track record for exploits. Count yourself as a moron.
▶ No.817188>>817196
>>817159
What would you say if I told you the JVM was C/C++ underneath! Truly, I tell you it is so.
▶ No.817201
>>817123
then it should be easy to find one, cuckboy.
▶ No.817203>>817224
>>817159
One error in your C programs only makes it bad. One error in the JVM compromises all the java programs.
▶ No.817217
>>816784
The famous "PHP: a fractal of bad design" and the other anti-PHP articles are specific lists of problems with the language. I have never seen anything like that for Ada.
▶ No.817224>>817688 >>818125
>>817203
One error in libc compromises all the c programs.
before you say that it doesn't effect c applications using a different libc, know that there are other implementations of the jvm
▶ No.817657>>817694
>Java was purged by all browsers to improve security
>those browsers are written in C++
Javafags eternally BTFO
▶ No.817688
>>817224
Well that's almost true but:
1) An error will usually affect only one function.
2) A (Java) VM is A LOT more complicated than a libc.
▶ No.817694>>817752
>>817657
That’s because executing arbitrary code from websites on your machine is dangerous even if the browser is trusted.
▶ No.817752>>817766
>>817694
Exactly. Thanks for confirming that you believe the JVM is worthless too.
▶ No.817766>>817912
>>817752
What part of "arbitrary code" don't you understand? The same applies to JavaScript.
▶ No.817912>>817930
>>817766
They kept ecmascript. They dumped Java. Java is garbage.
▶ No.817930>>817940
>>817912
javascript is worse
▶ No.817940
>>817930
Untrue. Feel free to install the JDK and turn the browser shit on, though.
▶ No.818091>>818164
>>816655
>java arrays are apparently badly optimized
>get around to make it
Going back and forth on a list of billions of values, so I decide to use LinkedList and then get the ListIterator from it
>can't use anything other than an array with primitives
>used work around to insert bytes, but the program might turn them into Byte object whenever it feels like and bloat the memory
Jesus fucking Christ this shitty fucking language. Why do people use it? Poeple say it's simple, but fucking python would be better at this point if you don't care about optimization that much.
▶ No.818125
>>817224
A single bit flipping in ram fully compromises a JVM because the security is based entirely around not letting you create a pointer. That makes them fundamentally and hopelessly insecure compared to C as any bad hardware or computer with insufficient cooling can be exploited with the same code. Judging by the number of even experienced builders who see their boxes crash in prime95 high heat AVX testing, that's probably most PCs.
▶ No.818164
>>818091
Because businesses are run on nickels and dimes and CTO's have to listen to CFO's so they choose the cheapest, laziest language available. Avoid the meme languages. They are crippled by design.
▶ No.818205
There's a vocal group on /tech/ who are staunch advocates of SICP and call people names when they disagree.
ergo sum SICP is shit
▶ No.818362
>>816379
Underrated. There is more than one model of computation. SICP is a big picture book that helps you understand what CS is, and the archatecture and design of programs with big ideas like state, mutability, recursion, iteration, acculumation etc. Starting with the big picture may not be for everyone. After years of C programing, I found it truly enlightening.
▶ No.818363>>818369
>>816600
Premature optimization. Code should be written in good form, and the compilier should optimize. Writing bad form for performance gains is a hack, that leads to trouble maintaining and possibily security bugs.
▶ No.818369
>>818363
>code is for humans
>compilers are magical
t.code artisan