Camelia, the Perl 6 bug

IRC log for #mojo, 2011-07-27

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

All times shown according to UTC.

Time Nick Message
00:10 Alias joined #mojo
00:16 GitHub148 joined #mojo
00:16 GitHub148 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/8e​e18ae80684a6a907127dd66117aa465f45c47c
00:16 GitHub148 [mojo/master] improved .perltidyrc - Sebastian Riedel
00:16 GitHub148 left #mojo
00:21 GitHub79 joined #mojo
00:21 GitHub79 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/13​0796111d83e0823de5d8a9047b41c9536839df
00:21 GitHub79 [mojo/master] fixed typo - Sebastian Riedel
00:21 GitHub79 left #mojo
00:23 SmokeMachine joined #mojo
00:45 GitHub15 joined #mojo
00:45 GitHub15 [mojo] kraih pushed 2 new commits to master: https://github.com/kraih/moj​o/compare/1307961...dbaf520
00:45 GitHub15 [mojo/master] Revert "improved .perltidyrc" - Sebastian Riedel
00:45 GitHub15 [mojo/master] documentation tweaks - Sebastian Riedel
00:45 GitHub15 left #mojo
01:04 xaka left #mojo
01:34 xaka joined #mojo
02:27 * sri wonders if a template system like this http://pastie.org/2277138 would get used if it existed
02:41 crab i don't like it.
02:42 crab i want my templates to look more or less like html, ugly though that may be. but i suppose the haml people would like it.
02:45 sri it's mostly http://slim-lang.com/
02:46 sri not like i have time to work on it anyway :)
02:53 SmokeMachine left #mojo
02:54 crab i'm really rather happy with epl templates. they're somewhat mason-like with no fuss and just enough features to do what i need.
02:55 crab there's no way to dispatch based on auto-detected format, is there? i should just check stash->{format} in my action and do $whatever?
03:01 sri dispatch on format?
03:03 sri crab: you mean like different actions for different formats?
03:04 sri i think that wouldn't be very productive, the point of variable formats is to have different representations share the same controller code
03:07 crab ok
03:08 sri we could make dealing with formats more friendly though
03:09 sri bit like rails respond_to
03:09 crab how does it work?
03:09 purl how does it work is http://www.howstuffworks.com
03:10 sri http://apidock.com/rails/ActionController​/MimeResponds/InstanceMethods/respond_to
03:10 sri first google hit ;p
03:11 sri oh noes… there's a fly in my office
03:11 * sri goes hunting
03:11 crab s/office/ointment/
03:12 crab sri: you have a dog, right? do you work from home?
03:12 sri no and yes
03:13 crab oh. i thought you told marcus you had a dog. must be misremembering.
03:13 mikegrb I gave urmom a dog.
03:14 sri i had a dog many years ago
03:18 kaare joined #mojo
03:51 SmokeMachine joined #mojo
03:57 will joined #mojo
04:05 alnewkirk joined #mojo
04:08 ispy_ joined #mojo
04:27 d4rkie joined #mojo
04:41 will left #mojo
04:44 mattastrophe left #mojo
04:54 tempire I really like http://slim-lang.com/
04:56 sri i'm still not sure if i like it or not
04:58 sri it looks lightweight at first, but the feature list is actually quite big
05:01 Alias ick
05:01 Alias Significant whitespace
05:01 sri said the yaml fan
05:01 Alias Looks like the kind of templating language that needs extensive tool support in order to work with safely
05:01 Alias Since when am I a YAML fan?
05:01 Alias I'm one of it's biggest detractors
05:01 sri heh
05:02 Alias http://cpanratings.perl.org/dist/YAML
05:02 sri must have mixed you up with someone else then
05:02 Alias Go read my original review
05:02 Alias I maintain YAML stuff
05:02 Alias But that's just because if we're stuck with something that sucks, might as well make the best of a bad situation
05:07 sri http://pastie.org/2277656 # something like this would be a more logical choice for ruby people
05:07 j3nnn1 left #mojo
05:13 sri especially the magical if/else blocks turn me off
05:24 arthas left #mojo
05:28 ispy_ left #mojo
05:28 arthas joined #mojo
05:32 alnewkirk left #mojo
05:49 preflex_ joined #mojo
05:51 arthas left #mojo
05:51 arthas joined #mojo
05:52 tempire Hmm
05:52 tempire That pipe bothers me
05:52 * tempire goes back to cl-who
05:53 preflex left #mojo
06:06 Alias left #mojo
06:10 jwang joined #mojo
06:25 Foxcool joined #mojo
07:01 Kulag left #mojo
07:19 s0va_ sri: think about implementing factory() method...
07:21 s0va_ sri: i would create Mojo::FactoryBase, which extends Mojo::Base, which would provide generic factory method... I have something like this in all my job perl projects and it works great.
07:22 s0va_ sri: i would put current Mojo::IOWatcher into Mojo::IOWatcher::PP, leaving base IOWatcher implementation completely empty, interface like.
07:24 s0va_ sri: the same with Mojo::IOLoop::Stream, Client and Resolver...
07:24 s0va_ this way you could have really easily stackable and replacable implementations.
07:26 s0va_ sri: and the last thing... i think that is mistake that ioloop wants to be absolute ruler of perl process.
07:27 s0va_ i have spoken. Thanks for merging EV, anyevent now works, but only with EV :) try setting: PERL_ANYEVENT_MODEL=Perl ./app.pl daemon  => it just doesnt work, becouse EV and AnyEvent clash.
07:28 s0va_ over & out
07:28 koban joined #mojo
07:29 xaka left #mojo
07:42 crab s0va: are you bfg?
07:43 sugar joined #mojo
07:43 crab (on github)
08:00 koban sri: is call for 'weaken' unuseful 'because $self overriden later in closure? https://github.com/kraih/mojo/blob/mast​er/lib/Mojo/IOLoop/EventEmitter.pm#L35
08:04 AmeliePoulain joined #mojo
08:07 tabbi joined #mojo
08:07 tabbi left #mojo
08:19 Alias joined #mojo
08:23 y0j_- is now known as y0j_
08:31 spleenjack joined #mojo
08:31 mhi joined #mojo
08:51 s0va_ crab: yep.
09:32 Akron joined #mojo
09:48 fmerges joined #mojo
09:53 zloyrusskiy joined #mojo
09:56 zloyrusskiy hello, i meet some troubles with Mojo::UseAgent. I running such an oneliner (actually i have a program, but this is minimal example of problem) - perl -MMojo::UserAgent -E 'Mojo::UserAgent->new->get("/blablabla"); say "done"'
09:57 stephan48 whats the problem?
09:57 zloyrusskiy and have several warnings... and program hangs
09:57 stephan48 and i suspect /blablabla is not a valid uri...
09:57 zloyrusskiy i want to know how can i handle such errors
09:57 zloyrusskiy yes
09:57 stephan48 se of uninitialized value $host in concatenation (.) or string at /usr/local/share/perl/5.10.0/Mojo/UserAgent.pm line 238.
09:57 zloyrusskiy can i handle it via Mojo::UserAgent or some of it's tools?
09:57 stephan48 Unhandled event error: Couldn't connect. at /usr/local/share/perl/5.10.0/Mojo/IOLoop.pm line 668.
09:57 zloyrusskiy yes
09:57 stephan48 you mean these two?
09:58 zloyrusskiy or can i stop Mojo::IOLoop from program?
09:58 stephan48 oh first use Mojo::URI or similar modules to make sure you feed a valid uri to MUA, then you could as stated in the MUA docs check for errors when the request is done
09:58 zloyrusskiy i have a bad input urls sometimes
09:58 stephan48 theres a way look into the docs
09:58 stephan48 ye validate them first before you feed them into MUA
09:59 zloyrusskiy ok, thanks
10:17 yko zloyrusskiy, you always can stop IOLoop via $ua->ioloop->stop
10:17 yko also you can handle ua errors as it shown at http://mojolicio.us/perldoc/Mojo/UserAgent
10:18 yko looking inside $tx->success and $tx->error
10:18 yko at least it supposed to be so.
10:19 zloyrusskiy i can't with such an error ((( it's simply hangs
10:20 zloyrusskiy i look for $ua->ioloop->on_error method, but i don't know what kind of $id, i must provide to it...
10:22 yko my $id = $ua->get($url => $callback);
10:22 yko ^^^ that is $id as far as I remember
10:23 yko year, right. but that's undocumented behavior :(
10:32 Kulag joined #mojo
10:55 zloyrusskiy ok, i have another question: "i have url of site page  which i parsing now + i have anchor's href relative URL on this page, how can i merge this data with Mojo::URL?"
11:01 trone Mm. sorry. Mojolicious says "Bad signed cookie "mojolicious", possible hacking attempt." but I setted the secret... so I'm not understanding thw warning
11:01 stephan48 are you running multiple apps?
11:01 stephan48 same domain? same cookie?
11:02 trone stephan48: I'm in develop with morbo. At the begin of my app (not lite)
11:02 trone stephan48: I'm developing my (not lite) app. runinng it with morbo. (sorry for the ugly english)
11:04 stephan48 are you running multiple apps? f.e. i get this message when i run one app with default cookiename, and then another with different secret but same cookie(this app just sees the cookie is signed by a differend secret and thus prints that error)
11:05 trone using session in a login controller. No, I'm runing just that app.
11:05 stephan48 mh
11:05 stephan48 try deleting your cookies
11:08 trone stephan48: indeed with other browser (surely no previous session) don't get the message. K. Thanks.
11:08 stephan48 np :)
11:13 crab if you change the secret, it invalidates already-signed cookies
11:22 zloyrusskiy left #mojo
11:26 Kulag left #mojo
11:27 Kulag joined #mojo
11:37 perlrocks Twitter: "Mojolicious framework is darn sexy!" --jujav4ik http://twitter.com/jujav4i​k/status/96182425310330880
11:46 Drossel joined #mojo
11:46 Kulag left #mojo
11:48 sugar left #mojo
11:50 sugar joined #mojo
11:53 Drossel left #mojo
11:53 Kulag joined #mojo
12:18 SmokeMachine left #mojo
12:51 dekimsey joined #mojo
12:53 vifo joined #mojo
13:00 perlrocks Twitter: "Favorite recent @ nilfs @ kanonji Amon2. Toka Toka mojolicious others wonder Catalyst. I can not use mojolicious." (ja) --s2otsa http://twitter.com/s2otsa/status/96203225992134656
13:10 ispy_ joined #mojo
13:23 spleenjack left #mojo
13:23 spleenjack joined #mojo
13:24 tabbi joined #mojo
13:29 GitHub147 joined #mojo
13:29 GitHub147 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/d5​ebe0c9525b749075abfd66fb7b25af2e1da52e
13:29 GitHub147 [mojo/master] fixed version command - Sebastian Riedel
13:29 GitHub147 left #mojo
13:42 GitHub19 joined #mojo
13:42 GitHub19 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/be​e4e03ea5d596b6ab795259785dfac53973c9b4
13:42 GitHub19 [mojo/master] fixed small Mojo::DOM bug - Sebastian Riedel
13:42 GitHub19 left #mojo
13:44 tabbi left #mojo
13:45 GitHub35 joined #mojo
13:45 GitHub35 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/72​2a8a3a41cfa4819ce7e09ccfe946f3ba7b8ad0
13:45 GitHub35 [mojo/master] fixed typo - Sebastian Riedel
13:45 GitHub35 left #mojo
13:50 sri s0va_: going all architecture astronaut is not an option for Mojo::IOLoop
13:50 sri s0va_: but the actual problem has been taken care of with Mojo::IOWatcher::detect
13:51 sri koban: thanks, fixed
13:51 koban :)
13:51 perlrocks Twitter: "would raise an error in the javascript sample mojolicious websocket" (ja) --memememomo http://twitter.com/memememo​mo/status/96216171619160064
13:54 sri yko: Mojo::UserAgent does not return $id
13:55 yko sri, maybe. but what it returns then?
13:55 yko perl -Mojo -e 'print Mojo::UserAgent->new->get("/foo" => sub { })'
13:56 sri $tx prolly
13:57 sri hmm
13:57 yko sri, it does return $id :p
13:57 yko perl -Mojo -e 'print ref Mojo::UserAgent->new->get("/foo" => sub { })'
13:57 sri or it is undefined
13:57 sri that's untested and undocumented
13:57 sri don't depend on it
13:57 yko i mentioned it :D
13:58 sri yea, that was not good, he might depend on it now
13:58 yko sri: goes from there: https://github.com/kraih/mojo/blob​/master/lib/Mojo/UserAgent.pm#L491
13:58 perlrocks Twitter: "Mojolicious 1.67 by SRI - http://metacpan.org/release/SRI/Mojolicious-1.67/" (ms) --cpan_new http://twitter.com/cpan_ne​w/status/96217836082561024
13:58 yko well, i think i depend on it too
13:58 yko and i don't like suffer alone
13:58 * yko grues from the darkness
13:59 sri it will break
14:00 yko agree
14:16 sri returning $tx makes just as little sense though
14:17 metaperl joined #mojo
14:17 sri since there can be redirects and whatnot
14:19 Foxcool left #mojo
14:23 s0va_ git
14:23 s0va_ ups.
14:23 s0va_ nevermind
14:24 Alias ok
14:29 AmeliePoulain left #mojo
14:37 Alias left #mojo
14:40 sri tempire: yea, pipe looks weird too
14:40 sri there has to be something even more elegenat than slim
14:41 sri making both, tags and text pretty
14:43 vifo left #mojo
14:44 koban left #mojo
15:01 DaTa mojo get http://xkcd.com/859/ 'img[title]' attr title # test passed ;)
15:02 sri lol
15:02 sri mind if i tweet that?
15:02 SmokeMachine joined #mojo
15:04 DaTa no :)
15:05 DaTa ah, "go ahead" is the phrase i'm looking for :)
15:07 perlrocks Twitter: "Looks like #mojolicious passes the #xkcd test. :) "mojo get xkcd.com/859/ img[title] attr title" #perl" --kraih http://twitter.com/kraih/status/96235260324478977
15:15 alnewkirk joined #mojo
15:35 tabbi joined #mojo
15:35 tabbi left #mojo
15:36 Akron Wouldn't it be better to have all css selectors documented in Mojo::DOM::CSS rather than in Mojo::DOM?
15:37 sri Akron: not better, just more correct
15:37 Akron sri: More intuitive -> better.
15:38 sri it's not very intuitive
15:38 sri in fact, that file is not even linked to from anywhere
15:39 Akron It should be - from Mojo::DOM. In CPAN currently the Mojo::DOM index is a wall of selectors ... A splitted documentation would be better, I believe.
15:40 sri how would you connect the two?
15:42 elb0w sri, i represented your shirt on my vacation
15:42 elb0w think I got some perl5 at the acropolis in greece
15:42 elb0w :o
15:42 Akron sri: Move the "Selectors section" to Mojo::DOM::CSS and mention the support for all "CSS3 selecters documented in Mojo::DOM::CSS" in "at" and "find".
15:43 sri elb0w: got photos? :)
15:43 elb0w Yeah ill up em when I do
15:43 elb0w at work now
15:44 sri :)
15:44 sri Akron: could work
15:45 xaka joined #mojo
15:53 GitHub173 joined #mojo
15:53 GitHub173 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/b4​4064164a7d26bf21e6b0bb5cb6e21c98b9cb43
15:53 GitHub173 [mojo/master] improved documentation - Sebastian Riedel
15:53 GitHub173 left #mojo
15:53 sri Akron: that what you had in mind?
15:54 alnewkirk left #mojo
15:55 Akron Yes! I think, Mojo::DOM documentation now looks nicer.
15:56 sri having all modules link to each other now should be good too
15:56 Akron yepp.
15:58 fmerges left #mojo
16:05 sugar left #mojo
16:13 GitHub196 joined #mojo
16:13 GitHub196 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/f2​2f289eefe26830cb890ad60145843161951c9c
16:13 GitHub196 [mojo/master] more documentation improvements - Sebastian Riedel
16:13 GitHub196 left #mojo
16:19 Akron Bye!
16:19 Akron left #mojo
16:34 GitHub25 joined #mojo
16:34 GitHub25 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/9c​873ac5cb7e577aa50b8d481f6fb32ab52d4abd
16:34 GitHub25 [mojo/master] explain mode handling in more detail - Sebastian Riedel
16:34 GitHub25 left #mojo
16:40 elb0w sri: http://elbowrage.com/europe/IMG_2070.JPG
16:40 elb0w nice shot of my bald head too
16:40 elb0w haha
16:41 elb0w http://elbowrage.com/europe/IMG_2152.JPG
16:45 elb0w gotta find the others
16:55 spleenjack left #mojo
17:30 jwang left #mojo
18:13 trcjr joined #mojo
18:19 mfridh joined #mojo
18:21 mfridh_ left #mojo
20:00 marcus elb0w: are you the one to the right or to the lefT?
20:17 kaare left #mojo
20:19 mxey left #mojo
20:46 SmokeMachine left #mojo
20:49 SmokeMachine joined #mojo
21:02 elb0w thats my girl
21:10 alnewkirk joined #mojo
21:12 stephan48 what is the recommendation regards storing app secrets(passwords, cookie secret) in config? the cookie secret i could delete directly when i set it and it disappears, but what f.e. is with an encryption key needed during app lifetime?
21:21 dekimsey left #mojo
21:53 SmokeMachine left #mojo
22:02 metaperl left #mojo
22:04 flamey joined #mojo
22:27 flamey left #mojo
23:04 perlrocks Twitter: "Thinking about designing a simple #html5 preprocessor for #mojolicious templates, which one do you like most? http://t.co/Df79uu7 #perl" --kraih http://twitter.com/kraih/status/96355284422893568
23:06 sri elb0w: ENOACROPOLIS
23:07 sri it seems everybody mostly loves ep templates but doesn't like typing html tags
23:07 sri maybe a simple preprocessor would make sense
23:07 sri ep would stay the same
23:09 ispy_ left #mojo
23:09 sri the thought behind the design is "what would i as a programmer enjoy typing all day long"
23:10 sri quoted strings might seem verbose, but that's how we type data all day
23:10 sri personally i don't like option three
23:11 sri it's just there so people have something to hate :)
23:11 * sri pokes marcus
23:16 minimal joined #mojo
23:17 minimal left #mojo
23:17 minimalist left #mojo
23:23 j3nnn1 joined #mojo
23:35 perlrocks Twitter: "Not yet completely solidified @ specification memememomo WebSocket, because there are differences in the browser side and Mojolicious, now that I think can not run the sample on the Web." (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/96363079499120640

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