The Birth and Death of JavaScript (2014) [video]
destroyallsoftware.com
destroyallsoftware.com
I started programming in the 60’s and at times had to load instructions into machines using binary on front panel switches. That’s the reasons that machines of that time had the lights and rows of switches on the front so that one could debug programs by looking at the lights to see the program counter, data value, or instruction. See [1] for a photo of a large front panel on an iconic machine of the time.
I even recall pulling plug panels out of card processing equipment to reprogram the sorting and selecting of input data being run through machine as huge stacks of punch cards, see [2] for a picture of a mid-20th century plug panel for data-processing.
The layers of abstraction are important. They enable us to construct some of the most useful, complex, and intricate artifacts ever made on our planet. Today I program in high level languages, and I get to use powerful frameworks, database systems, and amazing hardware right on my desk. Yet, I do miss some of the fun of invention and hacking on systems that I really understood in depth.
[1] https://en.m.wikipedia.org/wiki/Front_panel#/media/File%3A36...
[2] https://www.ebay.com/itm/133017817600?hash=item1ef87ad200:g:...
Interesting I thought CS was all software where computer with gate and low level programming were something of EE / Computer Engineering.
My own educational background (Math, EE, CS) has given me a lot of flexibility over the last 50 years.
But here I am, working as a software engineer and half way through my MSc in computer science. It took a couple of low level microcontroller classes in my mechanical engineering undergrad for me to see the light.
Things like Push notifications. Background activity. Guarantees about data persistence. First-class Home Screen app icon. Ability to directly share data with other native applications even if they don’t want to (to the extent it’s enabled by the platform’s native Share Activity). And to a lesser-extent: the ability to use native widgets for the best user-experience on that plstform. Too many SPAs fall into uncanny-valley when they start to look too similar to native widgets - and it’s off-putting.
And the fact that Fortnite still isn’t available as a PWA on iOS is telling… I was expecting them to launch an OnLive-like service rendered to a <canvas> over WebRTC by now… and worryingly this gives Apple a strong incentive to immediately halt any work on improving WebRTC in PWAs…
Like Stadia? (https://youtu.be/3_RAyxpFurU?t=113)
AFAIK there are a few loose ends still TBD with WASM & WASI to support sockets and networking, but once that's in place we'll likely have a full WASM POSIX environment in your browser. Get some of the core tools like gcc, etc. prebuilt and you're good to go to just start building the world in your browser. No app store reviewer to hold you back, no megacorp to decide homebrew apps aren't allowed anymore... the world is your oyster to create and share anything.
POSIX is not implemented anywhere. There are degrees to which it's implemented in various systems. It also doesn't mean that having POSIX implemented makes things accessible to anyone, or that this 40-year-old standard is even relevant anymore.
> Look at for example JSLinux https://bellard.org/jslinux/ for the classic example
It doesn't mean that POSIX is implemented in the browser:
- it's basically an emulator running on top of some browser tech that runs linux.
- Linux is mostly, but not entirely POSIX-compliant
> we'll likely have a full WASM POSIX environment in your browser. Get some of the core tools like gcc, etc. prebuilt and you're good to go to just start building the world in your browser
This will literally never happen outside of some geek circles. If only for the simple reason: you'll have to download the entirety of Linux and its tools into the browser for every user.
Downloading the entirety of Linux, coreutils, etc. _is_ the point. Right now a kid with an iPhone is limited to programming it with whatever toy apps Apple has decided to allow on their app store. Or on Android you're lucky to be allowed to use Termux to run a little proot environment to mostly use core linux tools. There's _no_ way for that kid to learn and use 'real' programming languages and tools--want to learn rust? Sorry, you're SOL. Want to program some Go? Not going to happen. Etc.
But give that kid a browser window that's a full POSIX shell with gcc and all the coreutils built. Perhaps some CDN hosting precompiled packages just like apt/rpm/etc. repos... and now we're talking. They can do _anything_ and no app store limit or whatever will stop them.
This is precisely for geek circles. The kind of geek that opens up that weird qbasic.exe they found rooting around their parents DOS machine and then blew their mind at the possibilities. We don't have anything like that for kids today and it's a real shame, but the birth and death of JS demo here made into reality can change that. I look forward to the day some kid clicks a link, sees a blinking bash prompt and a pointer to read some man pages or help files and has their mind blown too.
I don't know why you assume I have any rage. I'm just pointing out facts.
> There's _no_ way for that kid to learn and use 'real' programming languages and tools--want to learn rust?
Ah, yes. "Real programming languages", not "toys provided by Apple". "Kids wanting to learn Rust on a phone".
> But give that kid a browser window that's a full POSIX shell with gcc and all the coreutils built.
And?
> They can do _anything_
No. They still can't do "anything". Since Linux is already running in the browser, go ahead, run it on a phone, install rust into it, and go do "anything". Then come back and tell me if any kid will want to do that.
> This is precisely for geek circles. The kind of geek that opens up that weird qbasic.exe
Ah yes. So now you're limiting all kids to just geeks who are willing to tinker with a rust compiler running in a shell in a linux running on a wasm on a browser on a phone. God forbid it would be other kids with "apple toys" and "non-real programming languages" that don't require "a full POSIX shell with gcc and all the coreutils built".
> I look forward to the day some kid clicks a link, sees a blinking bash prompt and a pointer to read some man pages or help files and has their mind blown too.
More likely than not that kid will see a blinking prompt, and will go away saying "what in the fresh hell is this".
Modern "toys" open significantly more opportunities for kids to learn than any posix shell. Apple's Swift Playgrounds will teach and interest a few magnitudes more kids to learn programming than a "bash shell with a prompt to read man pages".
WASM is not a replacement to JavaScript and never will be. It's not even a damn language.
WASM fills in a use case where you need to run highly performant code on a browser. It just so happens that you can write it in whatever language you choose.
I do agree it is a shame to lose direct insight to the text source code, but let's be honest the production JS shipped to browsers today is far, far from being human readable. It's minified and shrunk to the most small and incomprehensible degree to save bandwidth. View source and try to read and understand the JS on any big site like facebook.com, etc. and you won't get very far.
I would say a page loading a 1KB JS file better off than a WASM binary blob that's 2MB.
Edit: to be clear, I'm not focusing on performance
That's not exactly correct. It's possible to write equally performant code in just Javascript, by being careful to avoid certain features of the language (e.g. garbage collection, expando objects, dynamic types for variables, etc). Writing code in a stricter language like rust or c++ might make hitting those targets a little easier, but also using TypeScript can make it easier, too.
With the exception of loading, parsing and some JIT profiling, as WASM can potentially be smaller, and it can skip the majority of parsing and early profiling.
So WASM shouldn't be thought of as a tool for achieving speed. It should more be thought of as a means for running cross-platform code, for languages other than Javascript.
Not until either of the two things happen:
- WASM gets GC and can work with DOM directly
- DOM is supplanted by canvas- and webgl-based libraries and frameworks
That JS wasn't a Lisp is kind of a pity, though. But again, Lisps have been around longer than almost any other language yet are still comparatively obscure, which tells me something inhibits their broader adoption.
There are too many people with worthwhile JavaScript skills to service, too many companies who have things built in it and employees with those skills who will keep building things in it.
Maybe in 2050 there will be Cobol style posts on HN about JavaScript.
on edit: changed removed from to something more understandable
I would even like to take it a step further, an 'open source' OS where every binary has symbols available. The system can be stopped anywhere and the full stack trace is understandable.
A binary with symbols has tons of extra crust that is largely unnecessary. Even if you have them, what good does a stack trace do if you don't also have the source to fix it?
The source to build it is not just 'open'. All running binaries would be able to be mapped to their corresponding source.
If you want a system like that, just compile Linux and all of your tools in debug mode. But again, why do this when you can just recompile from source?
This is a gross misunderstanding of how computers work, I feel.
It makes patching the binary yourself a heck of a lot easier. As is often the case with legacy enterprise software from a vendor now long-gone…
Enterprise software ends up as something invariably so specific to the company using it that it doesn’t matter if it’s open-source or not - absolutely no-one could extract any value from it than the original company and whatever kafkaesque internal processes lead to its development.
Anything more general-purpose is already commodity - ERP being the prime example.