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

IRC log for #mojo, 2017-12-09

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

All times shown according to UTC.

Time Nick Message
00:11 CandyAngel mohawk: Not yet. Only transferred the code home recently :P
00:13 mohawk CandyAngel, no pressure
00:13 * mohawk waits
00:14 CandyAngel None at all..
00:18 CandyAngel I think I have some time tomorrow morning, I can get it on CPAN then
00:18 Grinnz overnight shipping!
00:20 CandyAngel ^_^
00:29 jacoby joined #mojo
00:33 Seth joined #mojo
00:39 Seth joined #mojo
00:41 good_news_everyon joined #mojo
00:41 good_news_everyon [minion] kraih pushed 3 new commits to master: https://git.io/vb4rm
00:41 good_news_everyon minion/master 047ba6a Sebastian Riedel: fix list_locks example
00:41 good_news_everyon minion/master 8e3f511 Sebastian Riedel: more list_locks examples
00:41 good_news_everyon minion/master c00cb99 Sebastian Riedel: order list_* methods consistently
00:41 good_news_everyon left #mojo
01:13 Seth joined #mojo
01:20 Seth joined #mojo
01:24 Leffe joined #mojo
01:31 Grinnz kind of an unfortunate choice of namespace https://metacpan.org/release/WFSO/Mojolicious-Services-1.0.1
01:37 jberger even worse: Mojolicious::Service is in there too
01:37 jberger https://metacpan.org/pod/release/WFSO/Mojolicious-Services-1.0.1/lib/Mojolicious/Service.pm
01:39 Grinnz yea
01:39 Grinnz and Plugin::Service
01:49 Seth joined #mojo
01:50 Seth joined #mojo
01:53 Leffe joined #mojo
02:57 tchaves joined #mojo
02:58 ilbot2 joined #mojo
02:58 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
03:03 mohawk i've read through the code and it's still not obvious what it's trying to achieve
03:06 Leffe joined #mojo
03:12 Seth joined #mojo
03:13 Leffe joined #mojo
04:21 Lee joined #mojo
05:35 jberger https://twitter.com/joelaberger/status/939367685879672832
05:41 Leffe joined #mojo
06:01 mohawk_pts jberger, "10 Best Ways To Test. #6 Had Me In Tears."
06:01 mohawk_pts jberger, would you be interested in a docker post?
06:02 tyldis I would! Mojo (and Perl) seem to lack in that department
06:02 mohawk_pts it does, doesn't it
06:02 mohawk_pts i was at the "perl + docker" talk at LPW, which was very interesting
06:03 mohawk_pts OpusVL, where the speaker works, have a github repo which sort of implies some of the stuff i came up with
06:03 mohawk_pts but no examples, no working code
06:04 mohawk_pts i've now got GQL making a prereq container, then also a container with the current version of lib layered on
06:04 mohawk_pts then another plugin, which starts from that to make its own prereqs one, etc
06:04 mohawk_pts then an app one which uses the same pattern
06:05 mohawk_pts and if i hadn't stumbled over bugs in a) my comment->description parsing in GQL and b) my OpenAPI convert plugin, a fully containerised largely generalised graphql<->openapi service would even now be being described in a blog post
06:05 mohawk_pts as it is, i expect to get to that in the next day or so
06:10 tyldis Excellent stuff
06:20 Lee joined #mojo
06:26 itaipu joined #mojo
07:03 lodin joined #mojo
07:15 jamesaxl joined #mojo
07:16 Vandal joined #mojo
07:50 dustinm joined #mojo
08:05 jamesaxl joined #mojo
08:08 dod joined #mojo
08:15 dod joined #mojo
08:21 dod joined #mojo
08:38 dod joined #mojo
08:43 dod joined #mojo
09:06 karjala_ joined #mojo
09:44 mtj joined #mojo
10:23 Leffe joined #mojo
10:46 lodin joined #mojo
10:50 karjala_ joined #mojo
11:03 geospeck joined #mojo
11:19 Leffe joined #mojo
12:06 Leffe joined #mojo
12:14 Leffe joined #mojo
12:39 Leffe joined #mojo
12:40 sh14 joined #mojo
12:53 Leffe joined #mojo
13:23 geospeck joined #mojo
13:41 dod1 joined #mojo
13:42 * sri wonders if ->list_locks(0, 10, {name => 'foo'}) should match all locks beginning with foo
13:42 Leffe joined #mojo
13:45 dod joined #mojo
13:46 CandyAngel Grinnz: How do you prefer to be credited?
13:47 itaipu joined #mojo
14:22 maschine how can I process my results with Mojo::Pg::Results in a loop?  http://bit.ly/2jh3YI8
14:22 maschine I get "DBD::Pg::st fetchrow_hashref failed: no statement executing at /usr/local/share/perl/5.22.1/Mojo/Pg/Results.pm line 22"
14:23 maschine it works for the first iteration, but not the second time
14:30 pink_mist maschine: huh? you're last;ing out of the loop but not calling $results->finish. the documentation for ->hash tells you you need to call ->finish if you don't intend to process all results
14:31 pink_mist also your indentation is completely wonky
14:31 pink_mist please fix
14:32 pink_mist oh yeah, even if you don't last out of it, at the end you always return out of the loop too, so that needs to call ->finish too. why do you even have a loop?
14:33 pink_mist that was hidden from me at the start because of your fucked up indentation
14:34 maschine I tried $results->finish - I must have put it in the wrong place?
14:37 pink_mist as I said, why do you even have a loop? your code can't run through it twice. is that actually intended or is that a bug? where you put the ->finish will depend on your answer
14:39 maschine because I need to loop through $results to find the one that matches the form entry, but if the form entry is one that doesn't exist, I want to try the alternatives.
14:39 pink_mist you don't loop through it. at all.
14:39 pink_mist you get one row. then you exit the loop. through various means.
14:40 pink_mist either through last;s or the return at the end
14:40 pink_mist you have several silly conditions too
14:42 pink_mist if () {} unless (first if is false) {if () {}} unless (first and second if are false) {if () {}} <-- better written as if () {} elsif () {} elsif () {}
14:44 maschine yeah..  it doesn't need to try the other ones unless the first one doesn't match
14:45 pink_mist but really, since the blocks are the same in the ifs, it's really better to write if (any { $foo eq $_ } $bar->param(), 'A', 'M') { ... }
14:46 pink_mist using any() from List::Util
14:48 maschine that sounds much cleaner - thanks
14:49 maschine and I won't have the other issue which I unnecessarily created for myself
14:49 pink_mist also, your return statement will always only return undef, since it's bypassed with last; if one of the if blocks match and set $hash
14:56 geospeck joined #mojo
15:01 good_news_everyon joined #mojo
15:01 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vbBI7
15:01 good_news_everyon minion/master a3698b9 Sebastian Riedel: no need to show custom workers in the synopsis anymore
15:01 good_news_everyon left #mojo
15:14 ChmEarl joined #mojo
15:21 maschine pink_mist - any() from List::Util didn't end up working out, because it iterates through the list and not the rows (at least one value in the list will match any row).  I ended up doing something like your first suggestion, which is now working - thanks!
15:22 maschine question on $results->finish - do I need to call it even though I've gone through all the rows?  there are only ever going to be 2.
15:22 pink_mist no, not if you go through all the rows. only if you don't.
15:41 geospeck where is the source code of this https://mojolicious.io/blog/2017/12/09/day-9-the-best-way-to-test/ located?
15:41 geospeck there is a typo in the first paragraph "and more all come together to make to make incredibly detailed testing simple. "
15:42 geospeck "to make" is written twice
15:50 CandyAngel jberger: geospeck has spotted a typo in the day 9 article. First paragraph has "together to make to make incredibly"
15:50 CandyAngel Thankies geospeck, it'll be fixed when he see's that :)
15:51 CandyAngel sees*
15:53 geospeck by the way thanks guys for the posts and the calendar
15:58 jberger geospeck thanks, will fix
15:58 jberger The source is on my github btw if anyone is interested
15:59 jberger geospeck I'm glad you're enjoying
16:00 jberger If I wasn't finishing each post while tired right before bed maybe I wouldn't make so many typos
16:01 karjala_ joined #mojo
16:19 jberger CandyAngel: congrats on the release
16:19 CandyAngel It worked?
16:20 jberger https://metacpan.org/pod/release/EJUNGLE/Mojo-UserAgent-CookieJar-Role-Persistent-0.001/lib/Mojo/UserAgent/CookieJar/Role/Persistent.pm
16:20 CandyAngel Yay
16:21 jberger sidenote, I was curious what electricjungle was, so I went to electricjungle.org and I got a 400
16:23 CandyAngel Err.. it's like a community group I'm part of
16:27 jberger yeah, its fine that it doesn't render anything, but normally that would be a 401 or a 404 or a timeout, sometimes a 502 or a 500
16:27 jberger if its a 400 on / my webmaster hat goes on and I tell someone :-P
16:27 CandyAngel ^_^
16:27 CandyAngel I'll let them know
16:30 hesperaux joined #mojo
16:32 jberger I'm thinking of starting a mojolicious twitter account
16:32 jberger I know my stream gets quite political, I wouldn't be surprised if my reach is lessened because of that
16:33 jberger I also need to put something else on the front page of mojolicious.io (besides just the calendar) and post it around some places
16:33 jberger cover myself in body armor and post it to r/programming
16:34 CandyAngel mohawk: My peristent cookiejar code is on CPAN now
16:34 CandyAngel Yay for 2 modules on CPAN now :P
16:34 jberger CandyAngel++
16:34 jberger watch out, its addictive
16:35 Leffe joined #mojo
16:35 CandyAngel :P
16:36 CandyAngel Will have to update it Monday evening, when I'm back home.. add a test suite :P
16:44 CandyAngel Anyways, time to head downstairs and join the party
16:44 CandyAngel Back later!
16:54 Grinnz CandyAngel: usually Dan Book is fine, no idea what i did though :P
16:55 Grinnz your dist is missing prereqs
16:56 Grinnz Makefile.PL should not have a shebang
16:58 Leffe joined #mojo
17:15 Grinnz have you considered Dist::Milla or Minilla? it would handle most of the metadata things you're missing
17:16 Grinnz also, missing Changes (though there aren't any yet of course :P )
17:17 Grinnz https://cpants.cpanauthors.org/release/EJUNGLE/Mojo-UserAgent-CookieJar-Role-Persistent-0.001
17:18 Grinnz according to your docs you're using the perl 5 license so make sure you add that as well
17:22 Grinnz theres a reason i always recommend Dist::Milla or Minilla for starting out or for people who dont want to manually do everything; EUMM is a really barebones 'authoring' tool so you need to know a lot about what's required if you want to use it
17:23 maschine is there a 'powered by Mojolicious' tag or graphic?
17:29 CandyAngel Grinnz: for doing exactly what you just did :P
17:32 trone joined #mojo
17:34 marty joined #mojo
17:42 marty_ joined #mojo
17:45 marty_ joined #mojo
17:46 Leffe joined #mojo
17:49 pink_mist maschine: you can use http://mojolicious.org/mojo/logo-black.png
17:50 flabbergaster joined #mojo
17:50 pink_mist (I'm not sure if hotlinking to it is approved though; I'd suggest hosting it yourself)
17:53 sri not approved
17:55 pink_mist maschine: https://metacpan.org/source/SRI/Mojolicious-7.58/lib/Mojolicious/resources/public/mojo <-- there's a bunch of different versions of logos shipped with Mojolicious too
17:56 Grinnz i'm happy to critique dist toolchains all day :P
17:57 trone_ joined #mojo
18:04 Leffe joined #mojo
18:13 tyldis jberger: I enjoy your Perlish tweets, but the political ones are pretty much irrelevant to me... So I like your idea.
18:16 tyldis CandyAngel: Great work. I second Grinnz on Minilla. Dirt simple and takes care of all the little things like VERSION variables, Changes-file between releases.
18:16 mohawk EUMM forever
18:16 mohawk (i may be biased)
18:16 Grinnz mohawk: you have literally worked on EUMM code, i dont think you're impartial there :P
18:17 mohawk ....
18:17 mohawk ;-)
18:18 Grinnz few have braved the depths
18:19 tyldis mojo generate minilla_app would be a great idea ;)
18:20 Grinnz i don't think that would be much different from minil new followed by mojo generate :P
18:22 tyldis Grinnz: You have to muck around and merhe the two folders :)
18:22 tyldis merge
18:23 Grinnz I suppose
18:23 sri CandyAngel: wouldn't the example look better with $ua->cookie_jar->with_roles('+Persistent')?
18:32 mohawk_pts joined #mojo
19:23 Leffe joined #mojo
21:43 karjala_ joined #mojo
23:05 karjala_ joined #mojo
23:36 sri Grinnz: i've released a new minion btw.
23:42 good_news_everyon joined #mojo
23:42 good_news_everyon [minion] kraih pushed 1 new commit to master: https://git.io/vbB6m
23:42 good_news_everyon minion/master 310e5e1 Sebastian Riedel: fix typo in usage message
23:42 good_news_everyon left #mojo
23:42 sri of course i make a typo :/
23:59 kaare joined #mojo

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