Live data from Hacker News

The Nim programming language

nim-lang.org

71–80 of 97 posts

Re: The Nim programming language

#71

I am stuck working on a C++ code base using Qt. Could I in theory use Nim to accelerate my development, or would it produce incomprehensible or ugly C++ code? Alternatively are there other alternatives to C++ for people who have to submit C++ code into the repository? I use other languages than C++ on a regular basis and I find it annoying to tedious the language is. So much boilerplate and repetitions.

Some years ago I had the idea to create something similar to CoffeeScript for C++: https://bixense.com/coffeepp/ Never got through to finish it though :/

Re: The Nim programming language

#73

If anyone was interested, the markup theme is Dracula[1], which subjectively feels like the most readable highlighting theme I've ever used. [1]: https://draculatheme.com/

For some reason it reminds me of the various 8 bit computers colour schemes.

Re: The Nim programming language

#74
post #7

Earlier quoted context omitted.

Which IDE?

I've had success with vscode: I have it setup to build+run on save which has so far netted me very quick turnaround times for trying things out. Admittedly I'm still doing super basic stuff at the moment.

Same here. It is a good combination and creating a build task for nim is super simple.

Re: The Nim programming language

#76
post #66
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 recently had to learn a language whose REPL I didn't like and initially felt the same way, but then I did the following: I began writing 'unit tests' for each feature of the language I studied, and I had a Makefile to recompile and run my tests whenever I saved. This setup gives you instant feedback just like a REPL with the added convenience of being able to go back to previous examples without having to separatel…

You can do something similar with the Code Runner extension with vscode [1]

Been able to simply and quickly run code in a variety of languages with little friction is a handy thing to have, particularly when writing fragments in multiple languages at the same time.

[1] https://marketplace.visualstudio.com/items?itemName=formulah...

Re: The Nim programming language

#77

I can see some interesting applications once we can target WASM, libraries that are client/server agnostic with clients that can join in the cloud workload comes to mind.

We already can target WASM[1] :). Nim's JS backend is already very useful though, you can see a game I've created using it in the features page.

1 - https://forum.nim-lang.org/t/2838

Re: The Nim programming language

#78
post #55

Earlier quoted context omitted.

> Are you considering converting the documentation pages to responsive design too? Unless someone volunteers to do this it likely won't happen any time soon. As for the continuity. Not all pages can have the same "section" style, the documentation page for example is just composed of a list of links and descriptions. Of course, if you have ideas on how to improve the continuity then I'm all ears :)

> Not all pages can have the same "section" style, But they can have the same CSS styling (colors, fonts, responsiveness, etc) that ties the whole site together. A good example that's at the top of my mind is this: https://hugodocs.info It works great on desktop as well as phone, and a common theme is seen all across the site. > the documentation page for example is just composed of a list of links and descriptions.…

> > Not all pages can have the same "section" style,

> But they can have the same CSS styling (colors, fonts, responsiveness, etc) that ties the whole site together.

> A good example that's at the top of my mind is this: https://hugodocs.info

> It works great on desktop as well as phone, and a common theme is seen all across the site.

I might be missing something but the website you linked has only two pages and I would consider them to lack continuity even more than the current Nim website. The layout for the "docs" page is completely different to the home page.

> By the documentation page, I meant a page like this: https://nim-lang.org/docs/manual.html

Oh I understand where you're coming from a bit more now. Everything under the `docs/` is sort of separate, it's part of Nim's doc gen generator and thus has a different style associated with it. But I can see why you think it loses continuity.

Re: The Nim programming language

#79
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.

When I can't have a working REPL I use inotify or entr (entrproject.org) to compile and run the program I'm editing when saving.

It's not the same thing but it spares a few key strokes...

Re: The Nim programming language

#80
post #51

Earlier quoted context omitted.

Sorry, by "in maven" I meant "in a maven repository". Using Maven itself is a nightmare, I know, but if what you need is to download some jars and stick them on the classpath, leiningen is perfect (it even compiles regular Java and has control over JDK versions if you want that) And it generates the pom files so you don't have to...

I guess I just need to read up on how to actually use maven the right way. Thanks.

I wouldn't use Maven, but there are multiple tools that can use Maven repositories that aren't Maven, and I'd recommend one of those. :)
Post reply on HN