Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-08

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

All times shown according to UTC.

Time Nick Message
00:17 seb_ joined #mojo
00:37 perlrocks Twitter: "Mojolicious - Web framework for Perl http://www.findbestopensour​ce.com/product/mojolicious # FOSS" (no) --bestopensource http://twitter.com/bestopenso​urce/status/23538656551632896
00:43 Beirdo joined #mojo
00:44 Beirdo I know this will seem like a newbie issue (as it is), but...  I'm having a tough time determining how to enable a log file from my mojolicious app.
00:45 Beirdo Mojolicious::Lite seems to indicate that I just need a log/ dir and it will use it, but I'm not using lite (#1), and my log/ dir seems to be getting no use (#2)
00:46 Beirdo I was just wondiering if there's any words of wisdom...  I might be looking at the wrong perldoc page, etc.
00:49 Beirdo gah, I missed a line.  I wanted debug logs, and forgot the $self->app->log->level('debug');
00:49 Beirdo my bad.
01:00 Alias__ joined #mojo
01:05 Alias_ left #mojo
02:15 MojoGuest339 joined #mojo
02:15 MojoGuest901 joined #mojo
02:15 MojoGuest901 From: http://news.ycombinator.com/item?id=1277067 (141 hits)
02:16 MojoGuest901 left #mojo
02:16 MojoGuest339 left #mojo
02:55 alnewkirk joined #mojo
04:04 tl joined #mojo
04:05 tholen42 left #mojo
04:06 perlrocks Twitter: "Mojolicious-Plugin-ParamsAuth 0.01 by Glen Hinkle - http://frepan.org/~tempire/Mojo​licious-Plugin-ParamsAuth-0.01/" --cpan_new http://twitter.com/cpan_ne​w/status/23591456472043520
04:08 ashleydev left #mojo
04:19 ashleydev joined #mojo
05:01 avkhozov joined #mojo
05:25 ashleydev left #mojo
05:31 polvo joined #mojo
06:16 MojoGuest682 left #mojo
06:17 yakudzo left #mojo
06:41 achromic left #mojo
06:43 achromic joined #mojo
07:11 * sri yawns
07:13 * marcus subscribed to a binary usenet server last night
07:13 marcus and set up sick beard
07:13 marcus it's pretty nice
07:13 garu sri++
07:13 garu marcus++
07:13 garu hell, mst++
07:14 garu it's nice to *finally* see you guys having an actual conversation for a change :)
07:14 garu instead of just jumping on each other's throat :)
07:15 marcus we're just scheming to gang up on you instead.
07:15 marcus <G>
07:15 garu oO
07:15 * garu hides
07:16 otaviof joined #mojo
07:16 marcus ja rucksack.
07:16 * garu waves at otaviof
07:16 otaviof good morning garu!
07:23 * sri wonders how the "full-stack" plugin will affect such discussions
07:25 * sri waves
07:27 sri for the record, i have customers in the intelligence community that are quite happy with mojolicious
07:27 garu oO
07:28 GitHub2 joined #mojo
07:28 GitHub2 mojo: master Sebastian Riedel * 19ed17e (3 files in 2 dirs): fixed typos - http://bit.ly/g14g1h
07:28 GitHub2 left #mojo
07:28 sri so the single distribution thing is not a deal breaker in high security environments
07:28 garu sri: they're not likely to let you use their names on a "powered by mojo" site, would they?
07:29 sri lol, no
07:29 garu :)
07:30 marcus sri: I think most high-security places have much more issue with the cpan-model in general
07:30 marcus 100s of dependencies seem very scary to a security analyst
07:30 marcus justified or not
07:30 garu I think the whole "this was updated by who, exactly?" is what would scare them the most
07:31 garu because, quite frankly, cpan is a mess
07:31 garu err s/cpan/pause/
07:37 garu on a totally unrelated note, I was looking for a unicode cloud close enough to mojo logo, but all I could find was this ☁
07:37 garu and, well, it sucks :)
07:38 sri
07:42 garu hahaha
07:43 garu maybe ther's an open box somewhere in there?
07:43 garu hmm... *two* java-ish coffee logos... I wonder if it's by accident
07:44 sri ❄ current code name
07:44 marcus http://www.fileformat.info/inf​o/unicode/char/2423/index.htm kinda sucks too
07:44 garu yikes
07:44 sri eww
07:45 sri ☁❄
07:45 garu anyway, 6am here, gonna lay down a bit and see if I get sleepy eventually. night guys
07:45 sri nn
07:45 otaviof garu: good night, man
07:45 sri breakfast time here
07:46 otaviof yep
07:46 otaviof same here (CET)
07:46 marcus just had breakfast as well
07:46 marcus wow, there is just so much shit on usenet
07:47 * sri thought usenet was dead
07:47 marcus Nelsons Surgeon pdf
07:47 marcus sri: not for warez, it seems
07:47 marcus Mac Life February 2011
07:58 kaare joined #mojo
08:55 avkhozov left #mojo
09:28 sri interesting how pretty much everybody i talk to says they want to use mongodb this year
09:40 GitHub132 joined #mojo
09:40 GitHub132 mojo: master Sebastian Riedel * b5ddab0 (2 files in 2 dirs): improved installation oneliner - http://bit.ly/eVYd6e
09:40 GitHub132 left #mojo
09:43 sri damn, i love software upgrades with git and hypnotoad
09:50 perlrocks Twitter: "Improved the #mojolicious installation oneliner slightly, should now "just work" in more cases. http://t.co/bNQEIBH #perl" --kraih http://twitter.com/kraih/status/23677806386880512
09:51 sri hmm, need to get used to proper retweets
10:38 marcus sri: I already use mongodb. It's really easy :)
10:50 marcus guess I can push my oauth2 plugin now
10:50 marcus have to remove twitter, I don't have the urls yet, but there's a bunch of others
10:52 marcus hmm Microsoft Access Control System uses draft 10 too
10:52 marcus what can you use that for? :)
10:55 chansen__ left #mojo
10:57 * sri still wonders how twitter for mac does authentication
10:58 sri would be rather nice to have that same flow for bots
10:58 marcus xauth probably
10:58 marcus we got permission from twitter to use it for a html5 project we did
10:59 marcus on the iphone
10:59 marcus since redirecting to twitter would have been impractical
10:59 marcus http://dev.twitter.com/pages/xauth
11:00 sri eww, signature again
11:00 marcus yeah, it's just hacked ouath1
11:00 marcus oauth
11:05 perlrocks Twitter: "Mojolicious-Plugin-OAuth2 0.01 by Marcus Ramberg - http://frepan.org/~mramberg/Mo​jolicious-Plugin-OAuth2-0.01/" --cpan_new http://twitter.com/cpan_ne​w/status/23696691718791168
11:05 sri marcus++
11:05 sri give me something to retweet :)
11:13 marcus yeah, I have a blog post ready...
11:13 marcus since I set up daeemontools, my wordpress actually works again too.
11:14 marcus it's a shame vti has abandoned bootylicious
11:14 marcus considering forking it and adding a mongodb backend
11:14 marcus maybe when you finish your client.
11:23 sri could be quite cool
11:31 sri you could build a kick ass cms that would only require perl and mongodb
11:31 marcus yepp
11:32 marcus brew install mongodb; git clone <cms> # you're done
11:33 sri bson is slowing me down atm :S
11:33 marcus OH drunk Yahoo employee: "Take delicious. None of our idiot users can even spell the word, let alone the domain."
11:33 sri no good spec tests
11:34 sri how very yahoo :)
11:35 sri no idea how such a company can be so unfocused
11:36 sri right now would be the perfect opportunity to return to their roots
11:37 sri google is losing the war against spam, perfect time to return with a human powered search engine
11:38 perlrocks Twitter: "Just published a OAuth2 Mojolicious plugin for easy Facebook integration. http://t.co/8Mvc4Rm" --marcusramberg http://twitter.com/marcusramb​erg/status/23705145334308865
11:39 marcus you mean a directory?
11:39 marcus :)
11:39 sri i mean something new, a hybrid
11:39 marcus One of my clients is th e biggest directories in Norway.
11:39 marcus we tried building a search engine using it as a filter.
11:39 marcus but relevance is damn hard
11:40 marcus that search engine is now google powered :p
11:40 sri an army of professional curators maintaining indexes for all languages and crawlers to take care of the actual pages
11:40 sri google would never do that
11:41 marcus well, they are trying to do it algorithmically
11:41 sri using humans is not their style
11:41 marcus like pushing down catalog results
11:41 marcus I think they are better in the US than in europe tho
11:41 marcus not as focused
11:41 marcus Google is quite US-centric
11:41 marcus more so than Apple and Microsoft.
11:42 sri yea, their german presence is only marketing drones
11:43 perlrocks Twitter: "Yay. I have blogged in 2011. So good I am. About my new OAuth2 plugin Mojolicious: http://t.co/D1KslEK" (no) --nordmarcus http://twitter.com/nordmarc​us/status/23706314332962816
11:43 marcus yay, norwegian translation.
11:43 sri not bad
11:44 marcus it failed a bit on the 'how great am I.' bit.
11:46 MojoGuest868 joined #mojo
11:46 MojoGuest868 From: http://www.google.be/search?hl=fr&amp;rlz=1​C1DVCM_enBE393BE393&amp;q=+html+5+irc&amp;a​q=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai= (1 hits)
11:46 MojoGuest868 Test
11:47 marcus OH HAI
11:47 sri pass
11:47 marcus sri: NO PLAN
11:48 MojoGuest868 left #mojo
11:48 MojoGuest618 joined #mojo
11:48 MojoGuest618 From: http://www.google.be/search?hl=fr&amp;rlz=1​C1DVCM_enBE393BE393&amp;q=+html+5+irc&amp;a​q=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai= (2 hits)
11:48 sri you scared him
11:48 marcus don't think it's the same one?
11:48 marcus 618, were you also 868?
11:48 MojoGuest618 left #mojo
11:48 sri again!
11:48 marcus ok, now I really scared him :)
11:49 marcus came from the same url tho
11:49 marcus searching for "html 5 irc"
11:49 * sri puts a paper bag with a smiley face on marcus head
11:50 marcus I bet that is how you treat your girlfriends too
11:52 marcus HAKUNA MATATA
11:52 sri you don't?
11:53 marcus sri: I'm married. No more sex.
11:53 marcus :D
11:53 sri oh right :S
12:13 perlrocks Twitter: "Mojolicious:: Routes to twist my head if I get up and he did not own the older Mojo I \ (^ o ^) /" (ja) --nekoruri http://twitter.com/nekorur​i/status/23713943243456512
12:15 perlrocks Twitter: "Mojolicious miscellaneous notes - notes 515 https: / / sites.google.com/site/515memo/​mojolicious-no-zatta-na-memo" (ja) --nekoruri http://twitter.com/nekorur​i/status/23714505879986176
12:36 perlrocks Twitter: "#perl developers on the web, try http://mojolicious.org/" --betasam http://twitter.com/betasam​/status/23719645714317313
12:42 perlrocks Twitter: "marcus ramberg »Blog Archive» Easily integrating your Mojolicious app with Facebook. http://bit.ly/fupOzj" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/23721096087863297
12:55 snearch joined #mojo
13:09 marcus sri: you didn't retweet me :/
13:10 sri thought i did
13:10 sri and i did!
13:11 sri http://twitter.com/#!/kraih
13:11 marcus oh right, forgot
13:11 marcus your bot stopped announcing retweets
13:11 marcus :)
13:11 sri ;p
13:14 marcus bah, want to reply to edenc, but I am sure it would not be productive. Will hold my tongue
13:14 marcus anyways, as long as he works for shadowcat, I'm pretty sure he would not switch to mojolicious ;)
13:14 sri after that "discussion" i think i'm going to change my strategie completely
13:15 sri s/ie/y/
13:15 marcus I kind of like that this room is publicly logged
13:16 marcus for one, it shows up in google search results, and people can read backlogs if they want to.
13:16 marcus I think that makes the community more open.
13:16 * sri waves at the audience
13:17 marcus sri: so what is your new strategy? Carpet bombing from high altitude?
13:17 sri they seem so bitter
13:18 marcus yeh
13:18 marcus but I think it's interesting that mst considers using your http stack.
13:19 marcus SABConnect++  chrome plugin ftw.
13:21 sri so far i went with showing strength, but they are so bitter i might as well lay back and let them scare away their own users
13:22 marcus I think http://cpansearch.perl.org/src/FLOR​A/Catalyst-Runtime-5.80030/Changes illustrates the biggest problem for the catalyst community well.
13:23 marcus maybe even more so http://cpansearch.perl.org/src/BOB​TFISH/Catalyst-Devel-1.28/Changes
13:25 marcus vlc removed from the app store.
13:26 sri :O
13:26 sri how am i going to watch my peepcode screencasts now?
13:27 marcus airvideo?
13:27 marcus that's wht I use
13:29 sri hmm, i liked having a few right on m iphone
13:31 marcus airvideo lets you convert and add them to the iphone
13:31 sri ah
13:32 marcus sick beard is so fricking cool
13:32 marcus and I get 30mbit/s downloading from supernews.com :)
13:32 sri Oo
13:39 sri reminds me to find a few new shows to watch
13:41 marcus http://www.channel4.com/pro​grammes/famous-and-fearless :D
13:41 sri they really need to start some new scifi shows
13:41 sri oh my
13:42 marcus going to try to get through the second season of fringe
13:42 sri fringe gets really crazy towards the end
13:45 stephan48 sri: does the normal daemon use multi threading?
13:52 yko stephan48: no
14:10 curt joined #mojo
14:32 tempire marcus: any particular reason you're using a callback key, as opposed to just making the callback sub always be the last param?
14:34 marcus tempire: I just figured the api $provider, %params was more sane
14:34 marcus tempire: given that error handling is a sub as well.
14:34 marcus I was inspired by the jquery apis
14:41 tempire hmm.
14:41 tempire sri: where does $CLIENT (Mojo::Client->singleton) get assigned?
14:42 tempire oh
14:42 tempire nevermind
14:42 tempire doh
14:48 marcus tempire: it might be sensible to make cb an alias to callback tho, since sri uses cb all over the place
14:49 sri actually not anymore
14:49 sri i can only think of one place
14:49 sri now it's mostly on_*
14:50 marcus on_sucess and on_failure is pretty too
14:50 marcus success
14:50 tempire much prettier
14:50 * sri nods
14:51 tempire bug!
14:52 tempire sort of
14:52 marcus hmm?
14:53 tempire not related to oauth2..
14:53 tempire resetting ->cert & ->key doesn't have an effect if the connection is kept alive
14:53 tempire but that may only be a result of me using the ioloop singleton
14:54 sri umm
14:54 sri of course it doesn't have an effect
14:55 sri if you keep the connection alive it will be kept alive
14:55 tempire Ah, I suppose that's what keep_alive_timeout is for
14:56 tempire Still, it seems to me that resetting cert & key should do that for you.
14:56 tempire making a new connection, I mean.
14:58 sri it should be common sense
14:59 sri you either have keep alive or fresh connections
15:00 sri connecting connections and certs/keys would be tons of code
15:01 sri in the end you wouldn't have attributes on Mojo::Client
15:02 sri possibly wrapper classes around Mojo::Transaction to hold cert and key
15:02 sri the whole flow would change
15:02 sri no simplicity if you wanted to do it "right"
15:03 tempire What about looking in {_cs} to see if tls_cert & tls_key has changed...if it has, use a new_connection
15:03 tempire (In Mojo::Client->_connect)
15:03 sri ugly
15:04 sri bandaid fix for a bandaid fix
15:06 sri if you wanted to go there cert and key should have never been attributes
15:07 sri there are so many special cases i can think of where your change would go wrong
15:08 sri remember things might be async
15:08 sri redirect and disconnect for example in another request
15:10 sri once you set cert/key, there is no going back
15:10 sri you should just use a fresh client instance
15:11 sri tempire: see where i'm going?
15:11 tempire Yeah, I'm grumbling internally for.  Give me a moment :)
15:11 tempire for *a bit.
15:11 sri :)
15:12 perlrocks Twitter: "@marcusramberg hi, marcus! We use this https://github.com/likhatski​y/Mojolicious-Plugin-OAuth/ Check out :)" --sharifulin http://twitter.com/shariful​in/status/23758864172187650
15:12 sri actually isolating clients if you want a secure environment is not a bad thing imo
15:13 sri fresh client for a secure session
15:13 tempire It makes more sense.
15:14 sri remember all sessions in a client also share the same cookie jar
15:15 marcus heh
15:16 sri and we really don't need more complexity in Mojo::Client :D
15:16 MojoGuest311 joined #mojo
15:16 MojoGuest311 From: http://www.google.co.uk/search?sourceid=c​hrome&amp;ie=UTF-8&amp;q=html5+irc+client (1 hits)
15:17 MojoGuest534 joined #mojo
15:17 MojoGuest534 From: http://cinema-revolution.chatango.com/group (1 hits)
15:17 sri i'd rather remove features than add more
15:17 MojoGuest534 SUDO
15:17 MojoGuest534 what is this
15:17 purl this is true
15:17 MojoGuest534 left #mojo
15:17 MojoGuest311 left #mojo
15:18 * sri kisses purl
15:18 * purl swoons!
15:18 MojoGuest858 joined #mojo
15:18 MojoGuest858 From: http://cinema-revolution.chatango.com/group (3 hits)
15:18 MojoGuest858 left #mojo
15:20 MojoGuest180 joined #mojo
15:20 MojoGuest180 From: http://st.chatango.com/flash/group.swf?re​f=&amp;gn=cinema-revolution.chatango.com (1 hits)
15:20 MojoGuest180 left #mojo
15:24 tempire dzil release is my favorite
15:24 yko is it so good? at first loog it feels terrible
15:24 tempire not for me.  it's so easy I get giddy
15:24 yko *look
15:25 Alias_ joined #mojo
15:26 marcus SUDO MAKE ME A SANDWHICH
15:26 marcus also, hi Alias_
15:26 sri !
15:27 * sri wonders why purl has nothing to say about that
15:27 ashleydev joined #mojo
15:27 sri purl: SUDO MAKE ME A SANDWICH
15:27 purl sri: excuse me?
15:27 marcus how do you get caller name in a factoid.
15:28 marcus purl: SUDO MAKE ME A SANDWICH is <reply> \You  are not in the sudoers file. This incident will be reported.
15:28 purl ...but sudo make me a sandwich is <reply>make purl's own fucking sandwich...
15:28 * sri doesn't remember
15:28 yko marcus: http://www.infobot.org/guide-0.43.x.html
15:28 purl rumour has it http://www.infobot.org/guide-0.43.x.html is rather broad in coverage
15:28 marcus purl literal sudo make me a sandwich
15:28 purl marcus: huh?
15:28 marcus wtf
15:29 Alias__ left #mojo
15:29 marcus purl, no SUDO MAKE ME A SANDWICH is <reply> \You  are not in the sudoers file. This incident will be reported
15:29 purl OK, marcus.
15:29 marcus purl: SUDO MAKE ME A SANDWICH
15:29 purl marcus: excuse me?
15:29 marcus member:purl: SUDO MAKE ME A SANDWICH!
15:30 perlrocks Twitter: "Mojolicious-Plugin-SslAuth 0.01 by Glen Hinkle - http://frepan.org/~tempire/Moj​olicious-Plugin-SslAuth-0.01/" --cpan_new http://twitter.com/cpan_ne​w/status/23763437796466688
15:30 jamesw i prefer the insulting message from sudo
15:31 jamesw messages
15:31 jamesw silly purl
15:31 purl LA LA LA LALAL CAN'T HEAR YOU LALALA
15:32 * marcus spanks purl
15:32 purl oh, marcus, you just want to make my fanny turn pink and watch me cry!
15:36 jamesw heh
15:37 jamesw deliberately exploiting the double meaning there i presume
15:37 tempire It's a shame that search.metacpan.org is so slow to update
15:38 ashleydev left #mojo
15:46 snearch left #mojo
15:58 yko purl doesn't allow to escape 'me' :(
15:58 purl yko: sorry...
16:09 tempire left #mojo
16:42 s0va question
16:42 purl question is what do we do with the people who can't make the requirements.
16:43 s0va sub startup  in base app package should be called once per daemon startup.
16:43 s0va in my case is called at each http request...
16:43 s0va mojo 1.0.
16:43 yko do you have --reload enabled?
16:43 s0va is this feature or is just comment
16:43 s0va yep.
16:43 s0va oh :) let's see without --reload
16:43 yko then your daemon actually restarts each request
16:44 s0va yko: you're right!
16:44 yko once per daemon startup => --reload
16:44 s0va thanks!
16:44 yko try to feel it :)
16:44 s0va i must say...
16:44 s0va that i ***LOVE*** perldoc plugin
16:44 yko me too
16:44 s0va i fucking admire it!
16:45 s0va now i can put REST interface documentation directly in code...
16:45 s0va this is just fucking awesome!
16:46 s0va sri: i have a proposition for ioloop api ...
16:46 s0va i'd add sig() and sig_chld() method :)
16:46 s0va sig would just set $SIG{$name} = $cb
16:47 s0va sig_chld() would set $SIG{CHLD} = $cb
16:47 yko why do you need it in ioloop?
16:47 sri s0va: bad idea, it will only make running multiple event loops harder
16:48 sri and perl signal handling sucks anyway
16:48 yko and it can damage hypnotoad, isn't it?
16:48 sri hypnotoad could just use it
16:48 sri but there is no gain
16:48 sri only disadvantages
16:48 s0va that would be nice for portability :) as i said, i'm porting ioloop to anyevent and that would make it possible to run hypnotoad in anyevent without code modification
16:49 sri hmm
16:49 sri ok, now thats a better case
16:49 s0va becouse i'm able to run daemon in anyevent without modifications :)
16:50 s0va hypnotoad registers multiple sighandlers...
16:50 s0va and i guess that you can't run multiple hypnotoads in same perl process anyway...
16:50 jamesw wouldn't the code example for POE work with AE too
16:50 yko "
16:50 jamesw just do AnyEvent->one_event on each ioloop tick
16:51 sri it would, but he replaced ioloop with AE
16:51 s0va jamesw: i've implemented the whole ioloop in anyevent; daemon runs slightly faster (reqs/sec), but it has 2-3 times lower latency than ioloop.
16:52 s0va i'm not saying that ioloop is bad, but as i said before, but my goal is to run multiple mojo daemon processes with multiple mojo apps in the same perl process as part of other anyevent based application
16:53 s0va so i'm not proposing nothing that would break mojo... i think that is one of the best things that happened to perl in last 10 years :)
16:54 s0va the big gain of anyevent is excellent ssl and ipv6 support
16:54 s0va :)
16:54 sri having a Mojo::IOLoop::AnyEvent surely wouldn't hurt
16:54 s0va it just fucking works :)
16:55 s0va sri: yep, my plan is to create something like that; and to copy it's methods into mojo::ioloop namespace
16:55 jamesw s0va good stuff
16:55 s0va your idea of IOLOOP_IMPL env variable is also great :)
16:56 jamesw how about the other way round?
16:56 jamesw is AnyEvent::Impl::IOLoop practical?
16:56 s0va idea of sig() and sig_chld() is not intrusive... however, ae has sig() methods which could be then handled by EV.
16:57 s0va i've tried and it actually works fucking great :)
16:58 s0va so my idea is to leave Mojo::IOLoop as is (well, add sig methods), but but create alternative using ae and create new Mojo::Server::Daemon subclass which just loads AE loop implementation.
16:58 s0va so user could decide to use plan mojo, without dependecies, or anyevent powered loop.
16:59 jamesw so that would mean i could, for example, use Mojo inside Twiggy?
16:59 * sri tests Mojo::IOLoop->on_signal(TERM => sub {...})
16:59 s0va at the same time this would enable to run mojo daemon inside AE which would benefit to AE with decent webserver/http client implementation
16:59 s0va jamesw: is twiggy AE based?
16:59 jamesw yeah
17:00 s0va jamesw: if that's true, answer would be yes :)
17:00 jamesw its the Plack AnyEvent web server
17:00 s0va jamesw: are there some parts written in c?
17:00 jamesw of Twiggy? no, perhaps you're thinking of Fearsum?
17:01 jamesw Feersum even
17:01 s0va jamesw: yesterday i've been reading about plack...
17:02 s0va can you tell me in few words what plack actually is?
17:02 s0va it's a webserver interface ...
17:02 s0va so is http... what are the benefits? i'm completely clueless about this.
17:02 sri it's very similar to CGI
17:02 jamesw its basically a protocol that lets you connect arbitrary web server with arbitrary web app
17:02 sri but perl specific
17:03 sri you get a hash of env vars and an io handle
17:03 jamesw if i write my app to use plack or some framework supporting it i can run it under any plack enabled web server, fastcgi, apache, starman, blah blah
17:03 sri then return a status, a bunch of headers and some content
17:03 jamesw or a handle
17:03 purl a handle is, like, the right place for it, for sure
17:04 sri see t/mojo/psgi.t for an example
17:04 s0va so cool stuff like websocket is possible with psgi?
17:04 jamesw yeah
17:04 sri no
17:04 sri you bypass psgi completely
17:05 s0va sri: i'm going to check psgi.t and stop asking st00pid questions...
17:05 s0va oh, twiggy can use http://search.cpan.org/~kazuho/HTTP-​Parser-XS-0.13/lib/HTTP/Parser/XS.pm
17:07 jamesw yeah, doesn't require it though
17:12 ashleydev joined #mojo
17:12 jamesw s0va: is your work on github somewhere?
17:13 s0va jamesw: not yet becouse it's not yet ready for public.
17:13 s0va jamesw: currently only mojox::run is
17:14 s0va jamesw: i've only spent 2 hours for porting....
17:14 s0va currently only listen, connect, drop and on_* stuff works.
17:14 s0va dns resolving is currently not supported. but ae has cool dns resolver too :)
17:16 s0va tonight i'm going in mountains... i'll be back tomorrow afternoon when i'll try to code something. i was really busy this week in the office... :(
17:16 sri s0va: actually, are you sure you need signal handling for hypnotoad?
17:16 s0va you're doing signal handling ...
17:16 s0va you register TTOU hup and stuff...
17:17 sri the manager process doesn't run an event loop
17:17 sri workers don't have any signal handlers
17:17 s0va oh :)
17:17 yko sri++
17:17 s0va but it registers sigchld ...
17:18 sri in the manager process
17:18 s0va i'm registering sigchld in mojox::run too :)
17:18 s0va oh.
17:18 s0va does hypnotoad run accept loop?
17:18 sri workers do
17:18 yko s0va: https://github.com/kraih/mojo/blob/mas​ter/lib/Mojo/Server/Hypnotoad.pm#L453
17:20 s0va oh, i wasn't aware of that.
17:20 GitHub166 joined #mojo
17:20 GitHub166 mojo: master Sebastian Riedel * d12a690 (1 files in 1 dirs): fixed typo - http://bit.ly/gMQCqC
17:20 GitHub166 left #mojo
17:22 ashleydev left #mojo
17:25 s0va http://search.cpan.org/~mlehmann/AnyEve​nt-5.3/lib/AnyEvent.pm#SIGNAL_WATCHERS
17:25 s0va "This watcher might use %SIG (depending on the event loop used), so programs overwriting those signals directly will likely not work correctly."
17:26 s0va hm... i don't know...
17:27 s0va maybe just would be okay to implement on_sig(name => $cb) but ioloop wouldn't need to be running...
17:27 s0va yeah, signal handling is tricky business...
17:27 s0va you just can't register more of them for single signal in single process ...
17:28 sri yea, it's screwed in perl
17:28 ashleydev joined #mojo
17:29 s0va ae has also "portable" chld watchers...
17:29 s0va so multiple parts of code can register cb for specified child pid.
17:30 s0va that's why i also prosposed special on_sigchld ($pid => $cb)
17:30 s0va you could install SIG{CHLD} to some wrapper sub.
17:30 sri thats nothing mojolicious itself would benefit from :/
17:30 s0va true :)
17:31 s0va i could register sigchld in mojox::run in a more portable way :)
17:31 s0va right now i kidnap SIG{CHLD} completely
17:32 s0va well, i'm off :)
17:32 s0va thanks for perldoc render again! :))
17:32 sri have fun in the mountains :)
17:33 * sri still favors parallel event loops
17:59 marty_ Any best practices for handling http Cache-Control headers?  I want to make images "far future expire".  Is Mojo::Headers the best approach?
18:00 marty_ is now known as marty
18:00 jamesw why not use last-modified?
18:01 marty Yep, thought about that.  I'm just not sure how to make it apply only to images.  (or a few other files)
18:04 yko im not sure if in 'after_static_dispatch' you still can modify headers
18:04 yko but in case if yes, i think that's right place for doing such tricks
18:05 marty Thank you yko, good suggestion. I'll see if that works.  If not, I guess I can run ML behind nginx and let it do the headers stuff
18:05 yko marty: second way is much better
18:06 yko as it was told before, mojolicious is for rendering dynamic content
18:06 yko from other hand while you expect 20 req/h it doesn't matter much
18:07 marty :)  I hope I have a *few* more requests than that.  :)
18:07 sri a wiki recipe would be nice
18:08 sri for caching static files like images,js and css with nginx
18:08 yko than you definitely need nginx :)
18:08 marty If I come up  with someting usable I will definitely turn it into a wiki page
18:08 yko sri: about setting up headers for static?
18:08 sri nono, an nginx rule for caching only static files
18:08 sri someone pasted one some time ago, but i lost it :(
18:13 yko marty: i think it should looks just like that https://gist.github.com/771036 but not tested it though
18:13 yko wiki page on that should be good for seo :)
18:17 marty Thank you yko.   I added that to my goodies box.  I'll play around with it and maybe I'll come up with something good.  :)
18:18 ashleydev left #mojo
18:24 yko uff. adding default headers to request from mojo::client is a hard stuf
18:34 ashleydev joined #mojo
18:34 MojoGuest93 joined #mojo
18:34 MojoGuest93 From: http://www.google.com/search?sourceid=c​hrome&amp;ie=UTF-8&amp;q=websocket+demo (4 hits)
18:34 MojoGuest93 left #mojo
19:45 garu guys? infinite loop in 64 bit
19:45 * garu pastes
19:46 garu http://paste.scsys.co.uk/81466
19:49 garu if I create an app like this, then fire up the daemon and try http://localhost:3000, I get this => http://paste.scsys.co.uk/81467
19:52 sri garu: seems shagadelic() is broken
19:53 alnewkirk we're still using that
19:54 sri it has become a novelty feature like a year ago
19:54 alnewkirk ah
19:55 sri none of the documentation mentions it since then
19:57 GitHub30 joined #mojo
19:57 GitHub30 mojo: master Sebastian Riedel * 065b279 (2 files in 2 dirs): fixed shagadelic function of Mojolicious::Lite - http://bit.ly/hvkDEE
19:57 GitHub30 left #mojo
19:59 garu sri: I know, I thought it was just an alias
19:59 garu sri++
20:14 ashleydev left #mojo
20:50 josh left #mojo
20:51 josh joined #mojo
21:20 GabrielVieira left #mojo
21:33 alnewkirk left #mojo
21:50 stephan48 http://home.stejau.de:3555/ somehow i dont get how this exception trace matches the errors?
22:07 garu odd
22:08 garu where's the rest of the template?
22:15 stephan48 :)
22:16 stephan48 http://abc123.pastebin.com/dbZRvaMp
22:16 stephan48 my templates
22:17 stephan48 http://abc123.pastebin.com/f1UBW0km updated
22:19 yko looks like stack trace doesn't follow include
22:20 stephan48 jap
22:20 stephan48 still i dont get where in my code the error could be :)
22:22 stephan48 ah now
22:25 stephan48 http://abc123.pastebin.com/diff.php?i=zDuyUmGw <- seem to have solved it
22:27 garu stephan48: the change on line 25 should have been enough
22:28 stephan48 ye maybe
22:28 garu I mean, you closed a tag that was not there in the first place :)
22:28 stephan48 please also see line 32
22:28 garu right
22:28 stephan48 the i wrote $ instead of %
22:28 garu that too :)
22:29 stephan48 which missed a } to the parser ;)
22:29 yko uff. that's bad. ^(
22:29 stephan48 thanks :)
22:29 stephan48 in vim they are colored all same in data area :)
22:29 yko stephan48: use mojo.vim :))
22:29 garu ++
22:29 stephan48 where to get?
22:29 yko https://github.com/yko/mojo.vim
22:30 yko better from github - latest version
22:30 garu I really with I could get a scyntilla highlighter plugin for mojo
22:30 yko but there's VimBall on vim.org
22:30 garu so I could plug it into Padre::Plugin::Mojolicious
22:30 garu s/with/wish/
22:31 yko afaik SciTE syntax files are not so hard to write
22:31 garu yko: really? I couldn't even find the documentation for it :P
22:31 yko hm
22:33 garu a simple "change highlighter from Perl5 to HTML after __DATA__" should be enough I guess
22:33 garu then tweaking an EP/EPL highlighter little by little
22:33 yko don't want to dive there :) i had enough hacks arround vim before i get it to work right
22:34 ashleydev joined #mojo
22:34 garu heh
22:35 yko but then i made it really clean and readable
22:35 yko mojo.vim highlightes html inside data section, and then perl inside html :)
22:35 stephan48 also with external templates?
22:36 yko stephan48: __DATA__ highlighting is optional. html.ep/html.ep is on by default
22:37 yko see readme, there's 3 variables that allow you to configure mojo.vim
22:38 garu yko: where can I find information about the vim highlighting engine? I might be able to spawn a Padre::Plugin::Highlighter::Vim or something, so we can use vim to color Padre output
22:40 yko uhmmm. http://vimdoc.sourceforge.net/htmldoc/syntax.html => docs
22:40 garu thanks
22:41 yko but i'm not sure you are able to use it for highlighting in other editors :\
22:49 alnewkirk joined #mojo
22:52 yko garu: some promo screenshots  http://bit.ly/f5f5ka http://bit.ly/gmACCS :p
22:53 garu yko++
22:54 stephan48 (cpanm + git checkout)++
22:55 alnewkirk left #mojo
22:57 ashleydev left #mojo
23:16 zakame left #mojo
23:20 kaare left #mojo
23:21 alnewkirk joined #mojo
23:54 stephan48 could i use IO Loop to check if a connection is still established?
23:57 stephan48 the saied connection is a tcp con to a background deamon which serves data to my app

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