Damn, I cant stand html.

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
scratchyrice
Gnome
Posts: 360
Joined: Thu Apr 27, 2006 9:14 pm
Location: United Kingdom - England
x 16

Damn, I cant stand html.

Post by scratchyrice »

Like who designed this sh**e language or whatever you want to call it? I mean why can people just set absolute or real position's of element in html? Like CSS was supposed to fix all this, But its just a stupid. Like you have to control the position of an object in the middle of a div, Using the thickness of the div's border. What a waste. Why not just something like position-real-x: 100% etc?

Sorry about this, But i get so frustrated, and wonder why this "language" is designed in such a shoddy way.

Cheers

Scratchy

AMD Ryzen 7900x, Gigabyte Nvidia GeForce 3080 10GB, 32GB DDR5

User avatar
wacom
Gnome
Posts: 350
Joined: Sun Feb 10, 2008 2:07 pm

Re: Damn, I cant stand html.

Post by wacom »

You mean something like "position:absolute;"?
User avatar
volca
Gnome
Posts: 393
Joined: Thu Dec 08, 2005 9:57 pm
x 1
Contact:

Re: Damn, I cant stand html.

Post by volca »

I think it was pretty good initially, but then every other person inserted some functionality till it got a big mess, then instead of starting over they just put css on the top of it to make it even worse (Kind of like the strategy to introduce a new language and libraries over Win32 API :D). I wonder what would've happened if TeX or simmilar system was chosen instead back then :)

XML, derived from the HTML language, is a step in speculative direction as well - it means an easy interchange of information, yes, but it could have been way simpler. Example is google protocol buffers:
Protocol buffers have many advantages over XML for serializing structured data. Protocol buffers:

* are simpler
* are 3 to 10 times smaller
* are 20 to 100 times faster
* are less ambiguous
* generate data access classes that are easier to use programmatically
Image
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Re: Damn, I cant stand html.

Post by DanielSefton »

scratchyrice wrote:and wonder why this "language" is designed in such a shoddy way.
It isn't... It's just a basic markup language for assembling a web page. The only tag which you should be using (most of the time) is the <div> tag; there's nothing else to it. The rest should be done in pure CSS.

The only thing I would agree on is if you complained about the cross-browser compatibility of CSS, which quite frankly, is a nightmare. :P
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Re: Damn, I cant stand html.

Post by betajaen »

DanielSefton wrote:The only tag which you should be using (most of the time) is the <div> tag; there's nothing else to it. P
Agreed. Once you get into the whole semantic web thing going on, and get used to the idea of separation of content and presentation - it becomes worth it. I mean nobody here embeds their Ogre Meshes in their C++ code right?

Cross-browser compatibility seems to be getting better; there are tons of css/html frameworks to work from now (960.gs is one of my favourites), and other hacks or tricks are well documented now. But these sort of things should never exist in the first place, if people followed to specification. :)
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Damn, I cant stand html.

Post by xavier »

volca wrote: XML, derived from the HTML language
This is incorrect. XML was not derived from HTML at all. It is a subset of SGML (actually, both XML and HTML are subsets of SGML).
W3C wrote:The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.
http://www.w3.org/TR/2000/REC-xml-20001006
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
volca
Gnome
Posts: 393
Joined: Thu Dec 08, 2005 9:57 pm
x 1
Contact:

Re: Damn, I cant stand html.

Post by volca »

Oh, good point.

Still - my opinion does not change - XML is ineffective and bloated language which is hard to process and write code for (or maybe it's just the libraries I used so far), and finds many ill uses in the industry :)

Sure I know it is very practical as an data interchange format. A the place where I work we often receive XML full of good intentions and bad implementation practices - as an example - change in XML formatting breaking client's software :?
Image
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Damn, I cant stand html.

Post by xavier »

volca wrote: Still - my opinion does not change - XML is ineffective and bloated language which is hard to process and write code for (or maybe it's just the libraries I used so far), and finds many ill uses in the industry :)

Sure I know it is very practical as an data interchange format. A the place where I work we often receive XML full of good intentions and bad implementation practices - as an example - change in XML formatting breaking client's software :?
As you point out, it's not the fault of the markup language used -- humans can screw up anything, regardless of its features to prevent same. ;)

The primary reason that it is so used in so many places, is that it uses a very regular syntax for which many many parsers exist, all of which are robust, tested and mature -- so it becomes the proverbial hammer looking for a nail, and rather than write yet-another-custom-file-parser, many elect simply to use XML (granted, sometimes in places where it's not the most appropriate choice).

But again, human misuse is not the fault of XML. :) (I could go off on a "guns don't kill people" analogue here, but I won't ;))
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
volca
Gnome
Posts: 393
Joined: Thu Dec 08, 2005 9:57 pm
x 1
Contact:

Re: Damn, I cant stand html.

Post by volca »

You're right about that - it's a user's fault to misuse some technology :) As you say - people often choose XML just because it's common and easily accessible. There are places I can hardly understand the motivation, though - for example ant build files :shock:
Image
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Damn, I cant stand html.

Post by xavier »

volca wrote:for example ant build files :shock:
I'm with you on that one. ;)
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Re: Damn, I cant stand html.

Post by haffax »

Oh, curiously ant is the only build system, I really feel comfortable with. Whether this is because of xml or inspite of it, I don't know.
I like the well structured, tidy approach over the linear "dump everything in, where ever you like" approach of makefiles/cmake and such. Insofar I can imagine, that XML helps to keep it up. And of course Eclipse helps a lot too.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: Damn, I cant stand html.

Post by nikki »

I like 'premake'. I tried CMake once, and I think the only time I'd use it is for distribution of software. premake is a good quick utility for in-house builds.
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Re: Damn, I cant stand html.

Post by Nauk »

XML is the proof Vogons are real and among us. I too dislike it with a passion. One of the things I really love on Ogres .material files, they are C style and not bloody XML, making them very clear and readable and my eyes don't have to wade through the double amount of characters including markup brakets and slashes - yuck!

HTML is ok tho, relatively easy to pick up and as said before if you stick to divs and css you can keep it at a minimum if you wish, and by now you no longer have the horrible cross browser differences and work-arounds you had years ago.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Damn, I cant stand html.

Post by jacmoe »

Nauk wrote:XML is the proof Vogons are real and among us.
:D
I avoid listening to Vogon poetry, I avoid looking at XML.
But I use XML. When appropriate. As long as I don't have to look at it.
Like serialising components, behaviour trees ... Well, at least until the format settles. Then a tailored format, be it binary or textual. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Damn, I cant stand html.

Post by nullsquared »

I'm a loyal google protobuf user, and I only use XML for simple user-editable data files.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Damn, I cant stand html.

Post by jacmoe »

nullsquared wrote:I only use XML for simple user-editable data files.
You are evil! :)
I use ini/text files for that, because I am a nice guy. :wink:
Even a text protobuf file is better than XML.
IMO.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Re: Damn, I cant stand html.

Post by Nauk »

jacmoe wrote:
nullsquared wrote:I only use XML for simple user-editable data files.
You are evil! :)
Sounds like we found a Vogon! :D
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Re: Damn, I cant stand html.

Post by Kojack »

I use Lua for human readable ini files.

I've been using html and learning javascript and css stuff for the last few days, trying to make some greasemonkey scripts (specifically for work tomorrow).
Trying to extract arrays of data from pages filled with unnamed tables inside of tables inside of tables inside of tables and then draw coloured bar graphs is tricky. Html really should have some primitive graphics operations built in. I ended up supplying 1x1 pixel gifs as inlined data uris then stretching them to make bars. End result looks good, but it was painful to use trial and error to work out how this stuff works. A dom explorer would have been handy (is there one for firefox? mozilla had one built in), as well as tables with ids.
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Re: Damn, I cant stand html.

Post by DanielSefton »

Kojack wrote: Html really should have some primitive graphics operations built in.
HTML itself shouldn't -- that's what JavaScript is for. :P

There's always DHTML - but it's old now.
Kojack wrote:I ended up supplying 1x1 pixel gifs as inlined data uris then stretching them to make bars.
That's where CSS comes into play :): http://nicholascook.net/demos/graph/
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Re: Damn, I cant stand html.

Post by betajaen »

DanielSefton wrote:
Kojack wrote: Html really should have some primitive graphics operations built in.
HTML itself shouldn't -- that's what JavaScript is for. :P
No, Javascript would be horrible for that, and very difficult to come up with a suitable "file-format" of code.

We have the new canvas tag and SVG vector and bitmap operations.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Damn, I cant stand html.

Post by nullsquared »

jacmoe wrote:
nullsquared wrote:I only use XML for simple user-editable data files.
You are evil! :)
I use ini/text files for that, because I am a nice guy. :wink:
Even a text protobuf file is better than XML.
IMO.
No, XML is better suited for this type of thing due to tags. The data is not a simple list of property name and property value.

But I would switch to a text protobuf file if that's possible. Is it? I only thought that it was possible to display output of such a file for debugging purposes; I'm pretty sure you can't parse such a file w/ google protobuffers.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Re: Damn, I cant stand html.

Post by Kojack »

That css graph thing looks interesting, but how well does it work as a post processing grease monkey script, since I have no access to modify the actual web page to include graph.js, the Prototype framework, etc.

A data uri (firefox and maybe ie8 only) being used to make a box of whatever size I want:

Code: Select all

blockred = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACwAAAAAAQABAAACAkQBADs%3D";
r = document.body.childNodes[1].insertRow(-1);
r.innerHTML = '<img src="'+blockred+'" width="'+w1+'" height="'+s*4+'" title="'+scores[i]+'">';
Actually there's a loop in the middle which strings a whole bunch of those img bits together to form the bars, this is just a simplification.
I would have prefered a box tag or something. If html can do text and images, why not easily do a coloured rectangle?
Then again maybe it can, I really have near zero interest in web based stuff and just wanted a quick hack. Of course if I show the other staff I can do javascript, they might try to make me teach it or something. :(
(I made a mistake at a previous job of putting on my resume that I could do databases (I knew sql). So they put me on one, upgrading a horrendous VB5 app connected to Access. Not knowing VB or Access made things tricky. At the same time they took the VB/database coder and put him on a C++ project. It freaked the other staff out when I started writing queries in the sql designer instead of using the drag and drop bit)
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Damn, I cant stand html.

Post by nullsquared »

███████████████████████████

Coloured rectangle, you called?




... :roll: :mrgreen:
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: Damn, I cant stand html.

Post by nikki »

boost::serialisation is pretty nice. Serialisation of pointer members in GameObjects has always been a problem, but I've fixed it using alternative means of addressing GameObjects (in NGF every GameObject has a unique 'ID' number).
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Damn, I cant stand html.

Post by nullsquared »

nikki wrote:boost::serialisation is pretty nice. Serialisation of pointer members in GameObjects has always been a problem, but I've fixed it using alternative means of addressing GameObjects (in NGF every GameObject has a unique 'ID' number).
I still use pointer members (shared_ptr's to other "connected" game objects), only my serialization uses names.
Post Reply