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

IRC log for #mojo, 2017-12-31

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

All times shown according to UTC.

Time Nick Message
00:37 zivester joined #mojo
01:13 karjala_ joined #mojo
01:55 mohawk jberger, i mentioned your stackoverflow in #dbix-class:
01:55 mohawk "this may open a can of worms but hopefully not! my googling on this only gave DBIx::Async plus some blog posts (esp https://softwareengineering.stackexchange.com/questions/304520/when-should-i-use-perls-dbixclass/304532#304532). is there any plan to make DBIC work async? steps might be 1) add to DBIx::Class::Storage::DBI::_execute so last arg if subref is a callback. 2) make select_p, update_p etc
01:55 mohawk that would return a then-able. thoughts?
02:56 mohawk_pts joined #mojo
02:57 ilbot2 joined #mojo
02:57 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:17 jamesaxl joined #mojo
03:28 zivester joined #mojo
04:13 jberger mohawk i know some of the people from Milwaukee.pm have demonstrated DBIC working async
04:13 jberger They use some private methods to do it
04:13 jberger Doesn't help that DBIC management is so up in the air
04:14 jberger (still)
04:32 mohawk_pts jberger, it doesn't
04:32 mohawk_pts jberger, have they blogged about how they did it, or is it (shh) secret?
04:42 mohawk_pts btw, Promise->all PR: https://github.com/kraih/mojo/pull/1177
04:49 mohawk_pts sri, looks like making `render` handle eg (json => $promise) will be a bit tricky as is now, because M::Renderer::render doesn't have separate stages for identifying which action to take, then taking it. what i'd most like to do is hook in between those stages, and whenever the "what to render" is a promise, intervene
05:04 dboehmer joined #mojo
05:52 vinnix joined #mojo
07:08 Vandal joined #mojo
07:12 jberger mohawk_pts I don't think I have my logs from back that far but watch for Steve to join, mcsnolte
07:23 mohawk jberger, great, thanks
07:23 mohawk or could you pm me his email?
07:29 mohawk nevermind, that's his PAUSE id :-)
07:32 mohawk i have emailed his @cpan id!
08:02 dod joined #mojo
08:08 dod joined #mojo
10:53 trone joined #mojo
11:24 jnbek joined #mojo
11:59 sri mohawk: didn't you say you wanted to disallow $promise->all(@promises)?
11:59 sri well, the inconsistency with ->race is a reason to reject instantly
12:00 sri style things, you added an example to the method signature section
12:03 sri you're not testing the case where only non-promise values are passed to ->all
12:03 sri non-promise/non-thenable
12:03 sri i have a feeling you borked that
12:04 sri then there's the whole _clone thing
12:04 sri https://github.com/kraih/mojo/pull/1177/files#diff-27bd5e0ace07b04f2ba7f5e7ec0115c1R10
12:04 sri why keep _clone if Mojo::Promise->new is allowed too now?
12:05 sri either all resulting promises are tied to a dynamic ioloop, or all are tied to the global default ioloop
12:05 sri inconsistency is a total no-go
13:53 sh14 joined #mojo
13:56 sri honestly, i wouldn't mind if promises only worked for the global ioloop, but it's kinda messy to deprecate all that stuff now
13:57 sri you really should have brought that up before the release
13:58 zivester joined #mojo
14:00 karjala_ joined #mojo
14:16 ghenry joined #mojo
14:31 sh14 joined #mojo
14:42 mrallen1_ joined #mojo
14:45 mgrimes_ joined #mojo
14:45 a6502_ joined #mojo
14:46 anon_ joined #mojo
14:46 trone_ joined #mojo
14:46 genio_ joined #mojo
14:46 eday_ joined #mojo
14:46 ranguard_ joined #mojo
14:46 vinnix_ joined #mojo
14:46 romel_ joined #mojo
14:46 michael_ joined #mojo
14:48 dotan_convos joined #mojo
14:48 jamesaxl joined #mojo
14:48 haarg joined #mojo
14:48 mbudde joined #mojo
14:49 webart joined #mojo
14:49 bit_shifter joined #mojo
14:49 mudler joined #mojo
14:49 cng joined #mojo
14:50 bianca joined #mojo
14:50 vicash joined #mojo
14:52 hesco1 joined #mojo
14:52 marcus joined #mojo
14:52 mtj joined #mojo
14:53 Jonis joined #mojo
14:53 renormalist joined #mojo
14:58 nicomen joined #mojo
15:37 bianca left #mojo
16:38 [vlad] joined #mojo
16:39 htaunay joined #mojo
16:42 geospeck joined #mojo
16:52 sh14 joined #mojo
17:12 tyldis Mojo new year, everyone
17:50 kaare joined #mojo
18:14 jberger I have so long to go until new year still :D
18:30 ChmEarl joined #mojo
18:30 * jberger discovers people east of me had it already :o
18:31 mohawk sri, thanks for the notes
18:32 mohawk if i had thought of problems before the release, i would have raised them. i would have thought that was reasonably obvious? :-)
18:34 mohawk i kept the _clone because on reflection, $promise->all isn't really a problem - the problems i wanted to solve were a) the non-interoperability of requiring a Mojo::Promise (with a _clone) as first one, and not allowing non-promises
18:35 mohawk (insert b) before "and not")
18:35 jberger sri / mohawk: are the class/instance methods on Mojo::IOLoop a precedent?
18:35 mohawk they could be? could you expand?
18:36 jberger Calling the methods on the class uses the singleton loop whole calling on a loop instance uses that loop
18:36 jberger That's a little more clear in that case because it is the class in question
18:37 jberger Yet it seems not too dissimilar
18:37 mohawk jberger, that's what my patch does
18:37 mohawk if it's a class method, it does a ->new which implicitly uses the singleton
18:37 mohawk i consciously didn't make ->race not take non-promises because i thought it would be pointless - the first non-promise would instantly win
18:38 mohawk however, i'm happy to add it for the sake of consistency
18:40 mohawk sri, "either all resulting promises are tied to a dynamic ioloop, or all are tied to the global default ioloop" - well, you don't enforce that with the current code? i don't know exactly what you mean by "all resulting promises" - you mean ones returned?
18:41 mohawk the way i think of it, currently you're going off "the first promise" (invocant or first arg), and i'm just introducing a change where (if invocant, use the global one instead)
18:41 jberger (note I'm not in a position to review code this week, didn't bring my lappy)
18:41 mohawk doh ;-)
18:42 mohawk jberger, but yes, i agree with your thought - that's what i did
20:02 zivester joined #mojo
20:16 anon joined #mojo
20:31 inokenty joined #mojo
21:40 mohawk jberger, steve came back to me with this: https://github.com/mcsnolte/Mojo-Pg-DBIC and especially the "demo" in https://github.com/mcsnolte/Mojo-Pg-DBIC/blob/master/t/mojopgdbic.t
21:45 mohawk this is the excellent help provided by ribasushi, with links to other discussions: https://github.com/mcsnolte/Mojo-Pg-DBIC/commit/4f9d48cf52e6aecd782f1e2e20e1e1ae07a795a3#r17468260
21:47 mohawk_pts joined #mojo
22:36 mohawk jberger, and here is where you linked to the same file, on this channel, last year :-) http://irclog.perlgeek.de/mojo/2016-05-13#i_12474687
23:06 dod joined #mojo
23:42 karjala_ joined #mojo
23:48 hesco1 can anyone please point me to sample code, or perhaps documentation, which describes how to successfully wrap an .ep snippet in a conditional, whatever variation I have tried of this, has failed:  <% if ( defined( $page ) ){ ;;; %=   hidden_field page => $page ;;; <% }
23:49 hesco1 please see the ';;;' as a new line.
23:52 Grinnz looks fine to me, are you sure $page is undefined?
23:53 Grinnz oh, you need a closing tag for <%
23:53 Grinnz if you want it to be the whole line it should just be %
23:55 sri happy new year
23:55 purl Akemashite Omedetou
23:56 mohawk hesco, could you put your thought above in a paste/gist?
23:56 mohawk then we/someone can comment on it with the corrected version :-)
23:56 mohawk (gist is probably ideal for multiline comments)
23:57 hesco1 Thanks Grinnz, testing that now.  mohawk: will do so, if this does not resolve the issue.
23:57 mohawk i hope it does!
23:57 mohawk Grinnz++

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