Camelia, the Perl 6 bug

IRC log for #mojo, 2010-11-28

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

All times shown according to UTC.

Time Nick Message
00:28 und3f is now known as und3f[A]
02:14 daviddelikat joined #mojo
04:03 tl joined #mojo
04:05 tholen42 left #mojo
04:06 crab where is hypnotoad?
04:09 MojoGuest832 joined #mojo
04:10 MojoGuest832 left #mojo
05:24 daviddelikat left #mojo
05:52 su-bzero joined #mojo
06:48 perlrocks Twitter: "Ruby's Sinatra, Perl's Mojolicious:: Lite is equivalent to Python's WAF is good in a guy called Juno?" (ja) --pasela http://twitter.com/pasela/status/8774248940175360
06:48 perlrocks Twitter: "RT @ pasela: Ruby's Sinatra, Perl's Mojolicious:: Lite is equivalent to Python's WAF is good in a guy called Juno?" (ja) --AE_PerlIsm http://twitter.com/AE_PerlI​sm/status/8774249963585536
07:22 MojoGuest494 joined #mojo
07:22 MojoGuest494 From: http://news.ycombinator.com/item?id=1277067 (68 hits)
07:23 MojoGuest494 Wow, I <3 HTML5. As soon as I saw "WebSockets" was a thing I knew there had to be an IRC client.
07:23 MojoGuest494 left #mojo
07:24 MojoGuest601 joined #mojo
07:24 MojoGuest601 From: http://news.ycombinator.com/item?id=1277067 (69 hits)
07:26 MojoGuest601 left #mojo
07:27 MojoGuest239 joined #mojo
07:27 MojoGuest239 From: http://twitter.com/ (4 hits)
07:27 MojoGuest89 joined #mojo
07:27 MojoGuest89 From: http://www.networkedblogs.com/33Knp (39 hits)
07:28 MojoGuest239 left #mojo
07:28 MojoGuest89 left #mojo
08:34 MojoGuest661 joined #mojo
08:34 MojoGuest661 From: http://www.baidu.com/s?bs=websocket​+js&amp;f=8&amp;wd=websocket+client (1 hits)
08:35 MojoGuest661 left #mojo
08:41 plu left #mojo
08:51 plu joined #mojo
09:08 plu left #mojo
09:08 plu joined #mojo
09:12 und3f[A] is now known as und3f
09:13 yko joined #mojo
09:42 perlrocks Twitter: "mongodb + Mojolicious:: Lite in the month from hell too comfortable Web Services Tsukuttara CoD: BO Tsukuritai something that was hell at home for" (ja) --fuba http://twitter.com/fuba/status/8817876798545920
09:45 crab wtf
09:57 arpadszasz joined #mojo
10:25 sri crab: hypnotoad will soon be committed
10:32 jamesw left #mojo
10:37 jamesw joined #mojo
10:43 achromic left #mojo
10:50 achromic joined #mojo
11:08 spleenjack joined #mojo
11:33 zamolxes joined #mojo
11:33 zamolxes wondering what you use for DB access? plain DBI?
11:38 sri zamolxes: http
11:41 zamolxes cute :)
11:41 zamolxes that means you only use nosql dbs that offer a restful api?
11:42 sri <3 riak
11:42 zamolxes interesting
11:42 zamolxes so for old-school rdbms like pg or mysql? :)
11:43 zamolxes i think we were chatting a while ago of a DBI over HTTP api :)
11:44 sri ORLite also seems to be popular
11:44 zamolxes (so you can have a non-blocking DB API)
11:44 sri DBD::Pg supports non blocking queries
11:46 zamolxes I guess, but I wouldn't know how to integrate it in mojo's event loop. never thought about it though
11:46 zamolxes but orlite seems very nice for this pet project i have :)
11:46 jamesw you could do a Mojo version of AnyEvent::DBI::Abstract
12:22 crab sri: do you have an example of how you do riak stuff in mojo?
12:22 sri nope
12:22 sri but it is really trivial
12:25 sri all you need is $self->client but i've started a higher level glue module
12:27 sri riak is very minimalistic though, just a normal key/value store with rest api
12:27 sri and on top of that riak-search, a fulltext search engine with solr api
12:28 sri thats what i like most about riak
12:28 crab it's the async http request stuff that i wanted to see, not anything especially riak-related
12:28 sri async http got really trivial recently
12:29 sri https://github.com/kraih/mojo/blob/m​aster/t/mojolicious/lite_app.t#L414
12:30 sri just fire off your request and render from the callback
12:34 yko left #mojo
12:56 spleenjack left #mojo
13:04 arpadszasz left #mojo
14:03 sri hypnotoad is really fun now, just kept switching perl versions at runtime under heavy load at 3k req/s :)
14:06 sri and it is absolutely trivial
14:07 sri hypnotoad script/myapp
14:07 daviddelikat joined #mojo
14:07 sri kill -s 'USR1' $manager_process
14:08 sri no setup at all, you start out with tons of sensible defaults for a production setup
14:09 sri you can even change listen ports at runtime
14:13 sri decided to shut down worker processes in two stages
14:13 sri we always try to stop them gracefully first with a hard timeout, and then fallback to TERM
14:14 sri workers can be stopped gracefully individually with QUIT
14:18 sri copy on write also just works of course
14:18 yko joined #mojo
14:25 sri hot deployment is actually easier than restarting the server :D
14:30 sri also like nginx no command line options
14:49 crab sri: nice.
15:01 yuki joined #mojo
15:01 yuki left #mojo
15:53 sri grrr, a memory leak :S
15:54 sri and i can't locate it with find_cycle so far
15:55 yko maybe it goes from internal package's variables?
15:55 sri possible
15:56 yko like $LOOP in IOLoop.pm :)
15:56 sri nope, checked all those
15:56 sri i know stand alone daemon seems not to leak
15:57 sri just hypnotoad workers
15:58 yko Did you check for code closures? That stuff isn't so transparent like simple cross-references :\
15:59 jdixon sri: noob question for you
15:59 sri yea, only got 3
15:59 jdixon :)
15:59 jdixon oh, nm
15:59 sri lock, unlock and a timer
15:59 yko however, who am i to teach you seek for memory leaks...
15:59 tempire to the mojolicious!
15:59 sri ALL GLORY TO THE HYPNOTOAD!
16:00 jdixon I'm still trying to get my app to listen on '/' using apache like it does when I run it with 'daemon'.  Any suggestions?
16:00 sri an apache irc channel maybe? :S
16:00 sri thats said, ScriptAlias usually works for me
16:01 sri *-s
16:01 sri the cookbook recipe might help too
16:01 yko isn't it in wiki or faq's?
16:01 jdixon hmm, tried that.  iirc, it adds the script name back into the uri
16:03 yko jdixon : have you red this http://bit.ly/hMZn7v ?
16:04 jdixon yeah, they all have the app residing at /myapp/
16:04 jdixon except plackup
16:04 sri umm
16:04 sri ScriptAlias / "/home/sri/myapp/script/myapp"
16:04 sri ?
16:04 yko sri++
16:04 jdixon that's the first thing I did, I can't remember why that didn't work right
16:04 jdixon but I'll try it again
16:04 yko just place it to .htaccess in root
16:06 yko okay, this is actually wrong .htaccess that just works. https://gist.github.com/8e6a733ffe3ce2f5187f
16:07 yko it's damn stupid, ugly and non-orthodox way to do things, but if you need something to work, you may use it.
16:07 sri if that works add it to the wiki
16:08 yko sri, -_-
16:08 sri add it!
16:08 yko okay, one moment
16:08 sri :)
16:08 sri those small hacks can be quite useful for shared hosting
16:09 yko i'm running some projects on shared :D
16:09 sri even though shared hosting is dead
16:09 yko maybe you remember some tricks about Mojo::Lighter that i discussed - to speedup CGI loading
16:10 yko i dropped it away because user always can wait 0.1s  )
16:11 crab <%= is xss-safe, right?
16:11 yko ye
16:11 yko except you place there ByteStream object
16:12 jdixon I think I remember now
16:12 jdixon ScriptAlias isn't enough.  it needs some rewrite rules too.
16:13 jdixon getting 404s on everything that isn't /
16:13 yko jdixon : if you can wait for 10 minutes, youll have wiki page
16:13 jdixon I can  :)
16:14 yko http://korshak.name/ra/hold-still.jpg
16:14 arpadszasz joined #mojo
16:14 sri BLAST WAVE!
16:18 yko :D
16:20 sri http://www.romanticallyapo​calyptic.com/home?page=25
16:21 sri (for the new arrivals)
16:59 und3f is now known as und3f[A]
16:59 und3f[A] is now known as und3f
17:43 * yko has slow ping responce :)
17:48 polvo jdixon, http://pastebin.com/fqyTn3QK
17:51 jdixon thanks polvo
17:51 jdixon yko: no worries, waiting patiently  :)
17:52 ysyrota joined #mojo
18:14 * yko hates mod_rewrite
18:14 crab why?
18:15 yko hmm
18:15 yko just one moment, i will try to explain
18:16 yko jdixon: http://bit.ly/fezAki try that
18:16 yko it has some limitations. i assume you store your static in 'public/' dir, as usual in mojolicious
18:17 yko and it would work only uif your app lives at root url
18:17 yko crab: i can not find way how to check static file existance in subfolder
18:18 yko for example, i'm at http://localhost/sub/
18:18 crab e.g. RewriteCond %{REQUEST_FILENAME} !-f ...?
18:19 yko i have request for http://localhost/sub/css/static-file.css and i want to check, if 'public/css/static-file.css' exists at current location
18:19 yko crab, no. request_filename contains full filepath at local filesystem
18:19 crab so there is no way to get just the "/css/static-file.css" part? ugh
18:20 yko ye
18:20 crab ok, you are allowed to hate mod_rewrite ;-)
18:20 yko only 'sub/css/static-file.css' - as %{REQUEST_URI}
18:20 yko :)
18:22 yko jdixon: please reply if it works for you, ill push it to the wiki so sebastian can be happy
18:23 polvo yko, check my version :)
18:23 yko it requires access to httpd.conf, doesnt it?
18:23 polvo yko, yes
18:23 yko not acceptable for shared hosting :)
18:24 yko and it's fcgi version, i'm talking about pure cgi on shared
18:26 yko btw, my version is more flexible ;p it handle any static file in public at all
18:30 polvo yko, i just don't like the idea of using cgi :)
18:30 yko i think nobody likes :)
18:31 yko but if i have access to httpd.conf i'd put nginx over apache and run mojolicious standalone
18:31 yko and then consider if i need apache at all :D
18:36 polvo yko, many shared hoster providers can make the changes you need in httpd.conf, just ask
18:37 polvo *shared hosting
18:37 yko whoo... not all shareds are so sweet :)
18:37 yko i'm not against fcgi
18:38 yko but i'd like to have universal solutions for any case
18:39 yko actually, i'm moving everything to vps now. prices for vps and shared are comparable today
18:56 sri vps prices are only going down, just wait till google and vmware join the game
18:56 yko no time to wait! :)
18:57 yko $6/m is quite acceptable price
18:57 yko i hope when there will be more providers, services became more stable, that would be enough
18:57 crab hetzner.de recently started offering VPSen that seem quite reasonably priced.
19:15 crab can i do $upload->move_to($file) and then $upload->slurp it to calculate an md5sum too?
19:26 crab yes, i can.
19:31 yko crab, i don't mind
19:32 sri wow, this time wikileaks will really hurt some politicians
19:33 sri http://www.boingboing.net/2010/​11/28/the-guardian-global.html
19:34 sri http://www.boingboing.net/2010/​11/28/cables-teased-in-nyt.html
19:55 ysyrota left #mojo
20:00 arpadszasz left #mojo
20:06 polvo offtopic: can somebody help me with interprocess comm?
20:08 sri thats a complicated topic
20:08 * yko uses mojo to do IPC :-[
20:08 sri use pipes if you can
20:09 polvo sri, thats' what i'm doing. :) let me show you the problem
20:09 crab <- reads about the Plat_forms competition
20:09 crab i wonder if it's too late for this app i'm working on to dump postgres and use riak instead
20:09 crab i guess it is. but maybe next time
20:09 polvo sri, http://pastebin.com/yTqTWsSK
20:10 polvo sri, i need to identify output from each $subs
20:10 sri polvo: no time to read a wall of code :/
20:10 sri and i've not used IO::Pipe yet
20:12 polvo sri, briefly, i'm piping output from severals subs run by child to parent. and in parent i need to identify which output was produced by which sub.
20:12 sri whats the problem?
20:13 crab doesn't the parent know which pipe it's reading from?
20:14 polvo sri, crab, child may run multiple subs. parent doesn't know when ends the output from Nth sub and starts Nth+1
20:15 sri then send sub names too
20:15 polvo sri, that's the point. but how?
20:15 sri use marshalling
20:15 sri Storable
20:16 sri JSON
20:16 sri YAML
20:16 sri Data::Dumper
20:17 polvo sri, yeah, thanks
20:21 crab i wish json keys didn't ahve to be quoted
20:21 sri just remember that there is a size limit for atomic pipe messages
20:22 sri so length prefixing might be a good idea if you're getting close to the PIPE_BUF limit
20:31 jdixon yko: was out for a bit.  will try it soonish.
20:32 yko kewl
20:57 ltriant joined #mojo
21:15 crab hm. the routing tree doesn't quite work the way i thought.
21:16 spleenjack joined #mojo
21:42 und3f is now known as und3f[A]
21:42 und3f[A] is now known as und3f
22:17 yko left #mojo
22:30 jdixon anyone using mojo with voltdb?
22:31 sri actually i've never seen anyone use voltdb with anything ;p
22:31 jdixon heh
22:32 sri i don't see that many use cases for it either
22:40 sri but i'm a sql hater in general these days
22:41 jdixon why?
22:42 sri schema changes are hard, fulltext search sucks
22:43 sri most web apps change, most web apps need good fulltext search
22:44 sri raw sql is unbearable
22:44 sri ORMs are ugly hacks
22:44 sri and and and :)
22:44 sri now compare that to riak with riak-search
22:45 sri key/value store with REST api, fulltext indexing for json data with solr REST api
22:46 sri and dead simple scaling on top of that
22:46 sri add more nodes and it just works
22:47 sri not to mention the horrible proprietary network protocols sql databases use
22:48 sri you are tied to C libraries that usually block
22:48 jdixon I wish riak had sql-like querying/aggregation.
22:48 jdixon map/reduce blows.
22:48 sri what for?
22:48 sri you have frickin fulltext indexing
22:49 jdixon I don't need fulltext indexing.
22:49 sri you can use the solr api instead of sql
22:49 sri limit indexing to the parts you care about
22:51 jdixon I know sql fairly well, but I'm not sure how to translate my requirements into riak/solr/map/reduce terminology.
22:51 jdixon for example
22:51 jdixon storing network data (lots of it) over time
22:52 jdixon run a query to give me the top 10 dstports (services), aggregated per hourly windows, for the last 12 hours.
22:52 sri thats indeed a job for map/reduce
22:52 jdixon yup
22:52 jdixon in sql, it's easy
22:53 jdixon it's a matter of performance (sharding), not applicability
22:53 jdixon in map/reduce, it would appear to be possible, but a major pita.
22:53 sri i don't think so, but hey, use whatever you like most
22:55 jdixon oh, we're using mongodb right now.  but map/reduce is giving me headaches.
22:55 jdixon someone else asked about voltdb.  I noticed there were no Perl libs (just REST), so I was just curious what you guys thought about it.
22:55 sri map/reduce != map/reduce
22:56 jdixon interesting math.  ;)
22:56 sri every database implements it differently
22:59 sri mongodb is a horrible example though... proprietary C libraries too
23:00 jdixon besides that, what makes it a horrible example?
23:01 sri thats my main problem, making it non blocking is horrible
23:02 jdixon so it's fair to say you're a riak fanboi?  ;)
23:02 sri i also like membase
23:03 sri couchdb and redis not so much, but they are ok
23:03 jdixon don't get me wrong, I have a lot of respect for the basho guys
23:03 jdixon I wouldn't have invited Justin to speak at Surge otherwise.  :)
23:04 sri originally i was a couchdb fanboi actually, but they lack focus
23:05 jdixon sri: who do you work for?
23:06 sri freelancer
23:06 jdixon k
23:13 sri basically everything that uses a proprietary network protocol is a red flag for me :)
23:13 jdixon what do you consider "proprietary"?
23:13 jdixon undocumented?
23:13 jdixon one-off?
23:14 jdixon closed off by the vendor, only able to access with binary libs?
23:14 sri all of those
23:14 jdixon so a one-off is proprietary?
23:14 jdixon even if it's fully documented and open-source?
23:15 sri if you're refering to the memcached protocol then no
23:15 jdixon I'm not referring to any specific protocol.
23:15 sri fully documented and open source depends
23:16 sri one could argue the mongodb is open because there is a blurry spec
23:16 sri *+one
23:16 sri but in practice it is so complicated you just have to use their library
23:17 sri the memcached one on the other hand is great, love the simplicity
23:19 sri wish more databases would just use http
23:21 sri being able to just use curl to speak with your database is awesome
23:21 sri at least for me as a web focused hacker
23:40 und3f is now known as und3f[A]
23:46 baton8 left #mojo
23:49 baton8 joined #mojo

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