Camelia, the Perl 6 bug

IRC log for #mojo, 2012-11-15

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

All times shown according to UTC.

Time Nick Message
00:16 jayallen_ joined #mojo
00:17 mire_ joined #mojo
00:17 xaka joined #mojo
00:17 dabudabu joined #mojo
00:17 batman joined #mojo
00:17 inokenty joined #mojo
00:17 alester joined #mojo
00:17 Mike-PerlRecruiter_ joined #mojo
00:17 dbr joined #mojo
00:17 Britzel joined #mojo
00:17 noganex joined #mojo
00:17 dwierenga joined #mojo
00:17 duncanthrax_work joined #mojo
00:17 Kulag joined #mojo
00:17 mtths joined #mojo
00:17 jberger joined #mojo
00:17 arthas joined #mojo
00:17 robinsmidsrod joined #mojo
00:17 Caelum joined #mojo
00:17 charsbar__ joined #mojo
00:17 zivester joined #mojo
00:17 rwstauner joined #mojo
00:17 chansen joined #mojo
00:17 Mikey joined #mojo
00:37 jzawodn joined #mojo
00:37 gryphon joined #mojo
00:37 marty joined #mojo
00:37 d4rkie joined #mojo
00:37 mikegrb joined #mojo
00:37 drift joined #mojo
00:37 sri joined #mojo
00:37 kwa joined #mojo
00:37 baton8 joined #mojo
00:37 kongelaks joined #mojo
00:37 nic joined #mojo
00:37 kvorg joined #mojo
00:37 jwang joined #mojo
00:37 njlg joined #mojo
00:37 dross joined #mojo
00:37 crab joined #mojo
00:37 trone joined #mojo
00:37 SmokeMachine joined #mojo
00:37 janus joined #mojo
00:37 migo joined #mojo
00:37 tempire joined #mojo
00:37 bc547 joined #mojo
00:37 JiYu joined #mojo
00:37 romel joined #mojo
00:37 rafl joined #mojo
00:37 ZadYree joined #mojo
00:37 omega joined #mojo
00:37 diegok joined #mojo
00:37 mike_ joined #mojo
00:37 andrefs joined #mojo
00:37 avenj joined #mojo
00:37 rhaen joined #mojo
00:37 tomi-ru joined #mojo
00:37 ashleydev joined #mojo
00:37 allison joined #mojo
00:37 HtbaaPi joined #mojo
00:37 kmx joined #mojo
00:37 tokuhirom joined #mojo
00:37 bjoernfan joined #mojo
00:37 xxtjaxx_ joined #mojo
00:37 patspam joined #mojo
00:37 gabiruh joined #mojo
00:37 jmmills joined #mojo
00:45 marty joined #mojo
00:56 laouji joined #mojo
01:07 hlin joined #mojo
01:18 Mike-PerlRecruiter_ joined #mojo
01:19 jayallen joined #mojo
01:19 baton8 joined #mojo
01:23 d4rkie joined #mojo
01:23 egopro joined #mojo
01:54 motoboi joined #mojo
02:18 kongelaks_ joined #mojo
02:46 xaka joined #mojo
02:56 dvinciguerra joined #mojo
03:18 egopro joined #mojo
03:30 noganex joined #mojo
03:44 egopro joined #mojo
04:22 yakudza_ joined #mojo
05:06 mpgutta joined #mojo
05:07 Adurah joined #mojo
05:36 Molaf joined #mojo
05:49 spleenjack joined #mojo
05:54 Foxcool joined #mojo
06:20 d4rkie joined #mojo
06:30 rem_lex joined #mojo
06:42 dpetrov_ joined #mojo
06:43 kitt_vl joined #mojo
07:19 Vandal joined #mojo
07:26 davido joined #mojo
07:28 ladnaV joined #mojo
07:43 dod joined #mojo
07:55 mire_ joined #mojo
07:56 egopro joined #mojo
07:59 egopro joined #mojo
08:00 egopro joined #mojo
08:00 Vandal joined #mojo
08:13 dod joined #mojo
08:17 yakudza_ joined #mojo
08:22 fhelmber_ joined #mojo
08:24 egopro joined #mojo
08:38 mire_ joined #mojo
08:47 aptituz joined #mojo
08:56 iskyee joined #mojo
09:08 memowe joined #mojo
09:13 Molaf joined #mojo
09:14 Molaf_ joined #mojo
09:16 ver joined #mojo
09:20 ver joined #mojo
09:20 memowe joined #mojo
09:37 bpmedley joined #mojo
09:44 * sri yawns
09:45 Britzel_ joined #mojo
09:47 dpetrov_ morning
09:48 Averna1 joined #mojo
09:55 egopro joined #mojo
09:59 sri o/
10:02 dotan joined #mojo
10:03 kwa What's the best way for me to write a block of code in a template, to then be used in a layout? E.g. I want to put small snippets of Javascript in my templates to keep them self-contained.
10:03 kwa I thought block, but can't seem to get it to do what I wanted.
10:04 buu joined #mojo
10:04 sri http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Content_blocks
10:05 kwa Cheers.
10:07 kwa Perfect, thanks.
10:09 cosmincx joined #mojo
10:11 dabudabu joined #mojo
10:16 dod joined #mojo
10:17 dod joined #mojo
10:21 cosmincx joined #mojo
10:22 dod joined #mojo
10:24 Elraraniel joined #mojo
10:25 Elraraniel Say I wanted to locate my templates separate from my code base (such as a file share). Is there a good way to tell mojo to look in a different folder than its own "templates" as the base directory?
11:12 ObseLeTe joined #mojo
11:31 batman joined #mojo
11:31 CfuDev joined #mojo
11:31 batman left #mojo
11:33 batman joined #mojo
11:39 CfuDev joined #mojo
11:47 * sri wonders if Mojo::IOLoop->has_ipv6 and Mojo::IOLoop->has_tls should exist
11:48 mire_ joined #mojo
11:48 CfuDev Hi . . .
11:48 CfuDev I try to run the script : https://raw.github.com/rackerhacker/​MySQLTuner-perl/master/mysqltuner.pl
11:49 sri o/
11:49 CfuDev but I get the error : Attempt to reload diagnostics.pm aborted. Compilation failed in require at (eval 2050) line 42, line 647. BEGIN failed--compilation aborted at (eval 2050) line 42, line 647. ,
11:49 CfuDev can somebody to help me ?
11:49 sri you might want to try #perl-help
11:49 sri this channel is about mojolicious
11:50 CfuDev #perl-help is empty
11:50 CfuDev there is nobody to talk with
11:50 sri then try #perl on freenode
11:51 crab sri: cfudev seems to be trying many different channels
11:51 sri CfuDev: spamming your question to every channel on this network is extremely rude and will prolly get you banned
11:51 sri crab: just noticed
11:54 * sri wonders who could care about has_ipv6 and has_tls
11:54 sri maybe batman
11:54 kwa He's too busy fighting crime.
11:55 batman sri: nah. i will simply do the same check as IOLoop
11:56 batman or maybe an even simpler check
11:56 kwa My local superhero 'knight warrior' might care (inbetween picking up bins). http://menmedia.co.uk/manchestereveningne​ws/news/s/1454070_salford-crime-fighter-k​night-warrior-becomes-a-youtube-hero--and​-hazel-blears-wants-to-be-his-sidekick
11:56 sri batman: but you're not allowed to :o
11:56 batman haha
11:56 sri batman: you mean Mojo::IOLoop::Server::IPV6?
11:56 batman sri: i wouldn't clutter the IOLoop api with those two methods
11:56 batman sri: yeah, something like that
11:56 sri yea, those constants are not public api
11:57 zpmorgan joined #mojo
11:57 batman i know. i think i would do if $INC{...}
11:57 CfuDev @sri: Thanks :)
11:57 CfuDev I used the #perl in freenode
11:57 batman sri: i'm not against it, i just don't think you should clutter the api :)
11:58 sri batman: so you're against it :p
11:59 batman nah "don't think" != "against it"
11:59 batman but i know _i_ wouldn't add those two methods
11:59 batman maybe i would rahter document Mojo::IOLoop::Server::IPV6
11:59 batman it's for hardcore devs, not the common user
11:59 batman imo
11:59 * batman is hardcore dev. (in case that wasn't obvious...)
11:59 batman hehe
12:02 sri http://pastie.org/5381994 # that's what i had in mind, but i guess it will not get merged
12:02 batman i don't think it's worth it.
12:03 batman but you decide :)
12:05 good_news_everyone joined #mojo
12:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/_S5Yww
12:05 good_news_everyone mojo/master 1dd9586 Sebastian Riedel: removed unnecessary dependency
12:05 good_news_everyone left #mojo
12:06 sri naah, if there is no demand i'm not gonna add it
12:06 batman :)
12:06 batman btw...you're right: i am against it
12:06 batman i hate clutter
12:06 batman :)
12:07 sri i guess if someone wants to make sure IPv6 or TLS are available they can just add a "use IO::Socket::IP; use IO::Socket::SSL;"
12:08 batman sri: that _is_ true!
12:14 Mithaldu joined #mojo
12:14 Mithaldu hey guys, i'm trying to find out how different frameworks deal with encoding in query/body parameters
12:15 Mithaldu before digging through the actual code, as a user of mojolicious, how do i deal with utf8 data entered by the user in the browser?
12:15 Mithaldu is it simply decoded from otf8 octets automatically, or in a configurable manner?
12:18 kenjiskywalker joined #mojo
12:20 d4rkie joined #mojo
12:23 marcus Mithaldu: https://metacpan.org/source/SRI/Mojol​icious-3.57/t/mojo/parameters.t#L162
12:24 Mithaldu hmm, that's query parameters
12:24 Mithaldu how about multipart body params?
12:25 egopro joined #mojo
12:27 cosmincx joined #mojo
12:31 sri https://github.com/kraih/mojo/bl​ob/master/t/mojo/request.t#L1707
12:31 sri just works
12:33 dod joined #mojo
12:33 Mithaldu mhm, that's kind of what i expected
12:33 Mithaldu is the decoding based on request headers or always utf8?
12:34 sri defaulting to utf-8 for everything worked out really well for us
12:34 sri there are no headers
12:34 Mithaldu that's good news
12:34 sri all browsers are broken basically
12:34 Mithaldu and yeah, that's what i thought, just wasn't sure from the headers i was seeing :)
12:34 Mithaldu broken?
12:35 sri they don't tell you the charset, just make assumptions based on the previous response
12:35 Mithaldu yeah, that's kind of what i expected
12:35 Mithaldu that the request encoding would be based on the charset of the page it was sent from
12:38 memowe joined #mojo
12:43 egopro joined #mojo
13:18 Mike-PerlRecruiter_ joined #mojo
13:21 cosmincx joined #mojo
13:22 egopro joined #mojo
13:44 cosmincx joined #mojo
13:49 dod joined #mojo
13:56 mire__ joined #mojo
14:09 ObseLeTe joined #mojo
14:10 mattastrophe joined #mojo
14:17 memowe \o/
14:18 dbr joined #mojo
14:20 Elraraniel Say I wanted to locate my templates separate from my code base (such as a file share). Is there a good way to tell mojo to look in a different folder than its own "templates" folder as the base directory?
14:21 memowe Elraraniel: http://mojolicio.us/perldoc​/Mojolicious/Renderer#paths
14:23 nic sri: When Mojo::Parameters gets stringified, "%20" is replaced by "+"
14:23 dabudabu Oh, morbo is the green alien from Futurama!
14:31 Elraraniel memowe: Thanks! :)
14:31 memowe Elraraniel: you're welcome
14:31 Elraraniel Can't believe I missed that ><
14:32 Elraraniel Believe it or not I read the Templae, Render and Controller guides twice
14:32 nic sri: I was just curious why.  I'm guessing there's an RFC that says it's more correct
14:34 nic it's not giving me problems -- the "+" worked fined -- just wanting to learn more about the whyfor
14:35 kitt_vl joined #mojo
14:39 good_news_everyone joined #mojo
14:39 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/RvSXPg
14:39 good_news_everyone mojo/master a7be203 Sebastian Riedel: better multipart tests
14:39 good_news_everyone left #mojo
14:43 memowe \o/
14:44 dpetrov_ Ivan Ivanov? :)
14:48 sri \o\
14:48 sri /o/
14:48 sri dpetrov_: i laughed too when i put it into google translate :)
14:49 * sri did not remember what the values said
14:53 sri would be nice if we had a real multipart example for an uncommon charset, like shift_jis
14:54 sri something chrome or firefox actually produced
14:57 egopro joined #mojo
14:59 dpetrov_ :D
14:59 dpetrov_ its just a name
15:00 dpetrov_ but looked funny to me to read something in russian
15:05 sri one of our russians collected the test cases for me
15:08 egopro joined #mojo
15:08 sri it's funny how messed up multipart/form-data has ended up
15:09 dpetrov_ still it looks good organized :)
15:23 egopro joined #mojo
15:26 egopro joined #mojo
15:45 mire__ joined #mojo
15:49 knshaum joined #mojo
15:50 dod joined #mojo
15:53 egopro joined #mojo
15:55 inokenty joined #mojo
15:57 dod joined #mojo
16:04 labrown joined #mojo
16:16 gryphon joined #mojo
16:43 Kulag joined #mojo
16:54 egopro joined #mojo
17:03 kongelaks_ sri: would you like to take a crack at successfully parsing my problematic multipart response?
17:04 sri kongelaks_: dunno, show me first
17:05 sri no tarballs please, just put it on a nopaste site
17:10 xaka joined #mojo
17:12 sh4 joined #mojo
17:22 kongelaks_ sri: https://github.com/kongelaks/Multi​partTest/blob/master/multipart.log
17:24 sri kongelaks_: too much garbage data, can you turn it into a minimal test case?
17:28 kongelaks_ sri: i can try... can i ask you a few questions first?
17:30 sri i don't know if you can
17:30 kongelaks_ ... may
17:30 sri don't ask to ask, just ask
17:31 sri there are prolly more people here that can answer
17:33 kongelaks_ does Mojo::Message::Response->parse care at all about the formatting of the chunks you feed it when dealing with chunked transfer-encoding?
17:34 sri define formatting
17:34 kongelaks_ i.e. does the chunk size need to be first in the string that you feed to parse()
17:34 sri no
17:35 sri it can continue at any point in the stream
17:44 kongelaks_ hmm
17:44 kongelaks_ when i make the request that generates the response i showed you, i'm listening for the read event on Mojo::UserAgent->_loop->stream
17:46 kongelaks_ then printing read's "chunk" parameter to a file using print FH encode_utf8 $chunk. that's correctly preserving the response, right?
17:48 mire__ joined #mojo
17:51 sri kongelaks_: no, you have raw bytes, don't butcher them
17:54 egopro joined #mojo
17:57 kongelaks_ sri: ok, cool. i was thrown off by the charset=utf-8 in the main content-type header. now i can probably turn that response into a shorter test case :)
18:08 yakudza_ joined #mojo
18:19 sri kongelaks_: i have a hunch your multipart response is invalid though
18:20 * sri bets on some newline screwup, considering it's windows
18:29 sh4|2 joined #mojo
18:35 batman joined #mojo
18:51 batman i can't remember the steps discussion about returning errors... $delay->begin->($error ? ... : $result);
18:51 batman what was the way to do that?
18:52 batman i'm considering always returning an object which is false in boolean context on error. not sure if that is a good idea though :P
18:55 egopro joined #mojo
18:57 davido joined #mojo
19:06 jayallen joined #mojo
19:26 mire__ joined #mojo
19:55 egopro joined #mojo
20:56 egopro joined #mojo
21:04 egopro joined #mojo
21:06 egopro joined #mojo
21:24 jayallen joined #mojo
21:45 good_news_everyone joined #mojo
21:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/1k8eLQ
21:45 good_news_everyone mojo/master e9bbbe4 Sebastian Riedel: more multipart tests
21:45 good_news_everyone left #mojo
22:26 rem_lex joined #mojo
22:33 dabudabu I'm building something in Mojolicious::Lite and it looks like I can't call subroutines that are defined in the same file from within e.g. <%= %> blocks in templates. Would it be correct to assume that I need to put my subs in e.g. foo.pm and then use foo in my template?
22:34 cstamas joined #mojo
22:36 marcus dabudabu: I suggest using helpers, as they are available in your template
22:36 marcus $app->helper(foo => sub { … })
22:36 marcus then you can do just <% = foo %> in the templates
22:40 dabudabu oh, cool
22:40 dabudabu Thank you
22:41 marcus dabudabu: http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Adding_helpers
22:43 dabudabu Nice
22:57 jzawodn joined #mojo
22:57 mire__ joined #mojo
23:05 Elraraniel joined #mojo
23:14 lukep joined #mojo

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