Live data from Hacker News

Deno Is Webby

blog.jim-nielsen.com

171–180 of 215 posts

Re: Deno Is Webby

#171
post #15

Earlier quoted context omitted.

Everything supports padStart natively, for almost half a decade by now.

I'm referring to the left-pad package on npm that infamously ignited a huge controversy years ago and started some of the cracks in the entire ecosystem that are growing larger and larger today. For more context: https://qz.com/646467/how-one-programmer-broke-the-internet-...

Point is, Deno is doing a lot to bring feature parity with expected Web APIs (which are not part of JavaScript the language yet), and they are building a single export standard library, but padStart is not part of their (direct) actions.

Re: Deno Is Webby

#172
post #94

Earlier quoted context omitted.

Removing alert is nonsense, and I don't think they will ever do (without breaking a ton of websites that use it). Why as a developer should I have to make a modal with HTML+CSS+JS to show it to just have a prompt that inform the user about something? Ok, alert is ugly, but for a lot of situations (= industrial software) it's perfectly acceptable.

Why as a user should I have to endure a website with an intrusive user of alert? I don't care what happens to websites that use alert, I never want to see my browser get locked up because of lazy devs wanting to use alerts.

Some devs want to use the native UI, but this isn’t okay either apparently. So are you advocating that every dev should implement their own alert modal?

Re: Deno Is Webby

#173

Earlier quoted context omitted.

> import ' https://cdn.jsdelivr.net/npm/marked@3.0.7/marked.min.js '; Doesn't this mean your code won't run if the website https://cdn.jsdelivr.net goes down? In Node.js you download modules you need, to a local folder under you dev-folder. So you can run and develop and test your code whether you have internet connection or not.

Well... CDNs aren't supposed to go down, but if they do suffer an outage, Deno caches dependencies locally. If that's still not enough, you can also just download the JS file and import from a local path or use the vendoring feature.

Not sure that “CDNs aren’t supposed to go down” is a very reassuring point, nor one that Deno’s authors would make in its defence.

Deno’s vendoring approach isn’t like a stopgap in case third party servers go down. It’s the ’right’ way in Deno, and is another brilliant fix to Node’s approach.

Node always makes you go through a formal step to install a dependency - and then you’re still reliant on npm’s CDN being online during your builds anyway. The only way to break that build time dependency is to use a clunky, nonstandard hack to check in your node_modules, like yarn 2.0 or pnpm, which then takes you right off Node’s “golden path” (such as it is) and creates loads of incompatibilities.

Deno’s approach is the best of both worlds.

1. With Deno you can import direct from a URL with no formal install step, which is great for prototyping. The caching engine makes it fast without a need for every little toy project to have to have a giant node_modules folder.

2. Vendoring your scripts provides a dead easy, golden-path way to make your project completely non-dependent on third party during build, ie gives you same advantage as using Yarn 2 or pnpm in Node, but as a first class citizen of the runtime, so it’s efficient and standardised and will therefore not have tons of ecosystem incompatibilities.

Re: Deno Is Webby

#174

Deno is a joy to use server-side. Though as soon as it's used in conjunction with even something simple like minified code, you're forced back to node/npm.

If you want to bundle and minify JavaScript code, you can use esbuild:

  import * as esbuild from "https://deno.land/x/esbuild@v0.14.25/mod.js";
If you want to bundle and minify SCSS, you can use dart-sass:

  import { useDartSass } from "https://raw.githubusercontent.com/MarkTiedemann/deno-dart-sass/0.1.0/mod.ts";

Re: Deno Is Webby

#175
One thing I have never understood about Deno is that how are you supposed to run it on a multicore machine? Since they don't have cluster module like in node there is no way to run one process for each core? If the main thread is busy running some cpu intensive task, it will then block the entire application from answering other requests.

I get that in serverless environments like in Deno deploy each instance gets one core etc but if you're running it on a VPS or just on a normal server I would want something like the cluster module like in node.

Re: Deno Is Webby

#176
post #107

Deno is a joy to use server-side. Though as soon as it's used in conjunction with even something simple like minified code, you're forced back to node/npm.

How are you using Deno with minified code? Do you mean importing a minified script like https://cdn.jsdelivr.net/npm/react/cjs/react.production.min.... ?

I meant bundling your code for production.

Re: Deno Is Webby

#177

Earlier quoted context omitted.

This has also unfortunately been my experience, even when working with developers that have several years of experience writing JS. There seems to be a big gap in knowledge when it comes to boundaries between the language specification, runtimes, and innate abilities. People consistently confused about why they can't use JSX without a build-step, not understanding that JSX isn't "real", why doesn't fetch() work in No…

speaking of next.js, it's always fun to watch web tech come full circle back to "maybe we should render this stuff before we send the bits, since servers and CDNs are real real good at sending bits real real fast, instead of making everyone render the same static stuff a billion times per day client-side". https://en.wikipedia.org/wiki/Movable_Type was generating static blogs back in 2001, and that's still a great id…

The javascript community is starting to move away from that now to just using server side rendering (with hydration). Static site generation works fine on smaller websites but gets really slow as the site grows.

Re: Deno Is Webby

#178

I do wonder about a future where JavaScript gets non-enforced optional type annotation syntax[1] which is and if said syntax will be slightly incompatible with TypeScript. That would be a little awkward for Deno, wouldn’t it. However I hope that if JS gets type annotation syntax that it would be a strict subset of TypeScript—or at the very least future compatible—for this very reason. 1. https://github.com/giltayar/p…

Whatever the final syntax will be, if it is part of the JS standard, Typescript will probably adopt it at some point.

(And its team will try to push the standard towards being as close to the current Typescript as possible)

Re: Deno Is Webby

#180

I cannot help but root for Deno whenever it features on here. It offers such a wonderful potential future for JavaScript. It's not fully-baked yet, but man, it solves so many problems in one fell swoop.

[deleted]
Post reply on HN