Node.js bindings would be awesome, especially for writing a headless website parser. I just forked Gumbo and gave it a shot, but my limited experience of v8 didn't get me very far. I was able to create and build a basic plugin, but returning the scope with a Gumbo object was beyond my limited capabilities. I think as a little side project I may continue to work on this.
Google Open-Sources Gumbo: C Library for Parsing HTML5
31–40 of 63 posts
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#32Um... Incoming Naive Questions. Why do we need yet another HTML5 Parser? What's wrong with Webkit? What's wrong with the new Gecko2 HTML5 parser? And what license is it?
Compared to Gecko and WebKit, this gives you just the parser, which is significantly simpler than the whole engine and all you want for many applications.
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#33Node.js bindings would be awesome, especially for writing a headless website parser. I just forked Gumbo and gave it a shot, but my limited experience of v8 didn't get me very far. I was able to create and build a basic plugin, but returning the scope with a Gumbo object was beyond my limited capabilities. I think as a little side project I may continue to work on this.
Nice idea, give the repo an I'll give it a push =)
I'm giving it another crack now.
You can see my first attempt at https://github.com/jbrooksuk/gumbo-parser/commit/d64f78b125f... - unfortunately it's not quite there. I can't figure out how to send back the struct created by Gumbo.
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#34Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#35Node.js bindings would be awesome, especially for writing a headless website parser. I just forked Gumbo and gave it a shot, but my limited experience of v8 didn't get me very far. I was able to create and build a basic plugin, but returning the scope with a Gumbo object was beyond my limited capabilities. I think as a little side project I may continue to work on this.
Nice idea, give the repo an I'll give it a push =)
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#36Can you comment on why this is C and not C++? (Although some examples are in C++)
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#37Nice to see they've written the parser from scratch rather than some BISON and FLEX construct that generates impenetrable code.
Do you often read the output of some library macros that the C pre-compiler generates?
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#38Earlier quoted context omitted.
I'd be interested in reading about your learning when moving from a UI -> Algo heavy engineer :)
It's a long story, and it's also not complete yet (I'm actually doing very UI heavy work right now as a tech lead). It's also not really correct to say it started with UI - I was big into programming language theory in college, even implementing a bunch of toy interpreters/compilers, one of which even got some measure of fame on the Internet. The 5 second overview is really that it's the same as getting good at any n…
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#39Earlier quoted context omitted.
Who says I didn't go insane? ;-) The crazy edge cases were...challenging. The source code to the parser is very assert-heavy, so if there's anything that's amiss, it tends to blow up with an assertion failure. I'd run the MapReduce and it would blow up a few hundred times, then MapReduce would stop trying and kill the job. Then when I had a spare moment, I'd look at the assertion failures, pick off the most common on…
I like programming assert-heavy C. As soon as something is out of wack with my mental model the whole thing explodes. I sure as hell don't want to try handling things I don't already understand.
Re: Google Open-Sources Gumbo: C Library for Parsing HTML5
#40Can you comment on why this is C and not C++? (Although some examples are in C++)