Camelia, the Perl 6 bug

IRC log for #mojo, 2011-04-19

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

All times shown according to UTC.

Time Nick Message
00:00 sri i'd also like a disable highlighting button
00:00 f00li5h sri: pawing at it.
00:00 f00li5h what hilighting?
00:00 sri the syntax highlighting
00:00 purl it has been said that the syntax highlighting is scintilla
00:00 f00li5h oh!
00:00 f00li5h it uses javascript!
00:00 sri ye
00:01 f00li5h click "disalow" on script block ;)
00:01 sri ;p
00:01 * mateu does find plack::middleware::debug the easiest to parse.
00:01 mateu we should be able to overrride with that option pretty easily no?
00:02 f00li5h sri: can you point a cat at the pod-rendering-thinger in that repo?
00:03 sri https://github.com/kraih/mojo/blob/maste​r/lib/Mojolicious/Plugin/PodRenderer.pm
00:04 sri it's a hack around Pod::Simple
00:04 f00li5h hmm, interesting
00:05 f00li5h does it suck less than pod2html?
00:05 sri it's not bad, and easily rewritable with Mojo::DOM
00:06 f00li5h whatsa mojo-dom?
00:06 f00li5h and does she wear thigh high boots?
00:06 sri i hope so
00:06 sri http://mojolicio.us/perldoc?Mojo/DOM
00:06 * mateu has ben happy with his recent toying with Pod::Simple(::XHTML)
00:07 sri very proud of the html healing capabilities it got recently :)
00:08 sri who would have thought one of the hardest test cases out there would be boingboing
00:08 sri their markup is so messed up
00:09 f00li5h lol, internet.
00:09 f00li5h also, an example of cpan minus without root might be worth investing in
00:09 f00li5h for the instaling, i mean
00:10 f00li5h ok, this working copy i have
00:10 f00li5h can i get it to run that website that i was just pawing at?
00:11 mateu anything is possible
00:11 * mateu digs cpanf
00:13 f00li5h mateu: no, some things are nonsense.
00:13 purl okay, f00li5h.
00:13 f00li5h hey, purl's here!
00:13 f00li5h sneaky little robo-thing
00:14 mateu yes, but nonsense is a strong possibility at times.  esp. w/ me ;)
00:15 mateu i've been lo-botized, it's purls fault
00:16 marcus hi-botized
00:16 mateu touche
00:16 f00li5h hypnotoad!
00:16 purl i heard hypnotoad was at http://www.r33b.net/ or ALL GLORY TO THE HYPNOTOAD!
00:16 * marcus wants to go our for beer, but I fear this neighbourhood
00:16 f00li5h lol-botomised
00:17 mateu you away from home marcus?
00:17 k-man wow, the tutorial is very dense
00:17 f00li5h >_M
00:17 f00li5h how do i run this webserver thinger?
00:18 mateu plackup -s Starman -a my_mojo_is_rising.pl
00:19 GitHub29 joined #mojo
00:19 GitHub29 mojo: master Sebastian Riedel * beaafdb (7 files in 4 dirs): added support for "X-Forwarded-HTTPS" and "X-Forwarded-Host" headers - http://bit.ly/eHljRi
00:19 GitHub29 left #mojo
00:19 f00li5h there isn't one of them in this working copy
00:21 perlrocks Twitter: "This little change should make reverse proxy setups with #mojolicious a lot more fun. http://t.co/w6K0ZIQ #perl" --kraih http://twitter.com/kraih/status/60135875195047936
00:22 * sri really needs to sleep
00:22 sri nn
00:22 mateu zzz
00:23 sri f00li5h: what webserver thingy?
00:23 f00li5h sri: i checked out that code
00:23 f00li5h how do i make it run an httpd
00:24 f00li5h i see no myapp.pl
00:24 mateu f00li5h: do you want the app that drives mojolicio.us?
00:24 sri "./script/mojo generate lite_app; perl -Ilib myapp.pl daemon"
00:24 f00li5h I ... what?
00:24 f00li5h mateu: yes!
00:24 f00li5h that's what i checked out, isn't it?
00:24 sri ooh
00:25 sri the whole thing is intermingled
00:25 sri we ship the perldoc browser with the framework
00:25 f00li5h i'm not sure what that means
00:25 * f00li5h touches HACKING and git adds it
00:26 mateu it sounds like there should be an app in there somewhere, or not far away.
00:26 sri "./script/mojo generate lite_app; perl -Ilib myapp.pl daemon; open http://127.0.0.1:3000/perldoc"
00:26 f00li5h there is one in t/ and 3 in example/
00:26 sri you generate a myapp.pl
00:26 sri with mojo generate lite_app
00:27 sri it's a little starter app with perldoc browser
00:27 f00li5h erm.
00:27 sri i better go to sleep before cause even more confusion -.-
00:27 f00li5h don't go!
00:27 mateu sri: thanks
00:28 f00li5h so, i have to generate an app to run the stuff in this working copy?
00:28 sri Zzz (rly!)
00:28 k-man night sri
00:28 mateu f00li5h: let's try it and see.
00:28 tempire lulz.  lisp invented garbage collection, was the first object oriented language, has meta-capability for both functional and oo styles, and has auxiliary methods called :before, :after, and :around.
00:28 tempire it's the original & ultimate perl.
00:29 f00li5h it has not been unboxed yet!
00:29 f00li5h tempire: we have a lot of porting to do then
00:29 f00li5h Tue Apr 19 10:28:45 2011 debug Mojolicious:35 [4345]: Your secret passphrase needs to be changed!!!
00:31 f00li5h without javascript the pod links seem broken too
00:31 mateu f00li5h: you can ignore the passphrase line for now, the Template lines might the ones messing with us
00:33 mateu oh, but http://localhost:3000/perldoc does respond well
00:33 f00li5h :3000/perldoc/ needs to redirect to :3000/perldoc so that the links don't break
00:34 mateu ok, and I keep ending up at mojolico.us too. so ...
00:34 mateu but the POD seems to be there and navigable, just some link issues.
00:35 f00li5h yep.
00:35 f00li5h how do i get stuff to the log?
00:38 mateu what log?  I see logs on stdout using the above startup
00:40 f00li5h yep, there.
00:40 purl yep, there is definately a bug in DBI 1.08's taint checks.
00:40 f00li5h warn seems to not.
00:41 f00li5h ah, there it is!
00:43 f00li5h haha!
00:46 f00li5h waht's all this __DATA__ @@ thingers  business?
00:47 tempire f00li5h: inline templates
00:48 f00li5h those seem pesky.
00:59 k-man how might i draw some graphs in mojo?
01:00 f00li5h Chart::Clicker, and some glue
01:01 k-man thanks f00li5h
01:01 k-man you are the font of knowledge today
01:01 f00li5h i'm in that sweet spot, just after i finish my coffee... where i'm caffeinated enough to be happy, but not yet cranky that i have no more coffee ;)
01:02 f00li5h hmm,
01:03 f00li5h heading/heading/numeric seems unique enough to identify a pre in document, right?
01:09 f00li5h using Mojo::DOM is it possible to know what n is when being the nth sibling?
01:12 j-v-e huuummm.... I'm trying to build 1.17 on debian squeeze and it fails. Debian as IO::Socket::SSL 1.33 and not 1.37, could that block the build ?
01:12 tempire 1.33 is crazy old school
01:12 j-v-e debian squeeze is not. it's the current stable
01:14 mateu j-v-e: I was just able to cpanm 1.17 on Squeeze
01:15 j-v-e I tried with io socket ssl 1.39 and it fails as well, I must be missing something somewhere, probably not mojolicious related
01:16 j-v-e t/mojo/ioloop.t                             (Wstat: 256 Tests: 9 Failed: 1)
01:22 mattastrophe left #mojo
01:22 j-v-e I can't find what's missing... can somebody look at the log ? http://pastebin.com/uyfSQJyH
01:32 daviddelikat joined #mojo
01:33 ispy_ left #mojo
01:36 daviddelikat1 left #mojo
01:43 j-v-e mateu: I have another squeeze on which 1.17 doesn't build, while 1.16 was building this afternoon. I'm definitely missing something here, any new requirement between 1.16 and 1.17 ?
01:48 j-v-e sri: did you change anything in the requirements between 1.16 and 1.17 ?
01:52 f00li5h lame.
01:52 f00li5h nothing is a child of a heading
01:52 f00li5h that's super pesky
01:54 f00li5h the Toc seems to do ok,
01:54 f00li5h but it doesn't seem to be reflected in the contents (or traversal of) the DOM
02:03 f00li5h mm,
02:04 j-v-e not sure how to interpret the quote of The Simpsons at the beginning of the ioloop test file XD
02:19 marcus mateu: yeah, in NYC. renting an apartment in harlem
02:33 mattastrophe joined #mojo
02:36 Foxcool joined #mojo
02:39 Alias__ joined #mojo
02:41 alnewkirk left #mojo
02:44 Alias_ left #mojo
03:03 ispy_ joined #mojo
03:07 abra left #mojo
03:18 abra joined #mojo
03:34 Foxcool left #mojo
03:49 f00li5h hrm
03:49 f00li5h why don't the perldoc thingers in use $attrs->{href} =~ s/^$cpan/$self->link_to ... /e?
03:51 tempire harlem!
03:51 tempire east or west of morningside park
03:51 f00li5h what is this:    Mojolicious: 1.18 (Smiling Cat Face With Heart-Shaped Eyes)
03:53 tempire don't cross morningside after dark.
03:53 tempire I hear rumarz
04:15 Foxcool joined #mojo
04:19 f00li5h does link_to take query params to put into the link?
04:43 Alias joined #mojo
04:43 f00li5h right.
04:43 f00li5h how do i make this thing not do the view stuff, and just bail out?
04:43 f00li5h $c->res->content($stuff); $c->res->status(200) is the catalyst version ...
04:44 dku f00li5h: http://search.cpan.org/~kraih/Mojolicious-​1.16/lib/Mojolicious/Guides/Rendering.pod
04:46 dku probably something like: return $self->render( text => $text, status => 200 );
04:46 dku depending on what $text is
04:46 f00li5h victory!
04:46 purl the sweetest sensation of all
04:46 Alias__ left #mojo
04:53 f00li5h it's still sending html
04:53 f00li5h it's still doing the template stuff
04:56 Alias left #mojo
04:56 dku then you're either not return()ing properly or there's something fancy going on in your code
04:57 f00li5h fancy.
04:57 dku like an under {} statement or such
04:57 f00li5h under?
04:57 dku never mind ;)
04:58 f00li5h it's the /perldoc handler
04:59 f00li5h right.
04:59 f00li5h i need some kind of "what the fuck is mojomojo doing with my request" document
04:59 f00li5h is there one of those?
05:00 dku mojomojo the wiki? ;)
05:00 f00li5h what?
05:00 f00li5h no.
05:00 f00li5h i have no idea how this thing works
05:00 f00li5h I am hacking Mojolicious::Plugin::PodRenderer;
05:01 f00li5h when I say $self->render( text => 'meow', format => 'txt' ) it says "lol, here's some html"
05:01 dku did you return the render object?
05:01 dku return $self->render( text => 'meow' );
05:02 f00li5h f00li5h: you idiot. the content *is* html.
05:02 f00li5h fail.
05:02 dku that might also be a problem
05:04 f00li5h my newlines are being eaten by Mojo::DOM though
05:04 f00li5h but!
05:04 f00li5h i am able to get chunks of crap from the pod documet
05:06 alnewkirk joined #mojo
05:10 Foxcool left #mojo
05:21 Foxcool joined #mojo
05:29 f00li5h whawt is up with these comments?
05:30 f00li5h # Text
05:30 f00li5h my $text = '';
05:31 f00li5h >_<
05:31 f00li5h is there anyway to get the text out of a pre without it being fucked with?
05:32 f00li5h ->to_xml and ->inner_xml escape it, ->text and ->all_text strip the newlines
05:32 f00li5h stringifying it mangles it too
05:44 Foxcool left #mojo
05:44 f00li5h ok,
05:44 f00li5h is there a coding standards document somewhere?
05:54 Foxcool joined #mojo
05:54 tabbi joined #mojo
05:58 AmeliePoulain joined #mojo
05:58 tabbi left #mojo
06:08 koban` joined #mojo
06:27 Foxcool left #mojo
06:29 ysyrota joined #mojo
06:38 Foxcool joined #mojo
06:44 ispy_ left #mojo
06:53 breaker313 joined #mojo
07:00 Foxcool left #mojo
07:04 ispy_ joined #mojo
07:11 Foxcool joined #mojo
07:17 Foxcool left #mojo
07:29 su-bzero_ Processing request failed: Can't call method "languages" on an undefined value at /usr/local/share/perl/5.10.1​/Mojolicious/Plugin/I18n.pm line 49
07:29 su-bzero_ Any ideas?
07:32 breaker313_ joined #mojo
07:32 breaker313 left #mojo
07:32 su-bzero_ I use $c->languages('ru') in process { }
07:32 moritz line 49 is a }; in my installation
07:35 Foxcool joined #mojo
07:36 su-bzero_ ;))
07:37 su-bzero_ Anyway I think that i18n plugin is not ready in process { }
07:38 cosmincx joined #mojo
07:45 cosmincx left #mojo
07:45 cosmincx joined #mojo
08:01 perlrocks Twitter: "Mojolicious pretty nice girl. Here's a look poking about playing with January." (ja) --brain_apple http://twitter.com/brain_app​le/status/60251727907135488
08:02 moritz when I include a template from within another template, can I somehow pass parameters without putting them on the "global" stash?
08:11 su-bzero_ moritz: include('something', someparam => 'privet');
08:11 moritz su-bzero_: that sets $someparam in the current scope too
08:11 moritz su-bzero_: which is exactly what I wanted to avoid
08:12 breaker313_ left #mojo
08:12 moritz in particular I have some objects which I call "title"s, and my pages have a title to
08:12 breaker313 joined #mojo
08:13 moritz when I do %== include make_me_a_link => title => $thing->title    it kills my page <% $title %>
08:14 su-bzero_ pass moritz => { title => 'kukes', other => bumbum }
08:14 su-bzero_ 'bumbum' ;)
08:14 moritz but then I can't use $title, but have to use $moritz->{title}, right?
08:16 su-bzero_ Yes.
08:16 * moritz wants proper scoping
08:16 f00li5h Template::Toolkit time!
08:16 * f00li5h just likes it becuase it has "kit" in its name
08:16 moritz su-bzero_: the problem with that is recursion
08:17 Foxcool left #mojo
08:22 su-bzero_ TT is a slowpoke ;(
08:28 Foxcool joined #mojo
08:29 moritz if it gets scoping right, that's worth considering.
08:40 f00li5h I am getting messages in my ... log, i guess about: Use of uninitialized value $message in concatenation (.) or string at lib/Mojo/Message/Response.pm line 140.
08:40 f00li5h am I doing something to cause it
08:41 moritz yes. If you don't do anything, no code is run, and you're not getting any warnings.
08:42 f00li5h >_<
08:56 metaperl joined #mojo
08:57 koban` left #mojo
09:03 spleenjack joined #mojo
09:05 fhelmber_ joined #mojo
09:05 sri j-v-e: there are no requirements, tests for optional ones are disabled automatically if you don't have them
09:10 sri f00li5h: i shouldn't have suggested you dive right in and work on some of the hardest code in mojolicious, sorry :/
09:12 sri moritz: good luck making scoping work
09:12 sri i think crab was actually working on a patch and gave up
09:14 moritz sri: what about something as simple as local()izing and copying the stack before each include() ?
09:14 moritz s/stack/stash/
09:14 sri breaks like a hundred tests
09:15 sri people depend on being able to stash stuff everywhere
09:15 moritz :(
09:16 sri you can only change the include helper
09:16 sri nothing global
09:16 moritz my second idea would be a two-level stash system
09:17 moritz where passing arguments to include() puts variable onto a local stash
09:17 pranq left #mojo
09:17 moritz and $foo tries to resolve the local stash first, and falls back to the global one if it's not found
09:18 sri too complicated
09:18 moritz that way you can still calls stash('foo', $newvalue) in an included template, and use the result in the caller
09:18 sri you can also just localize the helper arguments on the stash
09:19 sri local $self->stash->{foo} = ...
09:20 moritz btw the infinite loop in a test file that I've been seeing previously is gone
09:25 GitHub109 joined #mojo
09:25 GitHub109 mojo: master Sebastian Riedel * 7d12469 (2 files in 2 dirs): fixed test case - http://bit.ly/h7Cewy
09:25 GitHub109 left #mojo
09:25 sri j-v-e: that might fix it
09:27 sri f00li5h: i have a feeling the download code would get way too complicated anyway
09:34 sri btw. when you're iterating over Mojo::DOM results with each the second argument is a counter
09:34 sri ->each(sub { my ($e, $i) = @_; })
09:47 Foxcool left #mojo
09:49 sri moritz: maybe you should just keep poking crab
09:49 * moritz pokes crab
09:49 sri he almost had a patch
09:58 Foxcool joined #mojo
09:58 fmerges joined #mojo
10:03 ispy_ left #mojo
10:05 ispy_ joined #mojo
10:06 koban` joined #mojo
10:10 koban` left #mojo
10:10 koban` joined #mojo
10:12 koban` left #mojo
10:12 koban joined #mojo
10:19 koban left #mojo
10:20 koban joined #mojo
10:22 ispy_ left #mojo
10:24 ispy_ joined #mojo
10:44 koban left #mojo
10:45 koban joined #mojo
10:46 crab moritz: i have something that works well enough for me
10:48 crab moritz: http://toroid.org/misc/widget.pl is from my mojolicious plugin. you use <%= widget 'foo', a => 1, b => '42' %> or whatever, and it's like include except that the values won't persist in the stash afterwards
10:48 crab (you can ignore, or not, the block part. it lets you write <%+ widget 'foo
10:48 crab ' ... => begin %> blah blah <% end %>)
10:49 crab and the blah blah is available in your stash as "content", that's all
10:49 crab but that's self-contained. it's the remainder that does the stash magic
10:52 sri f00li5h: are you sure download links are a good idea?
10:52 f00li5h why not?
10:52 f00li5h it just needs to make and pass a path as an argument
10:53 sri i've thought a bit about it (in the shower) and i don't see it working well for perldoc
10:53 sri pretty much no perldoc example is a working script
10:53 sri so you download a random chunk of code, maybe even pseudo code
10:54 sri i can totally see it confuse people
10:55 sri from a ux perspective
10:57 f00li5h http://mojolicio.us/ seems to have many examples that look runnable
10:58 sri only a few are, under 1% i'm sure
10:59 sri it's basically a general purpose perldoc browser too
10:59 sri http://mojolicio.us/perldoc?perltoot
11:00 sri people will download synopsis blocks and stuff
11:00 f00li5h they might
11:00 sri "it has a download link, why doesn't it work? your examples are broken!!! waka waka waka"
11:02 f00li5h didn't you get that before anyway?
11:02 sri rarely
11:03 sri basically just for the frontpage example
11:03 sri it used to not work
11:03 f00li5h used to not work
11:03 f00li5h interesting.
11:04 sri even now it might need to be simplified
11:04 f00li5h I write blog posts in POD, and I want download links on my code blocks
11:05 f00li5h perhpas I don't want them on everything...
11:05 sri i use gist in my blog posts ;)
11:05 f00li5h how?
11:05 sri generally download links can be a good thing i guess, but for a perldoc browser i'm not sure
11:06 sri posterous has this cool feature, you just insert a gist link and it does all the work
11:06 sri \n$gist_url\n
11:06 f00li5h interesting
11:06 sri that's actually what keeps me from migrating to tumblr
11:06 f00li5h sneaky
11:06 f00li5h keeping users by having features
11:07 sri the right ones ;p
11:08 crab why do you want to migrate to tumblr, out of curiosity?
11:09 sri i like the twitter feel of it
11:10 sri oh right, and it has the better 500 page
11:10 Foxcool left #mojo
11:10 sri http://www.youtube.com/user/OreillyMed​ia#p/c/4E26834501437A46/5/nPG4sK_glls # watch this if you havn't yet :)
11:10 sri reddit driven development
11:13 crab i can't watch youtube videos :-( all video on my new computer plays at 4x realtime speed
11:13 sri :o
11:17 f00li5h take some speed, that should take care of the difference
11:17 sri can someone please test the latest github master on windows?
11:18 sri i'm quite sure the ioloop.t test failed sometimes because of the stdin handle
11:18 sri just not under what circumstances
11:19 sri maybe using DATA instead of STDIN for the test would be smarter too
11:20 sri then again DATA is often broken :S
11:22 Foxcool joined #mojo
11:25 sri crab: i don't remember the details, did we come to the conclusion that changing include was bad?
11:26 crab sri: no. i got a solution working with eval, and you proposed one using recursion that didn't quite work, but looked like it could be made to with some effort.
11:27 sri ah
11:27 crab it seems to me quite safe, though of course people must be relying on include's stash-setting functionality already
11:28 sri not sure about that
11:28 crab i haven't made any extraordinary effort to test special/edge-cases, but the few obvious things i tried worked fine.
11:29 sri i suppose a plugin is good enough for now
11:30 crab i have to say that being able to use it this way is incredibly convenient
11:30 moritz crab: thanks. Is there any deeper reason why it needs string eval?
11:32 sri to localize without recursion
11:32 crab moritz: to localise arbitrary stash values
11:32 sri i still think the core include should work that way
11:33 * moritz still isn't fully in that weird async and CPS mindset
11:33 sri it's not async
11:33 sri just let crab show you the code
11:33 crab moritz: local $x->{$_} foreach (keys %mystash) won't work because the scope is inside the foreach
11:33 crab there's nothing weird or special or mojo-specific about this
11:33 moritz crab: ah. I misunderstood
11:34 Foxcool left #mojo
11:34 sri the most sane implementation i can think of would be to recurse on include and localize one after another
11:35 * moritz likes the approach
11:35 crab maybe one could localise the entire stash with local $self->{stash} = $self->{stash} or so and the place your temporary stash values into the stash and call render
11:35 sri crab: nope
11:35 crab well, you'd have to copy it
11:36 sri state might change
11:36 sri like mojo.* stash values
11:36 crab oh, of course. good point.
11:36 crab that must be why i didn't do that in the first place, i just forgot :-)
11:36 * moritz goes with widget for now
11:36 * sri nods
11:37 moritz crab: may I assume a sane license on that snippet? :-)
11:37 crab I hereby authorize my pal moritz to do whatever he wants with that snippet of code.
11:37 moritz thanks
11:38 moritz sounds a bit like WTFPL :-)
11:38 moritz one of my favorite permissive licenses
11:39 crab if it would make you feel better, i could say i grant you a perpetual, worldwide, royalty-free, non-exclusive license to use the code in any way you see fit ;-)
11:39 moritz the first one was good enough, thank you :-)
11:43 daviddelikat1 joined #mojo
11:44 Foxcool joined #mojo
11:47 crab sri: like http://nopaste.info/92c1e82128.html ?
11:47 crab bah. stupid paste site seems to have turned \n into n. but still.
11:48 daviddelikat left #mojo
11:48 sri yes, something like that
11:48 sri actually, i have a working one, it breaks a few tests though
11:48 crab it seems to work perfectly. not sure what problem i encountered last time.
11:49 sri actually, it breaks one test
11:49 sri mojolicious/lite_app.t line 990
11:49 mattastrophe left #mojo
11:52 sri ok, i'm a little confised by the broken test
11:52 sri it's a nested layout one
11:52 sri http://pastie.org/1811271 # here's the patch
11:52 sri i need lunch, but maybe you want to play a bit with it until i'm back
11:53 * sri pokes crab
11:54 crab i'll have a look
11:55 breaker313 left #mojo
11:58 Foxcool left #mojo
12:01 crab geez, i don't even understand how it's supposed to render. /me looks harder
12:01 breaker313 joined #mojo
12:08 Foxcool joined #mojo
12:18 marcus tempire: east.
12:19 sri crab: ohoh, this is complicated
12:20 sri layout and extends are special cases
12:23 sri but i think i know how to do it
12:23 stephen left #mojo
12:26 sri ok, all tests pass now
12:26 sri it's not exactly pretty though
12:27 crab what did you change?
12:27 sri "layout and extends are special cases"
12:27 f00li5h I don't understand the idea of a "layout"
12:27 crab yes, but. new diff?
12:28 sri f00li5h: wrapper in tt
12:28 crab f00lish: look at the rendering guide. it's just something wrapped around your content.
12:28 f00li5h is that it?
12:28 crab yes.
12:28 f00li5h so how does that differ from a view?
12:28 crab i... er. what is a "view"?
12:28 f00li5h sorry, I didn't mean to ask "is it" ... that's a stupid question.
12:29 f00li5h take stash, make html
12:29 crab so then it differs from a view in that it is a mechanism provided by mojo rather than an abstract concept
12:30 sri crab: http://pastie.org/1811367
12:30 crab sorry, i don't know how better to answer your question.
12:31 crab sri: seems fine
12:31 sri just noticed render_partial accepts a lot more than the pod says
12:31 sri think i'll simplify that code a but
12:31 crab i don't think there is any point worrying more about "pretty"
12:32 sri no point having it accept hashrefs and stuff
12:35 sri the way we deal with templates out of the box is very close to rails and django
12:35 sri layouts, partials, extends and so on
12:37 moritz fwiw there's a solution that does local()ization without string eval
12:37 moritz build the loop with goto :-)
12:37 sri doesn't work
12:37 purl Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Is it making faces at you? Does it want more money? Is it sleeping with your girlfriend? Please be specific!
12:37 sri i've actually tried tailcalls with goto first ;p
12:37 moritz not goto &sub
12:37 moritz but goto LABEL
12:37 purl well, goto LABEL is evil.  goto FUNC is okay in small amounts.
12:38 sri try it, you can't localize that way
12:38 * moritz tries
12:39 sri i don't know much about the implementation details, but i think it's something as simple as the callstack resetting
12:42 crab should be fine with goto LABEL
12:42 sri nope
12:42 sri but i hope i'm wrong :)
12:42 moritz works here, past forthcoming
12:42 sri show
12:42 crab sri: works for me
12:43 crab toroid.org/misc/widget.pl
12:43 moritz sri: http://nopaste.snit.ch/40919
12:43 moritz prints 'new value' within the block for both, and a\nb\n outside the block
12:44 dekimsey left #mojo
12:44 moritz it just feels like writing assembler :-)
12:47 sri glad to be wrong :)
12:47 arthas joined #mojo
12:48 sri but i hate how perltidy indents the label :S
12:49 moritz does it outdent it?
12:49 sri ye
13:03 kaare left #mojo
13:05 arpadszasz joined #mojo
13:08 alnewkirk-away joined #mojo
13:09 sri look like 1.18 will be released soon
13:09 sri there are failing smoke reports incoming
13:10 sri some of the new websocket tests don't seem to be too reliable on some platforms
13:12 alnewkirk left #mojo
13:14 alnewkirk-away left #mojo
13:17 crab sri: are you putting this change in?
13:17 sri on it
13:17 crab (thanks, btw. i didn't handle layout/extends in my widget code. never needed them, but good to know.)
13:20 GitHub111 joined #mojo
13:20 GitHub111 mojo: master Sebastian Riedel * ae48981 (4 files in 4 dirs): added argument localization to the include helper - http://bit.ly/gphbxq
13:20 GitHub111 left #mojo
13:20 sri and it's in
13:21 moritz \o/
13:21 sri without breaking any existing tests
13:21 * moritz can revert most of his previous commit
13:21 moritz dammit, I should have broken up the unrelated parts into a different commit
13:21 * crab is grumpy, because he can't
13:22 crab moritz: always :-)
13:22 Foxcool left #mojo
13:22 moritz crab: I usually do, but sometimes I carefull do  git add -p  and then accidentally write  git commit -am 'message', and all the nice stashing is gone
13:23 moritz crab: and then I'm losing my patience, and just commit anyway
13:23 moritz it's so easy to slip your habits when you know that nobody is watching
13:23 crab hehe
13:24 moritz advantage: I can git push --force without anybody complaining
13:24 moritz and if somebody complains eventually, I know somebody cares - a win-win situation
13:24 crab sri: "only available in the incuded (sic) template" => included
13:25 * sri blames crab
13:25 sri but i'm adding a few more tests now anyway
13:26 crab it seems there's a magazine called hackermonthly which publishes a selection of news.ycombinator.com articles in print every month.
13:26 crab they printed an article from my web site and sent me a copy. how nice.
13:26 sri lol
13:26 sri does your license permit that?
13:27 crab they asked for permission first, i said ok.
13:27 sri ah
13:27 crab it's all very above-board and nice, just a very strange idea.
13:27 sri somehow reminded me of that cooking magazine that just printed random blog posts without permission
13:28 crab heh, yeah
13:29 moritz some of the images on my websites are regularly included in some random blogs and forum posts
13:30 moritz somtimes I annoy them by redirecting to hardcore porn based on refferer
13:30 moritz particularly if I can't reach any webmaster
13:30 stephanj also nice idea
13:30 moritz happened on a high-traffic Arabic board
13:30 koban left #mojo
13:31 koban joined #mojo
13:31 stephanj ow.
13:31 moritz the offending posting was deleted rather quickly :-)
13:31 stephanj i can imagine that
13:31 crab now there's probably a fatwa calling for your elimination
13:33 stephanj or one for the poster
13:33 GitHub87 joined #mojo
13:33 GitHub87 mojo: master Sebastian Riedel * 74ebef1 (2 files in 2 dirs): fixed typo - http://bit.ly/fju4qr
13:33 GitHub87 left #mojo
13:34 moritz I hope for the poster :-)
13:34 stephanj ;)
13:34 crab can i call the include helper from my helper?
13:34 crab surely. i just need to figure it out.
13:35 stephanj $self->include in the helper?
13:36 sri anyone having trouble installing 1.17?
13:37 crab stephanj: oh, fine, then. (i was looking at ->app->renderers->helpers->blah)
13:37 stephanj oh
13:37 moritz sri: it had that hanging test I wined about some days ago
13:37 sri moritz: didn't you say that was gone now?
13:38 crab installs fine on linux for me here
13:38 moritz sri: yes, it is
13:38 sri ok :)
13:38 kaare_ joined #mojo
13:39 crab stephanj: $self->include worked, thanks
13:40 stephanj maybe there are better ways but i use it that way in my apps
13:40 stephanj sri: tests pass, install works on Debian Lenny x86_64
13:41 sri thanks
13:41 Foxcool joined #mojo
13:44 sri hope it's not a tls thing again
13:45 sri i would hate to deactivate those tests again
13:46 DaTa_ is now known as DaTa
13:46 dekimsey joined #mojo
13:50 sri ok, it seems to be a FreeBSD thing
13:50 sri anyone here who can test it?
13:55 Foxcool left #mojo
13:58 breaker313 left #mojo
14:04 AmeliePoulain left #mojo
14:06 Foxcool joined #mojo
14:07 amonaco joined #mojo
14:08 amonaco guys i have a question about the right way of formatting a json object, see: http://pastie.org/1811671
14:09 amonaco what would be the best way to do this and keep it as simple as possible?
14:09 moritz what's wrong with the current way?
14:10 amonaco it generates one level more of depth in the json
14:10 amonaco thus generating unnecessary overhead
14:11 moritz amonaco: the one from the 'number' arugment in fetchall_hashref?
14:11 amonaco i'd like to get rid of the fetchall_hashref() call
14:11 * moritz doesn't really see the connection to mojo
14:11 amonaco yes, hasref yields a hash, and i need an array, otherwise the json generated would carry the hash indexes
14:12 moritz maybe fetchall_arrayref with { Slice => {} } does what you want
14:12 moritz or selectall_arrayref
14:13 amonaco thanks moritz, and it's true, this is more a general perl than a mojo-specific question
14:15 arpadszasz left #mojo
14:17 amonaco selectall_arrayref does the trick, solved: http://pastie.org/1811671 (just in case anyone is integrating mojo with mootools)
14:21 stephanj sri: thanks :) your fixes for the bug janus and me spottet earlier are working
14:22 sri \o/
14:24 crab amonaco: bleh, i wanted to see what you were doing, but i guess you overwrote the original paste.
14:25 amonaco :| yes, i edited it, i'm still not able to find the solution i need
14:26 crab what is it you want?
14:27 amonaco crab: i need something like "an array of hashes" in order to play well with json, let me give you an example
14:28 moritz amonaco: doesn't the { Slice => {} } argument to selectall_arrayref do that for you?
14:28 crab [{"foo":42},{"bar":23}] or so?
14:28 amonaco crab: correct
14:29 amonaco but if i use fetchall_arrayref or selectall_arrayref i loose the associative fields
14:29 moritz amonaco: did you even try it with Slice?
14:29 crab amonaco: then yes, Slice => {} is what you want
14:30 amonaco i'm not familiar with it, digging the docs now
14:30 moritz crab: if amonaco listens to you, but not to the three times I said, I'm envious
14:30 amonaco thank you guys
14:30 crab :)
14:30 amonaco moritz: sorry about that :)
14:31 sh4 joined #mojo
14:36 koban left #mojo
14:37 alnewkirk joined #mojo
14:40 sh4 left #mojo
15:01 GitHub3 joined #mojo
15:01 GitHub3 mojo: master Sebastian Riedel * f9d143f (3 files in 3 dirs): more tests - http://bit.ly/fkqT8u
15:01 GitHub3 left #mojo
15:01 sri we've reached 5100 tests btw
15:02 sri 11600 lines of code in tests alone
15:03 sri almost equal to the 12000 lines of code in lib
15:05 sri moose alone has 14k lines of lib code :)
15:08 sri interesting
15:08 sri catalyst has 6k lines of code in lib
15:09 sri rails is way beyond 150k though
15:10 crab 150k!
15:10 crab but then i guess it does a lot more too
15:10 sri it ships with an orm and stuff
15:11 perlrocks Twitter: "Mojolicious URL Traversal Arbitrary File Access: Mojolicious URL Traversal Arbitrary File… http://goo.gl/fb/ZIuSu" --SecurityNews http://twitter.com/SecurityN​ews/status/60359878945935361
15:12 sri then again we have stuff bundled they have in ruby core
15:13 sri json, xml, http client, erb
15:13 crab are mojo's templates very similar to erb?
15:14 sri from the outside yes, not so much from the inside
15:14 sri erb is a terrible implementation
15:14 sri we are closer to erubis
15:17 fmerges left #mojo
15:23 cosmincx left #mojo
15:47 sh4 joined #mojo
16:02 Foxcool left #mojo
16:06 Foxcool joined #mojo
16:21 Foxcool left #mojo
16:33 Foxcool joined #mojo
16:51 ysyrota left #mojo
16:52 Foxcool left #mojo
17:00 tabbi joined #mojo
17:00 tabbi left #mojo
17:29 crab sounds like an egyptian god
17:31 arpadszasz joined #mojo
17:53 Foxcool joined #mojo
17:58 spleenjack left #mojo
18:07 stephen joined #mojo
18:10 sri it does
18:24 trcjr joined #mojo
18:27 ilyuhan joined #mojo
18:30 fhelmber_ left #mojo
18:30 Akron joined #mojo
18:30 sri http://www.cpantesters.org/distro​/M/Mojolicious.html#Mojolicious-1.17 # looks like we have a problem on freebsd
18:31 sri and possibly a small one on windows
18:34 arthas left #mojo
18:35 sri ok, windows test has a random component i can try to eliminate
18:36 GitHub83 joined #mojo
18:36 GitHub83 mojo: master Sebastian Riedel * adaf6be (1 files in 1 dirs): improved test - http://bit.ly/fpZ7Sz
18:36 GitHub83 left #mojo
18:41 sri hmm, i can't do much about the freebsd fails i guess
18:45 sri i'm going to need someone to run the t/mojolicious/websocket_lite_app.t with MOJO_IOLOOP_DEBUG=1 and MOJO_WEBSOCKET_DEBUG=1
18:45 alnewkirk left #mojo
18:46 sri possibly even MOJO_USERAGENT_DEBUG=1
18:47 sri and someone needs to test my last commit on windows
18:49 sri i suppose freebsd is not really a popular platform :)
19:04 yegor left #mojo
19:06 alnewkirk joined #mojo
19:08 perlrocks Twitter: "Gonna need some help from someone with #freebsd experience to debug this. http://t.co/nS0SRie #mojolicious #perl" --kraih http://twitter.com/kraih/status/60419388813225984
19:09 yegor joined #mojo
19:19 ilyuhan left #mojo
19:23 sh4 left #mojo
19:26 amonaco left #mojo
19:35 Foxcool left #mojo
19:42 stephanj sri: tests are running atm
19:43 sri i just need the one
19:43 perlrocks Twitter: "@ Kraih FreeBSD-8.2-STABLE + perl-5.12.3 + latest mojolicious = pass all tests successfully" (es) --allan_garret http://twitter.com/allan_gar​ret/status/60428323637043200
19:43 sri ./script/mojo test t/mojolicious/websocket_lite_app.t
19:43 sri hmm
19:43 stephanj http://pastebin.com/MWuYHHhc
19:43 stephanj so far
19:44 stephanj it hangs atm after the last line
19:44 sri oh, windows
19:44 stephanj yap
19:45 sri hmmm
19:45 stephanj i am attaching strace now
19:46 sri why is that asset test failing?
19:46 sri permission denied?
19:46 purl permission denied is sort of self-explanatory
19:46 sri that seems weird
19:47 Akron left #mojo
19:47 sri is that latest github version?
19:48 stephanj ye yap
19:49 sri ok can you test something for me then?
19:49 sri what if you replace STDIN with DATA at the start of the file
19:51 sri oh, and of course __DATA__ at the end
19:51 stephanj which test?
19:51 sri ioloop.t
19:53 stephanj http://pastebin.com/b7QC5snJ
19:53 stephanj now to ioloop
19:55 sri websocket tests don't matter for you, just freebsd
19:55 stephanj with the change to __DATA__ the IOLoop test passes
19:55 sri :o
19:55 sri interesting
19:55 stephanj http://pastebin.com/Q1Qc7F8x
19:55 sri stephanj++
19:56 stephanj for something this windows have to be good... even if its only running your tests ;)
19:56 stephanj s/running/failing/
19:59 GitHub133 joined #mojo
19:59 GitHub133 mojo: master Sebastian Riedel * 99083f2 (1 files in 1 dirs): fixed test - http://bit.ly/eXDKDO
19:59 GitHub133 left #mojo
19:59 sri ok, i have success reports for freebsd too now, no idea what went wrong with the countless fails on cpantesters
20:00 stephanj :)
20:02 stephanj should i test again?
20:02 sri sure
20:03 sri i'm going to release 1.18 if it works i guess
20:04 jamesw left #mojo
20:07 arpadszasz left #mojo
20:29 * sri yawns
20:30 stephanj do tcp connections have a timeout?
20:30 stephanj in a loop, because i seem to get few seconds after last data transmition a on_hup..
20:31 sri which test are you talking about?
20:31 stephanj ah i seer
20:31 stephanj -r
20:33 * sri is confused
20:33 stephanj i will prepare one later
20:33 sri ?
20:34 sri so, the tests do not pass?
20:34 stephanj for the thing with the timeout, it happens currently in my app, and i interpreted your response so that you want a test for it
20:35 stephanj i run the tests atm again
20:35 sri i'm talking about ioloop.t the whole time
20:35 sri the test that didn't work earlier
20:35 stephanj oh
20:36 stephanj http://pastebin.com/KT9Rhcfr
20:36 stephanj the first one is the permission denied test
20:36 stephanj denied test failure*
20:37 stephanj http://pastebin.com/BRCrmAhY <- the second failure
20:37 sri i don't care about that one
20:37 sri hmm, interesting
20:37 stephanj win xp
20:37 stephanj This is perl 5, version 12, subversion 1 (v5.12.1) built for MSWin32-x86-multi-t
20:37 stephanj hread
20:38 sri the first one is just your box being broken i'm sure
20:38 stephanj ye
20:38 stephanj might be
20:39 sri the fact that your box needs more than one second for a connect is also not good
20:46 ispy_ left #mojo
20:46 GitHub102 joined #mojo
20:46 GitHub102 mojo: master Sebastian Riedel * 7097862 (1 files in 1 dirs): fixed test - http://bit.ly/eBkU8T
20:46 GitHub102 left #mojo
20:46 sri stephanj: should be fine again now
20:47 sri btw. all connections have an inactivity timeout
20:47 sri it defaults to 3 or 5 seconds
20:51 stephanj 3 secs
20:52 stephanj k
20:52 stephanj so i will implement a ping, so connection stays alive
20:53 sri you can also change the timeout
20:53 stephanj ye
20:53 sri ping is better usually though
20:54 stephanj but the connection should in some cases be only a query from webapp->deamon(and thus shortliving) and sometimes deamon->client(which then open3s some app, these connecting should endure the whole app lifetime and thus be long running)
20:55 stephanj or rather client->deamon
20:55 stephanj so timeout will be useless, when i not set it to something insanely hight on latter case
20:55 stephanj but then, i might suffer zombie cons till the timeout is over
20:55 stephanj if a client not correctly quits the con
20:58 stephanj so, ping is the better choice here i think
21:00 sri 1.18 tagged and on it's way
21:03 stephanj now test 6 fails of the ioloop
21:03 stephanj Connect Timeout
21:03 purl Connect Timeout is special case.
21:04 perlrocks Twitter: "Mojolicious 1.18 by KRAIH - http://frepan.org/~kraih/Mojolicious-1.18/" --cpan_new http://twitter.com/cpan_ne​w/status/60448617097478144
21:04 sri what teh hell?
21:04 sri you said it works earlier
21:04 stephanj or rather it doesnt fail but spits out a warning about unhandled event connect timeout
21:05 sri nopaste?
21:05 purl nopaste is, like, http://paste.scsys.co.uk/
21:06 stephanj http://pastebin.com/mKgrKgDn
21:06 sri now i'm even more confused
21:06 sri where are the warnings and the not failing test?
21:06 sri :S
21:07 stephanj same here i pasted wrong data, from previous test run(pre your last commit)
21:08 stephanj http://pastebin.com/45Vms6m7 <- codebase: your last commit
21:10 * j-v-e just received a security advisory from debian sec team, they patched mojolicious in squeeze and sid
21:11 perlite_ joined #mojo
21:15 perlite left #mojo
21:15 perlite_ is now known as perlite
21:15 sri stephanj: ok, i guess that's acceptable
21:15 sri at least it passes
21:15 stephanj k
21:27 perlrocks Twitter: "Full Disclosure: [SECURITY] [DSA 2221-1] Mojolicious securityupdate http://bit.ly/eJqF8l" --SecMailLists http://twitter.com/SecMailLi​sts/status/60454538007687168
21:37 nuba left #mojo
21:38 nuba joined #mojo
21:42 perlrocks Twitter: "#fdmail [SECURITY] [DSA 2221-1] Mojolicious security update http://dlvr.it/P39pY #infosec" --FDmail http://twitter.com/FDmail/status/60458166894346240
21:51 yko left #mojo
21:58 perlrocks Twitter: "[SECURITY] [DSA 2221-1] Mojolicious security update http://dlvr.it/P3D8f" --1nf0s3cpt http://twitter.com/1nf0s3cp​t/status/60462201407938562
22:10 GitHub170 joined #mojo
22:10 GitHub170 mojo: master Sebastian Riedel * c022b06 (5 files in 4 dirs): fixed size limits in message parser - http://bit.ly/eJoMKx
22:10 GitHub170 left #mojo
22:10 GitHub192 joined #mojo
22:10 GitHub192 mojo: master Sebastian Riedel * 6dbbdce (1 files in 1 dirs): release preparation - http://bit.ly/flg8YB
22:10 GitHub192 left #mojo
22:18 perlrocks Twitter: "Mojolicious 1.19 by KRAIH - http://frepan.org/~kraih/Mojolicious-1.19/" --cpan_new http://twitter.com/cpan_ne​w/status/60467250339131392
22:18 perlrocks Twitter: "Released #mojolicious 1.19 with a few important bug fixes. #perl" --kraih http://twitter.com/kraih/status/60467409512972289
22:20 perlrocks Twitter: "Full Disclosure: [SECURITY] [DSA 2221-1] Mojolicious securityupdate:  http://bit.ly/h1zUIV" --shadowc4t http://twitter.com/shadowc4​t/status/60467757443067904
22:29 ispy_ joined #mojo
22:35 kaare_ left #mojo
22:39 GitHub169 joined #mojo
22:39 GitHub169 mojo: master Sebastian Riedel * 48c6b4a (2 files in 2 dirs): cleanup - http://bit.ly/hpRcld
22:39 GitHub169 left #mojo
22:43 GitHub112 joined #mojo
22:43 GitHub112 mojo: master Sebastian Riedel * 14e0196 (1 files in 1 dirs): cleanup - http://bit.ly/eo4LFi
22:43 GitHub112 left #mojo
22:43 perlrocks Twitter: "[SECURITY] [DSA 2221-1] Mojolicious securityupdate http://bit.ly/eJqF8l" --opexxx http://twitter.com/opexxx/status/60473685802356736
22:59 ispy_ left #mojo
23:00 GitHub90 joined #mojo
23:00 GitHub90 mojo: master Sebastian Riedel * 2bdbc77 (1 files in 1 dirs): cleanup - http://bit.ly/gGGiwS
23:00 GitHub90 left #mojo
23:03 ispy_ joined #mojo
23:05 perlrocks Twitter: "Vuln: http://www.securityfocus.com/bid/47402 Mojolicious Directory Traversal Vulnerability" (es) --D3Seguridad http://twitter.com/D3Segurid​ad/status/60479067643842560
23:06 GitHub157 joined #mojo
23:06 GitHub157 mojo: master Sebastian Riedel * 43f43b3 (11 files in 6 dirs): reduce chunk size - http://bit.ly/eAZl5h
23:06 GitHub157 left #mojo
23:19 amonaco joined #mojo
23:25 perlrocks Twitter: "Vuln: Mojolicious Directory Traversal Vulnerability: Mojolicious Directory Traversal Vulnerability http://bit.ly/gXNWOv" --infotechmike http://twitter.com/infotechm​ike/status/60484158643908609
23:26 perlrocks Twitter: "Vuln: Mojolicious Directory Traversal Vulnerability http://dlvr.it/P3TmK" --pikipiki_net http://twitter.com/pikipiki_​net/status/60484362084417536
23:30 perlrocks Twitter: "#hacking #virus Mojolicious Directory Traversal Vulnerability http://goo.gl/fb/S1F7t" --secureslinger http://twitter.com/secureslin​ger/status/60485331161587712
23:37 amonaco how critical is this?
23:40 perlrocks Twitter: "Vuln: Mojolicious Directory Traversal Vulnerability http://goo.gl/fb/OXpwj" --BackTrack5 http://twitter.com/BackTrac​k5/status/60487929042182145
23:45 GitHub145 joined #mojo
23:45 GitHub145 mojo: master Sebastian Riedel * bac59a1 (4 files in 3 dirs): improved message size limit handling - http://bit.ly/gV48cU
23:45 GitHub145 left #mojo
23:45 amonaco it doesn't affect my setup (nginx fcgi mojo)
23:45 sri nope doesn't

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