Or just disable Javascript. On Medium, you get a great experience doing this, because it disables what I call the "progressive degradation" strategy set up on Medium. This allows the "graceful enhancement" strategy to kick in. See how images and text render perfectly without JS.
I've already said this here, but progressive degradation is a great strategy going like this: you start with a sane and nice baseline, and then add crap to that for supported browsers and configurations.
You can be thankful to Medium for adopting this technique, because if everybody did that, you'd get a perfect Web by just blocking Javascript on anything that is supposed to be a freaking document. Please lobby for this. The team behind Medium might even be secretly doing this on purpose but don't tell their boss.
I wish languages used let to mean a lazily evaluated named expression. Then you can define all your terms that can depend on other lets and only the ones needed in the executed code path get executed once.
yes exactly plus there are some things not about the language itself but the whole foundation backing it up, it lacks marketing and advocacy. It looks appealing but given that lack of marketing and popularity, it needs to have A LOT OF advantages to still be considered a contender in mainstream production environments which it fails to achieve since it doesn't really have a whole lot of advantages to it ( I'm just saying there aren't as many to back up for the flaws of it's foundation ). Hence, I don't dislike Nim at all but I don't find it good either, I find it alright.
Yeah, I completely get that. Was talking to a core dev today and he mentioned the limited tooling/ecosystem. It doesn't help when you're a competitor of either very well-established languages or ones that are backed by big corporations (e.g. Go)
You have valid points, but I’d argue that Python looked like that for much of its life. It didn’t really start to see widespread adoption until Django hit the scene - from memory, 2012-2014 was when it started to go from “esoteric scripting language” to “alternative to Ruby” and finally “default for new web backends”.
I’m very interested in Nim and try to keep up with news, but I just don’t have time for yet another language and community. That’s unfortunate because I see a lot of promise in it, and I think it would be a joy to work with every day.
I’m just quietly waiting, hoping for Nim’s Django.
Nim is case- and underscore-insensitive (except for the first character).
Thus HelloWorld and helloWorld are different, but helloWorld, helloworld, and hello_world are all the same
I really don't understand this feature of the language.
It's because it integrates with C libraries where a lot of variable naming schemes could be found, and tries to let you do your thing regardless of included C libs.
Took me some time to understand to but once I tried it, it's pretty cool.
Except that Nim doesn't allow double-underscores, which show up from time to time in C.
Compiling var my__thing = 10 yields:
Error: invalid token: trailing underscore
Which is actually my biggest complaint about Nim. The error messaging is terrible, as are some of the decisions around the standard library. There's a good amount of bad and Windows-centric language there, unfortunately. Functions in the standard library like "setCtrlCHook" https://nim-lang.org/docs/system.html#setControlCHook%2Cproc...
Overall still a fan of Nim. Unlike many of the people in this thread, "marketing" is not a concern to me. I don't expect to ever program with Nim at my day job because "marketing" programmers are too dogmatic these days. Day-job languages are always going to be hypelang_2020 + dogma_patterns_v3. I very much like that the Nim community feels underground, is small and active. I hope it never suffers from the influence of modern dayjob programmers, but this is because I've seen the fun sapped out of other communities. A selfish desire, if I may.
I was actually curious at first and then I was like ah shit here we go again "NiM : the python killer", it for real is not by any means gonna be able to replace python given the stark difference in usage atm in addition to Nim's inadequete marketing and advocacy present right now. Just doesn't add up.
I feel the opposite: Nim is overmarketed here on HN, just like D.
It's marketed as a modern systems programming language, but I don't see any benchmark comparision with C/C++/Rust on language benchmark shootout.
As for me I selected Julia from the language benchmark shootout as my to go programming language, and I'm not looking back (Rust/C++ are a bit too level for my needs, but I still need performance).
Nim is my "scripting" language of choice for any quick tools I write. Just today I needed to do some data exploration on a 1 million line CSV file. No formal data analysis, just needed to understand the shape of the data and answer a few questions. Writing the script was easy thanks to Nim's nice syntax and big standard library. My most complex query finished in a minute, most of my queries took less than 20 seconds to complete. This is all unoptimized code using the garbage collector and idiomatic language features. Nim isnt without its faults, but it is a seriously underrated language.
The problem with examples like this is that simple FileIO operations are optimized across all languages. It would likely have similar speed in very naive unoptimized Python.
Here is an example:
Given `create_csv.py`:
with open("output.csv", "w") as csv_file:
for i in range(1_000_001):
csv_file.write(",".join([str(i)] * 100)) # creating 100 columns per entry out of a million
csv_file.write("\n")
and `search_csv.py`:
import sys
for row in open("output.csv"):
if "1000000" in row.split(","):
print(row)
break
else:
sys.exit("row 1 million not found!")
With the first script creating a 1 million line csv with each row containing 100 columns, and the second one being a worse case search (has to make it all the way to last row, has to search every column). The performance is better than what you mentioned on commodity hardware, very unoptimized Python code, and default Python3 installation:
The question of it being "clickbait" aside, I find the title a bit odd. I can’t see any language that "You've Never Heard Of" as being a possible Python substitute. In my mind, one of the single largest reasons for using Python is how ubiquitous it is and how large the community is.
Virtually any question or problem I run into with Python's core libraries or language features is answered in detail by the first Google result. It's getting rare to not find a reasonably well documented Python binding for any given library, and many projects have official Python bindings. It's almost trivial to find an example of how to do virtually anything in Python.
Any language could be argued as an alternative to Python, but very few can be a substitute for it given the scale of investment and mind-share Python has.
This. Python is a genuine great choice for so many disciplines as well. If I have a ML project, then need to make a web app around it, and want to manage my environment, Python is a genuinely great language for _all_ of those needs all at the same time.
Great as they may be in their own domains, you can’t say that about Julia, Nim, Matlab etc.
Just JavaScript transpiring seem A bit lacking atm, then it is complete...
What's wrong with Julia here? Its webservers and web app packages are pretty amazing. I just moved everything from a mixture of Ruby and Python over to various forms of it and have had far less issues. I think the testing and the "one language stack" culture of Julia leads to more robust software and you can fairly clearly see it in the general-purpose areas.
Nothing _wrong_ with Julia, and likely my knowledge of it is outdated. But my point is, Python ranks, in popularity, quality and appropriateness, as a top choice for so many categories of SE. It’s not like a, say, good scientific programming language with an also surprisingly good web front end. Not sure you would say that about Julia, for lack of popularity if nothing else.
25 comments
[ 1.1 ms ] story [ 120 ms ] threadI've already said this here, but progressive degradation is a great strategy going like this: you start with a sane and nice baseline, and then add crap to that for supported browsers and configurations.
You can be thankful to Medium for adopting this technique, because if everybody did that, you'd get a perfect Web by just blocking Javascript on anything that is supposed to be a freaking document. Please lobby for this. The team behind Medium might even be secretly doing this on purpose but don't tell their boss.
That’s also how Swift does it too.
Throw in type inference and statically typed languages look much nicer.
Swift uses C style braces, while Nim seems to use white space like Python.
I’m very interested in Nim and try to keep up with news, but I just don’t have time for yet another language and community. That’s unfortunate because I see a lot of promise in it, and I think it would be a joy to work with every day.
I’m just quietly waiting, hoping for Nim’s Django.
Nim is case- and underscore-insensitive (except for the first character). Thus HelloWorld and helloWorld are different, but helloWorld, helloworld, and hello_world are all the same
I really don't understand this feature of the language.
Took me some time to understand to but once I tried it, it's pretty cool.
Compiling var my__thing = 10 yields:
Error: invalid token: trailing underscore
Which is actually my biggest complaint about Nim. The error messaging is terrible, as are some of the decisions around the standard library. There's a good amount of bad and Windows-centric language there, unfortunately. Functions in the standard library like "setCtrlCHook" https://nim-lang.org/docs/system.html#setControlCHook%2Cproc...
Overall still a fan of Nim. Unlike many of the people in this thread, "marketing" is not a concern to me. I don't expect to ever program with Nim at my day job because "marketing" programmers are too dogmatic these days. Day-job languages are always going to be hypelang_2020 + dogma_patterns_v3. I very much like that the Nim community feels underground, is small and active. I hope it never suffers from the influence of modern dayjob programmers, but this is because I've seen the fun sapped out of other communities. A selfish desire, if I may.
I don't want to have to click through to know what the language comparison is.
It's marketed as a modern systems programming language, but I don't see any benchmark comparision with C/C++/Rust on language benchmark shootout.
As for me I selected Julia from the language benchmark shootout as my to go programming language, and I'm not looking back (Rust/C++ are a bit too level for my needs, but I still need performance).
Funnily enough this is because the author of that benchmark outright refuses to include new languages such as Nim.
I learned a lot from the benchmarks themselves. Somebody could just fork it if it's not well maintained, but I know that it's extra work.
Here is an example:
Given `create_csv.py`:
and `search_csv.py`: With the first script creating a 1 million line csv with each row containing 100 columns, and the second one being a worse case search (has to make it all the way to last row, has to search every column). The performance is better than what you mentioned on commodity hardware, very unoptimized Python code, and default Python3 installation:time python3 create_csv.py
time python3 search_csv.py1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000,1000000
Virtually any question or problem I run into with Python's core libraries or language features is answered in detail by the first Google result. It's getting rare to not find a reasonably well documented Python binding for any given library, and many projects have official Python bindings. It's almost trivial to find an example of how to do virtually anything in Python.
Any language could be argued as an alternative to Python, but very few can be a substitute for it given the scale of investment and mind-share Python has.
Great as they may be in their own domains, you can’t say that about Julia, Nim, Matlab etc.
Just JavaScript transpiring seem A bit lacking atm, then it is complete...