News for hackers. Stuff that matters.

rayman22201

I was pleasantly surprised to see support for Nim as a task language! very cool! Particularly considering your target market of developers with corporate education budgets, I expected a much smaller set of mainstream languages.
Re:How Safe Is Zig? on Tuesday March 23, 2021 @12:31PM (#26556915)
This is a response to both you and the grandfather comment.

Nim now has ARC/ORC, which is a reference counting scheme similar to Swift. This is not a "generational GC" like Java, Go, or D.

The entire standard library and most average libraries, "just work" with it, and it will be the default near future.

https://nim-lang.org/blog/2020/12/08/introducing-orc.html

Re:The Vale Programming Language on Friday November 20, 2020 @05:14PM (#25165714)
Nim tried regions based memory management and ended up going a different direction. The feature still exists, but the core devs ended up considering it a bit of a dead end: https://forum.nim-lang.org/t/6930
Re:Prologue: A web framework written in Nim on Wednesday October 21, 2020 @01:21PM (#24849977)
Re:Nim 1.2 on Saturday April 04, 2020 @03:16PM (#22780710)
As I said in another comment, the familiar python like syntax, while having the potential for much better performance.

Many data scientists are familiar with Python. They can write similar code and will run much faster by default (or with very little tweaking).

Then, if that's not fast enough, The language is positioned such that you can optimize the code to a much higher degree than you can with Python.

I'm not saying that Python code can't be optimized, but there is a limit to the speed of python code even with optimization. At some point you have to drop down to a C extension (what Numpy, Pandas, etc... does) and then you are just writing glue code in Python to drive the C. You could also use one of the Python optimized compilers, but that has limits and edge cases as well. There is "developer friction" there.

In Nim you can just have the whole program in one language. The program can be optimized to the same level as optimized C code with no special tools. This is much less friction.

What's missing is the libraries. But that will come with time.

Re:Nim 1.2 on Saturday April 04, 2020 @03:07PM (#22780649)
Did you see the parent comments about the new -gc:arc? It's suitable for hard real time. https://www.youtube.com/watch?v=yA32Wxl59wo
Re:Nim 1.2 on Saturday April 04, 2020 @01:17AM (#22776346)
This is definitely being worked on (slowly but steadily) and the initial results are very impressive. See: https://mratsim.github.io/Arraymancer/
Re:Nim 1.2 on Friday April 03, 2020 @05:42PM (#22774209)
The major features are: Python like syntax, Lisp like macro system, potential for C like performance (YMMV of course).

This is my person opinion here: Nim is part of the "new generation of system programming languages" from the last decade or so. Some other examples in this category include Zig, D lang, Go lang, Swift, Rust, etc...

The whole idea is to provide "modern high level" language features and ergonomics while still producing efficient low level code.

For Pythonistas, The familiar syntax is attractive to Python programmers looking for a more performant language (data science is a prime example.)

Nim is also attractive to lispers looking to move to a more traditional Algol or C like language while still keeping much of power and flexibility that they are used to from macros.

Re:Nim 1.2 on Friday April 03, 2020 @02:43PM (#22772708)
Depends on your organization more than tooling. Even if you have the tool, your orgs security policy may not allow using it.

You may not have an environment that allows switching compiler versions for other reasons.

Even Rust has a similar concept that allows gating of features like this. They call it "editions".

Re:Nim 1.2 on Friday April 03, 2020 @02:35PM (#22772615)
yup! That is the one :-)
Re:Nim 1.2 on Friday April 03, 2020 @02:33PM (#22772588)
choosenim is still supported :-)

The idea is more like the gcc -std flag (gcc -std=gnu++11 for example). to emulate certain versions to ease upgrading.

Re:Nim 1.2 on Friday April 03, 2020 @01:53PM (#22772155)
I would say gc:arc beta quality. Very usable for many programs, but needs more battle hardening. Please try it and send bug reports if you find them! That's how we improve!
Re:Nim 1.2 on Friday April 03, 2020 @01:47PM (#22772100)
As others have said, Nim has plugabble garbage collectors, some are quite advanced.

In addition there is active work on a swift like reference counting, lifetime based memory management option. This will be suitable for hard real-time use cases.

Re:Nim: Scripting Ease in a Compiled Language on Tuesday October 29, 2019 @08:56PM (#21393667)
Have you checked the latest documentation recently? There has been some really good work in the past few months to improve all these areas.

What doc issues are the biggest pain points for you right now?

(Getting good error messages for macros and meta-programming is notoriously hard, but we are trying!)

Re:Nim 1.0 on Tuesday September 24, 2019 @01:54PM (#21062846)
Audio programming in Nim is completely possible and reasonable.

Here is an example of a super collider plugin written entirely in Nim with the GC turned off: https://forum.nim-lang.org/t/3625

The author seemed to find the experience very pleasant, and the performance was great.