At my curmudgeon-iest I like to imagine we carve off our own web where S-expressions reign, there is no Google, and a million timecubes bloom.
Last time I checked, this stack wasn't particularly slow. I would also express the same style in much less lines of code than HTML + CSS.
Although CSS sucks more than a very sucky thing, and the text+markup idea barely makes sense in 2016, I can see how we got here - and how CSS needed to hit the classic "worse is better" sweet spot that allowed designers to play, and not just people who code.
But that was then. If someone invents a meta-protocol now and implements a meta-browser/meta-server for it, I'd expect cult/niche status at least.
I miss Gopher, in a rose-tinted glasses nostalgia-driven way
Could it be Computer Lib/Dream Machines by Ted Nelson:
Cover of the 1974 edition: http://blogs.brandeis.edu/sarahw/files/2011/03/cover1.jpg
Front cover of the 1987 edition (in yellow): https://www.amazon.co.uk/Computer-Lib-Dream-Machines-Tempus/... (sorry, I have no image of the back cover, but I have both editions in my book shelf: Also the 1987 edition shows a superhero on its back cover (cover of Dream Machines)).
EDIT: If you want to order a reprint of the 1st edition (very difficult to get): Ted Nelson sells them again: http://hyperland.com/LibPage
https://www.amazon.com/Internet-Kids-Ted-Pedersen/dp/0600590...
"GEEK: A geek is someone who is really excited by computers and proud of it" -- this is the reason I was proud to call myself a geek from 6yo onwards :)
Scheme became the lingua franca of the web. Smug Array Weenies criticize Scheme for being “insufficiently APL-like”, while pure functional programmers criticize APL for being “insufficiently Haskell-like”. Legions of Scheme programmers write mutually unintelligible code, though still manage to criticize Haskell for being “insufficiently Lisp-like”. Prolog fails to catch on. Brenden Eich announces that continuations are considered harmful. C programmers maintain that continuations are the most reasonable way to handle errors in C. This happens in spite of C not having continuations. Douglas Crockford invents s-expressions as a data interchange format. Douglas Crockford writes “Scheme: The Good Parts”. Guy L. Steele sues Douglas Crockford for copying the Scheme standard. Hipsters begin using Node.Scheme to write their backends and are criticized for a nonsensical package management system and “using a web language on the server”. This happens in spite of Scheme having been a server language before it was used on the web. Microsoft invents a compiler with type inference and optional type annotations for Scheme. Facebook invents a compiler with type inference and optional type annotations for Scheme. GNU Guix is promptly ignored for “using a web scripting language for package management”. Facebook invents React, which uses an extensive set of macros to write HTML components in Scheme. This is criticized in spite of having been done a few hundred times before. Guy L. Steele angrily removes string-pad-left from the Scheme standard. This breaks many packages. Non-Scheme programmers laugh and wonder if Scheme programmers have forgotten how to program, suggesting that “proper design minimizes dependencies on the language standard”.
In all seriousness, Scheme would make a really good lingua franca.
Or maybe it's just the historical artifact that everybody claims to be, and if the PDP-10 supported a lisp environment, things would be different. But if I had to bet, I'd bet on metaprogramming not scaling.
For that matter C++ templates are metaprogramming from what I understand, and C macros are a really really primitive form of metaprogramming. Java also has reflection which is metaprogramming-ish.
I don't think the problem was metaprogramming.
For C++ templates, you get that impression and multiply by a few googols.
Now, Ruby and Python communities do claim to gain power from metaprogramming. I can say that Python metaprogramming is something completely different from Lisp's one, but Ruby's is more similar. Yet, both communities put a hard limit on the amount of "magic" you should use on your programs (where Ruby's limit is way higher than Python's), so it can not become the panacea that it is in Lisp.
Metaprogramming is one of the main selling points of Lisp, the only other being how easy it is to implement. Other languages have other features to show.
Macros and the repl were, to me, the best part of clojure.
http://www.winestockwebdesign.com/Essays/Lisp_Curse.html
That basically every program written in a Lisp becomes its own programming language. It has mechanisms which are vaguely-familiar-but-different from all the other programs. The mechanisms are 80% of a complete solution, but a different 80% each time, depending on the needs of the program.
Some humans can write Lisp. But Lisp production code can only be maintained and updated by AIs who are more intelligent than we are.
(http://ithare.com/cpp-guidelines-made-to-measure-s-one-size-...)
Each project has its own coding guide and idiosyncrasies. That is not restricted to Lisp. Macros allow you to express some rules in a domain-specific language, not in a separate document or tacit knowledge. This is more manageable than ad-hoc approaches. Abusing macros is definitely bad and can lead to ghetto-languages.
Lisp is interactive, call "describe" on whatever you don't understand. Under Emacs, if you encounter a form you don't understand, point to it, "C-c C-d d" and you get the documentation; "M-." and you go to the definition; "C-c M-m" and you call macroexpand.
In effect, it's not really scaling; it's being limited to the small portion of developers who work on compilers.
I wonder if there really are mental types well-suited to Lisp and types ill-suited to it.
I severely doubt that. JavaScript can inspect attributes of anything on the entire page, run remote HTTP queries and inspect their attributes, and make styling decisions based on those, on the fly, and in response to user GUI events.
Granted, I'd probably be really okay with these features no longer existing. Just saying, I don't think any DSSSL could have taken them on.
Not sure it would be better (it probably erred on the side of too much mixing of program logic and styling rather than too little), but it would certainly be different.
I'm probably out of my depth here, but what do you mean by the style sharing cache? I mean, any kind of file can be cached by the browser, including Javascript. And presumably browsers could've implemented optimizations (with or without the aid of hinting annotations) to identify those DSSSL functions that need only be evaluated once.
(BTW, like the author of the article seems to, I actually think that PSL looks like the best of the CSS alternatives he lists).
- Designers/developers will, as a general rule, always max-out the system; as long as the performance is at an acceptable level, the features and bloat will increase. If it becomes unacceptable, those features and bloat will be trimmed accordingly. Hence, no matter the underlying technology, performance will almost always hover around "barely acceptable". The difference would be how much "bang for the buck" we would get for that performance; presumably a "barely acceptable" page using CSS would be capable of more than a "barely acceptable" page using DSSSL, since DSSSL would exhaust the performance budget more quickly.
- Trying to dictate which stylistic elements can/cannot be used seems like a thankless task, since many will disagree and either come up with awkward workarounds or lobby to get their desired features included (which may or may not disrupt the coherence of the provided elements). Providing a full programming language is effectively pre-empting those workarounds, and giving the community control over the available elements (e.g. via libraries). This would lead to lots of awful code, but some good ideas would emerge and become widely adopted. Browsers might specialise their evaluators to speed up common usages, etc. Very similar to Javascript, polyfills, etc.
- CSS is, after all, "just" styling information, and is applied progressively on top of HTML. The document is still machine-readable, even if we might not be able to answer particular questions about its layout and visuals. It's conceivable that some people might, for example, obfuscate their document content, and re-assemble them using styles, e.g. to prevent crawling; that's more of a cultural/social issue than a technical one though, and that cat's already out of the bag with Javascript, single page apps, etc.
In any case, the current trend of working around CSS's limitations with Javascript is the worst of both worlds. At least we might attempt to evaluate DSSSL, to see what it might look like, whilst any attempts to evaluate Javascript will quickly run into barriers like side-effects (should we run AJAX calls? What should "alert" do? etc.)
Except this is an argument against JavaScript driven behaviour, not against a restricted styling language slightly more expressive than CSS. The fact that we would be able to move some of this dynamic behaviour from a general purpose language where optimizing redraw is difficult, to a domain-specific language where optimizing redraw is loads easier would yield performance improvements, not regressions.
No, it wouldn't. "Optimizing redraw" isn't difficult, and to the extent that it is it has nothing to do with the expressiveness of CSS.
Do you agree or disagree that a domain-specific layout language with would be faster to render and animate than a general purpose programming language interacting with the DOM? This seems like an undeniable yes.
Do you agree or disagree that such a layout language could supplant some of the uses of JavaScript over the years? This too seems to be an undeniable yes.
So it seems undeniable that modern browsers would be faster than they currently are on the metrics you criticised them as compared to native apps, which seems to be your primary concern.
And you can claim gzip is good enough to eliminate any space savings a more expressive language would yield, but the fact is people still minify their JS and CSS for significant savings, which means even small differences matter; further, domain specific optimisations have significant effects, and a precompiler could perform advanced common subexpression elimination passes to further compress beyond what gzip could dream of without affecting the semantics your layout.
So theoretically and empirically it seems my point that trading off rendering speed for network speed is not only well motivated, but already settled in my favour.
No. I don't believe this is true. With CSS as a declarative language, we can do global optimizations that are much harder to do than with a general programming language (especially one that's as hostile to static analysis as Scheme!)
> Do you agree or disagree that such a layout language could supplant some of the uses of JavaScript over the years? This too seems to be an undeniable yes.
Sure, but that's not worth slowing down so many Web sites for.
> And you can claim gzip is good enough to eliminate any space savings a more expressive language would yield, but the fact is people still minify their JS and CSS for significant savings, which means even small differences matter
Sure, but it's not worth trading off the rendering performance.
> a precompiler could perform advanced common subexpression elimination passes
Not with Scheme, it sure can't! You can do those dynamically, but not statically.
It was hard to learn, though, and the documentation wasn't good.