NimConf 2021
conf.nim-lang.org
conf.nim-lang.org
I suspect this thread (apart from a title edit which removed date of event, weird but ok) was flagged in some way: early on it started ranking very low given points and time of submission, currently it shows at the end of Nim searches in algolia (by default ranked by points).
I submitted being careful not to advertise the submission on Nim channel to limit artificial growth by fans and possibly avoid the flagging mechanisms (unsuccessfully). If it were to die off without interest, fine, somebody else would submit again or maybe people are just not interested. Instead it got points but went very early on away from top page. This means people were interested but the post had artificially limited visibility. It also means a repost is not encouraged.
I believe this is a legitimate submission advertising and stimulating discussion from larger HN community on a Nim (a language on which HN crowd has expressed interest) event that happens once a year (and there has been very limited submissions on Nim subjects in the last months).
Is there something else a normal user should know to avoid stuff being flagged while trying to genuinely share something without trying to trick HN in any way? Or is there something specific in this post that warranted flagging?
I am personally very fond on Nim on HN since this is how I discovered about Nim, but this stuff happening makes me less eager to submit stuff (Nim related or otherwise on this site).
I have no idea how they are funded. I think employers would be willing to subscribe to uplift skills.
Tuples are really more akin to records, which name their fields. Because of that, I found many things quite difficult to do since I couldn't just return and work with a generic tuple type; read: (int, string) doesn't equal (int, string) because one is forced to name the elements and magically know the names of elements as well from returned tuples.
And multi-threading was just a mishmash of ideas, none seemed "blessed" or really 1.0 worthy (as of 1.0).
Those two issues aside, I really liked Nim when I tried it. Maybe the issues above aren't issues any more and I should take another look?
https://play.nim-lang.org/#ix=2lK1
Tuples with anonymous fields are equivalent to those with named fields as long as the types and values match. Two tuples with differently named fields will not be equivalent even if their values are.
> magically know the names of elements as well from returned tuples.
This is not magic, is it? No more so than knowing the return type.
which part of the link shows using tuples? i can't really see anything tuple-like really
echo (3,5,7)
let (x, y) = ( "X", "Y" )
echo x, y
(3, 5, 7)
XYYes and no. With destructors we are finally able to use multihreading without resorting to raw pointers. However its very wip. I am making a lib if you like to try it out https://github.com/planetis-m/sync and give some feedback.
I have some notes on tuples in Nim: https://scripter.co/notes/nim/#tuples
But first I should probably leaen Nim! Have just been admiring from afar.
What I'm describing would be the inverse of Nimporter, allowing you to import Python code as a Nim library (without making Python calls). That way, you get the performance of Nim but the years of Python package development. "Transpiler" might be a better word?
I've never worked on anything so difficult so I'm really just spitballing. But... wouldn't it be cool? :)
[0] https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programm...
Besides that Nim uses UFCS, you can mimic 90% of your OOP needs without using pragmas or methods or anything like that.
Nim intentionally gives you very spartan objects. It is by no means an OOP-first or even an OOP-heavy language. The object type is little more than a storage container for named values, and should be treated as such. There is no magic like what you get with Python objects.
I've said it before, but the frequently thrown around, "it's just like Python but typed and compiled" has probably been a net negative for the language. It is syntatically similar, but once you get beyond those initial appearances it is a very, very different beast. So if you try to write Pythonesque Nim, you're not going to have a good time with it. It's no different than trying to write JavaScript like Python - they're just different languages that don't work the same way.
The macro chapter in Nim by Example is a good tutorial for writing a macro, but I don't know that it's a big improvement. For the most part, it just allows you to remove the `self: ObjectType` from methods that act on an object. I guess that's okay? But even Python makes you include the `self` in class methods.
https://nim-lang.org/docs/manual.html#procedures-method-call...
Tell me if I'm wrong.