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

IRC log for #mojo, 2015-07-10

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

All times shown according to UTC.

Time Nick Message
00:00 sri CandyAngel should have done better research ;p
00:00 CandyAngel I think you mean you should have. You said "but no-one else does that"
00:01 CandyAngel But thanks, now I feel dirty that only Microsoft agrees with me
00:01 CandyAngel :P
00:01 sri i use absolutes to make people want to prove me wrong :)
00:01 sri (and of course i wasn't the one who wanted the feature ;p)
00:02 * CandyAngel shrugs
00:02 Grinnz saying something wrong: the most effective way to get people to provide facts on the internet :P
00:04 lluad [citation needed]
00:04 CandyAngel Unfortunately, I don't accept "but no-one/everyone else does it that way" as a argument anyway (appeal to majority)
00:05 * sri sets lluad on fire
00:06 CandyAngel Because even if I had said "Well microsoft does it!" you could just turn around and say "ohhh. one does, most don't"
00:06 Grinnz CandyAngel, well one is better than none, for precedent and stealing ideas
00:06 sri it would at the very least have made me curious
00:07 sri and the microsoft docs should have been a good source for real world use cases
00:07 CandyAngel Hahaha, microsoft docs
00:07 CandyAngel Not if they are like their Visual Basic docs
00:08 CandyAngel Ohai, I'm the tooltip for this function: function(arg, arg, arg)
00:08 sri they also have an expiration date for jobs, that's funny
00:08 CandyAngel Code that doesn't work
00:08 CandyAngel function(arg, arg, arg)
00:08 CandyAngel Code that does work
00:08 CandyAngel function arg, arg, arg
00:08 Grinnz function argh! argh! argh!
00:08 CandyAngel Grinnz: Exactly
00:09 CandyAngel Not only can you record VBA that Excel can't execute, the tooltips will tell you to put in parentheses around argument lists when you have to *not* put them there
00:09 CandyAngel But you do in some places.. and in other places, they are optional
00:10 Grinnz hey, it's not easy, being backwards compatible with everything ever :P
00:10 CandyAngel I wouldn't mind if the tooltip matched what you have to do :|
00:11 CandyAngel But their stupid software literally tells you to do it in a way that doesn't work
00:12 CandyAngel Excel is to me in Windows what systemd is to me in Linux
00:12 CandyAngel Oh, I see you have mounted a disk. lolno *umounts it*
00:12 neilhwatson joined #mojo
00:14 CandyAngel Anyways
00:14 CandyAngel sri: I spend my days at work around people who don't think there is an ozone layer
00:15 CandyAngel I have short-circuit triggers to stepping out of debates
00:15 CandyAngel And "but that's what everyone else does" is one of them :P
00:28 * sri really hates celery... that job queue is a mess
00:30 sri interesting how minion shows up on page 3 when googling for "job queue"
00:31 Ptolemarch joined #mojo
00:43 * mst wasted today trying to understand the various fluxish things atop react
00:43 mst the answer seems to be "hahahahahaha roll a d6 and hope"
00:45 lluad mst: http://cube-drone.com/comics/c/relentless-persistence was todays "Yup, full of truthiness"
00:45 mst right
00:45 mst I'm going back to angular for the moment. at least I know how it sucks and it has a cohesive ecosystem
01:00 Ptolemarch joined #mojo
01:51 cstamas joined #mojo
02:04 jberger React to my eyes looked like ETOOMUCHMAGICK
02:04 * jberger goes back to beach
02:04 sri isn't react already uncool?
02:04 sri not that i ever liked this whole jsx stuff
02:05 jberger M
02:05 jberger jsx was a large part of my problem
02:06 jberger Rivets.js is maximum underkill
02:07 * jberger is really going back to the beach now
02:07 mst jberger: don't make me k-line you
02:07 mst sri: you have to admit, it might be for his own good :)
02:08 sri was about to say
02:16 noganex joined #mojo
02:18 mattastrophe joined #mojo
02:43 tempire React is the only reasonable js framework
02:44 tempire flux is pretty abstract. definitely a v1 concept.
02:44 Ptolemarch joined #mojo
02:44 * tempire is excited about the release of relay
03:44 dustinm joined #mojo
03:52 davido___ joined #mojo
04:24 melo joined #mojo
04:24 sh4 joined #mojo
05:07 kaare joined #mojo
06:00 batman riotjs ftw :)
06:23 dotandimet joined #mojo
06:38 berov1 joined #mojo
06:47 dod joined #mojo
06:53 dod joined #mojo
07:16 trone joined #mojo
07:26 AndrewIsh joined #mojo
07:28 Vandal joined #mojo
07:46 mtths joined #mojo
07:56 hshong joined #mojo
08:05 jontaylor joined #mojo
08:41 ans joined #mojo
08:47 dotandimet joined #mojo
09:05 punter joined #mojo
09:31 berov joined #mojo
09:35 bin_005 joined #mojo
10:09 berov joined #mojo
10:25 bpmedley joined #mojo
10:33 meshl joined #mojo
10:39 meshl joined #mojo
10:51 jontaylor joined #mojo
10:52 Amurita joined #mojo
11:00 PotatoGim^Home joined #mojo
11:06 neilhwatson joined #mojo
11:13 eitz joined #mojo
11:24 wingfold joined #mojo
12:03 dvinciguerra joined #mojo
12:11 meshl joined #mojo
12:16 kaare joined #mojo
12:30 Mikey joined #mojo
13:09 gryphon joined #mojo
13:15 ajr_ joined #mojo
13:16 ajr_ joined #mojo
13:16 dp_ joined #mojo
13:18 dotandimet joined #mojo
13:28 mattastrophe joined #mojo
13:38 vytas joined #mojo
13:44 vytas joined #mojo
13:50 vytas joined #mojo
14:07 ashimema feeling dim..
14:07 ashimema how would I go about replacing Mojo::Log with Mojo::Log::JSON in my Mojolicious app
14:08 ashimema looking at writing a plugin to then dispatch those to a greylog instance.
14:09 jontaylor ashimema: in main application class do
14:09 jontaylor $self->log->unsubscribe('message'); $self->log->on(message => sub { ReplacementClass::handle_message_event($self->log(), @_) });
14:10 ashimema aha.. thanks jontaylor.. I thought it might be somthing that simple
14:24 absolut_todd joined #mojo
14:27 batman sri: how did you get logging for #mojo to web? would like to have the same feature for #swagger ...
14:46 disputin joined #mojo
14:57 PryMar56 joined #mojo
14:59 avenj joined #mojo
15:16 jontaylor Getting an error with mojo::pg which is making me feel like an idiot
15:17 jontaylor Can't call method "execute" on an undefined value at /Users/jon/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/Mojo/Pg/Database.pm line 82.
15:17 jontaylor which is right after it created the $sth, by recalling a cached prepared statement
15:19 ans joined #mojo
15:21 pink_mist did you check $pg->db->dbh->errstr?
15:22 pink_mist do you have RaiseError set?
15:23 pink_mist have you held onto the $db for a long time? you should almost always use $pg->db-> rather than $db->
15:24 jontaylor the errstr is undefined, assuming the correct way to fetch it after a fatal error is to put the offending code in an eval first
15:24 jontaylor I always chain calls through the Mojo::Pg object itself
15:25 pink_mist I think it may be time for you to show some code
15:26 jontaylor yup
15:43 lluad joined #mojo
16:08 _dave_ If you say Mojo::IOLoop->delay(sub{ ... }) .. does the return value from the sub get used?
16:12 sh4 joined #mojo
16:19 pink_mist ... no, I shouldn't think so
16:20 _dave_ I'm trying to understand the Mojo::Pg "select all rows non-blocking" example...how does the second callback get $results?
16:23 pink_mist _dave_: https://metacpan.org/pod/Mojo::IOLoop::Delay#begin
16:28 _dave_ well that's the thing, the query callback gets ($db, $err, $results) from the Mojo::Pg::Database documentation
16:28 dod joined #mojo
16:29 _dave_ but in the Mojo::Pg doc, the second sub gets ($delay, $err, $results) ... what happens to $db?
16:29 sri keep reading
16:29 _dave_ and why wouldn't it be ($delay, $err, $db, $err, $results)? .. .oh
16:29 _dave_ keep reading which one?
16:29 sri the link
16:29 purl the link is that people always say 'use hashes instead'
16:29 pink_mist if you look at the example, $db->query() gets a callback that it calls with the results when it's done. it gets this callback from the return value of $delay->begin. as you can see in the documentation I linked, the callback in question will supply its arguments to the next step, aka the sub where you see $results being defined.
16:30 _dave_ ahhh the example in Mojo::Pg has "Mojo::IOLoop->delay" but you pointed me to "Mojo::IOLoop::Delay"
16:31 pink_mist ...
16:31 sri http://mojolicio.us/perldoc/Mojo/IOLoop#delay
16:31 sri same thing
16:31 pink_mist the example in Mojo::Pg has $delay->begin. $delay is a Mojo::IOLoop::Delay. hence that's the place ->begin is documented.
16:32 _dave_ gotcha I see it now
16:33 _dave_ so $err comes from the $db->query callback just to make sure I understand this?
16:34 _dave_ offset of 1, etc
16:35 pink_mist set RaiseError and catch any errors instead.
16:35 berov joined #mojo
16:35 jontaylor pink_mist: I spotted my mistake from earlier and I now I feel like a complete idiot because I just burned 2 hours on it
16:35 sri pink_mist: doesn't work
16:35 purl Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Is it making faces at you? Does it want more money? Is it screwing your partner? Please be specific!
16:35 _dave_ O.o
16:35 berov joined #mojo
16:35 jontaylor $pg->database->db->query->($query, @args);
16:36 jontaylor ignore that database bit in there
16:36 pink_mist sri: 0_o Mojo::IOLoop->singleton()->catch(...?)
16:36 sri Mojo::Pg can't throw errors for non-blocking queries
16:36 jontaylor that extra -> after query, which I just couldn’t spot damnit
16:36 pink_mist oh, damn
16:37 sri non-blocking always requires a $err argument
16:37 pink_mist oh I see
16:37 sri since everything actually happens inside the event loop (a different context)
16:37 _dave_ so where does $err come from?
16:37 _dave_ I probably shouldn't just ignore it right? :)
16:37 sri you'd just kill the event loop, unable to catch the exception
16:38 sri so, Mojo::Pg catches all exceptions for you, and passes them along as $err
16:38 _dave_ ah
16:38 _dave_ what if two errors happen?
16:38 sri for the record, RaiseError is actually mandatory for Mojo::Pg
16:39 sri how would two errors happen?
16:39 lluad It'll bail on the first error and the second won't happen.
16:39 _dave_ ah ok thanks
16:39 berov left #mojo
16:40 sri this is where the magic happens https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg/Database.pm#L139
16:41 sri everything runs inside an io watcher
16:41 sri which is attached to the postgres socket
16:42 Grinnz magic?
16:42 purl somebody said magic was simpler than blessing or programmer for "I don't understand this"
16:43 Grinnz purl, magic is also http://www.franksfiles.com/sites/default/files/franks_uploads/magic.gif
16:43 purl okay, Grinnz.
16:43 _dave_ Mojo is becoming less magic for me :)
16:43 _dave_ as defined by "sufficiently advanced technology"
16:43 _dave_ that's a good thing before anyone trips
16:43 Grinnz so you're saying we should add more magic!
16:44 _dave_ well if you want to advance the tech further, by all means
16:45 _dave_ good luck tho, sri seems to be no-nonsense about unnecessary advancement
16:45 sri http://i43.tinypic.com/2zh2v6u.jpg
16:47 _dave_ nonsense => non-sense => inability to use your senses to perceive a thing?
16:47 Grinnz now that's just nonsensical
16:54 dotandimet joined #mojo
17:13 berov joined #mojo
17:16 Dandre left #mojo
17:16 Dandre joined #mojo
17:34 jontaylor joined #mojo
17:49 punter joined #mojo
17:52 Kogurr joined #mojo
18:05 trone joined #mojo
18:07 ajr_ joined #mojo
18:45 sri 🍺
18:48 dod joined #mojo
18:50 mst
19:09 mattastrophe joined #mojo
19:14 _dave_ hm postgres...upsert...before 9.5...egad
19:19 mst oh yes.
19:20 Ptolemarch joined #mojo
19:30 Onigiri Yeah, it'll be neat.
19:31 Onigiri I'm just in the middle trying to upgrade to 9.4 to get range support.
19:31 Onigiri but mah uptime is all I'm hearing from my team :/
19:31 Onigiri Well, not that exactly, but close enough.
19:48 ajr_ joined #mojo
20:00 bin_005 joined #mojo
20:10 Kundun joined #mojo
20:10 melo joined #mojo
20:12 bin_005 joined #mojo
20:25 dotandimet joined #mojo
20:26 absolut_todd joined #mojo
20:27 kaare joined #mojo
20:27 disputin joined #mojo
21:04 sri the DBIx::Lite api is actually not bad
21:06 sri if i wasn't into raw sql now, i'd totally make a version of it for Mojo::Pg with optional callbacks for non-blocking operations
21:09 bin_005 joined #mojo
22:18 gryphon joined #mojo
22:21 Ptolemarch joined #mojo
22:22 Ptolemarch joined #mojo
22:38 mattastrophe joined #mojo
22:54 bin_005 joined #mojo
23:28 jberger Zomg, that MAGIC gif is tempire!
23:31 sri go back to the beach!
23:32 mst the fun thing is that his private convos instance has a stable IP
23:32 mst I could fix this with one operserv gline command ...
23:33 mst jberger: basically, the current situation is summed up by http://trout.me.uk/areyousure.jpg
23:33 mst except I'm not nearly as cute as the cat.

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