Live data from Hacker News

AXR: A better(?) alternative to HTML+CSS

axr.vg

21–30 of 65 posts

Re: AXR: A better(?) alternative to HTML+CSS

#21

Hi there! My name is Miro Keller, and I'm the founder of AXR, so I'll probably be the best person to answer any questions you guys may have. So feel free to ask me anything about this project :) I'll try to answer all questions posed here, step by step: @shimonamit: The code is not the only part that's important here, it's just one piece of the puzzle. So how would you go about to determine what part of the code to s…

Performance doesn't matter if nobody can use it, and right now nobody can use it. By the time you have a working C++ implementation, for all you know v8 and SpiderMonkey's optimizers will be generating code just as fast as your C++. You're allowing an engineer's natural love of premature optimization to distract you from actually getting your product in front of people.

C++ is also less cross-platform in this sense because to support multiple platforms, you will have to support compilation across target platforms and handle the variety of plugin APIs available for those platforms. And on iOS, your stuff won't work at all because it's Javascript or the highway if you want to run in Safari. (I guess you could ship your own browser on the App Store, but I suspect you'd run into rule hassles.) Maybe you could use Native Client, but in that case you will need to ship native client binaries for each CPU architecture and you'll only work inside Chrome.

Attempting to entirely supplant the browser's rendering engine with yours in a plugin is also a hopelessly shortsighted move. You'll be throwing out all the hardware acceleration and advanced layout logic provided by modern browsers. Just rendering text is complex enough to require multiple full-time salaried engineers, and you will have to bear that burden if you will ever be compatible with HTML/CSS, because international text is important.

Build a prototype using JavaScript, HTML, and Canvas/SVG where needed. Put it in front of people. Let web designers and programmers play with it. If they can play with it, they'll find reasons to love it. Once you have web designers and programmers who love your actual product, you have a path to success.

Re: AXR: A better(?) alternative to HTML+CSS

#23
>HSS is a language based on CSS, but offers many more advanced features, such as object orientation, rule nesting, expressions, references to other objects, modularization (code reuse), etc.

Ew. This is an advertisement? Elegance is usually achieved when you hit a maximum of capabilities with a minimum of explicitly defined features. The last thing you want is so many different constructs that when someone reads your code they have to keep a reference manual handy.

Granted, I haven't worked my way through the spec, but maybe there's a better way to phrase that sentence that doesn't evoke memories of C++.

Re: AXR: A better(?) alternative to HTML+CSS

#24

Earlier quoted context omitted.

So can you do "myElement { alignY: 50% }" or something like that to automatically center vertically in your browser? Or can you do "100% - ref(width of sideColumns)" to create two fixed-width and one fluid column in the middle? Or can you rely on having exactly the same interpretation of your code across all browsers? ... I guess you are looking at just a limited subset of what AXR is, mainly the syntax features that…

Why do you think AXR would have the same interpretation across all browsers? Dont you think somone cough will make their own implementation that fucks up the rendering/layouting just for the heck of it? cough

The reason is because that's one of the main pieces of the project. Providing a library that browsers can USE, not IMPLEMENT.

Why would anyone do that? That's WAY too much work just for fucking something up just for the heck of it.

Re: AXR: A better(?) alternative to HTML+CSS

#25
post #23

>HSS is a language based on CSS, but offers many more advanced features, such as object orientation, rule nesting, expressions, references to other objects, modularization (code reuse), etc. Ew. This is an advertisement? Elegance is usually achieved when you hit a maximum of capabilities with a minimum of explicitly defined features. The last thing you want is so many different constructs that when someone reads your…

Suggestions on how to improve the phrasing of the website are always welcome :D

I'd love to hear if, once you've read through the spec you still feel that the features are perceivably as complex as C++... I think they feel very naturally into the language, but then again, I designed it, so your mileage may vary ;)

Re: AXR: A better(?) alternative to HTML+CSS

#27
post #12

Worse is better. Sorry, but HTML isn't going anywhere. XML had its chance — full support from W3C and implementations in all-but-one browsers for a decade now . text/html parsers survived that. I don't think you can convince all browser vendors to bet on XML again. They all opposed XHTML2. W3C tried to push XHTML2 without them and ended up making HTML even stronger. XML with vector shapes? We've got SVG. It may not b…

You're right: HTML is going to stay with us for a long, long time. This is not about eliminating it, but to try something new as an alternative. It's not XML with vector shapes, that's exactly what SVG is . Vector shapes would live all inside HSS, where you could reuse them, style them, give them flexible sizes, apply effects, etc... Once flexbox, grids and calc come out as official specs, you'll still have to wait u…

Once flexbox, grids and calc come out as official specs, you'll still have to wait until all browsers implements them, and then wait again until enough users update

How would the situation be any different for AXR?

Re: AXR: A better(?) alternative to HTML+CSS

#28

Hi there! My name is Miro Keller, and I'm the founder of AXR, so I'll probably be the best person to answer any questions you guys may have. So feel free to ask me anything about this project :) I'll try to answer all questions posed here, step by step: @shimonamit: The code is not the only part that's important here, it's just one piece of the puzzle. So how would you go about to determine what part of the code to s…

Performance doesn't matter if nobody can use it, and right now nobody can use it. By the time you have a working C++ implementation, for all you know v8 and SpiderMonkey's optimizers will be generating code just as fast as your C++. You're allowing an engineer's natural love of premature optimization to distract you from actually getting your product in front of people. C++ is also less cross-platform in this sense b…

I know we don't have anything to show right now, I didn't put this on HNews... we're still about 2 months from actually doing something like a public release, so sorry about that. But be assured that we'll have something to play with pretty soon :D

The framework I mentioned (Firebreath) already provides an abstraction layer for those APIs. I agree iOS will be the hardest nut to crack, but since this is a long-term project I'm pretty sure we'll be able to work something out (either by Apple's blessing, by providing an HTML fallback mechanism or something else) when the time is right. Right now we're just trying to figure out if it is at all possible to create a better technology...

Why do you think that you'd throw out hardware acceleration? The latest Flash has hw accelerated video, for example, so not at all impossible. Advanced layout logic? Don't make me laugh... do you mean floats? Or inline-blocks? I've had my share of trouble using theme (I'm a web designer with many years of experience...). Layout is exactly one thing that we're trying to do better! And to use flexbox and all the other new layout stuff reliably you'll still have to wait a couple of years, I think. Then you'll probably still need to create a conventional layout for older clients for much time ahead...

And for the text rendering, there are plenty of open source libraries out there, we won't reinvent the universe from scratch just to make an apple pie.

As I said... the prototype will soon be available for anyone to try out so web designers and programmers will be able to play with it as a browser plug-in, this is not just some crazy random idea ;)

Re: AXR: A better(?) alternative to HTML+CSS

#30

I don't understand why they are implementing the prototype in C++. If you built it in JavaScript, any modern browser could load their alternative markup and render it through some sort of fallback (I would expect HTML5+CSS+Canvas+SVG all put together provide enough functionality to render content expressed in their new language(s)). Building it in C++ basically guarantees that nobody will be able to use it, ever, bec…

It's designed as a library that browsers would use to render the content, as far as I can tell. So C++ is fairly sensible in that respect.

Whether even one of the major browsers will support it is the question, and what the pages will look like in other browsers (if there's any fallback) remains to be seen...

Post reply on HN