Camelia, the Perl 6 bug

IRC log for #mojo, 2013-06-18

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

All times shown according to UTC.

Time Nick Message
00:02 whitebook joined #mojo
00:41 shmuel joined #mojo
00:44 egopro joined #mojo
00:52 egopro joined #mojo
01:18 asarch joined #mojo
01:20 whitebook joined #mojo
01:45 hesperaux_ joined #mojo
01:54 sri i'm a moron
01:55 sri my benchmarks were flawed... since i used the patched ojo
01:55 buu =[
01:55 sri real performance loss is 1073 rps before around_action, and 1063 rps after
01:56 sri at this scale... one additional around_action hook (from ojo) actually matters
01:57 Meiermann joined #mojo
01:58 d4rkie joined #mojo
02:21 good_news_everyone joined #mojo
02:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/NLr3Eg
02:21 good_news_everyone mojo/master 92fb02f Sebastian Riedel: added around_action hook
02:21 good_news_everyone left #mojo
02:22 sri i'm still not 100% sure... so it could get removed again
02:23 sri the arguments passed to the hook also need some more thought
02:28 inokenty joined #mojo
02:50 good_news_everyone joined #mojo
02:50 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/kM3hsQ
02:50 good_news_everyone mojo/master 8b72d27 Sebastian Riedel: more tests for around_action hook
02:50 good_news_everyone left #mojo
02:55 whitebook joined #mojo
03:08 good_news_everyone joined #mojo
03:08 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/BQKtkQ
03:08 good_news_everyone mojo/master a50aa71 Sebastian Riedel: handle nested routes a little more consistently
03:08 good_news_everyone left #mojo
03:09 lukep joined #mojo
03:16 egopro joined #mojo
03:17 hesperaux joined #mojo
03:17 KindOne joined #mojo
03:29 mrphilov joined #mojo
03:32 preflex_ joined #mojo
03:38 mattastrophe joined #mojo
03:46 egopro joined #mojo
03:53 egopro joined #mojo
04:22 hesperaux_ joined #mojo
04:26 Psyche^ joined #mojo
04:48 denisboyun_ joined #mojo
05:18 good_news_everyone joined #mojo
05:18 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pc0S0w
05:18 good_news_everyone mojo/master 47bf08d Sebastian Riedel: added around_action recipe to routing guide
05:18 good_news_everyone left #mojo
05:41 basiliscos joined #mojo
05:43 Kulag joined #mojo
05:43 Britzel_ joined #mojo
05:50 Britzel joined #mojo
06:00 Kulag joined #mojo
06:12 sinkovsky joined #mojo
06:17 dod joined #mojo
06:19 good_news_everyone joined #mojo
06:19 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/EujEEQ
06:19 good_news_everyone mojo/master 7600e15 Sebastian Riedel: documentation tweaks
06:19 good_news_everyone left #mojo
06:22 D4RK-PH0ENiX joined #mojo
06:23 maxhq joined #mojo
06:24 * sri still needs feedback for the around_action hook
06:24 sri this is one of those times i will point you at in a few weeks when you notice it doesn't do everything you need!
06:24 * sri waves at the irclog o/
06:25 davido joined #mojo
06:25 Kulag joined #mojo
06:31 Mike-PerlRecruiter_ joined #mojo
06:39 suy joined #mojo
06:45 dotan joined #mojo
06:48 dod joined #mojo
06:53 Vandal joined #mojo
06:55 kwa sri: jberger gave his thumbs up about it, is that not enough? :)
06:55 kwa I actually noticed that the branch had gone, so thought you'd dropped it.
06:58 kwa hmm, I read about around_dispatch when I forgot the name of around_action.
06:58 sri jberger++ # is always a bit quick with the +1 though :)
06:58 kwa heh
06:59 sri then again the other are always way slow these days
07:00 kwa Comparitively speaking. My grandma can't run as fast as me.
07:00 sri one thing i noticed about exception handling in around_action btw., it allows the use of the current controller, while around_dispatch only allows the default controller
07:00 kwa Ah, yeah, that's what I'm after.
07:00 sri marcus: i think kwa just called you a grandpa
07:01 kwa It's definitely required for trapping those exceptions from plugins and stuff you don't have full control over.
07:02 sri i tend to +1 now too... considering we have 5+ rather good use cases
07:02 kwa So despite around_action being committed, should I still wait for feedback before implementing it?
07:02 sri what keeps me on the edge still is the performance cost
07:03 abstract joined #mojo
07:03 sri it's not so bad in a sensible benchmark though <1%
07:03 sri (sensible micro benchmark... hello world... in anything more it's not noticeable)
07:03 kwa It's a shame you can't opt in to the hook.
07:05 sri i wonder if there's crazy stuff to be done running multiple actions in Coros
07:05 sri my original use case for around_dispatch
07:06 * kwa doesn't know what Coros is
07:06 sri https://metacpan.org/module​/MLEHMANN/Coro-6.31/Coro.pm
07:06 sri coroutines
07:06 kwa ahh
07:07 sri btw. there was an interesting post by tim bunce on p5p recently http://www.xray.mpe.mpg.de/mailing-lis​ts/perl5-porters/2013-06/msg00611.html
07:07 sri i wonder how usable that would make ithreads
07:09 dod joined #mojo
07:09 kwa That stuff interests me, but it's currently way above my pay grade. :)
07:09 kwa I see threads as voodoo.
07:10 sri well, it is
07:11 sri hmmm... some more interesting possibilities with around_action
07:12 sri controller specific functionality
07:12 sri my_exception_handling() if $c->can('my_exception_handler');
07:12 sri do stuff if a method exists
07:13 kwa So, use the controller's overriding exception handler if it exists?
07:13 sri and if it doesn't exist do nothing, use the defaults
07:14 sri then you decide per controller to opt in
07:14 sri it's something for plugins
07:14 kwa Ah, I get you. Yeah it makes sense.
07:15 kwa I am hoping to pluginify my REST stuff, so that will be useful for that.
07:15 sri guess i'm +1 now
07:15 sri that leaves just the argument question
07:16 sri ($next, $c, $action, $last)
07:16 kwa (btw, I know you're pretty strict on your docs - https://metacpan.org/module/Mojolicious::Sessions - Methods: "implements the following ones".)
07:17 kwa What's the question? Which ones to use?
07:18 sri if those arguments are the right ones
07:18 sri what's wrong with Mojolicious::Sessions?
07:20 kwa I've been using your documentation style to document my stuff, and I noticed that on that it says "implements the following ones" instead of "implements the following new ones" like you have elsewhere for METHODS.
07:20 sri oooooh
07:20 kwa $c and $action are obviously both required.
07:20 kwa Can't think of why I'd need $last.
07:21 good_news_everyone joined #mojo
07:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Nv8heg
07:21 good_news_everyone mojo/master 5f13e39 Sebastian Riedel: fixed typo in Mojolicious::Sessions
07:21 good_news_everyone left #mojo
07:21 sri my ocd should have noticed that -.-
07:21 kwa :)
07:21 sri $last is important for bridges
07:21 sri you want to know if you're in a bridge or the action (last)
07:22 kwa It's CDO isn't it? You're not true OCD unless you put the letters in the right order.
07:22 sri at least i can think of many cases where i would want to know
07:22 kwa Ah, I see.
07:26 kwa The arguments seem pretty complete. Though the other hooks don't have similar arguments, so I can see your trepidation.
07:26 sri after_render is not too different
07:27 sri i'm ok with odd argument, just want to make sure they are the right ones
07:27 sri *+s
07:30 kwa They satisfy my use case, and you mentioned setting the format (accessible via the stash in $c?). What are the other 3 use cases?
07:30 kwa s/my use/my exception handling use/
07:32 yakudza joined #mojo
07:32 sri rendering return values from actions, passing arguments to actions, setting globals like $_, controller specific exception handling, adding additional stash values like {format}
07:32 trone joined #mojo
07:33 sri first might be a bit silly... but it makes for a good test case :)
07:33 sri possibly collecting fine grained metrics about actions too
07:34 sri introspecting the stash between actions
07:34 sri or even blocking actions from getting invoked, you could theoretically skip a bridge
07:35 sri it's an extremely versatile hook, bet i'm still missing a lot of use cases
07:37 sri $stash->{skip_bridges} = 1; ... return 1 if !$last && $stash->{skip_bridge};
07:37 kwa (Talking of setting the stash value format, I get told to be careful every time I set that in my bridge. :))
07:38 kwa But those arguments seem to cover most of those use cases.
07:39 kwa s/most/all/
07:40 kwa I can't even think of what else useful is available that you could actually pass to the hook.
07:40 sri i guess we could even leave out $last
07:40 nicolaas joined #mojo
07:41 sri you could do my $Last = $stash->{depth}++ == @{$c->match->stack} or so
07:43 sri it's very cheap to leave in though... since that information is already available in the router
07:47 kwa heh, leaving it in would be a lot more readable too :)
07:56 Kulag joined #mojo
08:00 sri whatever, lets release this!
08:01 good_news_everyone joined #mojo
08:01 good_news_everyone [mojo] kraih tagged v4.15 at ae30a20: http://git.io/EZHPRg
08:01 good_news_everyone left #mojo
08:05 egopro joined #mojo
08:06 abstract_ joined #mojo
08:07 kwa Nice!
08:07 * kwa waits for cpan
08:11 jzawodn joined #mojo
08:14 Kulag joined #mojo
08:15 dod joined #mojo
08:21 dpetrov_ joined #mojo
08:28 hesperaux joined #mojo
08:29 Kulag joined #mojo
08:31 nic Anyone got a sneaky way of getting a layout to not bork if a variable is undeclared?
08:32 nic eg <%= $title %> when $title hasn't been declared
08:32 memowe <%= stash('title') // 'foo' %> should work
08:32 sri or turn off strict, it's just perl
08:32 memowe Hi sri!
08:33 sri o/
08:33 nic ah, yes, couldn't remember how $title was coming from, but if it's stash then it's easy; thanks
08:33 jast I write code for perl 5.8 which doesn't have // yet. nightmare...
08:33 memowe \o 4.15
08:33 memowe urgs
08:34 nic memowe++  # better than coffee
08:34 memowe better than coffee? I don't understand.
08:35 nic well, I haven't had any coffee yet, but you did the thinking part for me  \o/
08:35 memowe and now you're all nervous 'n stuff? ;)
08:35 nic I need to hunt & destroy any other places where I've used raw vars
08:39 egopro joined #mojo
08:43 nicolaas hello .. what can I do to avoid "Worker xxxx has no heartbeat, restarting" errors ?
08:44 nicolaas I'm running Hypnotoad in a VirtualBox VM, with 8Go of RAM
08:44 Kulag joined #mojo
08:45 nicolaas okay, found this http://mojolicio.us/perldoc/Mojolici​ous/Guides/FAQ#What_does_Worker_3184​2_has_no_heartbeat_restarting_mean
08:45 nicolaas Pwd_2013
08:45 nicolaas okay, that's my VM password
08:45 nicolaas coffee, anyone ?
08:46 egopro joined #mojo
08:47 moritz nicolaas: now that you'll have changed your password, I'll try again next year :-)
08:48 nicolaas moritz well, you could try right now because I'm not changing it ... it's not "critical" enough
08:48 nicolaas it's a test VM
08:49 nicolaas but how can I set the "heartbeat_interval" param in my command line ? "--heartbeat_interval 120" ?
08:49 nicolaas nope
08:51 nicolaas I mean heartbeat_timeout
08:51 kwa lol moritz
08:53 nicolaas should I run hypnotoad from a perl script to set up its options ?
08:54 Dandre joined #mojo
08:58 jontaylor joined #mojo
09:00 batman nicolaas: use a config file
09:00 fhelmber_ joined #mojo
09:01 amirite joined #mojo
09:06 dod joined #mojo
09:07 nicolaas batman okay i'll try
09:19 Kulag joined #mojo
09:23 good_news_everyone joined #mojo
09:23 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ivvkHw
09:23 good_news_everyone mojo/master 94f74da Sebastian Riedel: small optimizations
09:23 good_news_everyone left #mojo
09:32 jamesaxl joined #mojo
09:41 egopro joined #mojo
09:46 maxhq joined #mojo
10:04 jamesaxl what is the best cloud for mojolicious (which allows the installation of dependencies )
10:05 mire_ joined #mojo
10:14 nic Cookbook/"Parallel blocking requests" is a bit tough on the reader cos the discussion mentions
10:14 nic "The event 'finish" but the code does not
10:14 nic sri: Is there a comment that could go into that code chunk to show where 'finish' comes into play?
10:43 marcus_ joined #mojo
10:48 denisboyun joined #mojo
10:52 mrphilov joined #mojo
11:03 mrphilov joined #mojo
11:05 mire_ joined #mojo
11:13 whitebook joined #mojo
11:35 libsysguy joined #mojo
12:20 denisboyun_ joined #mojo
12:26 * marty waves
12:27 * libsysguy waives back
12:32 jamesaxl marty: hello marty freedman , have you ever deployed a mojolicious in a cloud ?
12:33 jamesaxl nic: hello ^
12:33 nic jamesaxl: Have you tried out Heroku yet?
12:33 jamesaxl nic: of course, but sometimes i need dependencies
12:34 jamesaxl nic: for example i need Crypt::Eksblowfish::Bcrypt
12:35 nic ah, binary dependencies can be tricky
12:36 ryozi joined #mojo
12:36 marty jamesaxl:  I'm not marty freedman but If you are talking about marty freedman the guitar player then I take that as a compliment.  :)    I have only deployed mojo apps on rackspace virtual servers.  But no cloud services yet.
12:37 jamesaxl marty: thank you very much :) , i just make joke to make people happy and lose stress :)
12:37 marty \o/
12:38 jamesaxl nic: i think i will move to dotcloud , http://perl-node-interface.blogspot​.com/2012/04/perl-on-dotcloud.html
12:38 * marty pulls out his Cacophony cd with Jason Becker and Marty Freedman.  rockin....
12:39 nic jamesaxl: just curious, what happened to your build on heroku for the dependencies you specified?  Did you get a useful error message?
12:41 jamesaxl jamesaxl: because Heroku does not have Crypt::Eksblowfish::Bcrypt, personaly i need it for salt password, if you have any idea to cancel Crypt::Eksblowfish::Bcrypt and use an other i will be very happy
12:47 nic jamesaxl: So you haven't actually specified any dependencies in your heroku deploy?
12:48 jamesaxl nic: no because i do not know how to do, in python i did pip freeze > requirement.txt and when i deploy it install all dependencies which are needed, with python i do not know how to do with perl, should i creat Makefile.pl ?
12:51 rem_lex| joined #mojo
13:01 dod joined #mojo
13:07 nic tempire: re http://tempire.github.io/mojol​icious-command-deploy-heroku/
13:07 nic there's a link at the bottom: "learn about it" but the target doesn't exist
13:13 nic jamesaxl: I used perloku (cos tempire's command didn't exist at that time) and dependencies worked fine
13:14 jamesaxl nic: thank you very much i am going to try and see
13:16 Kulag joined #mojo
13:16 jamesaxl nic: because this website that i will upload is for my small company, if it works good with heroku i am going to buy domain name and location in heroku
13:22 nic good luck
13:26 denisboyun_ joined #mojo
13:47 rem_lex joined #mojo
13:50 btyler joined #mojo
13:54 bluescreen joined #mojo
13:58 jberger joined #mojo
13:58 jberger o/
13:58 * jberger read the logs
13:59 jberger and I would never +1 too qui ... ALL GLORY TO THE HYPNOTOAD!!
13:59 jberger anyway hooray for 4.15!
13:59 mattastrophe joined #mojo
13:59 jberger and "hello" from "almost canada"
14:01 gryphon joined #mojo
14:01 jberger oh and something to keep an eye on: http://weblog.bulknews.net/post/532557​20316/carton-and-perl-version-support
14:03 nicolaas joined #mojo
14:04 nicolaas is it possible to include a directory for templates ?
14:05 nicolaas as we can do for controllers
14:11 kwa sri: No json_like in Test::More?
14:13 kwa \o jberger
14:13 kwa Business or pleasure?
14:16 dod joined #mojo
14:16 d4rkie joined #mojo
14:19 jberger pleasure
14:22 kwa Nice. What you doing on here then? Get sight seeing. :)
14:26 jberger we are just about to head out
14:26 jberger I am in the last stages of getting hired, so the wife and I went on a snap vacation, cause who knows how long it will be before I feel comfortable taking time off
14:27 jberger but that means I have to keep close to my email in case the hiring people have questions
14:35 jberger off to explore the maple leaf land
14:35 jberger o/
14:51 mire_ joined #mojo
14:58 whitebook joined #mojo
14:59 sh4 joined #mojo
15:12 whitebook1 joined #mojo
15:12 cfedde is there a way to tell Test::Mojo to ask for the json result in a way that ->respond_to detects?
15:18 batman cfedde: ->get_ok('/foo.json') ?
15:19 cfedde batman: is that the convention?  I was expecting some exposure of content negitiation rules.
15:20 batman cfedde: ->respond_to(json => ... ) looks for .json at the end of url.
15:20 cfedde ok
15:20 Jonis joined #mojo
15:21 batman the extension is stored in the stash as 'format' which again is used to trigger respond_to()
15:21 batman at least that's the easy way to make it respond_to(what_you_expect => ...); iirc
15:22 cfedde I was hunting for a way to set the Accept: request header
15:22 denisboyun_ joined #mojo
15:32 basiliscos joined #mojo
15:33 btyler joined #mojo
15:33 perlite joined #mojo
15:50 gryphon joined #mojo
15:57 davido joined #mojo
16:13 Jonis how do you pass a variable from jquery to mojo? I keep googling but coming up blank
16:13 Jonis I guess you could post it
16:13 dod joined #mojo
16:15 btyler jonis: look at $.ajax, set the url param in the object that $.ajax takes to one of your mojolicious routes
16:15 whitebook joined #mojo
16:15 Jonis btyler: thanks :)
16:17 libsysguy is there a way to output what route is being chosen?
16:17 mattastrophe joined #mojo
16:25 maxhq joined #mojo
16:58 ryozi joined #mojo
16:58 dod joined #mojo
17:05 bzero joined #mojo
17:07 tianon libsysguy: current_route ?
17:16 abra joined #mojo
17:26 whitebook joined #mojo
17:28 whitebook1 joined #mojo
17:49 marty libsysguy:  I've not used it myself but maybe Mojolicious::Routes::Match can be of use.
17:59 whitebook joined #mojo
18:21 good_news_everyone joined #mojo
18:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/DZfz8g
18:21 good_news_everyone mojo/master b457155 Sebastian Riedel: order is no longer random
18:21 good_news_everyone left #mojo
18:32 Mike-PerlRecruiter_ joined #mojo
18:32 good_news_everyone joined #mojo
18:32 good_news_everyone [mojo] kraih pushed 2 new commits to master: http://git.io/PtivBA
18:32 good_news_everyone mojo/master ee5a62e Pavel Shaydo: use keys instead of each to workaround perl bug...
18:32 good_news_everyone mojo/master 892044d Sebastian Riedel: Merge pull request #506 from trinitum/replace-each-with-keys...
18:32 good_news_everyone left #mojo
18:40 good_news_everyone joined #mojo
18:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/hnpZsg
18:40 good_news_everyone mojo/master 8de1275 Sebastian Riedel: updated Changes
18:40 good_news_everyone left #mojo
18:44 travis-ci joined #mojo
18:44 travis-ci [travis-ci] kraih/mojo#835 (master - b457155 : Sebastian Riedel): The build was broken.
18:44 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/94f74dabc505...b4571551bc7b
18:44 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/8207425
18:44 travis-ci left #mojo
18:47 good_news_everyone joined #mojo
18:47 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/UOs3Ig
18:47 good_news_everyone mojo/master 30863d7 Sebastian Riedel: test EV too
18:47 good_news_everyone left #mojo
18:59 travis-ci joined #mojo
18:59 travis-ci [travis-ci] kraih/mojo#836 (master - 892044d : Sebastian Riedel): The build was broken.
18:59 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/b4571551bc7b...892044d61015
18:59 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/8207800
18:59 travis-ci left #mojo
19:01 trone joined #mojo
19:11 travis-ci joined #mojo
19:11 travis-ci [travis-ci] kraih/mojo#837 (master - 8de1275 : Sebastian Riedel): The build was broken.
19:11 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/892044d61015...8de12757c7c1
19:11 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/8208061
19:11 travis-ci left #mojo
19:12 sri i guess passing arguments to actions would be a fun around_action example
19:13 sri not sure if multiple around_action examples wouldn't be too much though
19:22 travis-ci joined #mojo
19:22 travis-ci [travis-ci] kraih/mojo#838 (master - 30863d7 : Sebastian Riedel): The build was fixed.
19:22 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/8de12757c7c1...30863d7f34d8
19:22 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/8208257
19:22 travis-ci left #mojo
19:22 mire_ joined #mojo
19:39 whitebook joined #mojo
19:48 whitebook joined #mojo
20:01 good_news_everyone joined #mojo
20:01 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/SsP7Hg
20:01 good_news_everyone mojo/master 1b3439a Sebastian Riedel: more consistent hook examples
20:01 good_news_everyone left #mojo
20:02 jamesaxl joined #mojo
20:08 inokenty joined #mojo
20:11 abra joined #mojo
20:19 abra joined #mojo
20:40 Britzel joined #mojo
20:41 jamesaxl hello
20:43 jamesaxl could you help me, i do not know why the method check password make the request freeze http://perl.nopaste.dk/p48631
21:02 MeierM joined #mojo
21:14 marty jamesaxl:  I'm not sure if the print statement is causing the issue but use this instead....   $self->app->log->debug('$self->dumper('debug message here'));
21:15 jamesaxl marty: thank you very much, the prob was $self = shift i remove it because i do not need it for this functions
21:16 jamesaxl marty: encrypt and check_password
21:34 lukep joined #mojo
22:20 mrphilov joined #mojo
22:28 sri http://pastie.org/8057192 # wonder if this would be a sensible around_action example
22:29 sri it's kinda neat that it shows how chained hooks interact
22:31 sri maybe it should pass something else as argument(s) though
22:34 good_news_everyone joined #mojo
22:34 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/fumQIw
22:34 good_news_everyone mojo/master ce187af Sebastian Riedel: show how to pass arguments to actions
22:34 good_news_everyone left #mojo
22:35 zekame joined #mojo
22:46 sri i guess a bug that makes hypnotoad crash randomly with perl 5.10/5.12 means we'll need another release later
22:58 sri (bug in perl tha is ;p)
23:12 jnbek hypnotoad 4LYF!!
23:37 Adura joined #mojo
23:41 good_news_everyone joined #mojo
23:41 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QkjTqw
23:41 good_news_everyone mojo/master f72828f Sebastian Riedel: make sure worker is still active
23:41 good_news_everyone left #mojo
23:42 jpn joined #mojo
23:56 KindTwo joined #mojo

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