HNHacker News
TopNewBestAskShowJobs

treeform

1,054 karma · joined January 25, 2008

http://pushbullet.com

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

submissionscomments
treeform··on Ray Tracing in Nim
What I like about Nim is that you can always get C performance if you just spend a little time. You can always use a profiler you like (I use vTune) to get to the hot loops and fix them.

See my post here: https://forum.nim-lang.org/t/5363#33576

treeform··on NimConf 2020 Videos
The talk about the new garbage collector by the Nim's creator Andreas Rumpf, is a must watch: https://www.youtube.com/watch?v=aUJcYTnPWCg&list=PLxLdEZg8DR...
treeform··on NimConf 2020 schedule released – starts tomorrow
This is going to be great!
treeform··on NimConf 2020 – Online Nim conference
The schedule is live now. https://conf.nim-lang.org/
treeform··on Libschrift: A lightweight TrueType font rendering library
When writing my own font library I found CJK a bit harder but not impossible. Reading all CJK letters and rasterizing them takes like a GB of memory and many seconds.

So what I do is don't parse the font file fully, but store the location where litters live memory and only parse and render them when they are needed. Most CJK letters are never needed.

I don't have good support Arabic and Hebrew, they feel harder.

treeform··on Nimporter 1.0 released (seamlessly import Nim code from Python)
Nim is the ultimate glue language. JS, python, c, c++, obj-c, even glsl... It's cool.
treeform··on Nim 1.2
Neat project!
treeform··on Nim 1.2
I feel DSL-ish ways of Nim are so much more advanced then python.

I have written UI DSLs in Nim, as well as SQL DSLs. Only LISPy languages come close to the level of DSL you can do.

treeform··on Nim 1.2
Mutating in place is often times faster and is more straightforward.

I do feel Nim embraces mutation more than other recent languages.

treeform··on Nim 1.2
I would still try out --gc:arc on your programs. For mine it just runs without issue. But keep in mind if you do have issues you might have to create a bug report and wait for a fix. You would not reply on --gc:arc working. But it's fun to play around with. It's real now.
treeform··on Nim 1.2
I feel like dark mode is a sign that people care. I think it's a user feature that is easy to do, but not done often. Mostly done by people who care. It brings so much polish to the experience.
treeform··on Nim vs. Crystal
Yes.

You can even use numpy in nim: https://forum.nim-lang.org/t/4102

But why use that when you can use Cuda and OpenCL accelerated vector math: https://github.com/mratsim/Arraymancer

If thats too much speed, you can just roll your own for loops. Because Nim is compiled with battle tested GCC, LLVM or VC++ it will try to SSE optimize your code if you pass the right switches. If you know what CPU your computer/server has you can compile with newest brand of high performance instructions like AVX2, or even the newest AVX512VNNI...

treeform··on Nim vs. Crystal
If you are interested ins speed, here is a huge list of similar benchmarks: https://github.com/kostya/benchmarks
treeform··on Nim vs. Crystal
I found that I can always optimize stuff in nim to be near C speed - without doing anything crazy non-nim like.

Stuff that is there might not be optimized yet. I hope as more people comb over the libraries we all get a boost here and there.

treeform··on Lots of bugs in 32-bit x86 Linux entry code
Your comment should be the top comment. I had no clue i386 and x86_32 where different. I though the article was saying 32bit linux is broken.... but no some strange "alternative" mode on linux is broken.... who cares.
treeform··on Nim: Scripting Ease in a Compiled Language
Then you are writing or auto generating these giant 1000s of lines long files with renames... why?
treeform··on Nim: Scripting Ease in a Compiled Language
Sharing code between Desktop and Mobile still a bit rough. I have done some experiments and it looks promising: https://forum.nim-lang.org/t/5197

Does not appear to be any harder then sharing C or C++ libraries.

treeform··on Nim: Scripting Ease in a Compiled Language
Main reason for this feature is that Nim is big as a glue language. Many C/C++ libraries don't have consistent naming conventions between them. I don't want my code to look like a patch work of `__APICALL__(system_call.inspectSomething())` I just want it to look like Nim code: `apiCall(systemCall.inspectSomething())`. This is just a consistent standard on how to turn names in one style into another style backed into a language.
treeform··on Nim: Scripting Ease in a Compiled Language
yes
treeform··on Nim: Scripting Ease in a Compiled Language
I use Nim in production. I been using it for more than 1 year in production.

I like it. For me, it started out as a faster python that prevents typos. But it has really grown on me. I really like that I can share libs on server (compiling to c) and client side (compiling to plain javascript).

Basically any C library is also a Nim library with a tiny wrapper. That's a huge ecosystem! I also like how Nim can integrate with complex C++ libs that do virtual table call backs. It can also call objective-C functions .. you know the ones with [foo a:1 b:1] crazy syntax? Python was a glue language for me, but Nim can just glue more things.

JS too! In Nim you can just compile to plain JS, that other JS can call as well. Pass plain JS objects around. I basically replaced my JS code file by file - there was no need for a huge rewrite.

I know docker and kubernetes is "the thing" right now, but I just like that I can just scp the binary over. It just feels less complex. I feel like docker solved the distribution problem for python and node... I just don't have a problem to solve any more. It's just gone.

treeform··on Programming Idioms
I was going to fill in the nim stuff, but:

Sorry, [nim] is currently not a supported language.

treeform··on Nim 1.0
To me Nim is a faster python that prevents typos. It can also compile to javascript.

I used it where I would use python - backend of web apps. But now instead running a cluster of servers I can just run 1 because nim is fast.

I also used to write frontend in CoffeeScript, but switched to nim because I can share code between backend and frontend. I don't have typos. I don't inherit any JS or OOP legacy like TypeScript.

treeform··on Nim 1.0
I think it does set the built-in types apart for being built it. Also tradition?
treeform··on Nim 1.0
I don't think the owned reference part will change the language drastically. For people that want to write kernels, games or real time code it would be great. Nim's GC is super configurable already. Yeah owned reference would be better but its already pretty good.
treeform··on Nim 1.0
see also change-log: https://github.com/nim-lang/Nim/blob/5b43c98897ee7eb9f8ded8c...
treeform··on Nim 0.20.0 (1.0 RC1) released
Huge ecosystem also have issues. Your are tempted to use a library when a simple 100 line "replacement" that just does what you want will do.

I think the biggest problem in programming we have right now is people using libraries upon libraries not knowing how they work and drowning in complexity.

Huge ecosystems are almost like bureaucracies that eat productivity in their wake. They fool you into thinking they add value when instead they take it away.

treeform··on Nim 0.20.0 (1.0 RC1) released
This is what it is for me:

  Objective-C -> Nim (can compile to ObjC, calls methods directly without overhead)
  Python -> Nim (Nim is a super fast python that prevents typos)
  Ruby -> Nim (Nim is better in every-way)
  JavaScript -> Nim (compiles to plain JS (if you need talk to legacy JS libs like most people) or WASM (if you just want speed))
  C/C++ -> Nim (Can compile to C++, calls methods directly without overhead)
Basically...
treeform··on Nim 0.20.0 (1.0 RC1) released
Nim is a super fast python that also prevents typos.

I use nim everyday. 98% of my programming is in nim only. I highly recommend nim. During the day I work mostly on internal tools and dashboards, during the night I work on games. Nim compiles to JS and C. Its really good.

treeform··on Elementary OS – Fast, open, privacy-respecting replacement for Windows and macOS
That is like the first thing I saw too. I was not fooled. But maybe this system works better then a free + donate button. Only data can tell... Maybe people are donating more with this system?
treeform··on Nim 0.19
I want to use the func keword more. I think many of my procs can be funcs instead. In my programs i like having a simple imperative middle, but fuctional no side effects edges.
← PreviousPage 3 of 6Next →