Camelia, the Perl 6 bug

IRC log for #mojo, 2010-09-09

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

All times shown according to UTC.

Time Nick Message
00:22 MojoGuest706 joined #mojo
00:22 MojoGuest706 From: http://blog.kraih.com/perl-is-ready-for-html5 (3 hits)
00:23 MojoGuest706 left #mojo
00:30 cognominal left #mojo
00:45 cognominal joined #mojo
02:08 xantus_ hi hi
02:08 awnstudio is now known as awnstudio-is-cognan
02:08 awnstudio-is-cognan is now known as iam-cognant
02:10 xantus_ no, I am cognant!
02:10 xantus_ is now known as xantus[[
02:10 xantus[[ is now known as xantus[]
02:35 janus left #mojo
02:47 janus joined #mojo
02:57 Alias joined #mojo
03:38 MojoGuest769 joined #mojo
03:39 MojoGuest769 gn ng
03:40 MojoGuest769 left #mojo
03:50 yakudzo joined #mojo
03:53 su-bzero joined #mojo
04:04 tl joined #mojo
04:06 tholen42 left #mojo
04:50 Foxcool left #mojo
05:13 ysyrota joined #mojo
05:28 esskar__ joined #mojo
05:32 esskar_ left #mojo
05:32 esskar__ is now known as esskar_
05:43 koban joined #mojo
05:45 koban left #mojo
05:45 koban joined #mojo
05:46 koban left #mojo
05:46 koban joined #mojo
05:52 esskar__ joined #mojo
05:57 marcus xantus[]: are you cognac?
05:57 esskar_ left #mojo
05:57 esskar__ is now known as esskar_
06:27 esskar left #mojo
06:35 xantus[] no
06:36 xantus[] sri: connections receiving data still 'time out' and end prematurely
06:37 xantus[] my downloads die at 30s, even while I monitor the progress cb
06:40 tl left #mojo
06:42 xantus[] I'll check later if there's something I can call to prevent the timeout, increasing the timeout secs just seems wrong to me
06:42 tl joined #mojo
07:23 Rhaen Good morning beloved channel.
07:27 yko joined #mojo
07:27 marcus Rhaen: moin
07:28 Rhaen marcus: moin :)
07:29 Rhaen just another day in the worlds of mojolicious.
07:29 Rhaen Today I am starting to migrate my first app from CGI::App to mojo
07:29 Rhaen ugh, might be an interesting task
07:30 ltriant left #mojo
07:41 marcus sri: we are having some trouble with mojo-client
07:41 marcus [Thu Sep 09 09:37:48 2010] [error] [client 127.0.0.1] FastCGI: server "/usr/local/bin/startsiden_tvguide_web_fastcgi.pl" stderr: Unhandled event error: Unknown error, probably harmless. at /usr/local/share/perl/5.8.8/Mojo/IOLoop.pm line 718
07:41 marcus and like [Thu Sep 09 09:37:48 2010] [error] [client 127.0.0.1] FastCGI: server "/usr/local/bin/startsiden_tvguide_web_fastcgi.pl" stderr: Thu Sep  9 09:37:48 2010 error Mojo::Client:762 [16820]: Connection reset by peer
07:41 tardisx probably harmless never is :-)
07:42 marcus mostly harmless is better
07:43 tardisx "Note (probably harmless): No library found for -limportant_library_you_need"
07:43 marcus ;)
07:43 tardisx that one always annoyed me... haven't seen it much lately
07:44 tardisx maybe because I stick to pure perl modules :-)
07:58 spleenjack joined #mojo
08:14 Alias_ joined #mojo
08:16 janus moin
08:27 sri moin
08:29 sri marcus: thats harmless
08:29 sri i would filter out connection reset by peer if i knew how to do it reliably
08:30 sri xantus: connections should only time out if there's no activity for the timeout duration
08:34 sri xantus: 30 seconds is a strange time, our timeout for inactivity is 15 seconds, which seems quite generous
08:35 sri actually, i don't think we have anything with a 30 second timeout
08:36 marcus sri: we're getting some failed connections since we switched from curl to mojo
08:36 marcus sri: trying to get better info
08:37 sri failure is always an options
08:37 * marcus wants http://www.thinkgeek.com/geektoy​s/cubegoodies/dfc1/images/7107/ for the office
08:37 sri keep alive connections get closed from time to time
08:38 memememomo left #mojo
08:38 marcus sri: we're seeing this problem when we're running the web service on fastcgi, but not as a standalone daemon.
08:38 marcus sri: can we disable keep alive?
08:38 memememomo joined #mojo
08:38 marcus for the client..
08:38 sri unless you are running the client inside the mainloop there is no way for us to know if a connection died before we try it
08:39 marcus sri: but shouldn't it just open a new connection if it died?
08:39 sri patches welcome
08:39 marcus so you think it should?
08:39 marcus or not?
08:40 sri if we can do it we should
08:41 sri actually, i would implement it if someone writes a test case
08:41 sri the test case is what scares me away atm
08:52 marcus ok
08:52 marcus think we have a strategy for doing it
08:52 marcus just fire up a daemon as usual, without keepalive, and set the keepalive header
08:52 marcus then try two requests against that
08:52 marcus I'll try hacking together a test like that
08:56 sri ok, i'll make it pass then
09:01 marcus sri: what does my $client = Mojo::Client->singleton->app(app);
09:01 marcus do?
09:01 marcus oh, it's mojolicious::lite magic
09:01 yko left #mojo
09:03 sri no magic, just makes sure tests use the same client instance
09:03 sri and in turn the same ioloop
09:04 marcus yeah, was just wondering where 'app' came from
09:04 sri since daemon and client have to share the same mainloop
09:04 sri ah
09:11 koban left #mojo
09:14 sri marcus: i have the solution ready, waiting for the problem ;p
09:22 marcus sri: I tried setting the connection header, but my request hangs at the moment
09:22 marcus btw, saw something interesting when I tried turning on debug:
09:22 marcus http://paste.scsys.co.uk/50380
09:22 marcus this is the stress test
09:22 marcus seems the response sets the keep-alive header, yet the transaction says connection is not kept alive_
09:23 sri kept alive mans the original connection was kept alive
09:23 sri *+e
09:24 sri as in it was deposited before
09:24 sri this seems to be the first request
09:25 marcus ah, of course
09:25 sri kept_alive = previously, keep_alive = currently
09:25 marcus you're creating a new client
09:25 marcus thus forcing a new connection
09:25 * sri nods
09:26 sri stress test is specifically for leaks
09:26 sri if you destroy a client the ioloop needs to be cleaned and stuff
09:27 sri my solution is ready and documented, guess i'll get some brakfast now :)
09:37 sri interesting, new $15 per month ec2 mini instances
09:38 marcus yeah, I found that interesting too
09:38 marcus mojo+simpledb + micro instance?
09:39 sri ye
09:40 crab what is simpledb?
09:40 sri amazon cloud database
09:45 crab oh, that thing. righ.
10:01 koban joined #mojo
10:03 sri marcus: you can simply use a mock server
10:03 sri like the mock clients in t/mojo/app.t
10:03 sri raw Mojo::IOLoop
10:04 sri bending the daemon into doing bad stuff is not exactly easy
10:05 sri or actually not, as long as they run inside the same ioloop the connection will be picked up
10:06 sri s/connection/connection close/
10:07 sri ah, i guess you can drop the connection in between the requests from the outside
10:07 sri ye, that should do
10:09 sri marcus: let me know if you're making progress, otherwise i know how to do it now
10:15 marcus sri: no, I'm failing.
10:15 marcus I can continue to fail for your amusement if you prefer tho
10:15 marcus ;)
10:16 marcus for some reason, my new connection isn't working at all.
10:21 sri tempting
10:21 sri but i think i'll just implement it :)
10:22 marcus ok, will be interested to see how you drop the connection between the requests.
10:23 sri i'll use a mock server
10:24 marcus ok. I see now. looked at t/mojo/app.t
10:24 marcus think you will do it faster
10:25 sri examples/microhttpd.pl is the actual example
11:07 GitHub5 joined #mojo
11:07 GitHub5 mojo: master Sebastian Riedel * ab5ca9c (4 files in 3 dirs): improved keep alive timeout handling in Mojo::Client - http://bit.ly/9CQ0fO
11:07 GitHub5 left #mojo
11:07 sri marcus: that should do the trick
11:13 su-bzero_ joined #mojo
11:16 marcus sri++ # very nice
11:17 su-bzero left #mojo
11:21 yakudzo left #mojo
11:22 marcus sri: seems like those tests pass even without your change?
11:23 sri that would be unfortunate
11:24 sri nope fail
11:24 sri or
11:25 marcus I cpanm force installed 29
11:25 marcus and mBook:Source marcus$ prove Mojo/t/mojo/client.t
11:26 marcus gives All successful
11:26 sri ah, they just don't pass with MOJO_CHUNK_SIZE=1
11:27 koban left #mojo
11:27 koban joined #mojo
11:27 sri MOJO::IOLoop makes it really hard to do bad stuff :S
11:29 sri hmm, i might have to use some internal magic
11:33 GitHub35 joined #mojo
11:33 GitHub35 mojo: master Sebastian Riedel * 61a028e (1 files in 1 dirs): improved tests - http://bit.ly/cJy4CU
11:33 GitHub35 left #mojo
11:33 sri marcus: that test is pretty fatal now
11:48 sri i guess this is one of the cases where suign a private method is fine
11:48 sri *using
12:09 Rhaen uhm. Are there any "official" grafx for this project?
12:09 Rhaen e.g. to use them in presentations
12:10 koban left #mojo
12:12 koban joined #mojo
12:14 sri Rhaen: not yet, but will be in 1.0
12:23 Rhaen ok :)
12:23 Rhaen next thing which - hm, seems to be interesting at least for win users
12:24 iam-cognant left #mojo
12:24 Rhaen when you type mojolicious generate lite_app <name>
12:24 Rhaen it will generate the single file which is totally fine
12:25 Rhaen for Win Users it might be a big help if this file has a suffix like .pl
12:25 Rhaen this is no request to change - just an idea and something about my first steps
12:26 Rhaen might be easier to configure the cgi-handler for apache as well
12:26 Rhaen (oh, and for editors)
12:39 ptomli joined #mojo
12:41 Rhaen hej ptomli
12:42 ptomli ola
12:42 Rhaen ola!
12:42 Rhaen spanish?
12:43 ptomli nah
12:43 Rhaen :)
12:46 * sri waves
12:46 ptomli yo
12:47 sri Rhaen: you are supposed to generate the full filename
12:48 sri by default mojolicious generate lite_app will generate a file named myapp.pl
12:48 Rhaen ah, ok. Got that
12:49 Rhaen Another thing which I just noticed.
12:49 Rhaen I have to work on win32 at work.
12:50 Rhaen After you started the Mojolicious::Lite app with perl <app.pl> daemon --reload
12:50 Rhaen the file turns to read-only
12:50 Rhaen I guess that's for the file reload check
12:50 sri no
12:51 Rhaen I can force the orverride with my vi - not sure if this works for everyfil
12:51 Rhaen e
12:51 Rhaen err every editor
12:51 sri i don't think we do anything that would cause that
12:51 sri must be a windows quirk
12:51 ptomli i think windows makes files ro when they're open
12:52 Rhaen yep - true, ptomli
12:52 ptomli try something like the equiv of  cat myapp.pl | perl
12:52 Rhaen I don't think that's an issue, however we should add this to the documentation
12:53 ptomli well, the feature is broken on win... maybe sri will remove it
12:53 sri what?
12:53 Rhaen haha, let me fork you on github. (didn't know that I will fork that early)
12:53 Rhaen ptomli: oh, the server relaods perfectly after changes.
12:53 Rhaen Everything is working.
12:53 ptomli how do you manage to overwrite the ro file?
12:53 sri i don't remove a perfectly workign feature because of a windows quirk :)
12:54 Rhaen I am using vim and I save with :w!
12:54 ptomli just testing the boundaries :)
12:54 Rhaen I'll check different editors
12:54 sri actually i don't care too much about windows as long as mojolicious runs there "good enough"
12:54 ptomli colloquy update, brb
12:55 ptomli left #mojo
12:55 sri we've disabled all kinds of unix optimizations for windows
12:55 ptomli joined #mojo
12:55 Rhaen ah, editing the file with WordPad causes an error as it says: the file is locked by a different process
12:56 ptomli http://www.virtualbox.org/
12:56 Rhaen sri: stick with it. We'll note it inside the documentation (maybe inside the faq we should add a win32 section)
12:56 Rhaen I would do this part - np.
12:56 sri could also do a warning for --reload on windows
12:56 Rhaen ptomli: I don't have admin rights here. I am using a portable strawberry perl which works well. No chance to install something.
12:57 sri --reload is a developer convenience feature, windows users have decided against convenience anyway :)
12:57 Rhaen sri: I'll note it down. And will send a patch on github
12:57 sri sure
12:58 sri we also have a wiki
12:58 sri (on github)
12:58 koban left #mojo
12:58 sri it's supposed to become an incubator for new documentation
12:58 koban joined #mojo
12:59 Rhaen Bah wiki! :)
13:07 sri ;p
13:16 sri !tweet viva la revolucion! #perl #mojolicious
13:16 perlrocks sri: http://twitter.com/perlrocks/status/24008162869
13:16 perlrocks Twitter: "viva la revolucion! #perl #mojolicious --sri" --perlrocks http://twitter.com/perlrocks/status/24008162869
13:17 Kulag left #mojo
13:17 Kulag joined #mojo
13:18 Rhaen hahaha - an old perl script here at work broke, due to incompatabilities to an update on perl 5.10
13:18 Rhaen it_s so much fun to write mojo code now
13:18 sri 5.10 was a great release, love the new regex engine
13:19 xantus[] sri: I set a 30s timeout
13:19 sri xantus[]: connection_timeout?
13:21 xantus[] actually I only set keep_alive_timeout
13:21 sri ok, thats the same in the end
13:22 sri it should only trigger if there has been no activity at all on the connection for 30 seconds
13:22 sri it's the "$c->{active}" code in Mojo::IOLoop
13:24 sri as in no byte sent or received
13:25 sri especially for uploads/downloads i don't see a way for that to ever happen
13:26 sri maybe you can replicate it small scale in a test with a shorter timeout?
13:27 Rhaen hm, what migh tbe a good way to port a CGI::App. Matching the ?rm parameter or just use new mechanisms for mojo?
13:27 Rhaen ?rm tends to look ugly in the code of mojo.
13:27 sri /rm?
13:28 sri run mode is just a path in the end
13:28 Rhaen sri: oh, rm is the parameter for runmode in CGI::App which is used to choose the view
13:28 sri we use the route name to choose the view
13:29 Rhaen ah, sorry. brain was on halt mode.
13:29 sri get '/happy' => sub {...} => 'fun';
13:30 Rhaen yup which look like /?rm=happy in CGI::App
13:30 sri get '/happy' => '*';
13:30 sri (will render the template happy.html.ep)
13:32 sri or just get '/happy' => sub { shift->render('happy') };
13:32 Rhaen ok, let�s dive into it.
13:33 Rhaen It's a good old app like http://localhost/?rm=displ​ay&amp;user=whatever&amp;...
13:34 Rhaen so it's a get '/' => sub { <extract the params of the get req and do something with it> }
13:36 sri just one path? mojolicious will be bored to death ;p
13:38 sri haha, the Sketch author is working on importing my Amelia http://twitter.com/bohemia​ncoding/status/24008220943
13:39 Rhaen Problem will be that I have to decide what to do on the ?rm parameter
13:39 ptomli Rhaen: mod_rewrite and sensible routes?
13:41 Rhaen hm.
13:42 sri that would be the clean way to keep your old URLs working
13:42 Rhaen unfortunatelly - yes.
13:43 ptomli you could have sensible routes, and add another regex based route to grok the rm style
13:43 sri or add a rewriter plugin hook
13:44 ptomli TMTOWTDI
13:45 Rhaen ptomli: yup. might be interesting - this is the way to go
13:45 Rhaen I have to change other calling CGIs as well which use this old one to pass data around.
13:45 ptomli it should still respond on the old urls, but also provide sensible urls to migrate to
13:48 sri Rhaen: http://pastie.org/1148077 # the plugin hook solution
13:50 Rhaen oh.
13:50 sri would rewrite /?rm=display to /display?rm=display right before routes
13:50 Rhaen cool. thx
13:50 Rhaen ...understanding...
14:04 Rhaen ah, it dispatches according to the rm parameter
14:04 Rhaen so ?rm=world becomes to /world
14:04 Rhaen hm, clever!
14:13 ptomli mojo, jquery for your servers
14:15 koban left #mojo
14:16 sri literally with Mojo::DOM :)
14:20 sri perl -Mojo -e 'b(g("mojolicio.us")->dom-​>at("title")->text)->say'
14:25 vti does anyone now a time management software where you create tasks as time slots and then use them as blocks for building linear and parallel queues of tasks?
14:26 sri omniplan maybe?
14:27 sri all i know is that it's popular though
14:27 vti i just can't google this thing, maybe this kind of stuff has a special name
14:28 sri possibly
14:28 vti sri: hm, looks like it
14:28 Rhaen omg omg omg, it's working. It's so much fun!
14:29 sri :)
14:29 Rhaen I need more tests to validate this.
14:29 vti sri: $150 f*ck :D
14:30 sri xD
14:30 sri wow, thats heavy
14:30 sri Rhaen: at the end of the lite tutorial is a recipe for testing
14:31 koban joined #mojo
14:31 sri should be fun too, we have css3 selector tests and stuff
14:33 sri but just like with helpers we are only getting started with testing, so feedback and patches would be very much appreciated
14:34 Rhaen sri: I saw the testing thing
14:35 sri the internals of it are quite exciting
14:35 sri running a real http daemon and client inside the same process non blocking
14:36 sri so you can actually test websockets, long polling, https...basically everything without much thought :)
14:36 MojoGuest869 joined #mojo
14:36 MojoGuest869 From: http://www.google.co.uk/search?aq=f&amp;sourc​eid=chrome&amp;ie=UTF-8&amp;q=websocket+demo (1 hits)
14:36 sri (we are preparing for the realtime web)
14:37 Rhaen ah :)
14:37 MojoGuest869 test
14:37 sri pass
14:39 sri vti: http://culturedcode.com/things/ #maybe?
14:40 sri oooh, i know what you need!
14:40 sri vti: http://www.epicwinapp.com/ # all the time management you'll ever need! :)
14:41 sri watch the trailer
14:44 * ptomli thinks he's going to get wet on the way home :(
14:45 sri just keep working?
14:45 ptomli i've had what must be one of the least productive days ever
14:45 Rhaen ptomli: you'll come back!
14:46 sri not if he's made of sugar
14:46 sri (as we say in germany)
14:47 vti sri: :D
14:48 ptomli woooosh
14:55 MojoGuest869 left #mojo
14:56 vti http://openproj.org/ works for me, open source and multi platform ;p
15:00 Rhaen <de>oh wie geil!</de>
15:00 vti <ru>ага!</ru>
15:01 Rhaen :)
15:01 Rhaen just said: omg, this is freaky awesome.
15:02 vti Rhaen: i know german ;p
15:02 ptomli i know i'm idling, but did languages just evolve under my nose?
15:03 Rhaen vti: it would be awesome if mojolicious can teach me Russian, too.
15:03 Rhaen ptomli: yep, kind of.
15:04 ptomli i used to do some kind of poor impression of russian
15:04 sri careful, about 1/3 of this channel is russian
15:05 vti !tweet #Mojolicious. Uniting nations.
15:05 perlrocks vti: http://twitter.com/perlrocks/status/24017413303
15:05 perlrocks Twitter: "# Mojolicious. Uniting Nations. - Vti" (sw) --perlrocks http://twitter.com/perlrocks/status/24017413303
15:06 sri (sw)? Oo
15:06 vti i speak swedish!!!
15:06 sri obviously
15:08 koban left #mojo
15:08 sri !tweet ♥
15:08 perlrocks sri: http://twitter.com/perlrocks/status/24017646210
15:08 sri (everybody here can tweet btw)
15:11 * ptomli makes mental note not to follow perlrocks
15:13 GitHub9 joined #mojo
15:13 GitHub9 mojo: master Sebastian Riedel * 730e4a4 (1 files in 1 dirs): added more tests for tainted keep alive connections - http://bit.ly/bcmOlg
15:13 GitHub9 left #mojo
15:14 ptomli i'm off home, if i don't drown before i get there i'll see you lot later
15:15 ptomli left #mojo
15:17 vti sri: this kind of time management is called gantt charts, now i can google
15:17 sri never heard
15:22 Rhaen sri: I think you've sent marcus a url on twitter for the latest poster about mojo. Is there a svg version of it somewhere?
15:22 sri nope
15:22 sri i made it in a hybrid pixel/vector app
15:23 sri right now i'm in the process of going all vector again
15:23 Rhaen ah. ok. could be a good poster for T-shirt printing
15:23 sri after that i should have more svg images
15:23 Rhaen I like it.
15:23 MojoGuest193 joined #mojo
15:24 sri the original in my blog is quite big though
15:24 sri http://posterous.com/sso/verify/d5ac02adf5531eeb​34e8a175fc3cb059?jumpto=%2Factual-perl-marketing
15:24 Rhaen sri: a blog=
15:24 sri http://blog.kraih.com/actual-perl-marketing
15:25 Rhaen isn't that something from the web 2.0 thing?
15:25 MojoGuest193 Hello everybody, just testing ;)
15:25 * sri waves
15:25 MojoGuest193 left #mojo
15:25 sri blogs are timeless!
15:28 jest joined #mojo
15:30 Rhaen ok, I'll start idling around. See you later!
15:32 sri also not sure yet how to license the svg images
15:33 sri it's quite tricky
15:33 sri too closed and people will have to ask for permission before using it, too open and lazy people will use our icons for their own software unchanged
15:35 vti permission granted only for using with mojolicious name
15:35 sri which license?
15:36 sri mojolicious is also no legal entity
15:36 sri we have no mojolicious foundation yet
15:37 vti no idea
15:37 sri http://creativecommons.org/licenses/by-sa/2.0/ # oh this sounds good
15:37 sri "Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work)."
15:38 sri i do want to allow remixing
15:39 sri gonna talk to my lawyer i guess :S
15:42 ptomli joined #mojo
15:47 ptomli sri: what's on the todo list?
16:15 maettu joined #mojo
16:17 maettu well, I'm finally moving my qooxdoo rpc handler into a pluging. And I must say, this is really easy after I found out how to do it. Mojo is great. But you know that already..
16:40 ysyrota left #mojo
16:42 jest left #mojo
16:42 koban joined #mojo
16:48 su-bzero_ left #mojo
16:49 sri :)
16:49 sri ptomli: cleanup, as usual
16:50 sri i also need to get back to finishing the artwork
16:50 ptomli i'm just working through getting the auth condition to deal with session...
16:50 sri oh...i did not merge in hypnotoad yet
16:54 sri http://redis.io/logocontest/index.php?desc # wow, in this list is just a single logo i actually like
16:59 crab which one? they all look pretty ugly
16:59 ptomli yeah
16:59 Drossel joined #mojo
16:59 ptomli 38, 53, maybe
16:59 sri #52
17:00 sri would work well with a better typeface
17:00 sri like Interstate
17:01 ptomli how would you normally handle a stash entry in the view that may not be there.. like a flash message?
17:01 Kulag left #mojo
17:01 sri <% if (my $message = flash 'foo') { %>...
17:02 ptomli :(
17:02 sri how else could it be done?
17:02 ptomli dunno, tis why i asked
17:03 esskar_ left #mojo
17:03 ptomli <%= flash 'message' %>
17:03 spleenjack left #mojo
17:04 ptomli but i see what you thought i was asking
17:04 yko joined #mojo
17:07 sri yko: i hear this time the kgb got you?
17:08 ptomli but this does nasty things: <%= include 'includes/message', message => flash 'message' %>
17:09 sri flash 'message' || ''?
17:09 sri you get undef by default i guess
17:10 ptomli i guess, not checked, but i get deep recursion either way
17:10 ptomli maybe too many things called 'message'
17:10 sri likely
17:11 ptomli nope, <%= include 'includes/m', foo => flash 'message' || '' %> still breaks
17:16 ptomli probably a good case for a helper in any event
17:18 sri the helper call doesn't look wrong
17:19 sri maybe flash('message') needed
17:19 ptomli it seems to be render_partial calling render ad infinitum
17:19 sri sounds like recursive includes?
17:21 ptomli not seeing it yet
17:21 sri we have tests up to 3 levels of includes
17:23 tempire Um
17:23 tempire What's the difference between stash and flash
17:23 ptomli <%= include 'includes/m', foo => flash('message') || '' %>
17:23 tempire they both only seem to last for one request
17:23 sri stash is current request, flash is next request
17:24 sri flash gets stored in the session
17:24 sri it persists once
17:24 sri think of it as a one time session
17:25 sri common use case is a confirmation message after a 302 redirect
17:25 sri create thingy -> 302 -> show confirmation
17:25 sri no double submit
17:29 tempire I'm going to submit a patch specifying that in M::L pod and MojoX::Session::Cookie::Controller
17:30 sri that would be nice
17:43 perlrocks Twitter: "The new #ec2 micro instances are really perfect for playing around with #mojolicious at $0.02/hour. http://bit.ly/aP4PQi #perl" --kraih http://twitter.com/kraih/status/24030381406
17:50 GitHub66 joined #mojo
17:50 GitHub66 mojo: master Glen Hinkle * 2e4d8a8 (2 files in 2 dirs): More clear pod description of the flash
17:50 GitHub66 mojo: master Sebastian Riedel * 0851ec6 (1 files in 1 dirs): cleanup
17:50 GitHub66 mojo: master commits 730e4a4...0851ec6 - http://bit.ly/cfLDLi
17:50 GitHub66 left #mojo
17:52 tempire ooh, someone should create linux instance with mojolicious preinstalled, where it runs git pull & make install for mojo on boot.
17:52 sri that would be sweet
17:52 tempire then it wouldn't be too difficult to write a script to automate that.
17:52 tempire and it could run after taking a paypal authorization
17:54 sri such a script would be awesome
17:54 sri i think couchdb has one
17:56 sri like a Mojolicious::Plugin::EC2 :)
17:56 sri ./myapp.pl ec2 deploy
17:56 sri *boom*
17:57 ptomli :D
17:57 ptomli erm... trying to create a catch-all route, /(*path) fails for GET /
17:57 sri yea, it results in a .+ regex
17:58 sri get '/:everything' => [everything => qr/.*/]...
17:58 ptomli '/' catches GET / but fails for anything else, like GET /a/b/c
17:58 ptomli :)
17:58 sri .+ is more common than .*, so we default to .+ :)
17:59 sri ./myapp.pl routes will show you the compiled routes btw
17:59 ptomli yeah, i'm trying to place a last resort route for un-authed users to redirect to login
18:01 ptomli cheers, that solved it
18:03 tempire left #mojo
18:04 sri hosting will get interesting once google joins the game and there is real competition
18:07 zecrazytux hi
18:07 zecrazytux is there any cache module yet ?
18:08 * sri waves
18:08 sri caching for what?
18:09 sri if you mean general cache modules like memcached, i don't think so
18:09 zecrazytux hmm, I would like to store the complete rendered page if it does not exist yet or if i want to force it, and only display the rendered page if it is stored instead of rendering it again
18:09 zecrazytux so this is a plain old application cache
18:10 zecrazytux do you think this is doable by writting a few hooks to the dispatching core ?
18:11 sri nothing for whole pages yet, but we just added a cache helper for caching the result of template blocks in memory
18:11 ptomli sri: would that not work in a layout?
18:11 sri *that*?
18:12 sri oh you mean cache block in layout?
18:12 ptomli the cache helper
18:12 sri nope, template is rendered first
18:12 sri zecrazytux: yes, it's possible with hooks
18:13 sri for page caching i think i would go the rails way
18:13 zecrazytux hmm, I just found http://ankh-morp.org/code/pe​rl/mojox-renderer-cache.html, this is maybe a solution :)
18:13 sri writing the rendered pages into public directory as static files
18:13 sri and then let the static dispatcher handle it
18:13 sri (on the following request)
18:14 sri zecrazytux: that might actually work :)
18:15 sri hmm, maybe i should get up to speed on available plugins -.-
18:16 ptomli does that stop the controller/action running when there's a cached page?
18:16 sri don't think so
18:16 sri rendering happens last usually
18:16 ptomli yeah, so you'd go through all the hard work, just to throw it away and return a cached page..
18:17 koban left #mojo
18:17 sri not sure i actually want full page caching inside mojolicious
18:18 sri setting the appropriate headers and letting an nginx take care of caching is generally way better
18:18 sri (for full page)
18:18 ptomli tool, one job
18:18 ptomli one*
18:19 sri block caching obviously has to be in mojolicious, but page caching can be handled external
18:21 tempire joined #mojo
18:21 ptomli on a totally unrelated thread, is there [currently] a way for a controller to 'call' another controller/action? $output = $self->action(controller => 'other', action => 'foo');
18:23 sri no
18:23 sri and i don't think that would be a good idea
18:23 ptomli though in some ways a partial in the view is a better option
18:23 sri yea
18:24 ptomli i'm just thinking about how to construct a 'dashboard' style page that includes parts from multiple controllers
18:25 sri controllers or applications?
18:25 ptomli i'm thinking in terms of controllers within the same application, though 'application' here may e overloaded
18:26 sri still, making controllers talk to each other would be messy
18:27 sri i would abstract that part out into the model
18:27 sri and partial templates
18:27 sri keep the controller small
18:27 sri model is a blackbox, you can do whatever you want there
18:28 ptomli yep, i see where you're going
18:28 ptomli verbose, but: $model = $dashboard_service->get_da​shboard_for_user($user_id)
18:29 sri something like that yea
18:35 ptomli do helpers get registered using the short version of their package name?
18:35 sri package name doesn't matter
18:36 ptomli so adding MyApp::Plugin::DefaultHelpers shouldn't kill things?
18:36 sri oh, it would
18:36 ptomli :)
18:36 sri it would get priority
18:37 sri since MyApp::Plugin is first in the search path list
18:37 sri but the package name only matter for loading plugins, after that they are useless
18:38 sri *+s
18:38 ptomli so the loader needs tweaking a bit?
18:38 sri to do what?
18:38 sri the behavior is intended
18:38 sri it's the same for commands
18:39 ptomli presumably there's going to be a lot of 3rd party plugins, and perl packages are the way of differentiating them
18:39 sri more specific version (app sepecific vs framework specific)
18:39 sri *+wins
18:40 ptomli so we'll end up with MyApp::Plugin::MyDefaultPlugins
18:40 sri for example we have Mojo::Command::Generate::App, Mojolicious::Command::Generate::App replaces it for Mojolicious
18:41 sri mojolicious will search MyApp::Command, Mojolicious::Command and Mojo::Command, in that order
18:41 sri why do you think so?
18:41 ptomli the intent is that they're truely different, not one augmenting the other?
18:42 ptomli i think that packages provide namespace, ignoring that is effectively creating a flat namespace for all possible plugins for mojo
18:42 sri My would only be required if the app was using DefaultPlugins
18:42 sri thats correct
18:43 ptomli i would understand that the mojo DefaultPlugins 'cache' helper might be overriden by My::DefaultPlugins cache helper, but not override the whole plugin..
18:43 sri it's pretty much the same for catalyst
18:44 sri the plan is to keep it simple :)
18:44 sri it's just the same with the MojoX namespace currently
18:45 sri MojoX::Session existed, so i had to use MojoX::Session::Cookie
18:46 ptomli it's going to result in people prefixing package names in the middle of an already prefixed name
18:47 sri only if they are using more than a few plugins
18:47 sri it migth even encourage releasing their stuff as Mojolicious::Plugin::* modules to cpan :)
18:47 ptomli i would expect that lots of functionality will be provided by plugins
18:48 vti sri: all my fault!!
18:48 sri vti: it always is!
18:49 vti mojo antipattern :)
18:49 vti <--
18:50 ptomli it feels wrong to me, difficult to explain.. and like i said yesterday, shipping my product with code in Mojo namespace feels just as wrong
18:50 sri ptomli: actually, maybe searching for application specific plugins by default migth have been a bad idea
18:51 ptomli i had the same thought myself, but more along the lines of "maybe app plugins should get handled <slightly> differently"
18:51 sri plugins are supposed to go to cpan
18:51 ptomli not if they're part of a commercial app
18:51 sri sure, then a search path could just be added
18:51 sri but i want to encourage it in general
18:52 ptomli yep
18:52 vti in bootylicious i load plugins useing bootylicious:: namespace, and it works fine
18:52 sri i'll remove the search path and keep the test
18:53 ptomli still not convinced on the flattening of perl namespace :-/
18:54 sri we can always allow ->plugin('MyApp::Plugin::Foo')
18:54 sri if ->plugin('foo') turns out to be too weak
18:55 ptomli in essence, i see the plugins, as far as i've groked them, as a way of registering stuff
18:56 ptomli if plugin A registers 'foo' and plugin B registers 'foo', the winner for 'foo' should be the highest priority
18:56 sri last one wins
18:56 ptomli if A registers 'baz' and B registers 'cat', why should B remove 'baz'?
18:56 ptomli last one wins, yes
18:56 sri i don't see it that way
18:57 sri i just want to avoid the whole inheritance complexity
18:57 ptomli you see a plugin as a whle
18:57 ptomli whole*
18:57 sri ye
18:57 ptomli ahh, then this can all be solved by splitting the 'covers many bases' plugins into more specific units
18:57 sri like use Foo; @INC decides which Foo you get
18:58 spleenjack joined #mojo
18:58 ptomli but 'use Foo' treats 'My::Foo' and 'Your::Foo' differently
18:59 sri put not based on paths
18:59 sri you have /usr/local/perl5/lib/Foo.pm vs /lib/Foo.pm or so
18:59 sri (on the lower level)
19:00 sri the order of @INC makes the decision
19:00 sri just like plugins are not just perl modules
19:00 sri they are a higher level
19:01 sri (if that makes sense)
19:01 ptomli it does, philosophical difference :)
19:01 sri anyway, splitting in smaller more specific pieces works :)
19:01 ptomli yeah, was going to say, we might agree on doing that :)
19:01 sri like DefaultHelpers vs TagHelpers
19:02 ptomli default helpers becomes 'CacheHelper' and 'AppHelper' etc
19:02 sri or MyHelpers for toying around
19:02 ptomli ?
19:02 sri no need to always go all out with splitting right from the start
19:03 sri the My prefix is not neccessarily evil :)
19:03 ptomli internal to an already prefixed name, i think it's pretty yukky
19:04 GitHub63 joined #mojo
19:04 GitHub63 mojo: master Sebastian Riedel * 301f64a (3 files in 3 dirs): removed application specific plugin directory - http://bit.ly/aEKHir
19:04 GitHub63 left #mojo
19:04 sri then again, it might not even happen
19:05 sri app->helper(foo => sub {...}); inside the application will be way more popular for app soecific helpers
19:05 sri s/o/p/
19:06 ptomli you think people won't want to have modules for their helpers?
19:06 ptomli unit tests?
19:07 sri not sure yet, we'll see
19:07 ptomli k, deferred :)
19:07 sri i hope they'll just release small helper plugins to cpan :)
19:08 ptomli lead, others will follow
19:08 * sri cracks the whip
19:08 sri vti: you heard the man, release!
19:09 ptomli ol
19:09 ptomli l*
19:09 vti sri: what? ;p
19:09 sri plugins! many!
19:10 ptomli lots of small ones, i'll create a patch that kills kittens if a plugin registers more than one helper ;)
19:11 sri 4chan would hunt you down
19:11 ptomli http://www.killingkittens.com/
19:11 vti small plugins won't be used, people will just copy paste chunks of code :D
19:12 sri also a possibility
19:12 ptomli i don't follow
19:12 sri people are lazy
19:12 sri if copy and paste is easier it will be done
19:13 ptomli if the cache plugin is defined in CacheHelper vs DefaultHelpers, how is that going to change how users decide to use it
19:13 sri that doesn't matter at all
19:13 sri but take the twitter share button plugin as an example
19:14 ptomli you mean someone is going to copy/paste from cpan website rather than cpan install it
19:14 sri copypasta is faster than installing it
19:14 sri ye
19:14 sri or even github... people are too lazy to upload to cpan these days -.-
19:14 vti sri++
19:15 ptomli so we end up with monolithic blobs people have to install to get the 1 helper they want?
19:15 sri it's actually a trend, there are tons of mojolicious plugins on github that never reached cpan
19:16 vti sri mojolicious too ;p
19:16 sri ptomli: i don't think so
19:16 sri the helper plugins in mojolicious cover a wide spectrum because they are the default set
19:16 sri http://search.cpan.org/~sharifuln/Moj​olicious-Plugin-ShareHelpers-0.01/lib​/Mojolicious/Plugin/ShareHelpers.pm # this is more what i expect
19:17 sri topical collections
19:17 ptomli and i have another one i need, so i create ShareHelpers2 ;)
19:17 sri i guess this is not unlike MovableType plugins
19:17 vti http://search.cpan.org/~vti/Mojolic​ious-Plugin-TweetButton-0.0003/lib/​Mojolicious/Plugin/TweetButton.pm
19:17 vti !!!
19:18 sri :D
19:18 ptomli feck!
19:18 sri ptomli: or you send a patch
19:18 vti i was the first one
19:19 sri TMTOWTDI ;p
19:19 * ptomli has forgotten what helper he was trying to write
19:19 * vti cries
19:20 ptomli sod it, i'm going to buy smoke
19:20 ptomli s*
19:20 sri i predict more discussions like this one in the future :)
19:21 vti i predict google analytics
19:21 sri for sure
19:21 vti i've written it for bootylicious ages ago!
19:22 vti when mojolicious had no plugins at all! ;p
19:22 sri release it as a plugin now!
19:23 sri funny how much more active this channel is than #catalyst :D
19:26 vti don't envy
19:26 vti :D
19:30 ptomli ol
19:30 ptomli dammit, apple, can't you make a decent keyboard
19:30 * sri hugs his macbook
19:31 * vti hugs his macbook and ipad
19:31 ptomli how many times tonight have i missed the first few chars
19:32 sri had the same problem with my old 17" macbook
19:32 ptomli this is a fairly old 15 mbp
19:32 sri always the first character missing
19:32 sri the keyboard needs a split second to wakeup or so
19:33 ptomli i think i was trying to write a plugin to give my controllers access to my services
19:33 sri this 13" macbook is the best computer i've ever used
19:34 ptomli i bought this when i gave up on a dell, never looked back and it's getting on in life, still kicking ass
19:34 sri quite an upgrade :)
19:35 sri yay, new Sketch again
19:35 sri the guy is really quick
19:35 ptomli sketch?
19:36 sri http://www.bohemiancoding.com/sketch
19:36 vti sri: what's the diff from opacity?
19:37 ptomli how does it compare to vector designer?
19:37 sri importing my amelia perl logo from svg didn't work yesterday, so i sent it to him and he just made it work :) http://twitter.com/bohemia​ncoding/status/24008220943
19:38 sri i can't stand vectordesigner, usability is horrible
19:38 sri sketch is a killer app, like pixelmator
19:39 ptomli PM i have a long standing issue with
19:39 * vti is ignored
19:39 * sri hugs vti
19:39 ptomli select an area and tell me the size of the selection
19:39 sri vti: it is a true vector app
19:39 sri opacity is not bad, but the ui is quirky and it's unusable for bigger images (sadly)
19:40 vti i didn't like opacity and using verctor graphics now
19:40 sri now sketch is a true vector app, but based on pixels
19:40 vti maybe i'lll try sketch too
19:40 Rhaen_ joined #mojo
19:40 ptomli he's got some nice looking apps there
19:40 sri like someone made a vector app primarily for screen instead of print
19:41 sri sketch still has tons of bugs, but i love the workflow
19:42 vti it's like mojo :D
19:42 * vti hides
19:42 * sri grabs the shotgun
19:42 sri GET OFF MY LAWN!
19:42 ptomli crotchety ol' geezer ain't he?
19:45 Rhaen left #mojo
19:45 Rhaen_ is now known as Rhaen
19:46 vti ptomli: would you mind explaining that? ;p
19:46 ptomli sorry, was the accent too strong? ;p
19:47 vti /kick ptomli
19:47 vti !!!!
19:48 sri i hear vti has kgb contacts, be careful
19:48 stephen left #mojo
19:48 sri he recently made yko disappear
19:48 ptomli that's ok, i've got more than 3 letters in my nick :)
19:48 stephen joined #mojo
19:49 sri that only makes you easier to find
19:49 vti grep 'ptomli' ~/Documents/people | xargs mail 'kgb@kgb.ru' -s 'Find and destroy!'
19:50 sri now you need to say something russian to look more authentic
19:50 ptomli Status: 402 Payment required
19:51 vti :D
19:55 vti sri: when are we going to have mojolicious conference? :)
19:55 ptomli summer soon in cape town :D
19:57 sri after 1.0 ;p
19:57 vti never.... i seee
19:57 sri not that many version numbers left ;)
19:57 vti it would awesome to celebrate 1.0 release :)
19:57 ptomli A major release can be version number independent and is signaled by a new unique code name based on a unicode character.
19:58 ptomli plenty more characters left
19:58 vti with booze and hoockers
19:58 sri BLACKJACK!
20:04 vti sri: do you bender costume? :D
20:09 sri lol
20:10 sri no need for a costume, i *am* bender!
20:11 ptomli h'ok then......
20:11 vti ptomli: i like your accent, where are you from? :)
20:12 ptomli live in cape town at the moment, family is english
20:12 vti there are tones of english variant out there ;p
20:12 vti *variants
20:15 maettu left #mojo
20:21 vti i'd like to go to africe, but the next stop in my schedule is australia
20:21 vti *africa
20:21 ptomli oz, pah! ;p
20:22 vti right... wtf does that mean? :)
20:22 keith joined #mojo
20:22 ptomli no love lost between oz and sa.. we argue about rugby mostly, but they call a braai a barbie, which is teh ghey
20:23 Rhaen hep.
20:23 * ptomli wonders if russians know what a braai or barbie is
20:23 Rhaen_ joined #mojo
20:23 vti ptomli: we know only about bears and vodka
20:24 ptomli which is funny when you know that 'bears' is used here sometimes to mean 'beers' :)
20:24 Rhaen_ hm.
20:25 Rhaen_ I am feeling doubled.
20:25 ptomli sri: vti is an alco, no wonder you have mo plugins
20:25 Rhaen_ who cloned me?
20:25 Rhaen_ ah. The client on the other box is still running.
20:25 Rhaen_ is there a vodka plugin for mo?
20:25 Rhaen_ what does it do?
20:26 sri it's just like the coffee plugin, but cooler
20:27 vti it monkey-patches some internal functions :D
20:27 Rhaen_ ah! I should read the documentation about it.
20:32 vti i have to write mojolicious::plugin::vodka
20:32 sri Mojolicious::Plugin::VodkaAndBears
20:33 vti sri++
20:35 Rhaen_ sri: should I write the windows documentation inside it's own file? I created Mojolicious::Guide::Windows.pod in my repo
20:35 Rhaen_ I would like to mention the installation with Strawberry Perl and Activestate Perl
20:36 sri Rhaen_: how much are you writing?
20:36 Rhaen_ I'd also like to mention the locked file if you are running the buildin webserver
20:36 Rhaen_ huh, 2-3 DIN A4 pages when printed?
20:36 sri hmm, maybe a section in the FAQ?
20:37 Rhaen_ That's fine!
20:37 Rhaen_ I'll start a small section inside the FAQ about win32
20:37 sri sounds good
20:38 Rhaen_ I think I won't send the patch today, I will save this for fun for the work tomorrow
20:38 Rhaen_ it really feels good to work on open source projects during worktime :)
20:38 sri :)
20:39 vti f*ck ye! :)
20:40 Rhaen_ vti: another plugin? Mojolicious::Plugin::fck::ye?
20:40 vti Rhaen_: ;p
20:41 sri Rhaen_: we could also give windows its own section in the cookbook
20:42 sri there is already a IIS recipe
20:42 Rhaen_ aha. ok. sure.
20:42 sri well, that can be decided later :)
20:42 Rhaen_ What I am missing is an installation instruction on Windows
20:43 Rhaen_ Perl is being distributed with any linux thing.
20:43 vti windoes... is a whole another story :D
20:43 * vti is a typo man
20:43 Rhaen_ I think most mojo will be installed from packages anyway (like rpm, deb, ...)
20:44 Rhaen_ but the poor Windows users need some guidance
20:44 Rhaen_ sri: let's start with everything inside the faq. If it becomes too much, let's split it up then.
20:44 vti no mercy!
20:54 Rhaen_ hm. sure.
20:54 Rhaen_ ugh, pod inside Textmate just looks ugly
20:54 sri just a bit dark with the twilight theme
20:54 ptomli right, i'm going to sleep
20:55 sri nn
20:55 ptomli left #mojo
21:01 MojoGuest378 joined #mojo
21:01 MojoGuest378 From: http://www.google.co.jp/search?q=websocket%20irc (1 hits)
21:01 MojoGuest378 left #mojo
21:13 perlrocks Twitter: "Mojolicious Japanese translation project documents - livedoor Wiki (wiki) http://htn.to/BMhkvN" (ja) --yasutaka http://twitter.com/yasutaka/status/24043871584
21:31 GitHub12 joined #mojo
21:31 GitHub12 mojo: master Sebastian Riedel * 3b6aae1 (1 files in 1 dirs): pod cleanup - http://bit.ly/axgetW
21:31 GitHub12 left #mojo
21:41 awnstudio joined #mojo
21:47 skaurus joined #mojo
21:48 skaurus sri: heellllo again! I was just wondering - did Hypnotoad already finished and all ready for production?
21:48 * sri waves
21:48 sri not yet i'm afraid
21:48 sri got a little distracted with drawing :/
21:49 skaurus not bad at all, I just asking :)
21:51 spleenjack left #mojo
21:54 skaurus left #mojo
22:02 ltriant joined #mojo
22:07 yko left #mojo
22:12 Rhaen_ ok, pull req is out.
22:12 Rhaen_ I will go to bed, cya guys.
22:14 Rhaen_ left #mojo
22:38 stephen left #mojo
22:38 stephen joined #mojo
23:01 GitHub30 joined #mojo
23:01 GitHub30 mojo: master Ulrich Habel * 5b12082 (1 files in 1 dirs): adding Windows related topics to the FAQ section
23:01 GitHub30 mojo: master Sebastian Riedel * 1e6ebad (2 files in 2 dirs): cleanup
23:01 GitHub30 mojo: master commits 3b6aae1...1e6ebad - http://bit.ly/bLzp3U
23:01 GitHub30 left #mojo
23:03 sri Zzz
23:04 phillipadsmith left #mojo
23:37 MojoGuest552 joined #mojo
23:37 MojoGuest552 From: http://news.ycombinator.com/item?id=1277067 (60 hits)
23:37 MojoGuest552 left #mojo

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