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

IRC log for #mojo, 2015-01-23

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

All times shown according to UTC.

Time Nick Message
00:03 cpan_mojo MojoX-Session-Simple 0.05 by Da Shan Yang Geng - http://metacpan.org/release/YOWCOW/MojoX-Session-Simple-0.05
00:09 zivester joined #mojo
00:26 disputin joined #mojo
00:46 disputin joined #mojo
01:05 asarch joined #mojo
01:06 hshong joined #mojo
01:08 jonquest joined #mojo
01:44 inokenty-w joined #mojo
02:04 maze joined #mojo
02:05 jnbek joined #mojo
02:22 klapperl joined #mojo
03:03 asarch How can I change the "file extension" of the served files? For example 'layout/default.html.ep' to 'layout/default.xhtml.ep'
03:05 jnbek joined #mojo
03:05 asarch Bingo! $self->render(format => 'xhtml');
03:07 good_news_everyon joined #mojo
03:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/bPVu2A
03:07 good_news_everyon mojo/master 2076669 Sebastian Riedel: use less code for AUTOLOAD
03:07 good_news_everyon left #mojo
03:23 ignacio_ joined #mojo
03:25 jnbek joined #mojo
03:27 jnbek joined #mojo
03:30 jnbek joined #mojo
03:53 noganex_ joined #mojo
03:54 davido_ joined #mojo
04:11 Lee joined #mojo
04:17 memowe joined #mojo
04:36 skittles_ this is going to be an off the wall question, has anyone in here used golang?
04:37 skittles_ the main irc room for it, is not helpful.
04:48 muraiki_ :(
04:56 dabudabu They didn't want to tell you if anybody in there's ever used Go?
04:57 irq joined #mojo
05:00 Snelius :)
05:01 rem_lex joined #mojo
05:11 preaction https://metacpan.org/pod/Asset::File <- looks like people love Mojo::* so much, they just copy it
05:24 Snelius why? it's origonal code
05:24 Grinnz Moo based version, but same interface, heh
05:32 hernan604 joined #mojo
05:43 sri we should start thinking about the code name for mojolicious 6.0 :o
05:45 reneeb joined #mojo
05:46 btyler_ joined #mojo
05:46 dabudabu_ joined #mojo
05:46 lb_ joined #mojo
05:47 hernan604 joined #mojo
05:47 buu joined #mojo
05:47 kaare joined #mojo
05:47 jnbek joined #mojo
05:52 crab will mojolicious 6.0 run on arduino
05:59 good_news_everyon joined #mojo
05:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ybBppQ
05:59 good_news_everyon mojo/master 30f98c5 Sebastian Riedel: mention data attribute handling
05:59 good_news_everyon left #mojo
06:07 Snelius crab: what is problem with mojo 5 on that platform?:)
06:07 Snelius sri: what is theme? :)
06:12 Grinnz U+1F0A1 Ace of Spades
06:16 * sri tends towards U+1F37A Beer Mug
06:17 reneeb joined #mojo
06:19 sri U+1F47E Alient Monster has also been thrown around for a few releases now
06:19 sri s/t//
06:20 Snelius output: Monser
06:20 Snelius (8
06:20 sri ????
06:21 Snelius "Beer Mug" nice
06:21 Grinnz U+1F69B Articulated Lorry
06:21 sri oooh
06:21 Grinnz just because i recently found out that means semi truck
06:21 sri U+1F37B Clinking Beer Mugs
06:21 sri ????
06:22 Grinnz U+29D3 Black Bowtie
06:23 Snelius Black Metal
06:23 * jberger likes Ace of Spaces
06:23 jberger sri: your instinct was right
06:23 * sri votes for Clinking Beer Mugs
06:23 Snelius jberger: by Motohead ? :)
06:24 jberger I have been able to remove all Test::Mojo usage in the primary PhantomJS interface and still keep it sane
06:24 sri :)
06:24 jberger why doesn't my Symbola font take over on my Mac?
06:25 jberger I'm not seeing the characters you are posting :)'(
06:25 jberger :'(
06:25 sri which client?
06:25 jberger chrome
06:25 Grinnz they arent working in my font either :P
06:25 sri haha
06:25 sri chrome doesn't do emoji fonts
06:25 jberger works on linux
06:25 sri chrome os x limitation
06:26 jberger this whole thing sucks
06:26 * jberger misses linux
06:26 sri os x has a beautiful emoji font
06:26 Grinnz U+2449 OCR Customer Account Number # wat
06:26 sri it's just chrome where it doesn't work yet
06:26 jberger firefox?
06:26 purl i heard firefox was the best browser or rumored to not be HIG-compliant on Mac OS X, which darkens the claim on "best" or not emacs compatable on the gnu system, what the fuck is up with that? or http://xkcd.com/c198.html or http://xrl.us/5piy
06:26 sri other browsers like safari have it
06:26 crab i like clinking beer mugs too
06:27 marmez joined #mojo
06:27 sri jberger: yes, firefox has it
06:27 Snelius irssi have not
06:27 sri irssi on os x does
06:27 Snelius oh..
06:27 sri with Terminal.app
06:28 Snelius custom fonts i think
06:28 jberger yeah, safari works, confirmed
06:28 Grinnz the font in a terminal is up to the terminal, not the cli
06:28 jberger weird
06:28 Snelius terminus on my putty + irssi
06:29 sri one of the few good things with my irssi setup... Terminal.app + ssh + tmux + irssi and emojis just work :)
06:29 Snelius :)
06:29 jberger Chicago.pm talk on Mojo went well
06:29 jberger next up MadMongers in a couple weeks
06:31 jberger but now its past my bedtime, nn all
06:32 * sri is about to get breakfast
06:33 sri o/
06:33 skittles_ joined #mojo
06:34 Snelius do u all using macosx?
06:34 Grinnz i did once, on someone else's ma
06:34 Grinnz mac*
06:35 crab i've never used macosx, except once via ssh to someone's machine to make something compile. and that probably doesn't count.
06:35 jberger sri: timezones are weird
06:35 crab jberger: i'm about to have lunch!
06:35 basiliscos joined #mojo
06:35 jberger Snelius: $new_work offered me one, I love the battery life, I'm meh on the rest
06:35 jberger crab: hehe
06:35 preaction timezones are hell...
06:36 Snelius jberger: air ?
06:36 purl air is The Annal of Irreproducible Research. or a rival to JIR or a French touch music band
06:36 jberger mbp, all solid state
06:36 Snelius nice)
06:36 jberger I can work on it unplugged essentially all day
06:36 crab wow
06:36 Snelius perl on mbp
06:36 crab since we don't have power right now, i am rather impressed by that
06:37 jberger anything heavy duty would eat into that of course, but editing code and running the occaisonal test is basically nothing to it
06:37 Snelius jberger: what editor do you use?
06:37 jberger vim
06:37 Snelius oh
06:38 jberger anyway, really this time, nn
06:38 Snelius it is not usable for multi sources session for me
06:39 preaction multi sources session?
06:39 Snelius multitabs :)
06:39 preaction there's plenty of tabbing and multi-pane inside vim
06:39 preaction but also, that's what tmux is good for
06:40 Grinnz i just use gui editors, which have actual tabs i can click
06:40 Snelius tab commands very ugly for vim, imho
06:40 Snelius Grinnz: yep! me too
06:40 buu What I want to know is how do people still use those awful track sticks on 'lenovos'
06:40 preaction gt and gT. :tabnew, :tabedit <file>.
06:40 buu Those can't be acurate at all
06:40 Grinnz hey i liked the nipple
06:40 buu why
06:40 Grinnz better than the touchpad (but thats not saying much)
06:41 preaction i tried the red button. i really did...
06:41 buu Its like a joystick
06:41 Grinnz although touchpads are a lot better since i've used the nipple
06:41 buu touchpads are mice
06:41 Grinnz no
06:41 Grinnz it takes like 3 strokes to go from one side of the screen to the other
06:41 buu huh?
06:41 buu It takes me like .8
06:41 preaction you can adjust the speed
06:41 Snelius buu: yep, i like my thinkpad with it!!)
06:41 preaction it takes me about 1cm
06:41 Grinnz then its less precise
06:42 Grinnz anyway i just use a mouse
06:42 buu Its still more precise than an input consisting of merely a direction and a pressure
06:42 Grinnz on my lenovo though, the nipple was way better than the touchpad
06:42 Grinnz that was in 2005, though
06:43 Grinnz actually, that was when it was still called an IBM
06:44 * sri has been using macbooks for so long, he doesn't even remember how bad other touchpads were/are
06:45 Grinnz this one's ok i guess, but even this crappy portable mouse beats it easily
06:46 Grinnz and somehow i just froze the display messing with it
06:48 sri good old linux
06:49 D4RK-PH0ENiX joined #mojo
06:49 sri i don't mess with the operating system anymore these days... so i appreciate the "it just works" of os x
06:50 Snelius sri: do u vim'er too ?:)
06:50 sri although i do try not to be too dependent on non-portable os x apps
06:50 sri i use Atom
06:51 Grinnz sri, this is an optimus laptop, so weird display issues are unsurprising
06:51 kaare_ joined #mojo
06:51 Grinnz i'm just glad i got this setup working at all
06:51 Grinnz optimus is such a pain in the ass, i would hate nvidia for it if maxwell gpus werent so nice
06:51 basiliscos1 joined #mojo
06:51 sri only my design apps would make switching to linux a bit painful
06:55 Grinnz joined #mojo
07:04 crab i have an optimus laptop too (thinkpad t430s), but i just use the non-nvidia chipset and i'm happy
07:12 Snelius )
07:13 Snelius my t420 battery only enough for two hours :(
07:15 jnbek_ joined #mojo
07:17 buu joined #mojo
07:21 mgrimes joined #mojo
07:21 bowtie joined #mojo
07:25 skittles_ joined #mojo
07:35 rem_lex joined #mojo
07:39 dotandimet joined #mojo
07:46 fhelmber_ joined #mojo
07:49 kaare joined #mojo
07:57 ovnimancer joined #mojo
07:59 eseyman joined #mojo
08:04 crab two hours?!
08:04 purl two hours is so far and above what's reasonable, even for an advanced trainee.
08:06 inokenty-w joined #mojo
08:06 alnewkirk joined #mojo
08:06 jb360 joined #mojo
08:06 muraiki joined #mojo
08:06 xtetsuji_ joined #mojo
08:06 Dandre joined #mojo
08:07 dod joined #mojo
08:07 hernan604 joined #mojo
08:10 Vandal joined #mojo
08:11 trone joined #mojo
08:24 irq joined #mojo
08:32 marmez joined #mojo
08:39 McA joined #mojo
08:45 fhelmbe__ joined #mojo
08:45 McA joined #mojo
08:47 dotandimet joined #mojo
09:22 mib_zb5idg joined #mojo
09:28 jkramer Mojo::UserAgent seems to have a problem with umlaut domains
09:29 jkramer perl -Mojo -E 'say g("http://jobs-im-südwesten.de/")->code'
09:29 jkramer => Problem loading URL "http://xn--jobs-im-sdwesten-o3a9j.de/": Can't connect: Name or service not known
09:30 jkramer With curl/$BROWSER the same URL works just fine
09:30 sri works for me
09:31 moritz jkramer: don't you need "use utf8;" ?
09:31 * sri did "mojo get http://jobs-im-südwesten.de" though
09:31 moritz my punycode library says xn--jobs-im-sdwesten-rzb.de
09:32 moritz sri: I guess that properly utf-8-decodes the command line argument
09:32 jkramer moritz: Indeed you're right, with -Mutf8 it works fine
09:32 moritz but jkramer's example doesn't
09:55 denis_boyun joined #mojo
10:03 fhelmber_ joined #mojo
10:08 fhelmber_ joined #mojo
10:13 sri interesting that oose.pm and oo.pm use Filter::Simple http://api.metacpan.org/source/ETHER/Moose-2.1403/lib/oose.pm
10:14 sri wonder if there's a better way to handle the Mojolicious::Lite import in ojo.pm too https://github.com/kraih/mojo/blob/master/lib/ojo.pm#L18
10:15 jkramer Here's a proposal for a change: in ->on(), allow multiple events. E.g. $delay->on(finish => sub{}, error => sub {}, ...)
10:15 sri has been proposed a few times before
10:16 sri there were good reasons not to do it i believe
10:20 jkramer Same for app->helper
10:21 jkramer I checked the source of ->on, it doesn't take any addition arguments after the callback, so there wouldn't be any confusion
10:21 jkramer *additional
11:45 batman jkramer: i do believe the reason is that on() returns the reference to $cb.
11:46 batman so you can do $cb = $obj->on(foo => sub {}); .... $obj->unsubscribe($cb);
11:46 pink_mist it can return a list of all the refs :P
11:47 pink_mist oh wait, then we do what CGI.pm does with ->params()
11:47 pink_mist :>
11:47 batman pink_mist: so how do you know which order it would be with $obj->on(%map); ?
11:47 batman nevermind the last comment...
11:48 batman it's stupid
11:48 pink_mist if you do it like that, you clearly don't care about the order, so you better figure it out yourself :P but it's still not a good idea to it like that :P
11:49 pink_mist *to do it
11:50 batman yeah, that's why "it's stupid"
11:53 cpan_mojo Mojolicious-Plugin-AssetPack 0.34 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.34
12:06 cpan_mojo Mojolicious-Plugin-Riotjs 0.01 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Riotjs-0.01
12:06 cpan_mojo Mojolicious-Plugin-Materialize 0.95 by MUDLER - http://metacpan.org/release/MUDLER/Mojolicious-Plugin-Materialize-0.95
12:08 cpan_mojo Mojolicious-Plugin-Materialize 0.9501 by MUDLER - http://metacpan.org/release/MUDLER/Mojolicious-Plugin-Materialize-0.9501
12:37 asarch joined #mojo
12:47 neilhwatson joined #mojo
13:01 jkramer I'm getting this error and don't know what causes it: Use of uninitialized value $_[1] in string at /home/jkramer/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/Mojo/Util.pm line 111.
13:02 jkramer Mojo v5.72
13:08 pink_mist and what are you doing exactly when this happens? :P a runnable testcase would be excellent :P
13:09 jkramer Nothing special. As I said, no idea what's causing this. Wait a second, I'll hook into warn() and print a stacktrace
13:10 jkramer https://dpaste.de/BbAz/raw
13:11 jkramer Still don't know which of my code triggers this :D
13:12 jberger I believe -MCarp::Always does that for you
13:13 jkramer I did $SIG{__WARN__} = sub { cluck("@_") }
13:13 nicomen jkramer: my $ 1/2 t = Test::Mjo->new() perhaps?
13:13 tencendur joined #mojo
13:13 jkramer nicomen: Sorry, what?
13:14 nicomen jkramer: I meant, it looks like something that happens when you do that
13:14 jberger jkramer: what were you doing with it
13:14 jberger nicomen: sorry it makes no sense to me either
13:14 nicomen none of the stacktrace is non-mojo code, are you running morbo alone?
13:15 jkramer nicomen: No, it's a an actual app that does things - but it's run with morbo
13:15 jberger jkramer: did you try running it in daemon debug mode?
13:15 jkramer jberger: Not too much. Fetching some URLs which return JSON, extract some values from the JSON and render those as a new JSON
13:16 jberger ok so try daemon and useragent debug modes
13:16 jkramer jberger: You mean like ./ws daemon -m debug or what? Sorry, not sure what you mean with debug mode
13:18 jkramer Ah I guess you mean MOJO_USERAGENT_DEBUG=1
13:18 jberger MOJO_DAEMON_DEBUG=1
13:18 jberger yep
13:18 jberger both
13:18 jberger sorry I'm on a phone so typing that is slow
13:21 jkramer http://dpaste.com/1D1Y8F4
13:23 ignacio_ joined #mojo
13:26 jberger are you getting all of the right throughput?
13:27 jberger if your mojo is the same as master, you are trying to utf8 encode undef, which just gives you '' and a warning
13:27 jberger I wouldn't be too worried about it
13:29 jkramer The result is ok, all requests succeed and the JSON gets parsed fine. Still I want to know why there's a warning and where it comes from :)
13:30 jkramer And how to get rid of it of course :D
13:30 jberger good luck
13:30 purl You'll need it.
13:30 * jberger pats purl
13:30 purl how condescending
13:43 Ptolemarch joined #mojo
13:48 jkramer Just out of curiosity - what's supposed to be the first argument to the callback I get from $delay->begin? Apparently the default offset for the stuff passed on to the next step is 1, so what's the first argument for?
13:49 jkramer Currently I'm calling $cb->(undef, $data_to_pass_on)
13:50 jberger jkramer: that sounds like you want the $delay->pass method
13:51 noganex_ mh... i've encrypted some binary data with aes-256-cbc and i'm using $self->render(data => $aes) but i'm getting two different md5sums.
13:51 sri http://mojolicio.us/perldoc/Mojo/IOLoop/Delay#begin
13:51 noganex_ could this be an encoding issue?
13:51 jberger that callback is typically invoked as the callback to a non-blocking function, the offset slices off the invocant
13:52 jkramer What's the invocant? I've written a non-blocking function which takes $delay->begin from the the caller, and then calls the callback when it's finished. I mean, it works, but I'm still wondering if I should put something more meaningful in the first arg
13:53 sri $self
13:53 jkramer That would be $c in this case.
13:54 sri no, $self is an invocant
13:54 jkramer The non-blocking function is a helper
13:54 purl okay, sri.
13:54 sri it's the object a method was called on
13:54 jkramer Yeah, that'd be $c in this case
13:55 sri i'm confused now... your question was literally "What's the invocant?"
13:55 * sri shrugs
13:55 jkramer Yeah I'm confused as well
13:57 jkramer Well $c is the object the method was called on: $c->my_non_blocking_helper($delay->begin); So  inside my_non_blocking_helper do I call $cb->($c, $mystuff)?
13:59 jkramer (Also inside the helper it's called $c as well, not $self)
14:13 jberger purl: forget The non-blocking function
14:13 purl jberger: I forgot non-blocking function
14:14 jberger purl: no, the invocant is the first argument to a method call
14:14 purl okay, jberger.
14:15 jberger purl: no, the invocant is the first argument when a sub is called as a method
14:15 purl okay, jberger.
14:15 jberger better
14:16 jberger jkramer: yes that is the typical pattern
14:16 jberger I do usually denote that the invocant to a helper is $c, since it is a controller instance
14:32 zivester joined #mojo
14:36 jkramer Is there an awesome cache plugin for mojo that supports layered CHI cache backends and is non-blocking?
14:36 jkramer Found only this, but it seems to be blocking: https://github.com/Akron/Mojolicious-Plugin-CHI
14:36 fhelmbe__ joined #mojo
14:36 jberger jkramer: well volunteered!
14:36 purl you da /(wo)?man/!
14:37 * jberger channels his inner mst
14:37 muraiki joined #mojo
14:38 alnewkirk joined #mojo
14:38 Vandal joined #mojo
14:38 dod joined #mojo
14:38 jb360 joined #mojo
14:39 hernan604 joined #mojo
14:39 xtetsuji_ joined #mojo
14:39 Dandre joined #mojo
14:39 ignacio_ joined #mojo
14:57 cpan_mojo Mojo-Log-JSON 0.03 by Michael Jemmeson - http://metacpan.org/release/MJEMMESON/Mojo-Log-JSON-0.03
14:58 irq_ joined #mojo
15:02 cpan_mojo Mojolicious-Plugin-LinkedContent 0.07 by OLG - http://metacpan.org/release/OLG/Mojolicious-Plugin-LinkedContent-0.07
15:03 jberger sri: I'm curious if I'm being over pedantic here: https://github.com/jberger/Test-Mojo-Phantom/blob/master/lib/Test/Mojo/Role/Phantom.pm#L35-L38
15:04 jberger execute_url calls ->wait internally so I really don't have to do the start/stop schennanigans, and yet, for some reason I feel like its the right thing to do here
15:04 jberger what do you think?
15:04 purl I think jberger should try flossing more often!
15:04 jberger I wish I could disagree :/
15:07 jberger anyway, my phantom stuff needs more error handling, a lot more documentation and a few more tests, but it's getting close
15:07 jberger it also needs the new Test::Simple to be released as stable
15:17 sh4 joined #mojo
15:19 Grinnz rofl purl
15:19 Grinnz crab, using the non-nvidia chipset would defeat the entire purpose of getting this laptop with a super-nice maxwell gpu
15:47 zackiv31 joined #mojo
15:57 marmez joined #mojo
16:04 crab Grinnz: sure, i wasn't suggesting what you should do. just explaining what i did.
16:05 crab i bought my laptop for everything else than the nvidia chip; i don't even remember what it is. probably not anything super-nice.
16:08 punter joined #mojo
16:14 human39 joined #mojo
16:28 good_news_everyon joined #mojo
16:28 good_news_everyon [mojo] kraih tagged v5.73 at fa1a300: http://git.io/1JTuXA
16:28 good_news_everyon left #mojo
16:29 good_news_everyon joined #mojo
16:29 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Zihc_Q
16:29 good_news_everyon mojo/master a3e1cc4 Sebastian Riedel: bump version
16:29 good_news_everyon left #mojo
16:30 cpan_mojo Mojolicious 5.73 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.73
16:33 zackiv31 joined #mojo
16:33 jberger sri++
16:33 sri \o/
16:35 jberger which reminds me, riche, last year marcus got to choose the code-name because he hosted MojoConf, if you host we might offer you the same ?
16:35 sri he didn't actually get to choose, he just made a proposal that got the votes ;p
16:39 sri i'm not sure which unicode character would best represent new york
16:40 jberger U+1F34E
16:41 sri i'm not gonna look that up ;p
16:41 jberger its an apple
16:41 Adura All the boxes with numbers/letters in them are pretty similar to me.
16:41 jberger RED APPLE
16:41 jberger Adura: install Symbola
16:41 jberger http://users.teilar.gr/~g1951d/
16:42 sri ???? Cityscape At Dusk
16:42 sri ???? Statue Of Liberty
16:42 jberger for "city that never sleeps", not bad
16:42 sri !
16:42 jberger riche?
16:42 purl i heard riche was at the train station waiting for the forex place to open
16:42 jberger hahaha
16:43 sri which is U+1F5FD btw.
16:46 sri U+1F693 Police Car if i get detained at the airport :)
16:47 Adura joined #mojo
16:48 Adura Seems I'd have to go to 16 pt or higher to actually see them.
16:49 jberger I would be surprised by that
16:49 Adura I mean, they're there... just small, heh.
16:50 sri lets see how the new tutorial is working out https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides.pod#TUTORIAL
16:50 jberger I have high hopes
16:50 sri this one looks so empty now :o https://metacpan.org/pod/Mojolicious::Lite
16:51 jberger IMO that's how that one should look
16:52 * sri nods
16:52 sri guess it does give the right impression
16:58 * crab reads
17:03 hernan604 joined #mojo
17:08 amon joined #mojo
17:12 jberger crab, the important part is that we moved the tutorial section from Mojolicious::Lite to its own guide
17:12 jberger so now Mojolicious::Lite doc is just the function reference for ::Lite
17:13 dod joined #mojo
17:17 niczero spooky that v5.72 is pretty much exactly a year after v4.72
17:19 * niczero battles to remember that Mojo::Message uses $err->{advice} while Mojo::UserAgent uses $err->{code}
17:20 niczero actually, that's not even true; I'm even more confused that I thought
17:21 jberger niczero: not really spooky, we've been on 100 releases per year for the whole time I've been on the team
17:21 niczero and that's not spooky?
17:21 jberger not especially
17:21 sri lets break the cycle and release 6.0 tomorrow ;p
17:22 niczero \o/
17:22 Grinnz_ lol
17:23 niczero /o\
17:23 jberger I could not find an appropriate meme, so you get this:
17:23 jberger http://cdn.meme.li/instances/250x250/54449800.jpg
17:24 Grinnz_ indeed.
17:24 niczero not sure 'meme' is something you should be searching for
17:25 jberger the deepest bench is clearly "haters gonna hate meme"
17:25 niczero Anyway, don't distract me.  I'm going to figure out this code vs advice thing and memorise it
17:25 jberger CHALLENGE ACCEPTED!
17:25 jberger :-P
17:27 dotandimet joined #mojo
17:28 sri http://mojolicio.us/perldoc/Mojo/Message#error
17:30 niczero So code is wot got sent by the other end, and advice is something that happened in software (at our end)?
17:32 dod joined #mojo
17:36 good_news_everyon joined #mojo
17:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/q-uW-A
17:36 good_news_everyon mojo/master 45cd983 Sebastian Riedel: better description for error method
17:36 good_news_everyon left #mojo
17:37 disputin joined #mojo
17:37 niczero nice
17:39 good_news_everyon joined #mojo
17:39 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/gJZaZw
17:39 good_news_everyon mojo/master c814925 Sebastian Riedel: more precise error description
17:39 good_news_everyon left #mojo
17:41 sri hmm, now i wonder if we should be setting advice at all
17:42 sri it's not actually used internally
17:43 niczero yeah, just spotted that
17:43 niczero nowhere does advice get promoted to error
17:43 niczero erm, I mean code
17:45 niczero For the useragent, it looks to me like advice can never play a part
17:48 niczero ah, it does play a part; tx still flags ->error if advice has been set, even if there's no code
17:49 niczero So I guess the logger in my useragent wrapper should check $err->{code} || $err->{advice}
17:49 denis_boyun joined #mojo
17:53 good_news_everyon joined #mojo
17:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ijzjvw
17:53 good_news_everyon mojo/master bc79ba7 Sebastian Riedel: improve parser errors to be more consistent with connection errors in Mojo::Message::Request and Mojo::Message::Response
17:53 good_news_everyon left #mojo
17:55 sri you have to support the case without advice anyway, so its a very safe removal
17:55 sri it was actually legacy, we used to take the advice value and make it the default response code
17:59 niczero if (my $err = tx->error) { $log->error(sprintf 'Got %u: %s', $err->{code} || 418, $err->{message}) }
17:59 niczero thanks, sri, that clears my head and makes my code simpler too
18:05 good_news_everyon joined #mojo
18:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/BUyBMw
18:05 good_news_everyon mojo/master 99b942e Sebastian Riedel: no need to link to error method
18:05 good_news_everyon left #mojo
18:22 cpan_mojo Mojolicious-Plugin-JSUrlFor 0.16 by Viktor Tuskyi - http://metacpan.org/release/KOORCHIK/Mojolicious-Plugin-JSUrlFor-0.16
18:29 trone joined #mojo
18:55 rwp joined #mojo
19:02 ashleydev joined #mojo
19:11 jberger good change, that was confusing for me too
19:18 dotandimet joined #mojo
19:23 good_news_everyon joined #mojo
19:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Dn-KRg
19:23 good_news_everyon mojo/master 94c9301 Sebastian Riedel: better description for error method
19:23 good_news_everyon left #mojo
19:39 zackiv31 joined #mojo
19:42 disputin joined #mojo
19:50 Grinnz_ i was trying out adding tests for routes that set optional placeholder defaults to undef, but the route tests currently are too low level to test that... dunno if theres a more suitable place where i could test that $c->param falls back to GET/POST
19:57 sri Grinnz_: that seems like a bad idea
19:58 Grinnz_ sri: did you see the discussion about this? i'm not sure about it, but it would be nice as a feature
19:59 sri precedence rules are pretty straight forward now, that would be a special case that needs special documentation
19:59 Grinnz_ http://irclog.perlgeek.de/mojo/2015-01-22#i_9986558
20:00 sri http://mojolicio.us/perldoc/Mojolicious/Controller#param
20:00 sri that would be false afterwards
20:00 Grinnz_ false how?
20:00 sri GET/POST parameters would have a higher precedence if the default placeholder value was undef
20:01 Grinnz_ that is already what happens, it seems
20:01 sri ohoh
20:03 sri i can't confirm that
20:03 sri perl -Mojo -E 'a("/:foo" => {foo => undef, inline => q{%= $foo}})->start' get /?foo=bar
20:03 denis_boyun joined #mojo
20:04 Grinnz_ it works with the oneliner i posted before
20:04 Grinnz_ perl -Mojo -lE 'a("/:type" => {type => undef} => sub { my $c = shift; $c->render(json => {type => $c->param("type")}); })->start' get /?type=asdf
20:05 sri oh, that's a security issue
20:06 Grinnz_ ?
20:07 sri or maybe not, but it's a bug
20:07 Grinnz_ seems so
20:08 sri i'll fix it
20:08 Grinnz_ i do wish there was still a way to do what i was trying to do without two separate routes though
20:09 Grinnz_ but doing it through this way is pretty special-casey
20:09 sri actually it is a security issue, since it bypasses constraints on the placeholder value
20:11 sri not super serious, but i guess we'll have a new release soonish
20:19 damaya joined #mojo
20:20 damaya I am adding query params to my url using $url->query({}); Now, sometimes there are things that get added like 'term1 / term2'. The problem I am having, the '/' in 'term1 / term2' is not being encoded.
20:20 damaya Is there any way to encode it?
20:20 mst once you're past the ?, why does it need encoding?
20:21 damaya Odd, it doesn't need to be escaped either? I'm getting errors if the query has a '/' in it.
20:22 damaya I think this is a Lucene issue. Works if I double quote the term with '/' in it.
20:23 Grinnz_ you can probably percent-encode the / with no issue, but you shouldn't need to
20:23 Grinnz_ oh, he left
20:36 asarch joined #mojo
20:38 good_news_everyon joined #mojo
20:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Lwl8ow
20:38 good_news_everyon mojo/master 488576e Sebastian Riedel: fixed bug where placeholder default values would not always have precedence
20:38 good_news_everyon left #mojo
20:40 denis_boyun joined #mojo
20:52 sri Grinnz_: i don't see how you could add your feature without a security problem
20:55 Grinnz_ sri: it would need to be something to explicitly specify to avoid that
20:55 Grinnz_ i.e. it is expected to be a GET/POST
20:56 disputin joined #mojo
20:56 Grinnz_ but i can't think of any other way
21:01 rem_lex joined #mojo
21:05 cpan_mojo Rex-Repositorio 0.5.0 by Jan Gehring - http://metacpan.org/release/JFRIED/Rex-Repositorio-0.5.0 (depends on Mojolicious::Commands)
21:13 marmez joined #mojo
21:22 kaare joined #mojo
21:55 denis_boyun joined #mojo
22:17 denis_boyun_ joined #mojo
22:32 skittles_ joined #mojo
22:37 buu joined #mojo
22:43 buu joined #mojo
22:53 buu joined #mojo
23:00 punter joined #mojo
23:12 * sri yawns
23:24 reneeb joined #mojo
23:30 zackiv31 joined #mojo
23:31 buu joined #mojo
23:48 muraiki_ joined #mojo
23:50 punter joined #mojo

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