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

IRC log for #mojo, 2016-05-21

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

All times shown according to UTC.

Time Nick Message
00:14 trwww joined #mojo
00:32 marty joined #mojo
01:04 marty joined #mojo
01:17 tchaves joined #mojo
01:23 marty joined #mojo
01:23 marty joined #mojo
01:23 tchaves joined #mojo
01:25 marty_ joined #mojo
02:56 noganex_ joined #mojo
02:57 sri oh, spreadshirt changed their terms so i can't have donation shirts anymore :(
02:59 sri they now dictate the commission based on volume sold it seems, which is not good at all for me
03:00 sri on the plus side, the base price for shirts went down a little
03:08 jberger oh that's too bad
03:15 genio Awww, man!  I thought Peaky Blinders was a Netflix show.  I have to wait on the entire season to end before I get it?
03:17 * genio shakes his fist at the BBC
05:09 kaare joined #mojo
05:28 kaare joined #mojo
05:48 kaare_ joined #mojo
06:08 kaare_ joined #mojo
06:12 trwww joined #mojo
06:12 cpan_mojo Mojolicious-Plugin-AssetPack-1.13 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.13
06:16 irqq joined #mojo
06:16 kaare_ joined #mojo
07:01 dod joined #mojo
07:06 dod joined #mojo
07:41 kaare joined #mojo
07:43 odc joined #mojo
07:47 kitsune joined #mojo
08:24 Vandal joined #mojo
09:15 prajith joined #mojo
09:15 prajith_ joined #mojo
09:22 batman Anyone who knows if "chorny" is on IRC? I'm a bit occupied today, but curious regarding
09:22 batman https://github.com/kraih/mojo/issues/962
09:22 batman Btw: I don't think that need fixing. Maybe documented, but not sure if core require it to changed...
09:33 pink_mist I've seen the nick "chorny" on irc ... but I can't for the life of me remember where or when :/
10:21 odc joined #mojo
10:35 amphibulus joined #mojo
11:37 odc joined #mojo
12:07 gizmomathboy joined #mojo
12:10 dvinciguerra joined #mojo
12:33 tchaves joined #mojo
12:44 dod joined #mojo
13:30 bzero left #mojo
13:33 lluad joined #mojo
13:54 irqq joined #mojo
14:10 altair joined #mojo
14:10 altair left #mojo
14:21 odc joined #mojo
14:38 tchaves joined #mojo
15:04 dvinciguerra joined #mojo
15:06 odc joined #mojo
15:10 vicash joined #mojo
15:25 sri anyone else want this to happen? https://github.com/kraih/mojo-pg/issues/20
15:26 odc joined #mojo
15:29 sri also, is tge approach actually right? there's a lot more that could be done https://metacpan.org/pod/DBI#HandleError
15:35 sri using Carp::shortmess seems more sensible, since it leaves most of the work to DBI
15:37 haarg just wrote some simple programs to automate some website interactions.  used Mojo.  definitely enjoying the API.
15:38 haarg UserAgent/DOM/JSON
15:38 sri :)
15:46 thowe joined #mojo
15:54 marty joined #mojo
15:57 marty_ joined #mojo
16:24 tyldis joined #mojo
16:34 odc joined #mojo
16:55 odc joined #mojo
16:58 prajith joined #mojo
17:03 mpapec joined #mojo
17:05 dod joined #mojo
17:06 disputin joined #mojo
17:32 bpmedley haarg++
17:43 odc joined #mojo
17:51 PryMar56 joined #mojo
17:57 jberger sri: i like both patches, yours seems fine
17:57 jberger haarg++
18:15 odc joined #mojo
18:28 odc joined #mojo
18:33 mpapec any pointers to non blocking telnet/ssh client?
18:50 marty joined #mojo
18:51 odc joined #mojo
19:06 jberger mpapec: Mojo has a tcp client
19:07 jberger Mojo::IOLoop::Client
19:22 mpapec jberger: tnx, it may just work as Net::Telnet is using IO::Socket::INET which in turn is covered by IO::Socket::IP
19:23 jberger worth a try, I haven't really done anything like it though
19:25 mpapec I believe this is salva territory
19:27 mpapec btw, I've watched your video https://www.youtube.com/watch?v=UGufeknRHjQ
19:27 jberger that one has aged badly, I need to redo it
19:28 jberger the key points are still very valid
19:28 jberger but the examples don't really work anymore
19:28 jberger and it was finally the presentation that got me to throw away the old presentation library I wrote
19:28 jberger because of the size debacle
19:28 jberger did you at least learn something from it?
19:28 mpapec well, I'm using your forum from github as a reference to nonblocking :)
19:30 jberger cool
19:30 jberger yeah it is still ok
19:30 mpapec https://github.com/jberger/MojoForum
19:30 jberger just that Mango/Mandel are basically dead now
19:30 mpapec I'm more into Redis
19:30 jberger Mango is still maintained but not by us and I get the impression that it is mostly at a legacy code level
19:32 mpapec anyhow, I did some mumbo jumbo with ioloop
19:32 preaction didn't someone ask xdg if MongoDB wanted to take over Mango?
19:32 mpapec https://gist.github.com/anonymous/b8007346f2b7f342ae2ced3fdc59ab22
19:32 mpapec does it make sense?
19:34 jberger appending to remaining "works" but is generally a code smell
19:34 mpapec so I thought
19:34 jberger I typically have gone for straight recursion (or trampolining) when I would have done that
19:35 mpapec do you have some example?
19:36 jberger maybe not exactly what you are after, but I have a few things that are close
19:36 mpapec my intent was to reinvent the while loop
19:36 jberger like this: https://github.com/jberger/Mojo-ACME/blob/master/lib/Mojo/ACME.pm#L44-L60
19:37 jberger or this: https://github.com/jberger/Mojo-FriendFeed/blob/master/lib/Mojo/FriendFeed.pm#L38-L59
19:38 jberger the first (check_all_challenges) has a list of things that it has to check for completion by polling
19:38 jberger I don't like polling but it is part of the protocol I'm working with
19:38 jberger so first it checks all of them
19:40 jberger and note that pending challenges is a filtered view into challenges
19:40 jberger so eventually when pending_challenges is empty then you are done
19:41 jberger but if it is not empty, then wait 2 seconds and trampoline
19:41 jberger trampolining is like recursing except your stack depth doesn't increase
19:41 jberger you queue yourself to be called again later and then leave the subroutine
19:42 mpapec I'll try to reporoduce that
19:43 mpapec although it looks to have more overhead
19:43 jberger its a rather difficult concept to wrap your head around
19:44 mpapec it looks better than promises :)
19:45 jberger some people like promises/futures
19:45 jberger to me, directing callbacks in ways like this makes sense
19:46 mpapec how do I know whether $self->check_challenge_status($_, $delay->begin) for @pending;
19:46 mpapec is executed out of order, or queued
19:46 mpapec like in Redis2?
19:47 jberger what do you mean?
19:47 jberger in this case order doesn't matter, these are essentially indistinguishable
19:47 jberger just a bucket of things to check
19:48 jberger but if order was important, because of the way you call ->begin each time, the results are in the order of @pending
19:49 mpapec ok
19:49 mpapec batman wrote Redis2
19:49 mpapec and I believe there the order matters
19:49 mpapec ?
19:49 jberger I don't know what you mean by order
19:50 jberger order of what?
19:50 mpapec in one step I'm calling few calls on same redis key
19:51 jberger and you want them to happen in order?
19:51 mpapec and order of calls should matter
19:51 jberger then they should be in different steps
19:51 mpapec yes
19:51 jberger each step is things that happen in parallel
19:51 jberger and then the steps happen sequentially
19:51 batman mpapec: telnet/ssh: what I do is to actually use the binaries and use Mojo::IOLoop::ReadWriteFork to communicate with them
19:52 mpapec batman: is here :)
19:52 jberger batman: interesting
19:52 batman mpapec: like this: https://github.com/jhthorsen/mojo-ioloop-readwritefork/blob/master/example/rwf.pl
19:53 batman I only have historical reasons. No idea how the state of the Perl libraries are these days.
19:53 batman Perl libraries = net-telnet/ssh/something/...
19:54 mpapec I've had good experience with https://metacpan.org/pod/Net::OpenSSH
19:54 batman mpapec: Mojo::Redis2 makes sure the the commands and results are returned in the same order.
19:55 batman mpapec: in a non-blocking setting?
19:55 mpapec I guess it can be used as well with Mojo::IOLoop::ReadWriteFork
19:55 mpapec no, plain blocking for Net::OpenSSH
19:56 mpapec but Net::OpenSSH + Mojo::IOLoop::ReadWriteFork?
19:56 mpapec for nonblocking?
19:56 batman Right. That doesn't work for me. I need non-blocking.
19:56 batman No idea how that would work. Not sure what the benefits would be either :/
19:57 mpapec hmmm
19:58 batman "No idea how that would work" = I have no experience with it.
19:58 jberger does Net::OpenSSH provide some nice api?
19:59 mpapec it looks nice, works better than Net::SSH2
19:59 mpapec but only under *nix afaik
20:01 mpapec regarding redis2,
20:01 mpapec if I want to hmset some key
20:01 batman Cool: Net::OpenSSH has open2() and open3()
20:02 batman That should make it simple to integrate with Mojo::IOLoop::Stream I guess
20:02 mpapec :o
20:03 mpapec great
20:03 batman mpapec: very difficult to answer when you write half sentences :/
20:03 mpapec ah, redis..
20:04 mpapec setting hmset, and expire immediately expire for the same key
20:04 mpapec do I have to make two steps for this?
20:05 mpapec or I can chain redis commands?
20:05 mpapec ie.
20:05 batman Chain them all you like inside one step.
20:05 batman But you need to give each of the methods ->begin
20:06 mpapec $c->redis ->lpush($mbox, $msgTxt, $d->begin) ->expire($mbox, $c->cfg->{sesssTimeout}, $d->begin) ->publish($node, "[snode:$snode]", $d->begin)
20:06 mpapec no good
20:06 mpapec $c->redis
20:06 mpapec ->lpush($mbox, $msgTxt, $d->begin)
20:06 mpapec ->expire($mbox, $c->cfg->{sesssTimeout}, $d->begin)
20:06 batman Or you can use https://metacpan.org/pod/Mojo::Redis2::Bulk
20:06 mpapec ->publish($node, "[snode:$snode]", $d->begin);
20:07 mpapec are those command executed out of order?
20:07 mpapec does Mojo::Redis2::Bulk work with publish?
20:07 batman mpapec: I don't understand what you're saying. Sorry.
20:08 batman Please make an issue with a failing test/example code if you think something is wrong.
20:08 mpapec is it possible that publish is executed before lpush?
20:08 batman mpapec: not unless there's a really bad bug.
20:09 mpapec ok, tnx. That's what I wanted to find out.
20:09 bpmedley Does Mojo::UserAgent work well in Windows 7?
20:10 batman mpapec: but order gets messed up if you forget to pass on $delay->begin to one of the methods.
20:11 mpapec batman: ok, that is not a problem
20:12 mpapec just that jberger mentioned that I have to make separate steps
20:12 batman jberger: about RWF: ssh/telnet is the whole reason I wrote it :)
20:12 batman Or because the pure perk libraries did not behave as I wanted at the time.
20:13 batman s/perk/Perl/
20:13 mpapec in order to make sure these calls are in particular order handed to redis server
20:14 batman mpapec: redis server is blocking, so they can't be handled out of order in the server.
20:15 mpapec true
20:36 asarch joined #mojo
20:40 sri preaction: i think xdg offered to take over Mango before odc stepped up
20:41 sri but i was never very keen on giving MongoDB inc my work for free
20:41 preaction fair enough
20:44 sri preaction: why did you ask?
20:44 preaction just wondering, as jberger mentioned it being in maintenance-only mode
20:45 sri yea, keeping up with mongodb's mess of an api is very expensive
20:46 sri one of the big reasons i gave up on mongodb
20:46 sri even back then it became obvious that they want driver development so expensive only mongodb inc could possibly afford it
20:47 preaction right, though i've been hearing they're trying to correct that, and afaict it's xdg's job to keep up with the mess they're working through. personally, i think it'll be a few years before they finally clear through the mess and find a useful niche again
20:47 preaction was it malicious? or just incompetence?
20:47 sri both i'm sure
20:50 sri hehe, back in the days i actually tried to tell them how they could do just that
20:51 sri small stuff, like turning mongos into a generic mongodb proxy
20:52 sri but they had to push all the failover stuff into the client
20:53 sri <3 postgresql
20:53 marty joined #mojo
20:55 mpapec how does $self->$cb() actually work
20:55 mpapec AUTOLOAD?
20:56 preaction no. perl allows you to deref a subref onto an object
20:56 preaction it's equivalent to: $cb->( $self )
20:56 mpapec cool
20:59 mpapec I'll try to find relevant perldoc
21:01 sri one thing about postgresql i find puzzling though
21:01 preaction mpapec: perldoc perlobj "Subroutine references as methods"
21:01 sri why is there no kick ass book?
21:02 sri just a bunch of meh stuff from packt
21:03 mpapec found on SO :)
21:03 mpapec http://stackoverflow.com/a/8126478/223226
21:04 mpapec http://www.wrox.com/WileyCDA/WroxTitle/Beginning-Perl.productCd-1118013840.html is ok
21:05 mpapec but there is no "Mastering perl" which was advanced back in days
21:05 Adurah https://i.imgur.com/mPetdTd.png Haha.
21:24 dvinciguerra joined #mojo
21:24 bpmedley Anyone use Mojo::UserAgent very much in Windows?
21:27 Adurah I... use it when needed?
21:28 pink_mist I think it's the "in windows" part that was the main point of his query
21:28 Adurah Why I responded, heh.
21:28 bpmedley Adurah: Cool  What version(s)?
21:28 pink_mist well sure, but your response seemed to indicate you didn't understand why he would ask
21:28 Adurah Windows 7.
21:29 bpmedley Awesome, thx.
21:29 Adurah It was more that I don't use it that often, a non-commital answer.
21:37 kaare joined #mojo
21:37 lluad joined #mojo
21:42 good_news_everyon joined #mojo
21:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vr23m
21:42 good_news_everyon mojo/master 60dda3c Sebastian Riedel: more diverse examples
21:42 good_news_everyon left #mojo
21:47 cpan_mojo Mojo-Pg-2.27 by SRI https://metacpan.org/release/SRI/Mojo-Pg-2.27
21:49 pink_mist yay, error message improvement \o/
22:05 marty joined #mojo
22:32 Adurah bpmedley, so... what do you need done Win7-wise?
22:40 gizmomathboy joined #mojo
22:50 marty joined #mojo
22:50 marty joined #mojo
22:52 tchaves joined #mojo
23:43 sri curious how minion has more stars on github, but Mojo::Pg has more +1's on metacpan
23:45 marty joined #mojo
23:54 good_news_everyon joined #mojo
23:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vr2c3
23:54 good_news_everyon mojo/master cd64844 Sebastian Riedel: grants did not work out
23:54 good_news_everyon left #mojo
23:56 sri with bountysource there's a differenct system in place that doesn't even require a core dev to get involved, anyone could just open an issue and put a bounty on it

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