Camelia, the Perl 6 bug

IRC log for #mojo, 2013-06-06

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

All times shown according to UTC.

Time Nick Message
00:00 whitebook joined #mojo
00:06 achromic left #mojo
00:33 mdmonsen joined #mojo
00:35 hotsnow joined #mojo
00:44 shmuel joined #mojo
00:56 tempire new favorite font
00:56 tempire avenir
01:12 achromic joined #mojo
01:15 sri tempire: avenir next!
01:17 achromic looking to fix MojoX::Renderer::Xslate. think that Mojo's internal use of eval might be clobbering the error message from xslate
01:20 sri achromic: quick look at the source shows that it doesn't follow the rendering guide recipe
01:20 sri http://mojolicio.us/perldoc/Mojolicious/Guides/​Rendering#Adding_your_favorite_template_system
01:20 sri it's pretty clear about exceptions
01:21 achromic yeah, i'm in process of updating, but the error is gone before i can even propogate it up with die
01:21 achromic more details: https://github.com/gray/mo​jox-renderer-xslate/pull/4
01:23 sri ok, no clue how xslate works internally
01:23 achromic don't think it's an xslate problem
01:24 sri surely not a mojolicious problem
01:24 achromic xslate dies normally, but the error message is clobbered after mojo's wrapper runs it
01:24 achromic running it without mojo produces expected results
01:25 sri i have not seen any evidence for that yet
01:26 sri anyway, if there's a bug please prepare a test case that does not require xslate
01:26 achromic ok
01:26 sri (or any 3rd party modules)
01:26 inokenty joined #mojo
01:27 laouji joined #mojo
01:28 achromic left #mojo
01:29 laouji_ joined #mojo
01:32 good_news_everyone joined #mojo
01:32 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/RYznhQ
01:32 good_news_everyone mojo/master 489f0a6 Sebastian Riedel: added test for exception in helper
01:32 good_news_everyone left #mojo
01:33 sri like that
01:53 d4rkie joined #mojo
01:56 Meiermann joined #mojo
02:05 bpmedley Should the stash be mentioned on http://mojolicio.us/perldoc/M​ojolicious/Guides/Rendering?
02:05 bpmedley Sorry, flash.
02:14 hotsnow how can i send many data in web socket in one request。 for example:
02:14 hotsnow for (1..10) {
02:14 hotsnow $client->send($1);
02:14 hotsnow sleep 1;
02:14 hotsnow }
02:15 btyler joined #mojo
02:15 hotsnow it was ok if send one msg,but can send many msg in for loop
02:15 sri hotsnow: please don't ever paste into the channel
02:16 hotsnow what about this ? for (1..10) { $client->send($1); sleep 1; }
02:19 hotsnow I don't know how to send data in loop for one request
02:48 good_news_everyone joined #mojo
02:48 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/9g611w
02:48 good_news_everyone mojo/master e2d5912 Sebastian Riedel: added example for WebSocket message timing
02:48 good_news_everyone left #mojo
02:51 asarch joined #mojo
03:18 preflex_ joined #mojo
03:59 sri jberger: haha, now i get issue #500
04:02 good_news_everyone joined #mojo
04:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/M2d9aA
04:02 good_news_everyone mojo/master 6ba7319 Sebastian Riedel: improved Mojo::Message::Request to allow pipe symbol in URLs (closes #500)
04:02 good_news_everyone left #mojo
04:03 jberger whaaaaaaa
04:03 jberger ?
04:04 sri apparently firefox and chrome have decided not to encode a few characters like () and |, against all specs and other browsers
04:06 jberger ok, so I did read it correctly
04:06 jberger but we are able to deal with it
04:07 jberger why are these rather large browsers ignoring specs?
04:08 sri because they can?
04:08 * jberger shakes head
04:08 jmmills joined #mojo
04:08 sri it does seem rather harmless though
04:08 sri oh right, it was { and } before
04:08 sri i was guessing that they made that change for URL templates
04:10 sri aka RFC 6570 http://tools.ietf.org/html/rfc6570
04:10 jberger well at least its one more mystery solved
04:10 jberger 500 tickets!
04:13 jberger well if that's the case, do we allow for all those literals?
04:15 sri don't think i understand the question
04:24 sri interesting ^ is also not escaped
04:24 sri while " is
04:24 sri so it's not the entire ascii range
04:25 sh4 joined #mojo
04:32 sri and found more :o
04:32 sri \ and ` are also not escaped
04:33 sri while < and > are
04:38 good_news_everyone joined #mojo
04:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/KmIz0Q
04:38 good_news_everyone mojo/master 40ee1ed Sebastian Riedel: improved Mojo::Message::Request to allow a few more ASCII characters in URLs
04:38 good_news_everyone left #mojo
05:49 Britzel joined #mojo
05:57 denisboyun joined #mojo
06:00 hotsnow joined #mojo
06:19 suy joined #mojo
06:21 dpetrov_ joined #mojo
07:04 dod joined #mojo
07:22 inokenty joined #mojo
07:28 fhelmber_ joined #mojo
07:36 dod joined #mojo
07:47 Vandal joined #mojo
07:59 jzawodn joined #mojo
08:03 ver joined #mojo
08:28 maxhq joined #mojo
08:45 cosimo joined #mojo
09:22 denisboyun joined #mojo
09:28 Dandre Hello,
09:28 Dandre in Controler->respond_to, when fallback is reached, $stash->{format} is deleted. Why?
09:29 Dandre if it was kept, fallback renderer handler coult have a chance to produce output accordingly to format
10:23 aleksey joined #mojo
10:29 hotsnow joined #mojo
10:47 denisboyun joined #mojo
10:49 avkhozov joined #mojo
11:16 denisboyun_ joined #mojo
11:18 jpn joined #mojo
11:24 jpn joined #mojo
11:36 yakudza joined #mojo
11:37 aleksey joined #mojo
11:43 libsysguy joined #mojo
12:09 mire joined #mojo
12:22 libsysguy $self->req and self->stash both contain the same query params right?
12:38 JiYu joined #mojo
13:05 Dandre joined #mojo
13:28 aleksey_ joined #mojo
13:29 Dandre in Controler->respond_to, when fallback is reached, $stash->{format} is deleted. I have tried to comment but 2 tests fail, I don't know why
13:29 gryphon joined #mojo
13:31 Dandre another behaviour, if I have a route: get '/foo' => {text =>'bar'} and if I do get /foo.json the response is of type json but the content is raw text. Is it intended?
13:34 aleksey joined #mojo
13:38 aleksey_ joined #mojo
13:39 denisboyun_ joined #mojo
13:44 moltar joined #mojo
13:48 nicolaas joined #mojo
13:51 denisboyun__ joined #mojo
13:52 inokenty joined #mojo
13:54 btyler joined #mojo
14:03 rem_lex|pivo joined #mojo
14:18 libsysguy is there a better way to pass Models a dbh than just passing the entire app or passing the entire stash?
14:25 d4rkie joined #mojo
14:35 rihegher joined #mojo
14:37 al802 joined #mojo
14:38 al802 s anyone know how to disable the mojo exception logic, is there something I can set in start-up for example?
14:49 rihegher left #mojo
14:52 KindOne joined #mojo
14:58 btyler joined #mojo
15:04 nicolaas joined #mojo
15:19 libsysguy anybody around that can point me to a good example of a non-blocking app using mysql
15:38 * tempire zukes
15:42 libsysguy zukes?
15:46 sh4 joined #mojo
15:46 btyler joined #mojo
16:02 nic I tried deploying zukes but then it completely
16:07 delias joined #mojo
16:13 dod joined #mojo
16:14 * sri yawns
16:32 marty o/
16:46 vervain joined #mojo
16:59 depesz joined #mojo
17:02 stephan48 joined #mojo
17:05 Foxcool joined #mojo
17:07 mkrull joined #mojo
17:09 basiliscos joined #mojo
17:16 * libsysguy stretches
17:27 denisboyun joined #mojo
17:32 gtodd joined #mojo
17:56 al802 anyone know how to disable the mojo exception logic
18:00 al802 the problem for me is I get a 404 and even thought I have a $r->any('/*' => sub {} to capture anything, the mojo branded page still comes up, lists all of my routes (not nice) even the last one which is states /* *
18:02 al802 This pages is very persistent, I'd really like to completely disable it and know for 100% sure it will not be displayed under any circumstances
18:07 doby http://mojolicio.us/perldoc/Mojolicious/Guides/R​endering#Rendering_exception_and_not_found_pages
18:07 doby al802 ^^
18:09 al802 Thanks, but that does not disable them at all
18:09 jberger al802, you are in development mode
18:09 jberger production mode does not show the debug pages
18:09 al802 Yes, but I also get them in production too
18:09 al802 it does for me
18:09 jberger you shouldn't
18:09 al802 that's what I thought
18:10 jberger morbo defaults to development btw
18:10 al802 my prod is hypnotoad
18:10 jberger ok, just thought I would mention
18:10 jberger very off though
18:10 al802 The thing is, what is my catch is not executed
18:10 jberger s/off/odd/
18:16 * sri wonders if we consider route('/*') a bug or feature
18:17 sri it's an interesting side effect
18:17 sri perl -Mojo -E 'a("/:" => sub { $_[0]->render(text => $_[0]->param("")) })->start' get /foo
18:18 sri perl -Mojo -E 'a("/:" => sub { $_[0]->render(text => $_[0]->url_for("" => "bar")) })->start' get /foo
18:19 sri works since "" is a valid hash key
18:26 sri i guess we keep it unspecified, so it can be broken in the future
18:28 rem_lex| joined #mojo
18:28 jberger true, it should probably be /*catchall
18:31 al802 I thought I got that from one of the mojo examples, so should it be $r->get('/(*)'
18:32 dod joined #mojo
18:34 al802 The thing is, in my case I think it is being trapped correctly as I have a 3 second delay - which I do experience - e.g. http://mibpaste.com/Qy9HyZ
18:35 al802 and instead of render_error being executed, it executes the default page and I've confirmed this on mode=production
18:36 al802 render_error being my own error handler
18:39 yakudza joined #mojo
18:48 tianon al802: I've found that for something like /* to match a request for /, you need to provide a default value for the '' stash key - $app->any('/*')->to(controller => '...', action => '...', '' => '')
18:52 sri tianon: oh cmon... you seriously use the '' placeholder?
18:53 tianon sri: sorry, only used it once and the use is gone now, I swear!
18:53 sri -.-
18:53 tianon sri: I tried to go find it to make sure I had the syntax right, and it was already gone lol
18:53 tianon sri: because I figured you'd break it eventually :)
18:54 sri i'm considering that now
18:55 sri people seem to start out using it as some kind of anonymous placeholder
18:55 sri which it isn't at all
18:55 al802 It would be good if I could setup my own exception handlers during startup
18:55 jberger /* seems to make cognitive sense, but once you think about it so does /*catchall or whatever
18:56 sri jberger: how does it make sense?
18:56 jberger in the glob sense
18:56 al802 rm -rf /*
18:56 al802 that will make sense of it
18:56 sri but it isn't a glob!
18:56 jberger right, I know
18:56 sri more reason to break it now
18:56 al802 why not
18:56 al802 it sure looks like one
18:57 jberger sri, no arg here
18:57 jberger al802, it isn't, its a regex
18:57 sri ok, just have to figure out how exactly to break it
18:57 jberger (well it builds down to one)
18:58 sri should it die?
18:58 sri croak "All placeholders need a name."
18:58 al802 will it works right now
18:59 jberger sri: whatever happened to purl?
18:59 sri she left us :,(
19:00 jberger do we want a dipsy?
19:00 tianon sri: my vote is for killing it with a nice big croak, especially so that it dies very early and is easy to catch the error :)
19:00 jberger hey, we don't have a Bender anymore either!
19:01 al802 So what is the correct syntax to catch all (i.e. my last route)
19:01 sri someone or something is killing our bots :O
19:02 libsysguy murder mystery time
19:02 jberger al802, just give the capture a name ie. /*catchall or /*allthefish or something
19:02 al802 and what does that relate to?
19:02 jberger I accuse tempire in the billiard room with the poison botsnacks
19:03 jberger http://mojolicio.us/perldoc/Mojol​icious/Lite#Wildcard_placeholders
19:03 jberger al802, ^^
19:04 jberger hmmm Benders seem to be gone everywhere
19:04 al802 thanks
19:05 libsysguy jberger I really want to be like galileo and disregard the blocking nature of DBIx::Class
19:05 jberger libsysguy, then do so
19:05 jberger :-)
19:05 libsysguy but can't bring myself to do it
19:05 libsysguy :p
19:05 jberger hahaha
19:05 libsysguy but its tempting
19:06 jberger I'm plotting the best way to do hierarchical routes
19:06 jberger s/routes/paths/
19:06 libsysguy the power of shortcuts compels me
19:06 jberger once Mango is stable it will be hard to make myself not convert I think
19:06 jberger DBIC is SOOO heavy
19:07 Adurah What was with the recent Mongo driver code issue in... think it was Python and Java?
19:07 jberger then again, the whole niceness of Galileo is that it works with SQLite so that it may be installed directly from cpan
19:07 libsysguy I just had an argument with a co-worker about mongo
19:07 libsysguy well not argument...
19:07 libsysguy discussion
19:07 libsysguy incase he is lurking in here :p
19:08 Adurah Is Mongo hard to make good drivers for, or something?
19:09 bluescreen joined #mojo
19:10 libsysguy yeah but it was related to logging I believe Adurah
19:10 Adurah Think that was the Java one's problem.
19:10 sri Adurah: bad programmers working on those drivers, plain and simple
19:10 Adurah Yeah, yeah.
19:11 sri 10gen seems to have a bit of a quality control problem
19:11 Adurah That's the Python one... some crashable usage situation.
19:11 russum left #mojo
19:11 sri well, that scenario was a bit silly
19:12 sri the javascript shell didn't validate documents you inserted, and broken documents could trip up the python driver
19:12 Adurah Someone will do it.
19:13 sri both weren't really critical... but very sloppy coding
19:19 btyler joined #mojo
19:22 marty jberger: I've been using mongodb (via mango) exclusively for a while now and it's been a mostly positive experience.  If overhead were not an issue I'd probably use a combination of DBIC and mango, but I am trying to keep cpan dependancies to a minimum so I'm doing it all via mango and so far, all is good.  :)
19:22 libsysguy marty what are you using it for?
19:22 * libsysguy is just curious
19:22 sri there might be a way to make DBIC work non-blocking, but you'd need Coro and a hacked DBD driver
19:23 marty libsysguy.  Converting our  current ecommerce software (actually more ERP now) over to Mojolicious.
19:23 jberger marty, I'm waiting for sri's next big patch
19:23 * marty nods
19:23 jberger I have been tinkering with it thouhg
19:23 * sri hides
19:23 jberger though
19:24 jberger sri: take your time, do it right
19:24 * marty cracks the whip
19:24 * marty hides
19:24 libsysguy everyone force feed sri coffee
19:24 * libsysguy also runs
19:24 jberger sri doesn't sleep as it is
19:24 libsysguy I have noticed that
19:24 marty I'm in no hurry. the current driver works just fine for me
19:25 jberger I've been slowly writing a webcomic site for a friend using Mangolicious
19:25 whitebook joined #mojo
19:25 jberger in fact maybe that's what I should do today
19:26 marty all glory to the hypnotoad
19:28 * jberger takes away marty's whi ... ALL GLORY TO THE HYPNOTOAD
19:31 whitebook1 joined #mojo
19:35 whitebook joined #mojo
19:49 bluescreen_ joined #mojo
19:52 whitebook1 joined #mojo
19:54 sri jberger: so you are in favor of this patch that makes "/*" and invalid pattern? http://pastie.org/8016267
19:55 sri s/d//
19:57 sri instead of just adding tests to make it a feature
19:58 jberger if I'm understanding it correctly, then yeah, looks good
19:59 jberger I'm sure I could have accidentally used /*
19:59 jberger better to nip it in the bud
20:00 sri well, if it was a feature using that accidentally might not be a bad thing
20:00 sri it becomes only a problem if you use it multiple times like /*/foo/*
20:00 sri but so is /*foo/bar/*foo
20:02 d^_^b joined #mojo
20:07 jberger well its up to you, but I would support killing it
20:07 sri marcus, tempire, crab: opinions?
20:08 d^_^b I have a design question for using websockets. So I want to have a script /POST results, I also want that subroutine to fire off an update to the clients connected. Does that seem reasonable?
20:08 sri after looking at the code, i tend towards keeping it
20:08 btyler joined #mojo
20:09 jberger actually, al802s use case kinda makes sense, if you just watch to catch everything, you probably aren't going to use the capture name anyway
20:09 jberger s/watch/want/
20:13 btyler_ joined #mojo
20:21 al802 I found my problem, I think it is a recent change that must have caused it.
20:22 al802 basically if I pass a reference to render (e.g. $self->render($resp) the error handler kicks in - even in production
20:22 al802 but if I pass a hash it works fine $self->render(%{$resp}); all is good
20:24 al802 is this a regression bug?
20:25 al802 Also as the exception hander does kick-in and expose all your routes to everyone, it would be nice to be able to disable that handler (regardless of development, production or even server type)
20:27 good_news_everyone joined #mojo
20:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/xiJZTw
20:27 good_news_everyone mojo/master ea681e5 Sebastian Riedel: added more pattern tests
20:27 good_news_everyone left #mojo
20:29 sri easier this way
20:37 sri i wouldn't be surprised if more apps out there depend on "/*", considering it worked since 0.x or so
20:54 * jberger looks
20:56 BeDa joined #mojo
21:00 coff joined #mojo

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