The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2015-06-09

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

All times shown according to UTC.

Time Nick Message
00:00 Kogurr joined #mojo
00:15 bpmedley jberger++
00:28 dvinciguerra joined #mojo
00:47 jberger jnbek if you are still at the social come find me
00:58 aggrolite joined #mojo
01:08 mattastrophe joined #mojo
01:12 aggrolite joined #mojo
01:29 klapperl_ joined #mojo
02:25 damaya joined #mojo
02:26 damaya_ joined #mojo
02:31 noganex joined #mojo
03:12 bin_005 joined #mojo
03:57 PryMar56 joined #mojo
04:28 hshong joined #mojo
04:52 woz joined #mojo
05:08 polettix joined #mojo
05:19 disputin joined #mojo
05:44 frederic_ joined #mojo
05:45 dod joined #mojo
05:46 ashimema joined #mojo
05:50 dod joined #mojo
06:15 dod joined #mojo
06:16 kaare joined #mojo
06:29 berov joined #mojo
06:29 tempire I'm still sad I didn't get a ticket
06:29 tempire The keynote is pointless anyway
06:30 tempire It's really about the platform state of the union
06:30 nicomen normally what binds the community together
06:30 tempire And it's only for developers of that platform, anyway.
06:30 tempire Which is why I'm super excited about it.
06:34 tempire Particularly that swift is open source
06:34 tempire And on linux
06:35 nicomen oh macintrash talk
06:35 nicomen thought you meant YAPC::NA
06:35 tempire Ah, no
06:35 nicomen uess you have to be a fanboy to enjoy those things
06:35 tempire Or develop for that platform
06:36 nicomen Most of the time it's "you know that thing everyone else has been doing for a while? You can do 50% of it now!" Crowd goes: wooooah!
06:37 nicomen And then some kind of mass paralysis goes on, where everything already out there stops existing
06:37 nicomen Like Spotify and Tidal do not exist anymore clearly
06:37 nicomen since Apple just invented reasonable iTunes
07:00 trone joined #mojo
07:02 eseyman joined #mojo
07:03 phillipadsmith joined #mojo
07:07 chansen joined #mojo
07:10 dotandimet joined #mojo
07:14 dp_ joined #mojo
07:44 da5id joined #mojo
07:55 DaTa joined #mojo
08:11 sri maybe networking geeks would like to chime in https://github.com/kraih/mojo/issues/806
08:14 Vandal joined #mojo
08:14 sri whole issue is quite sloppy, not sure it actually deserves much discussion
08:17 sri tempire: if you care, maybe it's better to start fresh with a use case and technical argument
08:18 sri ECONNRESET behavior on different platforms and stuff
08:22 ans joined #mojo
08:29 woz joined #mojo
08:31 ans joined #mojo
08:33 icjs joined #mojo
08:44 bin_005 joined #mojo
08:52 amon joined #mojo
09:07 ans joined #mojo
09:15 diego_k joined #mojo
09:36 panshin joined #mojo
09:50 bin_005 joined #mojo
09:58 pink_mist my take on it is: why special-case ECONNRESET? what makes that specific error so special?
09:59 sri that's how it has been forever, and it works well
10:00 nicomen aren't there a plethora of errors that might happen before a request may be dispatched?
10:00 sri maybe it's wrong currently, maybe not, those that want the change need to do the research though
10:03 * sri closes the issue
10:05 sri honestly, i would really like it if more people understood socket errors around here
10:05 sri stuff like why we ignore write errors completely
10:07 sri (all those funny timing errors with writes failing before reading is finished)
10:27 ans joined #mojo
10:45 Adura joined #mojo
10:47 fhelm____ joined #mojo
11:02 ans joined #mojo
11:21 panshin joined #mojo
11:23 tomboh joined #mojo
11:41 mattastrophe joined #mojo
11:47 dvinciguerra joined #mojo
11:57 sri and then nobody cares anymore ;p
12:05 tardisx joined #mojo
12:06 neilhwatson joined #mojo
12:07 damaya joined #mojo
12:10 ToApolytoXaos joined #mojo
12:24 guru joined #mojo
12:35 Zx3 joined #mojo
12:58 mattastrophe joined #mojo
13:20 dvinciguerra joined #mojo
13:23 gryphon joined #mojo
13:24 frederic_ joined #mojo
13:27 zivester joined #mojo
13:49 mattastrophe joined #mojo
13:49 firnsy joined #mojo
14:24 JDorpinghaus joined #mojo
14:27 JDorpinghaus I am trying to use validation with an HTTP PUT method. I ran into problems because validation requires using the param('foo') method which doesn't seem to work with the PUT method. Is there any way to use validation with a PUT method?
14:29 genio JDorpinghaus: Let's see your route and controller method
14:32 JDorpinghaus Route:
14:32 JDorpinghaus my $r = $self->routes;
14:33 JDorpinghaus $r->put('/comments/:question_id/:id')->to('comments#update')->name('update_comment');
14:33 genio use a pastebot service instead of pasting your controller in here, please
14:34 genio gist.github.com for example
14:35 martin joined #mojo
14:36 JDorpinghaus http://pastebin.com/RAkYWfQ8
14:37 Repaster Repasted text from JDorpinghaus: http://fpaste.org/230362/43386062/
14:40 sri no reason param() shouldn't work with PUT
14:40 sri Repaster: what are you?
14:41 pink_mist sri: he's Grinnz's bot
14:41 pink_mist since a lot of people have trouble with pastebin.com, it repastes any pastebin.com paste to fpaste.org
14:43 disputin joined #mojo
14:46 * Grinnz_ does not tend to make his bots chatty by default :P
14:47 Grinnz_ and Repaster is actually set to not respond to any command except in PM
14:56 JDorpinghaus Thanks, that helped. Are there any methods to process the message body as though it contained key value parameters?
14:57 jberger one chatty bot is enough
14:57 JDorpinghaus For example, if the request body is 'param=test' are there any methods to access the param key?
14:57 * jberger kicks purl
14:57 * purl blocks!  Paint the fence!
14:59 disputin joined #mojo
15:01 Grinnz_ req->param('param') like any other, i would imagine
15:03 zackiv31 joined #mojo
15:03 aggrolite joined #mojo
15:04 sri your PUT request is prolly just invalid
15:06 JDorpinghaus Testing with a POST request and route: perl myapp.pl get -M POST -c 'param=test' /post?param2=test2
15:06 JDorpinghaus Only param2 is accessible with $c->param
15:07 Grinnz_ JDorpinghaus: you are missing a Content-Type
15:07 Grinnz_ that says how to parse the body
15:08 nicomen win 32
15:08 nicomen oops
15:09 Grinnz_ eww, win32
15:09 jberger seen at YAPC::NA: http://cdn.meme.am/instances/500x/56524852.jpg
15:09 JDorpinghaus Grinnz_: Thanks, that did it.
15:15 good_news_everyon joined #mojo
15:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vI2wE
15:15 good_news_everyon mojo/master 943779a Sebastian Riedel: fix bug in Mojo::Message where multipart content would get downgraded unnecessarily (closes #807)
15:15 good_news_everyon left #mojo
15:16 sri jberger: WEBSCALE
15:16 purl i think WEBSCALE is an anagram of claw bees
15:17 oetiker_ joined #mojo
15:18 oetiker joined #mojo
15:18 Grinnz_ lol
15:19 oetiker has anyone looked into handling parallel non-blocking requests with Mojo::Pg ? I gather there would have to be some mechanism for managing a pool of database connections.
15:19 Grinnz_ oetiker: that's pretty much the whole point of Mojo::Pg
15:19 punter joined #mojo
15:24 oetiker Grinnz_ no ... there can be only one active query per database connection ... if you try to run a second one, Mojo::Pg will tell you to not try todo that
15:26 oetiker Grinnz_ https://metacpan.org/source/SRI/Mojo-Pg-2.05/lib/Mojo/Pg/Database.pm#L76
15:27 Grinnz_ oetiker: yes, you get a new ->db from the Mojo::Pg object for each concurrent query
15:27 Grinnz_ share the $pg not the $db
15:27 oetiker yes, I know
15:27 oetiker I was wondering if it would make sense to keep a pool of $db handles
15:28 oetiker instead of opening new ones all the time
15:28 Grinnz_ $pg already is a pool of $db handles
15:28 Grinnz_ it won't open a new one if it has one cached
15:28 oetiker it does that automatically
15:28 oetiker aah ... perfect
15:28 oetiker I am thinking too much
15:28 oetiker thanks
15:28 disputin joined #mojo
15:29 sh4 joined #mojo
15:30 sri literally the whole point of Mojo::Pg
15:30 Grinnz_ :)
15:30 oetiker that error message sent me on the wrong track
15:31 oetiker wonderful
15:31 turael joined #mojo
15:31 oetiker would you accept a patch for the error message ?
15:33 turael joined #mojo
15:35 Grinnz_ what's wrong with the error message?
15:41 oetiker the error message could say.  'Non-blocking query already in progress. Make sure to use $pg->db->query to get a free database handle for your request.'
15:42 Grinnz_ i think that's described well in https://metacpan.org/pod/Mojo::Pg#DESCRIPTION
15:43 Grinnz_ anyway it's probably not appropriate to refer to variable names in an error message, i would say something more like "Concurrent queries must use different Mojo::Pg::Database connections."
15:43 oetiker sure ...
15:44 asarch joined #mojo
15:44 oetiker what also would help if there was an example :-) in the synopsis $db does get re-used ... which is fine sind it is using blocking calls.
15:44 Grinnz_ concurrent nonblocking queries would be a good synoopsis example to add
15:44 oetiker I also looked at the example code in the package but that does not use non-blocking calls ...
15:45 kyshtynbai joined #mojo
15:45 oetiker so I thought maybe one can only do sequential non-blocking :)
15:45 sri umm
15:46 sri "Every database connection can only handle one active query at a time, this includes asynchronous ones. To perform multiple queries concurrently, you have to use multiple connections."
15:46 oetiker yep
15:46 oetiker got that now :)
15:46 sri that's in the description
15:46 Grinnz_ reading, it's a talent
15:46 kyshtynbai Hmm. How do I launch a server with reload on change ablity in non-lite app? morbo script/myapp doesn't work. It just starts a server but changes do not appear until I restart it manualy.
15:46 sri right below the synopsis
15:47 Grinnz_ kyshtynbai: huh? morbo is for exactly that
15:47 Grinnz_ kyshtynbai: make sure it is watching the dirs you are changing files in
15:47 Grinnz_ see the -w option
15:47 kyshtynbai Thanks!
15:47 Grinnz_ defaults to lib and templates
15:50 * Grinnz_ wonders if someone is going to ask how to prefork a hypnotoad server next :)
15:51 pink_mist how do you get Mojolicious to serve html?
15:52 * pink_mist backs away slowly
15:53 jberger aggrolite: o/
15:55 kyshtynbai this is weired. I passed dirs lib and template with -w option, and is started to watch them. Default values seem not to work.
16:11 mattastrophe joined #mojo
16:26 PryMar56 joined #mojo
16:36 guru joined #mojo
16:48 aggrolite how do i run a local mojolicious::command module i made? assuming my module is inside a local lib/ dir. something along the lines of `mojo -Ilib <cmd>` or something
16:50 aggrolite ah…maybe the —home option is worth a try
16:52 Grinnz_ perl -Ilib ./myapp <cmd>
16:52 jberger aggrolite: you know you are sitting right next to me, right?
16:53 Grinnz_ lol
16:53 aggrolite :^)
16:55 jberger fixed
16:56 Kogurr joined #mojo
17:08 aggrolite joined #mojo
17:08 aggrolite jberger, i’m open to other suggestions for the command name as well
17:08 aggrolite donuts —krispy —dunkin
17:08 jberger \o/
17:09 jberger mojo donuts krispy
17:09 jberger mojo donuts dunkin
17:09 aggrolite yeah :D
17:09 jberger either way
17:10 jberger args are fine too, maybe preferred if they are going to have the exact same presentation
17:11 jberger for example, --fresh_only might not be useful in dunkin and that implies different commnads
17:11 aggrolite kind of ironic i’m eating a donut right now
17:13 aggrolite jberger, you asked whether i’d be using the existing module (iirc). is there an alternative (other than writing the code inline)?
17:14 jberger the command could be a separate module or it could come with the existing module
17:14 jberger s/module/dist/
17:14 aggrolite oh, good idea
17:27 mattastrophe joined #mojo
17:32 woz_ joined #mojo
17:41 turael joined #mojo
17:44 mishanti1 What do you guys use these days for forking processes that need to be detached from parent and live their own life from then on?
17:44 hernan604 you could use some queue for that
17:45 hernan604 enqueue the job and put up some workers
17:45 pink_mist where does a queue come into it?
17:45 pink_mist forking and detaching has nothing to do with workers or queues
17:45 hernan604 its not forking tho
17:46 hernan604 ok nvm then
17:46 mishanti1 hernan604: Thanks for the suggestion, but this is not really a worker/manager issue. I simply need to fork and detach in the sanest way possible. :)
17:46 mishanti1 Appreciate the input though.
17:47 pink_mist I remember using Proc::Daemon in the past
17:47 pink_mist but I haven't done this kind of thing for years
17:47 pink_mist so I don't know if that's the best way to go about it
17:47 mishanti1 Yeah, I remember using Proc::Daemon as well at some point.
17:49 sri is this incomprehensible, or is it just me? https://github.com/kraih/mojo/issues/808
17:50 mishanti1 Hmm. Perhaps I used some terms incorrectly here. When I said 'fork' I didn't mean "fork the process", but rather "start some external program and let it live or die on it's own".
17:50 absolut_todd joined #mojo
17:52 mishanti1 sri: Seems to me that that issue should be filed under https://github.com/flowdy/FlowgencyTM/tree/master
17:52 ajr_ If I get this message "Can't call method "res" on an undefined value" from Controller.pm, how can I trace it back to find out what it's complaining about?
17:52 mishanti1 or just https://github.com/flowdy/FlowgencyTM
17:52 * genio is closing tickets like a boss today... ᕦ(ò_ó)ᕤ
17:53 pink_mist mishanti1: the way you do that is fork, detach, exec
17:55 disputin joined #mojo
17:56 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Server.pm#L28-L39
17:56 mishanti1 pink_mist: Thanks :)
17:57 mishanti1 sri: And thank you too. Always helpful with examples.
17:58 amon joined #mojo
18:04 sri oh noes, half of the yapc videos on youtube are broken
18:04 sri looks like encoding issues
18:05 JDorpinghaus joined #mojo
18:07 sri it's not just me right? https://www.youtube.com/watch?v=88K1h1XhEeo
18:08 Grinnz nope that's broken
18:08 Grinnz qite badly
18:08 sri beginning is fine, but around minute 5 it's all jittery
18:08 Grinnz bad right from the start here
18:08 Grinnz let me try lower res
18:09 Grinnz that didnt help any :/
18:24 dod joined #mojo
18:33 trone joined #mojo
18:59 bin_005 joined #mojo
19:13 panshin joined #mojo
19:36 jberger sri: my talk seems to only have the second half, and only the camera on me :(
19:37 jberger I hope they are going to remaster from recorded data, or else I will be very sad
19:37 sri jberger: couldn't watch any of your talks
19:37 jberger :'(
19:38 sri either no image or broken sound
19:38 jberger you saw my talk though
19:38 jberger my slides
19:38 genio yea, it was so choppy that I couldn't watch either
19:38 jberger oh, I should think that here!
19:38 jberger http://jberger.github.io/TestingWithPhantom/#/
19:38 jberger my slides ^^
19:38 jberger navigate with page up / page down, because, reveal.js
19:38 genio but they did say that they would upload new videos of higher quality to YouTube at some point in the near future
20:03 mattastrophe joined #mojo
20:12 berov joined #mojo
20:14 dave joined #mojo
20:20 panshin joined #mojo
20:58 disputin joined #mojo
21:00 aggrolite joined #mojo
21:06 ans joined #mojo
21:09 yko joined #mojo
21:17 firnsy_ joined #mojo
21:25 marty_ joined #mojo
21:40 firnsy joined #mojo
21:54 firnsy_ joined #mojo
22:04 aggrolite joined #mojo
22:09 firnsy joined #mojo
22:12 firnsy_ joined #mojo
22:28 mattastrophe joined #mojo
22:30 firnsy joined #mojo
22:41 firnsy joined #mojo
22:52 disputin joined #mojo
23:11 dvinciguerra joined #mojo
23:48 frederic_ joined #mojo
23:58 jberger hmmm, interesting result
23:58 jberger perl -Mojo -E 'say app->types->detect("text/html")->[0]' # htm

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