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

IRC log for #mojo, 2014-06-17

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

All times shown according to UTC.

Time Nick Message
00:03 jberger It sometimes loses its mojo and I can't figure out when or why
00:04 jberger It will run for weeks correctly then suddenly stop posting
00:04 jberger Oh! But this time it's gone all together
00:08 meshl joined #mojo
00:10 cpan_mojo joined #mojo
00:13 jberger hmmmm, lots of "Gateway Time-out" at the end of its log
00:13 jberger I wish it had timestamps, maybe time to use an actual logger for it
00:13 jberger (this little bot is getting out of hand :-) )
00:16 jberger Last entry was: Ado 15. Jun 18:08:57
00:18 jberger and that was 0.46, which oddly isn't in my log
00:18 jberger oh well
00:23 marty joined #mojo
00:25 rem_lex| joined #mojo
00:49 basic6 joined #mojo
01:04 laouji joined #mojo
01:25 klapperl_ joined #mojo
01:36 Averna joined #mojo
01:41 mire joined #mojo
01:55 btyler joined #mojo
02:10 cpan_mojo WebService-FindMyiPhone 0.02 by Michael Greb - http://metacpan.org/release/MIKEGRB/WebService-FindMyiPhone-0.02 (depends on Mojolicious)
02:17 punter joined #mojo
02:19 mikegrb <3
02:29 punter :)
02:32 sri continuum is so underrated, really great scifi
02:40 preaction lexa doig doing something good? count me in
02:48 russum joined #mojo
02:51 chankey joined #mojo
03:09 genio Continuum is pretty good.  My girlfriend doesn't like it, so I have only seen a few episodes of season 3 so far.
03:11 kyshtynbai I've found a blogging system on github (bootylite) and I found some make files in the root directory. I guess I should somehow build modules which are included in the cloned directry?
03:13 preaction i don't think you use the Makefile.PL to install the module, i think you use it to install the prereqs
03:13 preaction maybe run the tests
03:16 kyshtynbai thanks.
03:21 zivester joined #mojo
03:34 basic6_ joined #mojo
04:12 laouji joined #mojo
04:32 tempire continuum is pretty amazing
04:32 tempire I thought they were going crazy for a bit
04:32 tempire but it seems like they do have a direction, it's just not clear yet
04:33 tempire the last episode was great
04:33 tempire Which could be summed up as, "!@#4. Well now what."
04:35 tempire Actually, I wouldn't call it amazing.
04:35 tempire But I do think it's the best scifi available at the moment
05:33 ryanc joined #mojo
05:40 laouji joined #mojo
05:43 cfedde time travel gets a bit tired after a bit.
05:51 laouji joined #mojo
06:06 chankeypathak joined #mojo
06:19 Eke- joined #mojo
06:38 Vandal joined #mojo
06:52 igorsutton joined #mojo
06:52 eseyman joined #mojo
07:02 dod joined #mojo
07:11 basiliscos joined #mojo
07:25 trone joined #mojo
07:26 dexteruk joined #mojo
07:28 rawler joined #mojo
07:41 chankey joined #mojo
07:49 babl joined #mojo
07:58 Eke|| joined #mojo
08:03 babl joined #mojo
08:05 Averna joined #mojo
08:08 hrupp joined #mojo
08:13 denis_boyun joined #mojo
08:19 laouji joined #mojo
08:23 laouji joined #mojo
08:25 c--__ joined #mojo
08:25 batman has anyone created a nice crud rest api for mojo?
08:25 fhelmber_ joined #mojo
08:26 c--__ "(text => 'File is too big.', status => 200)" shouldn't that be 413 or somthing other than 200? http://mojolicio.us/perldoc/Mojolicious/Lite#File_uploads
08:28 basiliscos joined #mojo
08:41 edestler joined #mojo
08:45 dotan c--__: I think 413 is for PUT; file upload is part of a POST request, usually from a form that might have other fields, so it's more of an invalid input than a problem in the request itself.
08:46 edestler joined #mojo
09:28 mishantil batman: We do a lot of crud in an API here, but have not made any boilerplate / scaffolding or such things for it.
09:29 mishantil batman: how so?
09:29 meshl joined #mojo
09:40 c--__ dotan: well i'm not entirely sure what the most appropriate http code would be if the file's too big (probably in the 400 area, cliet error). but it just seems 200/ok is not right, because ok sounds like 'everything worked fine, go on', don't you think?
09:49 chankeypathak joined #mojo
10:09 laouji joined #mojo
10:09 kyshtynbai joined #mojo
10:17 batman https://github.com/jhthorsen/cookieville # comments on my rest api for manipulating the database?
10:17 laouji joined #mojo
10:18 meshl joined #mojo
10:19 kyshtynbai joined #mojo
10:21 firnsy batman: isn't put the preference for updates in rest?
10:22 batman do you mean that POST /:resultset?q=:json should be PUT ?
10:23 firnsy i'm more refering to the requirement of your "op" param in POST
10:24 batman but "op" in json is the response, not the request
10:24 firnsy sorry it's actually part of the return, but POST shouldn't update
10:25 batman why not? i think it's very inconvenient to do explicit INSERT
10:25 batman i just want data to exist in the database.
10:26 firnsy when i say "shouldn't" i really mean ... i "think" it shouldn't ... based on previous readings
10:26 batman right. but what would you say is more useful?
10:26 batman i don't really care much about what is done. i want an api which makes sense. many api is to complicated :(
10:27 firnsy for me CRUD is best remembered as POST, GET, PUT/PATCH and DELETE
10:28 firnsy PUT being used when supplying the full replacement record and PATCH when only a portion of the replacement record is provided
10:30 batman so PUT would be "insert or update" ?
10:32 bjoernfan When is POST used then?
10:32 * batman don't know :(
10:33 d4rkie joined #mojo
10:34 bjoernfan Are there any other good APIs one might take inspiration from maybe?
10:35 laouji joined #mojo
10:37 laouji joined #mojo
10:38 alnewkirk joined #mojo
10:38 bjoernfan batman: Oh, missed a word of firnsy. POST for new.
10:38 * bjoernfan goes back to lurking
10:39 batman i don't want something for explicit CREATE, i just want data to exist in the database
10:39 batman but i might leave POST out for now and then just use PUT for insert _or_ update
10:40 batman i do like PATCH though.
10:40 firnsy batman: yeah from the HTTP/1.1 spec it looks like PUT can be use to create or update
10:41 batman i will update my api then. thanks
10:41 mishantil batman: I personally favor doing POST for both insert and update. Create: POST to /endpoint. Update: POST to /endpoint/:updatethis
10:42 mishantil Where :updatethis is the identifier for what you want to update
10:42 nic batman: How is authentication handled so far?
10:42 batman mishantil: i agree, but i will use PUT if that is closer to the spec
10:43 batman nic: i will add super basic support for auth, but i will later suggest sub classing the app for finer grain authentication
10:44 nic I see
10:45 nic I have something basically in the same ballpark, but it needs to satisfy PCIv3, which I'm finding quite difficult
10:45 batman what is what is PCIv3??
10:45 batman s!\?\?!?!
10:45 d4rkie joined #mojo
10:47 batman bjoernfan: i like your input
10:49 batman firnsy: what about update for _many_ rows?
10:51 nic batman: https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=4&amp;cad=rja&amp;uact=8&amp;ved=0CGAQFjAD&amp;url=https%3A%2F%2Fwww.pcicomplianceguide.org%2F&amp;ei=jx2gU4fLFOWp7AaD7ICgDg&amp;usg=AFQjCNHLlPCaV1ZJ12ID9GbTIMAJihgYYA&amp;sig2=Ru8p-rusWeRKp4cT_ddaNw&amp;bvm=bv.68911936,d.ZGU
10:52 nic hmm, should have used a url shortener
10:52 nic oop, apologies, that isn't even the direct link
10:52 batman nic: or just a direct link :P
10:52 nic https://www.pcicomplianceguide.org/
10:52 batman not going down the pci road...
10:52 nic fatigue has kicked in
10:53 nic too many consecutive 17-hr working days
10:54 nic 2800+ days without a day off duty
10:54 nic going to reach 3000 then negotiate some changes
10:59 firnsy batman: updating many rows is the same problem as creating many rows
11:09 mishantil I prefer 1-1 operations when using an API, especially if I on my end need to keep track of the various objects.
11:09 mishantil That means no bulk inserts or updates.
11:10 mishantil If performance is an issue then a lot of that can be adressed by persistent connections, and sensible non-blocking behaviour.
11:11 batman good points
11:11 * batman will have lunch while thinking :)
11:15 sugar joined #mojo
11:15 bjoernfan nic: Wow man, at what kind of place do you work?
11:18 sugar_ joined #mojo
11:43 nic it's a group of companies doing various forms of retail
11:44 nic got an exciting few days ahead -- planning a pretty hefty deployment of mojolicious and mojo-based apps across 56 servers in a shiny brand new DC
11:46 bjoernfan cool
11:46 bjoernfan But not a day off over 7 years?
11:47 bjoernfan You should take 2015 off. :)
11:53 rem_lex|pivo joined #mojo
11:58 nic ask any mum of 4+ kids and she'll tell you I've had it easy :)
12:01 batman $c->match->stack->[-1]{controller} # is it evil to manipulate this inside a bridge?
12:01 batman i mean, is it considered internal?
12:23 basiliscos joined #mojo
12:36 basiliscos1 joined #mojo
12:44 Godsey joined #mojo
12:45 neilhwatson joined #mojo
13:11 aleksey joined #mojo
13:21 zivester joined #mojo
13:28 genio batman: HATEOAS.  should be providing URLs to possible actions from GET result sets
13:31 batman i really hate HATEOAS.
13:31 batman can you please explain me the point of HATEOAS?
13:31 batman is it so you don't have to construct URLs?
13:33 genio Yes, and for changes on the API side to make them transparent to callers.  I'm looking for the talk that's out there that explains it in detail
13:33 genio http://www.slideshare.net/trilancer/why-hateoas-1547275
13:34 batman but i would rather store the variable parts and then construct the URL when i need to.
13:35 batman after all, the HATEOAS URLs seems pretty useless if the API change
13:35 rem_lex|pivo joined #mojo
13:36 marty joined #mojo
13:36 genio That requires you to know exactly how to update each item your returned.   If I get a list of Foos from you, each Foo then tells me how to update it, delete it, or get related Bars about it.  Then, I have to have zero knowledge of your API other than the starting point, how to get Foos.  This makes it so you can update and change how you manipulate Foos or delete Foos anytime you want, because I'm relying on your service to tell me how to do that.
13:36 genio * item returned.
13:37 batman but that also means that you have to start over all the time to make sure you have the right URL
13:38 batman and it would also mean a massive overhead for the SELECT statement.
13:38 genio No, I'm checking Foo's 'update_url' for every time I want to update the Foo as the caller.
13:39 genio It doesn't make the API developer's job easier, it makes the client's job easier.
13:39 batman how is that "No". it sounds like "exactly" :(
13:39 batman it doesn't make the API development hard, it just means that you need to pass on a massive overhead of data to the client on each request
13:39 genio It's not starting over, you've just built the URL for me in the response.  When I get a Foo, I automatically have the URL to update said Foo
13:40 genio it's not a massive overhead to the client, it's one more property
13:40 batman yeah, but then when you have gone from foo -> bar -> baz, then you need to start over getting "foo" if you want to know the "correct" way to get "baz"
13:40 batman since the URL on each step might have changed
13:41 batman it means double the HTTP body size in many cases.
13:41 genio if you still have the Baz object, it shouldn't have changed in the time from when you got the object to when you want to do anything with it.  who changes their API every nano-second?
13:42 bluescreen joined #mojo
13:43 batman that is true, but i can't cache the "bar" object on my side to fetch "baz" a week (or an hour) later, since the HATEOAS url might change (in the foo -> bar -> baz chain)
13:45 genio you cache object for days on end before trying to manipulate them?  I think how you use data from RESTful sources and how I do are different.
13:45 marty joined #mojo
13:46 batman i've only stumbled upon the HATEOAS when i created Mojolicious::Plugin::PayPal... let me find the example i don't like...
13:47 batman https://developer.paypal.com/webapps/developer/docs/integration/web/accept-paypal-payment/ <-- i might want to use the "self" link later on. and i'm not talking a nano-second, but maybe a week later
13:48 batman how is that possible, if the HATEOAS is to make a loose coupling to the API?
13:48 batman let me know if i've missed out an important thing here...
13:48 stephan48 HATEOAS?
13:48 batman i would rather know "store the PAY-XXX key in your database, and create *this* link later on"
13:49 dotan joined #mojo
13:49 batman stephan48: look at the link posted 15:33
13:50 batman genio: i hope i don't sound like a complete jerk --- i just don't get it :(
13:50 stephan48 ah thanks
13:50 genio batman: No, not at all. (never worry about that, my feelings aren't easily hurt).  I'm just in the middle of coworkers talking to me and keeping this conversation alive at the same time
13:51 batman :-)
13:53 genio I haven't had a chance to look at the paypal URL yet, but I think I can guess where you're going and with some more complicated RESTful setups, your argument would be dead on.  Going through a crazy amount of start here, get this, then that, etc. would suck.
13:54 genio I also think that _some_ of that craziness can be mitigated by a better designed API with better starting points, but that's not what we're talking about.
13:58 genio batman: Ahh, they're using versioned APIs.  They don't drastically change the API within a version, which should allow you to get around that problem.   /v1/payments   etc.  So, when they upgrade to v2, v3, etc, you don't have to learn all of the changes to their API as long as their starting point stays the same.  And, if they keep the older versions there for some time, I guess it's assumed the caller will be OK.  However, I don't know that ...
13:58 genio ... you can come back after a super extended period of time and use the stored HATEOAS url you had with the object if they've already removed an old version of the API
13:59 btyler joined #mojo
13:59 * sri hopes the latest minion passes its tests on windows
14:00 nic surely you only need to re-cache the urls if a transaction fails
14:00 batman genio: but doesn't that render the HATEOAS links useless in that API?
14:00 batman or am i using the API wrong?
14:07 batman genio: also, isn't my api broken anyhow (looking from a HATEOAS point of view), since it's hard coupled to the database / DBIx::Class schema?
14:10 sh4 joined #mojo
14:16 gryphon joined #mojo
14:19 Adura sri, crashes with Strawberry 5.20, but is fine on Cygwin 5.18.2.
14:19 sri crashes how?
14:20 Adura t/file_lite_app.t .. 1/?
14:20 Adura This application has requested the Runtime to terminate it in an unusual way.
14:20 Adura Please contact the application's support team for more information.
14:20 sri :S
14:20 Adura Doesn't like your lock/fork or something.
14:22 sri oh, that might be the widows version of a core dump :o
14:22 Adura Yeah, pops up a stopped working dialog.
14:23 sri can you prove -v to see which test breaks it?
14:23 sri and file.t passes?
14:23 Adura It seems to.
14:24 sri that is really odd, file.t is where all the real tests happen
14:25 Godsey I have it working under 5.20.0 in cygwin 5.05 and just upgraded to 5.08
14:25 sri cygwin is rarely a problem with non-networking stuff
14:25 sri always strawberry and activeperl where things get tricky
14:26 Godsey my perl is from perlbrew tho
14:27 Adura Last I poked, the fork in Job.pm was the problem.
14:27 sri the fork happens in file.t too
14:27 Adura Hmm...
14:28 sri you are testing Minion 0.24, right?
14:28 Adura Right now I am.
14:28 Godsey doh sorry
14:29 sri with Mojolicious 5.08
14:29 Adura Yup.
14:29 sri ok
14:29 Adura >perl -Mlib="lib" t\file_lite_app.t
14:29 Adura ok 1 - right error
14:29 Adura This application has requested the Runtime to terminate it in an unusual way.
14:29 genio batman: I don't think it renders them useless in that API.  At some point data becomes stale and you should probably look up that information by some identifier anyway.  Assuming they keep versions of the API available for some predictable time frame, you should be ok.
14:30 sri hmm, right after the first test, how odd
14:30 Adura Where file.t passes.
14:30 Adura After this cpan-outdated | cpanm is done, I shall try again.
14:30 sri wonder if it's the plugin line https://github.com/kraih/minion/blob/master/t/file_lite_app.t#L19
14:31 genio batman: Your API is strongly coupled to the DB at this point, yes.  And if you were to ever decide to change that, you'd have to break clients (I don't think cookies are something that are going to be looked up over a very extended period of time).  Whereas if you had URLs in your responses for things, you could alter that coupling almost anytime you want (within reason) without killing all clients using the API
14:32 sri Adura: if you could add a few warn statements to find the specific line that would really help
14:33 Adura With .23 I narrowed it down to that fork.
14:33 Adura I shall edit the .24 version.
14:34 sri hope it's not the ioloop use in the task
14:35 Adura Warn'd above and below line 40, only got the above.
14:36 sri damn, the enqueue triggers the fork in this case
14:36 Adura Yeah, file.t did get the second warn.
14:37 sri can you locate which line in Job.pm fails?
14:37 sri hope it's not directly the fork
14:37 Adura Pretty sure it's 40, the warn below it didn't happen.
14:38 sri WTF
14:38 sri why would the fork fail with a core dump?
14:40 genio I'm upgrading strawberry perl to 5.20 now to see if it does it to me as well.  I'll let you know
14:42 batman genio, firnsy, mishantil, nic: i've updated the doc now: https://github.com/jhthorsen/cookieville # more feedback is welcome
14:43 batman genio: i would like to see an example of how you would add HATEOAS to the API that makes sense.
14:43 Adura cpantesters shows the same issue on Windows, but the results come from .23
14:43 sri .23 had other problems
14:44 Adura Same result for me both times.
14:44 dotan joined #mojo
14:44 sri and it is line 40 in Job.pm?
14:44 Adura Yep, don't get the warn after that line.
14:44 sri :(
14:45 sri that's really bad, the actual fork() call fails then
14:45 Adura Quite dramatically.
14:46 sri perhaps minion should just go unix only, this seems pretty hard (impossible?) to track down
14:46 Adura At least Cygwin works.
14:56 mire joined #mojo
14:56 mad_hatter joined #mojo
14:57 mad_hatter Is there documentation on the mojolicious site where i can see the function definitions for things like get, under, any, etc?
14:59 batman mad_hatter: i think sri already gave you the link: https://metacpan.org/source/SRI/Mojolicious-5.08/lib/Mojolicious/Lite.pm#L33
14:59 mad_hatter its under lite?
15:00 batman what do you mean?
15:00 mad_hatter i'm looking for like
15:00 mad_hatter sub get {}
15:00 mad_hatter and sub under {}
15:01 batman monkey_patch $caller, $name, sub { $routes->$name(@_) }; # <-- that's what you're looking for
15:01 batman monkey_patch adds the function called $name to the namespace $caller.
15:02 dod joined #mojo
15:03 nicomen ooh, I might drop using a web browser now ;) # script/my_app get /test_page | lynx -dump -stdin
15:09 dotan joined #mojo
15:10 genio Minion crashed in the same place for me on Strawberry Perl 5.20.0 64bit on Win7
15:11 sri i wonder if it's IO::Poll causing the crash
15:12 sri perl -Mojo -E 'my $ua = Mojo::UserAgent->new; $ua->get("mojolicio.us"); my $pid = fork; unless ($pid) { $SIG{ALRM} = sub { say time, " ALRAM $$!" and exit 1 }; alarm 3; while (1) {}} else { waitpid $pid, 0; sleep 2; say time, " MANAGER $$!" }'
15:12 sri if anyone could run this oneliner on windows
15:12 sri it would tell me a lot
15:12 Adura Can't find string terminator "'" anywhere before EOF at -e line 1.
15:13 Adura q: I'll adjust it.
15:13 mad_hatter batman: I'm having trouble understanding: my $logged_in = $routes->under->to(controller => 'login', action => 'logged_in'); in the growing guide...does to() return a hash ref or something because after you do that you can do things like $logged_in->get/any/post/whatever else
15:13 genio PS C:\Users\cwhitener> perl -Mojo -E 'my $ua = Mojo::UserAgent->new; $ua->get(q(mojolicio.us)); my $pid = fork; unless (
15:13 genio $pid) { $SIG{ALRM} = sub { say time, qq(ALARM $$!) and exit 1 }; alarm 3; while (1) {}} else { waitpid $pid, 0; sleep 2;
15:14 genio say time, qq( MANAGER $$!) }'
15:14 genio 1403018020ALARM -4348!
15:14 genio 1403018022 MANAGER 6532!
15:14 sri interesting, so it's not even the event loop
15:14 sri oh wait
15:14 sri my bad, the user agent is fork aware
15:14 crab -4348?
15:15 sri perl -Mojo -E 'Mojo::IOLoop->server({port => 3000} => sub {}); my $pid = fork; unless ($pid) { $SIG{ALRM} = sub { say time, " ALRAM $$!" and exit 1 }; alarm 3; while (1) {}} else { waitpid $pid, 0; sleep 2; say time, " MANAGER $$!" }'
15:15 sri this one is better
15:15 sri crab: fork emulation
15:16 sri i want to see if the fork emulation dies if IO::Poll is watching a handle
15:17 genio 1403018216 ALARM -8788!
15:17 genio 1403018218 MANAGER 8708!
15:17 sri i'll be damned... that isn't it
15:17 sri thanks everyone, not sure what else to look at
15:17 Adura I got a different result.
15:18 genio sri: any further debugging you'd like to see in the file_lite_app.t ?
15:18 sri out of idea i'm afraid
15:18 Adura >perl -Mojo -E "Mojo::IOLoop->server({port => 3000} => sub {}); my $pid = fork; unless ($pid) { $SIG{ALRM} = sub { say time, ' ALRAM ' . $! and exit 1 }; alarm 3; while (1) {}} else { waitpid $pid, 0; sleep 2; say time, ' MANAGER ' . $! }"
15:18 Adura 1403018179 ALRAM
15:18 Adura 1403018181 MANAGER Inappropriate I/O control operation
15:18 genio Adura: PowerShell doesn't exactly like mixing quotes.  turn all " to qq()
15:18 sri *+s
15:18 Adura I changed the quote structure.
15:18 genio I see
15:19 genio inappropriate I/O control operation... hmm
15:19 sri it's not the crash we were looking for
15:22 sri oh wait, i have another idea :)
15:23 sri http://pastie.org/9299385 # does this patch make a difference? http://pastie.org/9299385
15:24 sri could be active flock during fork
15:24 genio doesn't seem to mitigate the issue
15:24 sri :(
15:25 marty joined #mojo
15:25 Adura Yeah, nothing.
15:25 purl somebody said yeah, nothing was going to do a *very* good job at that, but chrony will try
15:26 nic batman++  # I read it, it made sense
15:27 sri guess that means no more windows support for minion
15:27 Adura No alternative to those file locks?
15:27 sri so strange it onlt fails the app test though
15:27 sri i don't think it's the file locks
15:28 sri locks are inactive during fork
15:28 batman nic: thanks :)
15:28 sri there's only a lock if a guard object exists
15:29 sri file.t tests all that stuff too
15:31 dod joined #mojo
15:33 batman genio: i would really appreciate if you could look at the API to see if it can/can't be extended with HATEOAS later on.
15:34 genio batman: Will do.  I have it loaded in the browser and plan on looking through it more in detail later today.
15:34 batman genio: that's awesome \o/
15:41 sri another windows test
15:41 sri http://pastie.org/9299451 # if you apply this patch, does it change the test results much?
15:42 sri i especially would like to know if it reaches the get_ok('/count')
15:44 Adura Hmm, that time it made it past fork once.
15:45 sri it does rech the /count test? Oo
15:45 sri *reach
15:46 Adura http://pastie.org/9299462
15:46 sri HOW VERY ODD!!!1
15:47 genio same behavior here
15:47 sri ok, now we know it might be the mojolicious app causing the problem
15:49 sri http://pastie.org/9299474 # ok, one more just to make absolutely sure
15:49 sri if auto_perform works outside, we know for sure it's the app somehow
15:50 sri that might interest jberger too, since it hints at a general windows fork problem inside mojolicious apps
15:52 genio no change in behavior from the last diff
15:52 Adura http://pastie.org/9299483
15:52 sri DAMN!
15:53 sri so it is in fact the mojolicious app that makes the fork die
15:53 sri s/die/break in a horrible way/
15:54 sri so we a) find the problem in mojolicious, or b) change the auto_perform strategy
15:55 sri would suck a bit to change the auto_perform strategy... you'd have to manually run jobs with app->minion->perform_jobs or so
15:55 genio What's the best way to go about 'a'?
15:55 sri genio: good question, next question ;p
15:55 genio heh
15:57 sri i do have some ideas though
15:59 sri http://pastie.org/9299498 # lets first rule out the event loop
16:01 genio no difference in behavior from the last two diffs
16:01 sri ok, that's pretty good
16:02 Adura Hmm...
16:02 Adura Something different.
16:03 genio hmm.  did I miss something in my patching?
16:03 Adura http://pastie.org/9299505
16:03 Adura Or I screwed my patching up, but that is quite the warning.
16:04 sri oh, that's pretty bad
16:04 sri i had a hunch it might go in that direction... (interpreter bug)
16:04 genio let me re-patch
16:06 Adura I'll get a fresh copy of Minion and try that again.
16:07 Adura Yeah, same thing.
16:09 Adura One time it didn't crash...
16:09 genio I get the same now with a fresh Minion
16:09 Adura The next, it did.
16:10 genio let me re-test the previous two diffs as I obviously made some changes somewhere to test that I forgot to un-make
16:11 sri http://pastie.org/9299522 # ok, this one will show us if it's the daemon layer
16:12 genio http://pastie.org/9299531
16:12 Adura Can't get the warning to show up after it decided to not crash once, then crash after.
16:13 sri damn, it's not even the daemon layer :O
16:13 sri sooo odd
16:13 Adura Oh, there it is.
16:13 purl No it isn't!
16:14 Adura http://pastie.org/9299534
16:15 sri very strong indicator for an interpreter bug
16:16 Adura http://pastie.org/9299540 Here's what I was talking about, before it stopped doing the warning for a stretch.
16:16 sri that's the expected result
16:17 sri (i didn't update the counters later on)
16:17 sri aside from the "Attempt to free unreferenced scalar..."
16:17 sri http://blog.booking.com/the-dreaded-attempt-to-free-unreferenced-scalar.html # hahaha :(
16:19 abhishekisnot joined #mojo
16:22 mire joined #mojo
16:23 Adura Well, guess there's C to do.
16:25 mad_hatter http://pastie.org/9299556
16:25 mad_hatter okay so I have this class that builds a jobs object out of a parse crontab
16:26 mad_hatter I want to use mojolicious to render this data to a webpage but im not sure how to go about it
16:26 mad_hatter ive got the jobs.html.ep template
16:29 sri i just don't see us track down the windows fork problem
16:30 Adura Activestate/Strawberry Perl guys to the rescue...! Hopefully.
16:30 sri which leaves a) do not support windows with minion, or b) change the auto_perform strategy after all
16:30 sri even if we contacted the active/strawberry folks, we'll have broken tests for years to come
16:31 Adura Helps... people we don't know with problems that may or may not exist for them!
16:32 Adura But yeah, if you want me to test crap I'm available often enough.
16:37 sri jberger: i remember you having trouble with windows fork bugs... this might affect you too
16:43 TenshiLyle joined #mojo
16:44 sri http://pastie.org/9299612 # i suspect this slightly more sophisticated patch passes all tests on windows
16:45 * sri pokes Adura and genio
16:46 nicomen I think I need a course in routing, I'm wondering how you guys would do this: Route is /path/:month/:day and I want to do as much as possible in route definition (to keep controllers generic) and end up with a stash value that is not set if month and day are not there, or else: either "2014-month*" or "2014-month-year"
16:46 genio I'm back
16:46 nicomen the last string should've been: "2014-month-day"
16:49 genio sri: last one passed all tests in file_lite_app.t
16:50 sri thanks :(
16:50 genio all tests passed with that patch.  although that was option B :/
16:52 sri only solution i see for keeping windows support
16:58 nicomen I was thinking of using a condition, but it looks a bit silly as I can't come up with a proper name and parameter/pattern to use, as I just want to populate the stash conditionally
16:59 fhelmber_ joined #mojo
16:59 sri not sure if i really want to keep this... but windows works for now :S https://github.com/kraih/minion/commit/bf9d7608ae1b3793aa1e148b990351176d2c2439
17:02 sri of course this way of testing is not just a little more verbose, it also has timing problems, like if you want to wait for a result in your action
17:02 sri on the other hand... you do get more control... you decide where to call ->perform_jobs
17:03 * sri shrugs
17:03 fhelmber_ joined #mojo
17:04 batman sri: i like it (perform_jobs instead of auto_perform)
17:04 batman seems more explicit
17:08 disputin joined #mojo
17:31 basiliscos joined #mojo
17:32 nic nicomen: An easy approach is to use invalid defaults in the wildcard matching; then remove from the stash any with those values (if you really need them not there)
17:35 r0b3rt joined #mojo
17:40 denis_boyun joined #mojo
17:48 rem_lex| joined #mojo
17:53 marty joined #mojo
18:01 sri oh, i like the new rethinkdb protocol, guess i'll be watching that database again :) http://rethinkdb.com/docs/driver-spec/
18:05 btyler joined #mojo
18:27 disputin joined #mojo
18:31 batman jberger: is cpan_new sleeping?
18:34 batman genio: i've released Cookieville 0.01, but it's marked as experimental so any changes can be done
18:35 jberger_ joined #mojo
18:36 jberger_ As I'm catching up on the backlog
18:36 batman jberger_: never mind. it's not on twitter yet, so it's not your fault :)
18:36 jberger_ Remember that forkcall is now passing on all platforms
18:38 sri jberger_: are you testing it with a real lite app?
18:38 sri that's where minion broke
18:38 jberger_ Interesting
18:38 jberger_ No none of the tests have an app
18:38 jberger_ The examples do
18:38 sri hehe
18:39 sri try it!
18:39 jberger_ Can't til I get home
18:39 jberger_ Acura could try for me
18:39 jberger_ Adura
18:39 jberger_ Grrr
18:41 jberger_ Aaargh is cpan_mojo down again?
18:41 jberger_ I just restarted it yesterday
18:43 batman jberger_: i don't think so. my release is not picked up by cpan_new (on twitter)
18:44 jberger_ Is the friend feed down?
18:44 batman no idea
18:47 * batman is quite excited about cookieville
18:48 meshl joined #mojo
19:00 jberger_ Oh
19:00 jberger_ Is it a new module?
19:01 sri does it bake cookies for me?
19:01 jberger_ cpan_mojo has one gap that I can't figure out how to fix
19:01 jberger_ To determine dependencies it queries metacpan
19:02 jberger_ But metacpan is slower than the friendfeed
19:02 jberger_ So the first release that depends on mojo is likely to be missed
19:03 jberger_ If the name of the module had mojo in it out would have worked
19:03 jberger_ :s
19:12 cpan_mojo Minion 0.25 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-0.25 (depends on Mojolicious)
19:14 sugar_ joined #mojo
19:14 batman jberger_: oh
19:14 batman sri: no. but patches are welcome :-)
19:14 sri :(
19:15 lb sri could use a cookie patch
19:16 batman lb: what do you mean? is it the sweetness or crunchyness that he lack?
19:16 * batman stops with the not-funny-jokes
19:17 jberger_ batman any thoughts on how to improve cpan_mojo?
19:17 lb i haven't tried biting him, so i'll have to rely on your expertise, batman
19:17 genio Stupid pun of the day:  What did one the continental plate say as it bumped into the other continental plate?
19:17 genio "My fault"
19:17 * lb shows genio the door
19:18 batman jberger_: haven't really looked at it :(
19:18 * genio giggles as he exits
19:19 batman :D
19:30 meshl joined #mojo
19:30 marty_ joined #mojo
20:02 nicomen nic: do you have an example?
20:07 nicomen batman: is it something similar to Yanick?
20:07 disputin joined #mojo
20:09 nicomen Yanick=Yanick's thing
20:09 batman nicomen: do you mean http://techblog.babyl.ca/entry/waack ?
20:09 batman i guess the answer is yes :)
20:11 batman i guess the major difference is that i've written mine with a web framework that makes sense
20:11 batman ;-)
20:11 nicomen yeah ;)
20:11 nicomen http://www.pythian.com/blog/instant-rest-api-for-any-database/
20:11 nicomen is where I Got it fromt
20:11 nicomen and then I noticed App::Presto, clever-ish
20:12 nicomen cool, what's the name about btw?
20:12 batman just found some name related to futurama
20:28 cpan_mojo Cookieville 0.02 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Cookieville-0.02 (depends on Mojolicious)
20:28 batman not sure why yanick call things "tables" when they are not...
20:29 batman i like that cookieville has .csv support :)
20:30 batman now i need a break
20:30 batman genio: will not remove the EXPERIMENTAL stamp on cookieville until i get feedback :)
20:30 * batman need to blog
20:36 basic6 joined #mojo
20:36 cpan_mojo Mojolicious-Plugin-Logf 0.04 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Logf-0.04
20:41 dod joined #mojo
21:08 dotan1 joined #mojo
21:10 marty joined #mojo
21:17 meshl joined #mojo
21:17 basic6_ joined #mojo
21:23 cpan_mojo Mojolicious-Plugin-Narada 0.2.2 by Alex Efros - http://metacpan.org/release/POWERMAN/Mojolicious-Plugin-Narada-0.2.2
21:24 denis_boyun joined #mojo
21:26 nicomen ok, it's basically ->under I have been looking for all the time
21:27 nicomen and I just realised that because I remember jberger talking about under having something to do with the order in Mojolicious::Lite
21:27 nicomen under, is what I thought via, detour or over was :-D
21:30 sri reminds me of an old saying we had in this channel a few years back... "got a routing problem? the answer is always bridges."
21:31 nicomen but, now I see I have used a bridge the same way is under just bridge->to ?
21:37 nicomen oh no I don't get the captures that follow :-((
21:39 nicomen ok, got it
21:45 sri look at that, there's an issue open for a perl logo in fontawesome https://github.com/FortAwesome/Font-Awesome/issues/3015
21:51 jberger_ joined #mojo
22:07 disputin joined #mojo
22:21 marty joined #mojo
22:25 jberger_ UNDER ALL THE THINGS!!!
22:26 jberger_ (wait,  what?!)
23:00 dsog left #mojo
23:28 beyondcreed joined #mojo
23:47 sri \o\
23:47 sri /o/
23:53 d4rkie joined #mojo
23:58 marty |o|

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