#microformats 2013-11-13

2013-11-13 UTC
Atamido, tantek, tobyink, barnabywalters, encolpe and pfefferle joined the channel
brianloveswords_ joined the channel
#
barnabywalters
tommorris: I cloned mf2py yesterday, just having a look over it now
#
barnabywalters
what’s with the nested functions? they’re not closures, right, so why nest them? doesn’t it just make them difficult/impossible to test?
#
tommorris
Yeah. And that's a bad thing.
#
tommorris
It's more to wrap functionality. Python doesn't have private methods
#
tommorris
I probably ought to split them out
#
barnabywalters
oh right — isn’t that what the __ name munging was supposed to fix?
#
tommorris
yeah, and I think that's really clumsy and hacky. ;)
#
barnabywalters
yeah, it is pretty ugly
#
tommorris
I tend to write in a very functional way, but Python's lambda syntax is one-line only.
#
barnabywalters
what’s the problem with publicly exposing the functions?
#
tommorris
nothing in particular, it's just mixing parser interface and parsing code
#
tommorris
might refactor it to have a wrapper class to provide an interface
#
barnabywalters
with php-m2 v0.2 I added the Mf2\parse() function, which is the interface
#
barnabywalters
then the class is available for people who want to do more advanced stuff
#
tommorris
That's probably the sensible way to do it
#
barnabywalters
so, I can see a bunch of parsing logic which looks wrong-ish — I’ll see if I can add some tests which break it
TallTed joined the channel
#
tommorris
barnabywalters: breakage is appreciated. I'll probably crank on with it a bit at the weekend
tantek joined the channel
#
barnabywalters
we need to talk to gjones about updating the mf2 test suite and making it easier to use
#
barnabywalters
I have a bunch of really specific tests from php-mf2 I can contribute
#
barnabywalters
then we just need a hosted version with a UI for providing an endpoint which runs POSTed HTML through the parser and returns parsed JSON
#
barnabywalters
so any parser can be tested against the same suite in-browser
#
barnabywalters
now there are parsers being built in at least 4 languages
#
tantek
that's awesome!
#
tantek
re: gjones
#
tantek
can we host the test suite at github.com/microformats/ (or do we already?)
#
tantek
perhaps follow-up with issues there to make the changes you want? I think Glenn sees those.
#
barnabywalters
but it’s tricky to use and contribute to
#
barnabywalters
I’ll add some issues
#
barnabywalters
I seem to remember gjones having a hosted version somewhere already, I just can’t find a link to it anywhere
#
barnabywalters
so http://microformat2-node.jit.su/mocha-v2.html runs the test suite over gjones’ lib
#
barnabywalters
we basically need that with a URL field
#
tantek
sounds like a good plan
Phae and encolpe joined the channel
#
aaronpk
whoa this test suite repo is awesome
#
barnabywalters
aaronpk: indeed it is
#
barnabywalters
the test markup vocab is very specific, but otherwise it’s brilliantly put together
gavinc joined the channel
#
aaronpk
good idea running the tests via a browser too, that makes it easier to get working
tobyink, tantek, jgay, barnabywalters and iwaim_ joined the channel
#
tantek
edited /value-class-pattern (+35) "as part of the microformats2 parsing spec, and being mutiply implemented and published, this is certainly draft spec status"
(view diff)
tantek, KevinMarks and tobyink joined the channel
#
@ridgetrail
Full Moon hike on the Ridge Trail in Lynch Canyon! This Sunday, Nov 17, with Bay Area Ridge Trail Council... http://www.solanolandtrust.org/CalendarList.aspx?hCalendar=1
(twitter.com/_/status/400772022575583232)