Live data from Hacker News

Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

github.com

21–30 of 71 posts

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#21
post #4
post #2

I use nvm currently. Can I ask how this compares to nvm, perhaps issues with nvm that it tackles? Is it performance? :o

Hey! fnm is a very simple and (very) fast node version manager. On my machine, `nvm init`/`nvm use` takes around 600ms - this means each time you spawn a new shell you have a ~600ms penalty. The gif on the README is real time (it's a screen recording) - so installations are fast, and every command that works locally is extremely fast. So, tl;dr, fnm is built with performance in mind

Thanks! Perhaps a caption noting this would improve the pitch :)

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#23
post #2

I use nvm currently. Can I ask how this compares to nvm, perhaps issues with nvm that it tackles? Is it performance? :o

The problem I have with nvm is speed (running it at shell startup introduces a very noticeable delay), and integration with other shells - it's always been a pain to get it running with fish.

I currently have this problem on my zsh setup - is there any easy fix for it?

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#24
post #9

Wait, I assumed this will be a js-app, but it actually is a executable binary? Is that the courtesy of https://github.com/jordwalke/pesy ? For some time I wanted to try ReasonML for server-side development, but for some reason I assumed, that most of the ecosystem would be node.js based.

Hi I'm Jordan and I work on Reason.

pesy is just a utility I made to help people create new native Reason projects (like fnm) quickly and easily. It's fun.

fnm is a native Reason app. We haven't advertised much of Reason's (OCaml's) native capabilities because we wanted to make sure we've built out a lot of the tooling that makes native development easy - for example https://esy.sh. Now that a lot of this native tooling is becoming polished, I hope you'll probably start seeing more projects like fnm.

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#25

Earlier quoted context omitted.

The problem I have with nvm is speed (running it at shell startup introduces a very noticeable delay), and integration with other shells - it's always been a pain to get it running with fish.

I currently have this problem on my zsh setup - is there any easy fix for it?

idk about zsh, but for fish there is https://github.com/FabioAntunes/fish-nvm which delays executing nvm until you use one of the node binaries. Essentially, node is aliased to `nvm activate && node`

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#26

Great work, but you'd have to pry asdf out of my cold, dead hands. https://github.com/asdf-vm/asdf

I have to read the README twice to see what is it about. What is extensible version manager? Managing what exactly. So I guess it's the reason asdf is not popular

It replaces gvm/rbenv/pyenv/nvm/etc. with a single CLI. Saves you from having to use multiple shell completion scripts, bashrc entries and CLIs. Useful if you work with multiple dev languages on your computer.

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#27
post #12

How did you create the .svg terminal animation?

Looks like he used this: https://github.com/marionebl/svg-term-cli edit: yep, see here: https://github.com/Schniz/fnm/blob/8cb998759ef969685d711eb42...

yes! such a wonderful library. I've taken the ideas from `create-react-app` :)

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#28

Great work, but you'd have to pry asdf out of my cold, dead hands. https://github.com/asdf-vm/asdf

I used nvm for years, but my development workflow became more and more terminal-oriented to the point I was spawning new ones several times an hour. Nvm took almost a second to launch, easily consuming 99% of the startup time for each shell. I tried writing some custom code to lazy load nvm only when I needed it which worked alright, but I ended up switching to Asdf because it loads almost instantaneously and haven’t looked back. The fact that it supports managing multiple different tools is a nice bonus, but I really only use it for node.

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#29
post #9

Wait, I assumed this will be a js-app, but it actually is a executable binary? Is that the courtesy of https://github.com/jordwalke/pesy ? For some time I wanted to try ReasonML for server-side development, but for some reason I assumed, that most of the ecosystem would be node.js based.

Hi I'm Jordan and I work on Reason. pesy is just a utility I made to help people create new native Reason projects (like fnm) quickly and easily. It's fun. fnm is a native Reason app. We haven't advertised much of Reason's (OCaml's) native capabilities because we wanted to make sure we've built out a lot of the tooling that makes native development easy - for example https://esy.sh . Now that a lot of this native too…

Awesome!

I looked at Reason several months ago and my impression was, that if you want to do frontend stuff with bucklescript, you are one git-pull and npm install from a working scaffold, but if you want Reason with ocaml for native stuff, you would mostly be scaffolding yourself.

I am really glad I was mistaken :)

Re: Show HN: Fnm – Fast and simple Node.js version manager built in ReasonML

#30
post #22

Great work, but you'd have to pry asdf out of my cold, dead hands. https://github.com/asdf-vm/asdf

It worked rather badly with Haskell last time I checked (Darwin, Fish shell).

To be fair, the entire Haskell tool chain is finicky as heck in my experience.
Post reply on HN