Camelia, the Perl 6 bug

IRC log for #mojo, 2011-08-06

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

All times shown according to UTC.

Time Nick Message
00:04 trcjr joined #mojo
00:22 j3nnn1 joined #mojo
00:42 ispy_ joined #mojo
00:49 xaka joined #mojo
01:15 tempire does anyone know a good js video player that has chapter support?
02:02 alnewkirk joined #mojo
02:06 xantus[] chop them up and use html5
02:27 MisterHatt hey sri, for simple messaging, ould you say comet or websocket is more efficient?
02:28 MisterHatt well comet+json I guess
02:29 perlrocks Twitter: "I will recommend DQNEO @ Mojolicious. Easy to install, easy to use, many documents, (the English) have a mailing list." (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/99668499466686464
02:40 tempire manually chop them up?
02:40 tempire that's so…barbaric.
02:42 MisterHatt tempire: flowplayer might support it, nfi if that's still js tho
02:54 ispy_ joined #mojo
02:58 j3nnn1 joined #mojo
03:24 perlrocks Twitter: "The application to run Mojolicious Yappari will be a dangerous SpeedyCGI. Bambang increase the number of connections DB. Mawasenai use the database handle. What's wrong and how to implement that? ?" (ja) --clicktx http://twitter.com/clicktx​/status/99682203168030720
03:27 perlrocks Twitter: "Web scraping is a Web:: I'm implemented by Scrapper, Mojo this page to read it again: I can remember and in the DOM. Mojolicious:: Guides:: Cookbook - GitHub http://t.co/yaXax5O" (ja) --clicktx http://twitter.com/clicktx​/status/99682933446688768
03:48 tempire ah, you don't have to cut up the video
03:48 tempire document.getElementById('video').currentTime works
04:23 kaare joined #mojo
04:50 sri good morning sunshines
04:51 tempire two words: chapter shortcuts!
05:33 abra joined #mojo
05:46 jwang joined #mojo
05:56 GitHub161 joined #mojo
05:56 GitHub161 [mojo] kraih pushed 1 new commit to master: http://bit.ly/ok6rCF
05:56 GitHub161 [mojo/master] made Mojo::UserAgent slightly more efficient - Sebastian Riedel
05:56 GitHub161 left #mojo
05:56 j3nnn1 joined #mojo
05:58 arpadszasz joined #mojo
08:03 tabbi joined #mojo
08:03 tabbi left #mojo
08:03 Kulag joined #mojo
08:16 Kulag joined #mojo
09:04 GitHub169 joined #mojo
09:04 GitHub169 [mojo] kraih pushed 1 new commit to master: http://bit.ly/nJ7Enc
09:04 GitHub169 [mojo/master] added resolver synopsis - Sebastian Riedel
09:04 GitHub169 left #mojo
09:18 perlrocks Twitter: "Thank you! Try using! @ Perlcodesample @ DQNEO I will recommend Mojolicious. Easy to install, easy to use, many documents, (the English) have a mailing list." (ja) --DQNEO http://twitter.com/DQNEO/status/99771336976637952
09:35 Foxcool joined #mojo
09:51 tabbi joined #mojo
09:51 tabbi left #mojo
09:53 pjb joined #mojo
10:04 Kulag joined #mojo
10:05 nickl joined #mojo
10:08 Kulag joined #mojo
10:23 Kulag joined #mojo
10:42 Kulag joined #mojo
11:18 abra joined #mojo
11:19 marcus wassup homies.
11:23 Kulag joined #mojo
11:42 Drossel joined #mojo
11:44 sri yo yo yo
11:44 * purl walks the dog
11:46 marcus ghetto superstar, that is what you are, coming from afar, reaching for the stars
11:48 Kulag joined #mojo
12:03 Kulag joined #mojo
13:24 shonorio joined #mojo
13:27 trone_ joined #mojo
14:25 perlrocks Twitter: "Mojolicious:: Plugin:: Security? Who knows? :-)" (pt) --juniiormoraes http://twitter.com/juniiormor​aes/status/99848639836467200
14:28 fhelmber_ joined #mojo
14:56 tabbi1 joined #mojo
14:56 tabbi1 left #mojo
16:07 preflex joined #mojo
17:23 alnewkirk joined #mojo
17:31 jwang how can I link a generic action to a method? i.e. http://foobar/$username --> ->send_message( $username )
17:32 alnewkirk jwang, use a callback
17:33 jwang I'm looking at the echo webservice example. will that work?
17:34 alnewkirk $self->routes->route('/foobar/:username')->to(cb => sub{ Class->send_msg(shift->param('username')) });
17:35 jwang will that work if foobar is the server name only?
17:36 jwang http://myserver.com/$username
17:36 alnewkirk huh?
17:38 jwang http://twitter.com/kraih
17:39 jwang maybe ->route(':username')
17:39 jwang or ->route('/:username')
17:40 alnewkirk the later
17:40 purl rumour has it the later is better for both
17:40 jwang cool
17:40 jwang I just found this in the docs too
17:40 jwang my $route = websocket '/:foo' => sub {...};
17:41 alnewkirk that for Mojolicious::Lite
17:41 jwang I'm just starting out
17:43 sri i highly recommend reading the documentation
17:43 sri http://mojolicio.us/perldoc
17:43 purl well, http://mojolicio.us/perldoc is lovely
17:43 * sri pats purl
17:43 purl how condescending
17:45 jwang thanks
17:45 jwang got it working in Mojolicious::Lite
17:45 jwang get '/:string' => sub { my $self = shift; $self->render_text($self->param('string')); };
17:46 sri that's explained like at the top of the tutorial ;p
17:49 jwang I don't understand the tutorial :( at the top of Routing it starts off with '/user/...' and then under Generic placeholders every thing for '/hello' goes to undef
17:50 sri step back
17:50 * purl backs into a monster!
17:50 alnewkirk lol
17:50 sri don't start with the guides
17:51 jwang ah ok
17:51 jwang got it now
17:51 sri as the description on the page i linked you says, the lite tutorial is a prerequisite for the guides
17:54 jwang cool, I'm not panicing anymore :)
17:54 sri http://memegenerator.net/instance/9243907
17:54 sri or actually http://images.memegenerator.n​et/instances/500x/9243907.jpg
17:55 sri heh
17:57 jwang joined #mojo
17:59 sri i made you a meme, but you missed it :(
18:00 xaka joined #mojo
18:12 jwang :(
18:12 jwang had to reboot
18:12 jwang I can't find rendering png images in the tutorial or guides yet :(
18:13 jwang except for the base64 encoded favicon
18:13 jwang mmm - do I need to base64 encode my image?
18:13 jwang I'm dynamically generating images with Graphics::Magick
18:15 jwang what's a good way to render a Graphics::Magick object as a png?
18:15 jwang maybe dta
18:15 jwang data
18:19 sri yes
18:19 sri ->render(date => $bytes, format => 'png');
18:19 sri s/e/a/
18:23 * marcus renders a date with fate for sri.
18:23 marcus 80% in book 3 of a song of fire and ice now.
18:24 sri would that be season 3 of the tv series?
18:25 marcus yepp
18:25 sri oh my
18:25 marcus 2 books t o
18:25 marcus to go
18:26 sri hope the good characters stay alive
18:26 * marcus remains mute
18:27 sri damn
18:27 marcus don't want to spoil it for you :)
18:27 sri from what i heard they all die :S
18:28 marcus there are still characters remaining in book 3 :)
18:29 marcus would be interesting to see what he would write about otherwise.
18:29 marcus and the series is not concluded yet
18:30 * marcus is building a lego robot this weekend.
18:31 sri an evil robot?
18:34 jwang is there anything wrong with this? sometimes it works, but it's slow and inconsistent (sometimes times out, sometimes gives you a file to download)
18:34 jwang http://grokbase.com/misc/webfront.pl.txt
18:36 jwang Image::Robohash just gives you a Graphics::Magick object in ->image. I've used it for 1000s of images from the cli
18:37 sri make sure png always contains data
18:37 sri $png
18:38 sri my bet would be on your rendering being broken
18:38 sri well, messing with global handles is playing with fire anyway
18:39 tempire sri: have you noticed sketch filling a shape with a different color than you specified?
18:39 sri that app would completely screw up the cgi backend
18:40 sri tempire: nope
18:41 tempire I need a sponsor so I can host the video files directly with the html5 video tag
18:41 jwang yeah, I was hoping to find a way GM would just give you the octets but I haven't found it yet
18:42 sri at least localize it
18:46 jwang very nice error screen
18:47 jwang love the code highlighting
18:47 sri :)
18:57 sromanov joined #mojo
19:07 jwang I'll just write it to the fs
19:07 jwang http://grokbase.com/misc/webfront.pl.txt
19:07 jwang seems to work ok in testng
19:09 jwang it's a perl port of http://robohash.org/
19:28 jwang there's some benefit to having nginx cache the image for a little while which I think requires writing it to disk, but I haven't played with that part yet.
19:36 jwang is there a way to assign a path for static files, like : get '/static' => sub { $self->render_static } ?
19:37 jwang maybe @@ static*
19:40 sri no
19:40 sri if you want more features you just should use a proper file server
19:41 jwang ok
19:41 jwang I need something similar to tornado.web.StaticFileHandler
19:41 jwang mmm
19:41 jwang I'm looking at how they do it
19:42 sri why would you need a prefix anyway?
19:42 jwang I think I can do what they are doing by passing in the url
19:43 sri you know nginx can just match file extensions right?
19:43 jwang I can probably mimic the following (r"/static/(.*)", tornado.web.StaticFileHandler, {"path": os.path.join(os.path.dirname(__file__)
19:44 sromanov joined #mojo
19:44 jwang I'm still on apache :p
19:44 sri yes, that can be mimicked
19:44 sri that sucks for you ;p
19:44 jwang nginx is on the list but I use a lot of rewriting and need to learn that for nginx
19:44 jwang need to carve out some time
19:45 sri get '/static/*whatever' => sub { $_[0]->render_static($_[0]->param('whatever')) }
19:45 sri that prolly works
19:46 sri but prefix is old school… just go nginx like the cool kids ;p
19:47 jwang cool, that works :)
19:48 sri no idea how it handles non existing files, you might want to check that
19:48 sri maybe render_not_found unless ...
19:48 jwang it waits
19:48 jwang for a delayed response
19:49 sri render_not_found if … should work
19:49 sri umm… unless
19:49 sri well… one of the two :)
19:50 jwang nice ;)
19:50 ndiewald joined #mojo
19:54 jwang unless works.
19:54 jwang sweet
20:28 jwang does :string ignore everything after a '.'?
20:29 jwang for :string = 'foo.bar', render text param('string') gives 'foo' in both cases, but in different font
20:30 jwang :string = 'foo' <- text/html UTF-8
20:30 jwang :string = 'foo.bar' <- results in 'foo' but in text/plain iso-8859-1
20:31 nickl joined #mojo
20:31 jwang how can I capture a '.' in :string?
20:34 jwang strings with periods
20:44 Kovensky hmm
20:44 Kovensky is it safe to combine Mojostuff with AnyEvent+EV?
20:52 nickl joined #mojo
20:54 jwang tutorial to the rescue :) gotta love those guides ;)
20:58 Kovensky I guess the better question would be, can I use both use EV and Mojo::IOLoop arbitrarily and "independently" without causing problems?
20:58 Kovensky (wanna do some asynchronous file reading and folder polling)
20:58 Kovensky directory*
21:00 sromanov joined #mojo
21:18 marcus Kovensky: recent mojo improved EV support alot iirc
21:18 marcus Kovensky: check the changelog
21:19 marcus Kovensky: Mojo::IOWatcher::EV
21:21 Kovensky marcus: yeah, I just wondered if using EV directly would conflict with whatever it is that mojo does
21:25 Kovensky cuul, seems I'll also have some fork()ing to do...
21:26 Kovensky cool*
21:29 sromanov joined #mojo
22:07 * tempire wonders if a linkedin share button is worth the screen real estate
22:17 jwang tempire: probably depends on the subject matter / audience
22:17 jwang are linked in people likely to click it and does seeing the like count add value to the user
22:46 tempire Can I access placeholder values from a helper?
22:52 tempire doh.  of course i can.
22:54 arpadszasz joined #mojo

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