Live data from Hacker News

Things I Regret About Node.js [video]

youtube.com

421–430 of 502 posts

Re: Things I Regret About Node.js [video]

#421
post #416
post #358

Earlier quoted context omitted.

* Much-beloved Ubuntu Just leaving it here, given Azure Sphere and WSL.

Nitpick, but Azure Sphere doesn't use Ubuntu.

True, it runs Microsoft's own distribution highly customized for the security context of Sphere.

My suggestion is just the distribution I would expect Microsoft to acquire, if they would decide to go shopping instead of pursuing their own.

Re: Things I Regret About Node.js [video]

#422

Why would deno implement “download on first encounter” for its module system ...? Would you ever want this vs an explicit “build” step that downloaded all the required resources ahead of time ...? Does deno walk the program source and download everything that could be required upfront or do the resource loading on demand as it’s executed ...?

I think it would be a real shame if the module system design made it impossible to statically enumerate all the module's reachable from a program entry-point without executing the program ...

Re: Things I Regret About Node.js [video]

#423

Earlier quoted context omitted.

Yes Typescript (also from Microsoft) is fascinating and fantastic at combining the strengths of static typing while still maintaining all the flexibility of dynamic types if necessary, however it's pretty much the only realistic non-academic of such a thing, so basically everything else is pales in comparison if that's what you're looking for. Why is C# not expressive? It has the DLR and `dynamic` keyword which behav…

Dynamic doesn't behave the same as JS typing, you're still using CLR object model and typing rules, you're just losing compile time checks - it gets complicated really fast if you want to do meta programming even with DLR and it's not really ergonomic in C# (like casting/boxing primitive types, etc.) Think about AutoMapper and then compare it to a TS solution using spread operator. How much boilerplate automapper cra…

This sounds like a personal preference for dynamic vs strongly typed.

I could rewrite your entire comment in reverse about how I find C# highly expressive and readable while dynamic languages or Kotlin (blech) are a mess of inconsistent whack-a-doodle experimentation.

But my opinion is useless.

The value in any platform is productivity and if any given team can be productive, it doesn't matter if it's COBOL, RPG-3, Pascal, BASIC, or a functional language like F# or plain old JavaScript.

Re: Things I Regret About Node.js [video]

#424

Earlier quoted context omitted.

I'm on the Dart team (but I don't speak for the entire team here). Dart had two initial goals: 1. Get a native Dart VM into Chrome and eventually other browsers. 2. Get a significant number of client-side web developers that were using JavaScript to move to Dart. It's probably not obvious, but these goals are in tension with each other. In order to motivate adding a giant new VM to a browser, you need to make the lan…

Thanks for your work on Dart. Does your team plan to release any solution like Flutter for native Desktop GUI apps?

It's not an official Google project, but there is a lot of activity here: https://github.com/google/flutter-desktop-embedding

Re: Things I Regret About Node.js [video]

#425
post #274

Earlier quoted context omitted.

How do you break the loop?

Refactor and trim the bloat on the basic libraries, but have a policy where bulletproof automated source rewriting tools are provided in those cases. Perhaps this isn't possible with Javascript, but it might be possible with other languages.

If you think anyone has "bulletproof automated source rewriting tools" I've got a bridge to sell you.

Re: Things I Regret About Node.js [video]

#426
post #395

Earlier quoted context omitted.

I'd say your intel is far out of date. Async-everything + async/await makes Node more elegant than the same programs in Ruby/Python. Even little things like "make these two database requests in parallel and wait on them both" or "process these urls but only have 8 requests in flight at a time."

> "process these urls but only have 8 requests in flight at a time." What's the state of the art solution to this in node.js?

    const results = await Promise.map(urls, url => process(url), { concurrency: 8 })
You can find a "map with concurrency limit" implementation in Bluebird (shown) or standalone on NPM.

For example, off the top of my head this would probably take me 40 lines of ungeneral wait group code in Go.

Re: Things I Regret About Node.js [video]

#427

It's nice to see some recognition of the idea that interpreters are safe by default (excluding infinite loops/OOM), and we can avoid many security concerns (access to files/network/etc.) by simply not including that functionality in the interpreter (unless opted in via a startup parameter, as described). I'm also a fan of using env vars for configuration and locating dependencies, as mentioned in the talk. Much simpl…

> I'm also a fan of using env vars for configuration and locating dependencies

O please just let things be configured by a single JSON value, built from smaller JSON values if necessary.

Re: Things I Regret About Node.js [video]

#428

Earlier quoted context omitted.

Is it synchronous? Does it follow redirects? What happens in a 404 situation? Does it obey cache headers? What happens when a timeout occurs or the resource isn’t code? What happens with recursive dependencies and other edge cases as a result of not knowing the dependency tree until runtime? What about error handling and recovering from these failures at runtime or compile time? Should all resources be secure? How do…

Doesn't Go use URLs? How did they solve all these issues?

It doesn't, it uses $GOPATH. The packages are downloaded using `go get` in a directory structure that mimics the full url: ./github.com/user/repository/...

Re: Things I Regret About Node.js [video]

#429

Earlier quoted context omitted.

I'm on the Dart team (but I don't speak for the entire team here). Dart had two initial goals: 1. Get a native Dart VM into Chrome and eventually other browsers. 2. Get a significant number of client-side web developers that were using JavaScript to move to Dart. It's probably not obvious, but these goals are in tension with each other. In order to motivate adding a giant new VM to a browser, you need to make the lan…

> 1. Get a native Dart VM into Chrome and eventually other browsers. > 2. Get a significant number of client-side web developers that were using JavaScript to move to Dart. > The Dart leads prioritized (1) over (2). ... That didn't work out, unfortunately. That's what I remember hearing when Dart was just getting off the ground. So what happened? Script tags can specify text/javascript or text/dart. Did the the Chrom…

They released an experimental version of Chrome called Dartium that included the Dart VM.

Re: Things I Regret About Node.js [video]

#430

Earlier quoted context omitted.

That seems highly unlikely. I'm going off of what I've seen myself, and what I've seen in the xi editor: https://github.com/google/xi-editor "The protocol for front-end / back-end communication, as well as between the back-end and plug-ins, is based on simple JSON messages. I considered binary formats, but the actual improvement in performance would be completely in the noise. Using JSON considerably lowers friction…

Does the xi editor use a JSON transport layer for all syscalls though? Low-friction interfaces for developers are great but I'm not sure I agree with the comparison here.

Yes, it does. The frontend and the backend only speak JSON.
Post reply on HN