Camelia, the Perl 6 bug

IRC log for #mojo, 2011-07-19

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

All times shown according to UTC.

Time Nick Message
00:04 Alias joined #mojo
00:18 metaperl left #mojo
00:37 xantus[] left #mojo
00:38 xantus[] joined #mojo
00:39 xantus[] it sucks when gnu-screen crashes
00:39 xantus[] ..caused by a /quit in irssi
00:47 ka2u_ left #mojo
00:47 ka2u joined #mojo
01:04 mspo xantus[]: never seen that before
01:04 mspo xantus[]: try tmux :)
01:19 metaperl joined #mojo
03:03 alnewkirk joined #mojo
03:09 Drossel left #mojo
03:13 Kulag joined #mojo
03:21 Kulag left #mojo
03:30 Kulag joined #mojo
03:37 Kulag left #mojo
03:37 Kulag joined #mojo
03:42 Drossel joined #mojo
03:44 Kulag left #mojo
03:47 Drossel left #mojo
04:09 Drossel joined #mojo
04:15 Kulag joined #mojo
04:15 Drossel left #mojo
04:21 Drossel joined #mojo
04:21 Kulag left #mojo
04:30 Drossel left #mojo
04:50 maluco left #mojo
04:50 maluco joined #mojo
04:55 sri garu: that's of course not a bug
04:57 Kulag joined #mojo
04:57 sri diegok: why can't you do that with on_start?
05:01 Drossel joined #mojo
05:03 Kulag left #mojo
05:07 Drossel left #mojo
05:09 Kulag joined #mojo
05:13 Drossel joined #mojo
05:14 Kulag left #mojo
05:20 Kulag joined #mojo
05:22 Drossel left #mojo
05:30 Drossel joined #mojo
05:30 Kulag left #mojo
05:58 AmeliePoulain joined #mojo
06:04 garu sri: nope, not a bug :)
06:06 garu sri: any chance to make $element->[0] return $element when it's not an actual collection?
06:06 garu I don't see $element->[0] being used in any other way
06:07 sri garu: if you've got an idea how to do it
06:07 Rhaen left #mojo
06:07 sri the whole thing would be pointless however if $element did not behave just like a collection
06:07 garu sri: fair enough :) I'll have a look and see if I can cook something up
06:08 sri $element->each needs to work too
06:08 garu of course
06:08 garu and it would be called just once
06:08 sri ye
06:08 garu cool
06:09 garu :)
06:09 sri not sure if it's possible
06:10 garu me neither, but it got in my way often enough that I'm willing to try
06:10 sri :)
06:12 sri the fact that $element *is* and arrayref is a bit unfortunate
06:13 sri short term fix could be changing it to a scalar ref containing an arrayref or so
06:13 sri then you would at least get an error
06:24 garu that would be better, yeah - though I still prefer the long term fix :)
06:48 arthas joined #mojo
06:53 Drossel left #mojo
06:55 Kulag joined #mojo
07:02 Kulag left #mojo
07:13 Kulag joined #mojo
07:19 Kulag left #mojo
07:20 Kulag joined #mojo
07:31 spleenjack joined #mojo
07:42 spleenjack left #mojo
07:42 spleenjack joined #mojo
07:54 sugar joined #mojo
07:57 d4rkie joined #mojo
07:58 d4rkie left #mojo
08:02 baton8 left #mojo
08:05 d4rkie joined #mojo
08:17 Alias left #mojo
08:19 Foxcool joined #mojo
08:53 Drossel joined #mojo
08:54 Kulag left #mojo
09:00 alnewkirk left #mojo
09:09 preflex left #mojo
09:09 d4rkie left #mojo
09:10 d4rkie joined #mojo
09:11 preflex joined #mojo
09:14 Drossel left #mojo
09:15 Kulag joined #mojo
09:31 plu in which docs can I find infos about that default screen that's shown on a 404 and how I disable that for production? I'm a bit lost int he docs and I seem to grep for the wrong keywords :(
09:48 crab plu: i don't know where in the docs to find it, but you can create your own templates/{exception,not_found}.​{development,production}.html.ep to override the built-in ones.
09:49 plu crab: thanks :)
09:50 plu I also found this to be working: BEGIN { $ENV{MOJO_MODE} = 'production'; }
09:50 plu so it does not deliver the verbose development version of the templates
09:51 crab it delivers templates/$thingy.$mode.html.ep
09:51 crab where thingy is exception or not_found, and mode is whatever mode you're in.
09:52 crab have you seen the rainbow-puking velociraptor yet?
09:52 sri plu: you're supposed to switch away from development mode in production
09:52 sri servers like hypnotoad do that automatically
09:52 plu crab: yep, saw it :)
09:52 plu sri: ok, thanks :)
09:54 crab are dinosaurs frowned upon in dubi?
09:54 crab er, dubai
09:54 purl er, dubai is in the UAE.
09:54 crab purl, forget er, dubai
09:54 purl crab: I forgot er, dubai
09:59 d4rkie left #mojo
10:07 sri http://mojolicio.us/perldoc/Mojolic​ious/Guides/Rendering#Mode_Specific​_exception_And_not_found_Templates
10:19 plu crab: dinosaurs are melting in dubai :)
10:19 fmerges joined #mojo
10:19 plu sri: thanks, again :)
10:30 Kulag left #mojo
10:34 Kulag joined #mojo
10:40 Kulag left #mojo
10:51 preflex left #mojo
10:53 preflex joined #mojo
11:07 ZadYree left #mojo
11:12 arthas left #mojo
11:13 arthas joined #mojo
11:44 tabbi joined #mojo
11:44 tabbi left #mojo
11:45 Kulag joined #mojo
12:12 vel joined #mojo
12:17 fmerges left #mojo
12:17 vel left #mojo
12:19 sri hmm, rumor has it tomorrow lion will be released... just like the last two weeks...
12:28 yko woops. http://mojolicio.us/perldoc?/Mojo
12:28 yko url is invalid, for sure, but why 500?
12:32 spleenjack left #mojo
12:33 spleenjack joined #mojo
12:35 sri yko: because the raptor wants it that way
12:50 shonorio joined #mojo
13:13 crab hi, fellow mojonators.
13:28 * Kovensky wonders what would make cpanm -S ask for the sudo password for *every* *single* *package* ;_;
13:29 Kovensky sri: the last rumor I heard about was that it'd be released "late this week"
13:30 * Kovensky is still waiting on the release so the hackintosh people can lift their silly "pirates with honor don't install golden masters" ban
13:39 metaperl left #mojo
13:48 AmeliePoulain left #mojo
13:48 abra_ left #mojo
13:48 abra joined #mojo
14:09 mspo how can I handle arrays in templates?  I wrote a helper that returns one
14:11 crab what do you mean, "handle" arrays in templates?
14:11 crab they're arrays. handle them however you handle arrays anywhere else.
14:12 stephan48 mspo: remeber that perl can bse used in ep(l)
14:12 stephan48 remember*
14:12 sh9 joined #mojo
14:12 mspo oh okay, so just create a begin/end block and go for it?
14:14 crab what is the begin/end block for?
14:15 mspo for creating like a function that generates content?
14:17 crab um, ok, if that's what you want.
14:20 vel joined #mojo
14:30 abra left #mojo
14:31 alnewkirk joined #mojo
14:33 mspo what's the difference between % and <% ?
14:34 crab % is a perl line, and <% is an inline perl expression. i think you should read Mojolicious::Guides::Rendering
14:34 stephan48 % goes without %> but you will probably need a ; at the end
14:34 sri the guides explain that in great detail
14:35 stephan48 ye
14:35 mspo oh, I was reading Mojo::Template
14:35 sri not a good idea
14:35 sri it is the low level api
14:36 sri and doesn't contain half of what high level templates provide
14:36 sri guides first, reference documentation second
14:38 alnewkirk is now known as moredeep
14:43 mspo looks like using % is just less typing
14:49 shonorio left #mojo
14:49 shonorio joined #mojo
14:51 abra joined #mojo
14:54 metaperl joined #mojo
14:55 Kovensky hm, is there a way to do auto-hot-deployment?
14:56 Kovensky if I use hypnotoad I need to manually call it when I want it to reload code; I was looking for something that needed less alt-tabbing to a console window
14:58 stephan48 you could place your code in a repo and make a hook, then on commit you make git run the command for hot deployment?
15:00 sh7 joined #mojo
15:01 Kovensky kinda overcomplicated
15:01 Kovensky I'm just making a quick hack
15:03 sh9 left #mojo
15:07 sri Kovensky: hypnotoad will prolly never do auto hot deployment without being asked to, way too dangerous
15:07 sri just imagine you're in the middle of syncing the repository and it notices a changed file, now it would hot deploy half an updated app
15:08 sri the admin should always be in control on a production machine
15:10 sri commit hook would be the sane solution
15:12 sri actually i'm a little worried we made hot deployment look too simple :D
15:15 sri Kovensky: you're not abusing hot deployment for development, are you?
15:16 sri because we have morbo for that, which is a lot better for development
15:27 Akron joined #mojo
15:41 abra left #mojo
15:41 abra joined #mojo
15:46 diegok sri: ^ I can't see the response on on_start
15:48 sri diegok: i asked what would be the point
15:48 sri if i understand you right i'm already doing that stuff in the get command
15:49 diegok sri: ok, I would like to log every redirect the UA follows.
15:49 diegok my max_redirects is 3 for example. I call get and finally I got what I want, thats fine.
15:51 kaare_ joined #mojo
15:51 diegok I would like to log the redirects. I'm writing to the logger on_start already
15:51 diegok what you are doing in ua->get()?
15:52 diegok sri: Probably I'm not making the point, I'll try to step back and explain again from the start :)
15:55 diegok I have a UA that on_start, calls debug() on the logger with url and some more data. I would like to get this same log on every redirect the UA is following, in my case no more than 3 as per max_redirects.
15:56 diegok What you said is it should be like that?, I can check again, but I thing it wasn't... but... it was really late on a long coding night :)
15:56 Kovensky <@sri> Kovensky: you're not abusing hot deployment for development, are you? <-- yes I was =p
15:56 Kovensky and I didn't know about morbo lol
15:56 Kovensky will try it tomorrow (office closed, didn't bring source)
15:57 marcus :)
15:57 marcus morbo is the shit
15:58 Kovensky btw, I'm not using it in this app, but is there an easy way to make a digest auth header for doing a get request?
15:58 Kovensky I know of Mojolicious::Plugin::DigestAuth but that's for adding digest to your app, not to scrape data protected by digest auth
16:00 sri diegok: on_start gets called for every single one
16:00 sri diegok: see the get command
16:01 sri diegok: try "mojo get -v -r google.com"
16:01 * diegok feeling stupid
16:01 purl feeling stupid is non-productive.  Stop it.
16:01 diegok sweet purl :)
16:01 * sri hugs purl
16:01 purl sri: get off me, you botvert!
16:02 diegok sri: thank you, I'll be back on that later. It was too late I thing :)
16:04 sri Kovensky: nope, we don't have built in digest auth support
16:04 Kovensky I see
16:05 sri personally i find digest rather annoying
16:05 Kovensky there's a POE script I made (yes I regret using POE and it's p. much unmaintainable now) that needed to scrape some digest-protected html; had to write my own digest implementation =p
16:05 crab why is it unmaintainable?
16:06 Akron left #mojo
16:06 Kovensky mostly bad design on my part
16:06 sri many extensions and complicated flow
16:06 Kovensky adding new features became too hard
16:06 Kovensky and when something goes wrong it's hard to debug
16:07 tabbi joined #mojo
16:07 tabbi left #mojo
16:07 sri my preference would always be form auth or basic over https
16:07 sri but i guess you don't have a choice
16:07 xaka joined #mojo
16:08 Kovensky I found it weird that I couldn't find any module on CPAN that generated an HTTP digest hash
16:08 Kovensky maybe I should refactor my code and make it a module
16:08 sri sounds like a good idea
16:08 xaka i want to try to implement simple chat using websockets and i need to send broadcasts messages, but how can i do it with mojo? there only on_message hook, but i need on_open and on_close also
16:09 sri xaka: the action is on_open, and there is on_finish
16:12 xaka hm, but how can i now that the action is from different (new) client? is $self as a Controller always a new reference or it's reused for every request?
16:13 xaka s/now/know/
16:13 sri always fresh
16:13 sri it's really as simple as it looks ;)
16:13 xaka so i can push it into array and i'll be safe, am i correct?
16:14 sri only if you stay single process
16:14 sri if you want to scale with hypnotoad and the like you need a real message queue
16:15 xaka open/message/close model looks simplier than self-maintainable on_open via on_message ;) (feature request)
16:15 sri i have no idea what you just said
16:15 xaka if would be good to have on_open
16:15 sri YOU DO!!!
16:16 * sri blames the language barrier, maybe someone else can explain it better
16:16 xaka oh, my controll'ers action is the on_open, right? and then i just subscribe to on_message
16:17 sri https://github.com/jayferd/balls # rofl
16:18 moredeep left #mojo
16:27 sh9 joined #mojo
16:28 sh7 left #mojo
16:35 sugar left #mojo
16:38 spleenjack left #mojo
16:39 xaka does Mojo::Test support websockets?
16:49 sri no
16:50 sri but feel free to add support
16:53 marcus should be just a thin  wrapper on the client?
16:57 marcus wow, google sucks at making ios apps \o/
17:00 sri marcus: once someone designs a sensible test api, events are hard to test
17:00 marcus sri: it needs to use callbacks I guess?
17:00 sri that's the problem
17:00 sri i doubt you could fit websockets into Test::Mojo at all
17:02 sri since it's not request/response, you have to keep the event loop running
17:02 sri just doesn't fit
17:03 tabbi joined #mojo
17:03 tabbi left #mojo
17:03 sri https://github.com/kraih/mojo/blob/master​/t/mojolicious/websocket_lite_app.t#L167
17:04 sri that's how it's done atm
17:06 xaka i think start should be runned for limited time in case of error in code
17:09 xaka kqueue, epoll and so on depends on installed Perl modules or OS? I mean Mojo uses 3rd party modules in this case or own implementation?
17:11 jamesw OS
17:11 jamesw the modules only install on OSes that have that functionality, of course
17:21 xaka awsome, epoll consumes only 4% cpu with 300 async io (via open2) VS select which consumes 30%
17:26 nuba_ is now known as nu
17:26 nu is now known as nuba
17:47 amoore joined #mojo
17:49 * sri wonders how good bbedit 10 is
17:49 sri looks like they added some textmate features
17:50 sri like bundles
18:07 xaka awsome, runned 2000 async io via open2 (every prints something every second) and checked simple "hello world" HTTP using "ab" - ~7ms per request, amazing. Everything on single core machine :) 20% CPU
18:12 sri hmm, bbedit 10 seems to have lion fullscreen support... sounds very tempting
18:12 * sri pokes marcus
18:39 sh9 left #mojo
18:43 sri https://github.com/enormego/EGOTextMateFullScreen # oh, wow
18:45 stephen joined #mojo
18:50 mspo komodo edit has a vi mode
18:57 * crab ponders what native full screen app support could possibly involve
19:25 moredeep joined #mojo
19:49 moredeep left #mojo
19:51 alnewkirk joined #mojo
19:52 tabbi joined #mojo
19:52 tabbi left #mojo
20:09 amoore left #mojo
20:30 abra left #mojo
21:02 rhaen joined #mojo
21:03 rhaen ho ho ho
21:03 purl Now I have a machine gun!
21:04 rhaen true!
21:07 shonorio left #mojo
21:18 vel left #mojo
21:19 kaare_ left #mojo
21:45 cstamas joined #mojo
21:45 * tempire looks for an apartment without lots of ambient noise
21:45 cstamas hi
21:45 tempire hi
21:46 cstamas I am trying to use mojolicious with plack/fastcgi
21:47 cstamas The goal is to run it as a separate process and let the process answer the queries (somehow with apache)
21:48 cstamas i started a script with plackup
21:49 cstamas and told apache with the fastcgiexternalserver directive to ask plackup, but all I get is this:
21:49 cstamas https://pazmanykartya.ppke.hu/
21:49 cstamas "missing mandatory env param: PATH_INFO" ...
21:50 cstamas can you help me how to move forward?
21:51 cstamas here is the config http://pastebin.com/09nczGep
21:52 xantus[] crab: how goes
21:52 xantus[] crab: get bored of the term stuff?
22:15 Kulag left #mojo
22:15 Kulag joined #mojo
22:44 * tempire wonders how much bandwidth apple has allocated for lion tomorrow
22:50 Kulag left #mojo
22:54 Kulag joined #mojo
22:56 Foxcool left #mojo
23:50 metaperl left #mojo
23:54 xxtjaxx_ Hi! If I want to use Config::Auto to save/retrieve my configuration from a config file should I do this in the script created by mojo generate app or in the library?
23:59 marcus sri: woot

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