124 points · by pietroppeter · 5y ago · 32 comments
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).
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?
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.
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
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.