Camelia, the Perl 6 bug

IRC log for #mojo, 2011-03-26

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

All times shown according to UTC.

Time Nick Message
00:12 kvorg joined #mojo
00:21 Akron sri: Not "right" but should work - http://pastebin.com/tRaeAGpx
00:24 sri Akron: what do you mean not right?
00:24 Akron It's relaxed.
00:24 sri can you be more specific?
00:27 Akron It accept's non well-formed input - however, it treats well-formed input right. You can e.g. make a PUBLIC external entity declaration without a system literal.
00:28 sri that doesn't matter for us anyway
00:28 Akron I thought so.
00:29 Akron However - the literals make it a little tricky - that's why I had to add them. because people are allowed to create literals like "]" or something ... but there maybe an easier way.#
00:31 sri comments usually help a lot too
00:32 sri little late to dissect regular expressions :S
00:32 kvorg left #mojo
00:34 Akron Ah - wait - I've got a simpler one!
00:36 sri Akron: umm, did you actually test it?
00:36 sri because it breaks tests
00:36 Akron Yes ... ? Really? Not here ... maybe I ran the test wrong ...
00:37 Akron I'll check again - sorry.
00:39 sri the test case is a bit broken, but there is no way tests could pass for you
00:41 sri ok, even with a proper cut'n pasted doctype it does not pass
00:44 sri if i don't answer later i prolly fell asleep
00:45 sri guess you'll have to make many many test cases anyway ;p
00:45 Akron Yes - now it's broken over here too - I ran the wrong version ... stupid me. :(
00:47 sri happens
00:52 stephen left #mojo
01:12 perlrocks Twitter: "Perl-Mojolicious/Apache to deploy CGI - yanor.net / wiki http://bit.ly/gR3veg" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/51451466191347712
01:20 jdixon left #mojo
01:44 Akron sri: Where do you find this: <!DOCTYPE H "-/W/D HT 4/E">? You shuld not play with the Schmuddelkinder!
01:44 Akron sri: Here are tests and a working version - http://pastebin.com/gvFmjZKa
01:45 Akron sri: Hopefully now it works ... :)
02:10 GitHub138 joined #mojo
02:10 GitHub138 mojo: master Sebastian Riedel * 05a9cf7 (3 files in 3 dirs): improved Mojo::DOM inline DTD support - http://bit.ly/i7takg
02:10 GitHub138 left #mojo
02:10 sri Akron: looks good
02:10 Akron Juhu!
02:11 Akron Thank you!
02:12 sri Akron++
02:12 Akron :)
02:13 Akron ... finally ... enough dirty doctypes for today. Good night everybody!
02:14 sri good idea... nn
02:14 Akron left #mojo
03:53 mattastrophe joined #mojo
04:13 arpadszasz joined #mojo
05:54 kaare joined #mojo
06:07 ispy_ joined #mojo
06:47 ispy_ left #mojo
07:00 kvorg joined #mojo
07:19 crab i despair of perl documentation.
07:50 arpadszasz left #mojo
08:01 * crab tries to understand Mojo::Upload's handle method
08:03 crab s/Upload/Asset::File/
08:10 crab sri: there is a race condition between the while (-e $file){$file = $base.$rand} ... open(..."+> $file")
08:10 crab sri: it seems not very important in practice, but would you accept a patch to use sysopen O_CREAT|O_EXCL instead to close the window?
08:12 crab sri: also, is it intentional that the fact that a Mojo::Upload's asset is always an Asset::File is undocumented?
08:12 crab (i.e. is it something that i shouldn't rely on, e.g. by calling ->handle?)
08:31 bosphorus joined #mojo
08:59 fhelmber_ joined #mojo
09:12 perlrocks Twitter: "Mojolicious-Plugin-Authentication v0.01 by MADCAT - http://frepan.org/~madcat/Mojolic​ious-Plugin-Authentication-v0.01/" --cpan_new http://twitter.com/cpan_ne​w/status/51572098858106881
09:18 perlrocks Twitter: "Mojolicious-Plugin-Database v0.03 by MADCAT - http://frepan.org/~madcat/Mojo​licious-Plugin-Database-v0.03/" --cpan_new http://twitter.com/cpan_ne​w/status/51573748335259648
09:21 perlrocks Twitter: "Mojolicious-Plugin-Authentication v0.02 by MADCAT - http://frepan.org/~madcat/Mojolic​ious-Plugin-Authentication-v0.02/" --cpan_new http://twitter.com/cpan_ne​w/status/51574490743840768
09:24 perlrocks Twitter: "Updated #mojolicious plugin Mojolicious::Plugin::Database, BitBucket at http://j.mp/eGggf3 and soon on a CPAN near you." --perlninja http://twitter.com/perlninj​a/status/51575322923118592
09:25 perlrocks Twitter: "Updated #mojolicious plugin Mojolicious::Plugin::Authentication, BitBucket at http://j.mp/eYo0Mr and soon on a CPAN near you." --perlninja http://twitter.com/perlninj​a/status/51575500975517696
09:30 crab well, obviously i can't depend on it. it isn't true.
09:42 PerlNinja joined #mojo
09:55 crab aha. so it's perlninja.
09:55 * PerlNinja hides in the corner
09:56 PerlNinja you saw nothing!
09:56 PerlNinja hi :)
10:02 PerlNinja ok curiosity getting the better of me here, you made that sound as if you were looking for me or something
10:03 crab nah. i just suddenly made the bert (on list) <-> MADCAT (on cpan) <-> perlninja (on irc) connection
10:09 PerlNinja haha
10:09 PerlNinja yeah
10:09 PerlNinja slight unfortunate accident with nicks being taken and so on
10:10 PerlNinja anyway.. back to wiring a JS interpreter into a Mojolicious app... frankenstein at it's best
10:15 moritz PerlNinja: if you succeed, and build a DOM somehow, please let me know - I'd love that for testing
10:17 PerlNinja explain :) Because I already have the ability to run JS inside a Mojolicious app thanks to JSP
10:17 moritz can you run jquery and access the DOM of the pages you generate?
10:21 PerlNinja ohh... hmm no idea to be honest, the way it's used now is that it lets people write extensions for the app in JS given that the place I'm building it for wants it that way
10:21 PerlNinja let me see if I understand, you want to manipulate the generated output from inside Mojolicious using jQuery?
10:24 PerlNinja or rather, usage example please :D since I'm messing with this stuff anyway might as well see if I can mess with it some more :D
10:28 moritz PerlNinja: actually I want to test the JS on my generated pages, and I don't want to run a browser to do that
10:28 moritz PerlNinja: so in my t/web.t I want to do a request, and then call a js function that operates on the DOM of the page I previously retrieved
10:28 PerlNinja ahhh
10:28 PerlNinja right right
10:28 PerlNinja hmm
10:29 PerlNinja theoretically should be possible I think... let me mess with it a little
10:30 PerlNinja this is starting to smell like Mojo::UserAgent with JS support :D
10:31 crab what are you using to execute javascript?
10:33 PerlNinja look on CPAN for 'JSP' - it basically ties to SpiderMonkey
10:34 PerlNinja guess if you emulate enough of the window.* and document.* properties you could in theory run jQuery as well, but that's kind of like turning Mojo::UserAgent into a complete browser without renderer
10:37 crab hmm.
10:38 crab if you take a Mojo::Upload and ->move_to() it, ->slurp() stops working
10:38 crab (well, if the upload is large enough to be an Asset::File)
10:39 crab reading the code, i can see why, but it seems like a bug. or at least a surprising misfeature that deserves to be documented.
10:58 crab perlninja: you're in indonesia?
11:09 PerlNinja yep
11:09 PerlNinja originally dutch but ended up here couple years ago for some work and kinda forgot to leave :P
11:27 mattastrophe left #mojo
11:36 mattastrophe joined #mojo
11:39 mattastrophe left #mojo
11:43 mattastrophe joined #mojo
12:27 perlrocks Twitter: "Mojolicious-Plugin-Mongodb v0.02 by MADCAT - http://frepan.org/~madcat/Mojo​licious-Plugin-Mongodb-v0.02/" --cpan_new http://twitter.com/cpan_ne​w/status/51621349843681280
12:51 Akron joined #mojo
13:19 sECuRE joined #mojo
13:31 GitHub149 joined #mojo
13:31 GitHub149 mojo: master Sebastian Riedel * 0d8c064 (3 files in 3 dirs): added proper payload masking for ietf-06 WebSockets - http://bit.ly/e5j4He
13:31 GitHub149 left #mojo
13:43 sri crab: you know the drill
13:43 purl sri:
13:43 sri purl: you obviousky don't
13:43 purl sri: i'm not following you...
13:44 * sri pokes purl
13:44 purl stop that you naughty sri
13:44 PerlNinja sri, quit molesting the bot
13:44 sri :(
13:45 PerlNinja you're gonna hurt it's feelings :P
14:02 ana-im mojo on my mind
14:26 sri crab: btw. the whole asset code is about as old as mojo, bugs would be a surprise
14:29 marty joined #mojo
14:37 bosphorus left #mojo
14:39 ajgb joined #mojo
14:42 ajgb left #mojo
15:24 crab sri: well, the question is, _should_ slurp work after move_to?
15:24 crab if not, it's not a bug. but right now it works for small (memory) assets, and doesn't for files.
15:24 sri crab: then it's a bug
15:25 sri move_to should just remove the auto cleanup flag and move the file to a better place
15:26 crab the problem is of course that handle is an attribute that gets initialised once, and though $a->path() changes after move_to, the "handle" attr doesn't get re-initialised.
15:26 sri i don't see a problem
15:27 PerlNinja oh on that note, is there an easy way to convert a Mojo::Asset::Memory to a Mojo::Asset::File?
15:27 sri it's aeasy enough to do it manually
15:27 sri *-a
15:28 sri i don't know why a user would ever want that though
15:28 PerlNinja ok, just wondered if there's any best-practice for that stuff
15:28 crab sri: do you mean you don't see a problem when reading the code, or are you trying it out and not seeing the problem? (i'm working on a test case now)
15:29 sri crab: "the problem is of course that handle is an attribute that gets initialised once..." i don't see how that is a problem
15:29 sri to me it looks like a simple bug
15:31 sri just make a test case and let me fix it or make a test case and fix it yourself ;)
15:32 crab maybe my description just sucks. i'm making a test case.
15:33 sri nope, i think i understand completely
15:33 PerlNinja left #mojo
15:34 sri you make it sound like there's a problem that prevents fixing it
15:34 sri that's the part i do not grok yet
15:34 sri (if that's what you meant)
15:37 crab oh no
15:37 crab that was not my intent at all.
15:38 crab sri: http://toroid.org/misc/asset.diff
15:38 crab adds two tests to t/mojo/asset.t
15:42 sri crab: that test isnot portable
15:42 sri you just broke mojolicious on all non unixy platforms
15:43 crab oh. oops. well, what is safe to do on windows? use File::Temp?
15:43 mattastrophe left #mojo
15:44 sri i think you could just use Mojo::Asset::File to generate a portable path ;p
15:45 crab how?
15:46 mattastrophe joined #mojo
15:46 sri my $path = $file->path; undef $file;
15:46 sri old file cleaned up, and you have a reusable path
15:46 crab oh. haha. fine. :-)
15:46 sri :)
15:52 crab fixed. http://toroid.org/misc/asset.diff
16:15 GitHub154 joined #mojo
16:15 GitHub154 mojo: master Sebastian Riedel * 10796e4 (3 files in 3 dirs): fixed small Mojo::Asset::File bug - http://bit.ly/fUBZfE
16:15 GitHub154 left #mojo
16:15 sri crab: fixed
16:29 sECuRE hi, i’m new to mojo. i’m interested in doing streaming requests (like the twitter streaming API) and handling multiple requests at the same time. have you got any pointers to appropriate documentation? i just tried putting together a mojo::lite app, but the request handlers are executed blockingly
16:30 janus sECuRE: write_chunk() probably is what you need to look out for
16:30 sri when you say streaming requests you mean streaming responses right?
16:31 sECuRE err, sure, yes
16:31 sri https://github.com/kraih/mojo/blob/mast​er/t/mojolicious/longpolling_lite_app.t
16:31 sri many examples in there
16:31 sECuRE cool, thanks
16:32 sri it's rather advanced though, if you're new to mojolicious not the best starting point
16:32 sri i suggest reading the tutorial and guides first
16:32 sECuRE ok
16:33 janus it rocks btw... wrote a tiny throttle server last week :)
16:35 janus would be a cool plugin i guess
16:36 sri sounds like it would
16:37 crab sri: \\o//
16:38 sri 4 arms? :O
16:38 crab the other six are below the line.
16:38 sri :O
17:03 perlrocks Twitter: "Can't wait for the ietf-07 #websocket spec, #mojolicious should be ready now. :) http://t.co/VYwZiWy #perl" --kraih http://twitter.com/kraih/status/51690777113411584
17:12 perlrocks Twitter: "My site is more beautiful than mojolicious error screen." (ja) --purasiibo http://twitter.com/purasiib​o/status/51693006637629440
17:28 sri oh my, there is yet another mongodb book coming up
17:28 sri http://oreilly.com/catalog/0636920019893/
17:41 vel joined #mojo
17:41 janus $ perl -MMojo::IOLoop -e'Mojo::IOLoop->connect(handle=>\*STDIN,on​_error=>sub{warn"@_"}),Mojo::IOLoop->start'
17:41 janus Mojo::IOLoop=HASH(0x8386e440) 89e96070 Bad file descriptor at -e line 1.
17:42 janus what's so bad about stdin? :)
17:42 janus all other fds work quite well so far
17:45 janus fifos and unix sockets, that is
17:46 sri it prolly doesn't have the right methods or so
17:46 sri is it even an object?
17:46 sri you can't just throw random globs around
17:47 janus i tried with IO::Handle->fdopen(fileno(STDIN), 'r')
17:48 janus file handles from socketpair() are also fine ;)
17:49 crab janus: i bet it breaks because it uses setsockopt() on the filehandle or something like that
17:49 crab janus: and i bet it'll break on any regular-file file handle too
17:49 crab (setsockopt works only on sockets, likewise select(2))
17:51 crab or something like that, anyway.
17:52 janus actually, fails on syswrite
18:00 crab well, they both start with s.
18:01 janus oh, wait, writing to stdIN? *checking*
18:35 perlrocks Twitter: "HTML template by default mojolicious I escaped me." (ja) --purasiibo http://twitter.com/purasiib​o/status/51713885346086912
18:50 ok22 left #mojo
18:57 GitHub70 joined #mojo
18:57 GitHub70 mojo: master Sebastian Riedel * ef8e6d1 (1 files in 1 dirs): cleaned up render_exception - http://bit.ly/hZghBB
18:57 GitHub70 left #mojo
19:00 crab i am very intrigued by "My site is more beautiful than the mojolicious error screen"
19:00 sri japanese tweet
19:00 crab has the mojolicious error screen become some sort of object of desire for japanese designers?
19:01 sri he prolly complained that his site doesn't look more beatiful than the error screen ;p
19:01 ok22 joined #mojo
19:01 crab true :)
19:02 sri hmmmmmm
19:02 sri a rainbow vomiting perl 5 raptor might make a good production 500 error page :)
19:03 crab eek
19:06 bosphorus joined #mojo
19:17 marcus \o/
19:22 metaperl left #mojo
19:37 perlrocks Twitter: "[EN] Mojolicious-Plugin-Authentication v0.02 by MADCAT - http://frepan.org/~madcat/Mojolic​ious-Plugin-Authentication-v0.02/" --OneTimeCode http://twitter.com/OneTimeCo​de/status/51729569849409536
20:05 perlite_ joined #mojo
20:08 perlite left #mojo
20:08 perlite_ is now known as perlite
20:53 ana-im FAIL (6)
21:08 omega left #mojo
21:11 omega joined #mojo
21:28 moritz https://gist.github.com/888651 nice Mojo::UserAgent web scraping example
21:31 sri neat
21:32 sri but why do you write ->new() but not ->each()? :)
21:33 sri and why the hell do i still not proofread sentences before hitting enter...
21:41 perlrocks Twitter: "#perl Webscraping ISO language codes with Mojo http://goo.gl/9BYld" --perloop http://twitter.com/perloop​/status/51760810992738305
21:42 moritz sri: old habit with ->new()
21:43 sri noticed it more often recently, wondered where it comes from
21:43 sri crab does it too
21:43 moritz probably from the "it's not a special syntax" knowledge or so
21:43 moritz not a rational thing
22:49 kaare left #mojo
23:56 ryanc left #mojo
23:56 ryanc joined #mojo

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