Camelia, the Perl 6 bug

IRC log for #mojo, 2012-10-12

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

All times shown according to UTC.

Time Nick Message
00:48 kevouze joined #mojo
01:03 laouji joined #mojo
01:04 GabrielVieira joined #mojo
01:26 sri tempire: something like this would be cool http://maximebf.com/blog/2012/10/bui​lding-websites-in-python-with-flask/#.UHc5pLTc3w4
01:43 d4rkie joined #mojo
01:52 Adurah joined #mojo
01:57 Foxcool joined #mojo
02:04 xaka joined #mojo
02:16 noganex_ joined #mojo
02:18 sunson joined #mojo
02:18 xaka joined #mojo
02:18 laouji_rouge joined #mojo
02:35 mandreacchio joined #mojo
02:36 sunson is there a way I can "opaquely" serve a static file? basically, if people come to /controller, based on some internal state I'd like to serve out a static file. I could 'redirect_to', yes, but I'm wondering if there is a way without redirect.
02:37 sunson (I'm trying to avoid one more long-haul HTTP request - because (most of) my users will use this app over a very slow connection)
02:40 crab sure.
02:41 crab use $self->render_data() with the appropriate headers set (notably content-disposition set to attachment)
02:41 crab or use a Mojo::Asset
02:42 sunson crab: thanks!
02:43 sunson it may be useful to update http://mojolicio.us/perldoc/​Mojolicious/Guides/Rendering with render_data. its quite a useful feature.
02:44 sunson of course, its there in http://mojolicio.us/perldoc/Mojolicious/Controller ... but guide will be useful. </2 cents>
02:45 sunson crab: render_data needs $bytes. can't I just give it a path and it can stream from it?
02:46 mandreacchio joined #mojo
03:10 crab render_sattic
03:10 crab static
03:24 sunson cool :)
03:24 sunson crab: thanks
04:02 lukep joined #mojo
04:02 Polarn joined #mojo
04:56 mandreacchio_ joined #mojo
05:11 laouji joined #mojo
05:25 Britzel_ joined #mojo
05:43 mhi joined #mojo
05:48 davido joined #mojo
05:55 mattp_ joined #mojo
06:02 mandreacchio joined #mojo
06:06 abra joined #mojo
06:08 mandreacchio joined #mojo
06:08 mandreacchio joined #mojo
06:12 ovnimancer joined #mojo
06:24 dpetrov_ joined #mojo
06:27 mandreacchio_ joined #mojo
06:28 davido joined #mojo
06:28 Vandal joined #mojo
06:29 mandreacchio_ joined #mojo
06:35 mandreacchio joined #mojo
06:51 alex_K joined #mojo
06:55 spleenjack joined #mojo
07:13 Vandal joined #mojo
07:20 Mike-PerlRecruiter_ joined #mojo
07:48 yakudza_ joined #mojo
07:51 pau4o joined #mojo
07:59 vishwanathms joined #mojo
07:59 daxim joined #mojo
08:00 vishwanathms_ joined #mojo
08:04 fhelmber_ joined #mojo
08:04 keedi joined #mojo
08:43 batman left #mojo
08:43 ovnimancer joined #mojo
08:49 memowe O HAI! :)
09:00 zpmorgan howdies, memowe
09:01 memowe yeah. :)
09:10 D4RK-PH0ENiX joined #mojo
09:14 nicomen for some reason even after adding a tt_renderer as a plugin, I can't get mojo to find the tt files without explicitly sending a handler => 'tt' in render() call, is there something I can do to make it the default?
09:14 nicomen (it looks for .ep files by default)
09:20 Foxcool joined #mojo
09:29 mandreacchio joined #mojo
09:31 mandreacchio_ joined #mojo
09:49 ObseLeTe joined #mojo
10:27 batman joined #mojo
10:35 JiYu joined #mojo
10:38 batman joined #mojo
10:46 mhi Hey.
10:47 mhi How do I call a function using embedded perl? I tried "<% my $foo = App::MySQL::db_open() %>", but that's not really working.
10:49 batman mhi: that should work
10:49 batman it's "just perl"
10:49 bjoernfan mhi: Do you really wanna do that?
10:50 batman mhi: and what bjoernfan says: you probably don't want to do that
10:50 batman generate data in your controller and present it in your template
10:50 batman generate/retrieve
10:56 cosmincx joined #mojo
10:57 mhi Ah, okay. Nevertheless, I get this error: Can't locate object method "db_open" via package "App::MySQL" at template "app/about.html.ep"
10:57 mhi db_open is in lib/App/MySQL.pm.
10:59 mhi Do I somehow have to introduce that package to mojo first?
11:00 yakudza_ joined #mojo
11:02 rem_lex| joined #mojo
11:03 nicomen mhi: I guess it would make more sense to add a helper that opens the db
11:03 nicomen and returns a handler to use in the template
11:04 * mhi tries
11:06 nicomen but if you insiste, I guess the template needs to load App::MySQL somehow
11:36 batman i don't get this: i'm setting syntax to HTML in st2 and suddenly i cannot press enter to make a new line
11:36 batman anyone had this issue?
11:39 * dross yawns
11:39 dross o.o
12:08 crab sigh. i spent time convincing some people that they should move away from mod_perl to a perl framework like mojolicious... and they picked catalyst.
12:09 batman crab: tough luck
12:09 batman any idea why?
12:09 purl i guess any idea why is the catalyst site powered by catalyst?
12:09 batman purl aka skynet
12:10 purl batman: excuse me?
12:10 zpmorgan hah!
12:10 zpmorgan hi batman
12:11 batman hi. did you notice i've fixed the "during global destruction" bug?
12:11 zpmorgan oh, cool!
12:13 sri as a supervillain i approve of global destruction
12:14 batman but i don't like warnings during global destruction. i want it to be instant :)
12:17 batman zpmorgan: got some other important bugfixes: https://github.com/marcusrambe​rg/mojo-redis/commits/master/
12:17 batman but i haven't written any tests for them, so don't tell marcus :P
12:18 * sri won't tell marcus
12:18 zpmorgan okay; did you know that you can attach multiple callbacks to the same channel for the same connection?
12:19 batman with mojo-redis or in general?
12:19 zpmorgan mojo-redis
12:19 purl mojo-redis is built on mojox-redis, so not everything has been modernized yett.
12:19 batman in mojo-redis we always create a new connection, but it's maintained by the same object
12:19 batman maintained = kept
12:20 * sri wishes there was a version of redis that wasn't limited by RAM
12:20 zpmorgan oh, so each one can timeout or be shut down independently
12:20 batman well... they can timeout independently at least...
12:20 zpmorgan 2.4 swaps to disk, iirc
12:21 batman i think purl is wrong by the way
12:21 zpmorgan it would be neat if the life of the connection was tied to a websocket or something
12:22 batman zpmorgan: just make $redis go out of scope when the ws close
12:22 batman like on(finish => sub { undef $redis });
12:24 zpmorgan I tried doing that by stuffing redis into the stash
12:24 zpmorgan it didn't timeout for a couple hours; maybe some refs isn't weak enough
12:25 batman not sure which version you where using
12:25 batman but i fixed it as well... let me see if i can find the commit
12:25 batman i need to fix unsubscribe() to close the subscribed connection i think
12:26 zpmorgan it hasn't been an issue so far; my go server has just 7 registered users.
12:26 batman :)
12:26 sri zpmorgan: actually, i think vm was deprecated in 2.4
12:27 batman zpmorgan: https://github.com/marcusramberg/mojo-redis/commi​t/70efab0b1f8525c3a696cd6550490ae1d8d42271#L0R62 <--- DESTROY now takes care of all connections and not just the main one
12:27 batman jhthorsen authored 19 days ago: Will also clean up ioloop clients created by subscribe()
12:28 * sri hates this convention $self->{_connection}
12:29 batman sri: what would you do?
12:29 sri $self->{connection}
12:29 sri underscore is kinda redundant, since poking into objects is never ok
12:30 batman well... i tend to make it obvious that this key does not have an accessor
12:30 sri it's soooo ugly
12:31 batman hehe
12:31 batman i might change that as well then
12:31 batman i've stopped doing {'foo'} so...
12:32 batman {foo} is better. i understand that now
12:32 sri :)
12:32 batman but it's troubling when i need to do {'foo.bar'}
12:33 sri looks like virtual memory is completely gone in redis 2.6
12:34 zpmorgan redisbrew?
12:54 basic6 joined #mojo
13:24 fhelmber_ joined #mojo
13:38 dpetrov_ joined #mojo
13:47 judofyr joined #mojo
13:48 judofyr sri: you know about something similar to asset pipeline in Perl/Mojo?
13:55 bluescreen joined #mojo
13:56 sri judofyr: doesn't exist yet
13:57 judofyr sri: just something as simple as "//= require foo.js" makes me so much more happy
13:57 sharifulin joined #mojo
13:57 sri but a few people were working on it (diegok and tempire afair), whole thing was already designed here on the channel months ago
13:57 judofyr sri: makes it possible to escape the "one-file-lots-of-functions-and-jquery-fuckit"
13:58 sri i actually hate magical comments
13:59 sri what i wanted was some kind of asset compilation dsl
13:59 sri app->asset('app.js' => ['jquery.js', 'foo.js', 'bar.js']); <%= asset 'app.js' %>
13:59 sharifulin joined #mojo
14:00 sri whole reason i added support for multiple static paths was for an asset pipeline :)
14:00 judofyr I don't care if it's comments or what; I just want to split things in separate file which then are concatinated later
14:00 sh4 joined #mojo
14:00 sri yea, and minified
14:02 sri shouldn't be more than one or two weeks of work to get right, since the necessary hooks already exist in mojolicious
14:05 gryphon joined #mojo
14:07 judofyr :S
14:07 judofyr I got power…
14:07 judofyr sri: I've been enjoying this lately: https://github.com/judofyr/dep.js
14:08 sharifulin joined #mojo
14:20 inokenty joined #mojo
14:25 Jason__ joined #mojo
14:32 robhammond joined #mojo
14:35 knshaum joined #mojo
14:44 fhelmber_ joined #mojo
15:27 ZadYree Are there some mojo captcha samples out?
15:39 jamesw joined #mojo
15:58 xaka joined #mojo
16:15 mattastrophe joined #mojo
16:25 SmokeMachine joined #mojo
16:47 SmokeMachine joined #mojo
16:54 SirG joined #mojo
17:06 ObseLeTe joined #mojo
17:26 ObseLeTe joined #mojo
17:54 d4rkie joined #mojo
17:54 avenj joined #mojo
17:59 vishwanathms joined #mojo
17:59 vishwanathms_ joined #mojo
18:19 SmokeMachine joined #mojo
18:19 phillipadsmith joined #mojo
18:28 sri we really need to find a way to replicate this problem http://groups.google.com/group/mojolicio​us/browse_thread/thread/9fe75ee0fcb69902
18:29 chansen joined #mojo
18:37 tempire on lion?
18:37 tempire is anyone in here still on lion?
18:44 sri i get it on mountain lion too
18:44 sri but only for 1 in a few hundred test runs
18:44 sri while true; do; ./script/mojo test t/mojo/websocket.t; done
18:45 sri that's what i usually use... but it's soooo rare
18:46 sri we've even had windows reports
18:47 SmokeMachine_ joined #mojo
18:51 mattastrophe joined #mojo
18:52 sh4 joined #mojo
18:54 sri i think it might be a timing problem, since it only seems to appear when i have a cpu heavy task running in the background
18:59 chansen joined #mojo
18:59 phillipadsmith joined #mojo
19:03 abra joined #mojo
19:04 chansen joined #mojo
19:18 sri there are multiple issues that can appear randomly too btw. like 3 or 4
19:18 sri i've mostly focused on tracking down /early_start
19:19 sri all i have so far is that the stream on the server side emits a timeout
19:20 Mike-PerlRecruiter_ joined #mojo
19:29 GabrielVieira joined #mojo
19:47 memowe joined #mojo
20:06 henq joined #mojo
20:28 Jason__ joined #mojo
20:48 bpmedley_ joined #mojo
20:56 sri oh my, i have it tracked down :O
20:56 sri that was actually so tricky it was fun
21:00 sri i even remeber when i broke it -.-
21:03 henq joined #mojo
21:06 tempire sri: do you recall those online books that explained how some large deployments worked?
21:07 sri large deployments?
21:07 tempire it was two books, I think, that documented how companies like twitter made everything work.
21:07 tempire may not have been twitter, but companies of that scale.
21:08 sri i remember books about big projects
21:08 sri but not companies
21:08 tempire do you have that url?  I seem to have misplaced it.
21:08 sri should be in my tweets somewhere
21:09 sri http://www.aosabook.org/en/index.html
21:09 sri found it
21:10 tempire perfect, thanks
21:23 good_news_everyone joined #mojo
21:23 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/PzK8Hg
21:23 good_news_everyone [mojo/master] fixed WebSocket bug in Mojo::Content - Sebastian Riedel
21:23 good_news_everyone left #mojo
21:23 sri websocket.t should be very very stable now
21:23 sri \o/
21:24 sri it failed randomly when the handshake response and the first websocket frame got written together and never made it out of the pre_buffer
21:44 GabrielVieira joined #mojo
22:14 jnbek joined #mojo
22:22 jzawodn joined #mojo
22:37 ZadYree Hmm I still cannot find a good SMTP module, they are hardly documented and error messages are like "Something must be wrong"
22:38 ZadYree Has anyone had a good experience with a SMTP module?
22:44 ZadYree oops, bad chan :O
22:54 good_news_everyone joined #mojo
22:54 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/h85UHw
22:54 good_news_everyone [mojo/master] better description for leftovers method - Sebastian Riedel
22:54 good_news_everyone left #mojo
23:18 Jason___ joined #mojo
23:31 jnbek joined #mojo
23:34 Jason____ joined #mojo

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