I'd rather see technical details too plus maybe a comparison between require.js/almond and define.js. Currently it's not clear what are the advantages of define.js.
Parsing, evaluating, continuations and CPS... it seems similar to this language: https://curiosity-driven.org/continuations#interpreter but the syntax is clearly different. Also, that interpreter is implemented in ~320 lines of JS.
Yes, exactly. And there are a lot of tricky corner cases like SIGHASH_SINGLE when number of inputs != number of outputs with hash 0x01 [0]. Actually the entire implementation (Bitcoin Core) is the specification :) It's interesting from the software design point of view - an extreme case of backwards compatibility. It's hard even within Bitcoin Core as some changes already caused forks [1].
The article is just a demonstration but it won't hurt if it was as accurate as possible (while still being readable) :)
> By that logic you could make anything illegal, legal.
I'm not a lawyer but from a technical point of view it's almost impossible to remove any kind of data from a truly distributed network. Be it Bitcoin's Blockchain, BitTorrent or the internet itself. That's just a fact, no judge order will change it, sorry.
And as M4v3R said it'd be very expensive to add a big file like a picture to Blockchain anyway.
The same thing that happens to every other data put in transactions - if they're included in blocks every node (full verifying node [0]) downloads it and stores it locally forever.
Yes, you're right, numbers treatment is not exactly the same as in Bitcoin Core. The script interpreter supports only basics and it was implemented to show how Bitcoin Script works in general for another article [0].
But it was not clear from this text whether it's a complete implementation or not so it looks like a bug. I've added the annotation [1] and will update the interpreter in the future.
Of course if one wanted to use Bitcoin in real projects I'd rather recommend Bitcoin.js [2] but that's another topic.
Exactly - scripts are pure functions. Reasoning behind this is explained by Satoshi himself at Bitcoin Talk [0]. Contracts page at Bitcoin wiki has an example of defining a will using Bitcoin and an oracle [1].
But for production builds I highly recommend Almond: https://github.com/jrburke/almond