HNHacker News
TopNewBestAskShowJobs

rayman22201

35 karma · joined August 7, 2018

submissionscomments
rayman22201··on Launch HN: CodeCrafters (YC S22) – Practice writing complex software
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.
rayman22201··on How Safe Is Zig?
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

rayman22201··on The Vale Programming Language
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
rayman22201··on Prologue: A web framework written in Nim
This is currently being remedied as we speak:

https://github.com/nim-lang/RFCs/issues/250

https://github.com/nim-lang/Nim/pull/15287

rayman22201··on Nim 1.2
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.

rayman22201··on Nim 1.2
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
rayman22201··on Nim 1.2
This is definitely being worked on (slowly but steadily) and the initial results are very impressive. See: https://mratsim.github.io/Arraymancer/
rayman22201··on Nim 1.2
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.

rayman22201··on Nim 1.2
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".

rayman22201··on Nim 1.2
yup! That is the one :-)
rayman22201··on Nim 1.2
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.

rayman22201··on Nim 1.2
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!
rayman22201··on Nim 1.2
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.

rayman22201··on Nim: Scripting Ease in a Compiled Language
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!)

rayman22201··on Nim 1.0
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.