Camelia, the Perl 6 bug

IRC log for #mojo, 2013-04-24

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

All times shown according to UTC.

Time Nick Message
00:08 rem_lex joined #mojo
00:39 whitebook joined #mojo
00:41 Averna joined #mojo
00:42 Averna joined #mojo
00:45 shmuel joined #mojo
01:31 whitebook joined #mojo
01:39 ka2u joined #mojo
01:44 d4rkie joined #mojo
01:45 d4rkie joined #mojo
01:57 Meiermann joined #mojo
02:14 asarch joined #mojo
02:20 mawuli_ypa joined #mojo
02:50 whitebook joined #mojo
03:17 rem_lex|pivo joined #mojo
03:23 Kripton joined #mojo
05:05 ka2u joined #mojo
05:16 suy joined #mojo
05:17 xaka joined #mojo
05:35 jb360 joined #mojo
05:46 d4rkie joined #mojo
05:57 TitanOfOld joined #mojo
06:16 Kripton_ joined #mojo
06:23 Mike-PerlRecruiter_ joined #mojo
06:30 dpetrov_ joined #mojo
06:38 yakudza joined #mojo
06:47 amirite joined #mojo
07:06 dod joined #mojo
07:10 Vandal joined #mojo
07:19 suy joined #mojo
07:24 anielsen joined #mojo
07:28 mattastrophe joined #mojo
07:36 dod joined #mojo
07:37 anielsen I am trying to port an existing application to mojo and I have some newbie questions
07:39 anielsen First: Where do I put code to handle 500s?
07:40 hrupp_ joined #mojo
07:46 mattastrophe joined #mojo
07:58 ver joined #mojo
08:01 mire joined #mojo
08:03 ObseLeTe joined #mojo
08:13 jzawodn joined #mojo
08:16 Vandal joined #mojo
08:43 maxhq joined #mojo
08:48 alnewkirk joined #mojo
08:56 ka2u joined #mojo
08:57 dod joined #mojo
09:18 jpn joined #mojo
09:20 Nei left #mojo
09:24 memowe O HAI! :)
09:24 dod joined #mojo
09:25 nic joined #mojo
09:28 hrupp joined #mojo
09:42 denisboyun joined #mojo
10:22 ryozi joined #mojo
10:39 kvorg joined #mojo
10:39 kvorg_ joined #mojo
10:40 Britzel_ joined #mojo
10:43 mire joined #mojo
11:26 yakudza joined #mojo
11:32 asarch joined #mojo
11:44 D4RK-PH0ENiX joined #mojo
12:16 suy joined #mojo
12:25 dvinciguerra joined #mojo
12:46 whitebook joined #mojo
12:51 mattastrophe joined #mojo
12:58 murray joined #mojo
12:59 Kripton joined #mojo
13:00 moltar joined #mojo
13:00 murray scratching head .. morbo -l "http://172.16.200.100:4430?cert…" works; s/http/https/ & testing in telnet i see "Connected to …; Escape character is '^]'.; Connection closed by foreign host."
13:01 murray can't figure out what/where is dropping the connection … MOJO_DAEMON_DEBUG=1 morbo -v shows nada
13:02 murray ubuntu 12.04 under virtual box w/ perlbrew perl 5.16 & cpanm all up to date
13:03 murray simply the s/http/https/ that's borking it … where do I look for the code that handles those bits?
13:09 jb360 joined #mojo
13:21 mire joined #mojo
13:24 murray Q: t/mojo/app.t => line 180 => my $daemon = Mojo::Server::Daemon->new(listen => ["http://127.0.0.1:$port"],
13:24 murray those tests should still pass s/http/https/ right?  Rather than hang after "ok 57 - right moniker"
13:25 murray aka : can you run https on a port other than 443?
13:25 murray with morbo
13:32 whitebook joined #mojo
13:32 gryphon joined #mojo
13:34 Kripton_ joined #mojo
13:43 btyler joined #mojo
13:48 murray so .. answering my own question … running morbo -v -l "https://172.16.200.100:4430?cert=/home/me/ssl/secure.crt​&key=/home/me/ssl/secure.key" script/server works … when those ssl cert/key files exist.  Would there be any merit in my trying to supply a patch that bitches when those files aren't found, rather than silently starting the server but then refusing connections?  Or is that the expected behaviour?
13:50 sri go ahead, patch it in IO::Socket::SSL
13:51 murray eek.  will look/try.
13:55 murray is there a reason it couldn't be done in Mojo/IOLoop/Server.pm ?
13:55 sri it's not the right place
13:56 sri why should it be in Mojo::IOLoop::Server when it could be in IO::Socket::SSL?
13:57 murray fair enough … I'm taking a look, tho i'm a little out of my depth … but having a go :)  thanks
14:01 Kripton joined #mojo
14:15 sh4 joined #mojo
14:21 good_news_everyone joined #mojo
14:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/wA0SNQ
14:21 good_news_everyone mojo/master 394f4e6 Sebastian Riedel: fixed a few small timing bugs in WebSocket tests
14:21 good_news_everyone left #mojo
14:26 murray sri: fyi/fwiw https://github.com/noxxi/p5-io-socket-ssl/issues/2
14:26 murray thanks for your help/pointers
14:28 sri murray: not sure your patch has much of a chance without a test
14:31 murray I was hoping someone might advise if I was even in the right ball park before doing that, but as noted, if someone can tell me I'm vaguely on track, I'm happy to work up tests etc
14:32 whitebook joined #mojo
14:40 labrown joined #mojo
14:44 powerman joined #mojo
14:45 powerman hi. is there are any existing plugins/helpers to basic CRUD, like serving json for Backbone.js models?
14:47 powerman I see a lot of them for Catalyst, but can't find any for Mojo.
14:47 dpetrov_ joined #mojo
14:53 amirite joined #mojo
14:58 btyler joined #mojo
15:04 batman joined #mojo
15:04 marcus joined #mojo
15:17 marcus joined #mojo
15:17 batman joined #mojo
15:37 btyler joined #mojo
15:45 amirite joined #mojo
15:47 maxhq powerman: I developed one myself some weeks ago but did not yet publish it.
15:48 mattastrophe joined #mojo
15:48 maxhq You can have a look here and might want to use it in your project: http://pastebin.com/bb6FW1iD
15:50 maxhq Sorry, it contained some non relevant code, here is the cleanup version: http://pastebin.com/s8j0t3Hs
15:52 good_news_everyone joined #mojo
15:52 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/alfHIA
15:52 good_news_everyone mojo/master 71c3c41 Sebastian Riedel: removed redundant WebSocket test
15:52 good_news_everyone left #mojo
15:59 bowtie joined #mojo
15:59 sri nginx 1.4.0 is out with websocket support \o/
16:00 whitebook joined #mojo
16:03 marty \o/
16:04 marty wait, why am I excited.  I've never written a websocket thing in my life and I'm still stuck using ajax.   :(
16:04 marty but I'm excited anyway!!!
16:05 * marty has had to much coffee this morning.  :)
16:16 xaka joined #mojo
16:20 powerman maxhq: thanks, but I'm looking for something more complicated - like ask user for resource name and fields validation rules and generate everything else including routings and action handlers with db access and render_json()
16:34 SmokeMachine joined #mojo
16:57 d4rkie joined #mojo
17:00 whitebook1 joined #mojo
17:03 duncanthrax joined #mojo
17:07 bjoernfan joined #mojo
17:11 AdmWiggin joined #mojo
17:20 Kripton_ joined #mojo
17:28 Kripton joined #mojo
17:30 suy joined #mojo
17:34 mtths joined #mojo
17:45 labrown joined #mojo
18:11 btyler joined #mojo
18:13 ka2u joined #mojo
18:23 Mike-PerlRecruiter_ joined #mojo
18:25 mrphilov joined #mojo
18:47 mrphilov Question: if I $int=1366829085779580 then $self->session(int => $int) then render a template with "session 'int'" it returns 1366829085779580 as expected. If, however, I move to another page, then its template renders "session 'int'" as 1.36682908577958e+15. Is there a way around this? I'm pondering coding the value as a string.
18:49 asarch joined #mojo
18:50 btyler_ joined #mojo
18:52 mrphilov (those savvy in the ways of perl will recognise that large string of numbers as a Time::HiRes uSec of a very recent timestamp - I'm using it as the PK in a table, which I think won't do)
18:54 mrphilov I think I'll try this, too, just in case. http://stackoverflow.com/questions/142431​7/how-can-i-disable-scientific-notation-w​hen-working-with-very-large-numbers-in-pe
18:55 powerman mrphilov: did you tried to add quotes: $int="1366829085779580" ?
18:55 mrphilov powerman: Hmm. That seems elegant/simple. I'll try it now.
18:58 powerman I suppose while encoding session to json it distinguish between strings and numbers to encode accordingly by type. And later on next page while decoding number from json it become e+15.
19:00 powerman Forcing string context should be enough to avoid this, BUT keep in mind: if you later use this variable in numeric context perl may convert it back to number from string, and on next page after that it may become e+15 again.
19:01 powerman copying to temp variable should protect you from this: my $int = $self->session 'int'; if $int < …
19:02 sri murray: haha, your change was applied and a new IO::Socket::SSL uploaded to CPAN... which now broke some of our unit tests :S
19:02 mrphilov Using quotes didn't work. Using "use bigint" at the tops of my modules did.
19:03 powerman mrphilov: maybe quoted didn't work because you used it in numeric context somewhere later after assignment?
19:04 mrphilov Yeah, there was a lot of numerical context usage. In retrospect, the "use bigint;" was the proper solution.
19:04 mrphilov Not really a mojo problem as it turns out.
19:05 btyler joined #mojo
19:14 good_news_everyone joined #mojo
19:14 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/rUXs7Q
19:14 good_news_everyone mojo/master 838ee10 Sebastian Riedel: improved compatibility with IO::Socket::SSL 1.87
19:14 good_news_everyone left #mojo
19:16 alester joined #mojo
19:17 powerman left #mojo
19:21 good_news_everyone joined #mojo
19:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/gZIUXw
19:21 good_news_everyone mojo/master 9aeb94f Sebastian Riedel: made online tests more reliable
19:21 good_news_everyone left #mojo
19:37 basiliscos joined #mojo
19:45 btyler joined #mojo
19:58 mire joined #mojo
20:07 ka2u joined #mojo
20:07 denisboyun joined #mojo
20:16 ObseLeTe joined #mojo
20:16 kvorg joined #mojo
20:17 kvorg_ joined #mojo
20:22 yakudza joined #mojo
21:09 xaka joined #mojo
22:04 dvinciguerra joined #mojo
22:11 hrupp joined #mojo
22:21 ka2u joined #mojo
22:55 tempire reading the oauth2 spec
22:55 tempire 20 pages down
22:55 tempire 55 to go
22:56 * sri is reading the websocket spec again
22:56 sri thinking about the best way to handle the closing handshake
22:58 sri waiting for the close frame to be returned before actually closing the connection as the spec recommends kinda sucks
22:58 sri especially when you're dealing with a 1009 close (message too large)
22:59 sri you have to read the whole frame to be able to get at the close frame following it
23:00 sri and to avoid malicious peers that never return the close frame you have to put a timeout on it
23:02 sri (currently we just send the close with reason and close the connection without waiting for the frame to be returned)
23:04 sri it's simple and hard to exploit, but there's a chance the reason never reaches the other side if out peer is trying to write as well... in which case he would notice the connection close via the write operation instead of read
23:04 sri s/t/r/
23:12 sri if only half close was more popular
23:16 sri the reason i care is this test failure btw. http://www.cpantesters.org/cpan/report​/15afafe5-6c09-1014-b79e-292fc7768a8d
23:17 sri the test doesn't actually exist anymore, but i believe there's a possibility that other tests could fail randomly if the stars align correctly
23:17 sri mostly on win32, since the network stack is generally very weird there
23:33 asarch joined #mojo
23:34 sri perhaps this is one of the few cases where only the symptom should be addressed
23:35 sri Test::Mojo->finish_ok/finished_ok could accept 1006 as a valid alternative to any other code
23:35 tempire 34 pages to go
23:36 sri (1006 is the code of connection close without close frame)
23:37 powerman joined #mojo
23:37 sri so ->finished_ok(1009) could pass for 1006 as well (in the rare cases where timing is off for some reason)
23:37 powerman https://gist.github.com/powerman/5456484 - workaround to allow same non-blocking app work both under hypnotoad and as plain old cgi
23:38 powerman can be implemented as plugin, but I think this should be in Mojo core
23:46 sri tempire: how readable is the spec?
23:46 tempire I find it perfectly reasonable
23:46 sri looks like the book on oauth 2.0 has 400 pages :o http://shop.oreilly.com/product/0636920023531.do
23:47 tempire sheesh
23:47 tempire there's a related spec for bearer token usage, but it's only 18 pages
23:47 tempire I'm not sure what all the fuss is about, it seems pretty simple
23:48 tempire I suppose it's due to the complete abstract nature of authentication
23:56 sri meh, apparently half close was specifically not used in the websocket spec because it doesn't play nice with intermediaries
23:56 sri make sense, and my life so much harder
23:56 tempire well
23:56 tempire look on the bright side
23:56 tempire I'm throwing a BBQ in a couple of weeks
23:56 tempire AND YOU'RE INVITED
23:57 sri \o/

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