Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-10

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

All times shown according to UTC.

Time Nick Message
00:21 smpb joined #mojo
00:46 keedi joined #mojo
00:50 egopro joined #mojo
01:06 laouji joined #mojo
01:14 Mike-PerlRecruiter_ joined #mojo
01:21 sawtooth joined #mojo
03:15 xaka joined #mojo
03:31 keedi joined #mojo
03:35 Molaf joined #mojo
03:54 noganex_ joined #mojo
03:55 yko joined #mojo
03:59 jwang joined #mojo
04:36 Foxcool joined #mojo
04:47 keedi joined #mojo
05:42 cooper joined #mojo
05:45 laouji joined #mojo
06:15 Averna1 left #mojo
06:19 D4RK-PH0ENiX joined #mojo
06:44 Vandal joined #mojo
06:46 spleenjack joined #mojo
06:53 davido joined #mojo
06:54 mattastrophe joined #mojo
07:08 dpetrov_ joined #mojo
07:19 batman tempire: it's important to be able to read and understand other people's code. perltidy makes you lazy.
07:20 batman i also like to have my "final touch" on the code, while perltidy makes it look like a computer has written it's own program
07:20 tempire if everyone on your team uses perltidy, there's no issue
07:20 batman and i don't agree with perltidy all the time.
07:20 batman anyway... i have to run off to work
07:20 batman ttyl
07:21 batman (i don't really want to discuss perltidy anyway. it's like discussing religion)
07:21 batman left #mojo
07:23 davido I reviewed some existing code for a newish client the other day.  :( 30k lines of code, 300 lines of tests.  No wonder they kept discovering killer bugs.
07:23 davido None of the tests went past "use_ok"
07:44 amirite joined #mojo
08:14 batman joined #mojo
08:22 dod joined #mojo
08:22 dod joined #mojo
08:33 suy joined #mojo
08:33 dod joined #mojo
08:38 yakudza joined #mojo
08:40 sinkovsky joined #mojo
08:43 ver joined #mojo
09:09 espent joined #mojo
09:11 cosmincx joined #mojo
09:15 alexeiras joined #mojo
09:22 Vandal joined #mojo
09:30 fhelmber_ joined #mojo
09:41 Vandal joined #mojo
09:43 Vandal joined #mojo
09:47 suy joined #mojo
09:57 avkhozov joined #mojo
09:58 avkhozov hi all!
09:58 avkhozov how can I correctly reset the cache of the app->renderer ?
10:01 avkhozov now I use this method: "undef $self->app->renderer->cache->{cache};" but this will not work, if the internal representation of Mojo::Cache will change.
10:13 amirite joined #mojo
10:21 SmokeMachine joined #mojo
10:21 SmokeMachine joined #mojo
10:29 Molaf joined #mojo
10:57 SmokeMachine joined #mojo
11:04 SmokeMachine joined #mojo
11:15 kitt_vl joined #mojo
11:16 ObseLeTe joined #mojo
11:17 dotan joined #mojo
11:41 hmd joined #mojo
11:47 b2b joined #mojo
12:01 spleenjack1 joined #mojo
12:10 egopro joined #mojo
12:20 egopro joined #mojo
12:22 egopro joined #mojo
12:24 lammel2 joined #mojo
12:36 sinkovsky joined #mojo
12:43 zivester joined #mojo
13:14 Mike-PerlRecruiter_ joined #mojo
13:32 egopro joined #mojo
13:41 mire__ joined #mojo
13:49 dabudabu joined #mojo
13:59 batman i don't get this new hash algorithm in perl... does it mean that the elements in (@keys,@values) @keys = keys %hash; @values = values %hash; does not have the expected order?
13:59 Mithaldu keys and values executed in the same process on the same hash without any change inbetween return the same order
14:00 batman even with the new hash algorithm?
14:00 Mithaldu however as soon as the hash is changed or the process is restarted, the order changes
14:00 batman yeah, i know that
14:00 avenj Mithaldu: that's no longer true, from my understanding
14:00 Mithaldu avenj: keys and values still remain identical in return order
14:00 Mithaldu as long as the hash is not changed inbetween
14:00 avenj http://search.cpan.org/~rjbs/perl-5.17.6/pod/​perldelta.pod#Per_process_hash_randomization
14:01 avenj hmm
14:01 batman Mithaldu: are you absolutely sure about that after the 5.17.6 change?
14:01 avenj maybe I'm misunderstanding that perldelta
14:01 avenj but I seem to recall people hitting/fixing 5.17.6 bugs that're exactly that
14:02 * avenj compiles 5.17.6
14:03 Mithaldu avenj: you are misunderstanding
14:03 Mithaldu and no
14:03 Mithaldu they are hitting bugs like
14:04 Mithaldu my $first = blah(); sub blah { values %moo }
14:04 Mithaldu err
14:04 Mithaldu my $first = (blah())[0]; sub blah { values %moo }
14:04 Mithaldu batman: yes, completely
14:05 avenj roger that
14:07 batman Mithaldu: so they expect that $first is always the same value?
14:07 batman i don't get the code... it shouldn't work earlier either..?
14:07 inokenty joined #mojo
14:07 Caelum so I'm writing my first mojolicious app today
14:10 Caelum since catalyst is dead
14:10 Mithaldu batman: it worked until 5.17.6 :)
14:10 batman hm...
14:10 Mithaldu also
14:11 Mithaldu $first was wrong
14:11 Mithaldu it wasn't the first in any sense of the word, really
14:11 batman what surprises me even more is that i'm getting failing reports on my modules, because i never thought what you just wrote would ever work
14:11 Mithaldu but the test worked
14:13 sinkovsky joined #mojo
14:14 Caelum does Mojolicious::Lite automatically import strict and warnings?
14:16 inokenty Caelum: You can check it: perl -MMojolicious::Lite -e '$n'
14:17 memowe Caelum: https://github.com/kraih/mojo/blob/​master/lib/Mojolicious/Lite.pm#L53
14:18 Caelum ok thank you
14:18 memowe Caelum: (https://github.com/kraih/mojo/b​lob/master/lib/Mojo/Base.pm#L44)
14:21 sri explained in the first example ;p http://mojolicio.us/perldoc/​Mojolicious/Lite#Hello_World
14:22 avenj Mithaldu: thanks for clarifying btw, I think I'm up to speed now
14:23 Mithaldu cheers
14:23 Mithaldu (you got lucky, i don't normally hang here because i don't even use mojolicious :)
14:23 Mithaldu speaking of: sri: any chance i can talk you into making input-decoding configurable?
14:33 b2b joined #mojo
14:36 marcus MojoliciousPocketIO!
14:37 marcus http://blog.ishitoya.info/entry/2012/12/10/184​441?utm_source=dlvr.it&utm_medium=twitter
14:38 sinkovsky joined #mojo
15:09 sinkovsky joined #mojo
15:15 Britzel_ joined #mojo
15:44 batman can i make link_to point to another format? i'm trying link_to 'yay!', 'route_name', format => 'txt' which doesn't seem to work...
15:44 Foxcool joined #mojo
15:49 Britzel_ "doesn't seem to work" means exactly what? A 404?
15:49 knshaum joined #mojo
15:51 batman it doesn't add ".txt" to the end of the link
15:54 tempire purl: karma tempire
15:55 tempire damnit
15:57 memowe Britzel_: I started to think about exploding computers (doesn't seem to work). Lots of fun. In my head.
15:57 Britzel_ memowe: Good luck :)
15:57 memowe Thanks, I'm pretty happy now.
16:01 marty batman:   %= link_to Yay => 'yay.txt'
16:02 rem_lex joined #mojo
16:03 Caelum does mojolicious do any kind of caching in CGI mode? I'm changing my cgi but it's not picking up the changes
16:03 d4rkie joined #mojo
16:04 Caelum this makes no sense
16:08 good_news_everyone joined #mojo
16:08 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Lf04ag
16:08 good_news_everyone mojo/master 632e25e Sebastian Riedel: better link_to examples and tests
16:08 good_news_everyone left #mojo
16:08 sri batman: there you go
16:08 rhaen joined #mojo
16:09 jnbek^dt joined #mojo
16:09 rhaen hello
16:09 sri o/
16:11 rhaen oh, sri.
16:11 rhaen Could you remove my commit bit again, pls.
16:11 rhaen I won't be able to do much work the next time :(
16:11 rhaen sorry.
16:11 rhaen work...
16:12 Kulag joined #mojo
16:12 sri no worries, the wiki seems to be in good shape
16:15 d4rkie joined #mojo
16:17 good_news_everyone joined #mojo
16:17 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/15RBnA
16:17 good_news_everyone mojo/master 2ef5b36 Sebastian Riedel: fixed link_to example
16:17 good_news_everyone left #mojo
16:37 atz joined #mojo
16:44 sinkovsky joined #mojo
16:49 stephan48 i need to exec a cmd line tool and capture and deliver its output to the user, currently i use backticks to execute them but are there better means? f.e. for long running processes?
16:54 b2b stephan48: hello! that depends on what your command line tool does: is re-implementing the functionality in perl an option for you? or are you only looking for better coding style/syntactic advice
16:55 stephan48 b2b: we got a sortiment of wellbehaved scripts in different languages which we execute.. rewriting is done where possible already :)
16:55 stephan48 rather a better way to fit the stuff into the non blocking design :)
16:56 ladnaV joined #mojo
16:56 b2b ah! then try the qx() syntax: http://perldoc.perl.org/perl​op.html#Quote-Like-Operators
17:06 xaka joined #mojo
17:10 bluescreen joined #mojo
17:28 mire__ joined #mojo
18:17 Caelum I have this script: http://gist.github.com/4252236 when I go to /cgi-bin/api/work_order_category/p it says "None of these routes matched your GET request for , maybe you need to add a new one?" This is what I see in error_log: https://gist.github.com/4252269
18:19 marty Caelum:  Did you inspect the routes of your app using <script> routes
18:19 Vandal joined #mojo
18:21 Caelum If I run perl script get '/work_order_category/p' it says no content (don't know how to pass a json accept header on the command line)
18:22 Caelum but it matches the route
18:25 Caelum yeah if I add an html => { text => 'foo' } to the respond_to it prints it out
18:26 Caelum oh I see, if I only have json in my respond_to and not in the accept header it thinks nothing matched
18:27 Caelum is there a way to pass a ?content_type=foo or something to override what it responds to
18:30 Caelum format
18:31 atz joined #mojo
18:34 Caelum my second route doesn't match
18:51 batman joined #mojo
19:03 suy joined #mojo
19:15 Caelum so, why does: get '/foo/:p' => [p => qr/^\d+\z/] not match while get '/foo/:p' => [p => qr/\d+/] match?
19:16 Caelum oh it says in the docs
19:23 mattastrophe joined #mojo
19:24 inokenty http://mojolicio.us/perldoc/Mojolicious/Gu​ides/Routing#More_restrictive_placeholders
19:25 atz hah
19:29 tempire We need a command to list all loaded plugins and helpers.
19:32 sri ./myapp eval -v 'join "\n", keys %{app->renderer->helpers}'
19:34 sri well... it's more pretty if you assume a modern perl :)
19:35 sri ./myapp eval -v 'join "\n", keys app->renderer->helpers'
19:36 tempire I'd forgotten about eval
19:36 tempire what a nifty little tool
19:36 inokenty ./myapp eval -v 'join $/, keys app->renderer->helpers'  =)
19:37 Caelum can you have an optional pathpart? like to match both /foo/:p and /foo/
19:38 tempire Caelum: http://www.mojocasts.com/e​2#Optional%20Placeholders
19:39 Caelum tempire: thank you
19:59 Caelum what do you guys use for db access? DBIx::Class? DBIx::Connector? plain DBI?
19:59 Britzel_ DBIx::Class
19:59 * Caelum sighs
19:59 * Britzel_ sighs too
19:59 mjy left #mojo
19:59 Caelum I'd like to avoid that one, given my history with that project
20:00 Britzel_ Well, then don't.
20:00 Caelum until I have time to fork it anyway
20:01 Britzel_ The learning curve is steep, and once you have reached a certain understanding you ask yourself if this was woth it. But in the end it is. Depends on the size of the project. YMMV.
20:01 Britzel_ s/woth/worth/
20:01 Caelum oh yeah, I know it very well, I wrote half the fucking storage layer
20:01 sri nosql!
20:02 Caelum heh
20:15 Caelum so if you do '/foo/*p' => [p => ['', 'val1', 'val2']] you can match /foo/val1 and /foo/ but not /foo
20:19 yakudza joined #mojo
20:23 suy joined #mojo
20:23 Caelum aha, I want '/foo(*p)' => [p => ['', '/val1', '/val2']
20:23 Caelum that works great
20:24 Caelum even matches /foo/ as a bonus
20:34 lukep joined #mojo
20:36 atz joined #mojo
21:12 xaka joined #mojo
21:22 mire__ joined #mojo
21:35 mjy joined #mojo
21:37 alexeiras joined #mojo
21:38 drift joined #mojo
21:45 marcus Absolutely loved today's Simpsons.
21:45 marcus Portlandia
21:45 * sri loved Simpsons before it was cool
21:47 bluescreen_ joined #mojo
21:50 Caelum it's not as cool as it used to be
21:50 Caelum and the movie was horrible
21:51 suy Caelum: you kidding? the movie was great compared to the chapters that were airing at that time (at least here in spain).
21:54 asarch joined #mojo
22:01 tempire spider pig
22:01 sri SPIDER PIG!
22:01 tempire no he can't
22:01 tempire 'cause he's a pig
22:04 marcus great ringtone
22:14 * tempire really needs a 3rd monitor
22:16 spyder2010 joined #mojo
22:33 marty sorry guys, but twice upon a time (http://www.youtube.com/watch?v=chsYvlsqQtM) kicks butt over everything.  :)
22:43 marcus ッシ - Japanese seems like a very happy language
22:44 suy joined #mojo
22:47 tempire that might just be in the running for the 4.0 symbol
23:01 tempire marty++
23:03 Averna1 joined #mojo
23:16 marty \o/
23:22 jzawodn joined #mojo
23:24 bluescreen joined #mojo
23:47 ObseLeTe joined #mojo

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