Live data from Hacker News

Deno Is Webby

blog.jim-nielsen.com

131–140 of 215 posts

Re: Deno Is Webby

#131
post #94

Earlier quoted context omitted.

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.

Alert doesn't lock your browser. The developer can spend a lot of time and effort to make an even more intrusive and annoying custom alert. Why should I as a user have to endure instagram and twitter blocking content with a delayed login prompt that cannot be canceled? Because they can. Browser APIs or not malicious developers will be malicious.

Yes it does. You can't click on the URL bar and just navigate to a different site in chrome while an alert is displayed.

Re: Deno Is Webby

#132
post #4

This is nice, until its not. I have spent a fair amount of time over the last several years trying to make node act like the browser, or vice versa. It's doubly confusing to juniors who don't understand the difference between a language and a runtime. alert() looks like a standard function and should be specified by the ECMAScript Language Specification. But its actually specified by the HTML standard, because its Wi…

[deleted]

Re: Deno Is Webby

#133

Earlier quoted context omitted.

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?"

Why an array with zero element should be false? It doesn't make a lot of sense. And writing if (array.length > 0) is more explicit than writing if (array) anyway. Even in python, I prefer to be explicit and say if len(array) > 0 than to rely on implicit conversion rules.

I'd argue that `if empty_list` is already explicit in Python.

Re: Deno Is Webby

#134
post #4

This is nice, until its not. I have spent a fair amount of time over the last several years trying to make node act like the browser, or vice versa. It's doubly confusing to juniors who don't understand the difference between a language and a runtime. alert() looks like a standard function and should be specified by the ECMAScript Language Specification. But its actually specified by the HTML standard, because its Wi…

> This is nice, until its not.

What things aren't like this?

Re: Deno Is Webby

#135

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 standard library, a proper date/time/timezone implementation, and robust number support (all sizes of integers and for the love of god Decimal). Every time I get excited about Deno and Typescript and all of that, I get so frustrated that 0.1 + 0.2 != 0.3 and that I need to find and vet a community Decimal library.

(I know BigInt is a thing and Temporal is coming.)

Re: Deno Is Webby

#136

Earlier quoted context omitted.

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?"

I always found it strange that in Python, stuff doesn't get implicitly cast to string (even Java does that!), but for whatever reason the idiomatic way to check if a collection is empty is to do "if collection:", implicitly casting to bool.

Nothing gets casted to a bool in Python if statements.

Re: Deno Is Webby

#137

Earlier quoted context omitted.

Alert doesn't lock your browser. The developer can spend a lot of time and effort to make an even more intrusive and annoying custom alert. Why should I as a user have to endure instagram and twitter blocking content with a delayed login prompt that cannot be canceled? Because they can. Browser APIs or not malicious developers will be malicious.

Yes it does. You can't click on the URL bar and just navigate to a different site in chrome while an alert is displayed.

I can.

Re: Deno Is Webby

#138

Earlier quoted context omitted.

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?"

Why an array with zero element should be false? It doesn't make a lot of sense. And writing if (array.length > 0) is more explicit than writing if (array) anyway. Even in python, I prefer to be explicit and say if len(array) > 0 than to rely on implicit conversion rules.

It would be better if Javascript had Array.empty() instead of comparing array length. It would make things even more explicit and more convenient.

Re: Deno Is Webby

#139

Earlier quoted context omitted.

What betamax effect? Didn't it fail since the cartridge design was worse and also held less tape than vhs?

No. It failed because JVC saturated the market with incompatible and inferior VHS before Beta could get there.

My understanding was that Betamax had inferior licensing terms, and that it was Sony’s greed that sunk Betamax.

Re: Deno Is Webby

#140

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 standard library, a proper date/time/timezone implementation, and robust number support (all sizes of integers and for the love of god Decimal). Every time I get excited about Deno and Typescript and all of that, I get so frustrated that 0.1 + 0.2 != 0.3 and that I need to find and vet a community Decimal library. (I know BigInt is a thing and Temporal is coming.)

I agree a standard library for JS would be great, but .1 + .2 != .3 is the case in several languages and is not anything to do with JS.

This also is or can be the case in C, C++, Clojure, Python, and many other languages [1].

[1] https://0.30000000000000004.com

Post reply on HN