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

IRC log for #mojo, 2017-10-30

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

All times shown according to UTC.

Time Nick Message
00:23 aborazmeh joined #mojo
00:34 marty joined #mojo
00:34 marty joined #mojo
00:49 marty_ joined #mojo
00:57 CandyAngel Okay, I really need to make UserAgent's cookie persistent. Can't run this job in the foreground because it always fails (due to having to log in) -.-
00:59 mohawk does it have a cookiejar type option?
01:02 CandyAngel Yeah, but there are no persisting ones (yet) :)
01:02 CandyAngel That I know of
01:05 CandyAngel Okay, it doesn't even work when a worker is doing it :P
01:08 mohawk "someone should" make one!!11
01:09 CandyAngel Well it has come to that time where I need it, so will start tomorrow :P
01:29 mohawk well volunteered
01:29 purl you da /(wo)?man/!
01:29 mohawk even purl agrees
01:29 CandyAngel :P
01:29 mohawk i might have made that non-capturing
01:41 pink_mist I like the new /n switch for that
02:13 mohawk i wonder at what point they'll figure they NEED a new switch but all the ASCII letters are taken
02:13 mohawk snowman regex switch, anyone?
02:15 rickbol joined #mojo
02:41 itaipu joined #mojo
03:25 jberger Easy, repetition. We have xx now
03:31 noganex joined #mojo
03:36 itaipu joined #mojo
04:22 rickbol_ joined #mojo
05:04 dboehmer joined #mojo
06:14 Vandal joined #mojo
07:05 trone joined #mojo
07:11 mohawk jberger, what's the 2nd x?
07:16 hesperaux joined #mojo
07:22 AndrewIsh joined #mojo
07:24 inokenty-w joined #mojo
07:25 dod joined #mojo
07:29 dod joined #mojo
07:34 trone_ joined #mojo
07:57 ashimema joined #mojo
08:00 cng joined #mojo
08:21 salva joined #mojo
09:00 rshadow joined #mojo
09:20 petru joined #mojo
09:22 pink_mist mohawk: makes /x also apply inside [] character classes iirc
09:24 pink_mist mohawk: https://metacpan.org/pod/release/XSAWYERX/perl-5.26.0/pod/perldelta.pod#New-regular-expression-modifier-/xx
09:28 mohawk ahhh
09:28 mohawk ta
09:30 ashimema joined #mojo
09:50 marty joined #mojo
10:39 tchaves joined #mojo
11:05 rickbol joined #mojo
11:28 karjala_ joined #mojo
11:40 dod joined #mojo
12:09 juikuen joined #mojo
12:18 tchaves joined #mojo
12:33 aborazmeh joined #mojo
12:45 gizmomathboy joined #mojo
12:46 dod joined #mojo
12:49 tcohen joined #mojo
12:51 tchaves joined #mojo
12:52 perlpilot joined #mojo
12:53 dod joined #mojo
13:09 gryphon joined #mojo
13:15 sri allright, today is release day
13:19 good_news_everyon joined #mojo
13:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFtBr
13:19 good_news_everyon mojo/master e1b39f4 Sebastian Riedel: bump version
13:19 good_news_everyon left #mojo
13:19 good_news_everyon joined #mojo
13:19 good_news_everyon [mojo] kraih tagged v7.49 at 1a2b38f: https://git.io/vFtBo
13:19 good_news_everyon left #mojo
13:19 sri and just like that we have promises/a+
13:19 sri \o/
13:20 aborazmeh joined #mojo
13:25 good_news_everyon joined #mojo
13:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFtRE
13:25 good_news_everyon mojo/master 94044da Sebastian Riedel: more consistent examples
13:25 good_news_everyon left #mojo
13:26 petru joined #mojo
13:30 good_news_everyon joined #mojo
13:30 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFt0O
13:30 good_news_everyon mojo/master a1d86b7 Sebastian Riedel: mention that wait works the same for chains of promises
13:30 good_news_everyon left #mojo
13:32 genio \o/ awesome
13:34 good_news_everyon joined #mojo
13:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFt00
13:34 good_news_everyon mojo/master a09189e Sebastian Riedel: call it a chain of steps and promises
13:34 good_news_everyon left #mojo
13:40 Pyritic joined #mojo
13:50 dod joined #mojo
13:55 Pyritic joined #mojo
13:59 good_news_everyon joined #mojo
13:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFtu9
13:59 good_news_everyon mojo/master 741f9d3 Sebastian Riedel: mention the return value too
13:59 good_news_everyon left #mojo
14:00 sri hmm, perhaps ->steps should die if the promise is already fulfilled/rejected
14:01 sri guess that's one of the things we'll have to learn from real users
14:03 pink_mist I don't think it should be, at least not without good reason
14:21 good_news_everyon joined #mojo
14:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFt2J
14:21 good_news_everyon mojo/master 2d457b9 Sebastian Riedel: link to MetaCPAN from the documentation browser
14:21 good_news_everyon left #mojo
14:21 revhippie joined #mojo
14:23 Pyritic joined #mojo
14:25 good_news_everyon joined #mojo
14:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFt2w
14:25 good_news_everyon mojo/master 2b36863 Sebastian Riedel: just call it CONTENTS, like MetaCPAN
14:25 good_news_everyon left #mojo
14:54 pink_mist https://twitter.com/thomasfuchs/status/924576108779048965
15:05 sri can confirm, not how beer works in germany
15:06 genio :)
15:10 stokachu joined #mojo
15:23 good_news_everyon joined #mojo
15:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFt1R
15:23 good_news_everyon mojo/master 4e6b039 Sebastian Riedel: differentiate links a little bit
15:23 good_news_everyon left #mojo
15:24 sri can't wait to work on the minion ui next friday
15:25 sri hmm, metacpan is really not that good at rendering trees https://metacpan.org/pod/Mojolicious::Guides#REFERENCE
15:25 sri really weird formatting
15:27 jberger is it weird that the ul/li sets also contain p tags?
15:27 jberger I assume that's the output of some generation
15:28 sri ours do too
15:28 sri same pipeline prolly
15:29 sri metacpan just needs some css fixes
15:29 preaction POD renderers naturally adds <p> to <li>
15:32 haarg not sure it will really be "fixes"
15:33 haarg having that padding works better for many other cases
15:37 jberger so who is going to write the blog post on the promises additions (and include the warning about the changes)
16:00 jberger oh, I notice that by github's count mojo has had 599 releases
16:06 sri https://irclog.perlgeek.de/mojo/2017-10-29#i_15371374
16:07 jberger hunh, ok I missed that
16:09 jberger in some of my tests, when changing from catch(sub{ my ($delay, $error) = @_; ... }) to catch(sub{ my ($error) = @_ }) I'm now getting warnings from the reactor, but my tests still pass
16:09 jberger did I miss something?
16:20 ChmEarl joined #mojo
16:21 sri that's what i wanted to fix and you blocked
16:21 sri enjoy
16:23 jberger you know what, I think I will, thanks
16:25 sri i will fix it in 8.0 in a few months https://github.com/kraih/mojo/issues/1143
16:29 kes joined #mojo
16:29 kes Hi.
16:29 kes Why Mojolicious fall into infinite loop if I pass $app instance into ->detour method
16:29 kes and did not fall if I pass class name
16:30 kes https://stackoverflow.com/a/47019814/4632019
16:31 maschine joined #mojo
16:43 EvanCarroll joined #mojo
17:07 gordonfish joined #mojo
17:11 rshadow joined #mojo
17:13 jberger when finish and error events are removed from Mojo::IOLoop::Delay, will the base class be changed, ie will it still be a subclass of Mojo::EventEmitter?
17:21 sri it won't
17:22 pink_mist it won't be changed or it won't be a subclass of Mojo::EventEmitter?
17:22 sri https://github.com/kraih/mojo/issues/1143#issuecomment-340519183
17:23 pink_mist right, it will be changed
17:44 sri i suppose we could kinda deprecate it until the next major release
17:44 sri remove it from the docs already
17:48 Seth joined #mojo
17:51 Seth1 joined #mojo
17:55 itaipu joined #mojo
17:59 good_news_everyon joined #mojo
17:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFqkz
17:59 good_news_everyon mojo/master dbc9abd Sebastian Riedel: deprecate error and finish events in Mojo::IOLoop::Delay until the next major release
17:59 good_news_everyon left #mojo
18:00 sri and i think for the first time i'm overruling jberger
18:00 sri for the good of the project i change the error event not to be fatal
18:03 sri for future reference,  here he stumbled himself over the thing he didn't want fixed https://irclog.perlgeek.de/mojo/2017-10-30#i_15375378
18:03 sri and with that i rest the case
18:06 good_news_everyon joined #mojo
18:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFqIu
18:06 good_news_everyon mojo/master 70d8b0c Sebastian Riedel: avoid multiple error event handlers, just in case
18:06 good_news_everyon left #mojo
18:11 karjala_ joined #mojo
18:16 rshadow joined #mojo
18:17 good_news_everyon joined #mojo
18:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFqtt
18:17 good_news_everyon mojo/master e6317c0 Sebastian Riedel: bump version
18:17 good_news_everyon left #mojo
18:28 vSephiroth joined #mojo
18:28 vSephiroth hello, is there anyone in here that can help me out?
18:29 vSephiroth im trying to use Mojo::DOM on a page, and is not working, no errors, just a undef result
18:29 vSephiroth for similar pages it works
18:29 vSephiroth http://tcdecks.net/format.php?format=Pauper
18:32 jberger well that was exciting
18:32 jberger for the log, I tried `mojo get 'http://tcdecks.net/format.php?format=Pauper' title text` and it worked fine for me
18:33 jberger odd where did that semicolon come from?
18:33 jberger looks like a strange convos artifact
18:34 jberger doesn't appear in the log
18:34 Grinnz no semicolon here
18:34 jberger https://imgur.com/a/k912R
18:35 sri no semicolon here either
18:35 jberger it wasn't in my paste buffer, so it must be a convos bug
18:35 jberger I'll file that
18:40 sri wonder how long it will take for a Mojo::UserAgent::Role::Promises to appear on cpan
18:41 sri (adding ->aget and friends)
18:51 kes How to use route name of mounted application in link_to helper?
18:51 Pyritic joined #mojo
18:53 genio http://mojolicious.org/perldoc/Mojolicious/Plugin/TagHelpers#link_to has some examples
18:54 sri the docs for those parts are still lacking a bit, need volunteers https://github.com/kraih/mojo/issues/1109
18:58 jamesaxl sri: all mojo's docs needs volunteers
18:58 jberger jamesaxl: I think overall we are fairly happy with them, but of course suggestions are always welcome
18:59 sri jamesaxl: i'll assume you didn't mean that as rude as it did sound
19:01 kes genio: no, it has no required examples ((
19:01 kes I wanna this: https://stackoverflow.com/q/47022426/4632019 genio
19:02 sri you can't
19:02 sri embedded apps are isolated
19:06 genio oh, I misread that I guess. I thought you meant a route name. apologies
19:08 jamesaxl jberger: docs needs many example and not 2 or 3 examples, I see also the mojo tutorials focus a lot about lite apps then big projects
19:08 jamesaxl s/example/examples
19:09 jberger jamesaxl: do you mean the class pages need examples? those are for reference
19:09 jberger also the focus on lite is intentional, the usage is very similar and well documented in the growing guide, and yet because of the single-file nature it is much easier to use in documentation
19:10 Grinnz there has been a discussion about having more full-app examples in the tutorial, but i don't think it went anywhere
19:10 jamesaxl jberger: singles file is ok, but i do not think that a team will work in a single file
19:11 jberger no of course not and that isn't what I said
19:11 jberger see the text on the main documentation page under the tutorial: http://mojolicious.org/perldoc#TUTORIAL
19:12 jberger "The tutorial introduces the Mojolicious::Lite micro web framework, which is only a thin wrapper around the full web framework. The simplified notation introduced in the tutorial is commonly used throughout the guides"
19:12 jberger there are very very few cases were lite and full apps differ
19:12 jamesaxl sri: I am talking about suggestions, i am also mojo user, I hope to finish an asterisk API for call centers soon and share like an examples for a project
19:12 jberger *where
19:12 * sri opens https://github.com/kraih/mojo/issues/1145
19:12 Peppard joined #mojo
19:13 kes sri: But host application knows about all mounted apps. So I may be stupid again, but: link_to 'Embeded package' => [ 'EmbededAppName', 'route_name_of embeded_app' ]
19:13 kes it seems clear
19:14 jberger it couldn't be by application class name, because multiple instances of an application class may be mounted
19:14 kes ok. then we may use route name where app is mounted
19:15 jberger could you make your own helper which wraps link_to? by keeping a reference to your instantiated app, you could generate it via that app's router and then merge the urls
19:15 kes $r->route( '/app1' )->name( 'app1' )->detour( 'App' );
19:15 kes $r->route( '/app2' )->name( 'app2' )->detour( 'App' );
19:15 sri if i remember correctly even the same instance of an app may be mounted more than once
19:15 kes link_to xxxx => [ app1 => 'show_package' ]
19:16 jberger linking via route name is interesting, I haven't dug deeply into the router enough to know if you can get the app back at that point
19:17 kes thank you jberger. I will try and share the code tomorrow
19:17 jberger that would be excellent
19:18 kes One question please
19:18 kes Why without ->route('/') this did not work?
19:18 kes http://paste.scsys.co.uk/565627
19:19 jberger because you'd be routing to the under still
19:19 jberger you need another node in the routing tree
19:19 jberger I don't think we recommend using route('/') anymore though (do we?) would any('/') work as well for you?
19:20 sri ->any
19:21 kes thank you jberger
19:21 jberger np
19:23 jberger re: lite vs full, the only sure-fire foolproof way I've convinced people not to worry about the difference between lite and full is to show them the size of the Lite.pm itself
19:23 jberger once they see that they seem to get that there isn't a lot of difference
19:24 AndrewIsh joined #mojo
19:25 sri happy 600th release btw :)
19:25 mohawk huzzah! congrats!
19:28 trone joined #mojo
19:34 jberger \o/
19:52 jabberwok joined #mojo
20:07 marty joined #mojo
21:04 petru joined #mojo
21:13 bpmedley joined #mojo
21:17 Pyritic joined #mojo
21:18 rickbol joined #mojo
21:20 sri still wonder if we want $ua->aget in core
21:20 sri and of course $db->aquery in Mojo::Pg
21:30 Grinnz why the 'a' prefix?
21:30 sri because i can't think of something better :p
21:30 Grinnz i would think 'p' for promises :P
21:31 sri a for async
21:31 Grinnz future using apis sometimes do a 'f' prefix or '_f' suffix
21:31 sri naming things is hard
21:32 sri marcus: what's the best macos window manager these days?
21:37 karjala_ Role::Tiny doesn't override methods that already exist though, how would you replace default ->get with ::Role::Promises's get?
21:37 sri you wouldn't
21:38 Grinnz the methods being discussed are new ones
21:38 karjala_ Ok, I thought there would be aget in Core Mojo, and get in ::Role::Promises
21:38 Grinnz you *could* apply Class::Method::Modifiers in a role to alter existing methods, but i don't think that's a good idea for this case
21:39 Grinnz no, putting it in core would obviate the need for the role
21:41 karjala_ maybe "around" could do what I suggested (in case we wanted to)
21:41 Grinnz thats what i was referring to yes
21:42 Grinnz also i just realized, i can make https://metacpan.org/pod/Mojo::Log::Clearable a role now
21:45 mdom joined #mojo
21:47 karjala_ I think get_p looks more readable - you can quickly tell what you're looking at
21:47 karjala_ aget is more cryptic
21:48 maschine i read it as 'agent'
21:49 jabberwok the Canadian 'get'
21:50 Grinnz that would be get_a
21:54 rickbol_ joined #mojo
21:55 karjala_ but there are two kinds of async - callbacks and promises. Which of the two does _a refer to?
21:55 karjala_ would both be allowed?
21:56 Grinnz i was responding to jabberwok :P
21:56 karjala_ eh
21:58 pink_mist get_eh
21:58 mohawk Mojo::Role::UserAgent::Canadian
22:13 karjala_ I wonder, do you people see a usefulness in a JS-style === operator in perl? (that will string-compare, but also catch undefs and refs properly)
22:14 Grinnz proposing operators to anyone but p5p is rather moot, since theres no way to add them except by modifying the parser
22:15 Grinnz there are functions that do that sort of thing around on CPAN, though
22:15 karjala_ I'm only assessing how big the need of the users is (before proposing, maybe)
22:15 Grinnz https://metacpan.org/pod/Test2::Tools::Compare#$bool-=-is($got,-$expect) sorta works like that, but in the test harness context
22:17 karjala_ I'll do a benchmark to compare function vs eq
22:17 Grinnz it's probably quite a bit slower, it has function calls and handles a lot of possible cases
22:18 karjala_ my own function I mean
22:18 karjala_ I could name it eqq, eg
22:18 karjala_ ok, that was offtopic
22:50 pink_mist 23:14 <Grinnz> proposing operators to anyone but p5p is rather moot, since theres no way to add them except by modifying the parser <-- since the operator can be emulated in pure perl, one can write a source filter for it :P
22:50 Grinnz i was talking about non-horrible ideas
22:51 pink_mist but yeah, naming it === would be silly if it's a string-comparison
22:51 karjala_ eqq then?
22:54 karjala_ https://pastebin.com/Ekm2XXx8
23:14 dboehmer_ joined #mojo
23:18 karjala_ joined #mojo

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