Readit News logoReadit News
treeform commented on Why Nim?   undefined.pyfy.ch/why-nim... · Posted by u/TheWiggles
treeform · 12 days ago
I feel like Nim made me fall in love with programming again.

Nim fixes many of the issues I had with Python. First, I can now make games with Nim because it’s super fast and easily interfaces with all of the high performance OS and graphics APIs. Second, typos no longer crash in production because the compiler checks everything. If it complies it runs. Finally, refactors are easy, because the compiler practically guides you through them. The cross compiling story is great you can compile to JS on the front end. You can use pytorch and numpy from Nim. You can write CUDA kernels in Nim. It can do everything.

See: https://www.reddit.com/r/RedditEng/comments/yvbt4h/why_i_enj...

treeform commented on Dev Compass – Programming Philosophy Quiz   treeform.github.io/devcom... · Posted by u/todsacerdoti
andai · 12 days ago
I forget who said it, but "I don't truly understand a program until the 6th time I've written it."
treeform · 12 days ago
That's such a good quote. I can't find it anywhere, so I'll attribute it to you.
treeform commented on Dev Compass – Programming Philosophy Quiz   treeform.github.io/devcom... · Posted by u/todsacerdoti
corv · 12 days ago
Seeing Treeform here immediately made me think of Nim, and lo-and behold that's what the Javascript is generated from, cool!
treeform · 12 days ago
Thanks! It's all Nim, all the time.
treeform commented on Svalboard: Datahand Lives   svalboard.com/... · Posted by u/morganvenable
treeform · 2 months ago
I got one recently. It has a learning curve, but it’s been really fun. It’s infinitely customizable like no other keyboard. The magnetic switches feel really good. I feel like I am in a cyberpunk novel when I use it.
treeform commented on Show HN: Double – Design and invest in your own stock index    · Posted by u/jjmaxwell4
treeform · a year ago
If I were to set up a customized S&P500 (with some tweaks) and over time companies leave and/or are added to the index. Will those changes be reflected in my custom S&P500? In the months or years in the future will it buy or sell these new currently unknown companies?
treeform commented on Nim 2.0   nim-lang.org/blog/2023/08... · Posted by u/kindaAnIdiot
FireInsight · 2 years ago
Is pixie capable of realtime usage like in games or generative art? Last time I looked it seemed CPU-only.
treeform · 2 years ago
Not by itself! But together with other library boxy you can: https://github.com/treeform/boxy

You should use pixie to load textures, create text, rasterize vector graphic etc... and send them to boxy to be drawn every frame.

Yes Pixie is CPU only, and just like you can't use Cairo or Skea for real time games you can't use Pixie, but boxy you totally can.

treeform commented on Nim 2.0   nim-lang.org/blog/2023/08... · Posted by u/kindaAnIdiot
pzo · 2 years ago
Had a look a Nim few months ago - feature wise is a lot of I wish Python had (easy interop with C/C++, static typed, compiled, can be transcompiled and executed on android/iOS), but ecosystem is small even though the language is not new. There is not many high quality libraries such a numpy, scipy, pandas, opencv in python. They lack some big player adopting it - it's too bad Unreal Engine didn't try to adopt Nim instead of creating their own new scripting language Verse.

One thing I'm also lucking is out-of-the-box interop with C/C++ libraries without creating own adapters (so that you can just import header and be done with it).

Another thing is I wish it had similar easy interop with Rust - just to increase adoption and also because in Rust easier to find high quality cross-platform crates (including mobile) that work without hassle even on mobile devices.

I worry in few years either Python will catch up (because of faster python, non-GIL, nuitka, briefcase for mobile etc) or Mojo will eat Nim lunch.

treeform · 2 years ago
To be fair to Nim, only Python has the huge ML ecosystem of numpy, scipy, pandas, opencv, pytorch, tensorflow, keres... Doing ML/AI style work in anything but python is really hard!

That said Nim does have the nimpy library that allows for pretty seamless interop with python. Which means you can just import PyTorch, or scipy, or opencv and use them in Nim.

treeform commented on Nim 2.0   nim-lang.org/blog/2023/08... · Posted by u/kindaAnIdiot
janAkali · 2 years ago
Nim's default json library is terrible in performance, but there're much faster drop-in replacements like jsony[1]. I'm not sure that's the main issue for low rank, but it's definitely one of them.

1. https://github.com/treeform/jsony

treeform · 2 years ago
I would not call std/json it "terrible in performance" probably still way faster then what you get in many other languages (like python). But yes the JSON lib I wrote is faster due to avoiding branches and allocations.
treeform commented on Nim 2.0   nim-lang.org/blog/2023/08... · Posted by u/kindaAnIdiot
synergy20 · 2 years ago
nim is a better python(syntax wise) that compiles to c(or c++,js,etc but c is the default) with GC turned on by default. I have always been wanting to use it outside of what my job needs(c/c++/python). I hope some big players adopt Nim to make it one of the mainstream language.
treeform · 2 years ago
Reddit was hiring for Nim positions. So demand is growing. New languages have easier time being adopted at startups which grow into big players eventually.
treeform commented on Nim 2.0   nim-lang.org/blog/2023/08... · Posted by u/kindaAnIdiot
LexiMax · 2 years ago
The last time I used the language, it was still using a garbage-collector and there were talks about transitioning towards a new way of doing things - I assume that ARC/ORC ended up being that destination.

Now that ARC/ORC is considered "complete," are there any remnants of the old GC still in the language, or has the entire ecosystem hopped over?

treeform · 2 years ago
For most of us the move from GC to Orc is pretty transparent. Most libraries just work and don't require any major restructuring.

u/treeform

KarmaCake day1025January 25, 2008
About
http://pushbullet.com

Other projects: http://www.filmgrainapp.com http://www.hipmunk.com http://aff2aw.com http://affuniverse.com

View Original