New opportunities for D => ASM.js

Nick Sabalausky via Digitalmars-d digitalmars-d at puremagic.com
Fri May 16 13:25:37 PDT 2014


On 5/16/2014 3:26 PM, H. S. Teoh via Digitalmars-d wrote:
>
> No software is feature-complete until it can read email. :-)
>

Heh :)

> Today I skimmed over the PDF spec... and was horrified to discover that
> I had been living in a fool's paradise, thinking that it was only a
> passive *document* format. Turns out that it is yet another of those
> document format turned Turing-complete messes. With its own embedded
> flavor of Javascript, even. (And obviously, it's gratuitously
> incompatible with "standard" JS). With the ability to attach files.
> (Huh, what?! I thought PDF was *the* attachment... nope, not only it can
> contain executable JS code, which is just a repetition of that security
> nightmare that is Outlook + ActiveX, it can also encapsulate an entire
> directory structure within itself. Yep. No bloatware here, move along.)
> PDFs can also embed *movies*. (!!!)
>

The scripted-PDFs is news to me, but I have known for some time that PDF 
is absurdly over-engineered. At it's core, it actually *isn't* a 
document format really, it's a container format. And definitely is 
designed to contain literally anything you fell like cramming into it. 
And not exactly the best container format in the world, either.

> This is exactly the same thing that happened with HTML/HTTP. HTTP was
> originally designed to be stateless because... the whole point was to
> serve *static documents*?! It's a totally sucky protocol for interactive
> media, to say the least. All the pathology with cookies, Javascript,
> AJAX, and the rest of that jazz that got piled on top, basically arose
> from trying to shoehorn a stateless protocol into something stateful.
> Nobody ever considers to *replace* the darn protocol with something
> *designed* for that purpose. Or that three-headed 5-eyed slimy
> monstrosity that is HTML, with something a little more... *suitable*?...
> for describing UI elements. Y'know, like a GUI toolkit or something! But
> no, we have to use HTML because HTML is cool, and therefore that makes a
> HTML UI implementation cool. The Emperor has no clothes, and nobody says
> a thing lest they be regarded as fools.
>

+1 million :)

I'm actually kinda disappointed something like Adam's old experimental 
windowing toolkit hasn't taken the world by storm.

> A future generation -- if there even will be one, at the rate we're
> going -- will look back and laugh at the foolishness that is today's
> computing world.
>

I wish I could believe that. But it hinges on the assumption that people 
actually *will* wise up. Which is a notion I've become increasingly 
skeptical of. :/ But hey, who knows.



More information about the Digitalmars-d mailing list