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!
Deno 1.14
71–80 of 111 posts
Re: Deno 1.14
#72https://github.com/denoland/deno/discussions/11771 > NodeJS compatibility, what is our high-level strategy, goals, next steps? > Do we see Node and Deno co-existing, or do we want to think of Node as "legacy"? (Note, there was no clear decision on this question, it was just a conversation) > If we could say "you can run your Express server under Deno faster than Node" would that encourage adoption? No clear answer I…
Node is from the days before ES6 and uses a different API. Should just kill it and start fresh. Deno conforms to modern JS standards and is much more pleasant to use in pretty much every way.
Re: Deno 1.14
#73Does anyone know if Deno has undergone a security audit yet? I'm interested in using it as a sandbox to run user-submitted JS, and I know its permission model is powerful, but I don't know if it is formally certified (if that's even a thing) and if you can prove that there can't be some exploit that can be used to break out of the sandbox.
Re: Deno 1.14
#74Earlier quoted context omitted.
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…
Re: Deno 1.14
#75One of the most exciting opportunities IMO that Deno opens up, compared to most traditional server-side frameworks, is the possibility for simple url-based live-reload workflows in production. I'd love to be able to develop backend services by pushing source code to some url as I develop, and then have the production instances of the service notified of the changes and reload themselves immediately for a super-tight…
This is a really old concept with interpreted languages, Capistrano in Ruby came out in 2006 for this sort of workflow: https://en.wikipedia.org/wiki/Capistrano_(software) 10 year old gist for this exact thing: https://gist.github.com/rchampourlier/1281506/a22148264c457ebb69259261f117548569be6bef Same exists in Node, using PM2 process monitor via rsync/ssh: https://pm2.keymetrics.io/docs/usage/deployment/ Run a comma…
IMO the possibility for an air-tight feedback loop is _the_ killer feature for interpreted languages vs compiled ones. I can always feel my productivity plummet whenever I work in an environment that takes that away from me. I wish more people would try to take advantage of it.
Re: Deno 1.14
#76Earlier quoted context omitted.
Off the top of my head it's probably useful for implementing The Singleton Pattern, which reduces to one single instance of a class: https://en.wikipedia.org/wiki/Singleton_pattern
Singletons in JS/TS are done by creating and exporting an instance of a class: class MyClass {} export const myClassSingleton = new MyClass() Static initialization blocks = "Constructors, for static class members/values" Static blocks only run once, like the class declaration itself: class User { constructor(public name: string, public age: number) {} static { console.log("Hello from class User static block") } } con…
Re: Deno 1.14
#77Earlier quoted context omitted.
We tried it for a couple months, it was basically a huge hassle getting our stuff to work especially anything that has bindings to CPP (any of the node gyp packages). Also felt like we were putting in a lot more effort to try to get packages with docs for node to work similarly in deno, and weren’t really feeling any value from using deno over node. If you’re a hobbyist or an academic or starting a totally new projec…
I agree with this entirely. I would absolutely use deno to teach js/ts. I would absolutely use deno in a hobby project. I would absolutely use deno if my requirements were such that I wanted to minimize js dependencies.
Re: Deno 1.14
#78Earlier quoted context omitted.
> 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…
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 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.
Re: Deno 1.14
#79Re: Deno 1.14
#80You get a fairly sane type system, good performance, easy deployment (it doesn't count as easy if it's a pain on Windows), supports single file scripts with third party dependencies, and no compilation to deal with.
There aren't really any alternatives that offer all that as far as I know.