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

IRC log for #mojo, 2013-11-20

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

All times shown according to UTC.

Time Nick Message
00:01 btyler joined #mojo
00:18 sanya_com_ua joined #mojo
00:40 dsteinbrunner joined #mojo
00:42 ronsavage joined #mojo
00:56 sanya_com_ua joined #mojo
01:00 sanya_com_ua joined #mojo
01:00 sri holy shit, almost human is actually really good scifi!
01:01 sri reminds me of blade runner and fringe
01:15 asarch joined #mojo
01:29 gryphon joined #mojo
01:33 ka2u joined #mojo
01:35 d4rkie joined #mojo
01:41 d4rkie joined #mojo
01:42 dsteinbrunner joined #mojo
01:55 jb360 joined #mojo
02:08 laouji joined #mojo
02:18 laouji_ joined #mojo
02:35 duncanthrax2 joined #mojo
02:38 dsteinbrunner joined #mojo
03:20 hotsnow joined #mojo
03:22 laouji joined #mojo
04:10 preflex_ joined #mojo
04:26 hotsnow joined #mojo
04:49 d4rkie joined #mojo
04:55 hotsnow joined #mojo
05:05 ka2u joined #mojo
05:23 ronsavage joined #mojo
05:24 laouji joined #mojo
05:35 keedi joined #mojo
05:43 keedi joined #mojo
06:09 laouji_ joined #mojo
06:13 laouji joined #mojo
06:57 beyondcreed joined #mojo
07:21 laouji_ joined #mojo
07:35 dotandimet joined #mojo
07:36 laouji joined #mojo
07:39 iSlug joined #mojo
07:40 dotandimet mst: have you seen this? http://youtu.be/Bw1dgUS27uE?t=14m38s someone explaining asynchronous programming in terms of getting a beer in a pub. English pub = blocking, American bar = non-blocking.
07:55 basiliscos joined #mojo
08:06 ryozi joined #mojo
08:16 kwa I had to stop watching fringe after the first couple of episodes because of the lead female's idiosyncrasies. I've been told I should have stuck with it. (Can't remember what her idiosyncrasies were, but they were annoying :))
08:20 trone joined #mojo
08:24 dod joined #mojo
08:26 dpetrov_ joined #mojo
08:44 bowtie_ joined #mojo
08:44 batman sri: i'm thinking about releasing my Mojo::IOLoop::ReadWriteFork module, but i think you had some comments on the name..?
08:45 batman or was it Mojo::IOLoop::Run maybe?
08:47 odc batman, you're making a replacement for MojoX::Run?
08:52 batman odc: not sure if i can call it an replacement.
08:52 dod joined #mojo
08:52 batman ReadWriteFork has a super simple api compared to MojoX::Run and it inherit from EventEmitter instead of having a lot of callbacks
08:53 odc all the better :)
08:53 batman could be... but i suck at ipc, so mine might be buggy ;)
08:53 batman though i've been using it in production for quite some time
08:54 iSlug joined #mojo
08:55 themage joined #mojo
08:58 odc this looks interesting: https://metacpan.org/pod/Nginx
08:59 alnewkirk joined #mojo
09:03 marcus odc: Agree, that looks great
09:04 rem_lex joined #mojo
09:07 odc not very easy to use though
09:28 batman odc: https://metacpan.org/pod/release/JHTHORSEN/Mojo-IOLoop-ReadWriteFork-0.01/lib/Mojo/IOLoop/ReadWriteFork.pm
09:32 S joined #mojo
09:33 odc batman, nice! a bit simplistic but at least it looks easy to use
09:34 batman "a bit simplistic" <-- is that a bad thing?
09:36 odc hm maybe not. I was thinking that it would be nice to be able to pass a context value to the callbacks, but i realize now i might not need it
09:40 denis_boyun joined #mojo
09:40 batman :)
09:41 odc batman, upvoted!
09:41 batman thanks!
09:42 batman now i just need to fix the failing test :P
09:42 odc downvoted!
09:43 batman :P
09:45 odc batman, a cool feature for v0.2 would be 'program => \&coderef'
09:45 batman i've been thinking about it, but i'm really not sure if i bother to add stuff i never use
09:45 batman but i would take a pull request
09:46 odc fair enough
09:47 batman anything else? i'm making a new release now...
09:48 odc uhh, maybe add an example? with a mojo::lite app?
09:49 Vandal joined #mojo
09:49 batman i was hoping the SYNOPSIS would be the example
09:50 odc yes, but i think the hardest part for a noob like me will be to integrate it properly in my mojo app
09:50 batman ok...
09:50 odc you asked for it :D
09:51 batman :)
09:52 odc i remember when i started use mojolicious, it took me some time to discover the $self->render_later...
09:52 batman right
10:01 laouji joined #mojo
10:03 themage joined #mojo
10:07 tianon joined #mojo
10:13 themage joined #mojo
10:21 fhelmber_ joined #mojo
10:26 psimanx1 joined #mojo
10:31 batman odc: https://github.com/jhthorsen/mojo-ioloop-readwritefork/blob/master/example/tail.pl ?
10:33 odc ah nice
10:33 odc typo on line 6
10:34 batman please correct me
10:34 batman ah "server" ? :)
10:34 odc does it really work? don't you need to call $self->rendered or self->resume after write_chunk?
10:35 batman it works for me
10:35 odc i guess i'll never really understand how mojo works :/
10:36 batman hehe. i'm making a new release now.
10:36 odc ok
10:36 batman i was thinking about adding a websocket example, but i'm saving that for next time :)
10:36 Vandal joined #mojo
10:37 batman so..instead of adding this to the SYNOPSIS, i just added a link to github
10:37 psimanx1 batman: got an issue in installing Mojo::Redis - got a failing test?: http://pastebin.com/a5A2TH2A
10:38 batman psimanx1: yes. install it with "cpanm -n Mojo::Redis" for now :(
10:38 psimanx1 Ahh - known issue then?
10:38 batman yup. got a gazillion failing tests from the cpantesters :(
10:38 batman don't have a known fix though...
10:38 psimanx1 Great - will do.  Thx!
10:39 batman not an unknown fix either....
10:39 psimanx1 kk
10:43 denisboyun joined #mojo
10:50 denisboyun joined #mojo
10:54 laouji_ joined #mojo
10:55 punter joined #mojo
11:00 abra joined #mojo
11:05 batman i hate redis.t. i haven't written it :(
11:05 batman it's a complete mess
11:05 marcus I didn't write it either
11:05 marcus We inherited it
11:05 batman i know
11:06 marcus Maybe we should just scrap it
11:06 batman no... the sucky part is that i need to fix the bug, then refactor it.
11:06 batman would be nice to do it the other way around ;)
11:06 marcus Why not just write better tests?
11:06 marcus *then* fix the bug?
11:07 batman because i don't understand the bug
11:09 batman marcus: btw: i'm working on a fix, so don't do any changes now :)
11:14 ver joined #mojo
11:18 batman i think the test is invalid :(
11:22 batman marcus: ok. i'm rewriting the test
11:25 batman marcus: like $curr_stream->once( ... # Wait both commands to come ?!
11:25 marcus batman: I def. won't
11:25 batman how don't understand how "once" and "both" makes any sense
11:25 batman how = i
11:26 batman ok if i just make another test that looks a bit like this one?
11:26 marcus yes
11:26 batman sweet!
11:39 denis_boyun joined #mojo
11:40 nicomen guys, when you create tests, checking for json structure is nice and easy, but many times I want to for instance check that one part of a json structure, corresponds to another (I guess the same goes for html/css-selector values), is there any nicer way than to split up creating new json pointers based on $t->tx->res->body etc?
11:53 iSlug joined #mojo
11:58 maxhq joined #mojo
11:58 batman marcus: https://github.com/marcusramberg/mojo-redis/blob/master/t/mocked.t # what do you think?
12:08 athenot joined #mojo
12:08 psimanx1 hmm - something breaks my app using Mojo::Redis between version 0.9912 (works) and 0.9913 (broken).
12:09 batman "something" is not very helpful
12:09 psimanx1 Nope - trying to figure out where the issue is - at least got it figured to a version of Mojo:Redis now
12:10 psimanx1 I always assume it's my code when I hit things like this!
12:12 D4RK-PH0ENiX joined #mojo
12:15 batman Try to detect invalid stream state # could be because of this change
12:15 batman if that is the case, then it is probably still your code...
12:15 tianon joined #mojo
12:20 hrupp joined #mojo
12:20 batman marcus: i'm going to make a new release now.
12:20 marcus batman: OVER MY DEAD BODY!
12:20 marcus j/k ;)_
12:20 batman do you have time to look at the test?
12:21 marcus batman: looks a lot more sane
12:21 marcus do eeet
12:21 * batman willdoeet
12:21 marcus batman++
12:23 batman POSTing upload for Mojo-Redis-0.9920.tar.gz to https://pause.perl.org/pause/authenquery
12:23 batman \o/
12:23 batman the t/mocked.t could *maybe* be made into Test::Mojo::Redis ...
12:24 batman psimanx1: please try to install 0.9920 when it's available on cpan
12:24 psimanx1 ok will do.
12:24 batman it won't fix whatever-bug-you-got now though
12:24 psimanx1 batman: This is the code in question by the way: http://pastebin.com/hQNTQ74H
12:25 batman what? do we support sock?
12:25 psimanx1 Run it against 0.9912 and it pushes into redis.  install 0.9913 and it doesn't do anything
12:25 batman haha
12:25 psimanx1 :)
12:25 batman yes. that shouldn't ever have worked :(
12:25 batman $redis is going out of scope
12:26 batman you need to keep it around long enough
12:26 psimanx1 so block using the io loop delay?
12:26 batman app->helper(redis => sub { $redis };  ... $c->redis->execute(...);
12:26 d4rkie joined #mojo
12:26 batman yes, that is also possible --- but then it will be blocking
12:27 psimanx1 yeah - don't mind it blocking at that point in the app.
12:27 batman if you can - make everything non-blocking
12:27 batman just create $redis in YourApp::startup() instead
12:27 psimanx1 ok - will give that a try
12:28 batman i always do something similar to the helper i pasted above...
12:29 batman i keep most of my models around as either helpers or attributes on $c->app
12:32 psimanx1 batman: That worked!  Perfect!  Thanks for the help.
12:32 batman you're welcome :)
12:33 psimanx1 Now off to revisit all my other code to do the same.. :)
12:34 batman i'm actually happy for breaking your apps. that was an important bugfix :)
12:34 batman i think 0.9920 is available now...
12:34 dsteinbrunner batman: it installed for me
12:35 batman \o/
12:36 psimanx1 Yep - installed for me ok also!  Nice job!
12:38 batman sweet!
12:49 dod joined #mojo
12:51 mire joined #mojo
13:10 denisboyun joined #mojo
13:29 batman i really like peer review. Mojo::Redis and Mandel gets better because people want them to :)
13:29 batman open source kick ass.
13:46 dotan joined #mojo
13:53 dvinciguerra joined #mojo
13:53 sawtooth joined #mojo
14:04 btyler joined #mojo
14:06 arthas joined #mojo
14:29 mire joined #mojo
14:36 sh3 joined #mojo
14:36 bluescreen joined #mojo
14:54 btyler joined #mojo
15:07 asarch joined #mojo
15:10 dotan joined #mojo
15:26 Vandal joined #mojo
15:35 tholen42 joined #mojo
15:38 maxhq joined #mojo
15:39 maxhq joined #mojo
15:42 gryphon joined #mojo
15:52 punter joined #mojo
16:05 DrForr left #mojo
16:19 dvinciguerra joined #mojo
16:19 fhelmbe__ joined #mojo
16:25 odc has someone tried MojoX::AIO here?
16:29 sri doesn't work anymore, needs to be updated for mojolicious 2.63+
16:31 sri using IO::AIO is trivial anyway though
16:32 odc hm right
16:33 sri use IO::AIO qw(poll_fileno poll_cb); Mojo::IOLoop->singleton->reactor->io(IO::Handle->new_from_fd(poll_fileno) => \&poll_cb);
16:33 sri something like that
16:33 purl something like that is, like, the basic gist of what we have going forward. Except I have to make sure there is oversight on the 'mst trained bastard' program
16:37 tianon mst has a program for training bastards? :)
16:59 mire joined #mojo
17:08 delias joined #mojo
17:18 dotan joined #mojo
17:19 nicolaas joined #mojo
17:23 beyondcreed joined #mojo
17:37 cfedde joined #mojo
17:51 themage1 joined #mojo
17:58 odc sri, the command you gave me for AIO work with the Poll reactor, but not with EV
17:58 cfedde joined #mojo
17:58 odc got any idea why?
18:35 cfedde joined #mojo
18:42 cfedde joined #mojo
18:47 cfedde joined #mojo
19:06 punter joined #mojo
19:13 Mike-PerlRecruiter_ joined #mojo
19:18 hesperaux joined #mojo
19:21 mgrimes joined #mojo
19:24 mgrimes Hi all. I'm having trouble with default values for stash variables. It appears that anything set in defaults() will override later settings in flash().
19:26 mgrimes I'm just trying to include a $message, but only set it when needed. Without putting it in defaults(), I get a undeclared error.
19:29 punter joined #mojo
19:44 punter joined #mojo
19:56 marty joined #mojo
20:05 punter joined #mojo
20:13 cfedde joined #mojo
20:16 tianon you can use the stash() helper in your template
20:16 tianon you can also use defaults, and then stash()
20:16 tianon flash is for passing params to the *next* request, not the current one
20:22 punter joined #mojo
20:28 mgrimes Thanks tianon, but I'd like to set the $message in POST handler, then redirect to a GET.
20:28 tianon then you want to use the flash helper in your template to retreive the flashed message
20:33 mgrimes ah! of course. It's been a while since I've gotten to use Mojolicious. Forgot about the template helpers.
20:34 mgrimes Thanks tianon++
20:34 tianon :)
20:35 cooper joined #mojo
20:36 lukep joined #mojo
20:37 punter joined #mojo
20:42 dotandimet joined #mojo
20:54 punter joined #mojo
21:04 mire joined #mojo
21:05 denis_boyun__ joined #mojo
21:23 marty joined #mojo
21:49 exonity joined #mojo
21:49 exonity Hello!
21:50 exonity Currently I am writing a IOLoop connection, which works good, but now i have the problem, that it is possible, that the connection is timing out
21:51 exonity when this happens,  $stream->on(timeout => sub { my $stream = shift; ... }); is called
21:51 exonity is there any possibillity, to restart this loop?
21:51 exonity -l
21:52 exonity or has someone a better idea?
21:59 punter joined #mojo
22:00 punter I completed my Ubic module for Hypnotoad: https://metacpan.org/pod/Ubic::Service::Hypnotoad
22:00 punter I know another one exists (Toadfarm or something like that).
22:01 punter but that one is more complicated, I think
22:04 denis_boyun joined #mojo
22:17 cfedde joined #mojo
22:25 btyler joined #mojo
22:28 cfedde joined #mojo
23:04 gryphon joined #mojo
23:04 rem_lex|pivo joined #mojo
23:26 sivoais joined #mojo
23:48 KindTwo joined #mojo
23:49 asarch joined #mojo
23:49 ronsavage joined #mojo

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