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

IRC log for #mojo, 2017-11-06

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

All times shown according to UTC.

Time Nick Message
00:56 aborazmeh joined #mojo
01:15 ferdinand joined #mojo
01:19 jberger I get distracted
01:19 jberger oh cmon purl
01:20 jberger I can never get factoids right when they have "I" in them
01:20 jberger https://assets-auto.rbl.ms/021fc73bb36f42b721d557d0674e5bef8607aa65854ddd1f1db0a4802d697258
01:23 jberger this is what a -role flag would have to do https://metacpan.org/source/DVINCI/Mojo-Role-0.022/lib/Mojo/Role.pm#L24-29
01:36 jberger haarg: if Role::Tiny let me specify the target rather than doing so via caller, I could avoid a goto for that purpose
01:37 jberger leaving the goto for experimental::import
01:58 jberger would it be possible if Role::Tiny::import called some Role::Tiny->import_for($target) ?
02:02 cpan_mojo joined #mojo
02:05 jberger hehe, I don't think I'd ever noticed that Mojo::Base handles ' as a package separator https://github.com/kraih/mojo/blob/master/lib/Mojo/Base.pm#L81
02:10 jberger if that change were made to Role::Tiny, this would be the patch: http://paste.debian.net/994336/
02:10 jberger (untested, but it seems to be true)
02:11 jberger without that, use Mojo::Base -role, -signatures; wouldn't work
02:11 jberger because it could only use one goto
02:11 Grinnz jberger: eval "package $caller; use Role::Tiny"
02:11 jberger oh, hmmmmm
02:12 jberger less pretty, but doesn't need that change
02:13 Grinnz https://metacpan.org/pod/Import::Into#WHY-USE-THIS-MODULE goes over all the different ways this sort of thing can be done
02:14 Grinnz also didn't experimental->import('signatures') work?
02:14 jberger is there any danger of a string eval of that nature?
02:14 Grinnz not that i know of
02:15 Grinnz as long as you populate caller correctly
02:15 jberger meaning, can the caller value be faked into something dangerous
02:15 jberger my $caller = caller;
02:15 Grinnz should only be possible for caller to be a valid package name
02:27 Grinnz also that won't import strict and warnings to the caller, but i assume you'd be doing that already anyway
02:28 jberger yes
02:33 jberger why does this have "warnings" in it? https://github.com/kraih/mojo/blob/master/lib/Mojo/Base.pm#L101
02:34 Grinnz dunno, experimental.pm's import ignores the invocant
02:35 jberger heh
02:35 jberger anyway, I think that goto can be avoided too
02:35 jberger as you said
02:36 Grinnz it's a pure pragma so theres no reason caller needs to be set
02:36 Grinnz as far as i can tell
02:41 jberger hmmmm, has doesn't seem to like this
02:42 jberger I'll bet the attributes have to be added first
02:53 jberger that's annoying
02:53 Grinnz attributes?
02:53 purl well, attributes is http://perlmonks.org/?node_id=631931 or working in roles with MooseX::MethodAttributes::Role or how Catalyst assigns Action types
02:54 ilbot2 joined #mojo
02:54 Topic for #mojo is now 🍩 nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
02:59 jberger Role::Tiny classes are scalar references?
02:59 Grinnz Role::Tiny doesn't make classes
03:03 jberger heh
03:04 jberger I changed this line to has
03:04 jberger https://github.com/kraih/mojo/blob/master/t/mojo/roles.t#L45
03:04 jberger it then fails here: https://github.com/kraih/mojo/blob/master/t/mojo/roles.t#L98 not a hash reference
03:04 jberger it composed into ByteStream
03:04 jberger whoops
03:05 Grinnz yeah, Mojo::Base attributes will only work on hash based classes lol
03:05 jberger but it makes an interesting point
03:05 jberger yep
03:08 disputin joined #mojo
03:22 disputin joined #mojo
03:22 good_news_everyon joined #mojo
03:22 good_news_everyon [mojo] jberger created role_flag (+1 new commit): https://git.io/vFlJG
03:22 good_news_everyon mojo/role_flag 2a8202f Joel Berger: add -role flag to Mojo::Base
03:22 good_news_everyon left #mojo
03:23 noganex_ joined #mojo
03:25 good_news_everyon joined #mojo
03:25 good_news_everyon [mojo] jberger force-pushed role_flag from 2a8202f to e10b111: https://git.io/vFlJW
03:25 good_news_everyon mojo/role_flag e10b111 Joel Berger: add -role flag to Mojo::Base
03:25 good_news_everyon left #mojo
03:25 jberger forgot tidy
03:27 Grinnz jberger: i'd do "or die $@" instead of "if $@" to be safe
03:28 jberger do I include a 1; in the eval then or trust the return value of the use?
03:28 Grinnz i'd include a ; 1
03:28 jberger hmmm, I guess I don't know if use returns anything, require is what I was thinking of
03:28 Grinnz yeah not actually sure what use "returns"
03:33 Grinnz Role::Tiny->import in the string eval would probably work too, but i'd still not rely on its return value anyway
03:33 Grinnz since Role::Tiny is already being loaded beforehand
03:35 Grinnz i worded that oddly, Role::Tiny->import in the string eval should work because Role::Tiny is loaded for the ROLES constant
03:37 jberger yeah, I know what you meant
03:37 good_news_everyon joined #mojo
03:37 good_news_everyon [mojo] jberger force-pushed role_flag from e10b111 to 33c8188: https://git.io/vFlJW
03:37 good_news_everyon mojo/role_flag 33c8188 Joel Berger: add -role flag to Mojo::Base
03:37 good_news_everyon left #mojo
03:46 jberger Probably should mention that composing has into a non hash based class won't work
03:46 jberger I just don't know where that would go
03:47 jberger s/composing has into/using has in/
03:53 jberger I still wonder if has should be injected before loading Role::Tiny
03:53 jberger I can see in the code there is some handling of "not methods"
03:55 jberger but maybe it doesn't matter, since Role::Tiny explicitly states that if a class already implements a method (read: function) that function is kept
03:55 jberger so each import of a role with a has won't matter
03:56 jberger though maybe composing in two roles each with has will ...
03:57 jberger "If multiple roles are applied in a single call (single with statement), then if any of their provided methods clash, an exception is raised unless the class provides a method since this conflict indicates a potential problem."
03:59 rickbol_ joined #mojo
04:03 jberger anyway, I guess that won't matter because with_roles comes from Mojo::Base anyway, so the class's has is going to win
04:09 xdg joined #mojo
04:11 xdg joined #mojo
04:16 xdg joined #mojo
05:04 dboehmer joined #mojo
05:30 rickbol joined #mojo
06:12 mattp_ joined #mojo
06:37 rickbol_ joined #mojo
06:52 oalders joined #mojo
07:03 Vandal joined #mojo
07:07 geospeck joined #mojo
07:52 rickbol joined #mojo
08:08 trone joined #mojo
08:47 rickbol_ joined #mojo
09:00 tlatelolco joined #mojo
09:02 tlatelolco Hello! I have a Mojolicious lite app. I connect in it to a DB. Where should I put the DBI->disconnect line? If it's after app->start, it tells me "xxx.pl did not return an application object" ?
09:03 rshadow joined #mojo
09:11 sri tlatelolco: consider using Mojo::Pg or Mojo::SQLite
09:11 good_news_everyon joined #mojo
09:11 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vFlnp
09:11 good_news_everyon mojo/master 1733297 Sebastian Riedel: use a little less code for signatures
09:11 good_news_everyon left #mojo
09:12 sri jberger: bummer it would require a string eval :/
09:15 sri and hahahaha
09:15 purl LOLCON 4 reached.
09:15 sri i know why i used goto instead of experimental->import
09:16 sri the order was wrong before and i accidentally reactivated experimental warnings for the caller
09:16 sri which made me somehow think experimental->import didn't work correctly
09:23 tlatelolco sri: thanks
09:37 Kharec left #mojo
09:46 tlatelolco Hello. To have placeholders and have a route that matches GET /49372864, can I write get "/:id" => sub { app->log->debug("$id"); }; or is it the wrong direction?
09:47 CandyAngel tlatelolco: '/:id' => sub { my $c = shift; my $id = $c->param('id');
09:48 tlatelolco thanks
09:51 CandyAngel ^_^
10:00 tlatelolco sri: can I use DBI methods on a Mojo::SQLite object? I need to know te number of lines in a SELECT query
10:01 sh14 joined #mojo
10:06 CandyAngel tlatelolco: The 'rows' method on the result will tell you..
10:06 CandyAngel http://search.cpan.org/~dbook/Mojo-SQLite-3.000/lib/Mojo/SQLite/Results.pm#rows
10:36 sri CandyAngel: search.cpan.org? Oo
10:38 CandyAngel Lazy, first result from Google :P
10:38 CandyAngel https://metacpan.org/pod/Mojo::SQLite::Results#rows
10:38 CandyAngel Better?
10:39 sri much :)
10:39 CandyAngel ^_^
10:40 coolo joined #mojo
10:44 tchaves joined #mojo
10:46 tlatelolco thanks. I have a "database is locked": I guess it wants the no_wal option. Right? Where can I specify it? I usedMojo::SQLite->new->from_filename
10:47 CandyAngel Is something else writing to it?
10:48 CandyAngel Actually
10:49 CandyAngel https://irclog.perlgeek.de/mojo/2017-07-24#i_14913349
10:49 tlatelolco DBD::SQLite::db do failed: database is locked at :xxx.pl
10:50 CandyAngel Something is holding the write lock too long I think
10:51 CandyAngel I have to head to a meeting shortly, by the way
10:53 tlatelolco i launch the app with morbo, so maybe the respawns create a mess? should I write a disconnect line? (ok, have a good meeting)
10:54 sri i'm sure there would be bug reports if that was the case
10:54 sri it's a popular module
10:56 sri you can always test with the example application that's included
11:01 CandyAngel It got rescheduled -.-
11:02 Vandal joined #mojo
11:02 tlatelolco I wrote Mojo::SQLite->new->from_filename before the routes. Then inside a get route I write $sql->db->query... Is that ok?
11:03 CandyAngel Are you defining $sql in global/package scope, or in a has/helper?
11:04 tlatelolco my $sql = Mojo::SQLite->new->from_filename, at the beginning of the file
11:05 marcus ugh. I have no idea why the main class of Mojolicious::Plugin::AssetPack is missing from 02packages.txt :(
11:05 marcus curl https://www.cpan.org/modules/02packages.details.txt.gz |zcat|grep AssetPack all the others seem to be there. Computers...
11:07 CandyAngel marcus: I don't know if CPAN is having issues, but quite a few modules I install don't bring in their dependencies anymore
11:07 CandyAngel Like CHI
11:08 marcus zoffix: are you around?
11:11 sri tlatelolco: you should follow the Mojo::SQLite docs
11:12 sri specifically the parts that show its use in a web app
11:17 CandyAngel marcus: I just installed CHI in 5.22 and 5.26.. worked in .22 but failed for Task::Weaken on .26
11:17 CandyAngel Not sure if that helps you at all..?
11:24 geospeck joined #mojo
11:25 geospeck joined #mojo
11:41 marcus CandyAngel: no. Pretty sure this is a pause indexer error. I'm getting comaint now, and releasing 2.01 to attempt a fix.
11:43 kes joined #mojo
11:55 sri didn't batman mess up versioning?
11:55 sri looks like he lowered the version number in newer releases for some reason
12:04 marcus sri: Seems like it. I'm releasing 2.01 now
12:30 geospeck joined #mojo
12:50 aborazmeh joined #mojo
13:02 ghenry joined #mojo
13:22 itaipu joined #mojo
13:25 gizmomathboy joined #mojo
13:32 kes hooray I finally resolve all issues. Now all tests for the patch are PASSed
13:33 kes The fix was to disable routes->cache for mojolicious lite apps when it is mounted more than once
13:34 kes Now placeholders for embedded apps works fine: https://github.com/kraih/mojo/compare/master...KES777:do_not_lose_captures_for_embedded_apps?diff=split&expand=1&name=do_not_lose_captures_for_embedded_apps
13:34 kes please review
13:35 kes s/The fix/ The final fix/
13:58 ChmEarl joined #mojo
14:06 tchaves joined #mojo
14:08 aborazmeh joined #mojo
14:33 salva joined #mojo
14:39 gryphon joined #mojo
14:40 geospeck joined #mojo
14:40 geospeck joined #mojo
14:41 geospeck joined #mojo
14:42 geospeck joined #mojo
14:43 geospeck joined #mojo
14:44 geospeck joined #mojo
14:51 tlatelolco Can I query a SELECT with a WHERE field = $string like this select( 'mytable', undef, { field => $string } ) ? I have a result in sqlitebrowser, but not from my perl app
14:54 jberger well now that it doesn't need that goto, if you prefer, the goto could be used for Role::Tiny
14:55 jberger trick for people who use google and end up at search.cpan.org
14:56 jberger if you add an "m" to the address, becoming "search.mcpan.org" there is a redirect/url translator what will take you where you want to go
14:56 marcus nice trick.
14:56 marcus Seems I fixed AssetPack with the new release
14:59 maschine tlatelolco:  Have you read the docs?  https://metacpan.org/pod/Mojo::SQLite::Database#select
15:02 ghenry joined #mojo
15:04 jberger and if both the eval and goto aren't preferred, there really is no reason that either are needed, Role::Tiny's import uses caller as many such modules do, but were it to add a public method to import into a target package then it would be a simple matter of a class method call
15:05 jberger haarg: is that something you would consider?
15:12 CandyAngel If only addding one charracter could just taake me wheere I wantted to go forr everythhing
15:30 sri jberger: goto is better than string eval
15:34 tlatelolco joined #mojo
15:34 tlatelolco oh damn. Did someone answered my question? My window was closed before I could read
15:35 pink_mist tlatelolco: check the log, linked in the topic
15:36 tlatelolco thx
15:36 geospeck joined #mojo
15:38 mohawk search.cpan.org also has a link top right of pages to metacpan version
15:45 tlatelolco maschine: yes i did. My line is my $file = $db->select( 'images', ['filename'], { id => $string } );
15:46 tlatelolco there should be 1 result, since id is the primary key
15:47 CandyAngel tlatelolco: You can turn DBI debugging on to see the query that gets sent
15:50 tlatelolco with $ env DBI_TRACE=SQL ?
15:52 CandyAngel e.g. DBI_TRACE=3
15:53 CandyAngel I can't remember what level starts giving you the queries
15:53 CandyAngel I think 3 is the biggest one before it starts dumping the returned data too
15:59 tlatelolco thank you. I'll investigate the traces tomorrow. See you
16:00 CandyAngel Methinks tlatelol was at work :P
16:25 rshadow joined #mojo
16:31 Grinnz 10:30:05 <sri> jberger: goto is better than string eval
16:31 Grinnz i disagree, in this one case
16:32 Grinnz marcus: the main module is the only one with a version, so I assume what happened is a reindex was needed after batman deleted version 2.000 from CPAN
16:32 Grinnz but since you uploaded a higher version now it doesn't matter
16:36 Grinnz jberger: i don't feel like adding random exporter features to Role::Tiny is cleaner than just using the usual Import::Into style
16:36 jberger it was just an idea
16:37 jberger I'm happy whichever way works
16:37 Grinnz did you ever try eval "package $caller; Role::Tiny->import; 1", i'm curious if that would work
16:51 sri Grinnz: well, i guess i'll leave the -role implementation up to a vote then
16:52 jberger Grinnz: why would that be better?
16:53 Grinnz not really better or worse, just more straightforward since Role::Tiny is already loaded
16:53 jberger I guess it is one less step since we've already tried loading it
16:53 jberger right
16:54 jberger I guess there is one other way, we could locally override caller to return our caller instead :-P
16:54 * jberger ducks
16:54 sri looking at Mojo::Base, is there a reasonable way to move _monkey_patch back into Mojo::Util?
16:54 Grinnz jberger: 😵
16:55 jberger sri: do you remember what the circular dependency was?
16:55 Grinnz Mojo::Util uses Mojo::Base -strict
16:55 sri use Mojo::Base -strict; and use Mojo::Util 'monkey_patch'; i think
16:57 jberger you could require Mojo::Util and use Mojo::Util::monkey_patch or some other mechanism to get it
16:58 Grinnz BEGIN { require Mojo::Util; *_monkey_patch = \&Mojo::Util::monkey_patch; } maybe?
16:59 Grinnz i just try to avoid circular require at all costs
17:02 sri how odd
17:02 sri it seems to just work now, hope it's not just a problem with some perl versions
17:03 sh14|2 joined #mojo
17:04 good_news_everyon joined #mojo
17:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF8Wh
17:04 good_news_everyon mojo/master 832fe2e Sebastian Riedel: try to move monkey_patch back to Mojo::Util
17:04 good_news_everyon left #mojo
17:04 Grinnz the problem usually depends which module you load first
17:07 Grinnz i think if anything would be a problem it would be using monkey_patch in Mojo::Base's import method, or importing strict and warnings in Mojo::Util
17:07 sri https://gist.github.com/anonymous/64b6b773b000d04fd5e564b98682307e
17:08 sri "sub monkey_patch; use Mojo::Base -strict;"
17:09 sri that makes it go away
17:09 mohawk diegok, this looks wrong - maybe you didn't put a \@ ? https://diegok.github.io/a-bag-of-mojo-sweets/#/42 (look at the "map")
17:09 Grinnz calling it as Mojo::Util::monkey_patch(...) may work too
17:09 sri already doing that
17:09 sri oh
17:09 Grinnz with parentheses
17:10 sri right, that makes perltidy cry though
17:10 sri -.-
17:10 Grinnz its an issue of the compile time trying to resolve the keyword without parentheses there
17:11 pink_mist yeah, if you really insist on not using parentheses, you need to predeclare the sub
17:12 Grinnz the other thing i would test is that if you load Mojo::Base first, does Mojo::Util get strict and warnings?
17:14 Grinnz because i don't think Mojo::Base::import will be available yet
17:15 sri yea, it doesn't
17:18 mohawk diegok, also: https://diegok.github.io/a-bag-of-mojo-sweets/#/70 last line syntax error?
17:20 good_news_everyon joined #mojo
17:20 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF84l
17:20 good_news_everyon mojo/master affccb3 Sebastian Riedel: Revert "try to move monkey_patch back to Mojo::Util"...
17:20 good_news_everyon left #mojo
17:21 sri bummer
17:21 sri i want a clean solution :(
17:22 mohawk diegok, btw to be clear: i read your slides since i'm still terribly ignorant about Mojo*. thanks for those, i learned lots!
17:22 Grinnz i can't think of any that would solve that import issue except to not use Mojo::Base in Mojo::Util :P
17:26 sri actually, i think i have one that works
17:27 sri Mojo::Base only needs to require Mojo::Util
17:27 sri that's enough for Mojo::Util to get Mojo::Base::import
17:27 Grinnz hmm, if you delay it to runtime it might work yeah
17:28 good_news_everyon joined #mojo
17:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF8Bh
17:28 good_news_everyon mojo/master 7e9a2ad Sebastian Riedel: another try to move monkey_patch
17:28 good_news_everyon left #mojo
17:28 sri it passes all the special cases i can think of
17:31 Grinnz maybe a comment on the require would be helpful to make sure that doesn't get changed, since it's hard to tell that it could break Mojo::Util
17:34 good_news_everyon joined #mojo
17:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF8RE
17:34 good_news_everyon mojo/master f136ae0 Sebastian Riedel: mention reason for require
17:34 good_news_everyon left #mojo
17:44 disputin joined #mojo
18:02 sri anyone got this yet? http://masteringpostgresql.com
18:04 sri seems kinda interesting
18:05 sri of course i'm worried about lack of editing
18:14 sri HN is total garbage these days
18:14 marcus kinda shiny book.
18:15 sri 50 comments, not a single review, just "should i use postgres or someHypedNoSQLThing.js"
18:15 brunoramos joined #mojo
18:16 marcus grinnz: That explanation makes sense.
18:16 pink_mist (rather off topic: https://cdn.dribbble.com/users/124059/screenshots/3916664/attachments/892355/large.jpg )
18:17 sri pink_mist: http://i0.kym-cdn.com/entries/icons/original/000/005/574/takemymoney.jpg
18:17 pink_mist :P
18:22 disputin joined #mojo
18:37 VVelox joined #mojo
18:39 Seth1 joined #mojo
18:42 trone joined #mojo
18:48 good_news_everyon joined #mojo
18:48 good_news_everyon [mojo] jberger force-pushed role_flag from 33c8188 to 82818ff: https://git.io/vFlJW
18:48 good_news_everyon mojo/role_flag 82818ff Joel Berger: add -role flag to Mojo::Base
18:48 good_news_everyon left #mojo
18:57 jberger so votes for -role? sri was neutral before, still seems neutral. marcus / batman ?
18:57 jberger also, import mechanism votes? eval/use, eval/->import, goto?
18:58 jberger I think I'm leaning eval/->import
18:58 mohawk string eval?
18:58 purl string eval is almost never useful
18:58 Grinnz i prefer the string eval only because it doesn't introduce a vulnerability and using goto requires the whole import method to be structured around it
18:59 jberger mohawk: don't look at the code of Import::Into if that freaks you out 8D
18:59 Grinnz it's one of two legitimate uses of string eval that I can think of
19:00 Grinnz the other being installing code
19:00 jberger templating engines, I guess that could be called installing code
19:01 mohawk my un-asked-for preference would be to try and fiddle about with the import a bit more first to see if genuine improvements can be made, that also make it possible to avoid the string eval
19:02 Grinnz the caller must be set to the importing package, that's the most straightforward way
19:03 jberger mohawk: I did mention that, but Role::Tiny would need to change to make that possible
19:04 jberger and it isn't even obvious that that is in their interest
19:04 mohawk fair enough
19:04 mohawk nolo contendere ;-)
19:05 sri jberger: neutral
19:06 sri Grinnz: and there are more valid uses for string eval
19:06 sri Mojo::Template is a huge string eval
19:06 Grinnz sure
19:07 sri here's also a performance optimization https://github.com/kraih/mojo/blob/master/lib/Mojo/Util.pm#L332
19:08 Grinnz these are all sorta edge cases though, most people use it in cases where they should really be using Module::Runtime or a block eval
19:09 sri sure
19:15 jberger even though it will be a while until I could use this in library code, I think the notion of using -role, -signatures is the most compelling
19:15 jberger that's a lot of line savings and power in one line
19:15 mohawk that would certainly be #winning
19:16 jberger plus getting Mojo's "has" which isn't very easy in a role currently
19:17 sri jberger: ok, you have my +1
19:17 jberger woooo
19:18 jberger any changes you'd like before I merge? or do you want to merge?
19:19 sri no, go ahead
19:19 good_news_everyon joined #mojo
19:19 good_news_everyon [mojo] jberger merged role_flag into master: https://git.io/vF8Pq
19:19 good_news_everyon left #mojo
19:20 good_news_everyon joined #mojo
19:20 good_news_everyon [mojo] jberger deleted role_flag at 82818ff: https://git.io/vF8P3
19:20 good_news_everyon left #mojo
19:22 good_news_everyon joined #mojo
19:22 good_news_everyon [mojo] jberger pushed 1 new commit to master: https://git.io/vF8Pz
19:22 good_news_everyon mojo/master 5388d59 Joel Berger: update Changes
19:22 good_news_everyon left #mojo
19:22 jberger \o\
19:22 jberger /o/
19:23 mohawk attempt at high-five: o/\o
19:24 jberger I accept your high-five and offer you a 🍻
19:24 mohawk maybe better: o/'\o
19:24 mohawk jberger, what's the emoji? only seeing mojibake :'(
19:25 jberger looks right in the log, you have something wrong on your client I guess
19:25 mohawk it'll be fine, it's absolutely my client
19:25 * mohawk looks at the log
19:25 jberger https://emojipedia.org/clinking-beer-mugs/
19:26 good_news_everyon joined #mojo
19:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF8PH
19:26 good_news_everyon mojo/master ff10963 Sebastian Riedel: fix typo in Changes
19:26 good_news_everyon left #mojo
19:26 mohawk emojipedia, that's a new one on me :-)
19:27 jberger actually I usually use https://unicode-table.com/en/ but that time the other one came up first on google
19:27 sri a tutorial would be really nice now http://mojolicious.org/perldoc/Mojo/Base#DESCRIPTION
19:27 sri definitely has enough features
19:27 jberger sri: :s I don't think I've ever done the changes file right
19:27 sri well, it's my job anyway
19:28 jberger k, I'll leave it to you next time, I'm trying to save you work but that only is true if I do it right :(
19:34 sri jberger++
19:39 rshadow joined #mojo
20:10 geospeck joined #mojo
20:25 ghenry joined #mojo
20:39 CHYC What's the best way to `use experimental 'postderef';` in every template render by default?
20:43 mohawk in the layout?
20:44 Grinnz reregister the EPRenderer plugin passing additional Mojo::Template attributes: $app->plugin(EPRenderer => {template => {prepend => q{use experimental 'postderef';}}});
20:44 Grinnz or using a common layout works too
20:49 CHYC Grinnz, mohawk: Thanks, the common layout looks like the path of least resistence.
20:54 sri hmm, now i wonder why we don't just have a .ep alias for templates with "no strict 'vars';"
20:55 sri been thinking about making it the default for .ep so often, never thought about just adding an alias like .lp (lazy perl)
20:56 mohawk that seems dangerous
20:56 sri it's how most template languages work
20:57 mohawk typo-catching is a thing i like
20:58 sri hmm, jabberwok and CandyAngel seemed so eager to get this added, now nothing happens :S https://github.com/kraih/mojo/pull/1132
20:59 sri perhaps i overestimated the interest
21:01 CandyAngel I didn't notice you posted your golfing down
21:02 CandyAngel Gah, how do you do that?!
21:03 sri you'd have to make a new pull request to fix it
21:07 CandyAngel Sure, I can do that
21:08 jberger why would there need to be a new PR? force-push takes care of just about everything
21:09 jberger oh because its jabberwork's fork
21:14 mohawk could PR onto jabberwok's fork
21:14 sri if you want to wait for jabberwok
21:14 Grinnz hmm. ->wait to wait on a promise outside of an event loop works nice, but not quite the equivalent of ->get which I would use for that on Future. would await, then return either the success result or throw a failure exception
21:14 mohawk indeed
21:15 Grinnz i wonder if a convenience method like that would make sense
21:16 Grinnz maybe in that Futurey role
21:23 CandyAngel Okay, if I change the join '  ' to join '__'... it doesn't do anything
21:23 CandyAngel The same tests still pass/fail
21:25 CandyAngel Ohhh
21:25 CandyAngel Sorry
21:25 itaipu_ joined #mojo
21:49 CandyAngel Took me a moment, but I think I got a good "motivation" rather than just "it's how I expected it to work" :P
21:55 CandyAngel \o/
21:55 good_news_everyon joined #mojo
21:55 good_news_everyon [mojo] kraih pushed 2 new commits to master: https://git.io/vF8je
21:55 good_news_everyon mojo/master 5b06b31 CandyAngel: allow tablify to format non-rectangular arrays
21:55 good_news_everyon mojo/master 6624d1a Sebastian Riedel: Merge pull request #1150 from CandyAngel/nonrect_tablify...
21:55 good_news_everyon left #mojo
21:58 jberger CandyAngel++
21:59 good_news_everyon joined #mojo
21:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vF8jy
21:59 good_news_everyon mojo/master a48bdd0 Sebastian Riedel: update Changes and fix formatting
21:59 good_news_everyon left #mojo
21:59 sri you forgot to perltidy the test
22:00 CandyAngel You shouldn't credit me, I didn't do anything :P
22:01 sri ¯\_(ツ)_/¯
22:08 mohawk CandyAngel's github avatar looks actually humanoid (albeit more like a Robotron) while mine looks like an angry space invader
22:08 mohawk #80sReferencesFTW
22:38 gryphon joined #mojo
22:39 jberger IMO they're all mooninites
22:40 preaction it's the invasion!
23:39 disputin joined #mojo

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