[–]▶ No.886538>>886545 >>886553 >>886556 >>886572 >>886587 >>887268 >>891831 >>891832 >>891833 >>891874 >>891877 >>891881 >>892337 >>896286 [Watch Thread][Show All Posts]
Just set up gentoo on my thinkpad and holidays are coming up and I was thinking about finally diving into the programming meme. What is the best programming language out of
>rust
>c++
>p*thon
>c
>lisp
>perl
▶ No.886539
programming* in subject, still getting used to new keyboard
▶ No.886540>>886541
c family really, 'cause unix is shit
▶ No.886541>>886543
>>886540
What is better, c or c++ and is rust considered part of the c family? I know it's pretty heavily based off of c
▶ No.886542>>886556
Of those? C or Perl. But really, you should try to learn scripting at a high level first -- most people don't realize how useful sed/awk are.
▶ No.886543>>886600
>>886541
If you aren't dumb, C, otherwise start with python.
I'm not into mathemtics or anything of that sort, maybe physics, started with C and had very hard time learning the language itself, not mentioning actual writing programs. But once you get into it, it's somewhat easy. Now I know Go, little bit of python and cpp. Time and dedication are essential if you are more human than machine.
▶ No.886545>>886551 >>886552 >>886563 >>886564
>>886538 (OP)
C if you want to be programmer.
Python if you just want to create cool shit quickly.
▶ No.886549
Doesn't matter. You should be able to switch between those without issue.
And LISP is not a programming language, it's a family.
▶ No.886551>>886564
▶ No.886552>>886564
▶ No.886553
>>886538 (OP)
The only fun things about programming is making games. Learn Lua.
▶ No.886556>>886561
>>886542
>sed and awk
lol
>>886538 (OP)
>setup gentoo
woah impressive
▶ No.886561>>886569
>>886556
awk is a programming language.
▶ No.886563
>>886545
this, python is great if you want to be lazy and don't give a fuck about performance, C for the opposite. anything inbetween these is a waste of time and not worth learning.
▶ No.886564>>886590 >>891837
>>886552 (Pajeet)
>>886551 (Rajesh)
>>886545 (Amir)
cjeets out in full force today
▶ No.886569>>892083
>>886561
Ok mr. larper. Post an awk program you wrote.
▶ No.886571
Of those Lisp is without a doubt 'the best' and has the best literature surrounding it, but if your objective is to write useful little programmes to help your general computer use, Lisp is not the right choice. It's not really at home in the Unix world.
If you're interested in programming for its own sake, then by all means, learn Lisp. It's wonderful to use.
▶ No.886572>>886573 >>887144
>>886538 (OP)
>rust
Downloads non-free binaries upon installing a compiler.
Ken Thompson says hello to all bioluminescent agents out there.
>c++
Just don't.
>sn*k
Not a programming language, it's a userscripting tool. Good substitute for bash.
>c
Lear this, or better, start learning Go.
>lisp
Not a programming language, it's a userscripting tool for jews.
>perl
Not a programming language, it's a userscripting tool for non-humans.
▶ No.886587
>>886538 (OP)
1. think about what you want to do.
2. decide on a project.
3. choose a fitting language for it.
4. if you don‘t know that language, learn it.
Stop learning languages for the sake of learning them.
▶ No.886588
Best for what, exactly? And what do you already know?
▶ No.886590
>>886564
nice unfunny forced meme
▶ No.886592
Just whatever you feel comfortable with. Don't use a language just because you "should".
I'm programming my game in Pascal. Because all the others had flaws that bothered me.
▶ No.886612>>887855
{"Hello World" println 0 ret} argv (ptr ptr char) argc (int) :main define.
{{{{{i "{d}" println} {"Fizz" println} {i 3 mod 0 eq} ifelse} {"Buzz" println} {i 5 mod 0 eq} ifelse} {"FizzBuzz" println} {i 15 mod 0 eq} ifelse i ptr inc { nil ret } {i 100 eq} if } i (int) :fizzbuzz-inner define 0 fizzbuzz-inner} :fizzbuzz define.
▶ No.887144>>887256
>>886572
>Gets everything wrong
>MUH C IS THE ONLY PROGRAMMING LANGUAGE
>Recommends Go
Are you doing it on purpose?
▶ No.887256
>>886600
>>887144
Golang is superfaster you ching-chongs
▶ No.887268
>>886538 (OP)
Brainlet? Python
Otherwise learning C is never a bad idea.
▶ No.887270>>887293
> Golang
> The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt. -Rob Pike
▶ No.887293>>888725
>>887270
Go is a fantastic language. Personally for me it's a pascal killer.
▶ No.887855>>888691
>>886612
Why is everything backwards?
▶ No.888691
>>887855
Postfix notation/RPN. Stack-based languages like Forth usually do that.
▶ No.888716>>888726 >>888730 >>888738
>le meme arrow Go
i have yet to see an argument against go, surely you have a valid reason to dislike it, right?, surely you aren't just another stupid larper, right?
▶ No.888725
▶ No.888726>>888753
>>888716
no generics, no round fnction for floats, no abs/min.max functions for ints, import github
▶ No.888730>>888763
>>888716
My knowledge of Go is very limited, but -
- Annoying arbitrary classical Unix-style limits, for example the idiomatic way of reading a line from the standard input silently fails if the line is too long
- Really weird other shortcomings, like how they didn't add monotonic time until Go 1.9 because apparently who even needs that right
- No generics
I also keep hearing things about how they, for example, claim their garbage collection is really great when it's just optimized for one particular use case and metric and doesn't outperform that of, say, the JVM in general.
It all feels very Unixy, and not in a good way. It feels Unixy in the way of programs that work 99% of the time but sometimes fail because the system designers knowingly didn't cover edge cases because it would take extra work.
▶ No.888738
>>888716
How is Go better than Java/C#?
The only things Go has going for it are short GC pauses, goroutines, duck typing (which also has its downsides) and being a Google project.
Meanwhile Java has the JVM (which is actually pretty fucking fantastic), multiple GC algorithms tht you can tweak to your liking, Generics, Maven and mature libraries.
>inb4 AbstractFactoryBean XDDDDDDDD
Go is absolutely useless because for every use case there exists a language that is better at it than Go.
▶ No.888753>>888762 >>888769
>>888726
>no generics
Harmful bloat. I hope Rob Kike doesnt give in to the pressure.
>no round fnction for floats
Wrong. math.Round
>no min.max functions for ints
Please stop. I cant handle this level of retardation.
func min(a, b int) int {
if a < b {
return a
}
return b
}
>import github
It imports git repos, not GitHub specific.
Try again.
▶ No.888762>>888770
>>888753
>bloat
epic
>math.Round
https://github.com/golang/go/commit/03c3bb5f843cbda7382b5618de82a74adb779393#diff-fb2ef479237c7a939531a404fd0e5cb7>
>This function avoids subtle faults found in many ad-hoc implementations, and is simple enough to be inlined by the compiler.
This was added in v1.10 which was released on the 16th February this year.
>Please stop. I cant handle this level of retardation.
I agree. Not having abs/min/max functions for integers in the standard library is really fucking retarded.
>It imports git repos
This is retarded. You know that, right?
Try again.
▶ No.888763
>>888730
>Annoying arbitrary classical Unix-style limits, for example the idiomatic way of reading a line from the standard input silently fails if the line is too long
It doesnt silently fail. The method sets global variable in that package that you have to check for error (if it is important for your case). Go doesnt hold your hand you need to increase the buffer size. Method not returning error is done for performance reasons. There is a legit use case to have small fixed buffer and ignore if it is too big.
>Really weird other shortcomings, like how they didn't add monotonic time until Go 1.9 because apparently who even needs that right
They do have it now. They were wrong and they added it. No what? What is the new up to date complain?
>No generics
Harmful bloat. If Go adds 100% Java style generics I will quit using Go. I didnt sign up for this garbage.
>I also keep hearing things about how they, for example, claim their garbage collection is really great when it's just optimized for one particular use case and metric and doesn't outperform that of, say, the JVM in general.
You can tune garbage collector with 1 line of code. The current default is good for most situation.
Go is not he best language by far but all criticism is shallow, extreme nitpicks.
▶ No.888769>>888774
>>888753
>Harmful bloat
The opposite actually. You might realize this if you ever learn to program a more complex language than one for Gen-Z faggots.
▶ No.888770>>888782 >>892058
>>888762
>This was added in v1.10 which was released on the 16th February this year.
And? How does impact you writing code now? What is your next complaint?
>I agree. Not having abs/min/max functions for integers in the standard library is really fucking retarded.
Stop programming.
>This is retarded. You know that, right?
I misspoke, it doesnt import git repos. The path is the code in the GOPATH, but the the directory structure is the same as URL. You are go get-ing the git repo into the correct directory structure. It is great way to avoid shitty package managers.
So much legit things to complain against Go, but you are uninformed retard. Literraly you can nitpick any programming language wih pointless shit. Go read a book kiddo. :^)
▶ No.888774>>888776
>>888769
>Gen-Z faggots
Says the smelly Pajeet. Ironic.
▶ No.888776>>888778
>>888774
Thanks for conceding the argument. We learn now that not only do you misunderstand generics, you also do not understand irony. Consider repeating K-12.
▶ No.888778
>>888776
>lol i win the comment
▶ No.888782>>888786 >>892058
>>888770
>And? How does impact you writing code now?
I don't write Go. I also don't use anything written in Go. All I'm saying is that retarded Gophers had to write the round function themselves which they of course fucked up.
https://www.cockroachlabs.com/blog/rounding-implementations-in-go/
>Stop programming.
Maybe you should start programming first before you larp on /tech/?
>It is great way to avoid shitty package managers.
>but you are uninformed retard.
<Package maintainer pushed breaking change to master
<Gophers pull those changes
<Fuggggg my code broke XDDDD
ebin :^)
▶ No.888784>>888786
>All criticisms of my fav lang are just retards nitpicking because they ar haters and can't program
Great argumentation. Nearly on the same level of retardation as the Klabnik poster.
▶ No.888786>>888787
>>888782
>All I'm saying is that retarded Gophers had to write the round function themselves
Which is why the round function was added in. Same reason any programming language has that included. Too many retards.
>Maybe you should start programming first before you larp on /tech/?
>I will call you larper because I was proven wrong and my ego hurts. :(
<Package maintainer pushed breaking change to master
<Gophers pull those changes
<Fuggggg my code broke XDDDD
This has been solved with vgo. Again outdated information.
>>888784
I have disproved all your wrong points. No need to samefag.
▶ No.888787>>888788
>>888786
>I have disproved all your wrong points.
You are too retarded to realize how retarded you are. Keep using Go. It is the perfect language for you.
>The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.
>It must be familiar, roughly C-like. Programmers working at Google are early in their careers and are most familiar with procedural languages, particularly from the C family. The need to get programmers productive quickly in a new language means that the language cannot be too radical.
Literally a language made for brainlets.
▶ No.888788>>892058
>>888787
Butthurt sage. I love it. :^)
▶ No.891831
>>886538 (OP)
go was made just for you
check out this amazing website: http://golang.web.fc2.com
▶ No.891832
>>886538 (OP)
Lisp. It's literally the Reddit of programming languages, so even the biggest of retards will be able to grasp it.
▶ No.891833
>>886538 (OP)
Depends on what you're doing.
In physics, for example, a lot of people do everyday things where performance doesn't matter in Python, and more intensive stuff in Fortran if necessary. Or they just use Fortran for everything.
▶ No.891836>>891841 >>901062
Python for scripting, C for anything else. Period.
▶ No.891837
>>886564
shoo shoo rustcuck
▶ No.891840
Honestly just learn a language. If it is a shit language you will just fucking figure it out later. Even fucking Javascript has a ton of applications, uses and resources.
▶ No.891841>>891861 >>892350
>>891836
>python
Too bloated.
Prefer scripting with RC.
▶ No.891844>>891865
▶ No.891861
>>891841
>LARPing as a cat-v
kys
▶ No.891865>>891888
>>891844
if i learn forth, how likely would it be to start hacking on power mac openfirmware and be able to boot up a non-standard video card?
▶ No.891874
>>886538 (OP)
Go learn first how switches work.
▶ No.891877>>892306 >>892319
>>886538 (OP)
C / C++ are good
Python was great, it's okay now
Rust is meme
Lisp is good but will never get you anywhere
Perl was okay, it's worthless now
Bonus:
Java is absolute cancer and will only land you jobs where you, as a junior, are hired to train your pajeet replacement
▶ No.891881
>>886538 (OP)
You did not list any good languages though
▶ No.891888>>891906
>>891865
If you can't figure out the answer to that question yourself, and make an estimate, don't bother. I can't answer it for you, I don't know anything about you. Also OpenFirmware isn't the kernel
▶ No.891906
>>891888
(nice trips bud)
Not asking you to answer for me. I am asking as a generalized response. Also, openfirmware should boot the card if the card has compatible firmware on it. Only problem is finding a video card to rip the EEPROM off and finding a board with compatible pinout to replace with said EEPROM.
▶ No.891943
Learn Python first, then C++ or C (C++ is better but harder), learn Perl if you want too.
▶ No.892058
>>888770
>>888788
>>888782
>using the smiley with the carat nose
▶ No.892083>>892319 >>892356 >>892374
>>886569
It's a shit programming language because it doesn't have many external libraries and isn't particularly suited to general programming. Awk one-liners are the only thing I've ever used.
BEGIN {
printf("hello world\n");
}
▶ No.892165>>892372
I need a nice language with built in fixed point datatypes or arbitrary precision, preferably a language without much overhead and not slow as shit, but efficiency is not my main concern. Any suggestions that are not C with libraries?
▶ No.892306
>>891877
>Python was great, it's okay now
You mean to say "python 2 was/is great, python 3 is just okay"?
▶ No.892319>>892356
>>892083
> it doesn't have many external libraries
awk and sh should be used in tandem, the whole OS userland is the external library.
Not the most useful thing as everyone is abandoning shell.
>>891877
>Java is absolute cancer
Ho boy aint that the truth, I wanted to check out scala and the play framework, how do you setup? well the recommended way is to clone the hello world git repo then run sbt inside it.
It took 20 minutes to download and build everything it needed, for a fucking hello world webpage.
I will never understand the java meme.
▶ No.892337>>892344 >>892347
>>886538 (OP)
Lisp, because the rest of those are UNIX languages. In a "traditional" UNIX language, 00011 means 9. Rust doesn't do that because it's supposed to be an improvement, but the rest of it is all UNIXy. These languages are full of so much bullshit like that, that nobody cares about doing anything else the right way either. PHP and JavaScript are UNIX languages too, which explains why they suck.
And I hacked the renderer code to throw cpp the proper
"-DFRAME=%05d" to spit out numbers the way I wanted
them. Why did I want the leading zeros? I don't know, I just
thought it was cleaner.
So I fired up the animation and let it run for a while
(days).
Well, the output was quite amusing (or at least it would
have been if I didn't need the results for my thesis defense
a week later). The object would go down for a few frames,
then jump up and go down a little, then go back to where it
maybe should have been, then jump up....
After a little headscratching, I realized that the leading
zeros in my frame numbers were causing cpp to treat them as
octal values. How precious.
But still, if I say "#define FRAME 00009" then "#if
FRAME==00009" should still fire (or it should at least whine
at me). Well, 00009==00009 does trigger, but so does
00009==00011.
Huh?
Well, some C library thinks that the nine in 00009 isn't
octal, so it interprets it as 9 decimal. And 00011 is a fine
octal rep of 9 decimal. So, both "#if FRAME==00009" and
"#if FRAME==00011" fired and I applied two translate calls
to my object geometry. And(!), it's not that having a
decimal digit makes the whole number decimal. The string
00019 gets interpreted as 00010 octal plus 9 decimal = 17
decimal. Lovely, not.
OK. How about:
switch (x)
default:
if (prime(x)) {
int i = horridly_complex_procedure_call(x);
case 2: case 3: case 5: case 7:
process_prime(x, i);
} else {
case 4: case 6: case 8: case 9: case 10:
process_composite(x);
}
Is this allowed? If so, what does the stack look
like before entry to process_prime() ?
I've been confusing my compiler class with this one for
a while now. I pull it out any time someone counters my
claim that C has no block structure. They're usually
under the delusion that {decl stmt} introduces a block
with its own local storage, probably because it looks
like it does, and because they are C programmers who use
lots of globals and wouldn't know what to do with block
structure even if they really had it.
But because you can jump into the middle of a block, the
compiler is forced to allocate all storage on entry to a
procedure, not entry to a block.
But it's much worse than than because you need to invoke
this procedure call before entering the block.
Preallocating the storage doesn't help you. I'll almost
guarantee you that the answer to the question "what's
supposed to happen when I do <the thing above>?" used to be
"gee, I don't know, whatever the PDP-11 compiler did." Now
of course, they're trying to rationalize the language after
the fact. I wonder if some poor bastard has tried to do a
denotational semantics for C. It would probably amount to a
translation of the PDP-11 C compiler into lambda calculus.
▶ No.892344>>892356
>>892337
>are UNIX languages too, which explains why they suck
So what doesn't suck? Visual Basic, C#, ASP.NET and Powershell?
▶ No.892347
>>892337
>typing 00009
Retard
▶ No.892350>>892369
>>891841
Uriel realized he was harmful and deprecated himself.
▶ No.892356>>892374
>>892083
Yeah that's what everyone uses. And they use it like once a year. It's one of those things people can spend 5 minutes reading the docs then unlock the learned another programming language achievement.
>>892344
Lisp obviously. Haven't you read the unix haters shitbook?
>>892319
>the whole OS userland is the external library
lol
▶ No.892369>>896313
>>892350
No, he sudoku'd because he had realised the futility of fighting the GNU Jew, much like Hitler in the final days of his Berlin bunker surrounded by ruskies, brits and americans being led by their kike masters.
▶ No.892372
>>892165
Python is slow, but worth a try. The decimal and fractions modules in the standard library respectively provide custom-precision fixed point decimal numbers and arbitrary rational numbers, both of which tend to play nicely when used instead of or even mixed with ints and floats because they implement the proper abstract base classes.
▶ No.892374
>>892356
Funny thing about awk is you find plenty of its constructs in Perl. Like that whole BEGIN and END block thing >>892083 for example.
TBQH, I'd have found awk very useful if Perl didn't exist. As it is, I hardly ever use sed either. Perl does all that and more, all with nicer regex (and no need to escape shell matacharacters constantly either). I once even compiled a vim with perl, just so I could use those regex instead of the vim ones.
▶ No.894472>>894543
C++ if you have a brain. C if you're stuck in the 90's.
▶ No.894480>>894543
It completely depends on what you're looking for. For a complete understanding of general languages, go with C.
If you'd like a smaller but incredibly smart community, go with Perl5/6.
▶ No.894543>>894555
>>894472
>C++ if you have no brain. C if you think everyone in the 90's was literally subhuman and less intelligent.
>>894480
>It completely depends on what you're looking for. For a complete misunderstanding of general languages, go with C.
>If you'd like a dying and incredibly dumb community, go with Perl5/6.
▶ No.894555>>895782 >>895791
>>894543
I don't think everyone in the 90's was dumb, if that's the accusation you're trying to throw at me. However, modern design paradigms are better then old ones (in the same way that buildings built today are safer, more robust, and generally better then buildings built in the 90's. Doesn't mean that 90's architects were dumb). And C++ offers support for them at zero (or close to zero) run-time overhead. So why not C++?
▶ No.895780>>896190
▶ No.895782
>>894555
>modern design paradigms are better then old ones
Such as?
▶ No.895791
>>894555
>However, modern design paradigms are better then old ones
That is a logical fallacy that you ought not to commit.
>in the same way that buildings built today are safer, more robust, and generally better then buildings built in the 90's.
This is heavily dependent on the building, the location and the economic situation, and the statement is blatantly false when you go back several centuries ago. Cathedrals built in the 14th century stand still even today. You won't be able to say the same of modern skyscrapers in the 24th century.
▶ No.896190>>896218
▶ No.896218
>>896190
>ghetto ocaml ripoff
no
▶ No.896286
>>886538 (OP)
>programming language for brainlet
Indeed.
The next step is to realize that programming itself is the key and not the language in which it is done.
▶ No.896313
>>892369
words of wisdom.
Still, we need to make Python more modular and easy to use
▶ No.901062>>901064
>>891836
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
WEE WOO
LARP ALERT
▶ No.901064>>901066 >>901077
>>901062
>Larping
You mean pushing Scheme a language that no one uses for anything in real life? Autocad uses their own lisp (not Scheme). Only thing that uses Scheme thats real is GIMP. The worlds shittiest image editor.
▶ No.901066>>901068 >>901070 >>901071
>>901064
>GIMP is the world's shittiest image editor
Objectively false, but nice LARP otherwise. Let me guess, you torrent Adobe® Photoshop™ and pretend you're a professional photographer?
▶ No.901068>>901076
>>901066
>Objectively false
LOL.
Nope, but all the photographers I have met that started with GIMP all moved to photoshop cause GIMP is shit.
>last stable version is 6 years old
>destructive edits
>shitty interface
>bad color support
Great system you got there
▶ No.901070
>>901066
>Scheme larper triggered
▶ No.901071>>901076
>>901066
>GIMP
>Not even compatible with modern versions of ITS OWN UI TOOLKIT
thats how outdated it is
▶ No.901076>>901077
>>901071
No one talked about it being outdated, also GTK hasn't been the GIMP Tool Kit for ages now, grandpa.
>>901068
>but all the photographers I have met that started with GIMP all moved to photoshop cause GIMP is shit
Merely an argument for Photoshop being better suited to photographers, hardly an argument for GIMP being the literal worst thing ever.
>last stable version is 6 years old
<muh shiny new fallacy
The rest are valid critiques, but they hardly apply to GIMP only.
▶ No.901077>>901083
>>901076
>but they hardly apply to GIMP only.
Photoshop has had this shit solved for a long time and its what everyone uses.
Back to the scheme though. You failed to address literally any of the points in >>901064
▶ No.901083>>901086
>>901077
What point m8? I replied to a LARPer who said "C for literally everything that isn't done with Python." I don't need to defend Scheme here. I don't pretend it's a language for everything.
>its what everyone uses
Well I don't, so it's already not everyone.
▶ No.901086
>>901083
Pedantic when convenient. As usual you furry.