-
The little-endian web!
-
The little-endian web?
Here’s the deal: typed arrays are not fully portable. On most browsers, this code will print 1:
var a1 = new Uint32Array([1]); var a2 = new Uint8Array(a1.buffer); console.log(a2[0])
-
Homoiconicity isn’t the point
I’ve never really understood what “homoiconic” is supposed to mean. People often say something like “the syntax uses one of the language’s basic data structures.” That’s a category error: syntax is not a data structure, it’s just a representation of data as text. Or you hear “the syntax of the language is the same as the syntax of its data structures.” But S-expressions don’t “belong” to Lisp; there’s no reason why Perl or Haskell or JavaScript couldn’t have S-expression libraries. And every parser generates a data structure, so if you have a Python parser in Python, then is Python homoiconic? Is JavaScript?