Camelia, the Perl 6 bug

IRC log for #mojo, 2010-08-15

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

All times shown according to UTC.

Time Nick Message
02:48 janus joined #mojo
02:51 ashleydev joined #mojo
03:57 marcus joined #mojo
04:04 tholen42 joined #mojo
05:06 GitHub52 joined #mojo
05:06 GitHub52 mojo: master Sebastian Riedel * f311b73 (1 files in 1 dirs): cleanup - http://bit.ly/b5hQrw
05:06 GitHub52 left #mojo
06:05 MojoGuest145 joined #mojo
06:05 MojoGuest145 From: http://www.google.com/search?hl=en&​amp;q=websocket+demo&aq=f&a​qi=g1&aql=&oq=&gs_rfai= (1 hits)
07:56 perlrocks Twitter: "Mojolicious-Plugin-TweetButton-0.0003, Вячеслав Тихановский. CPAN: http://tinyurl.com/29mbrqp" --cpan_linked http://twitter.com/cpan_linked/status/21215506077
08:07 yko joined #mojo
08:24 GitHub71 joined #mojo
08:24 GitHub71 mojo: master Sebastian Riedel * 0875edd (5 files in 5 dirs): added experimental support for .ep template variables tied to the stash - http://bit.ly/aJAVNL
08:24 GitHub71 left #mojo
08:24 sri this one might be awesome or a very stupid idea :)
08:25 sri all ep variables are now tied to the stash
08:26 vti hehe
08:26 vti some hacky stuff :)
08:26 vti when i you going to release cpan version? my tweet button fails tests, had to fix it ;p
08:26 vti s/i/are/
08:26 vti :D
08:27 sri ;p
08:27 sri it's actually not too hacky
08:27 sri tie is pretty basic
08:28 sri actually the ony thing i'm worried about is performance penalties it might cause
08:28 sri but in my tests it wasn't too bad
08:29 vti or memory leaks...
08:30 sri in this case rather unlikely
08:31 dotan joined #mojo
08:34 perlrocks Twitter: "Experimenting with template variables that are tied to the stash in #mojolicious, let me know what you think. :) http://bit.ly/9feGvC #perl" --kraih http://twitter.com/kraih/status/21217174506
08:38 GitHub194 joined #mojo
08:38 GitHub194 mojo: master Sebastian Riedel * 41a103b (1 files in 1 dirs): pod update - http://bit.ly/cbxMex
08:38 GitHub194 left #mojo
08:39 sri vti: keep bugging me about a release btw :)
08:39 sri it will speed things up
08:41 vti !tweet Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl
08:41 perlrocks vti: http://twitter.com/perlrocks/status/21217521571
08:41 perlrocks Twitter: "Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl --vti" --perlrocks http://twitter.com/perlrocks/status/21217521571
08:42 sri -.-
08:42 perlrocks Twitter: "RT @perlrocks: Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl --vti" --ykorshak http://twitter.com/ykorshak/status/21217542567
08:42 vti :D
08:42 sri :o
08:48 perlrocks Twitter: "RT @perlrocks Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl --vti" --sharifulin http://twitter.com/sharifulin/status/21217796934
08:48 sri ...
08:48 vti sri++ # for the great twitter bot ;p
08:49 yko ye :D
08:51 sri okok, two more retweets and we can have a release later today
08:55 yko lol
08:55 perlrocks Twitter: "RT @perlrocks Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl --@vti" --dotandimet http://twitter.com/dotandimet/status/21218112042
08:55 sri ohoh
08:55 vti one more
08:56 janus heh, nice marketing strategy :)
08:56 sri yea, but i might have to actually release... :S
08:56 janus so what? in the worst case you can release the next version even sooner ;)
08:56 yko and then sri will say 'they forced me' and blame us of any bug or api quirks :)
08:57 sri yko: true, i can always blame you :)
08:57 janus ... so that's a constant in the calculation ;)
08:58 yko ye, im here just for that :)
08:58 dotan ...and then we can have another angry blog post about experimental features snuck in just before the release...
08:59 janus i'm not sure if that's good or not... as it shows interest
08:59 yko i think sri will appreciate it. especially if there will be ~1k blog posts :)
08:59 sri the changes file is plastered with experimental warnings this time :)
09:00 sri all publicity is good publicity in the end
09:01 yko that's official mojo policy. and... it's work :)
09:02 janus sri: especially when qualitity is constantly increasing
09:05 sri officially mojolicious is still alpha software, it's totally awesome how much people already care about it :)
09:05 memowe Is there a way to define the port in app->start('daemon')?
09:05 sri --listen http://*:3000
09:06 memowe Can I put that in the app->start call?
09:06 sri i think so
09:06 memowe app->start('daemon --listen...')?
09:06 memowe Oh!
09:06 sri as a list i guess
09:06 janus write a test :)
09:06 sri qw//
09:06 memowe sri: cool, thank you.
09:18 janus mojo is the only web framework with future^Hama!
09:19 sri !
09:20 sri 10500 lines of code, 8000 lines of tests :D
09:20 janus and still without chains
09:21 janus (to cpan)
09:22 sri if you're not counting optional prereqs
09:22 sri ipv6, tls, epoll, kqueue, bonjour
09:22 janus optional is fine, as long as it works out of the box
09:23 sri agreed
09:23 janus simple setups are really important... (windows anyone?)
09:23 sri people often think i have something against prereqs while in fact i only have something against bad usability
09:23 yko windows, windows...
09:24 janus yko: not that i care, but it's an example everyone knows ;)
09:24 janus sri: i totally agree
09:26 janus just because something has been done doesn't mean it's any good beyond militant code reuse
09:26 janus so many crappy apis out there... partly you even wonder why anyone is using it
09:26 yko few days ago i wondering if i can reuse  (actually just steal) some code from CPAN::Uploader
09:27 yko and whaat i found? t/00-load.t > ok(1, q{I lied, this isn't tested at all!});
09:27 yko :'( Damn, i just wanted to steal some tests! is it too much? :)
09:28 yko Btw, i found (again) that internal Mojo test engine is mojolicious
09:28 yko sri++
09:29 janus now that's probably the most stupid ``test'' ever...
09:29 janus even worse
09:29 memowe sri: these tests fail (bad requests): http://github.com/memowe/mojo/blob/bull​etproofing/t/mojo/server_bad_request.t
09:29 memowe sri: not all the tests. the last two.
09:30 yko janus : well, at least in that test file was 'use CPAN::Uploader' - so that test will fail if module fails to compile :)
09:31 yko one thing i can not get - how to detect on which port/host test application started
09:31 janus yko: so that should be use_ok() instead
09:31 yko now i'm using something like... (go to gist)
09:32 yko http://gist.github.com/525291
09:33 yko and feeling stupid because of it, i belive there's simplier way to do just the same, i just don't know about it
09:34 yko janus : ye. if you are writing tests, it's makes you writing your modules/apps to be more easely tested. And it makes your apps more clean and code - more reusable :)
09:37 memowe sri: sorry, wait, typo.
09:38 janus yko: test driven development itself is already nice - given you know what your code should be doing :)
09:38 memowe done.
09:39 yko janus : im still can not force myself to write realy test-driven :( but i understand that idea
09:40 janus yko: me neither, prototyping with tests can get annoying pretty fast *g*
09:41 janus sri can probably write books about it (api changes require test changes) ;)
09:41 janus or anyone else who maintains the tests for his own code
09:41 sri for libraries i mostly start with the api, so TDD works really well for me
09:43 sri of course prototypes for say Mojo::Template are hackish scripts in the beginning :)
09:43 yko :)
09:44 sri but generally as soon as the basic skeleton stands i switch into TDD mode
09:44 perlrocks Twitter: "Mojolicious:: Lite Gyazo I've written on the server, and I do like this? http://j.mp/d4EMLm (Note: http://j.mp/d0IApX)" (ja) --akiym http://twitter.com/akiym/status/21220210480
09:44 janus still doesn't necessarily mean api changes don't create a lot of churn ;)
09:45 janus but on the other hand that's also what test are exactly for... thinking about it before time is wasted :)
09:46 sri ye, and later on api changes should be painful
09:47 arthas joined #mojo
09:49 sri still remember back in the catalyst days my tests were absolutely awful
09:49 sri took me some time to finally figure out how much better TDD is
09:51 janus me too, i only realized it when i tried it myself by killing bugs in this way
09:52 perlrocks Twitter: ":) RT @perlrocks: Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl --vti" --kraih http://twitter.com/kraih/status/21220542470
09:52 janus you've got bugs? take your chance and try TDD - NOW! :)
09:53 sri does that one count? Oo
09:53 vti no, that's you
09:54 sri phew
09:54 sri janus: you should tweet that
09:54 sri ;p
09:55 janus !tweet you've got bugs? take your chance and try TDD - NOW! :)
09:55 perlrocks janus: http://twitter.com/perlrocks/status/21220658745
09:55 sri :)
09:56 memowe How should a server react when it gets an aborted upload (multipart/form-data message with Content-Length too big)
09:57 memowe I think it's hard to detect that.
09:57 janus If a
09:57 janus request contains a message-body and a Content-Length is not given,
09:57 janus the server SHOULD respond with 400 (bad request) if it cannot
09:57 janus determine the length of the message, or with 411 (length required) if
09:57 janus it wishes to insist on receiving a valid Content-Length.
09:58 memowe But the Content-Length header IS given.
09:58 memowe It's wrong.
09:58 janus mhm, i see
09:59 janus there,last paragraph of 4.4:
09:59 janus When a Content-Length is given in a message where a message-body is
09:59 janus allowed, its field value MUST exactly match the number of OCTETs in
09:59 janus the message-body. HTTP/1.1 user agents MUST notify the user when an
09:59 janus invalid length is received and detected.
09:59 janus *sigh*
09:59 memowe Oh, a MUST...
09:59 memowe Thanks, janus.
10:00 sri "...and detected."
10:00 sri nothing to report if it's not detected
10:00 sri not really a MUST
10:01 memowe Also there's no information about a good server response on a wrong Content-Length from user agents.
10:01 memowe But 200 seems wrong.
10:02 sri you can't detect a too small Content-Length header and only time out one thats too big
10:02 memowe I see.
10:02 memowe I thought that's the only thing that can go wrong with uploads.
10:03 memowe Too big is already tested.
10:03 sri too small means that the rest of the message stays in the buffer and gets parsed as invalid followup request
10:06 janus hm, as for uploads keep-alive could be switched off?
10:07 janus sounds like a big can
10:07 sri theoretically
10:12 sri xantus: is the new ioloop code working for you?
10:13 sri xantus: should be pretty much exactly what you were asking for :)
10:19 yko strange. no MojoGuests today
10:20 yko i think it's because http://dev.xantus.org/ broken (or banned on irc server) last days
10:21 Htbaa joined #mojo
10:25 MojoGuest352 joined #mojo
10:28 yko hmm. looks like it works \:
10:33 sri hmm, i think tied template vars are wrong
10:33 sri can anyone think of a valid use case?
10:41 perlrocks Twitter: "RT @kraih :) RT @perlrocks: Everybody, keep bugging @kraih about #Mojolicious #CPAN release! #Perl --vti" --zakame http://twitter.com/zakame/status/21222609109
10:44 yko well...
10:45 vti sri: haha
10:47 sri -.-
10:47 * yko giggles
10:53 GitHub127 joined #mojo
10:53 GitHub127 mojo: master Sebastian Riedel * 20b5584 (3 files in 3 dirs): added app helper - http://bit.ly/asc9qf
10:53 GitHub127 left #mojo
10:57 sri ok, feedback for tied template vars is negative so far
10:57 sri because it's hidden magic
11:03 perlrocks Twitter: "Feedback for the experimental tied template variables is mostly negative so far, too much hidden magic. #mojolicious #perl" --kraih http://twitter.com/kraih/status/21223544053
11:09 GitHub118 joined #mojo
11:09 GitHub118 mojo: master Sebastian Riedel * 6c7ba14 (4 files in 4 dirs): removed tied template variables again - http://bit.ly/aBRtyg
11:09 GitHub118 left #mojo
11:10 sri and gone again :)
11:11 perlrocks Twitter: "Ok, and tied template variables are gone again from #mojolicious. :) #perl" --kraih http://twitter.com/kraih/status/21223863537
11:14 perlrocks Twitter: "By popular demand (thanks @vtivti) we'll have a new #cpan release of #mojolicious later today. :) #perl" --kraih http://twitter.com/kraih/status/21223972980
11:15 yko bwahaha
11:20 vti are you ready for some magic?
11:21 yko Yeah! c'mon!
11:21 yko would it be street magic?
11:22 vti damn.. i wish someone would give vimeo year subscription... :D
11:23 yko what's wrong with vimeo?
11:24 vti i have to wait 30 min until in converts my video
11:24 yko haha
11:24 yko well, 30 min's it's not so long
11:33 DaTa yay, release time, so i can upload the yamlconfig thing to cpan :)
11:37 yko actually i don't think sre ment 1.0 release. i think 0.999927 will take place of current cpan 0.999926 :)
11:39 sri thats correct
11:39 yko hehehe
11:40 vti who's sre?
11:41 sri sri enterprise edition?
11:41 yko lol
11:55 perlrocks Twitter: "#Vim snippets for #Mojolicious EP/EPL templates http://vimeo.com/14154142 #perl" --vtivti http://twitter.com/vtivti/status/21225777663
11:55 vti !
11:58 sri oh with music :)
11:58 perlrocks Twitter: "RT @vtivti: #Vim snippets for #Mojolicious EP/EPL templates http://vimeo.com/14154142 #perl" --kraih http://twitter.com/kraih/status/21225920821
11:58 vti ye, free music from jamendo ;p
12:02 perlrocks Twitter: "RT @ vtivti: # Vim snippets for # Mojolicious EP / EPL templates http://vimeo.com/14154142 # perl" (de) --memowe http://twitter.com/memowe/status/21226090245
12:04 perlrocks Twitter: "RT @vtivti: #Vim snippets for #Mojolicious EP/EPL templates http://vimeo.com/14154142 #perl" --ykorshak http://twitter.com/ykorshak/status/21226189778
12:05 yko we're spammers :D
12:09 vti it took me awhile to get used to imovie
12:10 janus har, writing LALR http parsing rules is quite nice :)
12:13 spleenjack joined #mojo
12:21 crab where are these LALR http parsing rules?
12:24 crab vti: wow, what do i have to do to get that behaviour in vim?
12:25 crab Data: where is the yamlconfig thing?
12:25 yko at least force vti to create new repos on github :D
12:25 sri screw auto completion...i want that music in my vim!!!
12:25 crab there was music?
12:26 yko sri: do you have vim?
12:27 sri sometimes
12:27 vti it's a robot music
12:27 sri but still mostly textmate
12:27 * sri dances...robot style
12:28 vti the name is 'Robot in Love' by BertycoX http://www.jamendo.com/en/album/56214
12:29 crab vti: what do i need to do to make vim behave this way?
12:30 vti crab: install snipmate.vim plugin
12:30 vti oh wait
12:30 yko you forgot to release it ?  :D
12:30 vti http://github.com/vti/snipmate.vim
12:31 vti here is a fork with epl snippets
12:32 vti it is very easy to add your snippets
12:32 yko hmm. vti++
12:33 crab vti: if i have a snipmate.vim, is there something which will just add your epl stuff?
12:33 yko i will steal snippets/epl.snippets right after i fix that bug with highlight :D
12:34 vti crab: just drop epl.snippets in ~/.vim/snippets directory
12:34 yko if it's possible at all, sure
12:34 vti yko: who are you talking to? ;p
12:35 yko ouch! i told it public?
12:35 yko damn, my dark plans are not secret now...
12:35 yko i thought i just thinking about it
12:36 janus crab: in my test code collection :)
12:38 crab janus: givesss it to ussss, my preciousss!
12:43 crab vti: wow, this thing rocks. (both snipmate, and epl.snippets)
12:46 DaTa crab: http://github.com/datamuc/Mo​jolicious-Plugin-YamlConfig
12:49 crab Data: cheers.
12:55 crab when exactly is startup() called in a Mojolicious app?
12:55 crab if i'm using daemon_prefork, say.
12:56 vti DaTa: don't tell me that i have to install Dist::Zilla in order to install your module!!!
12:56 DaTa vti: if you wan't to install it from github the answer is yes, currently :)
12:57 vti this is insane
12:57 DaTa yeah i know, this was my first try with dist::zilla... i guess i don't like it too :)
12:58 crab vti: what's worse, i *have* Dist::Zilla installed, but before "dzil build" worked, i had to install four plugin modules
12:59 vti only four?
12:59 crab no, more. it's still not working.
12:59 vti last time i tried is was damn huge
12:59 crab five.
12:59 DaTa there is Task::Dist::Zilla, it takes an hour to install :)
12:59 vti DaTa: why do you need namespace::autoclean;?
13:00 DaTa to unload Load :)
13:00 DaTa ok, i clean this up, und use EUMM :)
13:02 crab oh, this derives from JsonConfig. very clever.
13:03 DaTa crab: that's why i have to wait for a new mojo release :)
13:04 crab i didn't even realise that the current release doesn't have JsonConfig.
13:05 crab vti: can you shed some light on my startup question above, please?
13:05 DaTa crab: it has, but it currently makes no sense to derive from
13:05 vti crab: it is called one time when app is loaded
13:06 crab oh.
13:06 vti have to go, c u
13:07 crab so then i can't open my database handle there.
13:09 crab vti: also, i didn't realise M::P::TagHelpers included a "label" helper until i saw your video
13:13 geekus joined #mojo
13:15 crab sri: why did you remove the tied variables?
13:15 crab i mean, i'm just curious. the commit message doesn't say anything about it.
13:23 dotan crab: From sri's twitter message: "Feedback for the experimental tied template variables is mostly negative so far, too much hidden magic"
13:26 DaTa better now? :)
13:30 sri crab: removed it because the feedback was entirely negative :)
13:30 sri hidden magic
13:33 sri no point having it in the release today
13:35 sri hmm, it seems the twitter stream is only a subset of the real data
13:35 sri i have mojolicious tweets in my timeline the bot never got
13:37 Htbaa joined #mojo
13:39 DaTa "Still missing a few tweets? Due to resource constraints, not every tweet can be indexed in Twitter Search. Our engineers are always working to index more updates, but we can't force individual, missing Tweets into search."
13:40 DaTa they have not enough enginieers to index the tweets manually :)
13:40 GitHub169 joined #mojo
13:40 GitHub169 mojo: master Sebastian Riedel * 0c0115f (1 files in 1 dirs): release preparation - http://bit.ly/caE6I5
13:40 GitHub169 left #mojo
13:41 sri lol
13:41 sri should i release now?
13:42 DaTa go for it :)
13:44 * sri goes for it
13:48 sri uploaded!
13:48 sri \o/
13:50 sri and tagged of course
13:52 perlrocks Twitter: "Released #mojolicious 0.999927 (Comet), the changes file is pretty epic this time. :) http://bit.ly/6v9jOt #perl" --kraih http://twitter.com/kraih/status/21232039292
14:02 sri DaTa: that was quick :)
14:04 perlrocks Twitter: "#mojolicious 0.999927 released! 72 more releases and @kraih will not have choice than release 1.0!" --ykorshak http://twitter.com/ykorshak/status/21232792385
14:04 sri heh
14:04 * yko giggles
14:04 DaTa sri: what? that? https://pause.perl.org/pause/a​uthenquery?ACTION=tail_logfile :)
14:05 sri ye :)
14:23 perlrocks Twitter: "RT @kraih Released #mojolicious 0.999927 (Comet), the changes file is pretty epic this time. :) http://bit.ly/6v9jOt #perl" --sharifulin http://twitter.com/sharifulin/status/21234043375
14:36 perlrocks Twitter: "RT @vtivti: #Vim snippets for #Mojolicious EP/EPL templates http://vimeo.com/14154142 #perl" --tempiretech http://twitter.com/tempiretech/status/21234919331
14:48 tempire I though ep templates replaced epl...?
14:49 dotan epl template still work, ep is just the new recommended default
14:50 tempire vti: what plugin/config creates the dots in your vim?
14:50 sri ep is even built on top of epl, so it is also not going away
15:33 ashleydev joined #mojo
15:33 memowe sri: how do I get silence from Test::Mojo::get_ok? calling with URL, empty hash, empty string doesn't work.
15:34 sri ?
15:34 memowe I want to overwrite the get_ok test message.
15:35 sri why?
15:35 memowe Because it's 100000 chars long.
15:35 sri well you can't
15:36 memowe I saw. No problem.
15:36 memowe The test ist separated from others, so the long lines won't get in the way.
15:44 sri http://search.cpan.org/~kraih/Mojolicious-0.999927 # how about some 5 star ratings? :D
15:53 perlrocks Twitter: "Mojolicious-0.999927, Sebastian Riedel. CPAN: http://tinyurl.com/235mto5 * Changes: http://tinyurl.com/2atb72t" --cpan_linked http://twitter.com/cpan_linked/status/21240518658
15:55 perlrocks Twitter: "Mojolicious-Plugin-YamlConfig-0.0.1, Danijel Tašov. CPAN: http://tinyurl.com/2el2b26 * Changes: http://tinyurl.com/2blychq" --cpan_linked http://twitter.com/cpan_linked/status/21240670357
16:02 dotan DaTa? M::P::YamlConfig SYNOPSIS section still says "plugin json_config"...
16:11 DaTa dotan: fixed, thanks
16:21 doubi joined #mojo
16:28 perlrocks Twitter: "RT @kraih Released #mojolicious 0.999927 (Comet), the changes file is pretty epic this time. :) http://bit.ly/6v9jOt #perl" --zakame http://twitter.com/zakame/status/21243011693
16:38 yko sri: nested includes supposed to work?
16:38 marcus memowe can write tests :-p
16:39 yko because it seems to be broken now
16:39 yko http://gist.github.com/525667
16:43 memowe yko: thank you, pushed that to my queue. I'll write a test for it.
16:44 yko np
17:06 MojoGuest725 joined #mojo
17:06 MojoGuest725 From: http://www.google.com/search?client=safari&rls​=en&q=websocket+demo&ie=UTF-8&oe=UTF-8 (2 hits)
17:08 dotan left #mojo
17:27 yko memowe: i've already wrote fix and tests and send pull request, so pop your queue
17:27 memowe \o/
17:27 yko argh, 2 line fix, 20 lines of test :)
17:28 yko 2000 lines of code to seek through
17:28 yko 0 'WTF' moment, i think :D
17:29 yko mojo++
17:52 perlrocks Twitter: "Mojolicious-Plugin-YamlConfig-0.0.2, Danijel Tašov. CPAN: http://tinyurl.com/3xctgq4 * Changes: http://tinyurl.com/2w8pxrs" --cpan_linked http://twitter.com/cpan_linked/status/21248311329
17:53 crab if i say:     $auth->route('/')->name('home')->to('home#index');
17:54 crab then elsewhere i can say $self->redirect_to('home'), right?
17:55 memowe crab: yip.
17:55 memowe crab: I think, it's more readable to write route(...)->to(...)->name(); :)
17:57 crab either way, it doesn't work.
17:57 crab i'm doing this in lib/Foo/Auth.pm:sub logout, and it tries to find templates/auth/logout.html.ep and serves a 404 when it can't find it.
17:58 crab how do i go about debugging this?
17:58 crab Sun Aug 15 23:27:18 2010 debug MojoX::Dispatcher::Routes:139 [4143]: Dispatching controller.
17:58 crab can i make that more verbose somehow?
17:59 memowe crab: um...
17:59 memowe What do you expect?
17:59 memowe That it searches for the template used in the action associated with the home route?
17:59 memowe redirect_to creates a HTTP level redirect.
17:59 memowe The client starts a completely new request.
18:00 memowe It's not an internal redirect as in Catalysts ->forward
18:00 crab yes, so why is it looking for auth/logout.html.ep?
18:00 crab i want to just serve the redirect as a 302 not with a 404
18:00 memowe Ah, IC
18:01 memowe Try a return; after that
18:01 memowe That works for me.
18:01 crab also: as i understand it, there is no "internal redirect" mechanism at all with mojo, right? the recommended thing to do is just set up the code so i can call the right sub?
18:02 crab my code is this: sub logout { my $self = shift; $self->session(expires => 1); $self->redirect_to('home'); return }
18:02 memowe crab: I don't know what you mean by "to do". If you want to call some code, just do it :)
18:02 crab right.
18:03 memowe My logout thing does "it" right even without a false return.
18:03 memowe Sorry that I can't help you.
18:03 crab what version do you uise?
18:04 memowe I think it's only a few days old, from github.
18:05 memowe In my logout action, I delete some things, then set a message in the flash and call redirect_to('message'), which is a page that displays the flash message.
18:05 memowe That's all.
18:06 memowe crab: you're using the CPAN version?
18:06 crab no, head
18:08 crab how very odd.
18:10 memowe crab: Oh, I see your problem. :)
18:10 memowe I got it too with fresh code.
18:10 memowe s/code/mojo/
18:10 memowe damn
18:10 crab so it's a bug?
18:10 memowe I don't know
18:10 crab i was just going to say "i could swear it worked ok a few days ago" but i thought you would think i'm crazy ;-)
18:11 memowe No, I don't think that. ;)
18:11 memowe sri: what did you do!? You broke our code! :D
18:11 memowe I think, I should write a test for that
18:13 memowe crab: wait a minute.
18:14 yko memowe, yes he did!
18:15 yko *hi
18:15 crab memowe: ok...
18:15 memowe crab: OK, you need to call render.
18:15 yko now he will tell us that it's our fault. that's we who forced him make release :)
18:15 memowe One way is this:
18:15 crab why should i need to call render? i don't want to render anything!
18:16 yko oh, even better, he will tell that it was my fault :)
18:16 memowe $self->redirect_to('home'); $self->render(text => 'Try ' . $self->helper(url_for => 'home'));
18:16 memowe yko: it's all your fault! :D
18:16 yko bwahaha
18:16 memowe yko: let's check the spec.
18:16 yko no, your!
18:16 yko :p~
18:17 yko memowe: which spec?
18:18 memowe Hm, I read about that already.
18:18 memowe About a body of 302 messages.
18:19 yko wait, you want to say that now i should render something if i'm doing redirect?
18:19 crab yko: it seems with latest mojo it doesn't work if you don't render something
18:19 memowe I hope not.
18:19 crab and i can confirm just now that if you DO render something, it works fine
18:19 yko memowe, have you phisical address of sri?
18:19 yko :E
18:20 * yko giggles
18:20 memowe crab: if there is some content, the renderer doesn't try to find the right template.
18:20 yko i have apps with tonns of redirects without rendering
18:20 memowe yko: no. ;)
18:20 crab yes, i know that (from other methods)
18:20 yko memowe: we should get it :)
18:20 crab yko: do your apps work with git head?
18:21 yko well, i updated to head about hour ago and already made pull request
18:21 yko but the problem was about nested includes
18:21 memowe I just know he lived in Bielefeld long time ago.
18:21 yko i didn't tested redirects
18:21 * yko writes down into the notepad/
18:22 crab come on, bielefeld doesn't really exist
18:22 memowe crab: it does.
18:22 yko damn... where's my rirfle?
18:22 * memowe doesn't really exist
18:22 crab memowe is part of the conspiracy
18:23 memowe My girlfriend lives in that "town".
18:23 memowe May be I'm already infected.
18:24 yko Kiev - Bielefeld. 1 687km
18:24 * sri blames yko
18:24 yko I can drive it in ~18 hours.
18:24 memowe eh eh eh
18:25 yko If no problems on borders
18:25 yko customs i mean
18:25 sri if something is broken, you need to send tests
18:25 yko haha./ what did  i say?!
18:25 memowe sri: I'll write one.
18:25 yko sri: already :p
18:25 memowe yko: you did it?
18:25 yko about nested includes - yes
18:25 memowe Ah, OK.
18:25 yko dunno what's your problems :)
18:26 crab sri: it's not clear to me if it's broken or not. would you expect redirect_to('x') to work without calling render?
18:26 yko Oh... now i see
18:26 yko reduirect broken :)
18:26 sri crab: just looked into the tests, "->redirect_to('http://127.0.0.1/foo')->render_text('Redirecting!')"
18:27 yko ouch...
18:27 yko it was working without render_text for a while
18:27 sri i can remove the dependency
18:27 crab sri: in the specific case of redirects, it seems to me _sensible_ to send some content with it. but it's also a definite behaviour change from earlier releases, and quite recent too.
18:28 sri i'll make it work again
18:28 yko thx a lot
18:28 sri redirect_to just needs to set stash('mojo.rendered' => 1)
18:28 sri thats all
18:28 yko :D
18:28 sri already have a test i can reuse
18:28 yko ye, that's simply
18:29 crab may i suggest that if render is not called you send the 302 with "Redirecting to $URL" as content?
18:29 sri dunno
18:32 sri oh, i can't confirm the bug Oo
18:32 sri it just works
18:33 sri ah, ok, it requires a name it seems
18:37 crab is this correct? <%= link_to $to => {%><%= url_for $to %><%}%>
18:38 yko actually yes i think. but you can write just <%= link_to $to => sub { url_for $to } %>
18:38 yko it's less brain damaging
18:38 crab thanks!
18:39 yko try first, i'm always wrong :)
18:42 crab yko: it works
18:42 sri yko++ # fix actually works :)
18:43 yko wow. cool, thx
18:43 sri this would have taken me quite some time to figure out :o
18:43 yko sri: what do you mean?
18:44 GitHub64 joined #mojo
18:44 GitHub64 mojo: master Sebastian Riedel * 2015b3c (6 files in 5 dirs): fixed multiple render bugs - http://bit.ly/bXDKIC
18:44 GitHub64 left #mojo
18:44 sri yko: i mean yko++
18:44 yko oh. gg
18:44 yko thank
18:45 crab aha, using --reload causes startup() to be called multiple times even if the module hasn't changed.
18:46 sri yes, because the application is reinstantiated
18:46 sri startup gets called from new
18:46 crab yes, i was just caught by surprise
18:49 sri http://gist.github.com/525792 # wow, perl6 is really not quite there yet
18:50 sri http://github.com/rurban/Jit # this stuff is really cool
18:51 vti tempire: https://gist.github.com/4daa106f3ee977988e40
18:51 crab sri/yko: i know i've discussed this before, but opening db handles in startup() as suggested seems to not be the right thing to do
18:52 sri crab: why not?
18:52 crab because it creates one dbh before forking and all the children share it.
18:52 sri $self->defaults(db => $handle);
18:52 sri ah
18:53 sri right, that would require lazy loading
18:53 vti sri: released? :)
18:53 sri like an attribute on the app class
18:54 sri __PACKAGE__->attr(db => sub {...}); ... my $db = $self->app->db;
18:54 crab where are attrbutes documented, or alternatively is there some example i can look at?
18:54 crab ah, perfect.
18:54 sri normal perl oo
18:55 sri alternatively you could use a plugin hook
18:56 sri app->plugins->add_hook(before_dispatch => sub { $_[1]->stash->{db} = $handle });
18:56 crab i think the attr works for me, once the sub returns a value it's cached for me and returned, right?
18:56 sri right
18:56 crab perfect
18:57 sri it's an interesting problem though, maybe there's a way for us to handle it better
18:57 vti or use dbix::connector
18:57 crab different question, how does static dispatching work? i ask because i have that top-level ->bridge->to(cb => sub { return 1 if $bender }) bridge route, and i would like to avoid it on static calls
18:57 sri crab: static bypasses routes
18:58 sri entirely
18:58 crab really? i see 403s being served for /foo.css before i login
18:58 crab let me recheck
18:58 sri if a file exists routes don't run
18:59 crab ah, no, i'm just on crack.
18:59 crab it was for files which would have been static, but didn't actually exist (favicon.ico)
18:59 crab sorry.
18:59 sri :)
18:59 sri i'm just happy you've not found another bug
19:00 sri oh, dbix::connector is a good idea
19:00 sri crab: just do startup and dbix::connector
19:01 * crab goes to look at dbix::connector
19:01 sri seems way more elegant
19:03 sri automatic fork handling
19:04 crab nice. but augh, what a horrifying interface for run().
19:08 marcus The default is no_ping, but you likely won't ever use it directly, and isn't recommended in any event.
19:09 GitHub167 joined #mojo
19:09 GitHub167 mojo: master Sebastian Riedel * 231cc7f (1 files in 1 dirs): cleanup - http://bit.ly/9t64Xb
19:09 GitHub167 left #mojo
19:09 marcus wtf?
19:09 marcus the default is not recommended?
19:09 sri lol
19:11 crab it's not just a typo, the default mode really is no_ping
19:40 marcus /win 11
19:40 marcus sigh
19:43 vti crab: you are reading it wrong, no_ping is faster because it assumes that connection is ok
19:43 vti marcus: direct use is not recommended, not the mode ;p
19:44 vti you are just mean people! ;p
19:45 crab vti: if you use $conn->dbh->usual_dbi_method() does it do ping each time?
19:45 vti yes, it is just normal dbh
19:45 vti use $conn->run(sub {$_->do("...")});
19:46 crab what? normal dbh does ping every time?
19:47 vti connect_cached does
19:48 crab but DBIx::Connector doesn't use connect_cached, right?
19:48 vti no
19:48 vti ah, ok, ye
19:48 crab so using dbh->whatever is possible but not safe if the handle has disappeared?
19:48 vti ye
19:48 vti actually you have to check, but nobody does :)
20:59 perlrocks Twitter: "Mojolicious 0.999927 adds a ton of goodies;  css3 selector tests, defaults, oneliner http client, Bonjour,++ Huge list. http://bit.ly/c5YZ1P" --marcusramberg http://twitter.com/marcusr​amberg/status/21258936262
21:27 yko joined #mojo
21:28 arthas joined #mojo
21:40 ask_ joined #mojo
21:44 [1]awnstudio joined #mojo
21:56 ashleydev joined #mojo
22:06 ltriant joined #mojo
22:57 ask_ joined #mojo
23:17 fod joined #mojo

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