Camelia, the Perl 6 bug

IRC log for #mojo, 2011-06-29

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

All times shown according to UTC.

Time Nick Message
00:03 tardisx marty: is this what you had in mind: http://hawkins.id.au/notes/perl/s​nippets/mojo-and-lwp-file-upload ?
00:04 ispy_ left #mojo
00:10 SmokeMachine left #mojo
00:15 Kulag joined #mojo
00:19 Drossel left #mojo
00:24 perlrocks Twitter: "@ Shwerziell yes, ajax http speaks basically you just have something in Perl, that answer (CGI, Catalyst, Mojolicious, Dancer)." (pt) --pac_man http://twitter.com/pac_man​/status/85866064226947072
00:24 nop joined #mojo
00:27 nop Hi all. Any idea why 1.48 fails websocket_lite_app.t with a stream of 'hi's?
00:28 DaTa nop: freebsd?
00:28 purl freebsd is http://freebsd.org or developed by the elderly, those that call themselves hackers. Their ports collection contain half of CPAN, omg or nice.
00:28 nop Windows 7 actually. :S
00:28 DaTa nop: dunno then :)
00:30 nop I'll just use some force for now i guess.
00:36 ispy_ joined #mojo
00:48 SmokeMachine joined #mojo
00:50 ispy_ left #mojo
00:52 marty tardisx:  Yep, that points me in the right direction.  Thanks for the link
00:52 tardisx wrote that as a proof of concept, but we're using something similar in production now, handling multi-gigabyte files
00:53 ispy_ joined #mojo
00:54 ndiewald left #mojo
01:07 SmokeMachine left #mojo
01:21 arpadszasz joined #mojo
01:32 xantus[] https://github.com/kraih/mojo​/wiki/Using-couchdb/_history
01:32 xantus[] heh, he reverted my example
01:33 xantus[] the 'demo app' is even linked to a person, not an app
01:36 xantus[] screw it, new page: https://github.com/kraih/mojo/wiki​/Using-CouchDB-and-Mojo::UserAgent
02:17 xantus[] mojo makes this so easy to fork x children and have them use mojo::useragent to report back to the parent pid with rich data :)
02:27 perlrocks Twitter: "@ Turtle Rabbit usa_kame39 will cast a Mojomojo mojolicious!ヽ (° ∀ °) Nomojomojo! ←" (ja) --korokoro_tomo http://twitter.com/korokoro_t​omo/status/85897208427315200
02:33 * tempire has an important announcement relevant to all the mojolicious user base.
02:34 xantus[] you're in love with mojo and you want to marry it?
02:34 tempire that's not news.
02:34 xantus[] oh, whats the news?
02:34 purl rumour has it the news is scarce, how do you know what is sent into the zone and what isn't
02:34 tempire I announced my attention to have its babies aver a year ago
02:34 tempire I cut all my hair off.
02:35 tempire be emotionally affected
02:35 tempire go
02:37 * xantus[] :0
02:37 xantus[] you can be a mojo monk now
02:38 tempire oh!  an airbender?
02:38 xantus[] a guru if you will
02:38 * tempire is an airbendering mojo guru
02:38 tempire catalyst must be the firelord
02:39 tempire er, the fire kingdom
02:40 tempire I suppose that would make sri the firelord
02:40 tempire ...awkward...
02:40 xantus[] :)
02:51 Alias joined #mojo
03:09 crab hi
03:12 xantus[] HAI CRAB
03:12 nop left #mojo
03:13 crab how are you, sir []?
03:14 xantus[] good
03:39 trcjr joined #mojo
04:52 ispy_ left #mojo
05:08 koban joined #mojo
05:37 perlrocks Twitter: "Running Django, Rails and Mojolicious on Windows Server 2008 with ...: Recently released Helicon Zoo is a reposi... http://bit.ly/ifO3Th" --Julenegvbxc http://twitter.com/Julenegvb​xc/status/85944867745828864
05:37 perlrocks Twitter: "Running Django, Rails and Mojolicious on Windows Server 2008 with ... http://bit.ly/ifO3Th" --Carleenyxofs http://twitter.com/Carleenyx​ofs/status/85944866453983232
06:05 perlrocks Twitter: "Running Django, Rails and Mojolicious on Windows Server 2008 with ... http://bit.ly/la2FnG" --Madonnadipsc http://twitter.com/Madonnadi​psc/status/85952113435361280
06:41 sri good morning fellow firelords
06:52 crab i'm not a firelord, i'm a matchstick!
06:52 echosystm joined #mojo
06:52 echosystm anyone know where i can find some details on how to use LDAP with mojo?
06:56 crab how do you use ldap without mojo?
06:59 echosystm i dont
06:59 echosystm ive never used LDAP befor
07:00 crab there's a Net::LDAP module you can use.
07:00 crab but nothing about it has anything to do with mojo.
07:01 echosystm ok and how do i run my app without an ldap server? i assume mojo doesnt provide some embedded testing server
07:03 crab perhaps i'm confused. what do you actually want to do?
07:04 crab authenticate web app users in a mojo application using ldap?
07:04 echosystm yep
07:05 crab if so: mojo doesn't know or care about ldap at all, so you'll have to provide everything that's needed by yourself. including a server to authenticate against in testing.
07:05 echosystm ok
07:06 crab so you'd need to write a bridge that uses Net::LDAP to query your directory with the user's credentials, and return 0/1 to fail/pass.
07:07 echosystm yep, ok thanks
07:07 echosystm another issue... i cant get mojo to build
07:07 echosystm http://pastebin.com/yVvgqGP5
07:07 echosystm im using perlbrewed perl 5.15 on osx
07:08 echosystm got any ideas?
07:08 sri that looks like the famous case insensitivity problem
07:08 echosystm yep
07:08 sri which would be your fault
07:09 echosystm how do i fix it?
07:09 echosystm the problem is OSXs file system no?
07:09 sri you seem to have cd'd into a directory using all lowercase while it is in fact camelcase
07:09 sri the problem is your usage of it
07:10 sri you need to enter all directories with their right name
07:10 echosystm i didnt write this test
07:10 echosystm how can it be my fault lol
07:10 sri the test is perfectly fine
07:10 cosmincx joined #mojo
07:10 echosystm i'm lost
07:10 tardisx mkdir Foo
07:10 tardisx cd foo
07:10 tardisx the same
07:10 purl the same is true of Memento.
07:10 tardisx but different
07:10 purl i think different is always better
07:11 echosystm all i did was 'cpan install mojolicious'
07:11 echosystm hah, irony... *Mojolicious
07:11 echosystm doesnt this mean it is a problem with the isntaller?
07:11 sri and previously you most likely did "cd /users/echosystem" or so
07:11 sri no it is not the installer or the test
07:12 tardisx echosystm: what does 'pwd' tell you?
07:12 echosystm so you are saying if i opened a new shell and did it again, it would work?
07:13 echosystm ...because it doesnt
07:17 tardisx luckily no one ever said that. It would help if you actually checked `pwd` like I asked
07:17 echosystm pwd is '/'
07:18 tardisx you do stuff from your root directory?
07:18 echosystm i went there to be sure
07:19 echosystm on fresh terminal - /Users/myusername
07:19 echosystm my user name is all lower case
07:19 tardisx as you can see in the test output you paste, the problem is not your username
07:20 tardisx I would change to your home directory, rm -rf .cpan  and then do cpan install Mojolicious
07:21 sri yea, maybe /users/myusername is cached somewhere
07:21 tardisx if it doesn't work paste the whole output, or at least anywhere you see the home directory path mentioned
07:21 echosystm ok
07:21 marcus good morning
07:21 purl Lies!
07:21 tardisx I know adobe stuff breaks if you use a case-sensitive FS, I wonder if there is anything else important. I might change mine
07:22 tardisx it ticks me off just often enough to be annoying
07:22 sri starcraft 2 doesn't work with case sensitive fs :(
07:22 tardisx ok well I don't play that :-)
07:22 tardisx can you fix it with symlinks? :-)
07:23 crab Mojo::Base::__ANON__[(eval 159)[/home/ams/perl5/perlbrew/perls/perl-5.12​.3/lib/site_perl/5.12.3/Mojo/Base.pm:117]:7] has no caller subnames but a call count of 1516
07:23 echosystm i see only /Users in the log
07:24 crab (gazillions of such messages trying to nytprof a mojo app. no surprise that they're there, but annoying that nytprof can't handle them better.)
07:24 tardisx echosystm: do perl -V | grep useres
07:24 tardisx *users
07:24 tardisx crab: yeah I noticed them as well
07:25 tardisx then I figured I didn't actually have a performance problem and stopped caring :-)
07:25 echosystm nothing tardisx
07:25 sri env | grep users
07:26 echosystm also nothing
07:29 tardisx did you capture all of the Mojolicious build/test output? 'users' occurs at least once, in the failing test... are you sure it is nowhere else?
07:30 echosystm two seconds
07:32 echosystm yep, it only occurs in those error messages i pasted earlier
07:32 tardisx tres weird
07:33 echosystm i'll delete my whole perlbrew and start again tomorrow
07:33 tardisx I can tell you I have a perlbrew instance on Mac OS X that passes all tests
07:33 Demin left #mojo
07:33 tardisx 5.14.0
07:33 echosystm thanks for your help though
07:33 echosystm it could just be my perl version
07:33 tardisx in fact I did it just to be sure just then
07:33 tardisx well it's perlbrew
07:33 tardisx I'd compile up a 5.14 as well and compare
07:33 echosystm anyway, i have to run, thanks again
07:34 tardisx np
07:34 echosystm left #mojo
07:38 spleenjack joined #mojo
07:42 arpadszasz left #mojo
08:06 eugen joined #mojo
09:02 sri hmm
09:02 sri i'm going to split ioloop into multiple modules
09:03 crab oh?
09:04 sri nothing should break
09:04 sri first step is dns resolver and epoll/kqueue/poll
09:05 sri those should have their own modules
09:05 sri i've done some tests and the performance actually seems to go up slightly :)
09:13 perlrocks Twitter: "# Discover my $ ip localenv perl-Mojo-E 'b (g ("www.wieistmeineip.de") -> dom-> at (' # ihre_ip h1 ") -> text) -> say '85.13.XXX.XXX # nice :-)" (de) --2mad4milk http://twitter.com/2mad4mil​k/status/85999279264645120
09:16 Foxcool joined #mojo
09:29 perlrocks Twitter: "Mojo perl-e 'b (g ("www.wieistmeineip.de") -> dom-> at (' # ihre_ip h1 ") -> text) -> say '# Dear Mojo, how is my ip? :-)" (de) --2mad4milk http://twitter.com/2mad4mil​k/status/86003273974296576
09:34 sugar joined #mojo
10:47 ysyrota joined #mojo
11:02 sugar_ joined #mojo
11:03 sugar left #mojo
11:05 Foxcool left #mojo
11:06 fmerges joined #mojo
12:00 sugar_ is now known as sugar
12:10 stephan48 how would you do module discovery with mojo(can it help there?)? i have a app which uses Mojo, and a module which can have plugins(f.e. the module is called check and plugins are different checks)?
12:10 sri Mojo::Loader
12:15 crab left #mojo
12:15 al left #mojo
12:19 stephan48 test?
12:19 purl i guess test is not there :-/
12:23 stephan48 thanks sri
12:27 Drossel joined #mojo
12:29 crab joined #mojo
12:29 crab yep, $e = Mojo::Loader->load($module_to_try); die $e->message if ref $e; if ($e) { can haz module }
12:29 crab urgh. seems i got disconnected.
12:32 Kulag left #mojo
12:32 marcus so annoyed that catalyst doesn't support signed client side sessions
12:35 crab what!
12:35 crab you can't be serious
12:37 stephan48 no as i left it it wasnt possible
12:37 stephan48 as i left cat for mojo* it was last year or so
12:38 crab the mind boggles
12:39 sri hmm, i can make the code a lot more maintainable by sacrificing a bit of raw ioloop performance
12:39 sri for mojolicious apps it wouldn't be measurable
12:40 sri but it would hurt ab cheating micro benchmarks
12:40 stephan48 cheating?
12:40 purl i think cheating is Good. or not allowed for shootout benchmarks
12:40 sri microhttp.pl would drop from 22000 rps to 20100
12:41 sri see examples/microhttp.pl
12:41 crab sacrificing how? more maintainable how?
12:41 stephan48 do it i would say then
12:42 sri ioloop would shrink to about half of its size
12:42 stephan48 worth!
12:42 sri timers and io watchers get a new lower level api
12:43 sri plain io watchers that just report readability and writability on handles
12:43 stephan48 k
12:44 arpadszasz joined #mojo
12:49 ispy_ joined #mojo
12:51 ispy_ left #mojo
12:53 ispy_ joined #mojo
13:14 Foxcool joined #mojo
13:17 Akron joined #mojo
14:08 SmokeMachine joined #mojo
14:10 sugar left #mojo
14:11 koban left #mojo
14:12 Akron left #mojo
14:14 sugar joined #mojo
14:22 metaperl joined #mojo
14:25 stephan48 thanks sri, its working great!
14:25 sri \o/
14:28 d4rkie joined #mojo
14:31 D4RK-PH0ENiX left #mojo
14:34 elb0w thats what she said
14:54 sri interesting, the 2000 rps are lost to an eval it seems
14:54 dekimsey joined #mojo
14:54 sri if i leave the low level api insecure it would be almost the same
14:54 sri hmm
14:58 sri also taking 25% LoC out of Mojo::UserAgent
14:58 sri into a new module called Mojo::TransactionBuilder
14:58 sri ideas for a better name would be appreciated
15:00 cosmincx left #mojo
15:03 arpadszasz left #mojo
15:05 marty hmmm ... TxCreate, TxBuild  Not good, just throuwing out ideas.
15:06 marty Maybe TransactionGenerator
15:06 marty Looooooong
15:07 abra joined #mojo
15:08 abra left #mojo
15:08 sri TxBuilder was my first thought too
15:08 abra joined #mojo
15:08 sri but it doesn't look nice
15:08 marty Ya, abbreviating Transaction with Tx is common enough that most people get it.
15:08 marty Ye
15:09 marcus left #mojo
15:11 D4RK-PH0ENiX joined #mojo
15:12 marty BuildTransaction, BuildTrans, BuildTx, BuildResponse
15:12 sri hmm
15:13 sri it's mostly about building requests
15:13 marty BuildRequest  :)
15:14 d4rkie left #mojo
15:15 sri Mojo::Builder::Request
15:17 marty Is that the new name or are you still looking for feedback?
15:17 sri still looking
15:17 marty The only think I can think of is Mojo::Constructor::Request
15:17 sri eww
15:17 marty :)
15:19 eXeC001er joined #mojo
15:19 eXeC001er Hello
15:21 eXeC001er I am trtying to set 404 page to all path, that not available, but it does not work for '/'
15:22 sri how does the route look like?
15:22 eXeC001er my $r = $self->routes; $r->any('/*', sub {...})
15:22 kaare joined #mojo
15:22 sri well, that route is broken anyway
15:22 sri the placeholder needs a name
15:23 sri and if you give it a default value it will also match /
15:30 crab Mojo::Request::Builder?
15:31 sri BUT WHERE IS MOJO::REQUEST!!!???
15:31 crab oh no, it'd have to be Mojo::Message::Request::Builder. blah.
15:32 sri Mojo::TransactionBuilder might be the best
15:32 eXeC001er sri: can you show example ?
15:33 sri get '/*everything' => {everything => 'nothing'};
15:34 marty Mojo::TransReqBuilder
15:35 * sri faints
15:35 * marty sprays water on sri face
15:35 marty That bad huh?  :P
15:36 crab Mojo::TransactionBuilder seems ok
15:36 sri maybe it just shouldn't be its onw module :S
15:36 crab Mojo::Transactor!
15:37 eXeC001er i have changed my condition from <'/*'> to <qr/.*/> and it works fine
15:37 marty ohhh, getting close to Mojo::Raptor  YE!!!!
15:37 sri haha
15:37 sri Transactor is not bad
15:37 marty ya, kinda gets the point accross
15:37 marty crab++
15:37 sri crab++
15:39 sugar left #mojo
15:40 crab mm. lots of funding for riak.
15:41 sri all nosql databases get insane funding
15:44 abra left #mojo
15:44 k-man left #mojo
15:46 k-man joined #mojo
15:49 * crab scratches his head and wonders about this socket.io stuff
15:49 sri it's the result of the websocket delay
15:49 sri people are desparate
15:50 fmerges left #mojo
15:51 crab i can certainly understand that.
15:52 elb0w sri are Websockets working in Mojo yet?
15:52 sri for a long time
15:53 elb0w Wasnt there an issue? its only working with 6.0 mozilla?
15:53 sri we started with draft 75 back in the days
15:53 sri you're asking the wrong question
15:53 elb0w ok, which browsers are mojo websockets compatible with
15:53 sri websockets are working perfectly fine in mojolicious, in browsers not so much
15:54 sri what you should be asking is which browser has been updated to ietf-09
15:54 sri and that's still only aurora
15:55 perlrocks Twitter: "Mojolicious:: Plugin:: Plack Tetara on_process you to wrap it really improved the PlackMiddleware:: Handler:: becoming faint with tea likely to be What is Mojo." (ja) --jamadam http://twitter.com/jamadam​/status/86100444589469697
15:58 baton8 left #mojo
16:04 crab becoming faint with tea!
16:09 Kovensky wth is that, google translate? :S
16:10 sri ye
16:10 Kovensky it's... completely off
16:10 Kovensky lol
16:11 Kovensky idk if I can translate it properly tho
16:11 D4RK-PH0ENiX left #mojo
16:12 Kovensky I guess the "nacchai" confused gtrans (actually means "accidentally become")
16:13 Kovensky but meh, japanese powerlevel too low to translate that
16:14 d4rkie joined #mojo
16:16 crab here, have some tea.
16:21 SmokeMachine left #mojo
16:22 al joined #mojo
16:22 SmokeMachine joined #mojo
16:25 spleenjack left #mojo
16:38 mattastrophe joined #mojo
16:43 ysyrota left #mojo
16:45 k-man left #mojo
16:48 k-man joined #mojo
16:50 tabbi joined #mojo
16:50 tabbi left #mojo
16:50 GitHub174 joined #mojo
16:50 GitHub174 [mojo] kraih pushed 1 new commit to master: http://bit.ly/mIHV52
16:50 GitHub174 [mojo/master] added experimental Mojo::IOWatcher, Mojo::Resolver and Mojo::Transactor modules, which contain functionality extracted from Mojo::IOLoop and Mojo::UserAgent - Sebastian Riedel
16:50 GitHub174 left #mojo
16:51 sri this one is kinda big
16:51 sri and will prolly have some very bad bugs
16:53 sri Mojo::IOLoop now basically has a replaceable core
16:54 sri and the basic version is just around 100 LoC
16:54 sri so sneaking in different event loops should be rather easy
16:55 marty sri++
16:55 sri http://mojolicio.us/perldo​c/Mojo/IOWatcher#SYNOPSIS
16:55 sri that's the core of everything now
16:57 sri every ioloop has an iowatcher attribute you can access directly
16:58 sri for the microhttpd case it is about 5-8% slower, for normal apps not measurable
16:59 sri but i think we can now optimize ioloop better, so in the end it will turn out to be a gain
16:59 sri even if i'm the only one that cares about the micro benchmark use case :D
17:02 perlrocks Twitter: "Added a few new modules to #mojolicious, and possibly quite a few new bugs, happy hunting! :) http://t.co/3o3tcsY #perl" --kraih http://twitter.com/kraih/status/86117284212510720
17:02 stephan48 mh.. do you have to use the drain callback for chunked responses?
17:02 sri yes
17:03 sri or actually not
17:03 sri you can also write from a timer or another event source
17:04 sri drain is just one event
17:07 stephan48 okey
17:09 sri btw. i would really like to extract more code out of ioloop and useragent, if anyone has ideas
17:10 elb0w MozWebSocket weee
17:10 sri stupid prefix
17:11 sri the websocket protocol spec is now in last call (almost ready for rfc), but now they noticed that the browser api spec needs a rewrite...
17:11 sri that's the reason browsers are still waiting
17:12 sri they don't want to implement an api they have to break again
17:12 GabrielVieira2 is now known as GabrielVieira
17:16 stephan48 sri: when i have a initial write_chunked, could i then in its drain callback have multiple other write_chunked(without chaining them via drain callbacks)?
17:16 sri sure, but they would be buffered
17:16 stephan48 buffered?
17:16 sri kept in memory
17:17 sri no write happening
17:17 stephan48 till i call finish?
17:17 sri at least not guaranteed
17:17 sri no, until you give the event loop some time
17:17 stephan48 ohh
17:18 stephan48 and there was the problem i had... i omitted the "give the event loop some time" step
17:18 sri the only guarantee you will get is the drain callback
17:18 sri it will get called once the previous buffered data has been written
17:19 amoore joined #mojo
17:19 stephan48 ye
17:19 stephan48 and when user ends the request(aborts), no more data will be written and no more callbacks invoked or?
17:20 sri on some platforms we can try to write directly, but that might only cover the first half of your chunk for example
17:20 sri the event loop usually tried to write as quickly as possible
17:20 sri s/d/s
17:22 crab stephan48: on_finish
17:22 crab (will be called when the connection is closed by the client)
17:23 sri or the transaction ends
17:23 stephan48 it would be enought for me when just no more drain callbacks will be called
17:24 sri oh, i missed the question :)
17:24 sri yes, connection close means no more drain
17:24 stephan48 cool
17:24 stephan48 i am writing a log file tail atm
17:25 stephan48 and my problem was that the tail mechanism(File::Tail) blocked while waiting for input -> no time for event loop
17:26 sri yea, don't block
17:26 sri a timer and a seek check should be a good solution
17:26 stephan48 ye
17:28 stephan48 by the way, mem vsz 1238524 rss 976764 of my morbo process, i managed to create a endless loop
17:34 crab stephan: heh, i just finished writing one of those
17:34 crab i was going to write a blog post about it
17:34 stephan48 2oh
17:35 stephan48 -2
17:35 purl -2
17:35 stephan48 mind to paste your code?
17:38 curtis_ joined #mojo
17:39 curtis_ is it possible to have a specific route not be executing more then once? I'd like to prevent the route from being processed in parrelel if two requests come in at the same time
17:40 stephan48 why? what you are trying to archive with this?
17:41 sri you *can* do pretty much anything with conditions
17:41 sri but if you should is another topic
17:42 crab stephan: http://toroid.org/misc/tail.txt
17:42 D4RK-PH0ENiX joined #mojo
17:42 curtis_ this request changes one value in a list. The list is then iterated over and certain actions are taken. The first request could very well change what is suppose to happen in the second request.
17:43 crab stephan: i just grabbed it and dumped it into a file, feel free to ask if anything is unclear.
17:43 mattastrophe left #mojo
17:43 mattastrophe joined #mojo
17:45 d4rkie left #mojo
17:48 crab stephan: that comment about suffering was just an attempt to fill up space, because webkit browsers won't start to render the iframe until they get a certain amount of data, but later i discovered that the data has to be in the dom, comments won't work (hence the "span"x200 below)
17:49 stephan48 okey
17:51 crab stephan: this maybe could have been done more simply using plain old timer-based polling, but i wanted to try long polling etc.
17:51 stephan48 k
17:51 crab of all the techniques i found described in some detail, this "forever iframe" thing is the one that worked best.
17:52 stephan48 ye
17:53 stephan48 i wanted to construct something similar but avoiding the js part
17:53 crab avoid js altogether? i don't know how you would do that
17:54 stephan48 having a js less alternative to some fancy js stuff
17:54 stephan48 just printing into the iframe?
17:55 crab i'm not sure if that would work the way you want, but try it and see (i didn't try)
17:55 stephan48 a drawback would be that you would have to scroll byyourself in the js less version
17:55 crab but note that if you don't reload occasionally, things will leak memory and blow up eventually
17:57 stephan48 it could be done by byte counter serverside(and then finishing the request), and client side via meta refresh
17:59 crab yeah, i guess. since i was doing this for a project that already required javascript, i didn't bother to try.
18:00 stephan48 mh
18:00 stephan48 firefox wont render
18:02 elb0w sri where can I see all the websocket events?
18:02 elb0w is there a on_connect ?
18:02 stephan48 in firebug i can see its tranfering data just fine but firefox dont want to render it... mh nvm
18:03 sri elb0w: what for?
18:03 purl for fun.
18:03 elb0w want to start sending data as soon as the connect
18:04 sri your action is the on_connect
18:04 elb0w oh
18:04 elb0w so I could just do shift->send_mssage (" blah ");?
18:04 elb0w message*
18:04 sri yes
18:08 eXeC001er left #mojo
18:14 elb0w `cool working
18:14 elb0w ty
18:19 stephan48 crab: the js version works great :)
18:19 crab stephan: now you have to put a "# thank you crab" comment in your code ;-)
18:20 stephan48 i will, and also i will add a link to your blog post :)
18:23 stephan48 oh and content_for++ i am just loading jquery for this one page
18:27 sri hmm, latest github version might leak a little
18:27 sri if anyone wants to help
18:31 d4rkie joined #mojo
18:31 y0j_ left #mojo
18:34 D4RK-PH0ENiX left #mojo
18:37 elb0w leaks zomg
18:40 sri or maybe i'm just crazy
18:40 sri because after a few first tests it seems clean
18:42 elb0w I should really learn how to write tests
18:44 sri oh damn...
18:44 sri i broke a rule
18:44 sri no quotes...
18:44 purl no quotes is wrong
18:45 elb0w rules were meant to be broken
18:45 sri even perl knows it :(
18:45 sri *purl
18:45 elb0w no quotes?
18:45 purl well, no quotes is wrong
18:45 * sri nods
18:45 elb0w like what
18:45 elb0w $this->{that} ?
18:45 sri as in futurama quotes
18:46 elb0w lost me
18:46 elb0w :o
18:46 elb0w my girl is washing that shirt right now, hope it doesnt shrink too much
18:52 sri anyone got a google+ invite? :)
18:53 sri well, the eu shirts did not shrink at all
18:54 sri but i think you get different ones over there
18:59 elb0w Yeah was lookin for a google+ invite earlier, couldnt get in
19:06 * tempire will trade glitter for a google+ invite
19:07 tempire I like Mojo::IOWatcher
19:07 tempire dead simple
19:09 elb0w why wouldnt someone want to live in amsterdam
19:09 elb0w I mean whats the down side
19:10 GitHub156 joined #mojo
19:10 GitHub156 [mojo] kraih pushed 1 new commit to master: http://bit.ly/keWei8
19:10 GitHub156 [mojo/master] fixed missing simpsons quote issue - Sebastian Riedel
19:10 GitHub156 left #mojo
19:11 sri sorry bout that
19:22 sri tempire: hope it makes the event loop more accessible and maintainable
19:30 yko sri: Useless use of a constant (undef) in void context at Mojo/IOLoop.pm line 97
19:30 yko IO::Epoll                (not installed)
19:30 sri yko: fix it!
19:32 Foxcool left #mojo
19:32 yko no u!
19:32 sri :O
19:32 y0j_ joined #mojo
19:35 sri yko: no idea why you're getting a warning there
19:35 sri it's not useless at all
19:36 sri is it the elsif?
19:36 yko looks like
19:36 yko i'm getting that warning when i do 'mojo version' :)
19:36 sri interesting, i don't
19:37 yko i have no epoll and no kqueue
19:37 yko and i'm awesome
19:40 GitHub179 joined #mojo
19:40 GitHub179 [mojo] kraih pushed 1 new commit to master: http://bit.ly/mRo6M2
19:40 GitHub179 [mojo/master] allow io watcher class to be inherited by new io loops - Sebastian Riedel
19:40 GitHub179 left #mojo
19:40 sri yko: maybe fixed
19:41 yko testing
19:41 sri the main change there should make a replacement AnyEvent watcher as easy as "use Mojo::IOWatcher::AnyEvent;"
19:41 yko i'm afraid of that new changes with ioloop
19:41 yko but looks like they don't break my software
19:41 sri they shouldn't
19:41 sri i've only moved stuff that's internal or was experimental
19:41 yko they always shouldnt
19:42 sri hehe
19:42 sri sometimes they should
19:42 yko confirm, fixed
19:42 sri \o/
19:42 yko btw, tests for mojo::base are not enough :)
19:42 sri you know the drill :)
19:43 yko just wondering, if you wouldn't mind for two or three tests even if they will look a bit strange
19:44 yko ill create pull request later
19:44 sri if you think they look strange yourself maybe that's a bad sign?
19:45 sri if they are sensible i'll surely apply the patch
19:45 yko my $x = 'foo'; $self->attribute($x); $x = 'bar'; is $self->attribute => 'foo';
19:45 yko tha's how first one should look
19:45 sri list context test?
19:45 yko no. test if $x tied to $self->attribute value :)
19:46 sri just make sure to say what you're testing :D
19:46 yko ok, in few days ill send pull request
19:46 sri lol
19:46 yko yep, i'm lazy
19:46 sri i'll never apply a patch i don't understand completely
19:47 yko btw, XS replacement for base makes mojo 10-12% faster, lol
19:47 sri :o
19:47 yko 19 ms instead of 22 :)
19:47 sri micro benchmark?
19:47 sri or with a real high level app?
19:47 yko for sure no!
19:48 yko rendering /welcome from mojo generate app
19:48 yko :D
19:48 sri when i added xsaccessor support to Mojo::Base i was very disappointed when it changed nothing for real apps :/
19:48 yko sri, you could not add XSAccessor to Mojo::Base in right way
19:48 yko but for real apps, yes
19:49 yko it woul change nothing, i mean really nothing
19:50 yko you can save 3-4 ms on parsing and dispatching request. maybe you will save another 2 ms in controller body, and well, maybe another 2 ms in template
19:50 yko if you use accessors much in your templates
19:50 yko so, total achieve will be about about 8ms on request
19:50 sri i'm a little sad about the sacrifice of 2k rps i made today
19:51 elb0w sri you use coro with your websockets?
19:51 sri elb0w: nope
19:51 yko if your request processed in 200 ms saving 8ms on accessors looks funny
19:51 elb0w how do you handle multiple requests?
19:51 sri non-blocking
19:51 purl non-blocking is probably portable enough for me.
19:52 elb0w What do you mean, do you have an example?
19:52 yko whole mojolicious is an example :)
19:52 elb0w haha
19:52 sri there is nothing special, when you write a websocket app with mojolicious it already can handle thousands of parallel connections
19:52 elb0w I havent worked with much other than synchronus in perl
19:53 sri on_message and send_message are evented
19:53 sri mojolicious has an event loop at its core
19:54 D4RK-PH0ENiX joined #mojo
19:55 sri the code is not optimized for thousands of parallel connections though, lots of memory we can free to make it scale better
19:55 sri (yet)
19:56 d4rkie left #mojo
20:01 philipp joined #mojo
20:04 SmokeMachine left #mojo
20:05 SmokeMachine joined #mojo
20:05 sri btw. i need an epoll tester
20:06 d4rkie joined #mojo
20:08 D4RK-PH0ENiX left #mojo
20:08 yko tester for what? just run tests?
20:09 sri nope, run a hello world with all our servers
20:09 yko oh -_-
20:09 yko that's not me :)
20:09 sri :(
20:09 sri hypnotoad would be enough
20:12 yko do I need something behind cpanm IO::Epoll ?
20:13 yko perl -MIO::Epoll -e 'print $IO::Epoll::VERSION' > 0.02
20:13 yko mojo version
20:13 yko IO::Epoll                (not installed)
20:14 elb0w so is it supposed to send to all clients?
20:15 sri elb0w: that's not how websockets work
20:16 sri you need a message bus in the back, like redis pub/sub
20:16 sri yko: maybe i did something wrong :S
20:17 elb0w right now just looping 0-999 and sending back the counter
20:17 elb0w but it does it on one then the other
20:17 elb0w firefox window 1, when that finishes it does it for firefox window 2
20:17 sri yko: perl -ws -Ilib lib/Mojo::IOWatcher::Epoll
20:18 sri elb0w: there are browser limitations too, i don't know what they are atm though
20:18 sri could be one websocket per site or so
20:19 elb0w We tried from two different pc's
20:19 yko Can't locate Mojo/IOWatcher/Poll.pm lol
20:19 sri eeep
20:20 GitHub107 joined #mojo
20:20 GitHub107 [mojo] kraih pushed 1 new commit to master: http://bit.ly/kTVdiK
20:20 GitHub107 [mojo/master] fixed typo - Sebastian Riedel
20:20 GitHub107 left #mojo
20:20 sri yko++
20:22 sri elb0w: nopaste your app
20:22 elb0w not mine , let me clean it up though
20:22 elb0w trying to get mojo embraced at my firm here :P
20:22 sri i just need to see the mojo part
20:22 sri maybe you're blocking the reactor or so
20:23 elb0w yeah making it readable
20:23 sri for (1 .. 10000) { $self->send_message($_) } for example would be fatal
20:23 elb0w haha
20:25 sri you need to wait for the last one to arrive and use the drain callback
20:25 elb0w sri, http://scsys.co.uk:8002/117499
20:25 sri $self->send_message($chunk, sub {... code to send nect chunk ... })
20:25 sri lol
20:25 elb0w :)
20:25 sri yea, that's pretty bad
20:26 sri the worst part is that you're buffering a gazillion messages in memory
20:27 sri it's all evented, that means you work your way from one callback to the next
20:28 elb0w you have any examples for this that show callbacks?
20:28 sri best example btw is an echo server that adds something to incoming messages
20:28 d4rkie left #mojo
20:28 sri nothing special about the callback, first argument is $self
20:29 sri just continue the way you started
20:30 nuba left #mojo
20:30 sri don't think we have examples for websockets
20:30 sri but the ones for write/write_chunk work just the same
20:30 elb0w only found 1
20:31 sri http://mojolicio.us/perldoc/​Mojolicious/Controller#write
20:31 sri those are rather good
20:31 elb0w yyeah just found it
20:31 elb0w ty
20:32 d4rkie joined #mojo
20:32 sri and now you know why the python event loop is called twisted :)
20:32 elb0w so I have to keep chaining subs?
20:33 sri well, you can reuse the same callback
20:33 elb0w yeah, im a dumb greek today :o
20:33 sri the wonderful world of event loops :)
20:34 sri i've played with Coro to make it look blocking, but that causes new problems
20:35 perlite_ joined #mojo
20:39 perlite left #mojo
20:39 perlite_ is now known as perlite
20:46 ispy_ left #mojo
20:49 elb0w sri, how far am I off? http://scsys.co.uk:8002/117501
20:51 stephen1 joined #mojo
20:53 stephen left #mojo
20:57 d4rkie left #mojo
20:58 d4rkie joined #mojo
20:59 elb0w sri the words perl and threads are now getting tossed around here, save me haha
21:00 elb0w purl: threads
21:00 purl threads is ithreads, Thread is 5.005 threads (older)
21:11 sri elb0w: perl has no real threads, so you should be fine :)
21:11 sri anyone know how to get a anyevent instance?
21:11 SmokeMachine left #mojo
21:12 SmokeMachine joined #mojo
21:16 d4rkie left #mojo
21:18 nuba joined #mojo
21:18 d4rkie joined #mojo
21:19 dekimsey left #mojo
21:19 perlrocks Twitter: "Rainbows and Unicorns are only cool when you are doing Mojolicious. And still, I would not wear a shirt with that shit on it." --ab_iron http://twitter.com/ab_iron​/status/86182017955414017
21:21 perlrocks Twitter: "@ab_iron Unicorn raptor? :) http://t.co/l9qbk8h" --kraih http://twitter.com/kraih/status/86182585071435776
21:31 kaare left #mojo
21:37 Drossel left #mojo
21:38 d4rkie left #mojo
21:38 Kulag joined #mojo
21:41 d4rkie joined #mojo
21:52 amoore left #mojo
22:02 stephen joined #mojo
22:04 stephen1 left #mojo
22:08 d4rkie left #mojo
22:10 d4rkie joined #mojo
22:22 SmokeMachine left #mojo
22:33 preflex left #mojo
22:38 preflex joined #mojo
22:40 d4rkie left #mojo
22:42 d4rkie joined #mojo
22:47 metaperl left #mojo
22:48 D4RK-PH0ENiX joined #mojo
22:51 d4rkie left #mojo
22:51 eugen left #mojo
22:51 d4rkie joined #mojo
22:52 jamesw left #mojo
22:54 D4RK-PH0ENiX left #mojo
22:54 curtis_ left #mojo
22:55 D4RK-PH0ENiX joined #mojo
22:57 d4rkie left #mojo
23:02 philipp_ joined #mojo
23:07 philipp left #mojo
23:07 philipp_ is now known as philipp
23:39 mattastrophe left #mojo
23:55 D4RK-PH0ENiX left #mojo
23:57 d4rkie joined #mojo

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