Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-15

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

All times shown according to UTC.

Time Nick Message
00:02 good_news_everyone joined #mojo
00:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/SmsfUA
00:02 good_news_everyone mojo/master 908a751 Sebastian Riedel: updated jQuery to version 1.8.3
00:02 good_news_everyone left #mojo
00:10 * sri wonders if highlight.js is a good alternative to prettify.js https://github.com/isagalaev/highlight.js
00:15 Molaf_ joined #mojo
00:58 Caelum Catalyst::Controller::REST uses Content-Type if Accept is not set, while $c->respond_to uses only Accept
01:03 bluescreen__ joined #mojo
01:14 Mike-PerlRecruiter_ joined #mojo
01:50 egopro joined #mojo
01:51 egopro_ joined #mojo
01:54 xaka joined #mojo
01:56 egopro__ joined #mojo
02:00 egopro joined #mojo
02:01 luoboiqingcai joined #mojo
02:20 xaka joined #mojo
03:10 egopro joined #mojo
03:13 mire joined #mojo
03:16 egopro_ joined #mojo
03:45 egopro joined #mojo
03:49 noganex_ joined #mojo
03:53 Miked joined #mojo
04:40 amirite joined #mojo
04:55 Miked joined #mojo
04:56 egopro joined #mojo
05:21 _xaka_ joined #mojo
05:29 xaka joined #mojo
05:38 Adura joined #mojo
05:39 _xaka_ joined #mojo
06:28 alexeiras joined #mojo
07:10 Skolem joined #mojo
07:10 Skolem How do I view all the HTTP request headers?
07:47 sh4 joined #mojo
07:59 Foxcool joined #mojo
08:18 niczero joined #mojo
08:27 Vandal joined #mojo
08:30 sh4 joined #mojo
08:38 sh4|2 joined #mojo
08:38 niczero chansen: your leap_year() wrongly says 2000 was a leap year
08:43 niczero s/2000/1900/ :)
08:44 niczero if you're only ever looking at now() I guess it doesn't matter
09:08 alexeiras joined #mojo
09:17 kitt_vl joined #mojo
09:49 alexeiras joined #mojo
10:02 sinkovsky joined #mojo
10:28 dabudabu joined #mojo
11:00 memowe \o
11:07 Britzel_ o/
11:20 mire joined #mojo
12:14 sinkovsky joined #mojo
12:30 ObseLeTe joined #mojo
13:14 Mike-PerlRecruiter_ joined #mojo
13:16 dod joined #mojo
13:31 Skolem Mojolicious is hanging after render(). Morbo is catching it with "Nothing has been rendered, assuming delayed response. Inactivity timeout." How can I debug this?
13:40 dabudabu you sure render() gets called?
13:47 Skolem yes!
13:47 Skolem I have a "warn" right after it that shows up in my standard error log
13:48 Skolem also, it doesn't hang when I test it from the command line with perl myfile.pl get
13:48 Skolem I guess I'm going to keep reducing it until I get the minimum file that still hangs, but I thought there might be a -d flag I could throw at morbo or something to raise the debug logging level
13:50 dod joined #mojo
14:05 Skolem I think I was passing a hash reference with an odd number of elements to render()
14:08 mjy Skolem: I noticed that too, it happens e.g. when the template is missing
14:43 dod1 joined #mojo
15:00 ladnaV joined #mojo
15:07 good_news_everyone joined #mojo
15:07 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/qZHjjg
15:07 good_news_everyone mojo/master 4ee4002 Sebastian Riedel: added new FAQ answer for delayed responses
15:07 good_news_everyone left #mojo
15:15 Britzel joined #mojo
15:16 good_news_everyone joined #mojo
15:16 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/PMesAw
15:16 good_news_everyone mojo/master 9c668b5 Sebastian Riedel: mention that the web server can handle other requests while waiting
15:16 good_news_everyone left #mojo
15:16 sri http://mojolicio.us/perldoc/Mojolicious/​Guides/FAQ#What_does_Nothing_has_been_re​ndered_expecting_delayed_response_mean
15:17 sri good answer?
15:23 Britzel partially a good answer. As shown above it can have other simple explanations as well.
15:34 sri it's not a partial answer, if you mess up your rendering then there will be no response
15:38 dabudabu Did you guys know that mojo means something like 'girl that isn't popular among men' in Japanese internet slang?
15:39 memowe I like that translation. :)
15:40 memowe I'm sure almost all names that aren't something bad in at least one language of the world don't sound cool.
15:41 dabudabu hehe
16:02 Vandal joined #mojo
16:10 jberger joined #mojo
16:11 jberger sri: I got a quick bug for you, but I'm not sure how you would like the fix
16:11 jberger in lite *new=*app=sub{$app}
16:11 jberger makes $new defined even if not my-ed
16:17 jberger https://github.com/kraih/mojo/issues/426
16:26 sri jberger: i don't understand your proposed solution
16:26 jberger oh, I'm still working on it
16:26 jberger that was the problem
16:27 jberger basically that line needs to be two statements
16:27 jberger because you are assigning the globref *app to the globref *new it defines the whole *new globref
16:28 memowe jberger: \o
16:28 jberger o/
16:32 jberger sorry, I'm working up a fix, but I just reinstalled my box and so I keep finding things I haven't setup yet
16:32 jberger like my usernames etc for git/github
16:39 jberger sri: ok there is a proposed patch
16:39 jberger its a little overdesigned, in case you wanted the same subref on each glob
16:40 jberger if you don't care about that, 1 (well really 3) lines could be shaved
16:52 jberger sri: make sense?
16:53 sri jberger: i still don't understand the problem
16:53 jberger look at my example in the bug report
16:54 jberger you defeat strictures on the $new variable
16:54 sri perl -Ilib -E 'use strict; use warnings; use Mojolicious::Lite; get "/" => sub { shift->render(text => "foo" . $app) }; app->start' get /
16:54 sri doesn't look like that to me
16:54 jberger change $app to $new
16:54 memowe I thought it's about setting *{new}{ALL} instead of *{new}{CODE}.
16:54 jberger it is
16:54 sri oh
16:54 sri ok, i get it
16:55 jberger :-)
16:55 sri yea, i really don't like overdesign
16:55 jberger it was an odd bug I tripped on this morning
16:55 jberger implement the fix how ever you like
16:55 jberger you can throw out my pull request
16:56 jberger I kept getting a "use of undefined" and it turned out I had used $new, a remnant from a previous iteration of refactoring
16:56 jberger but strict didn't catch it
16:57 memowe I'm just curious: what's the usecase for 'new'? Are there historical reasons?
16:57 jberger memowe, it actually came up a few days ago for another thing
16:57 memowe I remember 'shagadelic' instead of 'app->start'
16:57 jberger its so that you can use ::Lite as a router
16:58 Foxcool_ joined #mojo
16:58 jberger sorry, as a controller
16:58 memowe Ah, I see.
16:58 memowe So app looks like a constructor.
16:58 memowe s/app/new/
16:59 good_news_everyone joined #mojo
16:59 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/HoDo7w
16:59 good_news_everyone mojo/master b4a1007 Sebastian Riedel: fixed small export bug in Mojolicious::Lite (closes #426)
16:59 good_news_everyone left #mojo
16:59 jberger sri had a link to a mojohacks that showed it
17:00 memowe See you! :)
17:00 memowe (Sorry, I have to go)
17:00 sri memowe: http://blog.kraih.com/mojolic​ious-hack-of-the-day-mojolyst
17:00 memowe Ah, Mojolyst.
17:00 memowe KTHXBYE! :)
17:00 sri you can run, but you can't hide!
17:01 memowe I'll hide in the metropolitan opera today (live stream in my local cinema)
17:01 sri i hate that it's two lines instead of one though :(
17:01 memowe :P
17:02 sri i don't think you're supposed to tell me where you're hiding ;p
17:02 memowe I think digital equipment is forbidden there, so you aren't able to come.
17:02 sri :(
17:02 jberger memow o/
17:02 memowe \o/
17:03 ladnaV joined #mojo
17:04 jberger *{"${caller}::new"}{CODE} = *{"${caller}::app"}{CODE}* = sub {$app}
17:04 jberger grrr remove that last *
17:05 jberger *{"${caller}::new"}{CODE} = *{"${caller}::app"}{CODE} = sub {$app}
17:05 sri /o\
17:05 jberger that might work
17:06 jberger I'm not exactly sure how strict knows if globs have been touched enough to ignore
17:10 jberger your patch works on my box, as does the {CODE} version I show above
17:10 jberger so if you wanted it back on one line
17:23 mire joined #mojo
17:29 noize joined #mojo
17:38 sri we monkey patch so much, i suppose adding Mojo::Util::monkey_patch would make sense
17:38 sri http://pastie.org/5535965
17:38 sri a possible patch
17:45 sri marcus, tempire, crab, jberger: thoughts?
17:46 noize left #mojo
17:46 sinkovsky joined #mojo
17:46 sri it's a few lines less code and a little more testable
18:00 yakudza joined #mojo
18:08 good_news_everyone joined #mojo
18:08 good_news_everyone [mojo] kraih created monkey_patch (+1 new commit): http://git.io/u-ylmQ
18:08 good_news_everyone mojo/monkey_patch 607b550 Sebastian Riedel: added monkey_patch function to Mojo::Util
18:08 good_news_everyone left #mojo
18:08 crab i like it
18:09 rem_lex|pivo joined #mojo
18:09 sri what i'm a little worried about is that it might give the impression that we encourage monkey patching
18:10 sri perhaps a little warning note would be a good idea
18:13 crab or we should just encourage monkey patching!
18:13 sri PATCH ALL THE MONKEYS!
18:23 yakudza joined #mojo
18:47 sri TIL monkey patching can also be called duck punching
18:58 good_news_everyone joined #mojo
18:58 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/XBpqHg
18:58 good_news_everyone mojo/master d6ec549 Sebastian Riedel: more monkey_patch tests
18:58 good_news_everyone left #mojo
19:13 tempire Regarding the accept header change...I was under the impression that's how it already worked.
19:21 marcus embrace your inner monkey.
19:21 marcus sri: just don't call it donkey punching
19:36 Miked joined #mojo
19:37 xaka joined #mojo
19:45 jberger PATCH ALL THE MONKEYS!
19:45 jberger I like it, a consistent interface
19:46 jberger like you said, for as often as this appears, its good to have an interface for it
19:46 jberger if you didn't want to encourage it, it doesn't HAVE to be a public function
19:46 jberger but I think its ok
19:53 good_news_everyone joined #mojo
19:53 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/l85HXw
19:53 good_news_everyone mojo/master 7cf20b3 Sebastian Riedel: documentation tweak
19:53 good_news_everyone left #mojo
19:55 jberger ojo looks really cool now
20:10 * sri nods
20:10 sri much less hack-ish
20:12 sinkovsky joined #mojo
20:20 niczero joined #mojo
20:22 niczero one of the nice things about monkey_patch is it'll make it trivial to find where it's been used
20:24 niczero grep 'sub\s+foo\b' || grep 'monkey_patch\b.+\bfoo\b'
20:27 rem_lex joined #mojo
20:31 rem_lex joined #mojo
20:34 good_news_everyone joined #mojo
20:34 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QXIULg
20:34 good_news_everyone mojo/master d625a9a Sebastian Riedel: added ".travis.yml"
20:34 good_news_everyone left #mojo
20:36 good_news_everyone joined #mojo
20:36 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/tU5y0w
20:36 good_news_everyone mojo/master 2cc83fa Sebastian Riedel: updated Changes file
20:36 good_news_everyone left #mojo
20:44 sri how did i not know about this? :o http://about.travis-ci.org/blog/2012-09-04​-pull-requests-just-got-even-more-awesome/
20:54 marcus I've missed that too. pretty sweet
21:04 * tempire made the mojo deploy heroku page a little prettier - git.io/mojoheroku
21:05 sri tempire++
21:06 sri i see no demonstration though
21:06 tempire do you have flash installed?
21:07 tempire it's a screenr embed
21:07 sri i have click to flash
21:07 sri i looked at the old page earlier and it worked
21:07 tempire that is strange.  nothing changed in that area
21:08 sri oh, now it's back
21:08 tempire crafty flash
21:08 sri and gone again Oo
21:09 * sri suspects some caching shenanigans going on
21:34 Caelum thank you very much for the accept header fix!
21:34 Caelum now jquery .ajax with ->respond_to work perfectly <3
21:46 marcus sri: Any ideas what I need to do to proxy web sockets through nginx?
21:47 marcus 'WebSocket handshake: 'Connection' header value is not 'Upgrade' '
21:48 marcus guess I need nginx_tcp_proxy_module
21:52 jnbek^dt joined #mojo
21:54 sri marcus: time travel i suppose
21:54 sri it's a planned feature
21:54 sri or plain tcp yea
21:54 marcus sri: http://stackoverflow.com/questions/12102110/ngin​x-to-reverse-proxy-websockets-and-enable-ssl-wss
21:55 marcus seems easier than time travel.
21:55 sri it's not very good yet
21:55 ruz is it possible to bridge /*foo/, /*foo/bar, /*foo/baz, /*foo/zoo
21:55 ruz ?
21:55 marcus sri: my needs are fairly rudimentary.
22:03 chansen nic: the supported year range is 1901 to 2099 (inclusive) so the leap_year() sub is correct ;)
22:03 chansen oops, nic eq niczero?
22:21 gryphon joined #mojo
22:27 sri marcus: the fact it requires its own port can be a bit problematic
22:28 marcus sri: I decided to go with haproxy in front for now, just because I didn't want to give hypnotoad root privs to bind to port 80
22:28 sri according to google data the best way to run websockets is via wss on port 443
22:28 sri you can reach about 93% of all internet users that way AFAIR
22:29 sri on port 80 was a lot less, due to bad/old proxy servers and firewalls
22:30 marcus guess I'll have to buy a certificate then.
22:31 chansen yeah, like crappy inspecting sonicwall
22:32 * chansen has one
22:33 sri there's always https://www.startssl.com
22:34 ruz looks like it's impossible to overwrite stash value from bridge's callback :(
22:35 marcus yepp, setting up a free cert now
22:35 ryozi joined #mojo
22:37 chansen that site looked cheap ;)
22:38 * dabudabu looks at the site just to make sure it doesn't resemble his own designs
22:38 dabudabu Hmm, phew
22:39 dabudabu It's a slightly interesting design though
22:41 chansen also interesting wording: "...No Kidding 100% FREE"
22:45 marcus I don't care as long as the browser doesn't complain about it being self-signed
22:46 tempire free certs!
22:46 tempire fantastic
22:51 wircus joined #mojo
22:53 wircus joined #mojo
22:56 wircus joined #mojo
22:56 wircus hmpf
22:57 wircus wirc is starting to look pretty decent.
22:57 wircus Just need to figure out why it keeps getting disconnected....
22:59 wircus joined #mojo
22:59 wircus ( https://www.evernote.com/shard/s22/s​h/1299dc11-2756-4392-ba66-394a49cfa8​b7/1090ac5ff54a16164ddcbd5b95dcd019 )
23:00 sri that looks pretty decent
23:01 wircus left #mojo
23:02 marcus sri: using custom monospace font designed by one of the Nordaakers :)
23:02 Britzel Playing with Mojo::IOLoop, trying to send out text/event-stream data. The data is sent fine, but my browser (FF 17.0.1) asks what to do with text/event-stream content. How do I change this?
23:02 marcus he's making a lighter version of it tho, that one is a bit too black.
23:04 marcus heh, batman is making mojo::irc timeout after 60 seconds. no wonder my connection feels bumpy...
23:04 sri hmm, was about to say i like the g, f and i... but then noticed that they look almost exactly like Consolas :S
23:05 chansen marcus: If you are cooking a better IRC service than irccloud.com, I'll sure would like to try it ;)
23:05 sri the r is better than the one in Consolas though
23:06 marcus chansen: That's the plan. Not sure if I want to provide hosted service tho, was figuring I could just license and sell the software, and make it easy to publish to dotcloud or whatever
23:06 marcus or whatever shell people are using.
23:07 marcus the irccloud price model seems a bit bizarre to me, I'd have to pay 12 euros a month for irc, since I have more than 3 networks. it's not like it requires a lot of resources..
23:08 chansen cool, feel free to invite me if you want a tester, surly you can't do worse than irccloud.com
23:08 marcus chansen: I will. Guess we're ready for beta early january.
23:08 sri isn't the big problem with hosted irc that you need a gazillion ip addresses?
23:08 chansen marcus: I have waited for one year to use irccloud.com on my ipad, still doesn't work =(
23:09 sri what if people get your ip banned?
23:09 marcus sri: another reason why people should host their own :)
23:09 Miked joined #mojo
23:10 chansen if you start banning people based on IPv4 addresses you will get in trouble, most major doesen't for a reason
23:10 marcus http://wirc.pl/ is running on a 256mb prgmr.com instance now, cost me ~40$ for 6 months
23:11 chansen sounds like a nice deal
23:11 chansen using mojo?
23:11 marcus yeah
23:11 marcus and redis
23:12 chansen if you invite me, I'll increase your throughput for free using a secret tip ;P
23:12 marcus I'll invite you as soon as it's stable enough that you won't hate me ;-)
23:13 marcus first step is actually being able to use it myself =)
23:13 chansen 🆒
23:14 * chansen not sure that render for non Unicode 6.1 users
23:15 chansen marcus: how do you deal with encodings?
23:15 chansen .. character encodings
23:15 marcus chansen: I just assume everybody use unicode :-/
23:16 chansen ok, when i wrote a bot about a year ago it was useful to assume UTF-8 and fallback to ISO-8859-1
23:17 marcus chansen: there's an unresolved issue now, batman's irc client has trouble with the output from wirc, (some weird linux client) while irssi/textual handles it just fine.
23:17 marcus chansen: yeah, that's probably what we should do.
23:19 chansen $string = Unicode::UTF8::decode_utf8($octets, sub { $_[0] }); # does that in a very efficient matter, that was my secret tip =(
23:19 mire joined #mojo
23:20 chansen I need to push a release of Unicode::UTF8, there is a bug i utf8_encode() when TARG is used, I'll do that tomorrow
23:21 * chansen s/utf8_encode/encode_utf8/
23:26 jzawodn joined #mojo
23:35 marcus chansen: thank you for the secret tip :)
23:35 marcus seems increasing the timeout has made wircus stop rejoining.
23:35 marcus that is good news!
23:35 wircus joined #mojo
23:36 marcus just wish prgmr would update their reverse check cache so I can get wirc.pl reverse setup
23:41 marcus chansen: I'm using utf8::encode/decode now. Guess I'll switch to your module and get the fallbacks.
23:42 chansen marcus: I just updated git repro and pushed a CPAN release
23:42 marcus chansen: sweet
23:46 chansen for inhouse app I was able to cut down memory usage and CPU usage considerably, Unicode::UTF8 ~ 1000% faster than Encode.pm and makes use of much less memory
23:56 chansen <https://metacpan.org/source/CHA​NSEN/Unicode-UTF8-0.58/Changes> Zero coping is a nice boost ;)
23:57 good_news_everyone joined #mojo
23:57 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/a9bOYw
23:57 good_news_everyone mojo/master bbc886d Sebastian Riedel: converted README to markdown
23:57 good_news_everyone left #mojo
23:58 marcus chansen++

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