Go and nim are trying to fill two very different needs, and I don't see them being in competition. Go's design is focused making code simple, uniform, modular and thus easy to refactor and maintain. Nimlang wants to provide C-performance with some sensible abstractions and expressive syntax.
If I had a team of 10+ developers of highly variable experience working on an enterprise-scale application, then I would choose Go.
If I were working on a small project where performance actually mattered and I had ample time for experimentation, then I might use Nim.
If execution speed isn't actually mission-critical, then I would probably just use Python because there's a good chance you can just "pip install" a library that already does what you want to do.
>>1293 >I would probably just use Python
Python is absolute cancer. Its speed is way too slow for anything, even stuff where speed isn't that important.
youtube-dl is an example of a program written in python where speed isn't critical. Look at this shit:
$ time youtube-dl
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
0m02.01s real 0m01.43s user 0m00.20s system
That was on a 2.5GHz dual core i5. Two seconds.Two fucking seconds to print out a 149-byte help message. What the fuck do you need TWO FUCKING SECONDS for? Clearly this is a fault of Python itself. No complex or useful program can ever be written in Python without suffering from crippling slowdown as demonstrated above.
Most of youtube-dl's execution time comes from downloading things, so maybe you'd say it isn't important. But it is important. Two seconds for startup plus countless more seconds of overhead in the program itself is absolutely unacceptable. Of course, I appreciate the work of the dev because the tool is very useful, but his choice of language makes youtube-dl totally unusable for many use cases. On my athlon (the only non-botnet computer I have), youtube-dl takes over 7 seconds to print that help message.
Disgusting. Python needs to be FUCKING DELETED from all computers, especially now that it has adopted a (((Code of Conduct))).
$ cat hello.py
print("hello world")
$ time python hello.py
hello world
0m00.03s real 0m00.01s user 0m00.02s system
0.03 fucking seconds to print a fucking HELLO WORLD. That is getting well into the realm of noticeable delay! Absolutely UN-FUCKING-BELIEVABLE. Compare the same program in Lua, which has an immeasurably small execution time (which stayed the same across 5 trials):
$ cat hello.lua
print("hello world");
$ time lua hello.lua
hello world
0m00.00s real 0m00.00s user 0m00.00s system
And Perl, which although a bit faster than python still has a consistent 0.01 second overhead across multiple trials:
$ cat hello.pl
print("hello world\n");
$ time perl hello.lua
hello world
0m00.01s real 0m00.00s user 0m00.01s system
To be honest Lua is the only scripting language worth a shit, and I'm rather dubious of any compiled language except C. As for C++, the language itself is cancer but the compiled binaries are fast, at least. Rust's compiled binaries are very bloated, and that is the case with Go and Pascal as well.
I wanted to look into Zig but it didn't compile on my computer because it required some cancerous GNU libc extension, so that's out of the question already. Nim certainly looks better than python in terms of speed, but its syntax which makes heavy use of syntactically-significant whitespace is cancer just like python.
C and Lua it is, then. *sigh*
>>1284 (Ba)sh is the best scripting language :^)
time printf 'hello world'
hello world
real 0m0.000s
user 0m0.000s
sys 0m0.000s
(2.3ghz dual core i5)
LuaJIT is a close contender though
>>1294 So how many miliseconds of execution speed do you have to have saved before you make up for the 2x+ longer coding time and 10x+ longer debugging time it takes to "write it in C XD!" Try to think of it this way, dumb-dumb. For a given program, what is the total value of time lost for the differential in execution speeds of a Python script versus, whatever gay language you care about for every execution of the total life of the program? Now, what is the difference in cost of development time (which is very expensive) between 'pip install do it the fuck for me' and having some jackass developer who spends 60% of his billable hours on IRC or Reddit write it in some language you like for unimportant reasons? If you aren't already thinking in these terms, then that's probably why your career progression is lousy and some MBA who doesn't understand shit is telling you what to do and getting paid 5X what you're making.
Stop pointing and screaming at totally arbitrary benchmarks that nobody else cares about. It's like geeking out over fucking Magic The Gathering card stats.That you would even use LUA and Perl as comparisons is retarded. The disadvantages in meta-programming eclipse the imperceptible difference in how quickly one can print to the command line. That you don't understand how much more important these other elements are to toy benchmarks proves that you are:
1) Fat
2) Unattractive
3) Doomed to never do anything more important than helpdesk work.
>>1311 >craftsmanship, quality and beauty are obsolete, it's all about money
Don't you have some pajeets to fire? Further, why are you even here? To slide threads, I'm sure.
>>1294 >>1308 Bash really is the best quick and dirty scripting language for sys/file tasks, but Python was ok before the jump to 3.x and all the bullshit that followed.
The benefit of being competent with <=2.7 is it comes packaged with most *nix systems, so as long as you have an editor and a term you can trivially do some complex shit that would be too arcane and difficult in Bash. It really comes down to use case. I never really minded youtube-dl being written in python, because it's so useful and without it I probably would have ragequit the internet years ago.
>>1311 that's possibly the most reddit post I've ever seen posted outside of reddit
>>1294 It's even worse when some python scripts start other python scripts. Like mps-youtube, which is actually slower than youtube itself.
youtube-dl is a must-have, I just couldn't stand using the bloated websites it supports. There are decent alternatives like annie, but they just don't support enough websites.
Zig doesn't work on x86 yet, so I never actually tried it. Judging from the issue tracker, it's not even remotely an usable language yet.
>>1313 >Craftsmanship
You're not building a basilica, you're talking about a website application to post Chinese cartoons to bond with strangers over embarrassing hobbies.
>Slide
Because there was some real important shit going on before I showed up.
>>1311 shit code is cumulative. It's why there are so many problems with pajeetscript and nobody knows how to do fuck-all anymore, and we need 4ghz machines to open a fucking website.
>>1294 Youtube-dl however is a perfect example of python being a good choice. Here the speed of development is *much* more important than performance. Youtube updates rather often, as well as many other sites youtube-dl supports, and I want youtube-dl to be updated as fast as fucking possible to support every single one of them.
>>2151 I suppose you're correct in this case. Although I would prefer the usage of a faster and equally high level language such as luajit, python is a reasonable choice for the reasons you stated.
>>2284 youtube-dl takes 1.68 seconds for me, just to display a usage error. That means 1.68 seconds added onto every invocation. Probably a lot more of these delays hidden inside, which makes it unsuitable for getting information quickly e.g. as part of a script.
does it have a chance against golang or will it forever remain as a niche language??