Camelia, the Perl 6 bug

IRC log for #mojo, 2010-07-19

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

All times shown according to UTC.

Time Nick Message
00:07 sri i'm more of a doer than a talker ;p
00:07 sri Zzz
00:29 ltriant_ joined #mojo
00:44 doubi joined #mojo
00:51 xantus joined #mojo
01:20 ltriant joined #mojo
02:32 su-bzero joined #mojo
02:45 ask joined #mojo
02:54 janus joined #mojo
03:01 yakudzo joined #mojo
04:04 tl joined #mojo
04:38 ltriant joined #mojo
04:42 Foxcool joined #mojo
05:09 zloyrusskiy joined #mojo
05:09 pid joined #mojo
05:25 fhelmberger joined #mojo
05:35 chansen joined #mojo
05:55 xantus mooo
05:55 xantus jo
06:17 yko joined #mojo
06:26 ask joined #mojo
07:30 Foxcool hello
08:19 pid joined #mojo
08:54 * sri waves
09:42 chansen joined #mojo
11:02 zloyrusskiy Hi, how to add the ability to use socks proxy to Mojo::Client right way?
11:04 sri zloyrusskiy: there is no right way
11:06 sri someone would have to rebuild proxy support in a pluggable way
11:07 su-bzero zloyrusskiy: Yep! We need socks support! Socks rule da world, but sri uses HTTP proxies only.
11:07 su-bzero ;)
11:07 zloyrusskiy sri: +1
11:07 sri i don't really care about socks, it's an ugly binary protocol not at all related to http
11:07 zloyrusskiy sri: some organizations uses it
11:08 sri patches welcome
11:09 zloyrusskiy hmmmm... now i'm studying NTLM reference from microsoft for creating server single-sing-on authentication module...
11:10 zloyrusskiy ok, i think about it too
11:11 sri socks is really ugly
11:11 zloyrusskiy i'm agree
11:12 sri i don't want it in the core, so the right way to deal with it is by making the whole proxy support code pluggable
11:12 sri thats really what someone has to figure out how to do right
11:12 yko is it possible now with Mojo::Client?
11:12 sri yko: what?
11:13 yko plugabble socks support?
11:13 sri don't think so
11:13 sri well
11:13 sri i guess someone could prepare the connection externally and queue it up
11:14 sri that might even be the right way to deal with it
11:14 yko Aha. Now i get your advise.
11:14 sri prepare connection, put it in the keep alive queue, start transaction
11:15 sri maybe even a $client->connection_cb(sub {...})
11:15 yko Thanks. Half year ago thought about socks but didn't find way do make them work with M::Client
11:15 yko Now i see how to make it, thanks
11:15 sri yko: fell free to clean up that part of the Mojo::Client code
11:15 sri *feel
11:16 yko you already told, that you don't want socks in core, so it should be MojoX::Socks or something like that ;)
11:16 yko something that wouldnt touch Mojo::Client code
11:16 sri yes, but you need a way to enqueue a new connection
11:17 sri which is currently private api
11:17 yko A.. Yes, now i see.
11:17 yko Thanks again. If i have socks need again, ill do that, for shure
11:30 sri hmm, i can add support for queueing external connections already with a small cleanup
11:51 yko :D
11:51 yko <3 Mojo design
11:51 sri it's not as easy as you might think
11:52 sri we have the problem of sync and async use
11:52 sri sync use means a secondary ioloop is created to emulate blocking
11:52 sri which in turn means you can't prequeue connections
11:53 yko My mind now outside Mojo::Client, so i have no personal opinion..
11:55 dotan joined #mojo
12:20 Htbaa joined #mojo
12:21 Htbaa Hi. In any given action, if I don't want Mojolicious to render the corresponding template how do I disable the renderer?
12:21 sri why would you not want to render anything?
12:22 Htbaa well, in a REST service the HTTP status code will say enough for me
12:22 sri $self->render(text => '', status => 404);
12:23 sri empty response
12:23 sri let me check something
12:24 sri i'm not 100% certain, but i think as sson as you set a response code auto rendering might be disabled
12:24 Htbaa not working for me, my test case still warns "file error - P:\PDF Mailer\website\templates\api\demo\usage.html.tt: not found"
12:25 Htbaa I had tried $self->res->code(500) as well, which works, but it still looks for the templates
12:25 sri thats a debug message now, might not even be relevant
12:26 sri yea, status code disabled auto rendering
12:27 sri not sure why that message appears in the log, but should be save to ignore, might even be gone in github version
12:27 Htbaa OK. It's probably got something to do with a failure with File::Tie in my case. Quirky Windows :-)
12:27 sri eww
12:29 jest joined #mojo
12:31 Htbaa ugh, even worse. I forgot to check if I had installed DateTime but used it either way. How stupid of me. Thanks for the help sri
12:31 sri sure :)
12:33 Htbaa Now I've got to go. Work won't like it if I'm on IRC... Bye
13:05 sri ok, i might have a solution for socks
13:05 sri $tx->connection($socket)
13:06 sri that could automatically use a specific prepared socket
13:06 sri another advantage would be that we could do UNIX domain sockets and stuff in turn too
13:46 sri yes, that works :)
13:47 vti nice, socketstream could be much simpler now, since i can throw socket in a queue, right?
14:02 * sri can't follow
14:02 kimoto joined #mojo
14:03 vti that's ok
14:10 GitHub164 joined #mojo
14:10 GitHub164 mojo: master Sebastian Riedel * 4513444 (5 files in 3 dirs): added custom socket support to Mojo::Client - http://bit.ly/bgkxg5
14:10 GitHub164 left #mojo
14:10 sri rather big patch
14:12 sri writing to unix domain sockets is not yet supported since i don't want to write a test for it ;p
14:13 sri but should be like s 2 or 3 line patch to Mojo::IOLoop
14:13 sri *a
14:13 yko :) nice
14:14 * Alias_ ponders porting LetMeIn to Mojo
14:14 GitHub150 joined #mojo
14:14 GitHub150 mojo: master Sebastian Riedel * 7ff4479 (1 files in 1 dirs): cleanup - http://bit.ly/9lv3re
14:14 GitHub150 left #mojo
14:15 sri whats LetMeIn?
14:16 sri sounds like a vnc thingy
14:21 Alias_ It's this svn repository manager thing I wrote
14:21 Alias_ I tried to come up with a "tiny"ish web application for doing password management
14:21 Alias_ If you've ever used svn.ali.as you've used it
14:21 Alias_ It's a whole password manager in one .pl file
14:22 Alias_ Every page fits in one network packet
14:22 Alias_ And it renders on every browser on the planet, including the broken ones in mobile phones and second life
14:35 sri ah
14:41 Alias_ I never managed to get it dependency'less though
14:50 ask joined #mojo
14:58 GitHub167 joined #mojo
14:58 GitHub167 mojo: master Sebastian Riedel * 44819d3 (1 files in 1 dirs): added custom socket example - http://bit.ly/9gCzA3
14:58 GitHub167 left #mojo
15:37 GitHub155 joined #mojo
15:37 GitHub155 mojo: master Sebastian Riedel * 27534c1 (1 files in 1 dirs): fixed test - http://bit.ly/8XcNJE
15:37 GitHub155 left #mojo
15:44 Alias_ sri: http://svn.ali.as/cpan/tru​nk/LetMeIn/lib/LetMeIn.pm
15:44 garfield [ [% TITLE %] ]
15:45 Alias_ FWIW
15:45 garfield http://xrl.us/bhtryy
15:52 sri haha, postgresql goes into space
15:53 sri http://archives.postgresql.org/pg​sql-general/2010-07/msg00394.php
15:53 garfield [ NASA needs Postgres - Nagios help ]
15:53 garfield http://xrl.us/bhtr2h
16:59 dotan sri: Mojo::Dom each iterates over elements in width-first parse order, not in document order.
16:59 sri ?
17:00 dotan perl -Mojo -e 'oO(q{http://use.perl.org/comments​.pl?sid=43486&amp;cid=69754})->dom->at("#comment_body_69​754")->search("p")->each(sub { Oo($_[0]->text)->say })'
17:00 garfield http://xrl.us/bhtr7z
17:00 dotan wait, let me write a simpler example
17:00 sri thats not self explaining...
17:01 dotan yeah. sec.
17:03 dotan perl -MMojo::DOM -le 'Mojo::DOM->new->parse("<a><b>1</b></a><​b>2</b><b>3</b>")->search("b")->each(sub { print shift->text; })'
17:03 dotan prints 231
17:04 sri feel free to fix
17:05 dotan :) ok
17:05 dotan left #mojo
18:09 spleenjack joined #mojo
18:30 GitHub36 joined #mojo
18:30 GitHub36 mojo: master Sebastian Riedel * 342dd27 (2 files in 2 dirs): fixed a few Mojo::DOM parser bugs and added tests - http://bit.ly/aFRZ2c
18:30 GitHub36 left #mojo
18:34 sri i kinda don't want to support xml namespaces
18:34 sri so for now i'll just allow selectors like foo\:bar
18:34 xantus morn'
18:35 * sri waves
18:35 sri if anyone wants proper xml namespaces, feel free to send patches :)
18:37 chansen joined #mojo
18:41 sri the whole xml namespace concept sucks actually ;p
18:44 sri i'd rather add more pseudo classes if i had any spare time
19:04 ashleydev joined #mojo
19:12 robinsmidsrod How do I set the HTTP Content-Type header for all text/html and text/plain to UTF8 by default?
19:29 xantus isn't that default
19:33 dotan joined #mojo
19:37 dotan sri: I has fix. But I see you got it too. (push -> unshift)
19:37 sri dotan: sorry, already fixed
19:38 dotan now cat we do 'p:eq(2)' and 'li:gt(3)'
19:38 dotan can
19:38 dotan ?
19:38 sri robinsmidsrod: app->types->type(html => '...')
19:38 sri dotan: sure
19:38 dotan nm, gave me something to do on the train ride home :)
19:39 sri i don't have time for new pseudo classes though
19:39 sri patch welcome :)
19:39 dotan there are old pseudo classes?
19:40 sri yes :root
19:40 sri so we can already parse them, they just don't do anything yet
19:52 robinsmidsrod sri: awesome!
19:53 robinsmidsrod sri: my mojolicious lite app running on my dev server (please not post publicly about it) http://dev.smidsrod.no/ - like it?
19:53 garfield [ Most popular links today ]
19:53 robinsmidsrod try http://dev.smidsrod.no/week/1/perl for last weeks most popular perl links
19:53 garfield [ Most popular links about 'perl' last week ]
19:54 robinsmidsrod still quite a barebones UI, but the basic stuff works
19:55 vti robinsmidsrod: how do you collect stats?
19:55 robinsmidsrod twitter
19:55 robinsmidsrod using the twitter streaming api
19:55 vti ah, ok :)
19:55 robinsmidsrod for the keywords at the bottom of the page
19:56 ariel joined #mojo
19:56 robinsmidsrod if you think some keywords are missing, please tell me - I'm trying to make it into a page that will highlight things of interest to software developers and hardware/software geeks
19:57 ariel hi revolutionaries! i have a simple question, how do i disable caching of layouts in the controller?
19:57 robinsmidsrod some keywords I had to ignore, like 'php' and 'html', because they just matched too much - too much off-topic stuff coming in
19:58 robinsmidsrod vti: actually, if you want to run it for yourself against a set of your own keywords, just clone from http://github.com/robinsmidsrod/twitter_stream and try it out
19:58 garfield [ robinsmidsrod's twitter_stream at master - GitHub ]
19:59 robinsmidsrod vti: run twitter_stream.pl in a screen (one instance) and a couple of resolve_urls.pl processes (I run 3) and one web_app.pl daemon and you should be able to start collecting your own stats
19:59 robinsmidsrod config file in ~/.twitter_stream.ini
20:01 * robinsmidsrod &
20:02 sri ariel: what do you mean with "caching"?
20:03 sri robinsmidsrod: yay, i'm in the perl list :)
20:06 sri ariel: templates are just compiled into perl code and kept in memory, there is no *real* caching involved
20:06 sri during development you can just start your daemon with --reload and have it automatically pick up changes
20:07 ariel sri, template caches, i had the feeling they were being cached
20:07 sri no caching at all by default from our side
20:07 ariel sri, thanks for the clarification
20:09 dotan ariel: maybe your changes aren't getting reloaded?
20:10 dotan if you're not restarting your app, you need to use MOJO_RELOAD for template changes to show up
20:12 ariel yes, i guessed i i had to restart the app after making changes, thanks
20:12 sri just start your app with --reload
20:12 sri ./myapp daemon --reload
20:15 ariel sri, that's a cool one
20:15 sri it's mentioned in the documentation
20:15 sri around line 1 :)
20:16 ariel does the project have documentation? *kidding* i'm so waving goodbye to rails and cakephp ;)
20:18 ariel there seems to be a problem when doing --reload: Can't create listen socket: Address already in use at /usr/local/share/perl/5.10.0/Mojo/Server/Daemon.pm line 336
20:19 sri never seen that, works flawless here
20:23 dotan ariel: is there an earlier instance still running somewhere? do you have some different app on the same port?
20:23 ariel it's the same error it would yield when starting the daemon twice, for some reason the "--reload" argument is being ignored
20:23 ariel dotan, i'm doing all as standard as possible
20:23 sri yea, sounds like you have a second daemon running somewhere
20:24 ariel but if i do ./app.pl daemon --reload, it should be sending a signal, not invoking _listen() again
20:25 ariel i'll restart the app manually by now, it's no problem
20:53 ask joined #mojo
20:57 yko joined #mojo
21:04 ariel is there a way to serve static content (css / js) without having to use a special configuration?
21:06 ashleydev joined #mojo
21:07 sri ariel: also mentioned in the documentation
21:08 sri just put everything in the public directory
21:10 ariel sri, when you refer to the documentation are you talking about the faq? or could you point me the link to the docs?  thanks
21:10 sri perldoc Mojolicious::Lite
21:11 sri and newer stuff on github http://github.com/kraih/mojo/tre​e/master/lib/Mojolicious/Guides/
21:11 garfield [ lib/Mojolicious/Guides at master from kraih's mojo - GitHub ]
21:11 garfield http://xrl.us/bhqivb
21:12 ariel very good, thanks
21:15 GitHub39 joined #mojo
21:15 GitHub39 mojo: master Sebastian Riedel * 83d6678 (1 files in 1 dirs): mention Mojo::DOM in tutorial - http://bit.ly/9ijR1b
21:15 GitHub39 left #mojo
21:17 ask joined #mojo
21:29 dotan left #mojo
21:43 GitHub174 joined #mojo
21:43 GitHub174 mojo: master Sebastian Riedel * 9a9d54d (1 files in 1 dirs): regex cleanup - http://bit.ly/bCZAnX
21:43 GitHub174 left #mojo
21:43 _mpu why not using non greedy .*? patterns in Mojo::DOM instead of complicated lookaheads constructions ?
21:43 xantus did you test it?
21:44 sri ye test it :)
21:44 sri .* wants to match as much as possible
21:44 _mpu not .*?
21:45 sri oh hmm
21:45 sri i've never seen non greedy .*
21:46 sri hmm
21:46 sri my regex fu is weak :(
21:46 _mpu :)
21:47 _mpu it will be simpler, however I did not test it ...
21:47 _mpu my bad
21:47 xantus if it tests fine, why not? :)
21:51 sri ooh, it fails
21:52 sri the CDATA regex has very good tests if you want to try it
21:52 sri i'll have to read up on this
21:58 sri not sure why it fails though
22:00 _mpu how can I do to have more info on the test which failed (line number) ?
22:01 sri you should have that by default
22:01 sri perl t/foo.t will show the descriptions too
22:02 sri ah, or prove -v
22:04 _mpu thanks
22:05 * sri buys the epub version of mastering regular expressions for his iphone
22:07 yko prove -r -v....
22:08 _mpu adding the flag s at the end $XML_TOKEN_RE solves the pb
22:08 _mpu it failed on the awesome CDATA
22:08 _mpu which is multiline
22:08 * yko spent half gout today, seeking why test doesn't fails, running prove -v without -r :(
22:08 yko s/gout/hour/ # nice typo, aha
22:08 _mpu however I don't understand why it worked before
22:08 xantus sri: I have the cookbook
22:09 _mpu sri, moreover the good test would be like qr/\[awesome\]\]/
22:09 _mpu I think
22:10 sri _mpu: agreed
22:10 sri xantus: any good?
22:10 ltriant joined #mojo
22:11 xantus useful
22:11 sri hmm, think it's like 3euro, guess i'll take the cookbook too then :D
22:15 stephen joined #mojo
22:19 GitHub18 joined #mojo
22:19 GitHub18 mojo: master Sebastian Riedel * 3810950 (2 files in 2 dirs): regex cleanup - http://bit.ly/b9ljWv
22:19 GitHub18 left #mojo
22:19 sri _mpu++
22:26 _mpu this is my commit :)
22:36 sri indeed :)
22:40 sri _mpu: if you give me your name i'll also add it to the list
22:46 GitHub20 joined #mojo
22:46 GitHub20 mojo: master Sebastian Riedel * 96307bb (2 files in 2 dirs): update changes - http://bit.ly/cKyqQv
22:46 GitHub20 left #mojo
23:02 sri http://dontholditwrong.tumblr.com/ # lol
23:02 garfield [ Don't Hold It Wrong ]
23:03 yko there's some strange error.. Unhandled event error:  at Mojo/IOLoop.pm line 809.
23:03 yko I know that's bad that i'm telling about error without nice background, like tests or something else like that... ill bring it later
23:04 sri it's rather useless ;p
23:04 yko ye, i know
23:04 yko this error appears when not using Epoll/KQueue on linux system.
23:04 sri that would be poll then
23:04 yko As only i have some time, ill investigate from where it comes and will make tests/patch.
23:04 yko ye
23:05 sri all our unit tests run on poll now though
23:05 sri kqueue/epoll are disabled in all unit tests
23:05 yko Just want you know that there's some kind of little problem. Not critical, just annoyng warning
23:05 sri hmm
23:07 yko this error was confirmed to appear by another developer in #ru.pm few days ago (also on github mojo)
23:07 * sri cracks the whip
23:07 yko appears on both reload/production daemon modes.
23:08 yko Skip this message, just if someone will tell you the same, youll know :)
23:08 yko as only i have some free time, ill find where it is :)
23:08 * sri cracks the whip again
23:09 * yko cry.
23:10 sri unhandled errors are very unusual, means that the error callback broke or so
23:11 sri or an error from poll without a message
23:11 sri that possible too
23:11 sri *'s
23:12 sri "Connection reset by peer" this one is very common on os x
23:12 sri maybe there the linux version doesn't have a message
23:12 sri *-re
23:13 sri i'll stop guessing now though ;p
23:13 yko yep, i dont require from you anything, just sharing thoughts
23:14 yko Mojo getting stronger from day to day, that makes me happy
23:15 sri viva la revolucion!
23:15 yko Viva!
23:15 yko btw, is there any supposed release date?
23:15 * sri shoots into air
23:15 sri when it's ready :)
23:16 sri not in a hurry
23:16 sri ideally i would like to relaunch the site too with the 1.0 release
23:16 yko :) just curious
23:16 yko actually for me it's good that you are not hurry with release
23:17 yko i have some plans about little party on Mojo 1.0 release, but should prepare something
23:18 sri :)
23:18 yko some people are so lazy, you know, so i'm glad you don't hurry :D
23:18 sri i have a cohiba ready for the 1.0 release
23:19 yko Ouch! I should prepare some good tobacco for my pipe also
23:20 yko Actually, cohiba also sounds good. No need to stuff and clean each time you smoke :D
23:20 yko Some peiple are so lazy... i've dropped smoking only because i'm lazy :D
23:21 * sri goes to get a new whip
23:27 sri Zzz
23:29 * yko steals new whip, while maintainer hibernates.
23:37 xantus_ joined #mojo
23:37 xantus_ :)
23:38 yko good night :D
23:38 * yko cracks the whip.
23:38 * xantus steals yko's whip
23:38 yko damn...
23:39 yko xantus, are you russian? that's our way to do things...
23:40 xantus :P
23:40 xantus no
23:46 xantus those silly russians :)
23:49 yko :(

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