Camelia, the Perl 6 bug

IRC log for #mojo, 2010-08-11

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

All times shown according to UTC.

Time Nick Message
00:12 dotan left #mojo
00:49 ask joined #mojo
01:12 ask joined #mojo
01:44 ask joined #mojo
01:57 koban joined #mojo
02:44 Foxcool joined #mojo
02:48 janus joined #mojo
03:00 sri oo
03:00 sri Oo
03:00 sri oO
03:01 garu OO
03:01 sri X_x
03:01 garu heh
03:01 garu sup?
03:02 sri good morning
03:04 garu g'night :)
03:04 sri heh
03:19 sri marcus: not seen rubicon yet btw.
03:19 sri is it good?
04:03 tholen42 joined #mojo
04:18 sri xantus: they are interested in perl? Oo
04:19 sri xantus: btw. have you seen my mumblings about the non backcompat change to Mojo::IOLoop? i might pick up your direct write idea
04:19 sri so far it seems very well worth it
04:20 sri the ability to write small messages directly to the kernel buffer bypassing epoll/kqueue/poll completely is huge
04:22 sri it's about 10% better performance for daemon/client and 100% for pure ioloop code
04:22 sri websockets should benefit most
04:22 sri the downside is that write_cb has to go
04:32 sri ioloop gets more maintainable too
05:12 koban joined #mojo
05:29 MojoGuest52 joined #mojo
05:29 xantus_ MojoGuest52: hi
05:29 MojoGuest52 hi
05:33 koban left #mojo
05:33 koban joined #mojo
05:44 koban left #mojo
05:44 koban joined #mojo
05:47 mvuets joined #mojo
05:55 perlrocks Twitter: "eee! validator forms for # Mojolicious http://bit.ly/9Py7If Thanks @ vtivti! # Perl # Mojo" (ru) --xomaa http://twitter.com/xomaa/status/20861771056
05:56 sri yay for translator
06:01 ask joined #mojo
06:01 marcus nice
06:02 vti it even makes sense
06:06 marcus vti: that validator module looks nice and minimal, but it could do with some more documentation :)
06:07 vti marcus: it's sri's heritage :)
06:07 sri :O
06:08 marcus has 'user_agent'           => (is=>'rw', isa=>'Mojo::Client', lazy_build=>1 );
06:10 sri vti: all my newer modules start out with way more documentation than yours ;p
06:11 Foxcool joined #mojo
06:12 marcus sri: is there a way to coerce HTTP::Request objects into Mojo::Message::Request objects?
06:12 sri actually, i never relased something that doesn't pass pod tests :)
06:12 vti sri: true, will fix it :)
06:12 sri marcus: nope
06:12 marcus sri: but you have been known to add a lot of pod placeholders to make pod tests pass.
06:13 vti haha
06:13 sri true, but thats still better than nothing
06:13 sri at least all methods and attributes are visible with call conventions
06:14 vti shame on me!
06:14 marcus and your family§
06:14 marcus ;)
06:14 vti they have nothing to do this it! ;p
06:14 vti *with
06:15 marcus are you saying sri was responsible for your upbringing? :)
06:16 vti :D
06:16 * vti hugs his family
06:20 sri marcus: now answer the question!
06:21 sri i need to know
06:21 sri ...
06:21 sri is
06:21 sri rubicon
06:21 sri good?
06:22 sri 2 1/2 seasons of leverage waiting now :o
06:23 sri does anyone even care about ->write_cb? :)
06:23 vti where do you get all the series?
06:23 sri vti: ARRRR!
06:24 vti ARRRR.com?
06:24 vti ;p
06:24 sri ARRRR!
06:25 vti let me check
06:25 marcus sri: I did not watch it yet.
06:26 marcus that's why I asked
06:26 marcus I have 3 episodes on my put.io account ready to go
06:26 sri vti: eztv
06:26 sri marcus: awww
06:26 marcus sri: I'll tell you tomorrow then
06:26 sri good, i'll finish regenesis later today i guess
06:27 sri don't think i'll recommend it
06:27 sri science soap opera, interesting science but weak story
06:28 marcus sri: ok, sounds like something that gets old fast.
06:28 sri it kept me watching somehow
06:28 marcus I also have the first episode of 'the deep' waiting. Recommended by a coworker
06:28 marcus sri: anyways, you should watch sherlock.
06:28 marcus I think you will approve
06:28 vti sri: i use it in vnc
06:28 sri oh right, forgot about sherlock
06:29 vti cd ~/dev; grep -r 'write_cb'
06:29 sri Oo
06:29 marcus sri: are you sure you can't emulate write_cb when you provide write?
06:30 vti sri: but that's ok, i have to rewrite it anyway
06:30 sri well, if i wrote an emulation layer around everything in the ioloop yes
06:30 sri thats a few weeks of work *cough*
06:31 sri it really changes the core
06:31 sri whole different code flow
06:31 vti as for me, it's not *that* huge bulk of changes
06:32 sri it should actually simplify your code
06:32 sri since you don't have to care about socket state
06:32 sri (writing/not_writing)
06:32 sri thats the biggest problem of providing a workaround
06:33 vti will you fix flash_policy_server? :)
06:33 sri writing/not_writing have way too much power
06:33 sri right now there are many safety nets to prevent misuse, emuating those is really hard
06:33 sri vti: everything in core will be fixed
06:34 sri (or is in my branch already)
06:34 sri it will be twice as fast
06:34 vti do whatever you want!!11 it is your branch!!1
06:34 sri microhttpd.pl peaks at 21k req/s atm
06:35 sri up from previously 12k
06:35 sri same should be true for the policy server since those messages fit into the kernel buffer rigth away
06:36 vti nice
06:36 vti i will try vnc then
06:36 vti it should be faster, since 99% of messages are very small
06:37 sri i'll have to read up on nginx code for more tricks :)
06:38 vti http://html5boilerplate.com/
06:38 vti have to go, c u later
06:38 sri laters
06:39 marcus oh bai
06:39 sri wonder how far i could get if i removed oo sugar layers
06:40 sri *must resist*
06:41 sri but i'm a little surprised how far one can push perl io
06:43 marcus perl was written in C, after all ;)
06:50 sri http://github.com/rurban/Jit # this looks interesting
06:51 ysyrota joined #mojo
07:07 marcus just in time for perl?
07:07 marcus clever
07:21 marcus sri: the build_transaction callback..
07:21 marcus it gets passed the Mojo::Transaction?
07:26 sri marcus: there is no such callback
07:32 marcus sri: ah, the callback is set at queue...
07:33 sri ?
07:34 marcus $self->client->queue($transaction,$callback); ?
07:35 marcus that callback is passed the transaction once ->process is finished, right?
07:36 sri you don't have to use queue
07:37 sri ->process($tx, $cb) is enough
07:37 marcus only if I want the same callback for every transaction in the queue?
07:37 sri right
07:37 marcus I plan to use a closure to populate a resultset in my callback.
07:38 marcus to implement the existing api that was written using WWW::Curl::Simple
07:47 sri marcus: sounds like you'll be doing the usability review for memowe :)
07:57 marcus yay
08:02 achromic joined #mojo
08:03 yko joined #mojo
08:11 yakudzo joined #mojo
08:25 marcus sri: ->process returns at once if there's no transactions in queue?
08:26 sri it returns when it's done
08:26 sri i have no clue what it does in non standard situations
08:26 sri thatw as memowes job *cough*
08:27 sri everything without pod or test is non standard, just try it yourself ;p
08:27 marcus cool beans.
08:28 marcus heh, I see memowe has stopped tweeting as well
08:28 marcus last tweet 2 weeks ago
08:28 marcus maybe he was eaten by his dog
08:28 marcus or a grue
08:29 sri hmm
08:29 marcus third argument to build_tx is an arrayref of headers?
08:29 marcus { Connection => 'close' } is the example...
08:29 sri ye
08:30 sri think i've also used {Expect => 'fun'} in some examples :)
08:35 marcus spotted a typo in Mojo::Transaction pod            $tx    = $tx−>finsihed(sub {...});
08:35 sri thanks
08:39 marcus sending a mail to memowe: "Hi Mirko.
08:39 marcus I have not heard anything from you since you were supposed to start the second part of GSOC, and the time is now up. You have not updated your blog with any progress reports, nor updated your github repository (as far as I can tell). As it stands now, I will be forced to give you a failing grade next week when evaluation starts."
08:51 janus memowe is a regular in qnet/#perl.de and i haven't seen him for a while
08:52 janus usually he's been pretty active
08:54 sri there's a #perl.de on qnet?
08:55 marcus there's a qnet?
08:55 marcus :p
08:55 marcus oh, quake
08:56 marcus #perl24
08:56 marcus #perl.de21
08:57 sri oh
08:57 sri way smaller than #perlde here
09:02 sri http://www.unlimitednovelty.com/2010/08/mu​ltithreaded-rails-is-generally-better.html # wow, quite interesting stuff
09:03 sri the guy porting ruby to the erlang vm talks about threads vs async io
09:05 sri oh well...perl has no threads...no nothing we have to worry about :/
09:11 marcus sri: we do, it's just a sucky implementation
09:12 sri quite an understatement
09:13 sri that article illustrates really well how limited node.js actually is
09:13 marcus mmm
09:13 sri it's "just" an event loop programmable in javascript
09:14 marcus how is the threading in rakudo star?
09:14 jeff joined #mojo
09:14 sri think they have coroutines, continuations and all the latest jazz
09:15 marcus sri: it's pretty awesome how slow it is, by the way :)
09:16 mvuets Someone should write Gitolicious as Gitalist already exists (:
09:16 sri well, compared to perl5 will all the modules loaded necessary to get the same functionality it is..........still very slow
09:17 sri mvuets: why?
09:17 sri whats wrong with living in the cloud?
09:18 sri Gitalist specifically addresses the problem a few individuals have with giving up total control :)
09:18 sri i for one am very happy with github
09:19 mvuets My friend nearly went crazy when installed all Catalyst dependencies.
09:19 mvuets He needs in a nice front end for internal project.
09:20 sri github private repo?
09:20 mvuets Forbidden. Commercial proprietary project.
09:23 marcus sri: apparently http://github.com/mberends is working on non-blocking sockets for rakudo
09:23 sri \o/
09:30 sri maybe after 1.0 we can take a look at mojolicious6
09:30 doubi joined #mojo
09:31 marcus yeah
09:33 sri at least we've got a few years left before perl6 will be production ready
09:55 marcus Was thinking the same :)
09:55 marcus but having mojo ported would actually mean being able to make proper apps (albeit slow)
09:57 sri sure, but the fun factor is rather low
09:58 sri and nobody would sponsor such a port
09:59 marcus I guess so :/
10:25 koban joined #mojo
10:29 marcus sri: no way to dequeue a request or access the queue in Mojo::Client?
10:29 sri nope
10:29 marcus Am trying to write a mocked client for the test library for this client.
10:30 sri why mock?
10:30 marcus which should not actually perform the queued responses, but just set the $xml data
10:30 marcus sri: because it should run without a working web service running
10:30 marcus it's not a live test
10:30 sri i never saw the need for mock testing
10:31 sri we can run servers and clients inside the same process
10:31 marcus well, what we do is use Catalyst::Test to get the xml back
10:31 marcus sri: that's nice for you, but this is for a catalyst app
10:31 sri well, i don't do legacy ;p
10:31 sri feel free to send a patch though :)
10:32 marcus guess I'll be touchy/feely with $client->{queue} ;)
10:32 marcus sri: would you accept a patch to expose queue as an attr?
10:32 marcus {queue} even
10:32 sri what for?
10:33 marcus it's need to be renamed to avoid conflict
10:33 marcus so that I can clear it
10:33 marcus and see how many requests are in the queue
10:33 sri you might be misunderstanding something
10:33 sri queue is just the waiting list for process
10:33 sri inside process things get scary
10:33 marcus yes, I know
10:34 sri then i don't understand :(
10:34 marcus as I said, this is for the mock client.
10:34 * sri can't follow
10:34 marcus it wants to inspect the queue, do the requests in another way, then remove them from the queue
10:34 marcus without ever running process
10:34 sri why use Mojo::Client at all then?
10:35 marcus because we use process when it's not tested?
10:35 sri you can use ->build_tx and friends to emulate get/post...
10:35 marcus and for live tests
10:36 sri don't get it, sounds like some external wrapper would be a better solution
10:36 sri maybe i need to see it
10:37 marcus the mock client uses moose to decorate _request with an 'around'.
10:37 marcus _request builds the transaction and queues it
10:37 marcus so the mock client needs to get the transaction from the queue and dequeue it.
10:38 marcus otherwise it needs to do reimplement _request logic - queuing it
10:38 sri what is _request?
10:39 marcus it's an underlying method of our client which generates a web service request and queues it in the client.
10:40 sri i really don't get it
10:40 marcus so if I call $ws->channels for instance, channels calls requests with parameters that makes it generate an async request, and queues it so that when the callback is triggered, it will populate $transaction of the resultset
10:40 marcus channels calls _request even
10:41 sri and why do we have to change the core Mojo::Client api to make it more compatible with your legacy app?
10:42 marcus well, you asked me why I would need to access the queue
10:42 marcus so I explained it
10:42 sri hmm
10:42 marcus another use case for this thing is to check if there's anything in the queue
10:42 marcus and only run process if there is
10:42 sri ok, sounds like all  you want is a small wrapper :)
10:43 marcus explain?
10:43 sri you want an external queue with more functionality
10:44 sri once you queue something up in the client we expect that you've already made up your mind
10:44 marcus I guess that would work
10:45 marcus thanks
10:45 sri i would rather remove functionality from client than add more queue helper bloat :)
10:46 sri the ability to abort a request might be handy though
10:46 sri it's tricky though
10:48 sri imo client is borderline bloated
10:48 sri so i'm a little reluctant about adding new stuff :)
10:51 marcus does Mojo::URL->query->param retain order?
10:51 sri yes
10:52 marcus name=>[foo bar baz] ?
10:52 sri it's array based
10:52 marcus or name => foo, name=>bar, name=> baz ?
10:53 sri no idea, both might work
10:55 marcus perl -MMojo::URL -le'my $u=Mojo::URL->new("http://localhost:3000");$u->query->param(foo=>[qw/bar baz/]); print $u
10:55 marcus looks good
10:55 sri :)
10:59 marcus the cake is a lie
11:08 sri the lie is a lie
11:09 marcus the lie is a cake.
11:10 marcus sri: the incident, another cool iphone game
11:15 sri heh, you are reading daring fireball too :)
11:16 marcus of course
11:16 marcus it also appeared in my twitter stream
11:16 marcus and it was universal
11:38 perlrocks Twitter: "All glory to the vti - creator of the MojoX::Validator! #perl #mojolicious" --alex_voronov http://twitter.com/alex_voronov/status/20878679497
11:40 perlrocks Twitter: "And, of course, to the kraih! Thanks for the Mojolicious! #perl #mojolicious" --alex_voronov http://twitter.com/alex_voronov/status/20878750934
11:40 sri \o/
11:52 marcus all glory to the hypno-toad
12:22 Akron joined #mojo
12:25 Htbaa joined #mojo
12:39 sri http://pastie.org/1085930 # the new flash policy server
12:39 sri it's really really simple
12:41 sri the write callback is always called when the chunk is written
12:48 perlrocks Twitter: "Making changes to the #mojolicious core design that will increase performance for writing small messages by about 100%. http://bit.ly/dmX2gk" --kraih http://twitter.com/kraih/status/20882744358
12:50 Foxcool joined #mojo
12:52 perlrocks Twitter: "I was able to bring my little benchmark cheating HTTP server from 12000 req/s up to 21000 req/s. :) #mojolicious" --kraih http://twitter.com/kraih/status/20882980412
12:52 vti sri++
12:55 perlrocks Twitter: "For normal #mojolicious applications this won't make a big difference, but for websockets this could turn out to be quite significant." --kraih http://twitter.com/kraih/status/20883159241
13:04 dotan joined #mojo
13:06 doubi joined #mojo
13:25 perlrocks Twitter: "RT @kraih Making changes to the #mojolicious core design that will increase performance 4 writing small msgs by 100%. http://bit.ly/dmX2gk" --zakame http://twitter.com/zakame/status/20885103868
13:43 siegfri3d joined #mojo
13:45 Htbaa joined #mojo
14:43 Htbaa joined #mojo
15:01 tempire joined #mojo
15:17 ashleydev joined #mojo
15:31 keith_ joined #mojo
15:42 siddbasu joined #mojo
15:43 siddbasu hi is there any CHI/Cache plugins for Mojo
15:56 keith_ left #mojo
16:01 koban joined #mojo
16:11 crab hi.
16:11 crab is there an example of a plugin that installs new routes and stuff?
16:12 crab the first route in my App.pm:startup() is $r->bridge->to(...), and i want to install that and a few others in a plugin.
16:18 crab hmm.
16:18 crab if i don't create _any_ routes in startup and then request /, it goes into an infinite loop.
16:20 vti crab: http://github.com/vti/mojolicious-pl​ugin-websocket-chat/blob/master/lib/​Mojolicious/Plugin/WebSocket/Chat.pm
16:21 crab ok, so it "just works" to install new routes. fine.
16:21 vti crab: plugins can be very powerful
16:26 crab vti: i am basically refactoring a bunch of functionality that i created into plugins so i can reuse them in other projects
16:26 vti good idea
16:26 yko joined #mojo
16:40 cognominal joined #mojo
16:45 jeff I have a form action of "/signup/step2" and have the $r->route('/:controller/:action') in my module... but I'm getting this in my logs when I submit the form:  *** Request for "/step2" from..." and then it's giving me a 404 file not found error
16:45 jeff I'm running in CGI mode
16:45 jeff what might be wrong?
16:45 tempire pastie your routes
16:47 jeff $r->route('/')->to( controller => 'signup', action => 'index');
16:47 jeff $r->route('/:controller/:action');
16:47 jeff that's all my routes
16:48 jeff I have this in my vhost conf
16:48 jeff ScriptAlias /signup "/www/sites/eliteemail.elitea​nswers.com/script/elite_email
16:48 jeff _signup"
16:49 tempire Try it in daemon mode, see if it does the same thing
16:51 dotan jeff - is your scriptAlias the path to the script or to the CGI directory ?
16:51 Akron Does the dispatching work? Or do you have your controller in the wrong folder?
16:52 jeff it's the path to the script
16:54 dotan If the former, shouldn't that be /signup/signup/step2 ?
16:56 jeff oh... so maybe I don't want the route as /:controller/:action, but rather just /:action
16:56 jeff ti script name won't be counted in the path
16:58 jeff that gets me further...
16:58 jeff but then days Dispatching "EliteEmailSignup::step2"
16:58 jeff "EliteEmailSignup" is not a controller.
16:59 jeff so can I set the controller to "signup" explicitly
17:00 dotan Try just $r->route('/:controller/:action')->to(controller => 'signup', action => 'index')
17:00 jeff yep... made it $r->route('/:action')->to( controller => 'signup' )
17:00 jeff and that seems to work
17:00 Akron :)
17:01 Akron Looks good.
17:01 jeff thanks so much for getting me unstuck... i really appreciate it
17:02 dotan (Last example here in this section: http://github.com/kraih/mojo/blob/m​aster/lib/Mojolicious/Guides/Routin​g.pod#Placeholders_And_Destinations)
17:15 Akron left #mojo
17:53 ashleydev joined #mojo
18:07 perlrocks Twitter: "MojoX::Validator documentation is done. Hitting #CPAN soon. #Perl #Mojolicious" --vtivti http://twitter.com/vtivti/status/20905477565
18:10 [2]awnstudio joined #mojo
18:17 ashleydev joined #mojo
18:23 xantus_ "My friend nearly went crazy when installed all Catalyst dependencies." - buahaha
18:24 crab hmm, MojoX::Validator
18:24 crab i wish there were a list of the more useful mojo extensions
18:26 xantus_ sri: nice!
18:26 xantus_ I just saw the flash svr paste
18:26 dotan crab: look at vti's github repos, in addition to the validator he's got bot protection, which includes things like signed forms (good for CSRF protection)
18:27 dotan http://github.com/vti/mojox-common
18:28 crab yes, i just found that ';-)
18:28 crab s/';/:/
18:29 xantus_ we need some sort of watermark flow callbacks too
18:29 vti that repo is not polished at all and was supposed to stay in shadow... :)
18:29 crab what are watermark flow callbacks?
18:30 xantus_ oh, when dealing with tcp, you can feed the client too fast, so you back off writing when your userspace buffer is full
18:31 xantus_ write_cb
18:32 [2]awnstudio joined #mojo
18:34 tempire MojoX::Validator looks really neat.
18:34 tempire I've never seen form validation look so clean.
18:42 vti tempire: and it is also very lite and does only one thing!
18:43 tempire That's what I've always disliked about FormFu & FormHandler
18:43 tempire If I just wanted to do validation, I had to scale this huge curve
18:43 tempire just like catalyst
18:44 koban left #mojo
18:44 tempire (doing only one thing and doing it well)++
18:45 dotan left #mojo
18:45 crab oh
18:45 vti ye, form building and fillin is alredy in mojolicious
18:45 crab thank goodness there exist other people who don't get along with FormFu et al.
18:45 crab vti: it is? where?
18:47 vti crab: tag_helpers plugin
18:47 crab ah, that.
18:48 koban joined #mojo
18:48 tempire Huh
18:48 tempire I hadn't seen that
18:49 vti all the input values are filled in if there is a param with the appropriate name
18:51 crab huh. i read that as "input valves" and suddenly had an image of Mojo as a steampunk machine
18:52 vti that's exactly how sri looks like :D
19:00 spleenjack joined #mojo
19:44 marcus sri: next codename for mojo should be ⨀ :-p
19:45 marcus or ⨀ ⨀ even
19:45 marcus aka N-ARY CIRCLED DOT OPERATOR
19:45 marcus or BOOB
19:50 dotan joined #mojo
19:50 dotan left #mojo
19:54 vti boobylicious
19:56 ashleydev_ joined #mojo
20:04 doubi joined #mojo
20:16 * xantus_ is sad.  Mojo just quits with no error
20:17 xantus_ ⨀_⨀
20:21 xantus_ fuck
20:22 marcus I guess mojo has detected pending patent application, and it aborting early
20:23 xantus_ heh
20:23 xantus_ its always after a client request finishes
20:26 siddbasu hi could somebody tell me if somebody has tried page/response caching using plugins
20:27 siddbasu the logic would be if the page is cached it will skip the controller action
20:27 siddbasu and serve the page from cache
20:30 xantus_ ugh, right when I realllly need this to just work, it won't
20:33 xantus_ if I use a timer it goes away
20:33 xantus_ I will make a test case later
20:36 marcus siddbasu: no. I recommend putting a proper cache like varnish in front of your webserver
20:36 marcus that's where caching belongs, not inside the app server
20:38 siddbasu marcus: yes that's definitely better however at this point my app needs caching with something like filecache/memcache
20:38 siddbasu marcus: so if there is any strategy with mojo that might be helpful
20:39 xantus_ using a proper cache in front of mojo IS the proper strategy
20:39 siddbasu is it possible to do something like Pagecache plugin for catalyst
20:47 yko joined #mojo
20:47 ask joined #mojo
20:47 xantus_ O
20:47 xantus_ /⨀ ⨀\
20:47 xantus_ | |
20:47 xantus_ heh
20:54 ashleydev_ joined #mojo
20:54 alex joined #mojo
21:20 xantus_ sri: you around?
21:27 [2]awnstudio joined #mojo
21:31 MojoGuest157 joined #mojo
21:35 [2]awnstudio joined #mojo
21:37 ashleydev joined #mojo
21:45 perlite joined #mojo
22:01 ashleydev_ joined #mojo
22:06 ltriant joined #mojo
22:09 xantus_ removed any use of timer, and added async to all my client calls...now it works
22:29 ashleydev joined #mojo
23:02 spleenjack1 joined #mojo
23:43 ashleydev_ joined #mojo

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