Camelia, the Perl 6 bug

IRC log for #mojo, 2011-07-13

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

All times shown according to UTC.

Time Nick Message
00:05 xantus[] seeing commas at the beginning of the line makes me ill
00:11 GitHub162 joined #mojo
00:11 GitHub162 [mojo] kraih pushed 1 new commit to master: http://bit.ly/ocPzZu
00:11 GitHub162 [mojo/master] added more template tests - Sebastian Riedel
00:11 GitHub162 left #mojo
00:12 sri ok, i can't replicate line numbers being different
00:12 sri so i really depend on a test case if there really is a bug
00:13 depesz sri: sure. I understand.
00:13 depesz will try to make a smaller case with problem.
00:13 depesz but definitely not today - it's 2:13 am :)
00:17 sri it's always happy hour somewhere
00:17 amoore joined #mojo
00:17 depesz :)
00:18 amoore left #mojo
00:49 xaka left #mojo
01:06 xaka joined #mojo
01:11 GabrielVieira left #mojo
01:22 mspo is there a shortcut to return a 404?
01:23 Alias joined #mojo
01:27 amoore joined #mojo
01:30 amoore left #mojo
01:40 mspo I got it, I'm dumb
01:41 SmokeMachine joined #mojo
01:42 perlrocks Twitter: "@ Moongift Lokka, Sinatora, Django, Rails, Mojolicious, Node.js, Zend, EXT JS ... it is a cloud that can be deployed with one click hosting a number of OSS? http://t.co/3imaNh3" (ja) --keikubo http://twitter.com/keikubo​/status/90959145288732672
01:45 SmokeMachine left #mojo
01:46 perlrocks Twitter: "Server is available now in development morbo Mojolicious - Introduction to Perl with sample code (id: perlcodesample / @ perlcodesample) http://t.co/Tcg9uoX" (ja) --kiknopy http://twitter.com/kiknopy​/status/90960178643615744
01:47 perlrocks Twitter: "lite at Toka starman - I could reload, who know what I'll Mojolicious value of how do you reload" (ja) --kiknopy http://twitter.com/kiknopy​/status/90960612699549696
02:11 amoore joined #mojo
02:18 acmoore joined #mojo
02:19 amoore left #mojo
02:20 acmoore left #mojo
02:21 mspo n/quit
02:21 mspo left #mojo
02:43 sri hmm, wonder if we should just make all warnings fatal by default in Mojo::Base
02:59 acmoore joined #mojo
03:01 acmoore left #mojo
03:44 amoore joined #mojo
03:48 xaka warnings fatal?
03:50 amoore left #mojo
04:24 crab sri?
04:24 purl it has been said that sri is A PONIE!!1! and a  or no more a javascript noob or evil or a spelling guerilla or the temporary channelclown or a snob now or the perl guerilla or a small mouse with a big head aiming for world domination or the evil sith or has no clue about fuzzy logic or no longer a real hacker :/ or a copycat or pimp to many children or a holy man or looks a lot like pitr or puny or doing ruby now until perl6 or unholy
04:32 sri crab: just noticed that i'm adding fatal warnings a lot to my code recently
04:35 crab sri: from yesterday: <crab> sri: would you accept a patch to allow $tx->res->headers->expires() and ...->cache_control()?
04:35 sri crab: missed that, seems sensible
04:38 crab sri: ok, will submit later today
04:38 crab there's also scope for a more "clever" ->expires_after($seconds) or similar, but that's for another day.
04:42 sri that's not for the mojo layer imo
04:43 sri better a high level helper
04:49 crab i think so too
05:26 arpadszasz joined #mojo
05:40 xoma joined #mojo
06:05 alnewkirk joined #mojo
06:09 sugar joined #mojo
06:12 tabbi joined #mojo
06:12 tabbi left #mojo
06:15 anaio joined #mojo
06:19 alnewkirk left #mojo
06:19 anaio is now known as alnewkirk
06:22 xoma left #mojo
06:38 perlrocks Twitter: "At. And I do, Ark? Catalyst? Interchange? Mason? Maypole? Reaction? WebGUI? Mojolicious?" (ja) --piyo3728 http://twitter.com/piyo372​8/status/91033724044591106
06:43 wolf_ joined #mojo
06:45 sugar left #mojo
06:54 marcus yes, go for maypole!
06:54 marcus oldschool is the best school!
07:06 xaka left #mojo
07:26 Foxcool joined #mojo
07:34 Alias heh
07:43 sugar joined #mojo
07:46 spleenjack joined #mojo
07:47 xxtjaxx_ joined #mojo
07:48 xxtjaxx_ http://mojolicio.us/perldoc​/Mojo/Template#render_file Suggests that template files external to the mojolicious package/script can be used to render the site. Can I give it the relative path from the script or just the  name like you'd do with the template files you append in the __DATA__ section? I'd like to split template and script intelligence/design in order to have more fun doing the coding.
07:50 sri xxtjaxx_: that path is the absolute file system path
07:50 sri xxtjaxx_: but are you really using Mojo::Template directly?
07:51 sri because if you're in a Mojolicious or Lite app that documentation has almost no relevance at all
07:51 xxtjaxx_ sri: No I was actually hoping to use Mojo::Lite with a seperate file for template. Just to get me started coding with Mojo
07:52 sri that is covered in the documentation
07:52 sri especially the growing guide
07:53 sri to make it short, yes it is very easy, but you should not worry about it while learning
07:53 sri and just follow the tutorial and guides
07:54 sri if you're really impatient try "mojo generate lite_app; ./myapp.pl inflate"
07:54 sri (just to see it)
07:54 sri http://mojolicio.us/perldoc # but really follow the documentation
07:56 xxtjaxx_ sri: thx
08:12 cosmincx joined #mojo
08:17 Alias left #mojo
08:36 marcus sri: when do you sleep? :-o
08:37 sri during the winter
08:54 |nagual| joined #mojo
08:54 |nagual| hi
08:55 perlrocks Twitter: "@ Some piyo3728 Mojolicious." (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/91068213844127745
08:56 |nagual| im problems from freebsd
08:56 bzero Can't load application "./script/app": Can't locate object method "new" via package "App" at /usr/local/share/perl/5.10.1/Mojo/Server.pm line 20.
08:56 bzero
08:57 bzero Morbo.
08:57 |nagual| Mojolicious work unstable from hypnotoad and starman
08:57 bzero No problems with daemon.
08:57 |nagual| https://github.com/miyagawa/Starman/issues/30
08:57 |nagual| its no promlem starman
09:04 abra left #mojo
09:08 amoore joined #mojo
09:16 abra joined #mojo
09:21 * sri is still unsure about making all warnings fatal
09:21 sri i suppose undefined warnings would have to be excluded... which would make the whole thing a little complicated
09:21 amoore left #mojo
09:23 cosmincx left #mojo
09:23 cosmincx1 joined #mojo
09:23 cosmincx1 left #mojo
09:27 |nagual| sAll requests are identical
09:37 |nagual| Mojolicious hawe problems from parsing templates from cpu 100%
09:37 |nagual| Failed requests:        171
09:37 |nagual| ab -n 10000 -c 100
09:50 bzero sri: Can't load application "./script/app": Can't locate object method "new" via package "App". It's only with morbo. With daemon all is ok.
09:51 sri bzero: no idea
09:52 bzero I don't have too. Weird. With another application all is ok.
10:20 cosmincx joined #mojo
10:27 sri http://www.instantelevatormus​ic.com/nyan-cat-progress-bar # first good reason to use windows in years!!!
10:47 alnewkirk left #mojo
10:47 Foxcool left #mojo
11:05 tabbi joined #mojo
11:05 AmeliePoulain joined #mojo
11:05 tabbi left #mojo
12:17 amoore joined #mojo
12:19 amoore left #mojo
12:31 metaperl joined #mojo
12:33 cosmincx1 joined #mojo
12:34 cosmincx left #mojo
12:47 shonorio joined #mojo
13:07 cosmincx1 left #mojo
13:21 xxtjaxx_ II'm using Mojo::Lite now and if I want to test if the param is actually there I can use defined self->param('someparam') right?
13:21 cosmincx joined #mojo
13:25 vel joined #mojo
13:34 amoore joined #mojo
13:34 metaperl left #mojo
13:37 amoore left #mojo
13:43 AmeliePoulain left #mojo
14:03 kaare joined #mojo
14:09 perlrocks Twitter: "Mojolicious Reference - http://htn.to/8Mchme Sample Code Getting Started with Perl" (ja) --nabetama http://twitter.com/nabetam​a/status/91147141107556353
14:16 |nagual| sri:  Mojolicious:: Lite have  not stable  with a larger block __DATA__ for example
14:23 preflex left #mojo
14:25 xxtjaxx_ |nagual|: Create a directory called templates/ where your script is.
14:26 |nagual| xxtjaxx_: plz send my link to documentations
14:28 |nagual| http://mojolicio.us/perldoc/Mojo/Template
14:28 preflex joined #mojo
14:40 sh9 joined #mojo
14:46 tabbi joined #mojo
14:46 tabbi left #mojo
14:47 xxtjaxx_ |nagual|: nope
14:47 xxtjaxx_ |nagual|: http://mojolicio.us/perldoc/Mojo​licious/Lite#External_Templates <<
14:54 shonorio left #mojo
14:54 shonorio joined #mojo
15:04 metaperl joined #mojo
15:07 perlrocks Twitter: "mojo => / jamadam / Mojolicious healed because there was a bug in the conversion of psgi-Plugin-PlackMiddleware - GitHub http://htn.to/i1ctsX" (ja) --jamadam http://twitter.com/jamadam​/status/91161727592439809
15:17 xantus[] xxtjaxx_: you can infate your templates from the __DATA__ section
15:17 xantus[] ./my_app inflate
15:18 xantus[] this will overwrite existing files
15:32 xxtjaxx_ xantus[]: xap fixed my Problem already thanks though :)
15:32 xantus[] ok cool
15:32 xxtjaxx_ rather wonder if I could forge a for()-loop into my template inorder to generate a list
15:33 xantus[] yes
15:33 xxtjaxx_ xantus[]: ^
15:33 xxtjaxx_ ah
15:33 xantus[] you can put code within <% %> blocks
15:34 xantus[] like <% for my $i ( 0 .. 10 ) { %>fooo <%= $i %><br><% } %>
15:34 xantus[] you can also start a line with %
15:34 xantus[] and do
15:34 xantus[] % for my $i ( 0 .. 10 ) {
15:36 xxtjaxx_ Can I pass arrays via render?
15:36 mikegrb support for HTTP Basic auth in Mojo::UserAgent? I'm doing http://epoxie.net/12059/26,34-38 now but was curious if there was something built in I couldn't find
15:37 xantus[] yeah
15:37 xxtjaxx_ awesome!
15:37 xantus[] xxtjaxx_: http://mojolicio.us/perldoc/​Mojolicious/Guides/Rendering
15:38 xantus[] http://mojolicio.us/perldoc/Mojoli​cious/Guides/Rendering#Stash_Data
15:39 xantus[] mikegrb: yes
15:40 mikegrb xantus[]: oh?
15:40 xantus[] I know it supports the user/pass on the url
15:40 mikegrb ahh yeah, I tried that but the username is actually an email address and it seemed the @ was screwing the pooch
15:40 xantus[] I'll check if theres another way
15:42 xantus[] Mojo::URL
15:42 xantus[] it has $url->userinfo('user:password')
15:42 mikegrb interesting
15:42 xantus[] your email address may need to be url encoded anyway
15:43 xantus[] you can get that from use Mojo::Util qw( url_escape );
15:43 mikegrb thanks
15:43 xantus[] yw
15:44 xantus[] line 25
15:44 xantus[] my $url = Mojo::URL->new('http://' . $sub_domain . '.pagerduty.com/api/v1/schedules/');
15:44 xantus[] $url->userinfo( $user.':'.url_escape($pass) );
15:44 xantus[] :)
15:45 xantus[] I see you're joining paths on the url
15:45 xaka joined #mojo
15:46 xantus[] you can use $url->path( ) to set that
15:46 mikegrb yup, just pulled that doc up :p
15:46 xantus[] awesome
15:47 perlrocks Twitter: "lonely shut halted following the update of the Tao mojolicious" (ja) --jamadam http://twitter.com/jamadam​/status/91172008443908098
16:07 mikegrb fyi userinfo wants it not url encoded
16:08 xantus[] sri: http://xant.us/files/EV.pm
16:08 mikegrb though the docs imply otherwise
16:08 xantus[] odd
16:08 mikegrb indeed
16:09 mikegrb precludes having a : in the username or password I would think but maybe not
16:09 cosmincx left #mojo
16:10 arpadszasz left #mojo
16:17 mikegrb http://epoxie.net/12060 way cleaner
16:17 mikegrb <3 Mojo::URL
16:18 mikegrb oops, added the base path on line 28 and 35, can remove on 28 making it shorter
16:30 sugar left #mojo
16:38 perlrocks Twitter: "Mojolicious-Plugin-WriteExcel 2.01 by ZAKAME - http://metacpan.org/release/ZAKAME/​Mojolicious-Plugin-WriteExcel-2.01/" --cpan_new http://twitter.com/cpan_ne​w/status/91184680514240512
16:38 shonorio left #mojo
16:47 spleenjack left #mojo
17:00 robinsmidsrod left #mojo
17:00 Kulag left #mojo
17:01 Kulag joined #mojo
17:10 kom heya
17:12 robinsmidsrod joined #mojo
17:22 amoore joined #mojo
17:31 zloyrusskiy joined #mojo
17:32 zloyrusskiy hello, i found a bug in Mojo::DOM, where can i report information about it?
17:38 crab here. or on the mailing list.
17:38 crab what's the bug?
17:38 purl the bug is not exclusive to b_jonas's home machine, I could reproduce it elsewhere on different machines.
17:39 crab no, purl, the bug is <reply>
17:39 purl okay, crab.
17:39 tempire zloyrusskiy: first step, write a failing test
17:40 xaka zloyrusskiy: pravda zloy? :)
17:43 zloyrusskiy hehe, privet, xaka
17:44 xaka zloyrusskiy: so what the bug?
17:45 mattastrophe left #mojo
17:58 sh9 left #mojo
18:07 amoore left #mojo
18:27 xaka sri: looks there is a bug in Mojo::Util decode function. Mojo::UserAgent->new->get($url)->res->dom for "http://stars-auto.com/catalog/p102/" returns undef and 2 the same warnings "Use of uninitialized value $html in pattern match (m//) at C:/strawberry/perl/site/lib/Mojo/DOM/HTML.pm line 104". But when we change Mojo::Util decode on Encode::decode - everything works fine (there is no undef anymore
18:31 xaka update: utf8 "\x88" does not map to Unicode at C:/strawberry/perl/site/lib/Mojo/Util.pm line 350.
18:39 xaka sri: http://pastebin.com/scPG1KLs there is really simple and small test case to see the difference between Mojo::Util and Encode modules.
19:07 |nagual| privet
19:08 xaka hi
19:08 purl hola, xaka.
19:08 xaka purl: get lost
19:08 purl xaka: sorry...
19:09 xaka purl: still here?
19:09 purl xaka: bugger all, i dunno
19:09 xaka purl: bla bla bla
19:09 purl xaka: excuse me?
19:09 |nagual| xaka: vrode ne raz govorili 4to pod win nerabotaet normalno
19:13 xaka |nagual|: decode is platform independent
19:19 mattastrophe joined #mojo
19:26 lammel joined #mojo
19:28 lammel left #mojo
19:50 lammel joined #mojo
19:53 abra left #mojo
20:10 sri xaka: you're wrong
20:10 sri xaka: your input data is just broken
20:10 sri UTF-8 is strict, utf8 is not
20:13 xaka in this case i can't change what web-site returns so what i should do to solve the problem?
20:14 sri fix the data before passing it to Mojo::DOM
20:17 zloyrusskiy left #mojo
20:29 shonorio joined #mojo
20:30 tempire http://images.cryhavok.org/d/3340-2/Unicode.jpg
21:08 xaka i'm trying to add some helper during the test and it isn't accessible from controller, but still accessible from $t->app->my_helper. I did wrong?
21:09 vel left #mojo
21:23 marcus oi mnogo russki zdes.
21:24 xaka ochen mnogo
21:24 marcus actually, I guess they all went to sleep by now :p
21:24 marcus ah, I was wrong :)
21:24 xaka haha, net
21:25 xaka russian never sleeps! (like it's singing in song)
21:25 marcus my russian wife just went to bed. :p
21:25 marcus but maybe she's not sleeping
21:25 xaka or may be she isn't so russian :) spy
21:26 xaka be careful
21:26 purl if you can't be careful, name it after me
21:26 marcus well, she has a norwegian passport these days :p
21:26 xaka looks strange, isn't?
21:26 xaka russian wife with norw passport living in .. where?
21:26 marcus oslo :p
21:27 marcus xaka: i gde ty?
21:28 xaka california :p
21:28 marcus no wonder you are not sleeping :)
21:28 xaka but actually i'm from russia, krasnodar (1400km from moscow)
21:28 shonorio left #mojo
21:29 marcus mm. I'm sending my wife and daught on vacation to her mother on monday. in st. petersburg.
21:29 marcus finally some time for hacking :D
21:29 xaka does every norwegian citizen listen black metal? :)
21:29 marcus no
21:29 marcus but it's our biggest export, apparently
21:30 xaka and you dont burn churches? o_O
21:30 marcus xaka: nope. afraid not. it's just a very marginal group of satanists.
21:30 xaka how did u meet your wife? norw and russia isn't so close to each other :)
21:31 marcus xaka: actually, norway and russia share borders :-p
21:31 marcus but only in the north
21:31 marcus xaka: I first met her on ICQ, about 9 years ago. Then when she was on vacation in Norway. Then I visited her in russia...
21:32 xaka norw has a great and epic beatiful nature, i've never been there but i saw a lot
21:32 xaka did she teach u russian?
21:32 marcus a little. Mostly I learn from watching russian cartoons with my daughter :)
21:33 marcus like cheburashka and vinnie pukh :p
21:33 xaka it's better to look chebush under some drugs i believe :) unreal creature
21:34 marcus :D
21:34 xaka but i like it from my childhood
21:34 marcus we watch more modern stuff too, like luntik and smeshariki
21:35 xaka happy tree friends better than smeshariki :-D
21:35 marcus but yeah, chebush is a bit unreal. We even have a doll which says stuff like 'ja lublu moloko'!
21:35 xaka do u have matreshka?
21:36 marcus of course. several
21:36 xaka ))
21:36 xaka russian test passed
21:36 xaka ;)
21:36 marcus xaka: I actually think  smeshariki is better than happy tree friends. Gore gets boring quickly
21:36 marcus happy tree friends was fun for a while tho
21:37 marcus but I don't let my daughter watch it ;)
21:37 marcus (she's 2.5 years)
21:37 xaka oh, ok :) agree
21:37 metaperl_ joined #mojo
21:41 metaperl left #mojo
21:44 sri |nagual|: if you're not getting any answers it usually means nobody understood the question, highlighting me won't change that, so please refrain from doing it
21:45 |nagual| im move all templates to external folder and all work fine
21:45 |nagual| senks
21:46 marcus |nagual|: maybe you need use utf8; in the top of your file?
21:46 |nagual| problems in size of __DATA__ bloks
21:47 marcus |nagual|: use utf8 tells perl to parse your source code as unicode. that probably includes __DATA__
21:47 |nagual| big __DATA__ leads to many problems
21:48 |nagual| all templates only utf8
21:48 sri big is a relative term
21:49 sri we have tests with a rather big DATA section https://github.com/kraih/mojo/blob/m​aster/t/mojolicious/lite_app.t#L1826
21:50 sri at some point we bundled like 250kb of base64 encoded images in a DATA section
21:52 |nagual| my test http://pastebin.com/n0dDZM2C
21:55 xaka sri: there is startup, but where can i get shutdown? i need to do some cleanup, fork process killing and so on. Any suggestions?
21:56 |nagual| xaka: vidish moyu testovuyu pagu ?
21:56 xaka |nagual|: aha
21:56 sri xaka: please do not highlight me for questions other people here can answer too
21:56 xaka there is startup, but where can i get shutdown? i need to do some cleanup, fork process killing and so on. Any suggestions?
21:56 sri or i have to deactivate growl notifications :/
21:57 |nagual| xaka: iz za bolshogo bloka dati starman da i gipnoload na4inayut bidavat 404
21:58 sri and please no russian in this channel
21:58 sri feel free to start #mojo.ru, but this one is english
21:58 lammel ah I thought it was base64 encoded text ;-)
21:58 |nagual| xaka: ya perenes vse templeyti v otdelnie fayli i oshibki propali
22:00 |nagual| ok only english $-)
22:00 marcus be careful, or sri will retaliate with german :p
22:01 xaka ups
22:02 sri ja das werde ich!
22:02 lammel left #mojo
22:03 marcus sri: es tut mir leid.
22:03 sri xaka: DESTROY
22:04 marcus xaka: SEEK
22:04 xaka destroy looks ugly, i'd like to have a clear opposite of startup - shutdown
22:04 sri (the answer, since you asked the channel)
22:04 marcus but actually, that is not mojolicious related at all, is it?
22:05 xaka i think it is because mojo has startup, so shutdown is expected. imho
22:06 sri startup is there because overloading new is risky, having a DESTROY is not
22:06 stephen left #mojo
22:06 sri i'll think about shutdown though
22:06 xaka left #mojo
22:07 xaka joined #mojo
22:08 metaperl_ left #mojo
22:09 kaare left #mojo
22:11 xaka if i'm writting the test and using ioloop inside, should i test Mojo::IOLoop via use_ok? the question about best pracites
22:12 xaka *practices
22:12 marcus xaka: you don't need to test that Mojo::IOLoop can be used, Mojolicious already tests that :p
22:12 marcus xaka: use use_ok for your own classes.
22:12 xaka but what if it's not installed?
22:13 marcus xaka: that's a problem for Makefile.PL, not the test suite.
22:13 xaka k, got it, ty
22:14 * xaka whispering spasibo to marcus so sri can't hear it...
22:14 * marcus just bought http://keynotekungfu.com/ - pretty neat!
22:18 tempire huh.  a keynotopia competitor
22:25 stephen joined #mojo
22:29 zloyrusskiy joined #mojo
22:31 |nagual| left #mojo
22:31 xaka another idea: when running tests, set mode automatically to "testing" so users could do mock magic inside mode_testing and dont change MOJO_MODE manually
22:32 tempire shnikies.  the mojocasts theme sounds a lot different with a subwoofer.  a completely different feel.
22:35 sri xaka: might make sense, but would break too many existing apps
22:36 mattastrophe left #mojo
22:37 zloyrusskiy left #mojo
23:09 sri http://tools.ietf.org/html/dra​ft-pbryan-zyp-json-pointer-00 # interesting

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