|
Yep, I am
// TODO: Insert something here Top ten reasons why I'm lazy
1.
|
|
|
|
|
A leeetle too simple, no?
OK, I'm up Xmas eve.
"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!
|
|
|
|
|
Who better to comeup with another theme based?
|
|
|
|
|
Yeah you're right.
I was going to say demon or devil to hide it a bit more but then I wasn't sure if the CC rules allowed an anagram of a substituted word or not.
I took little a gamble on people not remembering a 17 year old film and the fact, surprisingly, of how few people (that I know) know the satan/santa anagram.
// TODO: Insert something here Top ten reasons why I'm lazy
1.
|
|
|
|
|
There have been many CCCs where a synonym had to be found for part, or all, of an anagram.
|
|
|
|
|
Suggestions on what to use as a dynamic HTML5 wysiwyg editor to replace Dreamweaver would be appreciated.
Thank you for your suggestion
David Mills
|
|
|
|
|
I just heard about this: Live Server - Visual Studio Marketplace[^] when i asked nearly the same question here earlier (i can't remember if it was yesterday or today i asked)
It shows a live preview using a real browser on the right hand side, while you edit tags on the left so it's not a true wysiwyg editor in the sense that i think most people would think of the term, but it might be enough for what you need, and it's nice to have VS code integration if you already use it.
Real programmers use butterflies
|
|
|
|
|
thank you for the suggestion and I have VS Code so it would be a useful add-on
Regards
|
|
|
|
|
|
|
|
I have - it caused me to look out my old copy of MS FrontPage.
|
|
|
|
|
ah, well, that sucks.
I have always hand rolled my html and css. never used an editor other than visual studio, code, etc.
|
|
|
|
|
Thank you for the suggestion - I will investigate it
Regards
|
|
|
|
|
It's usually in reference to XML parsers, but it's a generic parsing model that can apply to parsing anything. Contrast .NET's XmlTextReader (a pull parser) with a SAX XML parser (a push parser)
The reason I ask is because I use the term a lot in my articles lately, and I'm trying to figure out if it might be worth it to write an article about the concept.
I don't want to waste time with it if it's something most people have heard of before.
It's hard for me to know because I deep dove parsing for a year and everything is familiar to me now.
Real programmers use butterflies
|
|
|
|
|
Never heard of it
|
|
|
|
|
Thanks. I'm just trying to determine if it might be worth an article of its own since I've implemented so many of them.
They basically work like this: (example for JSON)
if (!fileLC.open("./data.json")) {
printf("Json file not found\r\n");
return;
}
JsonReader jsonReader(fileLC);
long long int nodes = 0; milliseconds start = duration_cast< milliseconds >(system_clock::now().time_since_epoch());
bool done = false;
while (!done && jsonReader.read())
{
++nodes;
switch (jsonReader.nodeType())
{
case JsonReader::Value: printf("Value ");
switch (jsonReader.valueType())
{ case JsonReader::String: printf("String: ");
printf("%s\r\n", jsonReader.value()); break;
case JsonReader::Real: printf("Real: %f\r\n", jsonReader.realValue()); break;
case JsonReader::Integer: printf("Integer: %lli\r\n", jsonReader.integerValue()); break;
case JsonReader::Boolean: printf("Boolean: %s\r\n", jsonReader.booleanValue() ? "true" : "false");
break;
case JsonReader::Null: printf("Null: (null)\r\n");
break;
default:
printf("Undefined!\r\n");
break;
}
break;
case JsonReader::Field: printf("Field %s\r\n", jsonReader.value());
break;
case JsonReader::Object: printf("Object (Start)\r\n");
break;
case JsonReader::EndObject: printf("Object (End)\r\n");
break;
case JsonReader::Array: printf("Array (Start)\r\n");
break;
case JsonReader::EndArray: printf("Array (End)\r\n");
break;
case JsonReader::Error: printf("Error: (%d) %s\r\n", jsonReader.lastError(), jsonReader.value());
done=true;
break;
}
}
milliseconds end = duration_cast<milliseconds>(system_clock::now().time_since_epoch());
printf("Scanned %lli nodes and %llu characters in %d milliseconds using %d bytes of LexContext\r\n",nodes,fileLC.position()+1,(int)(end.count()-start.count()),(int)fileLC.used());
fileLC.close();
Sorry for the long code. As you can see they are not at all easy to use but they are easier than a SAX XML parser.
Some advanced ones (like my recent offerings ) support querying and data extraction to make it easier. In the case of mine it's also more efficient to query than it is to stupidly read() through the whole file like the above. But the above is a standard pull parse.
Real programmers use butterflies
|
|
|
|
|
Is it a pushmi-pullyu[^] that eats parsnips?
"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!
|
|
|
|
|
Hmmm,
I don't think the terminology you are using is as universal as you think it is. Outside of XML/JSON parsing and maybe compiler construction nobody uses that label for such a simple algorithm. It looks like Stefan Haustein came up with that name when he was writing kXML. Then it seems Aleksander Slominski wrote a paper using the same nomenclature in 1998 and it's been growing ever since. I can't find any reference to 'Pull parsing' before 1998.
Looks like 100% of the patents than mention 'Pull Parsing' are XML related[^].
I'm going to rename it Pull-My-Finger parsing and see if it catches on.
|
|
|
|
|
I don't how universal it is - that's what i'm trying to figure out. I just don't know that there's another term for the model.
I've implemented pull parsers for all kinds of sources. Recently, I implemented a crazy efficient querying pull parser that can process bulk JSON even on an 8-bit arduino with 8kb ram (it actually needs a lot less ram than that in practice), and blazes on a real computer
Diet JSON and a Coke: An exploration of incredibly efficient JSON processing[^]
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I don't how universal it is - that's what i'm trying to figure out. I just don't know that there's another term for the model. It doesn't really matter... occupational nomenclature is invented. If you write an article on 'Pull Parsers' then perhaps 1,000,000 more people will use that name. That's sorta how it works.
honey the codewitch wrote: I've implemented pull parsers for all kinds of sources. I can see that you enjoy parsing. And I enjoy reading your journey.
Best Wishes,
-David Delaune
|
|
|
|
|
I'm pretty much with Randor on you should use it, people should have the wherewithal to look it up, or if it's an article aimed a beginners a brief description (+ more in depth links) of the terms might be appropriate. It's a technical article, so technical language is fine, and you'll help spread the terms.
To answer your direct question - no I haven't heard Push/Pull parser but mostly worked it out from the context.
|
|
|
|
|
Thank you. That's helpful.
Real programmers use butterflies
|
|
|
|
|
I've learned quite a lot from your musings in the lounge, but I've only skimmed through your technical articles on parsing, as they are way to specific for my needs.
Which means my knowledge on parsing is still fairly superficial, so any reasonably easy to read breakdown on the principles (not just push vs pull) would be appreciated.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
Thanks. Here's a comment i just posted to RickZeeland which should hopefully serve as a quick explanation. I included code in it just so you could see it in all it's ugliness.
The Lounge - Pull Parsing[^]
Real programmers use butterflies
|
|
|
|