Wondering how well Deno ( deno.land/ ), a "secure" Node, would work as a game platform for home users.

Is this the new 8-bit BASIC?

h/t @teleclimber for bringing Deno to my atttention

@natecull @teleclimber gamewise i don’t see anything here you couldn’t do in a browser. but with deno you’d have to a do a bunch of extra setup. deno is very much about correcting the mistakes ryan dhal thinks he made with node, and thus it’s squarely in node’s original usecase: small realtime server. though i see it’s got an api that shows it could do electron’s job.

@natecull @teleclimber it seems there’s an enormous gap in communication and education, meaning most developers haven’t the slightest clue just how much amazing stuff is possible with just a plain browser without needing to add a framework on top.

@zensaiyuki @teleclimber

It might be because "just plain browser" got a very bad name back in the IE vs Firefox wars, and so everyone ran for the shelter of frameworks as protection against all the unimplemented and half-/buggily-implemented browser stuff? And now that "framework first" mentality has stuck?

@natecull @teleclimber yeah basically. all the problems the frameworks were built to solve aren’t actually a problem anymore, but now we already have all this stuff built in the frameworks.

@natecull @teleclimber but if you went looking for a simple primer, for beginners, on how to do a hello world in plain javascript, they basically don’t exist.

@zensaiyuki @teleclimber

I admit that when I looked at Node, about two years ago, I found enough weird and dangerous things in its vanilla Javascript that I ran screaming for at least Ramda. (Lodash probably does what Ramda does, now).

I can't imagine using out-of-the-box Javascript even in 2020 without at *least* a utility library. So much really vitally important stuff Just. Isn't. There. in the core language. And what is there, often has really nasty side effects.

@zensaiyuki @teleclimber

actually what actually happened was I started making up my OWN utility library to make Javascript safe and sane. Then found that Ramda / Lodash etc had already done that.

@zensaiyuki @teleclimber

just utterly insane things like, there's no builtin functions (or at least not sensibly named, easy to find ones) to test whether an object is an array, is Null or not, fallbacks for Null handling, vanilla 'sort' is DESTRUCTIVE, yeeeeagh. Things that, if you're doing database-query type stuff, you just don't want anywhere near your code.

@natecull @teleclimber that stuff has all been fixed. just for some reason nobody gets the memos for these things.

@zensaiyuki @teleclimber

It *hasn't* been fixed. Or rather, the dangerous, unsafe stuff is still there right alongside the correct stuff.

So, much better to never trust the builtins, just indirect everything through a different namespace. Otherwise for every single method call you have to go 'is this one of the good ones? or the evil ones?' and you'll occasionally get it wrong.

@natecull @teleclimber the old bad stuff literally can’t be removed. ever. backwards compatibility cannot be broken. if it bothers you, you should use a linter. what else can be done?

Follow

@zensaiyuki @teleclimber

And yet, there's a "use strict" which removes some, but not all of the broken stuff.

What else can be done is to use a library.

And so that's what people do.

· · Web · 1 · 0 · 0

@natecull @teleclimber using a library doesn’t prevent evil stuff from happening. it just hides it so you don’t have to think about it. but it’s still there, and can still bite you.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!