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

IRC log for #mojo, 2017-11-07

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

All times shown according to UTC.

Time Nick Message
00:47 mohawk jberger, having googled mooninites, i agree
00:48 aborazmeh joined #mojo
02:35 Grinnz https://metacpan.org/pod/release/DBOOK/Mojo-Log-Clearable-1.000/lib/Mojo/Log/Role/Clearable.pm much cleaner now
02:35 Grinnz <3 Role::Tiny
02:53 mohawk noice
02:56 marty joined #mojo
03:13 jberger in re #1151, if we wanted something like that (exporting or handling "with") this is another option http://paste.debian.net/994498/
03:13 jberger I'm less fussed about this tbh
03:14 jberger but a nice benefit is that it actually opens the door to even more flags by making the order less rigid
03:21 noganex joined #mojo
03:29 Grinnz jberger: i wouldn't include with in the import args; you'd want the flexibility to 'with' multiple roles
03:29 Grinnz and at a certain point in runtime (for required attributes, usually)
03:30 jberger oh true, this happens at compile time with use
03:30 jberger yeah, no good
03:31 Grinnz as with the other one eval "package $caller; use Role::Tiny::With; 1" would do it, in this case it's just exporting a sub
03:32 Grinnz i'm not too convinced a -with import arg is worth much over just using Role::Tiny::With yourself
03:32 jberger but that really should only be on a -with flag, right? so yeah, what you just said
03:43 aborazmeh joined #mojo
04:14 disputin joined #mojo
04:30 dugword joined #mojo
04:32 dugword joined #mojo
04:43 dugword joined #mojo
05:02 inokenty-w joined #mojo
05:04 dboehmer_ joined #mojo
05:55 tyldis joined #mojo
07:10 geospeck joined #mojo
07:35 dod joined #mojo
07:35 dod left #mojo
07:36 dod joined #mojo
07:42 AndrewIsh joined #mojo
07:43 mtths joined #mojo
07:46 Vandal joined #mojo
07:54 dod joined #mojo
08:09 trone joined #mojo
08:16 kes joined #mojo
08:22 ashimema joined #mojo
08:42 dotan_convos joined #mojo
08:46 rshadow joined #mojo
09:01 trone joined #mojo
09:22 haarg note that you can use Role::Tiny->apply_roles_to_package rather than faking out caller for applying roles
10:18 dod joined #mojo
10:37 ChmEarl joined #mojo
10:37 tchaves joined #mojo
10:46 dod joined #mojo
10:59 good_news_everyon joined #mojo
10:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF4Ak
10:59 good_news_everyon mojo/master 13059b6 Sebastian Riedel: bump version
10:59 good_news_everyon left #mojo
12:31 us-us joined #mojo
12:36 ghenry joined #mojo
12:47 dugword joined #mojo
13:01 aborazmeh joined #mojo
13:06 dotan_convos joined #mojo
13:35 karjala_ joined #mojo
14:12 gryphon joined #mojo
14:30 gizmomathboy joined #mojo
14:44 kaare joined #mojo
15:03 [1]mohawk joined #mojo
15:07 ashimema joined #mojo
15:16 ashimema joined #mojo
15:42 Grinnz haarg: this isn't for applying roles though, it's for allowing the caller to apply roles as they choose
15:43 Grinnz aka, Role::Tiny::With
15:43 haarg i was looking at http://paste.debian.net/994498/
16:00 garo joined #mojo
16:02 jacoby joined #mojo
16:23 jberger haarg: indeed, by the time I was coming up with a final patch I had found that too, but thanks
16:24 jberger and then it became clear that it wasn't a good idea
16:25 disputin joined #mojo
16:26 ashimema joined #mojo
16:31 jberger this would have been my next version: http://paste.debian.net/994546/
16:33 jberger man it would be nice to be able to use this with "has" https://metacpan.org/pod/BEGIN::Lift
16:34 jberger then we could install -role into the UNITCHECK phase and it would all work and also fail early
16:34 jberger but non-core and XS
16:35 pink_mist well, I think stevan wanted to core the new MOP, which includes that module iirc, so eventually, it might be plausible
16:35 Grinnz jberger: i still prefer having a separate with keyword, and you can't assume only one role will be composed, it's not inheritance
16:36 jberger mine doesn't assume that
16:36 jberger but it would compose them in sequential calls
16:36 Grinnz that's not usually how you want to do it
16:37 Grinnz and also, attributes from Moo, or other reasons a required subroutine might not be available at compile time
16:37 Grinnz imported subs from later use, etc
16:37 jberger yeah, I was already thinking of things that wouldn't work with lifted has
16:37 jberger so we agree on that
16:37 jberger was just me thinking out loud
16:37 Grinnz generally, its a lot of complication when its easier just to let the caller 'with' like they always did
16:38 jberger agreed
16:40 ashimema joined #mojo
16:41 ChmEarl joined #mojo
16:42 haarg conceptually i like lifting attribute definitions to compile time, but i don't see much practical benefit for it unless you have a class finalization step
16:43 haarg which stevan wants for MOP stuff, but we delay until ->new in Moo
17:10 Grinnz batman: just ran into https://github.com/jhthorsen/mojo-redis2/pull/26, please take a look ASAP... not sure why it was using the internal version of that function to begin with
17:27 rshadow joined #mojo
17:27 Grinnz looks like it was from https://github.com/jhthorsen/mojo-redis2/pull/18
17:34 Grinnz https://github.com/kraih/mojo/blob/master/lib/Mojo/Base.pm#L207 should be "all four forms" now :P
17:35 garo joined #mojo
17:44 garo joined #mojo
17:50 dod joined #mojo
17:55 trone joined #mojo
17:55 garo joined #mojo
17:58 Seth joined #mojo
18:00 geospeck joined #mojo
18:01 geospeck joined #mojo
18:15 Grinnz sri: do you think it would be a good idea for https://metacpan.org/source/SRI/Mojolicious-7.55/lib/Mojo/Loader.pm#L44 to work like https://metacpan.org/source/SRI/Mojolicious-7.55/lib/Mojo/Base.pm#L80-81 ?
18:17 Grinnz i saw that when looking for string evals, and remembered that Mojo::Base did it more like Module::Runtime
18:30 garo joined #mojo
18:44 genio Jojo::Role?!
18:45 genio oh, for Mojo::Bass and whatnot
18:45 garo joined #mojo
18:46 Grinnz something about lexical subroutines... which seems kind of pointless for roles, since Role::Tiny already isn't going to compose those subs
18:47 Grinnz then again i havent really figured out what the point of lexical subroutines is
18:58 mmp joined #mojo
18:58 mohawk Grinnz, zomg private functions?
18:58 bc547_ joined #mojo
18:58 mohawk i'm pretty neutral on them myself
18:59 Grinnz i can kinda understand the philosophy behind them but i'm waiting for a practical use case that they solve
18:59 VVelox_ joined #mojo
19:00 graf joined #mojo
19:00 tardisx_ joined #mojo
19:00 stephanj joined #mojo
19:00 wouter_ joined #mojo
19:00 Andreas3 joined #mojo
19:01 crab_ joined #mojo
19:01 hkclark_ joined #mojo
19:01 pink_mis1 joined #mojo
19:01 tinita_ joined #mojo
19:01 dustinm` joined #mojo
19:01 brunoramos_ joined #mojo
19:01 suede joined #mojo
19:01 jacoby joined #mojo
19:01 chandwki joined #mojo
19:02 rshadow joined #mojo
19:03 Bender joined #mojo
19:04 tchaves joined #mojo
19:04 genio joined #mojo
19:04 bobkare joined #mojo
19:04 coolo joined #mojo
19:18 vicash joined #mojo
19:30 brunoramos_ joined #mojo
19:33 rickbol joined #mojo
19:52 jberger they do some really cool stuff for Moxie
20:05 dod joined #mojo
20:49 good_news_everyon joined #mojo
20:49 good_news_everyon [mojo] kraih pushed 2 new commits to master: https://git.io/vFR3r
20:49 good_news_everyon mojo/master 98d5c53 Dan Book: use block eval instead of string eval to load optional modules
20:49 good_news_everyon mojo/master 6b9a76c Sebastian Riedel: Merge pull request #1152 from Grinnz/avoid_string_eval...
20:49 good_news_everyon left #mojo
20:50 sri Grinnz: dunno
20:51 karjala_ joined #mojo
20:57 geospeck joined #mojo
21:03 gryphon joined #mojo
21:22 rshadow joined #mojo
21:27 rshadow joined #mojo
21:32 garo joined #mojo
21:36 Grinnz sri: main issue seems to be the Mojo::Exception handling, it gets confused because the exception that gets thrown ends in "Compilation failed in require at lib/Mojo/Loader.pm line 45." instead of "Compilation failed in require at (eval 20) line 1."
21:37 Grinnz not sure yet if it's just the test needs to be adjusted
21:39 Grinnz https://metacpan.org/source/SRI/Mojolicious-7.55/lib/Mojo/Exception.pm#L20-25
21:39 Grinnz it's because it can open lib/Mojo/Loader.pm for context but not (eval 20)
21:41 Grinnz not sure what a clean way of handling that would look like
21:42 Grinnz i assume the Mojo::Loader line is not the context that we want stored in the exception object
21:43 marty joined #mojo
21:45 garo joined #mojo
21:47 Grinnz https://perlbot.pl/p/je2l6u
21:53 Grinnz this is the patch so far https://github.com/kraih/mojo/compare/master...Grinnz:mojo_loader_require
21:57 Grinnz also, now that the circular require is dealt with, class_to_path could be used in Mojo::Base's version
21:59 sri good idea
22:04 garo joined #mojo
22:16 Grinnz had to use extra special parentheses so it wouldnt give me weird syntax errors
22:16 Grinnz probably something related to indirect object syntax...
22:17 Grinnz actually $file isnt needed anymore there
22:23 good_news_everyon joined #mojo
22:23 good_news_everyon [mojo] kraih pushed 2 new commits to master: https://git.io/vFRwo
22:23 good_news_everyon mojo/master 4a8da70 Dan Book: use class_to_path to load modules in Mojo::Base
22:23 good_news_everyon mojo/master de9ee91 Sebastian Riedel: Merge pull request #1153 from Grinnz/mojo_base_class_to_path...
22:23 good_news_everyon left #mojo
22:45 jberger man that's a weird indirect ...
22:45 jberger Grinnz++
22:46 pink_mist I don't think it's indirect actually
22:46 pink_mist just a parser quirk
22:46 pink_mist but I may be mistaken
22:46 Grinnz yeah it might be specific to require() itself
22:47 Grinnz due to its version parsing maybe
22:47 Grinnz or i guess its bareword parsing in general
22:48 Grinnz require Foo::Bar... starts to look like a bareword require i guess
22:52 marty joined #mojo
22:58 cfedde joined #mojo
23:00 cfedde_ joined #mojo
23:33 Seth1 joined #mojo

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