Live data from Hacker News

The Nim programming language

nim-lang.org

21–30 of 97 posts

Re: The Nim programming language

#21
post #5
post #2

Nim is the language I have always thought was a brilliant idea that I never get to use. It's a shame. Nim is to C/C++ as CoffeeScript is to JavaScript. A highly extensible template language atop a portable language with libraries for practically everything. So why haven't I hopped on the bandwagon? Outside of C++, C, and Fortran - the only way I have ever learned a new language is through using a REPL. How much of Py…

When I first started using Nim I felt the same way. While I still would love a REPL in Nim, I think you can get pretty close to one by just getting an IDE that can compile snippets of source code for you quickly and easily.

With TinyCC Nim can compile fast enough to serve as a simple REPL[1]. It's already packaged for consumption:

https://github.com/wheineman/nrpl

[1] https://hookrace.net/blog/what-makes-nim-practical/#use-as-a...

Re: The Nim programming language

#22
post #2

Nim is the language I have always thought was a brilliant idea that I never get to use. It's a shame. Nim is to C/C++ as CoffeeScript is to JavaScript. A highly extensible template language atop a portable language with libraries for practically everything. So why haven't I hopped on the bandwagon? Outside of C++, C, and Fortran - the only way I have ever learned a new language is through using a REPL. How much of Py…

I felt the same way. I am still learning it, but not as fast as I could with a REPL. Transpiling to C to get the optimizations in GCC is awesome.

Re: The Nim programming language

#23
post #8

Whenever I see a new project my first question is always "why?". From the FAQ: Why yet another programming language? Nim is one of the very few programmable statically typed languages, and one of the even fewer that produces native binaries that require no runtime or interpreter. That's it? That doesn't answer the question at all. In fact, it makes it even less clear. All it says it that there are other programming l…

  programmable statically typed languages
programmable refers to nim's metaprogramming capabilities.

Re: The Nim programming language

#24
post #7
post #5

Earlier quoted context omitted.

When I first started using Nim I felt the same way. While I still would love a REPL in Nim, I think you can get pretty close to one by just getting an IDE that can compile snippets of source code for you quickly and easily.

Which IDE?

Emacs.

I have the nim-mode and smart-compile packages installed, and I have bound F9 to compile the nim code in the current buffer, and run it in the emacs-inbuilt eshell.

I have configured so that the point and buffer switching 'does the right thing'.

- If the compilation fails, show the compilation buffer in the other window, and do not execute the binary, and keep the point in the code window.

- If the compilation passes, execute the binary in the other window.

- Now if the binary execution ends with showing the eshell prompt, move the point back to the other window (code window).

- If not, that is, if the eshell prompt does not show up, keep the point in the eshell buffer, because that most likely means that some user input is expected.

---

So my nim learning process goes as: type a code snippet, F9, type more, probably cause error, F9, fix that, F9, etc.

Config: [1] [2]

[1]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...

[2]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...

Re: The Nim programming language

#25
post #12

Nim seems like a great language -- certainly people who use it seem to extoll its virtues -- but I see this getting submitted and making it to the front page essentially every month. Unless there's some news about Nim that's pertinent, perhaps we could give it a rest?

Uber gets submitted. Go. Erlang. Machine learning libraries. Stratups advice. A lot of things get submitted over and over. If people want to give it a rest they won't upvote and it won't show up on the front page. It's pretty simple. But there is interest so it shows up. Don't see it as a big deal, seems to work as designed.

I think GP's point might be that the Nim homepage gets submitted fairly often. For the other examples you mentioned, there's usually more variety in the content being submitted.

However, as noted in another comment, Nim has a new website up hence the post this time.

Re: The Nim programming language

#26
post #8

Whenever I see a new project my first question is always "why?". From the FAQ: Why yet another programming language? Nim is one of the very few programmable statically typed languages, and one of the even fewer that produces native binaries that require no runtime or interpreter. That's it? That doesn't answer the question at all. In fact, it makes it even less clear. All it says it that there are other programming l…

How does it accomplish tracing GC without a runtime?

It doesn't have a tracing GC (or at least, the primary portion isn't tracing). The garbage collector is outlined at https://nim-lang.org/docs/gc.html

Re: The Nim programming language

#27
post #8

Whenever I see a new project my first question is always "why?". From the FAQ: Why yet another programming language? Nim is one of the very few programmable statically typed languages, and one of the even fewer that produces native binaries that require no runtime or interpreter. That's it? That doesn't answer the question at all. In fact, it makes it even less clear. All it says it that there are other programming l…

How does it accomplish tracing GC without a runtime?

It doesn't have a tracing GC (or at least, the primary portion isn't tracing). The garbage collector is outlined at https://nim-lang.org/docs/gc.html

Re: The Nim programming language

#28
post #8

Whenever I see a new project my first question is always "why?". From the FAQ: Why yet another programming language? Nim is one of the very few programmable statically typed languages, and one of the even fewer that produces native binaries that require no runtime or interpreter. That's it? That doesn't answer the question at all. In fact, it makes it even less clear. All it says it that there are other programming l…

How does it accomplish tracing GC without a runtime?

It doesn't have a tracing GC (or at least, the primary portion isn't tracing). The garbage collector is outlined at https://nim-lang.org/docs/gc.html

Re: The Nim programming language

#29
post #2

Nim is the language I have always thought was a brilliant idea that I never get to use. It's a shame. Nim is to C/C++ as CoffeeScript is to JavaScript. A highly extensible template language atop a portable language with libraries for practically everything. So why haven't I hopped on the bandwagon? Outside of C++, C, and Fortran - the only way I have ever learned a new language is through using a REPL. How much of Py…

What makes a REPL brilliant instead of average?

Re: The Nim programming language

#30
I dig the changes in the landing pages, but I wished the documentation pages got the same treatment. At present, the documentation is not readable easily on mobile browsers.

Are you considering converting the documentation pages to responsive design too?

Also the black and yellow theme looks great on the home page, but that theme loses its continuity on all the other pages. It's as if the home page was designed by a different person, the feature and other landing pages by someone else, and the documentation pages by someone else altogether.

Post reply on HN