Camelia, the Perl 6 bug

IRC log for #mojo, 2010-09-27

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

All times shown according to UTC.

Time Nick Message
00:47 Drossel is now known as Kulag
01:17 ka2u joined #mojo
02:31 Drossel joined #mojo
02:33 Kulag left #mojo
02:35 janus left #mojo
02:36 Kulag joined #mojo
02:37 Drossel left #mojo
02:41 janus joined #mojo
03:00 memememomo_ left #mojo
03:28 GabrielVieira2 left #mojo
03:53 cognominal left #mojo
03:54 ash_ left #mojo
03:58 ash_ joined #mojo
04:03 tholen42 joined #mojo
04:04 cognominal joined #mojo
04:05 tl left #mojo
04:05 ash_ left #mojo
04:07 cognominal left #mojo
04:08 cognominal joined #mojo
04:22 cognominal left #mojo
04:31 perlrocks Twitter: "I use anyway and Mojolicious" (ja) --nyarla http://twitter.com/nyarla/status/25656968848
04:41 fod left #mojo
05:17 ysyrota joined #mojo
05:34 koban joined #mojo
05:35 ltriant left #mojo
05:36 ltriant joined #mojo
06:05 und3f[A] is now known as und3f
06:25 memememomo joined #mojo
06:25 memememomo is now known as memememomo_
06:31 yakudza joined #mojo
06:31 yakudza left #mojo
06:39 kvorg joined #mojo
06:41 cognominal joined #mojo
06:49 esskar left #mojo
06:58 plu left #mojo
07:28 ltriant left #mojo
07:43 marcus_ so, which is the right couchdb integration to use these days?
07:43 marcus_ http://github.com/esskar/mojox-couchdb/tre​e/04595e4c0290ffe7e8dae886affe2c4c5c72a593 ?
07:44 marcus_ or vti's http://github.com/vti/mojox-common​/blob/f825061ad171b65a8e5f19a785a8​f925bc5f4c16/lib/MojoX/CouchDB.pm ?
07:56 Alias_ joined #mojo
07:57 memememomo_ is now known as memememomo
07:57 memememomo is now known as memememomo_
07:59 spleenjack joined #mojo
08:00 sri moin
08:01 a|newkirk[assoc] left #mojo
08:02 a|newkirk[assoc] joined #mojo
08:02 marcus_ moin
08:05 marcus_ sri: do you use couch in any project atm?
08:05 sri just directly with the client
08:05 marcus_ I'm writing the backend for a fairly simple iphone app, and thinking I'll do it in mojolicious and couchdb.
08:05 arthas joined #mojo
08:05 marcus_ it just needs to find documents based on geolocation and support adding and editing
08:06 arthas left #mojo
08:08 sri wtf, is it true that redhat perl has no weaken support?
08:09 Alias_ Let me check
08:09 omega sri: old ones
08:09 Alias_ Undefined subroutine &Scalar::Util::weaken called at (eval 14)[/usr/lib/perl5/5.8.8/perl5db.pl:628] line 2.
08:10 Alias_ Yep, current production RHEL5
08:10 sri wow
08:10 Alias_ It's not unusual
08:10 Alias_ In the 5.8.8 series of many distros
08:10 sri that means most of mojolicious can't even run on redhat
08:10 Alias_ Just that it's been a LONG time between distro versions for RedHat
08:11 Alias_ RHEL6 should fix everything
08:12 Alias_ That's almost here
08:12 marcus_ RHELL
08:12 sri and break new things...
08:12 Alias_ sri: I seem to recall hearing that their Perl builds got completely redone for Fedora 14
08:12 Alias_ By someone sane
08:13 Alias_ And that should be what RHEL6 is the basis of... or something
08:13 sri can't wait to finally use some 5.10+ features in mojolicious
08:14 Alias_ Anyone doing anything serious on RHEL probably has upgraded Scalar::Util
08:14 Alias_ Or done a parallel install
08:14 sri mostly upgraded i bet
08:14 Alias_ Well, not necesarily
08:14 Alias_ It's in a core package...
08:15 Alias_ Maybe a parallel Perl build...
08:15 Alias_ Assuming you're doing RPM installs
08:19 a|newkirk[assoc] left #mojo
08:39 memememomo_ is now known as memememomo
09:02 su-bzero joined #mojo
09:05 und3f sri, hello
09:05 und3f i have some problem with rendering static files: access to static files checked by application and in case of ok it is rendered with $self->render_static
09:06 und3f but problem is in file names
09:06 und3f File names are in database, so after $self->render-static i am trying to modify content_disposition header
09:06 und3f but just got 500  without any description
09:07 su-bzero_ left #mojo
09:10 sri und3f: just look at the log
09:13 und3f sri, oh, right.
09:13 und3f sri, is it ok to modify content-type and content-disposite after static_serve ?
09:14 sri sure, why shouldn't it?
09:15 und3f sri, server of Mojox::Renderer::Static you delete content-type if file is not modified
09:16 sri you mean we serve static files in a sane way
09:16 sri with proxy support
09:21 und3f sri, yes
09:48 perlrocks Twitter: "Mojolicious:: Lite applications plackup made you move in $ self-> param () does not work?" (ja) --akiym http://twitter.com/akiym/status/25672537244
09:58 und3f is now known as und3f[A]
10:00 memememomo is now known as memememomo_
10:17 plu joined #mojo
10:24 su-bzero left #mojo
10:24 su-bzero joined #mojo
10:28 kimoto joined #mojo
10:35 sri i hate the $self->b idea
10:35 sri it looks so wrong
10:37 marcus_ I agree
10:54 marcus_ sri: how do I set a defaults from mojolicious::lite?
10:54 sri app->defaults?
10:59 esskar joined #mojo
11:00 esskar moin
11:04 yko joined #mojo
11:41 marcus_ esskar: hey
11:42 esskar hey marcus_
11:54 sri slow monday
11:55 perlrocks Twitter: "Mojolicious, a framework for Perl: Mojolicius is a framework created by Sebastian Riedel intended as a fr ... http://bit.ly/adF5By" (es) --hexley http://twitter.com/hexley/status/25679342301
11:55 perlrocks Twitter: "Mojolicious, a framework for Perl: Mojolicius is a framework created by Sebastian Riedel intended as a fr ... http://bit.ly/9kABvH" (es) --hexley http://twitter.com/hexley/status/25679342380
12:05 Rhaen hep!
12:05 Rhaen hoooray!
12:05 Rhaen what's wrong?
12:06 marcus_ BROOD
12:06 Rhaen hm, brood war?
12:06 Rhaen that's long ago! Get SC2, man!
12:48 Rhaen hm.
12:48 Rhaen it's so silent in here
12:58 esskar whats the best way to delete/expire a cookie (so what do the server has to send)?
13:01 esskar i mean, what do i have to set to delete a cookie with the next response?
13:05 marcus_ just set the cookie with an expired timestamp
13:14 marcus_ hmm
13:14 marcus_ mongodb has geospatial indexing built in.
13:14 marcus_ cute
13:18 baton8 joined #mojo
13:30 esskar so $c->signed_cookie($self->cookie_field => '', { expires => time - 31536000 }); should do it?
13:34 sri expires => 1 is enough
13:35 sri no need to make it complicated
13:35 yko left #mojo
13:39 meraxes_ joined #mojo
13:39 Rhaen looks like this project seems to make some nice progress
13:40 perlrocks Twitter: "Mojo bench again in the latest version of the GET parameters matches - perl http://htn.to/S7ePK9 study notes" (ja) --memememomo http://twitter.com/memememomo/status/25687088459
13:45 perlrocks Twitter: "RT! Memememomo: Mojo bench again in the latest version of the GET parameters matches - perl http://htn.to/S7ePK9 study notes" (ja) --perlism http://twitter.com/perlism/status/25687462448
13:45 Rhaen I really would like to see this in a language I understand
13:47 Rhaen ah, it's in English :)
13:47 Rhaen but with a strange charset :)
13:47 Foxcool joined #mojo
13:48 und3f[A] is now known as und3f
13:48 Foxcool left #mojo
13:48 Foxcool joined #mojo
13:56 meraxes_ left #mojo
14:00 sri better than raw japanese
14:00 sri not sure why but the japanese seem to be obsessed with performance
14:01 sri which is ironic considering ruby
14:05 Rhaen isn't ruby fast as a lightning?
14:05 Rhaen zzzzZZzzZZzzzzzip!
14:07 baton8 left #mojo
14:07 baton8 joined #mojo
14:29 koban left #mojo
14:38 forwardever joined #mojo
14:45 a|newkirk[assoc] joined #mojo
14:50 esskar when i return 0 in a condition, i'm not able to redirect?
14:51 sri ?
14:51 esskar Processing request failed: Can't call method "req" on an undefined value at C:/strawberry/perl/site/lib/MojoX/Routes/Match.pm line 27, <DATA> line 132.
14:51 esskar thats what i get
14:51 esskar in my lite_app test
14:52 esskar not sure exactly why
14:52 sri $self->redirect_to() and return;?
14:52 esskar my question was just a way to understand whats happening
14:53 sri oh wait, condition
14:53 sri i misunderstood
14:54 sri no idea really, that case has no tests afair
14:56 sri oooh
14:56 sri redirect_to of course doesn't work
14:56 sri or actually, i have no idea ;p
14:57 sri conditions run before routes are finished, no idea
14:57 sri yes, i have no clue :)
14:57 ash_ joined #mojo
14:57 esskar and conditions run before all routes are known?
14:57 sri before the endpoint is known
14:58 sri so it depends, stuff that doesn't depend on the endpoint might work
14:59 sri but it is really all untested besides basic true/false conditions
14:59 esskar see my error above
14:59 sri if you want something to work make a simple test case
14:59 esskar when i call $c->rdirect_to inside a condition, i get the error
14:59 sri i'll fix it then
14:59 sri test case please
14:59 esskar what? ;)
15:00 stereonaut joined #mojo
15:01 sri a lite_app.t test will do
15:06 esskar sri: http://perlpunks.de/paste/show/4ca0b2fc.5d38.23b
15:07 sri esskar: looks good, will make it work
15:23 Rhaen sri?
15:23 sri Rhaen?
15:23 Rhaen if I plan to use Mojolicious::Plugin::JsonConfig to configure my application
15:23 Rhaen hang on, I'll pastie
15:24 esskar Rhaen: don't use it
15:24 Rhaen why not?
15:24 esskar i want to it to get deprecated ;)
15:24 esskar -to
15:24 sri esskar: not a chance
15:24 esskar i know
15:24 esskar just kidding
15:24 Rhaen hm, ok - any other suggestion about slurping in config files then?
15:24 esskar Rhaen: use it ;)
15:28 sri i was about to say to Rhaen that asking the whole channel instead of poking me was generally a better idea...
15:28 sri great example esskar -.-
15:28 GabrielVieira2 joined #mojo
15:29 esskar you mean the bug?
15:29 sri i mean the jsonconfig false advice
15:30 sri that inside joke needs a lot of explanation ;p
15:31 esskar i figure ...
15:31 * esskar is not in the mood for inside jokes :-S
15:34 Rhaen http://pastie.org/1184452
15:34 Rhaen Does this look - well, resonable?
15:34 sri nope
15:35 Rhaen ok, but it works perfectly :)
15:35 sri you shouldn't create a log object yourself
15:35 sri app->log
15:35 Rhaen ok! Got that.
15:35 Rhaen What about the json thing. Is that ok in the way I use it?
15:35 sri sure
15:36 Rhaen k. got that. Thanks
15:41 Rhaen is there a way to "hide" the configuration data to the templates?
15:41 Rhaen as it's accessible using <%= $config->{database} %> from the template
15:43 memowe_ joined #mojo
15:43 memowe left #mojo
15:43 sri i think you can change the stash key to something private
15:43 sri like _config or my.config
15:43 sri or you delete the security related keys
15:43 sri you might need some configuration options in templates
15:45 Rhaen hm. k. As far as I understand the documentation (and my examples) it's possible to load data with "stash_key" into the stash
15:45 Rhaen This data is not accessible from the controller.
15:46 MojoGuest712 joined #mojo
15:46 MojoGuest712 From: http://www.google.com.ua/search?hl=r​u&amp;q=websocket+demo&amp;aq=f&amp;​aqi=g1&amp;aql=&amp;oq=&amp;gs_rfai= (1 hits)
15:46 MojoGuest712 lol
15:46 MojoGuest712 left #mojo
15:46 Rhaen ah, yes. The demo is still working :)
15:47 Rhaen oh, wait. I am dreaming.
15:52 Rhaen sri, here is too much unexplained magic going on
15:52 Rhaen but wait, I'll pastie
15:54 Rhaen Ths works perfectly: http://pastie.org/1184496
15:55 Rhaen What I don't like is the idea of populating $config
15:55 Rhaen Well, don't like it way to strong :) - Maybe it's just something to mention inside the documentation
15:55 sri i like it
15:56 sri sure feel free to mention it :)
15:56 Rhaen guys, if you are using this json_config plugin, we'll populate the $config value for you
15:56 Rhaen but only for templating, you can't access it from the inside (like routes, ...)
15:56 Rhaen there you have to use $app/&app to access it.
15:57 sri it's in the stash
15:57 sri not much magic involved
15:58 sri $self->stash('config')
15:58 Rhaen yup.
15:58 sri all stash values are initialized in the template
15:58 Rhaen that's the way to get it back out there, right?
15:58 spleenjack left #mojo
15:58 sri ?
15:59 sri delete $self->stash->{config}
15:59 sri but generally, if your config values are so dangerous, just delete them from the config hash on startup
15:59 koban joined #mojo
15:59 Rhaen like get '/' => sub { my $self = shift; my $database = $self-><..I want my dbthing here...>} => '..';
16:00 sri there are usually titles and stuff in a config file too, that need to be in templates
16:00 Rhaen omg, time to get home, my ideas turn around in loops
16:00 sri esskar: that test triggers 3 bugs :)
16:02 esskar sri: have fun ;)
16:02 Rhaen hm, remove the test then :)
16:03 Rhaen *hides*
16:03 Rhaen esskar?
16:03 esskar Rhaen: yes?
16:03 Rhaen cool!
16:03 Rhaen esskar++ :)
16:03 esskar are you bored? ;)
16:03 Rhaen ;) - yeah, I know I should go home _NOW_
16:06 GitHub126 joined #mojo
16:06 GitHub126 mojo: master Sebastian Riedel * 41d451e (5 files in 4 dirs): fixed multiple route condition bugs - http://bit.ly/cb26Wz
16:06 GitHub126 left #mojo
16:07 sri esskar: fixed
16:07 kvorg left #mojo
16:08 esskar \o/ my name is in the code
16:08 esskar at least in the changes
16:08 GitHub99 joined #mojo
16:08 GitHub99 mojo: master Sebastian Riedel * d27ca87 (1 files in 1 dirs): fixed typo - http://bit.ly/b0Vf42
16:08 GitHub99 left #mojo
16:09 Rhaen hm, btw - why is sri using the same password as I do?
16:09 sri everybody with a few applied patches is allowed to sneak in their name into a test :)
16:09 Rhaen http://search.cpan.org/~kraih/Mojolici​ous-0.999929/lib/Mojo/Client.pm#___top
16:09 Rhaen http://search.cpan.org/~kraih/Mojolicious​-0.999929/lib/Mojo/Client.pm#https_proxy
16:09 Rhaen sorry, the second one.
16:11 sri or even pod examples
16:14 esskar ! [rejected]        master -> master (non-fast forward)
16:14 esskar anyone any idea what that is?
16:16 DaTa esskar: i guess git tells you that you have to do a merge
16:19 esskar DaTa: yes.
16:19 esskar did it
16:23 ysyrota left #mojo
16:32 marcus_ hmm, I think I love mongodb
16:33 marcus_ sri: mojolicious needs bson ;-)
16:33 sri lol
16:34 marcus_ the collections concept makes a lot of sense to me
16:35 marcus_ db.items.update( { sku : 123 } , { "$set" : { "features.zoom" : "5" } } )
16:40 forwardever left #mojo
16:55 GabrielVieira2 is now known as GabrielVieira
16:58 spleenjack joined #mojo
16:59 sri don't like the whole bson thing
17:07 crab bson?
17:09 crab binary json. i see.
17:13 Foxcool left #mojo
17:33 ash_ left #mojo
17:34 sri mongodb seems very nice for adhoc queries though
17:38 sri the protocol is not as bad as cassandra but still...
18:02 a|newkirk[assoc] i just started looking into cassandra
18:02 a|newkirk[assoc] .. and mongo
18:02 a|newkirk[assoc] the api for perl, thift and cassandra is not very streamlined yet
18:04 marcus_ the mongodb perl api seemed quite good
18:04 marcus_ but then rafl had his hands on it.
18:05 a|newkirk[assoc] :)
18:09 perlrocks Twitter: "Bloomberg headlines (ht @marcusramberg @vtivti): perl -Mojo -E'g("bloomberg.com")->dom​("a.story_link")->each(sub { say shift->text; })'" --paulhenrich http://twitter.com/paulhenrich/status/25709051286
18:49 perlrocks Twitter: "RT @paulhenrich: Bloomberg headlines (ht @marcusramberg @vtivti): perl -Mojo -E'g("bloomberg.com")->dom​("a.story_link")->each(sub  ..." --esskar http://twitter.com/esskar/status/25711689008
19:06 memowe_ left #mojo
19:06 memowe joined #mojo
19:12 GabrielVieira left #mojo
19:22 DaTa http://data.rbfh.de/url.txt shouldn't Mojo::URL work like that?
19:27 yakudza joined #mojo
19:32 GabrielVieira joined #mojo
19:32 esskar_ DaTa: why clone?
19:32 yakudza left #mojo
19:37 kvorg joined #mojo
19:42 Rhaen_ joined #mojo
19:42 DaTa esskar_: because i don't want to alter the original
19:47 Rhaen left #mojo
19:47 Rhaen_ is now known as Rhaen
19:53 Rhaen_ joined #mojo
19:54 Rhaen_ evening!
20:02 crab hi
20:12 * Rhaen_ dances around.
20:12 Rhaen_ We have Perl!
20:13 * Rhaen_ sings: Thank god, we have Perl!
20:13 crab so rhaen is a dancer?
20:14 Rhaen_ yep. I am!
20:17 marcus_ but are you human?
20:18 Eugene joined #mojo
20:18 Rhaen_ hm, I suppose to be. So - yes.
20:18 esskar_ DaTa: so, why not just call new? because you do not if's an path or an absolute uri?
20:18 Rhaen_ ok time for some more sc2 action
20:25 DaTa esskar_: $url = Mojo::URL->new("http://example.com/foo"); $url->clone->path("/bar"); where should i call new again?
20:26 DaTa esskar_: or do you mean the last line?
20:26 DaTa s/line/test/
20:27 esskar_ yep
20:31 DaTa esskar_: yeah, i don't know, the use case is for example: i fetch http://example.com/foo go through all <a href> and wan't to fetch them. With URI.pm i can do: URI->new_abs($href, "http://example.com/foo") and it just does the right thing
20:34 DaTa but that's just a nice to have, the problem is the failing test nr. 2
20:35 DaTa Mojo::URL->new("http://example.com/foo/bar")->path->("../baz") should either return http://example.com/baz or http://example.com/foo/../baz
20:36 DaTa imho :)
20:52 esskar_ left #mojo
20:52 koban left #mojo
20:52 esskar_ joined #mojo
20:53 Eugene left #mojo
21:10 a|newkirk[assoc] left #mojo
21:19 spleenjack left #mojo
21:30 sri DaTa: no it shouldn't
21:30 sri http://example.com/foo/bar/../baz
21:30 sri thats the right result
21:31 DaTa why? :)
21:32 sri why not?
21:32 sri url_for->path('foo/bar') is a very common use case
21:33 DaTa well, if i go to http://example.com/foo/bar and my browser finds <a href="../baz"> there, it goes to http://example.com/baz
21:33 DaTa if i'm in /foo/baz/ and there is a href "../baz" then it goes to /foo/baz
21:34 DaTa or am i wrong?
21:38 sri actually thats correct
21:39 sri ok, feel free to fix
21:40 sri in Mojo::URL
21:41 sri DaTa: in case you want to fix it
21:41 DaTa not yet, i can take a look at it tomorrow :)
21:44 sri actually it's trivial
21:50 GitHub59 joined #mojo
21:50 GitHub59 mojo: master Sebastian Riedel * 8d51a8e (3 files in 3 dirs): fixed a small relative path but in Mojo::URL - http://bit.ly/a6N6cs
21:50 GitHub59 left #mojo
21:50 sri DaTa: fixed
21:55 Rhaen_ left #mojo
21:59 esskar_ left #mojo
22:00 DaTa impatient sri :)
22:00 * sri can't sleep if there are still open bugs
22:03 stereonaut left #mojo
22:03 und3f is now known as und3f[A]
22:03 esskar_ joined #mojo
22:06 ltriant joined #mojo
22:10 MojoGuest65 joined #mojo
22:10 MojoGuest65 From: http://www.google.com/url?url=http://dev.xantus​.org/&amp;rct=j&amp;sa=U&amp;ei=EBahTN2GIom4sQP​Iq5CfAQ&amp;ved=0CBgQFjAB&amp;q=html5+irc+clien​t&amp;usg=AFQjCNGRAWZjKNffOdJwCsDQjTD26ewgwg (1 hits)
22:10 MojoGuest65 left #mojo
22:11 MojoGuest720 joined #mojo
22:11 MojoGuest720 From: http://www.google.com/url?url=http://dev.xantus​.org/&amp;rct=j&amp;sa=U&amp;ei=EBahTN2GIom4sQP​Iq5CfAQ&amp;ved=0CBgQFjAB&amp;q=html5+irc+clien​t&amp;usg=AFQjCNGRAWZjKNffOdJwCsDQjTD26ewgwg (2 hits)
22:11 MojoGuest720 left #mojo
22:47 GabrielVieira left #mojo
23:11 a|newkirk[assoc] joined #mojo
23:48 ash_ joined #mojo

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