Camelia, the Perl 6 bug

IRC log for #mojo, 2011-08-11

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

All times shown according to UTC.

Time Nick Message
00:23 * alnewkirk is gutting Mojo
01:10 perlrocks Twitter: "What say you were chosen from the Mojolicious Osare on why WAF. Catalyst is based Shibui Which I say. No, I is not hate. The Shibui." (ja) --clicktx http://twitter.com/clicktx​/status/101460410082918400
01:12 perlrocks Twitter: "W was Mojolicious Osare" (ja) --ka2u http://twitter.com/ka2u/status/101460867165589504
01:12 perlrocks Twitter: "Osare whether the Mojolicious aside ...." (ja) --__gfx__ http://twitter.com/__gfx__​/status/101460951617908736
01:12 perlrocks Twitter: "I feel that the application to run in so much trouble nginx + starman the Mojolicious, Mendoi abandon the set up from the server." (ja) --clicktx http://twitter.com/clicktx​/status/101461024124837888
01:15 crab gutting?
01:25 perlrocks Twitter: "Osare whether the Mojolicious not know, Mojolicious like a sinatra:: Amon2 and Lite:: Lite is less to remember, accessible to beginners and I think" (ja) --hayajo http://twitter.com/hayajo/​status/101464251264278529
01:50 alnewkirk reading the docs for each class and truely trying to learns what does what and how it all fits together
01:53 Kulag joined #mojo
01:55 perlrocks Twitter: "Use but difficult to use Mojolicious." (ja) --hisaichi5518 http://twitter.com/hisaichi55​18/status/101471848700706816
02:08 ispy_ joined #mojo
02:13 D4RK-PH0ENiX joined #mojo
03:05 perlrocks Twitter: "Well, I fall Premature end of script headers and may occasionally have to move on SpeedyCGI Mojolicious." (ja) --clicktx http://twitter.com/clicktx​/status/101489291368210432
03:25 d4rkie joined #mojo
03:34 D4RK-PH0ENiX joined #mojo
03:58 Alias joined #mojo
04:07 jwang joined #mojo
04:21 perlrocks Twitter: "Talk about the features of a Web framework Mojolicious." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101508590396915714
04:24 perlrocks Twitter: "Mojolicious is not assumed a small scale and medium scale, which assumes a small scale to large. That size does not matter." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101509371862859776
04:25 jwang the last one sounds like it might have gone through a machine translator
04:26 jwang oh (ja) means japanese
04:26 perlrocks Twitter: "One of the most important feature of Mojolicious In addition to the core module of Perl 5.8.7 is that no dependency." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101509822666649600
04:27 perlrocks Twitter: "If installed by default in many environments Perl, considering that it provides a command module's installation of cpan is Perl, Mojolicious In a framework for all languages, a simple framework to install the most I said." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101510119354925058
04:31 perlrocks Twitter: "It is there where it is associated with the ease of installation, Mojolicious does not depend only on the standard module, as may be peeling because the operating environment than 5.8.7 of Perl, you can install once you have it." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101511109038702594
04:34 perlrocks Twitter: "use Mojolicious from a cpan Mojolicious:: Lite; get '/' => sub {shift-> render_text ('Hello'); app-> start; wrote, is beginning to develop in morbo myapp.pl." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101511825685880832
04:40 perlrocks Twitter: "Mojolicious itself is built-in development server, built-in pre-forking server, CGI, FastCGI, you can run in an environment where PSGI." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101513393927749632
04:43 perlrocks Twitter: "Built-in pre-forking server is called Mojolicious hypnotoad, is a pre-forking server that supports the I / O + HTTP1.1 asynchronous. It is expected to deploy in production." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101514156167008257
04:45 perlrocks Twitter: "Another Well, Mojolicious and FastCGI support is CGI. CGI is the older of the other, to some extent it's true that I, CGI is and I do not have to support the care, rather than it has been closely supported." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101514575924576256
04:46 kaare joined #mojo
04:49 perlrocks Twitter: "Environment that can run in CGI is that it can be used in rental Mojolicious shared server." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101515632276799488
04:50 perlrocks Twitter: "Mojolicious is one of the few Web framework that can be used in shared server rental." (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101515736396214273
04:57 d4rkie joined #mojo
05:15 koban joined #mojo
05:36 perlrocks Twitter: "Mojolicious to see information on MySQL:: Plugin:: wrote MysqlViewerCheap - http://t.co/DZBcoN2 Introduction to Perl with sample code # perl" (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101527415456661505
05:37 perlrocks Twitter: "I wrote Mojolicious:: Plugin:: MysqlViewerCheap to see MySQL information http://t.co/DZBcoN2" (ja) --perlcodesample http://twitter.com/perlcodesam​ple/status/101527601406935040
05:54 d4rkie joined #mojo
06:05 xaka joined #mojo
06:09 perlrocks Twitter: "perlcodesample: Mojolicious to see information on MySQL:: Plugin:: http://bit.ly/qSWlS7 wrote MysqlViewerCheap" (ja) --perlironman http://twitter.com/perlironm​an/status/101535778756243456
06:15 tabbi joined #mojo
06:15 tabbi left #mojo
06:22 Foxcool joined #mojo
07:07 arthas joined #mojo
07:08 sugar joined #mojo
07:15 yko Mojolicious does not care if $app->controller_class loaded?
07:17 zakame_ hi
07:17 * yko waves
07:20 marcus yko: it loads it on demand?
07:21 marcus yko: oh, no, it doesn't. It used to, but sri claims that was just a side effect
07:21 yko marcus, at the moment it just fails as I can see
07:21 marcus yko: I had to add a use statement to my app
07:21 yko marcus, now I have to do the same
07:22 marcus yko: yeah, I think it would be more useful for mojolicious to require the class for you, and I don't see any bad side effects of adding that.. sri? Pull rqeuest?
07:22 crab joined #mojo
07:22 yko maybe do it right after startup(), so user can even change it at startup
07:26 crab hi.
07:27 marcus hi crab.
07:28 marcus I see the japanese have been restless tonight
07:33 judofyr joined #mojo
07:39 arthas joined #mojo
07:54 cosmincx joined #mojo
08:12 mattp joined #mojo
08:42 spleenjack joined #mojo
08:45 marcus sri: I'm getting judofyr to make a controller generator based on the routes parser now, to stub controller methods for all the existing routes.
08:56 xoma joined #mojo
09:03 judofyr sri: I wrote it in Ruby instead…
09:05 marcus :D
09:06 marcus guess sri doesn't want a pull request now
09:34 mhi :-P
09:41 fmerges joined #mojo
09:55 sri yko/marcus: we have many _class parameters, loading them all on demand would really suck to test
09:56 sri i want consistency, so if you prepare a patch i want all _class attributes to behave exactly the same and to have unit tests
09:57 sri also, at that scale it can affect performance, so that needs to be checked as well
10:01 xaka joined #mojo
10:03 arpadszasz joined #mojo
10:08 sri jwang: they all went through google translate ;)
10:13 sri yko/marcus: testing will be tricky because the default class needs to be preloaded for copy on write
10:14 arpadszasz hello
10:14 purl hi, arpadszasz.
10:14 * sri waves
10:14 yko hey hey, I don't insist on patching or fixing anything
10:15 arpadszasz how to change expiration date of the session cookie ('mojolicious')?
10:15 yko I'm just asking because I was depended on that behavior and now it changed
10:15 sri yko: now i will crack the whip until you or marcus does!
10:16 * sri cracks teh whip
10:16 arpadszasz i'm reading the docs, tried some code but it's still defaults to 1 hour
10:16 * yko bites sri's leg
10:16 sri OUCH!
10:17 sri arpadszasz: http://mojolicio.us/perldoc/Mojoli​cious/Guides/Growing#State_Keeping
10:18 yko arpadszasz, you need to configure $app->sessions: http://mojolicio.us/perldoc/Mojolicious#sessions http://mojolicio.us/perldoc/Mojoli​cious/Sessions#default_expiration
10:19 yko sri, I think he need to configure default exp. time, not just single session. am I wrong?
10:19 sri yko: depends what he wants
10:19 sri both solutions are good
10:19 yko well, I think now he got full quality support from mojolicious community :)
10:19 sri \o/
10:25 arpadszasz sri, yko thanks
10:27 arpadszasz i actually want to make the 'mojolicious' signed cookie a browser session cookie, as in "expires only when the client browser is closed
10:27 arpadszasz i wasn't very clear
10:28 sri i'm not sure we do that
10:28 sri since it is very risky security wise
10:29 sri you potentially enable replay attacks that work until infinity
10:35 arpadszasz sri: good point, i have to think about that
10:36 arpadszasz yko: there's always good quality support/advice on this channel, that's why i often backlog on irclog.perlgeek.de ;)
10:41 yko arpadszasz, yeah, i'm quite sure I answered how to set default ex. time of session at least 2 times in past :)
10:46 arpadszasz yko: before asking i've tried $self->session->default_expiration() in startup (notice typo: "session" instead of "sessions" :)
10:55 arpadszasz sri: i think replay attacks are possible even with the default 1 hour expiry, the attacker must only refresh the page once every hour :)
11:04 Kulag joined #mojo
11:05 koban joined #mojo
11:10 judofyr sri: I agree with arpadszasz. forced expiration doesn't make much sense.
11:10 arpadszasz i' working on a intranet app and would like to have users relogin on every browser start, therefore the need for a browser session cookie
11:16 * judofyr writes Perl oneliners like a pro
11:19 marcus judofyr: *proud*
11:19 judofyr which I then pipe into Ruby…
11:19 sri arpadszasz: yes, but he only has one hour
11:20 marcus judofyr: yeah, I heard perl sucks at text processing ;-)
11:20 judofyr marcus: indeed!
11:20 sri arpadszasz: while no expiration is as good as no signature at all
11:21 sri judofyr: why not?
11:21 judofyr sri: why not what?
11:21 abra joined #mojo
11:21 sri why doesn't forced expiration make sense?
11:22 arpadszasz sri: i deploy this app with SSL, so the only way to get the cookie is if the client has his machine compromised
11:23 sri that's good for you, but how does that make expiration invalid?
11:23 arpadszasz sri: i didn't say that force expiration is wrong
11:23 sri judofyr did
11:23 judofyr sri: it's a sensible default, but it doesn't make sense to *only* allow it
11:23 arpadszasz sri: i use it if the user explicitly logs out of the application
11:24 sri now you're just contradicting
11:24 arpadszasz my usage scenario is this: user logs in and his session doesn't time out even if he doesn't use the app for several hours; it only times out on browser close
11:24 sri ok, if you think you have a better strategy, come up with a proof of concept, patch, or both
11:25 arpadszasz sri: who's contradicting? :)
11:25 arpadszasz sri: i'm ok with the defaults
11:25 sri judofyr
11:26 sri really, i'm done with the discussion now
11:26 sri i want to see something before picking it up again
11:26 * marcus pulls down his pants
11:27 sri -.-
11:27 arthas joined #mojo
11:27 marcus NOT ENOUGH?
11:31 judofyr sri: I meant "forced" expiration as in "you can't enable session-expiration"
11:31 judofyr or whatever expire-when-browser-is-closed is called
11:33 diegok judofyr: can't you just add other session cookie for that?
11:33 judofyr diegok: you still want to protect them
11:34 diegok judofyr: hm, to protect that other cookie with a signature?
11:37 judofyr sri: you're probably vulnerable to timing attacks btw. although I haven't seen any successful attacks in a web app before.
11:40 arthas joined #mojo
11:40 judofyr sri: the problem is with "$signature eq $check". that takes shorter time if $check and $signature does not have a common prefix
11:41 judofyr so you can (theoretically) fire many requests and see how long they take
11:41 judofyr the longer they take == closer to the signature
11:43 sri i know how timing attacks work, but this issue is very theoretical
11:45 judofyr yeah, I haven't heard of anyone that's been able to exploit it in a web app
11:45 judofyr but it's been exploited in SSL-servers etc…
11:45 judofyr still, better safe than sorry…
11:48 judofyr http://weblog.rubyonrails.org/2009/9​/4/timing-weakness-in-ruby-on-rails
11:50 sromanov joined #mojo
11:52 sri feel free to send a patch
12:05 judofyr sri: something like this perhaps: http://pastie.org/2355358
12:06 judofyr if you're interested, I can write it into a proper patch
12:06 arpadszasz diegok: followed your advice and added a control cookie that expires on browser close and i'm checking both the session and this control cookie under a bridge
12:06 arpadszasz thanks all for your time!
12:06 diegok arpadszasz: sweet :-)
12:11 Alias joined #mojo
12:16 Kulag joined #mojo
12:18 sri judofyr: yes, that would work :)
12:21 Akron joined #mojo
12:46 GitHub160 joined #mojo
12:46 GitHub160 [mojo] kraih pushed 1 new commit to master: http://bit.ly/oESWpm
12:46 GitHub160 [mojo/master] added secure_compare function to Mojo::Util as a precaution against timing attacks in the future - Sebastian Riedel
12:46 GitHub160 left #mojo
12:51 GitHub58 joined #mojo
12:51 GitHub58 [mojo] kraih pushed 1 new commit to master: http://bit.ly/nKZqVV
12:51 GitHub58 [mojo/master] cleanup - Sebastian Riedel
12:51 GitHub58 left #mojo
12:53 judofyr sri: hey, you ruined all my fun in sending a patch/pull request :(
12:53 judofyr sri: you're way too effective
12:53 marcus :D
12:54 sri arpadszasz: it seems ->default_expiration(0) doesn't do anything sensible atm, so a good core path would be possible
12:54 sri judofyr: aww :(
12:54 sri judofyr: i thought you picked up the habit of nopasting patches from marcus :S
12:54 marcus sri: it wasn't even a patch
12:55 sri excuses excuses
12:55 marcus sri: of course, now you're just training him to send random bits of code instead :D
12:55 sri :S
12:56 arpadszasz sri: i will look in to writing a patch, thanks
12:56 sri arpadszasz: just don't forget good unit tests ;)
12:56 perlrocks Twitter: "IM IN UR PERL, FIXING TIMING ATTACKS: http://t.co/LCFLqZG" (de) --judofyr http://twitter.com/judofyr​/status/101638094712868864
12:56 marcus (de) ??
12:56 marcus no (LOLCAT)
12:57 sri "timing attacks in the future" sounds a bit like a scifi movie plot
12:57 marcus sri++
12:57 * marcus goes back to the future to exploit the timing attack
12:58 perlrocks Twitter: "I have more patches in Mojolicious (Perl web framework) than Ruby on Rails. what is happening to me???" --judofyr http://twitter.com/judofyr​/status/101638654765694976
12:59 sri retweeted :)
13:03 diegok so, in the future there wont be any network latency and every request will run on the same conditions? :-)
13:04 judofyr Everyone is Here in the Future: http://everyoneishereinthefuture.com/
13:05 sugar joined #mojo
13:05 SmokeMachine joined #mojo
13:05 judofyr sri: http://d.pr/rxrf o_O
13:06 sri lol!
13:07 sri you've officially been assimilated
13:08 marcus judofyr: don't worry, we'll give you some obj-c task to make you feel better later =)
13:09 judofyr marcus: http://d.pr/9Knj
13:33 elb0w_ iiiiiiiiiii willll folllow u
13:35 * elb0w_ raises hand
13:36 * sri high fives elb0w
13:37 elb0w_ ooo
13:37 elb0w_ mode +b sri
13:37 elb0w_ wer
13:37 elb0w_ er
13:37 elb0w_ :D
13:38 judofyr It's A OP Party And Everyone Is Invited!
13:44 sri "Wow, Barney. You brought a whole beer keg! … Yeah... where do I fill it up?"
13:44 elb0w_ :o
13:44 elb0w_ was kicked by elb0w_: elb0w_
13:44 elb0w_ joined #mojo
13:44 elb0w_ :D
13:44 * sri scratches head
13:45 elb0w_ wow ubuntu dvd download says taking 1day on a oc3 connect
13:45 elb0w_ wtf
13:47 sri they surely have mirrors
14:24 SmokeMachine_ joined #mojo
14:25 koban left #mojo
14:34 amoore joined #mojo
14:40 ispy_ joined #mojo
14:55 SmokeMachine joined #mojo
14:56 bpaluch joined #mojo
15:06 bosphorus joined #mojo
15:07 bosphorus joined #mojo
15:07 nicomen joined #mojo
15:40 crab hi
15:45 tempire https://github.com/busyloop/lolcat
15:49 metaperl joined #mojo
15:50 metaperl This isnt technically a mojo question, but I'm sure that Mojo::UserAgent uses strict, but if I use Mojo::UserAgent, my script is not automatically under strict. In contrast, if I use Moose, then my script is automatically under strict also... Why is that?
15:51 sri wait, you would expect your script to become strict just by using Mojo::UserAgent?
15:51 alnewkirk metaperl, why are you comparing moose and mojo::useragent
15:52 metaperl alnewkirk - i'm not. i'm just asking why one puts me under strict automatically and the other doesnt... I guess this is a dumb question... sorry for the interruption
15:52 metaperl i guess the more general question will be asked in a perl help channel.
15:52 sri we only have two modules that import strict on use… Mojo::Base (obviously) and Mojolicious::Lite (to make prototyping and examples easier)
15:53 sri you might want to take a look at Mojo::Base
15:53 sri its code surely can answer quite a few questions
15:53 alnewkirk many modules dont turn on strict and warnings in the calling app
15:54 sri random modules never should
15:54 alnewkirk Moose does because its enforcing a standard
15:54 metaperl ah, so strict->import; is the key
15:54 sri yes
15:54 sri because import runs inside the calling module, it's a hack
15:54 sri or inside the scope
15:55 metaperl I wish I never had to put `use strict; use warnings` at the top of all my code. because I always use strict
15:55 arthas joined #mojo
15:56 sri most of my code is in modules anyway, so i let Mojo::Base take care of it
15:56 sri http://mojolicio.us/perldoc/Mojo/Base#DESCRIPTION
15:57 sri with features it gets a bit ridiculous
15:57 sri but at some point we will hopefully get away with "use 5.16.0;"
16:02 preflex joined #mojo
16:05 alnewkirk 1/4 the way through all the Mojo documentation .... I've already gleened alot and having a great respect for fearless leader
16:05 mhi alnewkirk: How long took it to read 1/4 of it?
16:06 alnewkirk its 12pm now, since last night around 10/11pm
16:07 mhi okay
16:07 alnewkirk i feel my ignorance shedding
16:07 mhi (because I have to make a little in-house lecture about mojo until next Thursday :>)
16:07 GitHub15 joined #mojo
16:07 GitHub15 [mojo] kraih pushed 1 new commit to master: http://bit.ly/nsXoP1
16:07 GitHub15 [mojo/master] reuse Mojo::Base in Mojolicious::Lite - Sebastian Riedel
16:07 GitHub15 left #mojo
16:09 alnewkirk follow the guides, then dive into the code, M::UserAgent has mucho goodies
16:09 mhi Okay, thanks.
16:13 alnewkirk np
16:38 xaka joined #mojo
16:54 Foxcool joined #mojo
16:54 GitHub37 joined #mojo
16:54 GitHub37 [mojo] kraih pushed 1 new commit to master: http://bit.ly/oo1PtP
16:54 GitHub37 [mojo/master] modernized Mojo::UserAgent examples - Sebastian Riedel
16:54 GitHub37 left #mojo
17:14 GitHub103 joined #mojo
17:14 GitHub103 [mojo] kraih pushed 1 new commit to master: http://bit.ly/o0U79r
17:14 GitHub103 [mojo/master] fixed typo - Sebastian Riedel
17:14 GitHub103 left #mojo
17:31 sugar joined #mojo
17:49 tempire is there anything missing in perl6 that would prevent a mojolicious port?
17:54 crab an implementation?
17:54 purl i heard an implementation was a bit mental.
17:55 tempire there's rakedo
17:55 tempire *rakudo
17:55 tempire which is fairly easy to install & get running
17:59 tempire there's no usable database interface
17:59 tempire but that wouldn't get in the way of mojo
17:59 auggy joined #mojo
18:00 auggy hiya, I'm a little confused, I'm trying to use Mojolicious with Plack
18:00 auggy and I'm not sure if I need to write a .psgi file for Plack or I need to put the Plack middleware code into Mojo
18:01 auggy I'm using AllowCrossSiteAJAX with it
18:02 auggy I have a front end developer that's going to query the rest api I'm using mojolicious to serve
18:03 tempire http://mojolicio.us/perldoc/Mojoli​cious/Guides/Cookbook#PSGI2FPlack , http://blog.kraih.com/mojolicious-and-plack
18:03 crab auggy: i have no idea what AllowCrossSiteAJAX is, but look at the example on the wiki of using plack middleware
18:04 sri tempire: non-blocking io is missing
18:04 auggy yeah i'm looking at http://search.cpan.org/~jamadam/Mojoli​cious-Plugin-PlackMiddleware-0.21/lib/​Mojolicious/Plugin/PlackMiddleware.pm
18:05 auggy i'm just really confused ;)
18:05 sri that's something very different
18:05 sri do what crab and tempire said
18:05 auggy do i need a .psgi file for my mojo app?
18:06 sri no
18:06 auggy plackup ./script/myapp <-- is myapp my Mojolicious app?
18:06 sri yes
18:06 sri it will just work
18:06 auggy right, but i need to configure the Plack builder
18:06 sri we can detect plackup and will act accordingly
18:07 auggy builder {
18:07 auggy mount "/api" => builder {
18:07 auggy enable "AllowCrossSiteAJAX";
18:07 auggy $app;
18:07 auggy };
18:07 sri please, don't ever paste into this channel again
18:07 auggy not sure if that needs to go into my Mojo app or do I write a seperate psgi file that points to my Mojo app
18:07 auggy ok sorry
18:08 sri and now look back up again at the second link tempire gave you
18:08 sri it has everything you need
18:09 auggy ok kewl i can put the builder stuff into Mojo, thanks that's what I needed to know
18:10 tempire oh, perl6 does have a usable db interface.
18:15 tempire I'm making wild promises on behalf of you, sri
18:15 tempire http://blogs.perl.org/users/randal_l_schwart​z/2011/08/a-compelling-reason-for-perl6.html
18:15 tempire Though it's not too wild, 'cause I would jump on that.
18:19 stephan48 in a mojo app i want to save filehandles between requests(f.e. they stay open and clients can ask to read/write to them), if i got only a single process this would work fine, but how could i share a bunch of handles(IO::Socket::INETs)  between multiple hypnotoad or deamon workers?(f.e. when multiple are launched, the request is not guaranteed to get always to the same instance)?
18:22 tempire stephan48: sounds like you need a job queue
18:22 tempire maybe something like gearman
18:22 stephan48 na, i dont think so
18:23 stephan48 i dont want to handle jobs, just a bunch of sockets which need to stay open and be accessible by all processes the server(morbo, hynotoad) launches
18:24 sri tempire: not unrealistic
18:24 sri but merlyn is so far off about frameworks it's not even funny
18:25 tempire merlyn?
18:25 purl well, merlyn is not joking or at http://www.ourmedia.org/user/3831 or "CZAR DAWNS THRALL" or at http://www.stonehenge.com/merlyn/dot-plan.txt or white or poetic or randall l schwartz or not a felon anymore but still a pervert
18:25 tempire ah
18:25 sri randals irc name
18:26 * sri hugs purl
18:26 * purl smiles
18:27 sri stephan48: you can't
18:27 stephan48 so no way?
18:27 sri your thinking is wrong
18:27 sri you don't share sockets
18:28 stephan48 how then?
18:28 sri job queue?
18:28 purl somebody said job queue was ordered.
18:29 stephan48 i want a client to be able to connect and say, open a socket to x:y , then it gets a id, and should then be able to read/write from and close it via the id, the conn should be kept open until either a timeout happens or the client closes it
18:30 sri yes, that does not automatically scale
18:30 sri you need some sort of intermediate layer
18:30 stephan48 i understand a jobq in the way that it will allow me to move in jobs and get them proccessed(by a worker), and then later catch the result, but not ineract with it
18:30 stephan48 currently i am trying to implement http://search.cpan.org/~patl/Apache-H​TTunnel-0.08/lib/Apache/HTTunnel.pod in Mojo
18:30 stephan48 or rather in a Lite app
18:31 stephan48 maybe this makes it clearer?
18:32 stephan48 the module uses this for managing the FHs http://search.cpan.org/~patl/F​ile-FDkeeper-0.06/FDkeeper.pod
18:33 sri yes, an intermediate layer
18:33 stephan48 ah
18:34 sri there are many ways to do this
18:34 sri that one is a queue for file descriptors
18:35 sri which can be passed around between processes, but are exclusive
18:36 stephan48 k
18:37 stephan48 mh, so i could write a app with that the lite app comunicates, and which then opens/closes the conn and handles read/writes..
18:38 stephan48 this way the sockets would be accessible by all morbo, hypnotoad processes
18:56 sri tempire: always annoys me when people like merlyn talk about 5 years old technology like its the future
18:58 sri now there are frameworks that fricking sync data structures between client and server side via websockets
19:00 sri the next big challenge is real time client/server communication, and finding the right abstraction for it
19:02 sri seaside does not at all fit in there
19:05 alnewkirk ... then we mimick the smalltalk actor model
19:06 sri kinda, ye
19:13 reyjrar joined #mojo
19:14 reyjrar what does it mean if a template is rendering without the layout?
19:15 alnewkirk it means its a partial rendering
19:15 alnewkirk ... we need more info
19:17 reyjrar k.. lemme do a pastebin.. one sec..
19:20 reyjrar http://pastebin.com/7Kc4rgAA
19:21 SmokeMachine_ joined #mojo
19:21 reyjrar tried removing Main->credits too.. but still does partial rendering..
19:22 sri you might want to take a look at http://mojolicio.us/perldo​c/Mojolicious/Lite#Layouts
19:23 sri i suspect you did not tell it to use a layout
19:24 sri http://mojolicio.us/perldoc/Mojo​licious/Guides/Rendering#Layouts
19:24 reyjrar sri: I did not.. why would the rest of the templates that don't specify a layout work though?
19:24 sri i have no idea
19:25 reyjrar so, every template should have a % layout 'default' in there?
19:25 sri could, or you have a layout defined in the stash
19:26 sri even app->defaults(layout => 'default') works
19:26 reyjrar sri: perfect :)
19:26 sri but that's application wide
19:27 reyjrar sri: that's acceptable for this app
19:29 sri i actually like having % layout in every template, it's like a "use" statement that way
19:29 alnewkirk me too
19:29 alnewkirk and the ability to pass args to it
19:29 reyjrar or not..
19:30 alnewkirk and the ability to add block to it ... content_for begin
19:30 reyjrar all of my include templates applied the layout too :)
19:30 alnewkirk de ja vue
19:30 reyjrar passing it as an arg to render works as well
19:31 sri hmm, right, it interferes with include
19:31 reyjrar I'll add the layout statement to the templates that should have it..
19:31 sri wonder if include should clear layout
19:31 reyjrar weird that it was working without it..
19:32 sri actually that might even be a bug
19:34 reyjrar no.. it wasn't..
19:35 sri ?
19:35 reyjrar I was setting layout in an included template in the case of main#index
19:35 sri nono, i meant include using the global layout
19:35 reyjrar oh :)
19:35 sri just did some testing and it seems to really be a bug
19:35 reyjrar I'm coming from Mason.. so layout is like autohandler
19:36 reyjrar sub component calls don't inherit that autohandler
19:36 Akron joined #mojo
19:37 sri hmm
19:38 reyjrar it's interesting though..
19:38 reyjrar what happens if an included template sets layout as well?
19:38 reyjrar trump the parent layout? apply both? ignore?
19:38 sri would be localized
19:39 sri so the parent should be unaffected
19:40 judofyr joined #mojo
19:45 sri reyjrar: actually, i can't replicate what you're describing
19:46 sri reyjrar: what version are you using?
19:46 sri "mojo version" will give you everything
19:46 reyjrar 1.68
19:47 reyjrar lemme upgrade
19:47 sri hmm, that should be recent enough
19:48 sri i have not the slightest idea how the layout could have gotten applied to included templates
19:50 SmokeMachine_ joined #mojo
19:51 sri there is a huge barrier, it is pretty much impossible
19:52 sri partials can't pick up layouts from the stash
19:52 reyjrar $self->defaults( layout => 'default' );
19:52 sri they only accept a layout has been passed explicitly as an argument to render/include
19:53 reyjrar it did it with 1.74 too
19:53 sri can you replicate it in a small lite app?
19:53 reyjrar I can try ;)
19:54 sri i have a hunch your installation could be borked though, since what you're describing sounds like broken 1.3x behavior
19:58 sri reyjrar: http://pastie.org/2357425
19:58 sri that's how i tested it
20:00 reyjrar http://pastebin.com/kRvXtwZ2
20:00 reyjrar view source, it re-renders the layout
20:00 sri uh
20:00 sri that's absolutely intended
20:01 reyjrar the second equal sign?
20:01 sri you said app->defaults(layout => ...)
20:01 sri everything
20:01 purl everything is "omg, it must take over the world"
20:01 sri it's perfectly fine
20:02 sri second equal sign is optional in that case btw.
20:03 reyjrar ok. so maybe it's my confused logic..
20:03 * sri needs a cold beer to recover
20:04 reyjrar this particular template can be called as a standalone page, or included.. so.. I guess I'll pass the layout to the render() call when it's standalone..
20:05 sri or you only define % layout in templates that actually need a template
20:06 sri but app->defaults(layout => 'default') should work flawless too
20:06 sri s/template/layout/
20:06 sri *beer*
20:10 jwang joined #mojo
20:13 d4rkie joined #mojo
20:16 SmokeMachine_ joined #mojo
20:24 alnewkirk halfway through M::S::Daemon
20:26 alnewkirk sri, im a layman when it come to Web Servers, that said, mysql can bind two different servers to port 3306 using different host names, ... couldn't we do the same using Mojo?
20:28 sri host names are a concept on a much higher layer
20:28 sri you're prolly thinking ip addresses or interfaces
20:29 sri we default to listening on all interfaces and let the user limit it to a specific one
20:30 sri that all has no relation to host names though
20:30 sri and we do not for example support listening on multiple specific interfaces i think
20:38 alnewkirk oh i see, you're absolutely right
20:38 alnewkirk it didn't occur to me at first
20:39 GitHub196 joined #mojo
20:39 GitHub196 [mojo] kraih pushed 1 new commit to master: http://bit.ly/oz0orJ
20:39 GitHub196 [mojo/master] more layout documentation - Sebastian Riedel
20:39 GitHub196 left #mojo
20:41 alnewkirk i wonder what the performance would be like using the mock server technique with multiple apps differentiated by hostname
20:46 sri for real world apps prolly not measurable
20:46 sri it's only really significant for hello world type apps
20:47 alnewkirk okay
20:47 alnewkirk it be nice to not have to deal with a higher level web-server at all
20:54 SmokeMachine joined #mojo
20:54 tempire hmm
20:54 tempire how does nowjs do its magic?
21:00 alnewkirk tempire, what do you mean?
21:11 sri http://nowjs.com/
21:12 sri it's quite cool
21:13 jwang "Create a chatroom in 12 lines of javascript" <- pretty interesting
21:15 sri once websockets go mainstream i expect many more such projects
21:15 sri why use messages and streams when you can just sync data structures
21:16 sri but who knows what might come next, bi-directional realtime communication makes pretty much everything possible
21:23 jwang every website could have their own google/fb chat
21:41 sri the 37signals realtime framework is also not uninteresting
21:41 sri http://cramp.in/
21:41 alnewkirk double negatives are awesome
21:42 sri no they are not unawesome
21:42 alnewkirk :}
22:02 alnewkirk sri, when you do $r->route('/welcome')->to(app => MyApp->new); ...
22:03 alnewkirk is app cached?
22:03 sri yes
22:04 sri it lives as a default value in the pattern instance of the route
22:04 alnewkirk ok great
22:04 alnewkirk got it
22:05 sri would actually be rather hard not to cache it in this case ;)
22:43 alnewkirk joined #mojo
23:06 GitHub157 joined #mojo
23:06 GitHub157 [mojo] kraih pushed 1 new commit to master: http://bit.ly/r2Qktw
23:06 GitHub157 [mojo/master] fixed typo - Sebastian Riedel
23:06 GitHub157 left #mojo
23:15 alnewkirk joined #mojo
23:57 * sri is starting to like zsh
23:57 sri little things like "kill <tab>" make life so much easier

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