Live data from Hacker News

Deno Is Webby

blog.jim-nielsen.com

21–30 of 215 posts

Re: Deno Is Webby

#21

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.

It's so good I worry about the Betamax effect

Re: Deno Is Webby

#22

One of the things I love about Deno is that since it implements standard web APIs, many libraries built for the browser just work. For example, I recently made a simple static site generator with Deno to make my blog, and I found that I could use Marked for markdown support simply by importing it like this: import 'https://cdn.jsdelivr.net/npm/marked@3.0.7/marked.min.js'; // now I can use window.marked()

One of the many things about Node that Dahl explicitly wanted to "fix"* when building Deno was that the global namespace should be `window`, because that's what it is in JavaScript's natural habitat. *scare-quotes because the reader might feel strongly opposed to the term, not because I have an agenda

> that the global namespace should be `window`, because that's what it is in JavaScript's natural habitat.

Oh wow, I had no idea. That rules!

Re: Deno Is Webby

#23
Whenever someone has asked me "what would you change about Javascript" for the last 15 years, my answer has usually been "it badly needs a standard library."

The standards committees have partly advanced that and Deno is following those leads, but I've got my fingers crossed that Deno will also fill in gaps (and those will make their way back into standards committee considerations).

(My other answers have been more ... controversial, like: make [] false-y, add macros, and bring back `with`!)

Re: Deno Is Webby

#24
post #14

Earlier quoted context omitted.

Sorry but padStart/padEnd are part of EcmaScript 2019 (or near that year). Deno did not implement it. (AFAIK)

Both are implemented in deno per MDN’s compatibility table.

Deno does not have its own javascript implementation, it uses the V8 javascript engine, and V8 happens to implement padStart and padEnd.

V8 was originally created as the javascript engine for Chrome, but it is used in many products now, including Node.js and Deno: https://v8.dev/

Re: Deno Is Webby

#25

Whenever someone has asked me "what would you change about Javascript" for the last 15 years, my answer has usually been "it badly needs a standard library." The standards committees have partly advanced that and Deno is following those leads, but I've got my fingers crossed that Deno will also fill in gaps (and those will make their way back into standards committee considerations). (My other answers have been more…

A couple of questions:

  “Make [] false-y”
Why?

  “Add macros”
Why? How?

  “Bring back `with`”
Why?

Re: Deno Is Webby

#26
post #5

> You Might Not Need NPM If it's like every other JavaScript project I've been on since 2016, it's going to actually require thousands of JavaScript packages and doing everything with it is going to be slow as molasses even on high-end developer workstations.

I think the problem was/is a generation of inexperienced developers who were brought up on importing packages for padding a number. Thing that always struck me was how easy and free it was to publish.

Kinda fun to imagine a packaging system where you have to pay a very small crypto fee to publish. I'd bet less packages but more useful stuff on the whole.

Re: Deno Is Webby

#27

Whenever someone has asked me "what would you change about Javascript" for the last 15 years, my answer has usually been "it badly needs a standard library." The standards committees have partly advanced that and Deno is following those leads, but I've got my fingers crossed that Deno will also fill in gaps (and those will make their way back into standards committee considerations). (My other answers have been more…

Gonna guess you're a lisper ;)

Definitely it's biggest warts are around core data types - mainly the implicit-casting rules - but those are also impossible to change at this point. "Don't break the web" and all that.

Re: Deno Is Webby

#28
post #22

Earlier quoted context omitted.

One of the many things about Node that Dahl explicitly wanted to "fix"* when building Deno was that the global namespace should be `window`, because that's what it is in JavaScript's natural habitat. *scare-quotes because the reader might feel strongly opposed to the term, not because I have an agenda

> that the global namespace should be `window`, because that's what it is in JavaScript's natural habitat. Oh wow, I had no idea. That rules!

ecmascript now has both `globalThis` and `self` that can act as global namespace (they all point to the same object except in workers as window and globalThis cannot be used in workers)

Re: Deno Is Webby

#29

Whenever someone has asked me "what would you change about Javascript" for the last 15 years, my answer has usually been "it badly needs a standard library." The standards committees have partly advanced that and Deno is following those leads, but I've got my fingers crossed that Deno will also fill in gaps (and those will make their way back into standards committee considerations). (My other answers have been more…

A couple of questions: “Make [] false-y” Why? “Add macros” Why? How? “Bring back `with`” Why?

Not GP, but I really like [] being false in ruby and python because I often want to ask "is this variable that should hold a collection holding a collection of things, or is it empty/false?"

Re: Deno Is Webby

#30

> You can log and style CLI output the same way you do it in the browser’s developer tools: using what you know with console.log > console.log("%cHello World", "color: red"); TIL, neat! If anyone else did too - https://developer.mozilla.org/en-US/docs/Web/API/console#sty... looks great Using alert/confirm/prompt for CLI tools is nice too, makes a lot of sense to build that in and use the web APIs for it.

Take a look at the developer console when visiting www.facebook.com
Post reply on HN