|
the ancient Sumerian text associate's Enlil's number as 50, astronomy or not.
Enlil - Wikipedia[^]
|
|
|
|
|
I know. As Anu and Ea's numerical values were derived from astronomy, Enlil's probably also derives from astronomy.
|
|
|
|
|
Okay, I'll own up. My immediate response to the title was a mental image of the Ford GT40...
I need to get out more!
Covid, covid
Go AWAY!
Don't come back no other day...
|
|
|
|
|
|
On IoT you don't have a lot of luxuries. You simply learn to do without.
Well, one area where I have to do without is HTML and XML well formedness checking and validation.
That might be an issue where data interchange is concerned, but not so much where rendering HTML or XHTML content is concerned.
What do you do on an error? You fail. You can either stop, or continue to render, possibly having some bad content displayed as a result, but this is still a better case than failing outright halfway through the parse because the document forgot a </b> . In fact, this is what commercial browsers do.
Here's the thing. If this is what you're doing, you don't need a DTD. You don't need an XSD Schema. You don't even need a heckin stack!
The result is much faster and lighter with a smaller binary footprint.
So why haven't I seen a pull reader with minimal validation/well formedness checking in the open source pool?
You'd think such a beast would be incredibly useful for building web browsers - even tiny ones - especially tiny ones!
*cracks knuckles*
I shouldn't have to be writing this. It's one of those things that leaves me wondering why it doesn't exist already.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I shouldn't have to be writing this. It's one of those things that leaves me wondering why it doesn't exist already.
It was a task waiting for you!
And look, here you are!
|
|
|
|
|
Why ? Because it is probably more complicated than it seems.
|
|
|
|
|
Remember who you are talking to. 90% of the stuff the witch does is over my head.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
edit/ Nevermind - wrong thread.
Yes, you are probably very right
|
|
|
|
|
It's not really. I'm almost done with it.
Real programmers use butterflies
|
|
|
|
|
Yes, I was merely talking about normal mortals like us, not wizards
|
|
|
|
|
That'd be a witch. Wizards are a different thing altogether.
Real programmers use butterflies
|
|
|
|
|
I preprocess / strip out all the HTML and insert my own markup directives. I don't need a "paragraph" keyword to tell me where a paragraph should start or end; etc. But as you say, it's assumed to be valid HTML in the first place (or made to be).
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
As far as preprocessing I don't have the memory or nvs storage to do that on my device, and it wouldn't really buy me anything much even if i did.
Much better in my scenario at least, to just read with a pull parser in a loop, get tag names back and set values on a context structure i use while rendering. The context structure has the current position and flags like "bold" or "italic", styles and font faces, that sort of thing.
I mean, if I knew at compile time what my HTML was going to be I'd just generate C++ code from it that renders it, and that sort of "preprocessing" would be a huge win, but in my scenario I have to read arbitrary HTML.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: cracks knuckles Ye-aaaaah!
Rock on Witchy Poo! Looking forward to the article(s)
|
|
|
|
|
Thanks for the vote of confidence. I'm getting there but it's a bit of a bear.
For starters, everything has to stream, because you don't have a ton of RAM. 1kB is a big deal, so i let you specify as little as 128 bytes for a buffer. I can't stream attribute and element names, but I can stream attribute values and element content, N bytes at a time (depending on what you had set N to)
So if you have a long attribute value while you're doing while(reader.read()) { you'll get multiple reader.node_type()==ml_node_type::attribute_content results back before getting reader.node_type()==ml_node_type::attribute_end
Not only are there a zillion html entities like © (©) but I had to make a state machine to decode all of them efficiently off a unicode stream.
Also this:
<span class="foo">this is valid</span>
<span class='foo'>and this</span>
<input disabled><!--
<div class=you_thought_this_would_be easy id=but_no_because_html_hates_you_this_is_also_valid></div>
<br /><!--
So this is kinda rough sometimes, but I'm making progress.
Fortunately I don't have to care about custom entity references, namespace declarations, or even well formedness (balanced tags, etc) which makes some of it pretty easy.
Real programmers use butterflies
|
|
|
|
|
You bugger. The bit of my brain I need to use to make an intelligent response is entirely consumed with the act of killing myself laughing at your code-snippet. Fan-friggen-tastic
|
|
|
|
|
I've got it running. I even wrote most of the article, but I should probably test it more.
Real programmers use butterflies
|
|
|
|
|
Nice work..
|
|
|
|
|
|
Let me know when it's sharks, not mozzies ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
From what I understand that's a Tuesday in Wisconsin.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
It didn't sound like I thought it would..
|
|
|
|
|
Call me when it (literally) rains cats and dogs.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Well - if you read the comments of cat owners, you're half way their. Just a small typo in your spelling:
For cats, it's reigns and has always been so.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|