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

IRC log for #mojo, 2015-08-23

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

All times shown according to UTC.

Time Nick Message
00:04 jontaylor joined #mojo
00:06 nic joined #mojo
00:07 * nic parambulates
00:22 Adura joined #mojo
00:26 jberger mojo drink? mojito?
00:30 nicomen i have had Mojo beer :-)
00:33 bpmedley_ jberger: http://irclog.perlgeek.de/mojo/2015-08-22#i_11099338
00:34 jberger hunh, I missed that
00:34 jberger bpmedley_++
00:35 jberger Zoffix++
00:35 jberger tell me how it is, probably a sweet malt beverage?
00:40 * sri yawns
02:12 Zoffix jberger, it tastes like overpriced unicorn urine :)
02:12 jberger that sounds about right
02:12 jberger :-P
02:12 mst so, budweiser, except with a flavour
02:12 Zoffix :)
02:12 jberger I wonder what the official drink of #mojo should be?
02:13 jberger I mean, clearly, this is the official food: http://www.thinkgeek.com/product/e5a7/
02:14 bpmedley_ Amaretto Sour ... :)
02:17 jberger I'm fancying sherry-cask aged highland scotches and flemish red beer lately, but neither of those strikes me as distinctly #mojo
02:19 lluad Long Island Iced Tea. Everything in a single package, goes down easily and it'll get you there fast.
02:20 asm35 joined #mojo
02:20 Adura Whatever Austin Powers drinks./
02:21 lluad Or a Mojito, I guess.
02:23 noganex joined #mojo
02:23 sri i'm afraid it has to be http://www.bremen-tourism.de/data/mediadb/cms_pictures/%7Bbd369b01-3ff2-dd55-e485-7e814bb66390%7D.jpeg
02:24 Zoffix lol, why?
02:24 sri it's the local beer where i'm from
02:24 Zoffix haha sri++ :)
02:26 jberger we have that here too, though the art is slightly different
02:26 sri it's exported all over the world, but the original brewery is just around the corner from where i grew up
02:27 jberger ah cool
02:27 jberger https://en.wikipedia.org/wiki/Beck%27s_Brewery#/media/File:Bremen_Weser_0011.JPG ?
02:28 sri yea
02:28 jberger interesting that it uses english barley
02:31 jberger "US manufacture of Beck's Brew has been based in St. Louis, Missouri since early 2012." like most beer in the usa
02:31 jberger its all just budweiser :-P
02:31 sri actually there's two local beers, Beck's is slightly to the south, and to the north http://www.kursfoehr.de/typo3temp/pics/076e258a6d.jpg
02:31 jberger I haven't had that one before
02:32 jberger haven't seen it either, must not cross the pond
02:32 sri very good too
02:32 jberger I hope to try it some time
02:32 sri more of an insiders tip
02:33 meshl joined #mojo
02:35 jberger I've been drinking this (and others like it) a lot lately, though they are hard to find and very expensive http://www.brouwerijverhaeghe.be/en/duchesse-de-bourgogne
03:06 asarch joined #mojo
04:04 sri that looks weird
04:05 jberger Malty and sour, rich taste
04:05 jberger I think it (they) are delicious
04:10 bjakubski joined #mojo
04:10 mattastrophe joined #mojo
04:10 Ralesk joined #mojo
04:11 janus joined #mojo
04:11 upasana joined #mojo
04:11 theo joined #mojo
04:11 michael joined #mojo
04:11 renormalist joined #mojo
04:11 omega joined #mojo
04:11 Mikey joined #mojo
04:12 dimuls joined #mojo
04:12 throughnothing joined #mojo
04:12 oalders joined #mojo
04:12 ashleydev joined #mojo
04:13 ChmEarl joined #mojo
04:13 zackiv31_ joined #mojo
04:13 lupi_ joined #mojo
04:13 Dandre1 joined #mojo
04:13 mmtths joined #mojo
04:13 HtbaaPi_ joined #mojo
04:13 al_ joined #mojo
04:13 vytas` joined #mojo
04:13 graf joined #mojo
04:13 mattp_ joined #mojo
04:13 lluad joined #mojo
04:13 bc547_ joined #mojo
04:13 melo joined #mojo
04:13 noganex_ joined #mojo
04:13 asarch joined #mojo
04:13 KCL joined #mojo
04:13 lsm joined #mojo
04:13 odc joined #mojo
04:13 howitdo joined #mojo
04:13 jnbek joined #mojo
04:13 esh joined #mojo
04:13 Phil21 joined #mojo
04:13 prg joined #mojo
04:13 dave joined #mojo
04:13 marty joined #mojo
04:13 talexb joined #mojo
04:13 d4rkie joined #mojo
04:13 dotan1 joined #mojo
04:13 Lee joined #mojo
04:13 jb360 joined #mojo
04:13 cstamas joined #mojo
04:13 bowtie joined #mojo
04:13 firnsy joined #mojo
04:13 LordVorp joined #mojo
04:13 chansen joined #mojo
04:13 worklapperl joined #mojo
04:13 stryx` joined #mojo
04:13 Zoffix joined #mojo
04:13 skaji joined #mojo
04:13 buu joined #mojo
04:13 KindOne joined #mojo
04:13 dustinm joined #mojo
04:13 Snelius joined #mojo
04:13 bobkare joined #mojo
04:13 SmokeMachine joined #mojo
04:13 sri joined #mojo
04:13 garu joined #mojo
04:13 BinGOs joined #mojo
04:13 caeles joined #mojo
04:13 tinita joined #mojo
04:13 bzero joined #mojo
04:13 preaction joined #mojo
04:13 allison joined #mojo
04:13 ssm joined #mojo
04:13 salparadise joined #mojo
04:13 stephan48 joined #mojo
04:13 bayashi joined #mojo
04:13 abracadaniel joined #mojo
04:13 Quai joined #mojo
04:13 cfedde joined #mojo
04:13 kmx joined #mojo
04:13 tempire joined #mojo
04:13 yt7fms joined #mojo
04:13 spicyjack joined #mojo
04:13 btyler_ joined #mojo
04:13 meredith joined #mojo
04:13 sivoais joined #mojo
04:13 Rallias joined #mojo
04:13 Foxcool joined #mojo
04:13 cosimo joined #mojo
04:13 stokachu joined #mojo
04:13 mishanti1 joined #mojo
04:13 diegok joined #mojo
04:13 hahainternet joined #mojo
04:13 crab joined #mojo
04:13 Eke joined #mojo
04:13 genio joined #mojo
04:13 mtj joined #mojo
04:13 ryanc joined #mojo
04:13 sawtooth joined #mojo
04:13 oetiker joined #mojo
04:13 ribasushi joined #mojo
04:13 da5id joined #mojo
04:13 stuart joined #mojo
04:13 jberger joined #mojo
04:13 jberger Silly net split
04:14 lestrrat joined #mojo
04:14 genio My ignorance and a general lack of useful information is about to drive me nuts.  I think it's time to go to bed
04:15 inokenty joined #mojo
04:16 mst joined #mojo
04:16 Nemix joined #mojo
04:16 bjoernfan joined #mojo
04:16 Kundun joined #mojo
04:16 geheimnis` joined #mojo
04:16 robinsmidsrod joined #mojo
04:16 tomboh joined #mojo
04:16 Grinnz_ joined #mojo
04:16 upasana_ joined #mojo
04:16 omega_ joined #mojo
04:18 Kundun_ joined #mojo
04:21 * jberger hands genio a beer
04:32 mst test
04:32 mst oh, great, FINE
04:33 * mst shakes fist at $other_server
04:33 * mst VICTORY
04:34 mst (don't mind me, was just testing something in here cleaning up post-netsplat)
04:35 eduardow joined #mojo
04:37 mst also I think the power blip earlier at the office may've blown up the aircon
04:45 jberger mst++ # herding the hamsters
04:48 mst sungo++ # does most of the actual work around here
04:48 mst epitaph++ # is shadowcat's system and is going to wake up to discover he volunteered to look into what happened
04:48 mst *sysad
05:30 kaare joined #mojo
06:58 stephen joined #mojo
07:05 batman http://stackoverflow.com/10m # wow :)
07:37 Vandal joined #mojo
07:51 espen joined #mojo
08:12 dod joined #mojo
08:18 dod joined #mojo
08:19 mst wheee
08:26 Kogurr joined #mojo
08:29 KCL_ joined #mojo
08:50 amon joined #mojo
08:58 tempire oooh
08:59 tempire sqlite is adding json support
09:52 asm35 joined #mojo
10:21 asm35 joined #mojo
10:33 asm35 joined #mojo
10:36 asm35 joined #mojo
10:38 asm35 joined #mojo
10:49 jontaylor joined #mojo
11:02 berov joined #mojo
12:20 cpan_mojo joined #mojo
12:20 cpan_mojo Mojolicious-Plugin-AssetPack-0.61 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.61
12:23 mst tempire: yay
12:23 mst the more things I can do in sqlite -and- pg the happier I'll be
12:26 Zoffix batman, ah, sorry. In my eagerness to make my thing work, I totally failed to look up what the proper loading order should be :(
12:33 mattastrophe joined #mojo
12:36 batman Zoffix: that's perfectly fine :)
12:37 batman i think the hack to make this work at your end is simply creating new $main_asset_file for each theme
12:38 batman it might actually be exactly what you want as well, since having a main .scss file for each theme with a bunch of @imports makes it very flexible
12:50 meshl joined #mojo
13:12 cpan_mojo Swagger2-0.48 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.48
13:12 cpan_mojo JSON-Validator-0.50 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/JSON-Validator-0.50
13:13 cpan_mojo Mojo-Webqq-1.4.2 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.4.2
13:15 sri maybe someone here cares about postgres large objects? https://github.com/kraih/mojo-pg/issues/11
13:17 * batman doesn't know what it is :/
13:18 cpan_mojo Swagger2-0.49 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.49
13:19 mst batman: BLOB type things
13:20 mst sri: not sure yet, will attempt to de-vaguecat the questioner
13:20 batman yeah, but what's special about it? can it be streamed..?
13:20 batman why can't it just be selected?
13:21 * batman has to move. too crowded @ burger joint :/
13:23 mst batman: it *can* just be selected, but you're allowed to do more clever things too
13:23 ashimema joined #mojo
13:26 batman ok. i see
13:26 asm35 joined #mojo
13:27 batman so i guess the issue wasn't very specific about the change :/
13:27 mst hence my response of "please propose a feature set"
13:27 batman +1 :)
13:27 mst once we get that, I'll presumably have to go "great, I've no idea why you want that, please explain the use case"
13:28 mst I can do this. I already do it for a living most days ;)
13:28 batman i'm rather happy with JSON::Validator now. i wonder if it could be more clever though...
13:28 batman hehe. i know.
13:28 mst it probably could, but that's not necessarily a good thing.
13:28 batman i also wonder if i will regret returning a list instead of an array-ref :/
13:31 batman at least there's no wantarray \o/
13:39 mattastrophe joined #mojo
13:39 mst at this point in my life with perl, that falls into the same category as "at least there's no CGI.pm"
13:39 mst it earns you a http:://trout.me.uk/youtriedstar.jpg but it's not a high bar to clear
13:40 Zoffix What's wrong with wantarray?
13:40 * genio dislikes a great many things right now
13:42 jberger Zoffix: ambiguity, mostly when coupled with a hash constructor
13:43 jberger and people not understanding the interaction therein
13:43 jberger batman: if you want to change it, do it now while you know who the adopter is
13:43 jberger :-P
13:44 batman mst: what is "that"? is it "wantarray" ?
13:44 mst batman: yes
13:45 batman ok. you dislike wantarray that much?
13:45 batman jberger: no idea if i want to change it.
13:45 jberger ah, well that's a different thing
13:45 batman the most awful thing, hehe
13:45 mst Zoffix: every single time I've used it, I have eventually regretted it
13:45 jberger I read it as you wanted to change it but weren't sure about breaking
13:46 batman jberger: ah. not much to break... probably just two users now. and probably not in production.
13:46 jberger ^^ which is why I encouraged you to do it :D
13:46 * jberger needs coffee
13:47 batman oh. i missed out on the encouragement
13:47 batman i will change it if i get one more +1
13:47 sri this comes to mind re wantarray https://groups.google.com/d/msg/mojolicious/aJTYjRCPjOE/QJZB6ORfYJAJ
13:47 Zoffix Is it the param thing?
13:47 mattastrophe joined #mojo
13:48 Zoffix aye
13:50 * Zoffix ponders how much use this would find were it in DefaultHelpers: https://github.com/XTaTIK/XTaTIK/issues/96
13:53 jberger Zoffix: it couldn't be in DefaultHelpers, it would have to be in Mojo::Template
13:53 jberger which doesn't know anything about a stash
13:55 mst MOAR VAGUE
13:55 sri jberger: actually, it can work as a helper
13:56 jberger really? how could a helper inject a for-loop at the syntax level?
13:56 sri begin/end generate a closure
13:56 jberger ah!
13:57 jberger I was thinking about a template replacement rule, like begin/end
13:57 jberger but you're right
14:10 jberger Zoffix: a quick mock-up: https://gist.github.com/jberger/e0779c1ab9613153a3f9
14:11 Zoffix Thanks. Gonna try it out in about 1.2 hours when I get to work
14:13 batman haha! jberger you beat me to it :)
14:14 batman Zoffix: i commented on your issue... pretty much the same as jberger
14:14 Zoffix Cool thanks. I'll take a look
14:15 batman it could be very slow if you use the item() helper as well... but "very slow" is very dependent on the number of elements :)
14:16 batman localizing a globale variable would be faster.
14:17 batman Zoffix: i would discourage using "loop" though. maybe "every" could be better.
14:18 batman i think of "loop" as "while(1)" (could just be me though...)
14:21 asarch joined #mojo
14:24 mst first value to a begin always becomes $_ ?
14:34 batman mst: map {} set $_
14:34 batman oh. right. jberger's code... no idea :)
14:35 batman mst: for() sets $_... i think jberger is just passing on $aref for... no idea really :(
14:35 jberger ?
14:36 batman jberger: $block->($aref)
14:37 jberger I have no idea what this means "i think jberger is just passing on $aref for... no idea really :("
14:37 batman jberger: i don't understand why you pass $aref to the $block code
14:38 mst jberger: your implementation uses $_ within the loop
14:38 jberger oh, yeah, just because I can
14:38 mst but then what you're passing seems weird
14:38 jberger it could as easily be $block->() for @$aref
14:38 mst oh, right
14:38 batman right. makes more sense
14:38 mst I got confused and assumed the weird thing was somewhere else ;)
14:38 jberger but maybe you are scared of $_ and want to shift the value instead
14:39 mst in that case you'd need $block->($_)
14:39 batman jberger: that's why i created the "item" helper :)
14:39 mst it's passing the entire array you're iterating over that was weird
14:39 mst and caused me to misparse the whole thing
14:39 jberger haha, yeah oops
14:39 batman +1
14:39 jberger that should be $block->($_) for $aref
14:39 jberger that should be $block->($_) for @$aref
14:39 mst and now everything makes sense.
14:40 * mst is also really fond of setting %_ but people tend to give me funny looks when I do that
14:40 mst (though not as many as when I set &_)
14:40 batman when do you do that?
14:40 jberger fixed, thanks
14:40 mst which ones?
14:40 batman both
14:41 mst local *_ = $hashref; $thing->($hashref);
14:41 mst is really nice
14:41 mst means you can use $_{key} inside the sub
14:41 mst local *_ = sub { ... } I use for extreme sugar if I'm really sick of typing $x->(...)
14:41 batman ah. of course. the exact same thing :)
14:41 mst _(...) is sometimes nicer
14:42 mst right, I always do it in the same spirit as $_
14:42 batman :)
14:42 mst but people don't expect it, so some of them still blink
14:42 mst note that Web::Simple does this for keyword params
14:42 mst so
14:42 * batman finds ice cream to celebrate %_
14:42 mst '/foo/:foo_id/bar/:bar_id' => sub {
14:42 mst gives you $_{foo_id} and $_{bar_id} already available
14:43 mst I should really see what happens if I dump the Web::Simple dispatch strategy on top of Mojo
14:43 batman is there any functions in perl that mess around with _(), %_ and @_ ?
14:43 batman sorry. nevermind @_
14:43 batman :)
14:44 mst mostly because I like -smart- routers, and sri's been pruning features that people use to get themselves into trouble
14:44 mst I don't think he'd want it to be as powerful as I want mine to be, and I'm very much ok with that
14:44 batman mst: it should be super simple: hook around_action => sub { *_ = $c->stash; pop->() }; # untested
14:44 mst if nothing else, if I'm going to let users loose with that much rope, I'd like them to know it was mine ;)
14:45 batman missing local and friends, but you get the idea
14:45 mst yeah
14:45 mst Web::Simple basically does 'local *_ = $_[0] if ref($_[0]) eq HASH'
14:46 jberger updated again, less code (using 'c' and drawing inspiration from batman's) but does involve a shallow copy of the array (for better or worse)
14:47 mst ideally, if they tries to modify the array while iterating over it in a template, a small gnome exits the back of the machine and hits the developer with a mallet :)
14:47 jberger (note also that this is my favorite feature of gist integration for Mojolicious::Command::nopaste), updating from the command line
14:48 jberger hehe
14:48 mst (the mallet gnome used to be kane's, then I gave him a new home :)
14:48 batman mst: The problem arise when trying to use %_ inside delay()
14:49 batman That's probably one good reason not to use this kind of "magic"
14:49 batman Difficult to explain why it doesn't work
14:49 mst ah, so, basically, what I say to people is
14:50 mst "you must only use this in the top-level sub {} call, not in nested subs, or it won't work right"
14:50 jberger batman: the problem is localization scope
14:50 mst or "look, you don't use $_ in a closure and expect it to be the same as outside, do you?"
14:55 batman jberger: You don't have to tell me :)
14:56 mst right, you need to setup a shared dynamic wind around chained callbacks
14:56 mst I think this only seems like a problem if you haven't taken scheme implementations apart for fun :)
14:59 ajr_ joined #mojo
15:08 ZoffixWork joined #mojo
15:26 gryphon joined #mojo
15:38 ZoffixWork Doesn't seem to be processing the block the same way as a plain ol' for() {}  (the "loop" thing)
15:39 ZoffixWork It does something to $_, right? http://fpaste.scsys.co.uk/497480
15:39 * ZoffixWork looks at batman's item
15:46 jzawodn joined #mojo
15:48 sh4 joined #mojo
15:51 batman Zoffix: it should‘t do anything special with $_
15:51 batman your every helper is so much smoother :)
15:53 ZoffixWork batman, I think the problem is 'begin' closes on the $_ and it doesn't get set to the $_ inside the map on every iteration.
15:53 ZoffixWork batman, I gave up trying to figure out and went with this. I think it's cleaner than the original @{ ... ||[]} business:   http://fpaste.scsys.co.uk/497481
15:54 ZoffixWork jberger++ batman++ # for helping
15:55 batman Zoffix: you missed out on %= on the first paste
15:56 mattastrophe joined #mojo
15:57 batman ZoffixWork: works like a charm: https://ssl.thorsen.pm/paste/f7cf6d717dfe
15:57 jabberwok has anyone got a recipe for getting pod2pdf (even the one with perlbrew 5.22) to produce PDFs from unicode like from Mojolicious?
15:58 PryMar56 joined #mojo
15:59 batman Zoffix: here's another version: https://ssl.thorsen.pm/paste/cce766a3ff5f
15:59 ZoffixWork batman++ # indeed, the %= fixes the issue
16:10 gryphon joined #mojo
16:20 ZoffixWork Went with 'items_in'... Looks fine to me: https://github.com/XTaTIK/XTaTIK/commit/5351a0ed80d5cc7c326332e4abf22d15f63bae75
16:20 jberger ZoffixWork: that's exactly my code ;-)
16:21 ZoffixWork jberger, the original that I mistakenly claimed had a problem? Yeah, I've used your sample.
16:22 ZoffixWork It does work, but then I noticed I often did stuff like   % if ( @{stash('foo')||[]} ) {....   so I went with another way
16:23 jberger ah ok
16:23 jberger functional deref
16:23 asarch joined #mojo
16:23 jberger rather than syntactic
16:24 ZoffixWork Yeah
16:38 batman Zoffix: does the new assetpack work better for you?
16:39 batman did you also see https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Preprocessor::Scss#SASS_PATH ?
16:41 batman ZoffixWork: ^
16:44 kwa joined #mojo
16:44 jontaylor joined #mojo
16:45 ZoffixWork batman, I was about to try it out, but got distracted with Facebook and coffee :) Doing so now. BTW in those docs, "need to hold" should be "needs to hold"
16:45 batman thanks! fixing that now
16:46 jabberwok "inherite" -> "inherits" too
16:48 batman bring it on :)
16:49 jabberwok copy/paste error: in Mojolicious::Plugin::AssetPack::Handler::Http -- "Mojolicious::Plugin::AssetPack::Handler::Sprites is a module that can fetch assets from web."  also: + "the" web.
16:50 ZoffixWork :)
16:52 batman *fixed*
17:01 tim_ joined #mojo
17:02 tim__ joined #mojo
17:06 dod joined #mojo
17:07 ZoffixWork batman, new assetpack works great :)
17:18 batman awesome!
17:18 batman thanks for the pr. it really helps.
17:28 neilhwatson joined #mojo
17:40 melo joined #mojo
18:05 hummeleBop joined #mojo
18:11 jontaylor joined #mojo
19:06 SmokeMachine joined #mojo
19:10 Lucas1 joined #mojo
19:19 bpmedley joined #mojo
19:43 asarch joined #mojo
20:24 cfedde I just found some old code that uses ->pluck  What replaces that?
20:27 mst cfedde: https://github.com/kraih/mojo/wiki/Upgrading says
20:27 mst "Mojo::Collection also no longer uses AUTOLOAD; the map method should be used for this functionality (as well as to replace the removed pluck method)."
20:28 cfedde thanks
20:29 KCL joined #mojo
20:30 mst that page is the first place to check for such questions
20:31 mst also, if it doesn't answer it, pleasepleaseplease edit it once you get the answer :)
21:06 Kogurr joined #mojo
21:07 Kogurr joined #mojo
21:42 Lucas1 joined #mojo
21:42 SmokeMachine joined #mojo
23:09 d4rkie joined #mojo
23:33 mattastrophe joined #mojo

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