Camelia, the Perl 6 bug

IRC log for #mojo, 2011-03-17

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

All times shown according to UTC.

Time Nick Message
01:09 tempire It never occurred to me that one could rebless a perl object into another class.
01:09 tempire That's just neat.
01:17 xris left #mojo
02:48 GitHub151 joined #mojo
02:48 GitHub151 mojo: master Sebastian Riedel * fc5894e (3 files in 3 dirs): fixed JavaScript/CSS bug in Mojo::DOM - http://bit.ly/hrlORa
02:48 GitHub151 left #mojo
03:08 sherr left #mojo
03:08 sherr joined #mojo
03:13 Exodist left #mojo
05:12 giwi joined #mojo
05:22 giwi left #mojo
06:09 Foxcool joined #mojo
06:25 koban joined #mojo
06:43 marcus Sri: does the async resolver work with dns round robin?
06:51 kaare joined #mojo
06:54 minimalist left #mojo
07:07 ysyrota joined #mojo
07:43 Christian joined #mojo
07:43 Christian morning
07:47 fhelmber_ joined #mojo
07:48 fhelmbe__ joined #mojo
07:48 fhelmber_ left #mojo
07:58 cosmincx joined #mojo
08:10 breaker313 joined #mojo
08:16 Foxcool left #mojo
08:27 Foxcool joined #mojo
08:33 sherr left #mojo
08:35 Foxcool left #mojo
08:39 sherr joined #mojo
08:42 crab marcus: what do you mean, "work with"?
08:46 Foxcool joined #mojo
08:51 marcus crab: seems it always picks the first 'a' record rather than a random one.
08:54 sherr left #mojo
09:00 sherr joined #mojo
09:05 spleenjack joined #mojo
09:06 sherr left #mojo
09:06 sherr joined #mojo
09:30 Foxcool left #mojo
09:30 crab yeah.
09:33 ver joined #mojo
09:37 snearch joined #mojo
09:39 Debolaz Is there an appropriate way to throw an exception in an action or will "die" do?
09:40 moritz die is an appropriate way
09:40 moritz it will get caught, and the exception template will be rendered
09:41 Debolaz Its not like Catalyst, where the application will just happily keep running even though you're dying a horrible death?
09:43 moritz have you never accidentally caused an exception in a controller method?
09:44 Debolaz I'm brand new to the world of Mojo.
09:46 ok22_ left #mojo
09:47 Debolaz And besides, I've done plenty of things in Catalyst where the resulting HTML page does not give a good indication of what code is executed under the hood. For all I know, Mojo catches the exception, keeps executing all code, then renders an error template.
09:48 moritz "keeps executing all code" -- which code do your refer to?
09:48 Debolaz In the route chain.
09:50 moritz so far I haven't chained routes, so I don't know, but I'd be surprised if it did
09:51 crab Debolaz: if you say die, it dies
09:51 crab if you say "jump", it dies too. well, unless you actually have a sub called jump.
09:51 Debolaz Well, that's good to know.
10:18 dotan joined #mojo
11:07 cxreg sub jump { "how high?" }
11:07 GitHub117 joined #mojo
11:07 GitHub117 mojo: master Sebastian Riedel * 195c0d3 (2 files in 2 dirs): changed lookup method in Mojo::IOLoop to pick records randomly - http://bit.ly/eeQGQW
11:07 GitHub117 left #mojo
11:07 sri marcus: now it does
11:12 fmerges joined #mojo
11:13 GitHub179 joined #mojo
11:13 GitHub179 mojo: master Sebastian Riedel * 3eb0828 (1 files in 1 dirs): cleanup - http://bit.ly/ijabiL
11:13 GitHub179 left #mojo
11:18 sri oh damn...
11:20 sri marcus: round robin dns is server side, not client
11:20 sri the server randomizes results
11:23 sri i'm not sure randomizing it client side is smart
11:25 sri it could be counterproductive
11:25 sri marcus: where did you encounter non random lists of addresses?
11:34 snearch left #mojo
11:52 koban left #mojo
11:52 koban joined #mojo
12:12 baton8 joined #mojo
12:23 perlrocks Twitter: "U ー, indeed the ability of the system before_filter I want to Mojolicious" (ja) --shiba_yu36 http://twitter.com/shiba_yu​36/status/48358868962643968
12:38 kmx joined #mojo
12:52 koban left #mojo
12:53 koban joined #mojo
12:55 perlrocks Twitter: ""Mojolicious API Reference" has been successfully translated into Japanese http://dlvr.it/KZmCZ" (ja) --hiraba_reader http://twitter.com/hiraba_rea​der/status/48366872248332288
13:01 perlrocks Twitter: "Wow, the japanese translation of the #mojolicious documentation is just amazing. http://t.co/Z9l6xID #perl" --kraih http://twitter.com/kraih/status/48368482605211648
13:07 sri guess we'll have a release later
13:07 sri some of the Mojo::DOM bugfixes should get out there
13:11 koban left #mojo
13:11 koban joined #mojo
13:22 GitHub168 joined #mojo
13:22 GitHub168 mojo: master Sebastian Riedel * 5f9f2cc (1 files in 1 dirs): release preparation - http://bit.ly/iic09M
13:22 GitHub168 left #mojo
13:22 sri 1.14 tagged
13:24 perlrocks Twitter: "Mojolicious 1.14 by KRAIH - http://frepan.org/~kraih/Mojolicious-1.14/" --cpan_new http://twitter.com/cpan_ne​w/status/48374266789507072
13:26 perlrocks Twitter: "Released #mojolicious 1.14 with a few important bugfixes, enjoy! :) #perl" --kraih http://twitter.com/kraih/status/48374718906114048
13:36 sri Debolaz: up to you, don't think we have a best practice for that yet
13:37 sri you could also just have one action and a helper to fetch the data
13:37 Debolaz Right now, chaining seems like a natural way to do it.
13:37 marcus Sri: i was just asking. If it happens server side, I agree it should not be done in the client.
13:37 sri personally i don't like following chains
13:37 Debolaz Well, those methods are "helpers", its just convenient to chain them in the routing call itself.
13:37 * marcus is sick today :/
13:38 sri that's what you get for abusing sri!
13:38 Debolaz But unlike Catalyst, it seems fairly easy to switch between the two alternatives without rewriting any significant amount of code.
13:38 marcus Actually, that is what I get for having children in daycare.
13:39 sri i mean mojolicious style helpers
13:39 sri Debolaz: did you read the guides yet?
13:40 Debolaz Working through named routes now.
13:40 sri ok, i think it was rendering that had more information about helpers
13:40 sri they should have been mentioned in the lite tutorial too
13:42 Debolaz Helpers are essentially just methods though?
13:43 Debolaz On the controller.
13:43 sri kinda yes
13:43 sri but global
13:44 sri they are available on all controllers and in templates
13:45 zamolxes joined #mojo
13:46 zamolxes hi. Apparently I need to add LDAP auth & authz in a mojo app. Any clues on how to start working on this? Thanks
13:46 Debolaz I'm not really a fan of that kind of structure. A little bit non-OO-ish.
13:47 sri Debolaz: but convenient
13:47 purl convenient is still convenient
13:47 sri nobody likes the stash either, but it works well
13:48 Debolaz A stash isn't necessarily horrible. Its certainly not the biggest problem I have with Catalyst.
13:48 kaare left #mojo
13:49 marcus It is a global hash tho.
13:50 zamolxes ldap + mojo? anyone used it? :)
13:54 perlrocks Twitter: "[Perl] [mojolicious] / Mojolicious-API-% E3% 83% AA% E3% 83% 95% E3% 82% A1% E3% 83% AC% E3% 83% B3% E3% 82% B9 http:/ / htn.to/Cw9VrN" (ja) --tyamaguc07 http://twitter.com/tyamaguc​07/status/48381778892824577
13:55 GitHub17 joined #mojo
13:55 GitHub17 mojo: master Sebastian Riedel * f403b4f (3 files in 3 dirs): improved lookup method in Mojo::IOLoop - http://bit.ly/gb1Vyp
13:55 GitHub17 left #mojo
13:58 * sri wonders if conditions are too complicated
13:58 sri then again, i've not seen shortcut plugins either, and they are trivial
14:02 perlrocks Twitter: ""Mojolicious API Reference" has been successfully translated into Japanese http://d.hatena.ne.jp/perlco​desample/20101219/1300165343 # perl" (ja) --dream945 http://twitter.com/dream94​5/status/48383632766803969
14:07 marcus Yapc-Eu talk submissions are open.
14:08 marcus Sri: coming to Riga?
14:08 sri marcus: unlikely
14:08 marcus Boo
14:08 sri :(
14:17 dotan zamolxes: Kim Hawtin was talking about an LDAP authentication plugin in November. Don't think he released anything
14:25 Debolaz Hmm, can I not have a waypoint on another waypoint?
14:25 Debolaz If I try, only the last waypoints ->to is called.
14:26 stephan48 joined #mojo
14:28 stephan48 left #mojo
14:28 stephan48 joined #mojo
14:32 zamolxes dotan: thanks
14:33 mattastrophe joined #mojo
14:33 sri hmm, authentication starts to become an faq
14:34 sri maybe it's time someone starts working on an authentication framework
14:37 sri $self->plugin('authentication'); $r->under(sub { shift->authenticate('basic', actions => [qw/new edit/], login => 'login_route_name') })...
14:37 sri i could imagine something like that
14:41 perlrocks Twitter: "Mojolicious API Reference - GitHub http://bit.ly/eo4LBn" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/48393540983726081
14:43 sri well, actually the ->plugin call would need a callback to compare incoming name/password pairs with something
14:44 sri but you get the idea
14:52 sri purl: welcome is <reply> Welcome to the Internet, where men are men, women are men, and kids are cops.
14:52 purl no idea, sri
14:52 sri Oo
14:53 moritz url: welcome is <reply>| Welcome to the Internet, where men are men, women are men, and kids are cops.
14:53 moritz purl: welcome is <reply>| Welcome to the Internet, where men are men, women are men, and kids are cops.
14:53 purl moritz: i don't know
14:54 * moritz can never remember the syntax
14:54 * sri pokes purl
14:54 * purl pees
14:54 sri maybe the factoid is too big
14:57 sri purl: welcome is <reply> Welcome to the internet, where men are men, women are men
14:57 purl i don't know, sri
14:57 sri purl: welcome is <reply> Welcome to the internet, where men are men
14:57 purl sri: bugger all, i dunno
14:57 sri oO
14:57 * sri strangles purl
14:58 sri purl: welcome is <reply> Welcome to the internet
14:58 purl ...but welcome is <reply>| Welcome to the Internet, where men are men, women are men, and kids are cops....
14:58 sri :O
14:58 moritz welcome
14:58 moritz welcome?
14:58 sri purl: welcome is s/|//
14:58 purl ...but welcome is <reply>| Welcome to the Internet, where men are men, women are men, and kids are cops....
14:59 breaker313 left #mojo
14:59 sri purl: welcome =~ s/|//
14:59 purl OK, sri
14:59 sri welcome?
14:59 purl Welcome to the Internet, where men are men, women are men, and kids are cops.
14:59 sri \o/
15:02 ver left #mojo
15:08 sherr left #mojo
15:09 ispy_ joined #mojo
15:13 sherr joined #mojo
15:14 kaare joined #mojo
15:33 marcus I think it's a bit sad that perlnews.org is powered by wordpress.
15:34 sri it looks quite sad in general
15:35 marcus at least perlbuzz is using movabletype
15:36 moritz the state of blogging software is a sorry affair in general
15:37 sri microblogging is killing the blog
15:37 * moritz hates these "A is killing B" memes
15:37 marcus me too
15:37 sri doesn't make it less true though
15:37 moritz sri: do you have any evidence?
15:38 marcus I liked http://sethgodin.typepad.com/seths_blog/201​1/03/bring-me-stuff-thats-dead-please.html
15:38 moritz not that "detracting a bit of attention" is not the same as "killing"
15:38 moritz s/not/note/
15:39 sri all the programming blogs i have in my google reader got much less active after the writers started using twitter
15:39 sri people like dhh stopped blogging compltely and moved on to twitter
15:39 marcus dhh is a blowhard
15:39 moritz that's not the same as "killed" or "killing" though
15:40 sri still a good indicator
15:40 sri marcus: when was the last time you blogged? :)
15:40 marcus sri: january
15:40 sri i see you tweeting all the time
15:41 sri still remember when you blogged about random links
15:41 marcus not contributing much value on twitter tho ;)
15:41 sri people don't do that anymore
15:41 moritz microblogging kills contributing value!!!
15:41 marcus I was actually planning on blogging about pushurl this weekend
15:42 marcus if I can find the time
15:42 marcus in between moving all my shit
15:43 * marcus needs to fill http://www.jmbyggholt.no/ObjectPi​cturesPopup.aspx?ObjId=106800-029
15:44 moritz marcus: how big is your family? :-)
15:44 marcus moritz: we're 3.
15:44 moritz are those numbers square meters?
15:44 marcus ye
15:44 * moritz envious
15:44 marcus it's 118 m2
15:44 sri balkong sounds like the name of a japanese movie monster
15:44 moritz balrogs!
15:45 sri heis?
15:45 marcus elevator
15:45 purl well, elevator is a good stopword
15:45 sri ok, that i would have not guessed
15:45 marcus it's a newly built apartment complex.
15:45 moritz sov = sleep
15:45 marcus mm
15:46 marcus schlafenraum :)
15:49 sherr_ joined #mojo
15:49 sherr left #mojo
15:50 sri btw. battle: los angeles was a huge disappointment
15:50 marcus :-/
15:50 marcus did you see Rubber yet?
15:51 sri lol
15:51 sri i will not!
15:52 sri http://www.imdb.com/title/tt1650062/ # this should be awesome
15:52 crab sri: how do you know the japanese docs are awesome? :-)
15:52 crab did you run them through google translate?
15:52 marcus 6.5 on imdb ;)
15:52 sri crab: google translate!
15:52 purl i heard google translate was better than I amm
15:52 Christian left #mojo
15:56 sherr_ left #mojo
15:56 sherr joined #mojo
15:57 spleenjack left #mojo
16:03 koban left #mojo
16:10 minimalist joined #mojo
16:38 ok22 joined #mojo
16:45 cosmincx left #mojo
16:52 crab sri: what were your thoughts about localised changes to the stash during include?
16:52 crab (i recall you had said something about it, and pointed out some potential problem, but not the details)
16:53 sri actually i listed some of the problems if i remember correctly
16:53 sri but i've not seen a patch yet anyway
16:53 crab "i recall ... but not the details", i meant
16:54 sri if it can be done properly i would be fine with it
16:54 crab well, if there's a generally sensible way to do it, i'll write the code, because i need the feature.
16:54 sri you'll have to find a way
16:55 crab ok. i'll try to just do local $c->stash->{$x} = $y and see what happens.
17:03 mattastrophe left #mojo
17:05 sri just don't forget good tests
17:06 crab i suppose i'll need string eval to do this generally
17:11 sri sounds messy
17:12 crab yes, but i see no other way to do it for arbitrary stash keys.
17:12 crab it works fine though.
17:13 sri why do you need string eval anyway?
17:13 xris joined #mojo
17:14 sri you can do tail call recursion with goto
17:14 sri (if it's because of the local)
17:14 crab it's because of the local. explain about tail call recursion?
17:14 crab oh man.
17:16 fmerges left #mojo
17:26 sri actually i was wrong, tail call recursion wouldn't work, you need real recursion
17:26 dotan left #mojo
17:27 sri very messy
17:31 ysyrota left #mojo
17:32 crab the idea is to have a sub that takes @_, does local $a = $b on one pair of arguments, then calls itself with @_, and finally if @_ is empty, calls render?
17:32 sri something like that yea
17:34 sri http://pastie.org/1683422 # horrible solution
17:35 sri the original idea was to use "goto &foo" and turn it into a tail call, but that resets the stack frame and local
17:36 sri i don't think it can be done with @_ either
17:37 crab it's not that horrible
17:38 sri depends how many stash keys you throw at it, each one costs you a stack frame
17:40 crab average case would probably be just one or two.
17:54 marty What guide should I read to teach me now to modify http headers with the builtin web server?
17:55 marty I'm trying to add a Access-Control-Allow-Origin: header to the response on each page from the built in webserver
17:58 crab marty: add an after_dispatch hook and do $self->req->headers->header(Foo => "bar")
18:00 marty Thank you, crab.  I try that.
18:01 marty crab++
18:05 abra left #mojo
18:16 abra joined #mojo
18:30 sri wow, V is getting really good this season
18:32 minimalist I beg to differ
18:33 ispy_ left #mojo
18:33 sri season finale was great
18:34 sri most annoying character dead, you get to finally see one of them, secret cabal in underground bunker... what else could you wish for? :)
18:35 minimalist I haven't seen the finale yet, but I'll download it today I guess.
18:35 minimalist who dies? give me a spoiler
18:35 sri naah
18:36 minimalist please tell me it's the old queen.
18:36 sri actually two annoying characters die
18:36 sri ok, that spoiled it i guess :S
18:36 sri no wait
18:37 sri three
18:37 sri i forgot one
18:37 sri all annoying though
18:37 minimalist that's good news. I've been losing interest in the show because of the annoying chars.
18:38 sri well, they are changing everything in the finale
18:38 minimalist do we get to see a naked Lisa?
18:39 Kulag left #mojo
18:39 Kulag joined #mojo
18:39 * sri nods
18:39 * minimalist opens a new browser tab with torrentz.com
18:40 sri maybe they end the show with this episode, at the end it looks like humanity is pretty much toast
18:42 minimalist yay!
18:42 sri don't yay before there are alternative shows to watch!
18:44 minimalist The Event
18:44 purl i heard the event was a message that is sent from one part of the POE application to another. An event consists of the event's name, optional event-specific parameters and OOB information. An event may be sent from the kernel, from a wheel or from a session.
18:44 sri that's just one
18:44 sri like it though
18:44 giwi joined #mojo
18:45 * sri has high hopes for bsg blood and chrome
18:51 * crab reads "naked Lisa", thinks of the simpsons, and runs away screaming
18:52 minimalist http://www.imdb.com/name/nm0888882/
19:03 ok22 left #mojo
19:13 fhelmbe__ left #mojo
19:14 ok22 joined #mojo
19:18 stephen1 left #mojo
19:22 stephen joined #mojo
19:29 giwi left #mojo
19:31 giwi joined #mojo
19:33 okelet joined #mojo
19:34 okelet hi
19:35 okelet one question, mojo lite, how can i have a variable in the controller to store data among all the requests?
19:35 minimalist okelet, it seems you need to set a session
19:36 okelet ummm nop
19:36 okelet i want to store information about all users
19:36 okelet like an instance variable
19:36 okelet now i have
19:37 okelet http://pastebin.com/ABa1tc35
19:38 minimalist you need a database for this
19:38 minimalist my point is that you can't have variables that stay the same among different requests
19:39 okelet i don't need, for now, to store those values in a databse
19:39 okelet just while the server is running
19:39 okelet ummmmmm
19:40 okelet oh shit
19:40 okelet sorry
19:40 okelet just removed --reload, now it works
19:42 crab whatever you're doing sounds like it's likely to end in tears.
19:42 minimalist second that
19:43 okelet :D
19:43 okelet yes, i know
19:44 okelet i am only testing
19:44 okelet at the end, what i want, is to register the logins in about 60 samba servers
19:45 okelet to generate statistics about login times, most used servers, etc
19:45 okelet sure, i will have to store the information in a database, but for now, i don't need it
19:47 minimalist okelet, just because you removed --reload doesn't mean you can rely on this variable to remain valid among requests.
19:47 okelet not? why? the code in pastebin now works as expected
19:48 sri if it's really just for testing you should be able to use %ENV for storage
19:48 sri but even for playing around you really should just use a database
19:50 okelet can i store hashes in %ENV?
19:51 minimalist if you serialize them, maybe
19:51 okelet aha
19:51 sri you can, but you really shouldn't do it unless you know what you're doing
19:51 sri maybe i shouldn't have mentioned it
19:51 sri it will likely end in tears too :S
19:51 okelet :D
19:51 minimalist sri opened a big pandora box
19:52 okelet ok, ill use, at least, sqlite
19:52 sri smart move
19:52 okelet is there anyway to be notified when an application is being stopped, just like when it is staring me startup method?
19:53 sri normal perl DESTROY
19:54 okelet ummm ok, i'll try it
19:55 okelet thanks everybody
19:55 okelet a new mojo fan
19:58 minimalist may the source be with you
20:10 stephan48 in a mojo lite app could i restrict under just to some actions?
20:11 stephan48 like i have a under which should prefetch some info for a db entry and actions like: edit view but also others which are independent of the db entry
20:18 sri you can reset under
20:18 sri with "under;" or so
20:18 crab oh. i didn't know that.
20:19 stephan48 coool
20:20 marty Interesting.  I'm appending the header 'Access-Control-Allow-Origin' to the output of my mojo app.   I'm trying to allow cross site requests.  It appears that Mojo::Server::Daemon is not honoring the header and refusing to serve content.  Or am I missing something.
20:20 sri only makes sense, you are replacing the first under with an empty one ;)
20:20 stephan48 yess
20:20 stephan48 and so reset routing chain to start...
20:20 marty I've tested it with Apache and everything works fine. If I serve request the file via XMLHttpRequest it all works as expected.
20:20 giwi left #mojo
20:21 crab marty: you must be missing something
20:21 stephan48 could i also chain unders? would under then only reset one under lvl or all?
20:21 sri stephan48: nope
20:21 marty I've checked it with Apache and it works fine.  Not sure why it is not working with mojo
20:21 sri the lite under is for simple use cases
20:21 stephan48 so then i would need routes already?
20:22 giwi joined #mojo
20:22 sri marty: you're missing something
20:22 stephan48 app->routes i mean
20:22 sri stephan48: yes
20:22 sri marty: i'm 100% certain setting headers works flawless, has like a gazillion tests and hundreds of people doing it
20:22 crab what exactly is it that you're checking?
20:23 marty Hmmm, I must be missing something. :) ok.  I'll go dig deeper.  My apologies.
20:25 marty crab: I'm serving a page from domain A (apache) and doing an XMLHttpRequest to domain B (mojo). In mojo I have the header Access-Control-Allow-Origin: *.   I've tried with with two apache domains and it works fine, but if I do it with mojo, I get no content and an error.
20:26 stephan48 woudlnt you have to set it in the apache2 domain?
20:26 marty stephan48:  I've tried both.
20:27 marty https://developer.mozilla.org/​En/Server-Side_Access_Control
20:28 perlite_ joined #mojo
20:29 giwi left #mojo
20:32 perlite left #mojo
20:32 perlite_ is now known as perlite
20:32 baton8 left #mojo
20:43 dotan_ joined #mojo
20:47 dotan_ left #mojo
20:56 okelet left #mojo
21:06 stephan48 thanks sri, that works :)
21:07 stephan48 but maybe a doku about that would be cool :)
21:07 stephan48 the behaviour is logical but some might dont know that it works
21:10 sri the wiki is that way ->
21:10 sri :)
21:13 stephan48 :)
21:15 fhelmber_ joined #mojo
21:16 sri ohoh, the redis author is calling out the ruby community on bad code quality :o
21:20 sri wow, and people keep telling him how they have given up on ruby because of the bad quality :O
22:17 * mmmpork is one of them
22:17 mmmpork not that i gave it much of a chance
22:18 mmmpork but when core libs are broken and i have to monkey patch my own version to make them work, i just can't trust a language
22:25 DaTa what's wrong with ruby? --verbose please
22:31 Kulag left #mojo
22:31 Kulag joined #mojo
22:32 DaTa start ranting now :)
22:41 garu I guess they already finished :)
22:46 kaare left #mojo
23:06 Alias left #mojo
23:50 Alias joined #mojo

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