Live data from Hacker News

What is special about Nim?

hookrace.net

81–88 of 88 posts

Re: What is special about Nim?

#81
post #19

Nice article. I was going through trying to follow the instructions and hit a couple of issues: -For "You should then add ~/.nimble/bin to your $PATH" it took me quite a while to figure I had to enter "ln -s ~/.nimble/bin/nimble /usr/local/bin/" in my Mac's terminal to do that. I guess experienced devs know that stuff but beginner here. -There's a bug in the client.nim and server.js code where the client refers to el…

For Mac users, I recommend using Homebrew [1] (which hackers should already be using IMHO) to install Nim.

  brew install nim
Done and done.

[1]: http://brew.sh

Re: What is special about Nim?

#82
post #80
post #55

Earlier quoted context omitted.

Well, there is a REPL, but it's not that great: $ nim i >>> for i in 0..10: ... echo "Hello World"[0..i] ... H He Hel Hell Hello Hello Hello W Hello Wo Hello Wor Hello Worl Hello World To use up/down keys, build the Nim compiler with "./koch boot -d:release -d:useGnuReadline" or run "rlwrap nim i" instead. Edit: It's even buggier than I remembered, best avoid it and use "nim -r c file" instead.

What bugs or things-that-are-not-great have you run into with Nim's REPL?

It seems that you can't use any libraries. After using import it doesn't work anymore.

Re: What is special about Nim?

#83

Earlier quoted context omitted.

When I saw that the top comment is a list of language features which are mostly extremely old, I thought that was interesting, so I pointed out how old those features are. And got hammered for it in spite of the fact that it's true. Obviously, it doesn't matter whether those features are old or new. What matters is whether the language executes them in a compelling way. But almost every single one of those features h…

To be a bit more specific as to where else these ideas are found: * Run regular code at compile time Lisp, of course. Since very long ago. * Extend the language (AST templates and macros); this can be used to add a form of list comprehensions to the language! Lisp, but also Dylan, Elixir, JS with Sweet.js and more. See for example here: https://opendylan.org/articles/macro-system/index.html * Add your own optimizatio…

> * Add your own optimizations to the compiler! > > I'm not sure here.

Lisp, via compiler macros: http://www.lispworks.com/documentation/HyperSpec/Body/03_bba...

> The purpose of the compiler macro facility is to permit selective source code transformations as optimization advice to the compiler. When a compound form is being processed (as by the compiler), if the operator names a compiler macro then the compiler macro function may be invoked on the form, and the resulting expansion recursively processed in preference to performing the usual processing on the original form according to its normal interpretation as a function form or macro form.

Re: What is special about Nim?

#84

Nim is great, and this article is great, except until now no article about nim managed to sell it to me like a simple Golang example including channel and go routine. Could any Nim advocate demonstrate a simple program that: less than 50 loc shows the greatest strength (1 killing selling point is enough)

There's no such thing as a single "selling point" for Nim. Or rather there are many such points: depending on what programming you do you'll appreciate different language features. Making a list of many (not all of course) powerful language features is - I think - the right approach to the problem here. It would probably be better if you explained what kind of problems you're dealing with in your work: we could then…

I understand you (maybe including other Nim guys) feels undervalued/offended when I asked for a sales pitch. Nim is an opensource project and probably nobody makes a cent out of it, yet some arrogant guy like me treat the priceless work like something off shelf in the supermarket.

sadly the reality is not everybody has the time to appreciate the beauty of Nim unless he/she is convinced Nim identifies a problem largely ignored by others and solves it beautifully. my point is, could you convince me?

Re: What is special about Nim?

#85
post #35

A little OT: Courtesy of the Reddit discussion of the OP, a reference to the discussion on Wikipedia about Nim, or rather, the discussion to delete its Wikipedia entry: https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletio... At what point does a language become noteworthy enough for a site that contains full entries for side characters in non-canonical Star Wars novels?

Someone needs to fork Wikipedia with different site policies.

Re: What is special about Nim?

#86
I'm not sure I like Unified Call Syntax. I think myvar.len() should be different to len(myvar), even if they end up returning the same value. Then again, I'm probably missing some key reason why it's useful.

Adding my own optimizations to the compiler sound useful enough. I might see if I can implement this in the language I'm making.

Re: What is special about Nim?

#87

Earlier quoted context omitted.

When I saw that the top comment is a list of language features which are mostly extremely old, I thought that was interesting, so I pointed out how old those features are. And got hammered for it in spite of the fact that it's true. Obviously, it doesn't matter whether those features are old or new. What matters is whether the language executes them in a compelling way. But almost every single one of those features h…

To be a bit more specific as to where else these ideas are found: * Run regular code at compile time Lisp, of course. Since very long ago. * Extend the language (AST templates and macros); this can be used to add a form of list comprehensions to the language! Lisp, but also Dylan, Elixir, JS with Sweet.js and more. See for example here: https://opendylan.org/articles/macro-system/index.html * Add your own optimizatio…

Isn't compile-to-JS mandatory nowadays?

Re: What is special about Nim?

#88
Special about Nim is also that Wikipedia consistently tried to delete the article about Nimrod (and did), because someone considered it not noteworthy. What a joke those editors are. If you have no idea about software languages don't interfere.
Post reply on HN