Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-13

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

All times shown according to UTC.

Time Nick Message
00:00 sri even if we wanted, i doubt it's possible to move it again
00:00 sri we would just end up with two channels
00:05 kongelaks sri: http://pastebin.com/hhxvVGdb
00:15 Molaf_ joined #mojo
00:16 ObseLeTe joined #mojo
00:17 rem_lex|pivo joined #mojo
00:19 laouji joined #mojo
00:19 sri kongelaks: it's the whitespace in the boundary
00:24 ObseLeTe joined #mojo
00:31 egopro joined #mojo
00:40 good_news_everyone joined #mojo
00:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/HB06YA
00:40 good_news_everyone mojo/master de3d701 Sebastian Riedel: fixed multipart boundary detection bug in Mojo::Content
00:40 good_news_everyone left #mojo
00:41 sri kongelaks: that should solve it
00:45 sinkovsky joined #mojo
00:50 good_news_everyone joined #mojo
00:50 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/FkUL4g
00:50 good_news_everyone mojo/master cc15f7b Sebastian Riedel: a few more multipart boundary detection tests
00:50 good_news_everyone left #mojo
00:59 mattastrophe joined #mojo
01:06 Averna joined #mojo
01:07 b2b joined #mojo
01:14 Mike-PerlRecruiter_ joined #mojo
01:24 hlin joined #mojo
01:46 d4rkie joined #mojo
01:58 sinkovsky joined #mojo
02:13 jberger sri: I imagine that its just for expediency, but is there any reason there isn't a put_form and put_form_ok?
02:14 jberger got a question on SO about it
02:14 jberger http://stackoverflow.com/q/13829092/468327
02:14 jberger actually the OP needed put_json and put_json_ok, but its all related
02:15 jberger (sorry I wrote the wrong ones above)
02:20 bpmedley left #mojo
02:25 bpmedley joined #mojo
02:27 vervain joined #mojo
02:29 sri jberger: where does it stop? patch_json_ok, patch_form_ok...
02:29 jberger thats what I meant by expediency
02:30 jberger just curious
02:30 jberger go about your business, nothing to see here
02:30 jberger :-)
02:30 * sri goes about his business
02:31 sri but you reminded me of something
02:31 jberger there could be a send_json_ok( PUT => $url, $hash_ref )
02:32 sri that's horribly inconsistent
02:32 jberger but I'm not actually advocating it
02:32 jberger (you beat me to it)
02:32 * sri keeps going about his business
02:35 vervain These are not the droids you are looking for. :-)
02:36 Foxcool joined #mojo
02:41 good_news_everyone joined #mojo
02:41 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/aSwk2A
02:41 good_news_everyone mojo/master c45aaf4 Sebastian Riedel: better example for custom transaction testing
02:41 good_news_everyone left #mojo
02:43 bpmedley joined #mojo
02:43 sri jberger: it's already pretty trivial
02:43 sri i've thought about adding $t->start_ok($tx) but i don't like how it looks
02:45 jberger build_json_tx is necessarily POST
02:45 jberger https://github.com/kraih/mojo/blob/maste​r/lib/Mojo/UserAgent/Transactor.pm#L100
02:46 * sri doesn't follow
02:46 jberger in your example
02:46 jberger build_json_tx
02:46 jberger but that makes a POST transaction
02:46 sri my example changes it to PUT
02:47 jberger oops
02:47 jberger I was looking at the wrong line
02:47 jberger gotcah
02:47 jberger gotcha
02:47 sri those builders make transactions that can be changed again completely
02:48 marty_ joined #mojo
02:51 jberger very cool stuff
02:51 jberger ok, I've added another answer using it
02:52 sri i'm open for a discussion about $t->start_ok($tx) if anyone really cares
02:53 laouji joined #mojo
02:53 sri jberger++ # btw
02:54 jberger it would make thing a little more ... I don't think the word is consistent, but nice
02:57 jberger you could then make your own helpers like this: http://pastebin.com/bVqQvSJX
02:58 jberger http://pastebin.com/s57eHwTQ
02:58 jberger (typo)
02:59 jberger I like it
02:59 jberger I like it the more I think about it
02:59 jberger build any transaction you like, then start and test it immediately, much in the manner of all the other test-starting methods
03:04 sri jberger: almost
03:04 sri you need local $Test::Builder::Level = $Test::Builder::Level + 1;
03:04 sri or fail messages are off
03:05 jberger hmmmm, right
03:06 jberger I've never built testing stuff before, though I've reviewed one once
03:07 ispy_ joined #mojo
03:07 marty joined #mojo
03:09 jberger however, with start_ok I don't have to rely on the private method _test as I did in the first answer on SO
03:09 jberger which is nice
03:10 sri $t->request_ok($tx) maybe
03:12 sinkovsky joined #mojo
03:15 jberger personally I like start_ok I think, because it calls start internally, its more self-documenting
03:16 jberger would start_ok/request_ok take a callback like start does?
03:16 sri no
03:17 sri Test::Mojo only works blocking
03:17 jberger that was just for my own curiosity, I included it in the SO post, but wasn't sure it was necessary
03:17 jberger will remove
03:23 sri http://pastie.org/5518761 # here's a possible patch
03:23 egopro joined #mojo
03:30 jberger works by me (again, its not my gripe, but I like the new flexibility)
03:30 sri marcus, tempire, crab: opinions?
03:34 marty joined #mojo
03:36 sri http://pastie.org/5518797 # final patch
03:36 sri think i won't apply it if the feature doesn't have a champion
03:38 jberger since request_ok increases the test level, why would I have to do that in my pastebin example?
03:39 sri because your wrapper adds another stack frame
03:40 * jberger always learns something here
03:40 sri i guess it ends up being something like caller($Test::Builder::Level)
03:40 jberger thats what it sounds like
03:47 good_news_everyone joined #mojo
03:47 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2MNs5A
03:47 good_news_everyone mojo/master 18d117f Sebastian Riedel: added request_ok method to Test::Mojo
03:47 good_news_everyone left #mojo
03:47 sri screw it, i'm championing the feature
03:48 sri custom transaction handling shouldn't be ugly
03:51 noganex_ joined #mojo
03:56 good_news_everyone joined #mojo
03:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/6fqrMw
03:56 good_news_everyone mojo/master f0c9ecd Sebastian Riedel: more test examples
03:56 good_news_everyone left #mojo
03:57 sri jberger: i think a different name makes sense because of the test description argument, that very different from ->start()
04:00 jberger "custom transaction handling shouldn't be ugly" hear hear!
04:01 jberger I'm ok with either name, I'm always likely to play the devil's advocate, its an annoying thing about me :-)
04:25 sinkovsky joined #mojo
04:27 jberger Its a little late now, but I think I can say why I liked start_ok
04:28 jberger it is indicative of the fact that the transaction has not yet been started
04:28 jberger and therefore can be changed
04:28 jberger yes request_ok implies that, and if you know all the apis you can know that
04:28 jberger but start_ok tells you that
04:36 lukep joined #mojo
04:49 sri jberger: i think the main reason i don't like start_ok is that it doesn't really get the point across that the transactions is finished afterwards
04:50 jberger hmmm, good point
04:50 sri for Mojo::UserAgent->start that's not as important, since it may be non-blocking
04:51 xaka joined #mojo
04:51 jberger ok I cave
04:51 sri :)
04:51 jberger :-)
05:02 Adura joined #mojo
05:06 jberger gnite all
05:06 jberger o/
05:10 bpmedley joined #mojo
05:14 Molaf joined #mojo
05:37 sinkovsky joined #mojo
05:53 tempire opinion on what?
05:53 tempire ->request_ok?
06:15 spleenjack joined #mojo
06:28 sri tempire: yes
06:32 sri about functionality as well as name
06:33 duncanthrax joined #mojo
06:37 duncanthrax joined #mojo
06:45 dpetrov_ joined #mojo
06:50 sinkovsky joined #mojo
07:21 yakudza joined #mojo
07:30 Vandal joined #mojo
08:03 sinkovsky joined #mojo
08:10 cosmincx joined #mojo
08:20 cosmincx joined #mojo
08:24 yko joined #mojo
08:30 suy joined #mojo
08:41 amirite_ joined #mojo
08:46 amirite joined #mojo
08:52 lukep joined #mojo
08:57 dod joined #mojo
08:58 alexeiras joined #mojo
09:14 ver joined #mojo
09:15 ver joined #mojo
09:18 ver joined #mojo
09:19 d4rkie joined #mojo
09:26 Foxcool joined #mojo
09:35 ver_ joined #mojo
09:36 fhelmber_ joined #mojo
09:50 Foxcool joined #mojo
09:53 ver joined #mojo
10:09 judofyr joined #mojo
10:09 judofyr MOJO MOJO MOJO
10:10 rhaen joined #mojo
10:11 Adura Pray for Mojo.
10:13 nic Why does it matter to people whether #mojo is on perl.org or freenode?
10:14 judofyr it does?
10:14 Adura Well, at least there's no L. Ron Hubbert server here.
10:14 nic there was someone last night (user_2134) suggesting a move
10:15 nic I'm just puzzled why people care -- obviously I'm missing something
10:15 Adura Branding? Ease of access?
10:15 nic see, I don't understand the relevance of those words
10:16 nic you look up where the channel is -> connect -> save to config -> forget about the detail
10:16 nic Are there people who only want to connect to a particular service?
10:17 nic Or is that people are blocked from some services but not others?
10:18 Adura What was their rationale?
10:19 dotan joined #mojo
10:19 nic no idea
10:21 nic Some people use web apps for irc, and I've used at least one in the past that could only attach to particular services
10:21 kitt_vl joined #mojo
10:22 Adura This server deal with mibbit well?
10:24 suy Using only one network is less setup. Right now I'm on irc.perl.org just for #mojo.
10:25 suy (not a big deal for me, though)
10:27 judofyr well, I'm on 4 servers, so yeag
10:39 ladnaV joined #mojo
10:47 drift joined #mojo
10:48 nic pfff, you single-digit irc monkeys :)
10:53 marcus nic: are you on double-digit number of servers? :-o
10:53 * marcus is only up to 6 in his textual.
10:54 Averna joined #mojo
10:54 judofyr I'm up to 5 if I want to hang out in #hackers-india (no idea why I started doing that…)
10:54 nic I'm including 5 private networks in my count :P
10:55 marcus I include irc.wyldryde.org where textual resides, even tho I'm not much there.
11:05 batman joined #mojo
11:21 mire joined #mojo
11:29 memowe \o/
11:33 ObseLeTe joined #mojo
11:33 romel left #mojo
11:40 Vandal joined #mojo
11:52 rhaen joined #mojo
12:26 rhaen joined #mojo
12:28 drift joined #mojo
12:35 yko joined #mojo
12:48 egopro joined #mojo
12:59 kitt_vl joined #mojo
13:01 Vandal joined #mojo
13:14 Mike-PerlRecruiter_ joined #mojo
13:17 kitt_vl joined #mojo
13:28 rhaen joined #mojo
13:41 marty $t->started($tx)
13:58 egopro joined #mojo
14:01 ladnaV joined #mojo
14:08 dod joined #mojo
14:11 bluescreen joined #mojo
14:11 Vandal joined #mojo
14:22 jnbek^dt joined #mojo
14:53 dod joined #mojo
14:54 ObseLeTe joined #mojo
14:54 mire joined #mojo
15:05 inokenty joined #mojo
15:15 Britzel joined #mojo
15:28 mire joined #mojo
15:42 knshaum joined #mojo
15:57 sri \o\
15:57 sri /o/
15:58 judofyr \o/
16:00 suy What's "\o/" supposed to mean? (if anything)
16:01 sri PUT YOUR HANDS IN THE AIR
16:02 marty ~o~
16:11 dod joined #mojo
16:15 dod1 joined #mojo
16:23 rhaen joined #mojo
16:38 mire joined #mojo
16:39 tempire ~o~ = adventure time version of \o/
16:39 tempire sri: I don't understand what request_ok is for
16:40 sri tempire: this is the example before request_ok https://github.com/kraih/mojo/blob/c45aaf422cd6b6​cf4bdf135869a0caf403ddf946/lib/Test/Mojo.pm#L374
16:41 sri and this is it after https://github.com/kraih/mojo/bl​ob/master/lib/Test/Mojo.pm#L703
16:41 nic Both of my socks are matching today!!
16:42 nic \o/
16:42 nic (for suy)
16:42 sri Didn't forget to wear pants today!
16:42 sri \o/
16:43 nic I don't have to lug ridiculously heavy and oversized objects between houses and instead I get paid for sitting down and pressing little plastic buttons!
16:43 nic \o/
16:44 tempire sri: makes sense to me
16:44 tempire though I wonder how much it would be used.
16:44 * tempire will use it
16:45 sri i think it will be used quite a bit, especially for json with different methods
16:46 yakudza joined #mojo
16:46 suy nic: :)
16:49 sri tempire: might also be useful if you're subclassing Test::Mojo to add new methods like ->put_json_ok()
16:49 sri ->patch_json_ok()
16:50 sri like jberger mentioned yesterday
16:51 sri tempire: what do you like more, ->request_ok() or ->start_ok()?
16:51 tempire request_ok
16:52 * sri nods
17:04 xaka joined #mojo
17:12 Caelum how do I prepend a pathpart to all my routes, like /0.1/
17:19 marty Caelum: http://mojolicio.us/perldoc/Moj​olicious/Guides/Routing#Bridges
17:20 Caelum marty: ah I see, any way to use this in a simple Mojolicious::Lite script (rather than a full app)
17:21 marty Caelum: http://mojolicio.us/perldoc/Mojolicious/Lite#Under
17:22 Caelum oh I was using under, didn't know it could do that, brilliant
17:22 Caelum thank you
17:25 trone I would generate a csv file from a data structure and to serve it with an export url. Can I bind the CSV::Text filehandle to Mojolicious render function?
17:32 dod joined #mojo
17:50 trone I'm using write_chunk …
17:57 labrown joined #mojo
17:59 buu Hrm
18:00 buu I'm using UA to talk to a mojo server, the server is taking around 18-19 seconds to return a response, but my mojo UA is giving me a blank response after like 17 seconds
18:00 buu I've tried increasing the inactivity_timeout to really high amounts..
18:01 buu Does mojo itself close the connection or something?
18:02 buu Ah.. apparently it does..
18:08 rem_lex joined #mojo
18:42 kongelaks sri: the whitespace boundary detection fix did fix my problem. thanks
18:52 trone http://paste.debian.net/216055/ <- it works.
19:04 mire joined #mojo
19:21 * sri wonders when github will add support for blogs
19:37 sinkovsky joined #mojo
19:39 Caelum why doesn't this route: get '/work_order_types(*cat_id)' => [cat_id => ['', qr{/+\d+}]] match "/work_order_types/1"
19:42 Caelum get '/work_order_types(*cat_id)' => [cat_id => qr{|/+\d+}] # doesn't match either
19:44 Caelum should I just use /foo/*param and add the trailing slash with a rewrite rule in apache?
19:50 Caelum yeah I think I'll do that
19:51 buu Why wouldn't you do /foo/*bar
19:51 buu ?
19:53 Caelum I didn't do it at first because it doesn't match "/foo" only "/foo/"
19:55 sri actually, it matches neither
19:57 sri get '/foo/*bar' => {bar => ''}; would match /foo /foo/ /foo/whatever and /foo/what/ever
19:58 Caelum sri: just tried it...it requires the trailing slash
19:59 sri umm
19:59 sri no
19:59 sri perl -Mojo -E 'a("/foo/*bar" => {bar => "", text => "works!"})->start' get /foo
20:04 Caelum ok, now to figure out wtf it's not working for me
20:08 buu Bridges?
20:12 Caelum sri: perl -MMojolicious::Lite -E 'get "/foo/*bar" => [bar => ""] => sub { shift->respond_to(json => { json => { some => "data" } }); }; app->start' get '/foo?format=json
20:13 sri Caelum: that's not the example i gave you
20:14 sri if you're rewriting the regex you're on your own
20:16 Caelum I'm not using any regex?
20:16 Caelum it's the same route, just uses respond_to
20:19 sri perl -Mojo -E 'a("/foo/*bar" => {bar => ""}); a("/foo/*bar" => [bar => ""]); app->start' routes -v
20:26 Caelum oh I see, thanks!
20:30 bpmedley joined #mojo
20:32 Caelum can I make this match a '' or \d+? or do the validation in the sub?
20:38 lukep joined #mojo
20:48 kongelaks has there been any demand (besides me) for the ability to override the chunk size returned by get_chunk in Mojo::Asset?
20:49 Akron joined #mojo
20:53 good_news_everyone joined #mojo
20:53 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sQOm_w
20:53 good_news_everyone mojo/master e0fabd8 Sebastian Riedel: fixed format regex generation bug in Mojolicious::Routes::Pattern
20:53 good_news_everyone left #mojo
20:54 sri kongelaks: no
20:55 kongelaks i suppose i don't really have any _good_ reasons for wanting to do it anyway...
20:57 nic Do all of your reasons involve evil?
20:57 nic maybe 'evil' is too strong.  Just thoroughly wicked?
21:00 sri the evil is strong with this one
21:01 sri http://www.savingadvice.com/images​/blog/hello-kitty-darth-vader.jpg
21:03 kongelaks i'm a practitioner of UOP
21:03 kongelaks unholiness oriented programming
21:06 sri a php programmer, i see
21:07 kongelaks hah
21:21 mire joined #mojo
21:24 xaka joined #mojo
21:48 mattastrophe joined #mojo
21:49 good_news_everyone joined #mojo
21:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/bkyOow
21:49 good_news_everyone mojo/master 52919f6 Sebastian Riedel: a few more pattern tests
21:49 good_news_everyone left #mojo
22:46 Miked joined #mojo
22:53 Skolem joined #mojo
22:58 sinkovsky joined #mojo
23:02 good_news_everyone joined #mojo
23:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sjytnA
23:02 good_news_everyone mojo/master e2ae7d4 Sebastian Riedel: documentation tweaks
23:02 good_news_everyone left #mojo
23:05 hesperaux joined #mojo
23:24 jzawodn joined #mojo
23:32 Caelum how does the default list of plugins get loaded?
23:33 Caelum ah found it
23:35 chansen sri: awake?
23:41 sri chansen: depends :)
23:43 chansen sri: you need a light weight implementation of DateTime, don't you? ;)
23:43 sri can't say i do
23:43 * chansen lacks a namespace ;P
23:43 sri DateTime::Tiny? ;p
23:44 chansen a crappy Alias implementation :(
23:44 sri oh noes
23:44 sri even Time::Tiny is taken
23:44 chansen you need a worthy implementation that doesn't suck and is faster than current DateTime XS implementation ;P
23:45 chansen in PP
23:45 sri DateTime::Fast
23:45 sri AnyTime :D
23:45 chansen I'm thinking Mojo::DateTime ;P
23:46 chansen nopaste?
23:47 * chansen bah, still no bots =(
23:48 chansen sri: http://paste.scsys.co.uk/218691
23:49 Averna joined #mojo

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