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

IRC log for #mojo, 2017-10-18

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

All times shown according to UTC.

Time Nick Message
00:02 CandyAngel "Also, don’t be scared of my use of the tag helper in the template. As an old LaTeXer it feels really natural to do begin/end rather than <tag></tag>. This level of commitment to the templating engine is possibly not to be encouraged :-P"
00:03 CandyAngel Sorry, just amused me that I found that while looking up something else :P
00:09 CandyAngel Whelp, I just changed it to the same style jberger linked.. and it is much tidier :|
00:10 CandyAngel Do still wish there was a: %= c $collection => $block
00:10 CandyAngel Where it looped over the collection and sent it to $block
00:31 mohawk CandyAngel, if you made a tag_helper called "foreach"...?
00:31 kaare joined #mojo
00:32 mohawk (which would take actually a "begin"..."end"
00:32 mohawk )
00:57 aborazmeh joined #mojo
01:21 bwf joined #mojo
01:50 bwf joined #mojo
02:06 kaare_ joined #mojo
02:14 bwf joined #mojo
02:24 jberger I think I'm getting more curmudgeonly :s
02:26 jberger CandyAngel: are you looking for something like https://metacpan.org/pod/Mojolicious::Plugin::Loop ?
02:28 noganex joined #mojo
02:28 jamesaxl joined #mojo
02:29 jberger CandyAngel: hahaha, I didn't read back far enough, hehe I think I remember making that quote :-P
02:29 jberger (the curmudgeon comment is about the unproductive github issue btw, not about anything on here)
02:30 jberger as I say, I don't hate that style, indeed I still kinda like it, but more and more I worry about other people looking at it :D
02:33 jnbek joined #mojo
02:34 mohawk ha ha!
02:34 jnbek joined #mojo
02:42 bwf joined #mojo
02:45 perlpilot joined #mojo
02:59 zivester joined #mojo
03:33 bobkare joined #mojo
04:00 inokenty-w joined #mojo
04:03 jamesaxl joined #mojo
04:04 dboehmer_ joined #mojo
04:12 jamesaxl joined #mojo
04:22 jamesaxl joined #mojo
05:00 jamesaxl joined #mojo
05:31 dod joined #mojo
05:59 dod joined #mojo
06:02 dod joined #mojo
06:20 aborazmeh joined #mojo
06:45 Vandal joined #mojo
06:51 S joined #mojo
06:51 AndrewIsh joined #mojo
06:53 poizon joined #mojo
06:57 foursixnine joined #mojo
07:26 trone joined #mojo
07:28 CandyAngel jberger: As I said, I copied that style and it made the template much neater (and I always approve of only having to type the tag once :])
07:37 mib_ox0d3x joined #mojo
07:44 karjala_ joined #mojo
07:47 prg joined #mojo
07:56 mib_53m060 joined #mojo
08:45 sri btw. emmet in vscode doesn't work automatically in mojo templates, you have to use this setting "emmet.includeLanguages": { "mojolicious": "html"},
08:50 sri my vscode settings are now almost as big as my vimrc :o
08:55 rshadow joined #mojo
08:59 CandyAngel I should totally thank the author of SQL::Abstract.. I have totally stolen something they do for my packet encoder/decoder :P
09:01 CandyAngel In the packets, the object id can either be an integer or a string
09:01 CandyAngel When it is a string, it has an integer id of 0 (to indicate that a string id follows)
09:01 CandyAngel So I made it so you can do this:
09:03 CandyAngel encode(id => 1, type => 16) for numeric ids, and encode(id => \'SELF', type => 3) for string ids
09:04 CandyAngel And when it decodes them, it does the same (so you know if id '1' was a string or numeric)
09:04 * CandyAngel is oddly proud of this :P
09:09 ribasushi CandyAngel: that particular idiom dates back a very very long time ( and likely didn't originate in the SQL-generating ecosystem either )
09:10 ribasushi https://metacpan.org/release/TURNERA/DBIx-Abstract-0.95 bullet point 2 in changelog is where it officially shows up in SQLA's lineage
09:18 CandyAngel ribasushi: Oh, I know it probably didn't start in SQL::Abstract, but it's where I first saw it, I think :P
09:51 margeas joined #mojo
09:58 sri can anyone confirm this? https://github.com/kraih/minion/pull/58
10:19 sri that's actually a very real issue
10:32 CandyAngel Wouldn't happen on my machine.. MONOTONIC is just epoch
10:32 CandyAngel just from epoch, rather
10:36 CandyAngel perl -MTime::HiRes=clock_gettime -e 'p_gettime(Time::HiRes::CLOCK_MONOTONIC))'
10:37 CandyAngel Hmm
10:37 CandyAngel That didn't copy properly :P
10:37 CandyAngel perl -MTime::HiRes=clock_gettime -e 'print scalar gmtime(clock_gettime(Time::HiRes::CLOCK_MONOTONIC))'
10:37 CandyAngel I'd imagine that would be 1970 if MONOTONIC is some time around boot?
10:41 petru_ joined #mojo
10:42 CandyAngel Oh, it's been merged. Yay :D
10:52 tchaves joined #mojo
11:38 trone joined #mojo
11:38 mtths joined #mojo
11:41 ashimema joined #mojo
12:25 karjala_ Please remind me: How can I make all templates do a "use experimentals;" without me having to type it in every template?
12:26 karjala_ ...or run any perl command I want
12:27 pink_mist make your own templating module and use that instead of EP templates
12:27 karjala_ Would that be complicated?
12:27 karjala_ Any other way to achiveve this?
12:28 pink_mist there's probably some other way, but I don't know what it is
12:28 pink_mist and it shouldn't be _very_ hard ... just subclass the EP module
12:31 karjala_ I think it was one or so lines of code when I did it last time... but that was ages ago
12:31 karjala_ with help from here ofc
12:32 pink_mist well yes, if you know exactly what needs to be done, it's not hard at all ... the hard part is getting to know it in the first place :P
12:35 karjala_ yes
12:51 trone joined #mojo
12:52 ChmEarl joined #mojo
13:18 dantti_laptop joined #mojo
13:21 rshadow joined #mojo
13:28 gizmomathboy joined #mojo
14:16 gizmomathboy_ joined #mojo
14:40 petru joined #mojo
14:46 jacoby joined #mojo
15:43 dod joined #mojo
16:04 Grinnz karjala: you could give every template a default layout that adds that code (and anything else global to your templates)
16:05 Grinnz $app->defaults(layout => 'mylayout');
16:07 karjala Thanks
16:07 jamesaxl joined #mojo
17:03 gizmomathboy joined #mojo
17:39 jamesaxl joined #mojo
17:46 jamesaxl joined #mojo
17:48 dod joined #mojo
17:50 jamesaxl joined #mojo
18:02 jamesaxl joined #mojo
18:07 gizmomathboy joined #mojo
18:11 rshadow joined #mojo
18:34 petru joined #mojo
18:34 karjala_ joined #mojo
19:02 Sebbe joined #mojo
19:28 gizmomathboy joined #mojo
20:37 gordonfish joined #mojo
21:08 batman karjala: instead of what Grinnz suggest, you could load the EPRenderer plugin again with your own defaults.
21:11 batman $app->plugin(EPRenderer => {template => {prepend => ...}})
21:11 batman IIRC
21:12 pink_mist aha! there's the magic! :P
21:13 batman Not sure how well supported that is though. Haven’t looked at it in a while.
21:34 maschine it's a good day when you've learned enough to delete 2 whole modules worth of code you don't need anymore! :)
22:15 CandyAngel Okay.. I think this code is actually pretty slick now >.>
22:15 CandyAngel Mojo::Collection <3
23:04 zach joined #mojo
23:05 rick_soc joined #mojo
23:05 rick_soc hello hello
23:05 purl o/` Hello hello? Is there anybody in there? o/`
23:06 CandyAngel Heyas rick_soc
23:07 rick_soc I'm considering contracting out some mojolicious work, where is a good place to start?
23:17 preaction jobs.perl.org perhaps?
23:18 rick_soc Okay I'll take a look there, thanks

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