« first day (398 days earlier)      last day (4568 days later) » 

11:00 PM
The page is valid, right?
 
I can see the closing ]]> at the end :)
 
@RMartinhoFernandes that is trigraph?
 
@MrAnubis No, it's not C++. It's XML. It closes a CDATA section.
It's showing because apparently Firefox sucks.
 
lol
 
@KerrekSB what browser do you use?
 
11:02 PM
I mean, all I can do is create a page that conforms to the DTD... how much more am I supposed to cater for implementation shortcomings? :-)
@RMartinhoFernandes Opera
 
@KerrekSB Welcome to webdev.
 
@RMartinhoFernandes Not using XML. This is plain-old SGML.
 
SGML has CDATA?
Ok.
 
@RMartinhoFernandes yeah, that meta stuff looks pretty straightforward (my knowledge is limited and experience is zero, so I will take a closer look later)...a quick glance made it seem like there were no preprocessor tricks to play to shorten it. Looks remarkably readable for metafunctions.
Could you use your constexpr trick there? Probably not?
 
Is there an idiomatic way to check if a long can be represented by an int. is std::numeric_limits<int>::max() >= my_long safe/correct?
 
11:08 PM
@keithlayne No, not there, I need to conform to the Boost.Fusion API.
 
@awoodland I can't think of any reason why not...but I don't know a lot.
@LewsTherin that sounds like a good reason to write a template there:
template<class A, class B> bool isRepresentable(B const &);
 
@keithlayne I wasn't following the discussion sorry. What is representable?
 
a template function to tell if a value of type B can be represented accurately with a variable of type A, as in, a long that is <= MAX_INT can fit in an int.
 
@keithlayne Why'd would we need templates for that? A string for example wouldn't need it...
I usually ask this retarded questions by the way
 
@RMartinhoFernandes How old are you? 12?
SGML defined CDATA marked sections!
:-)
Kids these days...
 
11:18 PM
@KerrekSB 24. I try to steer clear of SGML and all its descendants.
 
@awoodland The new Boost numeric section has tons of "can convert to" traits
 
Unfortunately I ran deep into XSLT last summer.
 
@RMartinhoFernandes SGML is very neat. Good design. Shame nobody understood it.
A bit like C++ really.
XML is to SGML as C# is to C++.
SGML Architectures were a great idea with literally zero use.
 
@LewsTherin a string could very well use that with a similar principle...a std::string 20 characters long will not fit into a char[10] without some truncation, so it's really the same concept.
It's kind of like the Matrix, you have to open your mind to it.
 
11:23 PM
@LewsTherin you could also make it so that type parameters that are not convertable cannot even compile with that function.
 
Headache
 
XML is to SGML as C++ is to WG21
KAY
 
@JohannesSchaublitb ?? How so?
 
because C++ is defined by WG21 and XML is defined by SGML
KAY
 
XML is just dramatically dumbed down from SGML. Born out of a purported collective sensation that SGML was too hard. Hence my comparison.
@JohannesSchaublitb Hm. Not really. XML is on the same footing as SGML
It's not "an SGML language", but rather a subset of SGML
languages can be written either in XML or in SGML, with strict one-way compatibility
 
11:27 PM
XML is defined by an SGML text
 
(Basically, you fix the SGML declaration to get XML.)
@JohannesSchaublitb No, not quite.
 
ever hear of hypercard?
It was the bomb in 1989!
 
"The Standard Generalized Markup Language (ISO 8879:1986 SGML) is an ISO-standard technology for defining generalized markup languages for documents." "HTML, XHTML, and XML are all examples of SGML-based languages."
there we have it
what I said
 
Loosely speaking, if you require the use of the XML SGML declaration (found in /usr/share/xml/declaration/xml.decl for example), you are more or less constrained to XML (plus some additional restrictions).
@JohannesSchaublitb Who are we quoting there?
It's provably nonsense.
Well
 
@KerrekSB I am quoting en.wikipedia
 
11:29 PM
Let me reword that.
Hahaha
 
it's what I have been knowing all these years
 
HTML and XHTML are applications of SGML/XML
 
some dude from the IRC #html told me that
 
XML is a meta language similar to and derived from SGML
 
and lots of fun things that you can do with HTML that no single browser implements
like you can do <//br> or something funny, closing two br tags at once
 
11:30 PM
so... with a sufficiently loose definition of "based" that sentence is excusable
Wait
 
it's all defined by SGML
 
<br> is NOT XML
 
no XML is defined by an SGML doc xD
 
No
That's not true.
XML is a meta language very similar to SGML, and in fact, it's essentially a subset of SGML.
It's not an application of SGML
 
oh
i see now!
 
11:32 PM
HTML is to SGML as "Hello World" is to C
You write the former in the latter
 
So you can write HTML both in SGML and in XML
the latter is called XHTML
The SGML document (your "hello world" if you will) consists of several parts. The formal part consists of an SGML Declaration and a Document Type Definition
 
in
what's "SGML Declaration for XML" ?
 
only the latter is of wide interest
 
is that not the definition of XML?
 
11:34 PM
No!!!
 
As a C++ programmer of all people, you must appreciate the difference between declaration and definition :-)
The declaration sets out the lexical rules of the language
You can define RTF as an SGML language, for example.
 
I caught my 5-yr-old making a butter-and-NERDS sandwich. I made him eat it. If you don't know what nerds are, you're missing out.
 
What you customarily see, angled brackets and all, is only the reference concrete syntax.
You can define any other syntax you like
 
oh that SGML declaration tells an SGML parser how to parse XML ?
 
11:36 PM
Nerds are way more interesting than markup languages.
 
So naturally, people looked at that and said, meh, tihz sukx. Let's kill all this and fix the declaration.
@JohannesSchaublitb The declaration sets up the lexical rules for the parser.
The DTD sets up the grammatical rules of the language
 
DTD is for SGML ?
 
The DTD is the application of SGML.
 
ah that was it. empty end tags, like "</>" closing the most recently opened tag
 
Like hello.c is for C, so my_ml.dtd is for SGML
 
11:37 PM
those are neither in HTML nor in XML ?
 
@JohannesSchaublitb The feature that you can abbreviate tags is a rule set out in the declaration.
 
@KerrekSB ohh!
lol
it's so complex
and abstract
 
So for XML they added this whole new spiel about the null-end-start-tag-closer
NETSC ""
For example, HTML allows you to say <p/this is a paragraph./
 
i thought they defined SGML and then by use of the SGML XML declaration defined XML
 
(Check it, you'll pass validation!)
 
11:39 PM
what is the XML standard for? what does it define that is not in that XML declaration?
 
This is called a null-end-tag. They recycled that for XML.
 
@KerrekSB but i take it no browser accepts that
 
XML is just a much, much simpler subset of SGML
So you still write languages in it
In a DTD.
A DTD written in XML is far more constrained than an SGML one.
 
ah DTDs can be written with XML too?
 
You will see this in the HTML Entities one: SGML
Note the placement of the comments. In SGML I can say, <!-- p>Hello</p --> to comment something out.
In XML, for (insert rage) some reason they thought, maan, waay to dificlut. So now comments have to be separate.
@JohannesSchaublitb If you restrict yourself, yes.
 
11:42 PM
hmm
 
I think Opera is moderately OK at parsing those.
 
who needs all that abstraction
ppl only need XML and HTML parsers that display webpages
 
<!DOCTYPE kerrekml SYSTEM [
  <!ELEMENT kerrekml #PCDATA>
  ]>
 
what real world software uses those jerk-off features like null-end-tag closers and things?
lol
 
@JohannesSchaublitb Well, XML does. <br/> is a NET.
 
11:44 PM
are they only for W3C to have fun during the meetings?
 
It's parsed as <br/ + [nothing] + >.
 
so <br/ hello aaaahaha> is valid XHTML ?
 
@JohannesSchaublitb Well... given the shocking number of recent proposals, I'd say yes...
but all the good stuff was done in the olden days
@JohannesSchaublitb No, because of NETENABL IMMEDNET
 
Shifting my main partition left a few gigabytes. This should be fun.
 
11:46 PM
the bull-end tag is only allowed if it follows immediately.
 
This forces you essentially to only use it on empty elements.
 
is it difficult to write an SGML parser?
 
Or at least on elements with no content
 
more so than a C++ parser?
 
11:46 PM
@JohannesSchaublitb I think James Clark's is the only one in existence
 
That was the problem... with only one essential implementation, it became questionable why there was a standard.
 
(The current incarnation is onsgmls.)
@JohannesSchaublitb We should set DeadMG to the task.
 
cpx
hmm
 
11:47 PM
No, it's a context-free grammar!
 
Piece of cake
 
we will end up in angle brackets fiasco when he talks out about it in here
 
Hm. Maybe. In SGML, you have inclusion/exclusion exceptions.
So you can say, A contains any inline elements, but never again any other A.
 
oh
like a p cannot contain another p
 
11:49 PM
so <a><span><b>hello<a>abc</a></b></span></a> is disallowed, although B can contain A.
 
because every p ends the previous p (in html)
 
yep
But with P there was no problem to begin with, because P can't contain any other block-level elements.
And neither can any other inline elements.
A was the tricky bastard.
 
But that's a separate level of parsing. The grammar is context-free, but validation may be a complex procedure.
OK, so in XML, guess what they did.
They removed the exceptions from the language!
So now there's no way in the formal DTD to prohibit this.
 
11:51 PM
The solution was as simple as it was obnoxious: They just put it in the informal part of the standard!
(I.e. the written text, which now says, "oh, and don't do this.")
 
cpx
hm what is this trivial dctor?
 
@cpx Huh?
 
i didn't know about the beauty of DTD
i thought it's an own language but now i see it's all SGML again
 
cpx
11:56 PM
@Maxpm i have class X { ~X(); }; note that ~X is not implicitly defined yet, so its trival?
 
@JohannesSchaublitb So much is SGML..... shame that it's virtually useless! I mean, unused....
Entities would have been great!
<DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" [ <!ENTITY foo "Hello world"> ]>
<h1>&foo;</h1>
Unfortunately, implementation of this varies widely.
Opera does it OK if you're in XML mode.
Mozilla does it only for internal entity declarations.
 
sbi
@cpx You mean dtor, right? Short for destructor. A "dctor" would be a "deconstuctor", and such a beast doesn't exist.
 
IE6 was a total failure in many regards.
 
Imagine if you could write your documents with a bit of structure...
 
11:59 PM
i guess if they support all these things, the browsers would become slower
 
sbi
@KerrekSB Many? Is there any it wasn't?
 
cpx
@sbi yes sorry
 
@sbi It rendered faster than any other browser!
 
@KerrekSB Unfortunately it was not a failure in terms of usage numbers.
 
@KerrekSB aahaha! my "/bin/cat" compiles C++ code faster than any other compiler!
5
 
11:59 PM
@JohannesSchaublitb Maybe, but... it'd be trivial compared to all the other DOM manipulation that browsers are already doing.
 

« first day (398 days earlier)      last day (4568 days later) »