Camelia, the Perl 6 bug

IRC log for #mojo, 2011-02-10

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:45 perlrocks Twitter: "@keithbro @AFreshOne is right, you'll have much more fun with Mojolicious.  It makes you pie made of unicorns and rainbows." --tempiretech http://twitter.com/tempirete​ch/status/35499510469754880
00:46 sri that does not sound very tasty
00:49 Alias You clearly don't know the right unicorns
01:47 tempire mateu: glad you liked it
01:47 tempire I thought everyone knew about Mojo::DOM/Client already.
01:47 * tempire lives in a bubble
01:47 mateu not us newbs
01:48 * mateu pops tempire 's bubble, come on out ;)
01:48 * sri hates html
01:48 * tempire dies
01:48 mateu hahaha
01:48 * sri is adding html quirks to Mojo::DOM now
01:48 tempire I've stopped using lwp completely.
01:49 mateu sri is it a love/hate relationship?
01:49 tempire what sort of quirks?
01:49 mateu like smacking one's lips when eating?
01:50 sri i want to smack it with a shovel, repeatedly
01:50 * mateu rofls
01:51 sri optional tags
01:51 sri you know <div><p>lalala</div>
01:52 sri yea thats valid html5
01:52 mateu I guess when it's a "relaxed" parser it actually has to do more work behind the scenes.
01:52 sri equivalent to <div><p>lalala</p></div>
01:53 sri it tries to, but still has some problems with real world html
01:53 sri people out there use all quirks :(
01:53 sherr left #mojo
01:54 sri what really drives me insane is tables, there you have nested optional tags
01:55 mateu i can hardly imagine trying to accomadate all quirks. I have enough trouble parsing my own html5 syntax.
01:55 sri http://www.w3.org/TR/html5​/syntax.html#optional-tags
01:55 sri http://www.w3.org/TR/html5/tabu​lar-data.html#the-thead-element # great example here
01:56 mateu it's interesting how html5 regressed back to old days html allowance.
01:57 mateu I guess the weight of the existing web pages caused the "them" to give in.
01:57 sri i like most of it
01:58 mateu I don't mind things like <script> implying  type=text/javascript
01:58 sri but those quirks make implementing a parser really really hard
01:58 Alias HTML is highly non-trivial
01:58 sri yea
01:58 mateu how else does one do it at the base level other than dirty regex's
01:58 Alias It's turing-complete SGML
01:58 Alias evil evil stuff
01:59 Alias I've got a "combat grade" HTML parser I wrote once
01:59 mateu combat grade++
01:59 sherr joined #mojo
01:59 Alias For scraping bank websites that intentionally use every trick in the book to prevent anything other than browsers parsing them
02:00 sri how did you handle optional tags?
02:00 mateu optional closing tags in particular right?
02:00 Alias I apply three or four pre-processing passes, then assume the entire page is junk and just target the very specific tags I'm interested in
02:00 sri ah
02:01 Alias And build up a "DOM subset" or sorts which only included things like <for> and <input>
02:02 Alias LWP couldn't handle half the pages I was scraping, because the things it uses do full parsing
02:02 Alias It's an approach inspired (again) by dreamweaver and PPI, but without the need for the fully rigourous "round-trip" mutability
02:02 Alias So actually implementable in something less than 3 years :)
02:03 tempire round trip is hard
02:03 Alias Not really
02:04 Alias Round trip is easy in principle
02:04 Alias Just hard to keep it intact and also have a high-coverage parser
02:04 Alias If you're only parsing 1% of the content, the rest of the document is just a bunch of "unknown" tokens holding their original string form
02:05 Alias It's definitely fidgety the first time you write one, but I wouldn't call it "hard"
02:05 Alias God help whoever wrote the original dreamweaver parser through
02:05 Alias I stole liberally from them
02:06 Alias It's way easier to write something when you've got a working example to play with
02:06 Alias Doing it with little or no serious prior art would have been a bitch
02:06 Alias Maybe they were an academic or something
02:37 GabrielVieira left #mojo
02:39 GitHub189 joined #mojo
02:39 GitHub189 mojo: master Sebastian Riedel * 28e7b51 (3 files in 3 dirs): improved HTML5 compatibility of Mojo::DOM - http://bit.ly/hTFB9c
02:39 GitHub189 left #mojo
02:43 tempire What should my next topic be?
02:43 sri unicorns
02:43 purl i guess unicorns is http://xrl.us/2dn5
02:43 * sri slaps purl
02:43 purl o/` Hit me baby, one more time o/`
02:43 tempire Mojo::Unicorn
02:44 tempire I'm still waiting on the new banner that has a snowman destroying new york with laser beam eyes
02:45 perlrocks Twitter: "The #mojolicious test suite has grown to almost 11k lines of code. :) #perl" --kraih http://twitter.com/kraih/status/35529725392715776
02:46 sri maybe for a t-shirt design :)
02:49 perlrocks Twitter: "What's delaying Mojolicious released yet." (ja) --5_1_5 http://twitter.com/5_1_5/status/35530694507626496
02:50 metaperl joined #mojo
02:50 tempire Japan is putting the pressure on.
02:51 tempire I vote for a hidden canhaz alias to 'has'
02:52 * sri votes for it too
02:52 perlrocks Twitter: "Mojo:: JSON is fastest pure-perl parser now, great! But that does no good for the rest of the Perl world. No deps is kinda like Galapagos." (ja) --sartak http://twitter.com/sartak/status/35531510383648768
02:53 Alias You've got a small standalone JSON parser?
02:53 sri a really good one
02:53 sri chansen recently tuned it quite a bit
02:53 Alias Suitable to fork as JSON::Tiny?
02:54 Alias Well, fork in the sense of spin off and then embed back into Mojo per other ::Tiny embedding
02:54 sri it is quite independent, should be easy
02:54 Alias I've been meaning to write one for years
02:55 Alias But JSON::PP always seemed "good enough"
02:55 Alias And not bloaty enough
02:55 Alias If you've already done the work for it though...
02:55 sri it looks rather good too
02:55 Alias url to repo for file?
02:56 sri https://github.com/kraih/mojo​/blob/master/lib/Mojo/JSON.pm
02:57 sri https://github.com/kraih/moj​o/blob/master/t/mojo/json.t # well tested too
02:57 Alias Your boolean typing looks a bit weird
02:58 Alias Although I can't say I'd necesarily do better
02:59 Alias It could be faster though
03:00 Alias Your 5.008 dep might not be a good thing for tiny'ifying
03:00 * sri really needs to sleep
03:00 sri nn
03:00 Alias And it looks like a fair chunk of work otherwise, so I'll leave investigate to another day I think
03:00 Alias later
03:02 sri mateu: btw. http://suryahunter.com/wiki/hunter​/perl_ironman/Comparing_Selectors # you might want to mention that Mojo::DOM actually supports all css3 selectors
03:03 MisterHatt 03:42 <@tempire> I'm still waiting on the new banner that has a snowman destroying new york with laser beam eyes
03:03 sri Zzz
03:03 MisterHatt when this happens, plz2have vector of it so II can feed it into our laser
03:03 MisterHatt channel I'm in just got a laser for tracing vectors and taking photos, kinda cool
03:04 MisterHatt sri: before you go, testing suite is 11k lines, and mojo itself is how much less?
03:04 sri also about 11k :)
03:04 sri 50:50
03:04 sri \o/
03:04 sri now really Zzz!
03:05 MisterHatt o/
03:08 mateu sri: cool.  can I say that it is no longer experimental too?
03:10 stephen left #mojo
03:36 gshank left #mojo
03:36 gshank joined #mojo
03:42 sherr left #mojo
03:48 sherr joined #mojo
03:56 gshank_ joined #mojo
04:00 gshank left #mojo
04:03 tholen42 joined #mojo
04:05 tl left #mojo
05:19 perlrocks Twitter: "What do I do Mojolicious of Internal Testing ..." (ja) --shiba_yu36 http://twitter.com/shiba_yu​36/status/35568456153841664
05:42 gshank joined #mojo
05:47 gshank_ left #mojo
06:37 koban joined #mojo
06:44 kaare joined #mojo
06:49 ysyrota joined #mojo
06:59 Alias left #mojo
07:19 perlrocks Twitter: "[I made] [perl] Mojolicious:: Plugin:: CSRFDefender that made http://htn.to/oxGoSK" (ja) --shiba_yu36 http://twitter.com/shiba_yu​36/status/35598654853095424
07:19 MojoGuest378 joined #mojo
07:19 MojoGuest378 is now known as yko
07:19 yko Shebsockets!
07:21 perlrocks Twitter: "[I made] Mojolicious plug-ins can be made into anti-CSRF / Mojolicious:: Plugin:: CSRFDefender made that - Dive into the Tech World! Http://htn.to/oxGoSK" (ja) --shiba_yu36 http://twitter.com/shiba_yu​36/status/35599131145666560
07:51 Christian joined #mojo
07:51 Christian morning
08:10 breaker313 joined #mojo
08:18 otaviof left #mojo
08:34 AmeliePoulain joined #mojo
08:40 perlrocks Twitter: "I caught @ thinca of XML:: LibXML:: Node is. Moose, Mojolicious, Text:: Xslate well as a manual stand-alone and it comes with a POD." (ja) --5_1_5 http://twitter.com/5_1_5/status/35619130048520192
08:57 breaker313 left #mojo
08:59 breaker313 joined #mojo
09:01 otaviof joined #mojo
09:03 crab the mojo docs say "minimalistic" a lot.
09:06 moritz minimalistic depends on your point of view
09:07 moritz I wouldn't call something minimalistic that comes with its own client, and does DOM parsing
09:07 moritz OTOH there are frameworks that do multi-page wizards for you - compared to that, mojolicious is minimalistic :-)
09:12 yko left #mojo
09:15 ispy_ left #mojo
09:24 crab it doesn't say mojolicious is itself minimalistic. "minimalistic cookie jar", "minimalistic dom parser", "minimalistic json parser", "minimalistic template engine" etc.
09:27 crab animalistic web framework!
09:46 ispy_ joined #mojo
09:48 marcus minimalist dependency avoidance
09:48 crab wouldn't minimalist dependency avoidance imply a lot of dependencies?
09:50 moritz ain't never been not that way!
09:53 MojoGuest511 joined #mojo
09:55 MojoGuest511 left #mojo
10:15 marcus crab: not really
10:22 spleenjack joined #mojo
10:23 su-bzero` sri: What about getting TTL for a hostname over DNS request in Mojo?
11:09 breaker313 left #mojo
11:11 tl joined #mojo
11:16 tholen42 left #mojo
11:17 jwang joined #mojo
11:19 tholen42 joined #mojo
11:20 yko joined #mojo
11:21 tl left #mojo
11:44 rupertthehacker joined #mojo
11:46 maja joined #mojo
11:46 maja left #mojo
11:47 maja joined #mojo
12:00 marcus sri: Good alternative to 'Love Hotel' - http://www.fileformat.info/inf​o/unicode/char/1f47e/index.htm
12:17 breaker313 joined #mojo
12:22 chansen 🐫
12:45 Shaeto joined #mojo
12:46 breaker313 left #mojo
12:53 breaker313 joined #mojo
13:26 ispy_ left #mojo
13:50 marcus http://suryahunter.com/wiki/hunter​/perl_ironman/Comparing_Selectors
13:55 vel joined #mojo
14:01 daviddelikat1 left #mojo
14:15 breaker313 left #mojo
14:15 spleenjack left #mojo
14:17 fhelmber_ joined #mojo
14:17 spleenjack joined #mojo
14:29 su-bzero` is now known as su-bzero[A]
14:29 su-bzero_ left #mojo
14:29 su-bzero[A] is now known as su-bzero`
14:31 rupertthehacker left #mojo
14:32 mattastrophe left #mojo
14:33 kaare left #mojo
14:35 su-bzero joined #mojo
14:38 sri marcus: lol!
14:41 marcus sri: =)
14:42 sri unicode really has everything
14:44 moritz that alien remotely remided me of the Flying Spaghetti Monster
14:48 su-bzero` is now known as su-bzero[A]
14:52 marcus too bad there's so few complete unicode fonts
14:53 chansen sri: no Klingon support in unicode =(
14:53 marcus also, no robots
14:53 marcus how can unicode be complete without robots?
14:53 ispy_ joined #mojo
14:53 sri nuqDaq 'oH puchpa''e'!!!
14:54 chansen marcus: 💩
14:55 * chansen ... U+1F4A9 PILE OF POO
14:56 marcus chansen: maybe not a good mojolicious release codename
14:59 chansen ok, lets define a private char,  U+E000 PILE OF MOJOLICIOUS
15:00 sri
15:05 chansen 🍻
15:06 kaare joined #mojo
15:13 kaare left #mojo
15:19 kaare joined #mojo
15:19 perlrocks Twitter: "Mojolicious-Plugin-CaptchaRenderer 12:02 by DMITRYNOD - http://frepan.org/ ~ dmitrynod/Mojolicious-Plugin-CaptchaRenderer-0.02 /" (lv) --cpan_new http://twitter.com/cpan_ne​w/status/35719507788054528
15:27 bellaire joined #mojo
15:38 tholen joined #mojo
15:40 Shaeto left #mojo
15:44 koban left #mojo
15:47 GitHub146 joined #mojo
15:47 GitHub146 mojo: master Sebastian Riedel * 9a0bd92 (1 files in 1 dirs): improved tests - http://bit.ly/hmozVT
15:47 GitHub146 left #mojo
15:54 sri https://github.com/kraih/mojo/​blob/master/t/mojo/dom.t#L906 # this is actually valid html :)
15:54 sri (except for the missing doctype)
15:55 sri you can even leave out html, head and body tags completely
15:59 sri we do not currently rewrite the dom with implicit tags atm though, i wouldn't reject a patch for it though
16:00 sri *-atm
16:01 sri that would require a separate html mode though i guess
16:02 sri i kinda like the thought of a parser that just eats everything that looks a bit like xml or html and makes sense of it, even if it isn't perfectly spec compliant
16:03 Christian left #mojo
16:04 otaviof left #mojo
16:06 moritz sri: like Marpa::HTML does
16:08 sri that would be more html specific
16:19 crab http://toroid.org/ams/etc/mixing-http-and-https <- there, all spelled out properly
16:22 Alias_ left #mojo
16:24 spleenjack left #mojo
16:24 spleenjack joined #mojo
16:34 sri crab: yea, switching between http and https is never easy
16:38 sri it's one of the things that makes developing in multiple stages hard
16:40 sri marcus: check out http://www.sparrowmailapp.com
16:40 sri that will change email
16:42 crab sri: funny thing is, if i just expose my mojo daemon --listen https://x --listen http://y to the world, it would be trivial :-)
16:42 sri hehe
16:43 sri if your site is small enough
16:43 sri at some point you'll want to load balance to multiple daemons though
16:44 moritz 90% of all sites (or probably much more) never need to be scaled to more than one daemon
16:45 sri 99% of all sites don't use https ;p
16:45 moritz and 89% of all statistics are freely invented :-)
16:45 sri :D
16:45 crab is it worth trying to exclude modules i don't need while building nginx?
16:47 otaviof joined #mojo
17:27 GitHub127 joined #mojo
17:27 GitHub127 mojo: master Abhijit Menon-Sen * 5628984 (8 files in 4 dirs): Some minor doc fixes ...
17:27 GitHub127 mojo: master Sebastian Riedel * a5ff541 (3 files in 2 dirs): cleanup
17:27 GitHub127 mojo: master commits 9a0bd92...a5ff541 - http://bit.ly/hxAFB3
17:27 GitHub127 left #mojo
17:35 marcus sri: bought sparrowmail this morning.
17:35 marcus arne showed it to me.
17:35 marcus sri: it's pretty great, if a bit buggy still
17:39 arthas joined #mojo
17:40 marcus also, I kind of miss 'reply and archive'
17:50 GitHub55 joined #mojo
17:50 GitHub55 mojo: master Sebastian Riedel * 6cc06d0 (1 files in 1 dirs): fixed small get command bug - http://bit.ly/hxUCPY
17:50 GitHub55 left #mojo
17:50 chansen marcus: is it good?
17:51 marcus chansen: yes, it's great.
17:51 marcus at least for me, but I use gmail.
17:51 sri yay "mojo get -r -v google.com title" working
17:51 chansen no support for IMAP?
17:51 sri in the next version the description says
17:52 sri gmail only atm
17:52 chansen hmm
18:08 MojoGuest119 joined #mojo
18:08 MojoGuest119 From: http://www.google.com/url?sa=t&amp;source=web&​amp;cd=4&amp;sqi=2&amp;ved=0CC8QFjAD&amp;url=h​ttp%3A%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=​websockets%20demo&amp;ei=iyhUTbzeHcjUgQfnufj6C​A&amp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
18:08 MojoGuest119 left #mojo
18:21 jamesw left #mojo
18:32 stephen joined #mojo
18:59 MojoGuest675 joined #mojo
18:59 MojoGuest675 From: http://news.ycombinator.com/item?id=1277067 (212 hits)
18:59 MojoGuest675 left #mojo
19:01 MojoGuest584 joined #mojo
19:01 MojoGuest584 From: http://news.ycombinator.com/item?id=1277067 (214 hits)
19:04 spleenjack left #mojo
19:07 MojoGuest584 test...
19:07 MojoGuest584 left #mojo
19:08 sri tempire: you could write about css selectors
19:08 sri i think many people don't get yet how powerful they actually are
19:13 MojoGuest23 joined #mojo
19:13 MojoGuest23 From: http://news.ycombinator.com/item?id=1277067 (216 hits)
19:13 MojoGuest23 left #mojo
19:19 MojoGuest870 joined #mojo
19:19 MojoGuest870 From: http://news.ycombinator.com/item?id=1277067 (217 hits)
19:20 MojoGuest870 left #mojo
19:55 arthas left #mojo
20:10 ispy_ left #mojo
20:17 fhelmber_ left #mojo
20:49 mattastrophe joined #mojo
21:13 JonChisciotte1 joined #mojo
21:17 ysyrota left #mojo
21:23 JonChisciotte1 hi, I'm trying to send a file through FileAPI; it seems working correctly javascript side, server side should answer mojo but it seems it cannot even find the route. The log shows: Mojo::Server::Daemon:180 [3669]: Event "read" failed for connection "c0351c0": Can't locate object method "error" via package "Mojo::Content::MultiPart" at /usr/local/share/perl/5.10.​0/Mojo/Content/MultiPart.pm line 161. Any idea?
21:26 sri JonChisciotte1: which version of mojolicious?
21:27 JonChisciotte1 sri, I think 1
21:27 JonChisciotte1 is now known as JonChisciotte
21:31 sri JonChisciotte: you've done something wrong and found a mojolicious bug :)
21:32 JonChisciotte sri: yeah! which is the prize!? :)
21:37 JonChisciotte uh, none? Ok... I don't know what I've done wrong but glad to be usefull. Anyway I used this code in js, http://paste.pocoo.org/show/336095/ , it doesn't seems to me to be wrong: firebug shows a post messsage with the file in it. Is there something I can do to get more infos to debug mojo' side?
21:38 sri your content type is missing the boundary
21:39 sri you can get marcus for an hour if you like :)
21:39 ato joined #mojo
21:39 * sri pokes marcus
21:39 ato Which is the most commonly used DB solution for Mojo that supports PostgreSQL?
21:40 ato I couldn't find much documentation on databases and Mojolicious out there.
21:40 sri you use whatever you like
21:40 sri like in a normal perl script
21:40 JonChisciotte sri: uhm, shoudn't be added by the xhr itself? Uhm, dunno, anyway I gotta go in less then an hour, I'll wait here or I'll be back tomorrow
21:40 sri JonChisciotte: the error is triggered by a missing boundary
21:41 ato sri: Right.  But I'm not very familiar with writing web applications or working with databases in Perl.
21:41 ato I'm preferably looking for something ORMish.
21:41 sri ato: well, i'm a nosql fan, doubt i would be of much help
21:42 bellaire most pop'lar SQLish ORMish thingies for Perl seem to be DBIx::Class and Rose::DB
21:45 JonChisciotte sri: yep, I'm not adding it in the header.. I'm going to search for som doc..
21:51 marcus sri: I think you must confuse me with mst.
21:53 GitHub159 joined #mojo
21:53 GitHub159 mojo: master Sebastian Riedel * 949a73e (4 files in 4 dirs): fixed a small multipart parser bug - http://bit.ly/geneN4
21:53 GitHub159 left #mojo
21:53 sri JonChisciotte: won't really help you but the bug is fixed
21:53 sri was some leftover code from the last refactoring
21:54 JonChisciotte sri: thank you, when will it be available on cpan?
21:54 sri next few days
21:54 purl next few days are murder
21:55 marcus meaty delicious murder
21:55 JonChisciotte ehi, I don't want to be the cause or the spectator of a crime..  :)
21:55 * sri glares at marcus
21:56 marcus sri: looks like you just removed an error message?
21:56 sri yea, it was useless
21:57 marcus if multipart bounday is missing it is not multipart?
21:57 sri instead we can simply pass along the raw message, way better debug information
21:57 marcus mkay, makes sense.
21:58 sri that said, i'm not 100% happy with error messages from the parser layer
21:58 sri maybe next summer of code -.-
22:00 bellaire left #mojo
22:02 marcus so not going to mentor
22:03 sri "...and all i got was this ugly green t-shirt!"
22:03 marcus hrm, I really need to get the ssd installed in my laptop
22:03 marcus hdd sucking life out of me.
22:03 perlrocks Twitter: "Sign up for our Mojolicious event kicking off fashion week on February 12th 2011. 100 dollars per ticket. includes... http://fb.me/RiBHutgd" --bibisalonnyc http://twitter.com/bibisalon​nyc/status/35821270826221568
22:04 sri argh
22:04 sri get out of our twitter stream hipsters!
22:21 JonChisciotte uhm, it seems I've sent the file and the route answered, but I'm not sending a form and there is no input field, so I cannot call $self->req->upload on some field. I dumped the $self->req and saw the file in _buffer key. How to retrieve it? I cannot understand reding Mojo::Message::Request.
22:22 sri JonChisciotte: like i said before, your request is wrong
22:22 sri it has nothing to do with mojolicious
22:24 dekimsey left #mojo
22:26 sri JonChisciotte: you can observe all wire activity by starting the daemon with MOJO_DAEMON_DEBUG=1
22:26 sri then you can confirm that the request is valid
22:28 JonChisciotte sri: thanks!
22:38 JonChisciotte uhm, what's wrong in it? http://paste.pocoo.org/show/zK1gFqnRqNOwzw0yZZZ9/ . Or could you point me to some doc to check?
22:41 sri depends what you're trying to achieve
22:42 sri before you were showing me the result of a multipart request, that's something entirely different now
22:42 sri surely not a multipart upload
22:43 sri you can just my $file = $self->req->body;
22:43 sri looks like a post or put upload
22:44 JonChisciotte yep, it is.. I'm sorry I cannot give you more details, it's my first time with FileAPI and a "pure" xmlhttprequest. I just want to save a file to a server from a web interface. Gonna make the last try with req->body.
22:51 JonChisciotte Uhm,m I think I'm slowly understanding what's going on... but I must go to sleep to avoid car incidents tomorrow, thank you, cya! :)
22:52 JonChisciotte left #mojo
23:02 kaare left #mojo
23:39 Alias joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary