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

IRC log for #mojo, 2014-06-15

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

All times shown according to UTC.

Time Nick Message
00:39 cpan_mojo Mango 0.43 by Sebastian Riedel - http://metacpan.org/release/SRI/Mango-0.43 (depends on Mojolicious)
00:44 cpan_mojo Minion 0.22 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-0.22 (depends on Mojolicious)
00:57 punter joined #mojo
01:26 klapperl_ joined #mojo
01:31 phillipadsmith Wondering if these two routes represent a good candidate for a group? E.g., /items/hot/... vs. /hot/...  What say the cabal? https://gist.github.com/phillipadsmith/80edef0d39de45ca3de4
01:46 crab i don't understand your question.
02:10 russum joined #mojo
02:44 punter joined #mojo
03:11 basic6_ joined #mojo
03:11 cpan_mojo Statocles 0.011 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.011 (depends on Mojolicious)
03:32 kyshtynb1 joined #mojo
03:47 good_news_everyon joined #mojo
03:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/UuJ22A
03:47 good_news_everyon mojo/master eb78860 Sebastian Riedel: documentation tweaks
03:47 good_news_everyon left #mojo
05:50 Vandal joined #mojo
06:10 irq joined #mojo
06:31 kyshtynbai joined #mojo
07:44 batman phillipadsmith: i would just factor out parts of the gut into a helper or a method in your resultset
07:48 batman like the part inside the for loop could be something like this: while(my $row = $rs->next) { push @results, $row->some_method_describing_the_return_data }
07:48 batman or even @results = $rs->some_method_describing_the_return_data; # which again does the while() above
08:16 cpan_mojo Mojolicious-Plugin-SessionCompress 0.03 by SOHASHI - http://metacpan.org/release/SOHASHI/Mojolicious-Plugin-SessionCompress-0.03
09:14 sh4 joined #mojo
10:16 Eke- joined #mojo
10:31 d4rkie joined #mojo
10:49 d4rkie joined #mojo
10:49 alnewkirk joined #mojo
11:34 marty_ joined #mojo
11:34 dod joined #mojo
11:35 russum joined #mojo
11:36 kbenson1 joined #mojo
11:37 ivan joined #mojo
11:49 bodgix joined #mojo
11:53 rem_lex|pivo joined #mojo
12:17 mire joined #mojo
13:14 tadegenban joined #mojo
13:14 tadegenban left #mojo
13:50 irq joined #mojo
14:06 sri do the minion tests actually pass on windows?
14:08 Adurah_ Nope.
14:13 Adurah_ But, Cygwin's perl was fine...
14:27 sri any details?
14:28 Adurah_ Can't write to file "C:\Users\USER\AppData\Local\Temp\ndtoAnI6eF\minion.data": Permission denied at lib/Minion/Backend/File.pm line 227.
14:28 Adurah_ Strawberry 5.20
14:30 sri how odd
14:32 gryphon joined #mojo
15:02 btyler joined #mojo
15:22 basiliscos joined #mojo
15:34 kyshtynbai I have a route which looks like this: get '/folder1/folder2/:var_folder/:filename' and this route will render some page. But if this route matches file in public directory, the Mojo won't render a page, but will give back the file itself. Which is not what I want. Are there any ways to fix it, guys?
15:38 dotan kyshtynbai: don't have those files in the public directory?
15:39 kyshtynbai dotan: and will it render them if they are not in public?
15:40 kyshtynbai the problem is - I'd like them to be renderet but not via direct link.
15:41 kyshtynbai I'm afraid I'm not able to express what I want in this case even in my native language :(.
15:43 sri ah, windows bug should be the flock, which is more strict on windows
15:44 dotan The controller has a render_static method, so I think you can you can do $c->render_static("../private/$x/$y") in your route
15:45 kyshtynbai cool I'll check it out, thanks!
15:45 kyshtynbai $c == $self in ::Lite, is it?
15:45 dotan yep
15:45 kyshtynbai Thanks!
15:46 dotan We're you the one trying to do a gallery with user authentication?
15:47 kyshtynbai I am indeed)
15:47 kyshtynbai Not if I need it for production; I'm just learning.
15:54 dotan Seen https://github.com/tempire/MojoExample ? It has both a lite and a full version of a simple app, and it includes a photo gallery. Unfortunately, the design is very different - the photos are hosted remotely (on flickr), and there's no authentication
15:55 kyshtynbai I'll see it, thanks! I actually like descriptions with exaamples, is is sometimes erther difficult to understand docs withous them.
15:59 mire joined #mojo
15:59 jberger_ joined #mojo
16:00 jberger_ sri: re: "$c == $self in ::Lite, is it?"
16:01 thowe joined #mojo
16:01 jberger_ I have been wondering for a while now if in the Lite documentation the action methods should be taking the instance as $c
16:02 jberger_ When they take $self and since helpers work as methods in both the app and the controller, I think it makes it harder to understand where the line between the app and the controller is
16:03 batman anyone worked with paypal? it looks like the "token" and the payment "id" is two different values. it seems so strange, because then i have to map the "token" to the payment "id" once called back from paypal..? https://developer.paypal.com/webapps/developer/docs/integration/direct/make-your-first-call/
16:03 jberger_ Which is then something they have to figure out during Growing
16:04 jberger_ I think it's a common misconception that Lite apps define a single class which is the app
16:04 jberger_ Remember the guy the other day with the DESTROY method
16:05 jberger_ Anyway that's my $0.02
16:05 batman jberger_: i agree about $self vs $c. i try to write $c in light app actions, but sometimes i forget :/
16:09 * jberger_ goes away again
16:15 basic6 joined #mojo
16:36 sri jberger: i've been asking the same a few months back, and consensus was that it's ok now
16:36 sri so now i really don't care anymore
16:37 sri if you want to change it fight for it, i'll stay away
16:56 dexteruk joined #mojo
17:09 wingfold joined #mojo
17:20 batman i think somone who was high on REST has made the paypal api...
17:41 basic6_ joined #mojo
17:47 sri ok, i think this should fix windows support in minion https://github.com/kraih/minion/commit/9aea50d5d81a54ed8a24886ca630f81ddbe9e2a5
17:51 cpan_mojo Mojolicious-Plugin-PayPal 0.01 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-PayPal-0.01
17:52 sri jberger: and when i say fight, i mean make a patch and put it up for a vote
18:01 mire joined #mojo
18:23 basiliscos joined #mojo
18:38 dexteruk joined #mojo
18:50 Adura joined #mojo
18:52 cpan_mojo Minion 0.23 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-0.23 (depends on Mojolicious)
18:52 sri i hate windows
18:53 sri if Minion didn't have to support it we could have really nice time limits on jobs
18:55 sri best we could do portably is a stupid $SIG{ALRM}
18:58 sri i wish travis-ci could run tests on windows :o
19:03 basic6_ are there incompatibilities between mojolicious 5 and 4?
19:03 sri yes
19:04 basic6_ i'm looking for a changelog or something that'll tell me what/how to upgrade
19:05 sri https://groups.google.com/forum/#!topic/mojolicious/PYfjHyVj26w
19:05 sri think i'll keep up the mailing-list thing for the biggest breaking changes, this time we've had no complaints whatsoever
19:06 zivester joined #mojo
19:06 basic6_ thanks that page is just what i need
19:12 sri hmm, wonder if the old job garbage collection code should stay in ->repair or get moved into a separate ->compact method
19:22 cpan_mojo Mojolicious-Plugin-PayPal 0.02 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-PayPal-0.02
19:38 sri oh, that's nice, minion 0.23 released less than an hour ago and already cpantesters results \o/
20:04 meshl joined #mojo
20:11 jberger sri: does SIG{ALRM} work on Windows?
20:12 jberger I don't think even that works
20:20 stephan48 can you create a testcase for me? i will be happy to test it
20:23 hesperaux joined #mojo
20:26 kyshtynbai joined #mojo
20:37 sri stephan48: perl -E '$SIG{ALRM} = sub { say "WORKS!\n" and exit 1 }; alarm 3; while (1) {}'
20:38 sri i guess exit(1) kills both processes on windows, right?
20:38 sri a die is not very useful, since the ALRM may trigger in an eval
20:38 sri hmm
20:40 jberger https://metacpan.org/pod/perlport#alarm
20:40 stephan48 http://paste.stejau.de/?518
20:40 stephan48 the cmd stays alive
20:41 stephan48 its a strawberryperl
20:41 stephan48 doesnt sound like something you would want to use according to perlport...
20:42 jberger stephan48: perl -E '$SIG{ALRM} = sub { say "works" and exit 1 }; alarm 3; system q[sleep 5]'
20:43 stephan48 http://paste.stejau.de/?519
20:43 stephan48 had to substitute sleep for pause
20:44 stephan48 also notable: the spawned cmd which runs the pause cmd stays around after the process terminates
20:54 sri jberger: you have to use a fork and start the alarm after
20:55 sri the sytstem() proves nothing i believe
20:55 mire joined #mojo
20:56 sugar joined #mojo
20:57 jberger the way I read that note from perlport made me believe that alarm would not interrupt the system call, which is (sorta) what stephan48 saw
20:57 stephan48 mh.
20:58 jberger then again, I make no claims to Windows oddity expertise
21:12 jberger on a different topic, what should ForkCall do on timeout?
21:13 jberger should it try to kill the child?
21:18 punter joined #mojo
21:19 sri ah
21:20 jberger for now I'm just setting the stream timeout to zero
21:20 sri i guess timeouts not working perfectly on windows is acceptable
21:20 sri as long as they don't screw up windows compatibility and work well on unix
21:20 jberger this conversation just reminded me about an outstanding bug
21:27 sri stephan48: perl -E '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 $$!" }'
21:27 sri a realistic oneliner for the simple case
21:29 cpan_mojo Mojo-IOLoop-ForkCall 0.08 by Joel Berger - http://metacpan.org/release/JBERGER/Mojo-IOLoop-ForkCall-0.08
21:56 stephan48 sri: http://paste.stejau.de/?521
21:57 sri perfect :)
21:57 sri stephan48++
21:58 sri stephan48: btw. do the Minion 0.23 tests pass on windows?
21:58 stephan48 tbh.. my opinion on this is, when it works on winschrott nice, when not throw a warning and atleast implement it on unix @ ALRM
21:59 sri well, you've just proven that kind of timeout works on windows
22:02 stephan48 ah cool
22:02 stephan48 "
22:02 stephan48 "Perl with support for quads is required!"
22:02 sri i do wonder if i want it as a core feature though
22:02 stephan48 when running Mango
22:03 stephan48 timeouts for jobs?
22:03 sri ye
22:03 stephan48 mh.
22:04 stephan48 last time i checked only a couple of job servers could do that... f.e. gearman only with some "interface libs",
22:04 jberger stephan48: if you have a chance, can you do one other thing
22:05 stephan48 its a nice feature which i have a use for(aborting the job & displaying an error when it runs to long(f.e. stuck while sending a mail)), but which is also implementable in the job itself
22:05 stephan48 sure
22:05 jberger I'm looking through old bugs, I see this one
22:05 jberger https://github.com/jberger/Mojo-IOLoop-ForkCall/issues/3
22:05 jberger can you clone ForkCall and see if the ex/mojolicious.pl works?
22:06 jberger perl -Ilib ex/mojolicious.pl get /
22:06 stephan48 http://paste.stejau.de/?522 current mojo...
22:06 sri and ewww... perl without support for quads sucks big time
22:07 stephan48 ye whatever they are
22:08 sri getting the feeling that you've got a really shitty perl there
22:08 stephan48 5.14.x
22:08 stephan48 will update tomorrow after work
22:09 sri ok, no surprise there
22:10 stephan48 http://paste.stejau.de/?523 @ jberger
22:14 stephan48 and now good night :)
22:14 sri nn
22:16 sri so, now there are two possible minion features i'm unsure about... results and timeouts
22:17 wingfold_ joined #mojo
22:18 sri timeouts because they have to use SIGALRM, and results because polling is too expensive (latency in general)
23:07 sugar joined #mojo
23:08 cpan_mojo Ado 0.46 by Krasimir Berov - http://metacpan.org/release/BEROV/Ado-0.46 (depends on Mojolicious::Plugin::DSC)
23:34 d4rkie joined #mojo
23:37 basiliscos joined #mojo
23:45 kyshtynbai Can I $c->render_static a file inside a template?
23:59 sri we should do something about Mojolicious::Plugin::Database, it's really not very good

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