4 ms·
There are at least three fallacies here. First, appeal to authority. Second, straw man: nowhere did I claim "to abstract away all the nastiness of dealing with
by gruseom 19y ago
There are at least three fallacies here. First, appeal to authority. Second, straw man: nowhere did I claim "to abstract away all the nastiness of dealing with browsers". (I won't repeat what I did claim, since it's just a few lines away.) Third, argument by selective example. What you call "this" isn't representative of what I'm talking about, although it does show what html and css sexps look like.
Still, let's not get into an argument, I'd rather trade thoughts. The idea of abstracting away from the browser entirely seems attractive, but turns out to be impractical once you get to know the problem better. It's like abstracting away the network. So for me it's become clear that there's no way to get away from the browser altogether (except by not building HTML-based apps in the first place). That doesn't mean we can't significantly improve matters by building appropriate abstractions. As I said, we can reduce duplication, increase clarity and efficiency, and so on. The environment I'm describing has provided more of these benefits than anything else I've seen so far.
Re Joel Spolsky, I find most of his stuff tiresome and overblown, but he occasionally comes out with a great idea. What specifically did he say that you find relevant?
- tlrobinson 19y agoI was asking about Joel's article because you used the phrase "JS has become your assembly language", which he also mentions. My comment regarding abstracting away browser nastiness was in response to my original comment, "You still have to deal with HTML and CSS and the DOM", which you didn't address. "The idea of abstracting away from the browser entirely seems attractive, but turns out to be impractical once you get to know the problem better." In fact, I know the problem very well, and can tell you that this is simply not true. Unfortunately I can't give you any more details right now, so I'm sure you'll think I'm full of shit. I'll admit that a) I'm biased, and b) I haven't looked at Parenscript in depth, but from what I've seen I don't see it solving any problem well enough to get non-Lisp geeks to use it.
- cstejerean 19y agoyou're missing the point. This is not for non lisp users, it's a way to make javascript and client side development more bearable for lisp users. As far as the abstractions, you will need to write some ugly DOM code at first, but then you hide away the ugly low level stuff inside of a package, write a couple of macros and you move on to writing the meat of the application at a higher level of abstraction. To make an analogy, think of starting with C, implementing Python in it and then writing your application in it.
- gruseom 19y agoI was asking about Joel's article because you used the phrase "JS has become your assembly language", which he also mentions. Ah, no, I didn't get that from Joel, it's just the obvious analogy if you're generating low-level JS. my original comment, "You still have to deal with HTML and CSS and the DOM", which you didn't address I thought I did address it. You can generate these things from something higher-level which is much easier to work with (but not so abstract that you don't still have to understand what you're generating). I don't claim that this is a unique approach but it is certainly an area of strength for Lisp, and Parenscript deserves to be better known. Incidentally, in the app I work on we don't deal much with HTML or CSS. We keep those to a minimum and do almost everything in Javascript. We even try to avoid the DOM when possible and do as much as we can in pure JS (for example, using arrays rather than childNodes). This is the only way we've been able to get acceptable (or nearly acceptable) performance in the browser. In fact, I know the problem very well, and can tell you that this is simply not true. Unfortunately I can't give you any more details right now, so I'm sure you'll think I'm full of shit. I don't think you're full of shit. I'm describing the best solution of the ones I've seen so far. If you can do better, I look forward to hearing about it. I remain skeptical, though, that HTML/JS can be fully abstracted away in a way that doesn't leak (now there's a term I did get from Spolsky) and still yields usable, performant web apps. There's too much going on there that's too essential to what a web app is. Take for example that html sexp you quoted. There's a lot of information in it. However you represent it, you still need a way to say that you want a 1px border, a certain font, links that get bigger when you mouse over them and so on. There's a whole model there which can certainly be abstracted into something else, but that something else won't necessarily be simpler (it will, however, be non-standard). My feeling is that there isn't much "compression" to be had in the general case. But I'm willing to be proven wrong.
- boucher 19y ago" However you represent it, you still need a way to say that you want a 1px border, a certain font, links that get bigger when you mouse over them and so on. There's a whole model there which can certainly be abstracted into something else, but that something else won't necessarily be simpler (it will, however, be non-standard)." The thing is, is that really what people who are building applications need to figure out? Yes, they probably need access to changing these properties, but the vast majority of what you are doing when you are writing an actual application on the web is far more complicated then setting a few class properties on some divs. It isn't so much about compressing this, as it is about throwing out this broken architecture. HTML/CSS are great technologies for page layout. In fact, I have a perverse love for them which I am unable to explain, let alone understand. But they suck when it comes to dynamic, application like behaviors. We need a new technology. And yes, while it won't be a w3c or whatwg standard, if its open source, who cares? I, for one, am tired of relying on browser manufacturers to get things done.