I tried out Deno last weekend for a fun little hack project (syncing a local Markdown file to a formatted Google Doc), and it was awesome.
Writing TypeScript code for Deno feels a lot like writing Go (which is a very good thing to me):
- opinionated build/fmt/deps
- well-designed stdlib
- no need for scaffolding files (.eslintrc, babel.config.js, jest.config.js, mocha.opts, etc.)
If that sounds good to you, try Deno!
I also tried it out recently, because I wanted to make a small utility for myself and liked the idea of it providing a single executable (and bypassing the node/NPM ecosystem for learning a JS/TS based system appealed to me). It delivered on that beautifully, as all I did is switch from running "deno run" as I was for testing to "deno compile" and it delivered to me exactly what I was looking for. A bit large at 57 MB but that's not too bad for a fully bundled JS runtime and no library dependencies except glibc that I could see.
As someone that's barely touched node for dev and always been put off by NPM and how that works (and the heavy build chain for some stuff), I find it much more palatable.
That's interesting.
57mb is big, but not an issue when it's for personal use.
Somewhat related, I haven't used rust, but I read that it can produce an executable including the run time for edge that is less than 1mb,. I couldn't find the source, but this article shares how an extension was reduced from 12mb to 4.5mb.
> 57mb is big
Honestly, I think most the time you're looking at 10MB+ for interpreted languages that are turned into executables (through a bundling of the runtime and scripts, that is, not through compiling to something else which is likely much smaller if offered).
The complexity and size of the runtime is going to necessarily influence that size. V8 is fairly complex compared to most runtimes I think, with the JVM and maybe Mono being notable exceptions, and if you were to bundle the JVM with an app instead of just expecting them to have it installed, I imagine that would be quite large as well.
> Somewhat related, I haven't used rust, but I read that it can produce an executable including
That's actually the other thing I wanted to do with the project I built in Deno. Since it was very simple, but actually useful for me, I was also going to implement it in Rust. I've played with it a few times over the years, but never really had anything real that needed to be built in it, so this seemed like a good chance to build something real in it.
In case anyone is wondering because I mentioned it twice, the project is just reading an ini file which defines browsers, pattern matches to apply to URLs to determine which browser to load based on the URL, and a default browser. The idea being that I can send work URLs to the browser I dedicate to work that's proxied through a SOCKS connection, and other URLs get handled automatically by the browser I use for personal stuff, and I can just make the application my default URL handler. Dead simple, but very useful for my current workflow.
If you happen to be on mac, there's an app called finicky that does this. It can also pattern match on source application which is pretty handy.
I'm not, but that's nice. Pattern matching on the source application is actually what I would have preferred (and what I kept looking to see if anything on Windows could provide), but never found anything. Matching on the URL actually works well enough though, which I know because my prior workflow was just a work container tab in Firefox with the Container Proxy extension to proxy only those tabs in that container, and work URLs were set to prefer that Firefox container.
I was actually fairly happy with that, but it's nice to just be able to close the chrome instance with all the work tabs at the end of the day and have them all reopen when I start it up the next day, and all my work tabs are self contained and proxied through work. The only downside is I can't just click to open in Teams or Outlook, and need to copy the link and manually open it in Chrome, which is what I was aiming to fix.