News for hackers. Stuff that matters.
Re:Interview with Ryan Dahl, Creator of Node.js by s_kilk on Thursday August 31, 2017 @12:09PM (#15141297)
> That said, I think Node is not the best system to build a massive server web. I would definitely use Go for that. And honestly, that's basically the reason why I left Node. It was the realization that: oh, actually, this is not the best server side system ever.

Really interesting. I can imagine others would refuse to give up on the thing they'd worked so hard on. But Dahl has the self-awareness to just step back and say "huh, guess this isn't so great after all".

Huge props to the guy.

Re:Interview with Ryan Dahl, Creator of Node.js by jgrahamc on Thursday August 31, 2017 @12:33PM (#15141478)
Agree. It takes a lot to walk away from something and say you were wrong.

But, sadly, part of the saga of nodejs could have been avoided by people looking at the history of computing. If you look at Go's concurrency model it was entirely mapped out in the 1970s in CSP. There wasn't really any need for go the 'single thread, non-blocking' route that nodejs took and evangelize it as nirvana. There was a ton of distributed systems work done in the 1970s. Just look at Lamport's clocks paper.

I'm not criticizing Dahl directly here, more a sense that people ignore history in a field that has only had history for far less than a century.

Re:Interview with Ryan Dahl, Creator of Node.js by amasad on Thursday August 31, 2017 @12:53PM (#15141676)
The fact that Node survives as a platform for Fullstack JavaScript shows how serendipity works in invention: he set out to build a high performance network server and ended up building one of the largest platforms for building web applications.

The reasons it ended being very big are clear in hindsight but are hard to predict:

- Sharing code between server and client

- Server side rendering

- Lower barrier to entry than other platforms (learn once write anywhere)

- Well-designed package system

It was also helped by the fact that folks decided to write JS tooling in JS, be it minifier, transpilers, or test runners, without nodejs we would've built then on top of something else.

Re:Interview with Ryan Dahl, Creator of Node.js by thehardsphere on Thursday August 31, 2017 @01:06PM (#15141822)
What do people mean when they keep saying "server side rendering" in this specific Javascript/Node.js context? I ask because I've seen quite a few people tout that term as a recent innovation.

It was my understanding that "server side rendering" was the way the web worked since the beginning, with the server generating the markup that is provided to the browser to render the page. Nobody called it "server side rendering" until we had "client side rendering", where Javascript executed in the browser provided the markup instead of whatever program was running on the server.

I'm not trying to lecture or be snarky here; I'm genuinely confused as to what people mean when they say "server side rendering" as a new thing. Like, is there something novel that I'm missing because the term is overloaded with a definition I don't know?

Re:Interview with Ryan Dahl, Creator of Node.js by amasad on Thursday August 31, 2017 @01:08PM (#15141846)
It means you take your client side JavaScript code and render it on the server for performance and SEO.

Previously you had to either duplicate the code in different languages or pick one or the other (either use angular or rails).

Re:Interview with Ryan Dahl, Creator of Node.js by mbrock on Thursday August 31, 2017 @01:12PM (#15141870)
Running the same language on the client and the server also has some deeper implications. Like, it becomes easy to imagine an app that runs in a hybrid way with computations shared between the client and server, i.e., "offline mode". This is a pretty big deal, and it's one of the major benefits mostly ignored by the vocal critics of "single-page apps," as seen in the latest article on the HN front page.
Re:Interview with Ryan Dahl, Creator of Node.js by gaius on Thursday August 31, 2017 @03:29PM (#15143144)
If you need "offline mode" why not just write a native app? It will be far better in every way - looks, performance, battery drain, you name it.
Re:Interview with Ryan Dahl, Creator of Node.js by lenkite on Friday September 01, 2017 @01:21AM (#15146311)
Nobody likes to download and install stuff. Just imagine the state of the web if you had to install a app for every website you visit ? Oh...you need to add iOS and Android to the list of platforms. That makes it 5 platforms. 5x the work.
Re:Interview with Ryan Dahl, Creator of Node.js by mbrock on Friday September 01, 2017 @12:33AM (#15146140)
I don't want to ask everyone to install a native app, I don't want to use several different native app UI libraries, etc. I'm one of those people who thinks that the web browser as an app platform is a pretty good idea.
Re:Interview with Ryan Dahl, Creator of Node.js by sova on Thursday August 31, 2017 @03:32PM (#15143159)
Make a native app for every independent platform?
Re:Interview with Ryan Dahl, Creator of Node.js by gaius on Thursday August 31, 2017 @03:59PM (#15143384)
Windows, Linux, OSX - there just aren't that many platforms these days, it's perfectly do-able. If your core logic is in ANSI C (or equivalent) and you just need a GUI for each platform, even easier.
Re:Interview with Ryan Dahl, Creator of Node.js by mahyarm on Thursday August 31, 2017 @04:59PM (#15143869)
It's still 3 more platforms, which means 3 more developers, which leads to more $$$. Not everyone is VC backed with multi-millions.
Re:Interview with Ryan Dahl, Creator of Node.js by gaius on Thursday August 31, 2017 @05:05PM (#15143917)
But one of these "offline" apps has to work in Firefox, IE and Safari, so really, it's no different
Re:Interview with Ryan Dahl, Creator of Node.js by squeaky-clean on Thursday August 31, 2017 @06:49PM (#15144643)
As long as you stick to the APIs implemented in each browser, your code can be exactly identical. Realistically, you'll probably need to add some polyfills and edge case handling for IE, but it's much less than developing for different full-on platforms.
Re:Interview with Ryan Dahl, Creator of Node.js by moosingin3space on Thursday August 31, 2017 @07:05PM (#15144743)
With the major exception that all evergreen browsers (most browsers in wide use today) quickly officially support new web standards, but Windows, OS X, and Linux are unlikely to ever officially support each others' native toolkits.
Re:Interview with Ryan Dahl, Creator of Node.js by squeaky-clean on Thursday August 31, 2017 @06:47PM (#15144635)
Don't forget iOS, Android and Windows Phone.
Re:Interview with Ryan Dahl, Creator of Node.js by vilmosi on Thursday August 31, 2017 @05:14PM (#15143992)
Because not every news website and blog needs an app. I think everybody is tired of seeing the "Install our app" banners for every website you visit.
Re:Interview with Ryan Dahl, Creator of Node.js by flukus on Thursday August 31, 2017 @09:40PM (#15145495)
News websites and blogs don't need to work offline. Even if they did, "save page as" or an RSS reader was the way to go.
Re:Interview with Ryan Dahl, Creator of Node.js by steveklabnik on Thursday August 31, 2017 @01:11PM (#15141869)
Not just that, but to accomplish it means that you need to provide the correct client-side APIs on the server side, so that your code renders the same in both places. Doing this nicely is a lot of work.
Re:Interview with Ryan Dahl, Creator of Node.js by apparentlymart on Thursday August 31, 2017 @01:14PM (#15141889)
In this context, I think it usually means that the same rendering paths are available on both the client _and_ the server, whereas formerly it was often the case that the server was responsible for the bulk of the rendering and the client just made minor adjustments to the DOM in response to events.

I agree that it's a bit of a misnomer, but I can see why people would call it that given the path we took to get here: first we rendered almost everything on the server, and then it became popular to render everything on the client, but now we're finding that a compromise is best, and that compromise is easiest to achieve when you have similar technology on both sides.

("We" in the above is intended to represent some vague idea of the web development community at large, not any particular individuals or groups.)

Re:Interview with Ryan Dahl, Creator of Node.js by djur on Thursday August 31, 2017 @01:12PM (#15141871)
They're referring to the ability to execute the same code on the client and server and get the same output, which can provide a great deal of flexibility when optimizing for performance.
Re:Interview with Ryan Dahl, Creator of Node.js by dasmoth on Thursday August 31, 2017 @01:12PM (#15141876)
Potentially a better term is "isomorphic", a label which is specifically applied to setups where you run the same rendering code client-side and server-side. That's still a comparatively new concept, at least as something that's actively supported by frameworks and reasonably straightforward to implement.
Re:Interview with Ryan Dahl, Creator of Node.js by tree_of_item on Thursday August 31, 2017 @02:16PM (#15142468)
That's an awful term because it has nothing to do with the actual meaning of the word "isomorphic".
Re:Interview with Ryan Dahl, Creator of Node.js by dasmoth on Thursday August 31, 2017 @02:37PM (#15142681)
I'm inclined to agree, but it seems to have stuck, and is at least more specific than "server side rendering".
Re:Interview with Ryan Dahl, Creator of Node.js by badosu on Thursday August 31, 2017 @03:27PM (#15143114)
Well, unless you're talking about a homomorphism with an inverse the term seems pretty good for me: the same (iso) shape (morphos) between server-side and client-side.
Re:Interview with Ryan Dahl, Creator of Node.js by alayek on Thursday August 31, 2017 @01:30PM (#15142023)
I was confused with this initially as well.

What I came to understand, was that "server-side rendering" refers to whole application lifecycle steps: - The server generates initial HTML markup, based on the request. - The browser can parse & render the already generated HTML (instead of waiting for the client-side JS to load first, then have it create / modify the DOM). - From that point onward, all changes in UI happen through client-side rendering.

You could do this with Django template / JSP pages / Jade templates as well. Just write your templates, and some jQuery sprinkled here and there, to dictate how user interaction should change the page.

But that's not all there is to it.

We slowly took away SSR, with client side JS frameworks, like Backbone, Angular 1, Ember etc. Applications started to have client side routes, even with ugly hashbangs in the URLs.

It was easier to write entire application logic of your UI in a client-side framework with two-way data bindings; than writing the server side in a template language, and put in some JS here & there to handle interactions. Especially, if your application was big enough.

But this started having problems with SEO, and initial load times.

Say, your app has a homepage URL, of the form https://company.tld/, and a products URL, of the form https://company.tld/products.

If a user goes to homepage, and clicks on the "products" link in the navbar, the page content of /products route would load in the client side, via the framework.

But, if a user directly hits the /products URL from their browser (can be from history and omnibox prompt), the browser would first load the home page with assets, then the client side JS would take over, and route the user to the /products URI endpoint.

New server-side rendering paradigm gives you best of both worlds - get to maintain a single codebase to render your page (be it server or client), while give the initial fast loading, so that your page is interactive quite fast.

This is not easy to do. One big challenge for most server side rendering solution is that, after initial render, the JS in the page would try to re-render the page; thereby creating an impression of a "flash".

Yes, if you're using a framework like React or Vue, which uses VDOM, this won't happen in most cases, because of how a virtual DOM based renderer works. But there are still cases, where you might need to explicitly do something to prevent the re-render.

There are other challenges too. For instance, having the page server-rendered, and hydrating the state.

In the search of maintaining a single unifying codebase for both server and client (isomorphic rendering), we often do things that cannot work on server. For instance, chunk splitting your front-end bundle based on routes. Or CSS media queries.

To sum it all up, "server-side rendering" isn't just about initially rendering the page on server. It's so much more than that. It's mostly about how we can maintain a single codebase (now that we have JS on server too), and run on two different platforms.

Re:Interview with Ryan Dahl, Creator of Node.js by pier25 on Thursday August 31, 2017 @01:28PM (#15142007)
> Lower barrier to entry than other platforms

I think this is the main reason Node caught up.

SSR and code sharing are only useful in full stack projects, not in APIs. I don't know the numbers, but my conjecture is that there are more RESTful APIs written in Node than any other type of server project.

Re:Interview with Ryan Dahl, Creator of Node.js by stephenr on Thursday August 31, 2017 @01:14PM (#15141892)
I wouldn't call npm "well designed".

It's progres bar was the bottleneck causing slow downs.

The size of node_modules directories is basically a meme now.

Re:Interview with Ryan Dahl, Creator of Node.js by amasad on Thursday August 31, 2017 @01:35PM (#15142061)
It's the least shitty of all other designs. It picked the best design decisions from existing package managers. By default it is project local (as opposed to global like what rubygems, pip, and others are), it's recursive and largely reproducible (fully reproducible using lock files). The resolution algorithm is also deterministic and simple, you can implement it in an hour.

Although other languages are catching up they have to do it as add-ons or third party tools -- for example python pipenv https://www.kennethreitz.org/essays/announcing-pipenv

Re:Interview with Ryan Dahl, Creator of Node.js by pier25 on Thursday August 31, 2017 @01:23PM (#15141965)
I don't think amasad was referring to npm but the module system.
Re:Interview with Ryan Dahl, Creator of Node.js by coldtea on Thursday August 31, 2017 @04:01PM (#15143408)
Both issues are irrelevant as to whether npm was well designed.

One is an implementation detail of a secondary part of its operation (progress indication), and the other is about packages having many dependencies, not about npm causing node_modules directories to grow itself.

Re:Interview with Ryan Dahl, Creator of Node.js by jrs95 on Thursday August 31, 2017 @02:18PM (#15142483)
Just use pip for a minute, and you'll quickly realize that npm is pretty well designed ;)
Re:Interview with Ryan Dahl, Creator of Node.js by owebmaster on Thursday August 31, 2017 @05:46PM (#15144237)
I don't think npm became the biggest package repository by accident so it is sure "well designed".
Re:Interview with Ryan Dahl, Creator of Node.js by gkya on Thursday August 31, 2017 @03:16PM (#15142991)
> The size of node_modules directories is basically a meme now.

Not a node user since many years, so I can only guess, but isn't the cause of this is bad community practices (micro-packaging, many different things that do the same thing, etc) rather than the package manager itself? You can get hundreds of deps in any language if the practices are similar.

Re:Interview with Ryan Dahl, Creator of Node.js by bbatha on Thursday August 31, 2017 @01:26PM (#15141989)
> But, sadly, part of the saga of nodejs could have been avoided by people looking at the history of computing. If you look at Go's concurrency model it was entirely mapped out in the 1970s in CSP. There wasn't really any need for go the 'single thread, non-blocking' route that nodejs took and evangelize it as nirvana. There was a ton of distributed systems work done in the 1970s. Just look at Lamport's clocks paper.

Non-Blocking IO is still the best we have because its a limitation in syscall interfaces. Node.js, nginx, go, etc all use epoll and their ilk under the hood. In fact, in go goroutines only ran by default on a single OS thread until go 1.5. The ergonomics of call-back based non-blocking io is the issue here, not non-blocking io itself. Because of javascript's history on the browser where callback based events are the only apis it made sense to copy this style of api for IO so stuff like `setTimeout` worked in both cases. Node's selling point with regard to non-blocking io was never about ergonomics, it was the fact that you had a dynamic scripting language where the entire ecosystem was using non-blocking io using the same standardized event loop. Contrast to the other popular "web" languages of the day, Ruby and Python which have had some non-blocking io for years but usage is isolated because most of the ecosystem doesn't support it at all, and when they do they completely different and incompatible low-level io stacks.

Re:Interview with Ryan Dahl, Creator of Node.js by TheAceOfHearts on Thursday August 31, 2017 @01:37PM (#15142078)
I agree that we regularly fail to learn from history. However, it's worth recognizing that trying to learn from history can be incredibly challenging. There's a mountains of research to filter through. Sometimes you discover a relevant document, only to find out it's not readily available or that you have to pay an exorbitant amount of money for access. You might pay a lot of money for something that doesn't even end up being useful to your problem. When there have been multiple attempts at solving the problem, each with mixed results, how do you actually identify the good parts from the bad ones?

A lot of tech knowledge isn't easily discoverable. Heck, sometimes things don't even make sense without understanding their historical background. The filesystem layout in the unixes is a great example, on my system I have: /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin.

Re:Interview with Ryan Dahl, Creator of Node.js by komali2 on Thursday August 31, 2017 @01:47PM (#15142206)
A good example - I have no idea why unix filesystems are like that, and after some idle googling I still don't know. Can't even figure out where to start to find the history of those decisions. Certainly am finding what kind of stuff goes where.
Re:Interview with Ryan Dahl, Creator of Node.js by nomel on Thursday August 31, 2017 @10:52PM (#15145752)
Some old Unix devs/users ran out of disk space, so they mounted more disk to those points. This caused boot problems since some tools (like mount) needed to be available. All of that together, along with people blindly following convention, and you have the mess of the unix filesystem. Yep... [1]

[1] http://lists.busybox.net/pipermail/busybox/2010-December/074...

Re:Interview with Ryan Dahl, Creator of Node.js by komali2 on Friday September 01, 2017 @01:24PM (#15150508)
oh my god, that's awful
Re:Interview with Ryan Dahl, Creator of Node.js by spraak on Thursday August 31, 2017 @12:37PM (#15141528)
It is clear however that JS itself has benefited from Node in that it really increased attention on the language. It seems doubtful we'd have ES6 etc. without it
Re:Interview with Ryan Dahl, Creator of Node.js by peterbraden on Thursday August 31, 2017 @12:50PM (#15141654)
While I agree that non-blocking isn't a panacea, I think that your attitude that it was an unnecessary experiment is a little dismissive.

The fact is that green threads aren't a panacea either, and exploring the callback based pattern led to some really interesting development, evidenced by the explosion of javascript on the server .

At the time that node took off, a huge amount of server code was python with the GIL, and there needed to be something to shake up the status quo.

Re:Interview with Ryan Dahl, Creator of Node.js by jrs95 on Thursday August 31, 2017 @12:41PM (#15141563)
While you are sort of right, the non-blocking thing was basically necessary to get JS on the server working. And while he was focused on the I/O thing, he accomplished a lot of things by accident, including making a really convenient server platform for JS.
Re:Interview with Ryan Dahl, Creator of Node.js by thehardsphere on Thursday August 31, 2017 @12:48PM (#15141626)
Right, but the whole reason for JS on the server was because JS had no I/O, so he could do the non-blocking thing.

JS on the server was the means, not the end.

Re:Interview with Ryan Dahl, Creator of Node.js by pcwalton on Thursday August 31, 2017 @02:10PM (#15142434)
More than that. Go's model is just threads with a particularly idiosyncratic implementation, in userspace instead of in the kernel. This itself is nothing new, as it was tried by the Linux NGPT project in the early '90s. (NGPT was abandoned for being inferior to plain old 1:1 threads, which suggests that Go's approach is not the end state either.)
Re:Interview with Ryan Dahl, Creator of Node.js by jabl on Friday September 01, 2017 @02:49AM (#15146651)
AFAIU a lot of the complexity and slowness of "traditional" M:N threading approaches were due to the requirement to follow POSIX semantics (signal handling, preemptivity, etc.) within a purely library/OS based approach (no changes in the code generated by the compiler).

If you're doing a green threads implementation for a high level language runtime, those restrictions don't apply, to an extent. I think e.g. Erlang, Haskell or Go are examples of "green threads done right".

(Now, I do think Rust did the right thing in getting rid of green threads, but that IMHO is more a result of the space Rust is in rather than a general indictment on the utility of green threads)

Re:Interview with Ryan Dahl, Creator of Node.js by pcwalton on Friday September 01, 2017 @03:20AM (#15146750)
Go still has a lot of issues around the inability to preempt except at function call boundaries, which is an issue that doesn't exist in 1:1 threading. Fairness and priority inversion are likewise issues with M:N that apply equally well to Go's implementation. Signal handling is too, although any GC language pretty much has to sacrifice POSIX signal handling already...

Green threads done right strikes me as something like Windows' user mode scheduling (or Google's switchto patch that sadly never made it upstream), in which threads really are 1:1 as far as the kernel is concerned, but manually scheduled by userspace. This requires kernel support, but it fixes every issue except preemption, which is better to just not fix. (Few Go programs actually benefit from multicore CPU scaling; for CPU bound tasks a better use of optimization time is just not writing in Go, which tends to result in better speedups than trying to scale Go due to Go's compiler being relatively immature.)

In my ideal world, kernel-scheduled and user-scheduled threads would exist in the same language, and programmers could choose which one they want on a thread-by-thread basis. I/O calls would be equally compatible with either threading model (which could be done in a zero-overhead fashion with the proper kernel support), eliminating the problem of sync/async incompatibility. This can only really be done today on Windows, unfortunately...

Re:Interview with Ryan Dahl, Creator of Node.js by int_19h on Friday September 01, 2017 @06:36AM (#15147357)
Win32 has been offering fibers for ages, but no-one picked them up. Even .NET started designing around them (there are some vestigial remains of that in CLR hosting APIs), but abandoned that effort before it ever shipped.
Re:Interview with Ryan Dahl, Creator of Node.js by ngrilly on Friday September 01, 2017 @03:04AM (#15146700)
I'd suspect NGPT was abandoned because they couldn't use growing stacks while staying compatible with C calling convention (but I wasn't able to find any confirmation of this by googling). Go doesn't have this issue because it uses another calling convention.
Re:Interview with Ryan Dahl, Creator of Node.js by pcwalton on Friday September 01, 2017 @03:17AM (#15146741)
Stack growth is orthogonal to the M:N vs. 1:1 distinction. You can have large stacks with M:N or small stacks with 1:1.
Re:Interview with Ryan Dahl, Creator of Node.js by ngrilly on Friday September 01, 2017 @05:16AM (#15147115)
Are you saying we could use a 1:1 threading model with growing stacks (by growing stack I mean a stack that starts for example at 2 KB and is grown as needed)?
Re:Interview with Ryan Dahl, Creator of Node.js by pcwalton on Friday September 01, 2017 @12:31PM (#15149985)
Sure. There are syscalls that allow a great deal of customization as to stack placement.
Re:Interview with Ryan Dahl, Creator of Node.js by ngrilly on Friday September 01, 2017 @01:15PM (#15150415)
Thanks. I didn't know about that. What is the cost of context switching compared to userspace threading?
Re:Interview with Ryan Dahl, Creator of Node.js by rpeden on Thursday August 31, 2017 @12:43PM (#15141580)
It might be because it's relatively easy to end up doing something computing related without studying it directly.

This was the case for Dahl and many others. It's definitely possible to catch up on the history of the field while you're working in it, but not everyone can find the time to do so.

Re:Interview with Ryan Dahl, Creator of Node.js by willvarfar on Thursday August 31, 2017 @01:06PM (#15141833)
You couldn't have got CSP from writing a web server API to run with V8.

To get CSP you needed green threading built into the runtime, and that's a much taller order.

So it's hard to say that the not-critizing-directly Dahl should have learned from the past. We'd probably never have heard of him if he'd set out to build a new esoteric CSP language or runtime, just like we haven't heard of anyone around that time other than the golang team.

Re:Interview with Ryan Dahl, Creator of Node.js by erokar on Thursday August 31, 2017 @12:53PM (#15141683)
> If you look at Go's concurrency model it was entirely mapped out in the 1970s

Isn't that Go's problem, though — that there isn't a single thing in the language that wasn't entierly mapped out in the 1970s?

Re:Interview with Ryan Dahl, Creator of Node.js by spraak on Thursday August 31, 2017 @01:06PM (#15141827)
Using ideas from history isn't a problem. And Go is unique in that it combined all these learned lessons into something new.
Re:Interview with Ryan Dahl, Creator of Node.js by camus2 on Thursday August 31, 2017 @01:16PM (#15141906)
> Using ideas from history isn't a problem. And Go is unique in that it combined all these learned lessons into something new.

what learned lessons, like pragmas and struct tags?

Re:Interview with Ryan Dahl, Creator of Node.js by jerf on Thursday August 31, 2017 @02:27PM (#15142587)
A lot of is more in what was taken away rather than what was added.

As someone who is occasionally accused of being too pro-Go on HN... I actually have no problems thinking of Go as a really nice and refined 1990s language. Another type of "Java done right". (I say "another" because I think C# has a really good claim to that as well, albeit in a very different direction.) There's a place for that in the world. As much as I love the cutting edge of programming languages too, I'm not sure that we're anywhere near as far along on knowing how to build really big systems with them as a lot of people think we are. (There's only one way to get there though, and I absolutely encourage people to keep trying.)

Re:Interview with Ryan Dahl, Creator of Node.js by camus2 on Thursday August 31, 2017 @03:20PM (#15143040)
> A lot of is more in what was taken away rather than what was added.

Given the fact that C is basically the blueprint for Go, I'm not sure what things were taken away from C, syntactically speaking. It's more like Go added garbage collection to C, and a few other bells and whistles and told people : "this is 21th century programming", without actually thinking about what C got wrong at first place.

Re:Interview with Ryan Dahl, Creator of Node.js by jerf on Friday September 01, 2017 @09:07AM (#15148024)
"I'm not sure what things were taken away from C, syntactically speaking."

Pointer arithmetic. Go has "pointers" but they're really more references. Some other things depend on how you look at them; Go "removes" manual memory management from the language by adding GC, it "removes" the fact that in C values are essentially untyped and very easy to penetrate down to that untyped layer by making all values carry their type around regardless, they "remove" the limitations on function pointers to provide real closures, they "remove" trivial array overflow by adding checked access, there's a lot of rough edges removed from C at the language level even if it required "adding" some runtime support.

I mean, by the time you've removed pointer arithmetic and manual memory management, you are by no stretch of the imagination in C anymore.

Re:Interview with Ryan Dahl, Creator of Node.js by Zelizz on Thursday August 31, 2017 @05:11PM (#15143972)
What mistakes does Go copy from C?
Re:Interview with Ryan Dahl, Creator of Node.js by geodel on Thursday August 31, 2017 @09:10PM (#15145381)
Getting popular despite being not an "objectively" better language.
Re:Interview with Ryan Dahl, Creator of Node.js by int_19h on Friday September 01, 2017 @06:37AM (#15147363)
"A really nice and refined 1990s language" really is a perfect description of Go (and also explains why some people love it with a passion, while others can't understand what all the fuss is about).
Re:Interview with Ryan Dahl, Creator of Node.js by geodel on Thursday August 31, 2017 @12:58PM (#15141734)
It is only a problem to someone whose thought process dictates anything old is bad and anything new is good.
Re:Interview with Ryan Dahl, Creator of Node.js by camus2 on Thursday August 31, 2017 @01:12PM (#15141878)
> It is only a problem to someone whose thought process dictates anything old is bad and anything new is good.

What do you call new? generic programming, nullable types, type classes? all pioneered around 1973? Can you explain what "new" is?

Re:Interview with Ryan Dahl, Creator of Node.js by zzzcpan on Thursday August 31, 2017 @01:50PM (#15142232)
Lamport's paper was only the very beginning of distributed systems.

And CSP was invented by mathematicians for themselves, not for real life programming. As opposed to Erlang, which was invented for real life programming of telephony applications later in 1980s. But people keep ignoring history and think that CSP is suitable somehow, and not actor model. CSP is an even bigger mistake, don't try to make it look like it isn't. Learn from history.

Re:Interview with Ryan Dahl, Creator of Node.js by jondubois on Thursday August 31, 2017 @02:35PM (#15142657)
He doesn't give any specific reason why he thinks that Go is better. I've used both Go and Node.js and I came to the opposite conclusion.

I'm not a huge fan of Goroutines spawning threads in the background. I think that spawning threads and processes should be explicit because there is a big performance penalty when multiple threads have to share a CPU core because of context switching.

With Node.js, you have more control over the process count so you can minimize the amount of CPU context switching that happens by making sure that each process gets its own CPU core.

That said, I do think that on a conceptual level, Go feels cleaner than Node.js... But since async/await was introduced I feel that Node.js has the upper hand again.

Re:Interview with Ryan Dahl, Creator of Node.js by ploxiln on Thursday August 31, 2017 @03:02PM (#15142858)
Well the thing is, Goroutines are not threads, they're coroutines. The go runtime uses up to a real thread per cpu core, and all your goroutines are run on those (fewer) real threads. The runtime also manages a shared thread pool for blocking syscalls e.g. local disk access and some kinds of name resolution depending on OS. But starting 10 goroutines is much cheaper than spawning 10 threads.
Re:Interview with Ryan Dahl, Creator of Node.js by tedunangst on Thursday August 31, 2017 @01:47PM (#15142205)
I think that happens fairly often. The first person to solve the problem learns a lot in the process. The people who come later don't see the problem, only the solution.
Re:Interview with Ryan Dahl, Creator of Node.js by devmunchies on Thursday August 31, 2017 @12:50PM (#15141653)
Well he does work for Google. We don't know if there is any pressure for him to be be a Govangelist.
Re:Interview with Ryan Dahl, Creator of Node.js by spraak on Thursday August 31, 2017 @01:10PM (#15141861)
I see what you mean, but as a similar example, I never thought anyone at Google wouldn't use Google for search, but some use DuckDuckGo -- https://news.ycombinator.com/item?id=15068047

Plus, he said he was using Go before he joined Google.

Re:Interview with Ryan Dahl, Creator of Node.js by pier25 on Thursday August 31, 2017 @01:29PM (#15142022)
TJ moved to Go too, and he doesn't work at Google.
Re:Interview with Ryan Dahl, Creator of Node.js by devmunchies on Thursday August 31, 2017 @05:57PM (#15144305)
Was I defending Node.js or something? Just stating the obvious.