Camelia, the Perl 6 bug

IRC log for #mojo, 2012-11-05

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

All times shown according to UTC.

Time Nick Message
00:00 * dross yawns
00:00 dross :V
00:00 dross wake up and start coding, no need for sleep
00:27 edenc joined #mojo
01:03 laouji joined #mojo
01:04 lukep joined #mojo
01:17 Mike-PerlRecruiter_ joined #mojo
01:20 good_news_everyone joined #mojo
01:20 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/XPqOyQ
01:20 good_news_everyone mojo/master 4839160 Sebastian Riedel: better template customization test
01:20 good_news_everyone left #mojo
01:22 kenjiskywalker joined #mojo
01:23 asarch joined #mojo
01:57 d4rkie joined #mojo
01:57 d4rkie joined #mojo
02:09 zivester joined #mojo
02:47 xaka joined #mojo
03:14 zpmorgan joined #mojo
03:39 inokenty joined #mojo
03:40 noganex_ joined #mojo
03:43 xaka joined #mojo
04:05 nic https://github.com/defunkt/unicorn looks interesting
04:09 Foxcool joined #mojo
04:10 gryphon joined #mojo
04:33 jamesw Starman is the rough Plack equivalent
05:24 * sri yawns
06:49 rem_lex joined #mojo
06:49 dpetrov_ joined #mojo
07:38 dod joined #mojo
07:43 yakudza joined #mojo
07:47 xaka joined #mojo
08:04 fhelmber_ joined #mojo
08:20 Vandal joined #mojo
08:24 dod joined #mojo
08:34 pau4o joined #mojo
08:42 pau4o left #mojo
08:46 migo joined #mojo
08:56 cosmincx joined #mojo
08:59 dod joined #mojo
09:29 memowe_ joined #mojo
09:31 batman joined #mojo
09:38 batman left #mojo
09:41 zdk joined #mojo
09:41 batman joined #mojo
09:44 Britzel joined #mojo
09:59 memowe_ O HAI! \o
10:03 kitt_vl joined #mojo
10:03 kitt_vl1 joined #mojo
10:04 kitt_vl1 left #mojo
10:12 sh4 joined #mojo
10:12 ObseLeTe joined #mojo
10:13 keedi joined #mojo
10:26 vvvvv joined #mojo
10:32 cosmincx joined #mojo
10:45 cstamas joined #mojo
10:45 cstamas re
10:47 cstamas on openbsd a test fails
10:47 cstamas http://pastebin.com/KpgHyVLP
10:52 sri Macbook keeps crashing :(
10:53 cstamas oh
10:54 Adura Some Foxconn worker doesn't like you.
10:54 * sri might have to get a new one after all
10:56 Adura Maybe you should buy another brand.
10:57 sri Maybe not
10:57 Adura If a laptop brand failed me, I'd change brands.
10:57 sri It's over 3 years old
10:59 marcus sri: 13" retina mbp looks delicious.
11:00 sri No 1.0 apple product for me :p
11:00 sri thinking about the latest air
11:03 sri Hmm, maybe the ocz ssd i put into that thing is failing
11:03 marcus sri: srsly, you want the retina display
11:03 sri 13
11:03 sri Umm
11:03 marcus sri: go to an apple store and test it
11:04 sri 13" retina seems to have performance issues
11:04 sri Been testing the 15", but my boss is too cheap for that :p
11:05 sri Quad core would be neat
11:13 ladnaV joined #mojo
11:13 cstamas sri: if you have some idea on the pastebin issue I posted plz tell me. thx.
11:24 sri That paste tells me nothing
11:25 Adura Things didn't go according to plan, it seems.
11:31 cstamas sri: that is exactly what I get: "Parse errors: No plan found in TAP output"
11:31 cstamas sri: what do you need?
11:32 cstamas what shall I do/try?
11:39 SmokeMachine joined #mojo
11:47 dpetrov_ joined #mojo
11:48 dbr joined #mojo
11:49 dpetrov_ any idea what is wrong here? http://paste.scsys.co.uk/212687
11:50 fhelmber_ joined #mojo
11:51 dpetrov_ could it be the blank line before the <html> tag returned from metacpan?
12:27 ObseLeTe joined #mojo
12:30 dpetrov_ joined #mojo
12:34 bluescreen joined #mojo
12:55 sri yea, removed the ssd and no more crashing :S
13:17 trone joined #mojo
13:17 asarch joined #mojo
13:18 Mike-PerlRecruiter_ joined #mojo
13:54 michaelfung joined #mojo
14:04 jpn joined #mojo
14:05 batman left #mojo
14:05 batman joined #mojo
14:08 gryphon joined #mojo
14:10 bluescreen joined #mojo
14:30 garu anymore knows why perl -Mojo -E 'say g(q[http://www.dicionariodenomesproprios.com.br])->body' gives me gibberish?
14:30 garu or is it not gibberish?
14:31 Adura Because that's a Brazilian website.
14:31 garu and brazilian websites aren't supported?
14:31 Adura Heh.
14:32 garu feels like I'm doing something wrong. perl -MWWW::Mechanize -E 'my $m=WWW::Mechanize->new; $m->get( q[http://www.dicionariodenomespro​prios.com.br/nomes-masculinos/] ); say $m->content' works like a charm
14:33 garu perl -MWWW::Mechanize -E 'my $m=WWW::Mechanize->new; $m->get( q[http://www.dicionariodenomesproprios.com.br] ); say $m->content', even (bad paste before)
14:34 garu however, I get the same gibberish if I perl -MWWW::Mechanize -E 'my $m=WWW::Mechanize->new; say $m->get( q[http://www.dicionariodenomesproprios.com.br] )->content'
14:34 garu which leads me to think I'm trying to see the wrong content
14:34 Adura The stupid website always gzips content?
14:34 garu (in Mojo::UserAgent)
14:35 Adura perl -Mojo -E 'say g(q[http://www.dicionariodenomesproprios.com.br])->body' | gzip -dc
14:36 Adura Tell the webmaster to actually check Accept-Encoding.
14:36 garu not my website
14:36 garu :)
14:37 Adura Find their contact info...!@
14:43 daniel_ joined #mojo
14:51 GabrielVieira joined #mojo
15:10 garu Adura: meh. I rather implement an IO::Compress plugin for Mojo::Message :)
15:15 sri garu: yea, the website is broken, the http spec does not allow that behavior
15:17 * sri just ordered a macbook air o/
15:34 labrown joined #mojo
15:35 knshaum joined #mojo
15:51 baton8 joined #mojo
16:02 Foxcool joined #mojo
16:30 dabudabu joined #mojo
16:45 GabrielVieira joined #mojo
16:52 GabrielVieira joined #mojo
17:03 xaka joined #mojo
17:35 robinsmidsrod joined #mojo
17:35 batman joined #mojo
17:54 dpetrov_ joined #mojo
17:57 gryphon joined #mojo
18:01 dod joined #mojo
18:07 dod1 joined #mojo
18:19 dod joined #mojo
19:16 asarch joined #mojo
19:19 coff joined #mojo
19:20 Kovensky joined #mojo
19:21 thaljef joined #mojo
19:27 coff I'm lookin at upgrading to a newer(ish) version of mojolicious so I can start using some of the new cool features, but have run into a snag that bothers me quite a bit. On all our servers we have Puppet running so deployment/upgrades etc are a breeze (happy dev-op!). All mojo-instances we have are currently run with hypnotoad specifying where hypnotoad can find the correct configuration-file for that particular instance/app. However now that I a
19:29 thaljef I have routes like "/:user_id/:article_id" rather than the traditional "/user/:user_id/article/:article_id".  In other words, the controllers are not named in the URL.  This has led to a lot of duplicate code in my controllers.  For example, both controllers need to validate the user_id (usually by trying to fetch the object from the DB).  I can see how to eliminate this duplication using nested and/or bridged routes, but that only seem
19:30 Kovensky you write too you people write too much
19:30 Kovensky IRC has a 512 byte per line limit so your sentences are cut off :P
19:30 thaljef Ok, let me carve that up.
19:30 coff doh! I've been away for too long. *fixxing*
19:30 zivester joined #mojo
19:30 coff Where did it cut off?
19:31 Kovensky "However now that I a" (...)
19:31 Kovensky "but that only seem" (...)
19:32 thaljef I can repost after you change the limits…Say when.
19:32 coff [1/2]: However now that I am looking at newer mojo-versions it seems like that has been removed, and that you all of a sudden should  pollute app-config with hypnotoad-specific configuration? Am I reading the code / documentation wrong or is hypnotoad no longer recommended  for use in production-environments? I hope the latter is not the case, because I've come to like hypnotoad quite a bit...
19:32 Kovensky thaljef: lol
19:32 Kovensky thaljef: just speak in multiple lines
19:32 coff that was supposed to say 2 of 2 :p Fsck.
19:32 Kovensky these limits have been as such since the 80s :E
19:33 thaljef No prob.  It just sounded like coff was about to change some configuration.
19:33 coff Kovensky: Thanks for letting me know that the line was cut.
19:33 thaljef I have routes like "/:user_id/:article_id" rather than the traditional "/user/:user_id/article/:article_id".
19:33 thaljef In other words, the controllers are not named in the URL.
19:33 thaljef This has led to a lot of duplicate code in my controllers.  For example, both controllers need to validate the user_id (usually by trying to fetch the object from the DB).
19:34 thaljef I can see how to eliminate this duplication using nested and/or bridged routes, but that only seems to work if I use the traditional routing scheme.  Has any one else run into this?
19:34 Kovensky coff: heh
19:34 Kovensky I don't know the answer to your questions (haven't poked mojolicious much), but at least now that they're complete someone might be able to help =p
19:36 coff Hopefully whoever maintains hypnotoad the most will notice and reply. :)
19:37 coff And I now loaded irssi's autowrap.pl-script, so hopefully it'll turn out ok the next time I braindump.
19:37 rem_lex joined #mojo
19:42 GabrielVieira joined #mojo
19:59 yko sri: did you know that Komodo IDE has Mojo ep syntax highlighting?
20:04 yko Oh, yes, you did.
20:07 perlite joined #mojo
20:12 janus hrm, am i missing something or are nested templates just not easily possible out of the box?
20:12 janus so far no approach gave me that, example: http://nopaste.info/934cf15364.html
20:13 janus IIRC a comment in the code mentions it... but I guess I don't want to believe ;)
20:17 janus an alternative would be to have named content blocks everywhere with names to represent the structure
20:17 janus ... but then I do enjoy simplicity and would love to get away without it :)
20:23 asarch joined #mojo
20:25 Kulag joined #mojo
20:31 rem_lex|pivo joined #mojo
20:32 lukep joined #mojo
20:40 yakudza joined #mojo
21:12 batman joined #mojo
21:13 xaka joined #mojo
21:13 GabrielVieira joined #mojo
21:20 janus FTR: no solution vs. ugly but working: http://nopaste.info/3dc73db6e9.html
21:24 Kulag joined #mojo
21:28 janus inheritance is a confusing term wrt/ templates...
21:29 janus it makes me think SUPER and co
21:29 janus which is clearly not the case here
21:36 janus coff: 0fb81d9cff94d22d6528672188012d3d692ed5af did the change
21:37 janus coff: and the comment says it was already deprecated before that
21:48 janus coff: to point at a potential solution: maybe add some code to merge the old config
21:52 thaljef joined #mojo
21:57 dod joined #mojo
21:59 marcus effin RHEL
22:07 janus cstamas: hmmm, nice one
22:08 janus cstamas: adding VERBOSE=1 to make flags help, as does adding HARNESS_IS_VERBOSE=1
22:10 janus heh, another thing that helps:
22:10 janus -  local $Test::Builder::Level = $Test::Builder::Level + 2;
22:10 janus +  #local $Test::Builder::Level = $Test::Builder::Level + 2;
22:11 coff janus: Thanks for the pointer to that commit. Though I have not been able to find any information about why it was deprecated and then removed. :( Perhaps @sri can point to the reason?
22:14 tempire coff: hypnotoad is still recommended, and has not been deprecated.
22:14 janus nobody said that :)
22:15 marcus janus: well, coff sorta asked about that.
22:15 janus the config file, but yes
22:16 marcus " Am I reading the code / documentation wrong or is hypnotoad no longer recommended for use in production-environments?"
22:17 coff marcus: It just seems so utterly bizzare to mix server-config with app config. Seems like to domains that should be clearly separated...
22:17 janus oops, anyhow - that was not his question as I understood it ;)
22:17 batman what is replacing hypnotoad?
22:17 janus wHYPNOTOAD!
22:18 janus damit!
22:18 tempire coff: you can specify the hypnotoad config in a mode-specific config file
22:18 janus maybe that's why i did not even go into it
22:18 coff tempire: Excellent! I've been looking in the docs for info about that, but perhaps I've been looking in the wong places.
22:19 janus in fact, hypnotoad is replaced with hypnotoad on every restart, basically :)
22:19 marcus coff: myapp.production.conf
22:19 coff marcus: uh, ok? but then you're mixing app and server-config?
22:20 marcus coff: you could keep all your app stuff in myapp.conf and the hypnotoad config i the .production.conf one
22:20 bobkare that also still means the hypnotoad config needs to be in a different format depending on what config plugin the application happens to load, right?
22:21 marcus bobkare: .conf is always perl
22:21 marcus bobkare: the other config loaders using myapp.json and myapp.yml afaik
22:21 bobkare marcus: right, so if some app happens to use JSONConfig .production.conf basically stops working
22:22 coff bobkare: ouch. Thats also and issue..
22:22 coff *an
22:23 coff marcus: do you know anything about the motivation for removing the nice and clear separation of app and hypnotoad-config?
22:24 marcus coff: you can probably find it in the irc logs if you're motivated to search around the time it was deprecated.
22:27 marcus coff: https://github.com/kraih/mojo/issues/280
22:29 coff marcus: Thanks for finding that. I wish I'd been around when that came up..
22:29 bobkare So basically it's impossible to configure the web server without support from the app. imho that sucks.
22:29 coff marcus: from the ops side it makes no sense (at least not to me..)
22:30 duncanthrax2 joined #mojo
22:30 marcus bobkare: hypnotoad isn't a general purpose web server, it's a daemon for running mojolicious apps
22:30 marcus coff: Why wouldn't the ops side also manage the app config?
22:31 marcus as a developer, the things I expose in the app config are usually there so that ops can configure them ...
22:31 batman coff: do $app->config->{hypnotoad}{listen} = [split /,/, $ENV{LISTEN} ] if $ENV{LISTEN} or something
22:31 bobkare I've written a few _really_ small and quick lite apps lately that doesn't really need any config, but with this I still need at least 3 lines of boilerplate to be able to set listen port and log somewhere other than /dev/null with hypnotoad
22:32 marcus bobkare: you'd still need the same boilerplate in a different file the way it was before.
22:32 janus but only once
22:32 bobkare marcus: No, because with the way it was before I have a puppet module that fixes it
22:32 coff batman: so what you are saying is that you should special-handle all params hypnotoad handles inside each app?
22:33 batman coff: or make bobkare's puppet set them up :)
22:33 batman i think you're mostly making a big fuzz out of nothing
22:33 bobkare batman: that only works with the old system
22:33 coff batman: I use puppet myself, and seem to be in the same boat as bobkare
22:33 batman it's really easy to focus on the problems rather than the solutions...
22:34 bobkare With how it is now I can't write such a puppet module without deeply introspecting the app to find out what kind of config it reads
22:34 batman bobkare: make a mojo plugin which reads ENV variables instead of params from the config and then make a shell script to start hypnotoad :)
22:35 batman the shell script could be generated by puppet
22:35 bobkare how would the shell script inject the plugin?
22:35 coff or we could just fork/patch mojo and roll our own *laugh*
22:35 batman bobkare: as i said: i think you're focusing on the problems and not the solution...
22:36 marcus I guess I find this 'I have no control over what config loader is being used' scenario a bit weird.
22:36 batman anyway... i need to settle marcus' challenge: https://www.getbetsy.com/bet/b21c93edd72a *bbl*
22:37 coff batman: large parts of the initial appeal of mojolicious was the clear separation of concerns it displayed. Now that seems to be slowly and steadily slipping, with more and more things being fuddled up in one ball of goo.
22:37 batman that's just crazy talk :)
22:38 batman what else has gotten fuddled up?
22:38 coff heh
22:38 bobkare marcus: Ah, so you never deploy any applications you haven't written yourself?
22:38 batman except the bundle which was all fuddled in the beginning?
22:38 batman btw: it's an awesome fuddlepack imo :)
22:38 janus coff: isn't that the whole beauty of it?
22:39 batman bobkare: all software should come with instructions...
22:39 coff I'm more a fan of fudgepacking than fuddlepacking...
22:39 bobkare batman: Re: being negative: what solution? I don't see any simple ways of getting $port from my puppet manifest into hypnotoad without assuming lots of stuff about the app
22:40 batman bobkare: can't you rewrite the app.conf file?
22:40 batman MOJO_CONFIG="bobkare/awesome/config"
22:41 batman that should be piece of cake, if you're used to being a puppet master
22:42 bobkare I'm pretty well used to puppet, and want my classes to have a nice and simple user interface, so I want mojolicious::app { 'foobar': svnurl => 'http://...', port => 1234 } should be about all that's needed to get a simple app up and running
22:43 bobkare copy/pasting config files in ends up looking like a bloody mess. Not to mention the potential quoting nightmares of having perl code inside a puppet string, quite a few rules that start interacting there...
22:44 coff When I fire up new nodes I know a little about how a server feels and runs. As {traffic, activity} {on, to} the server changes, puppet will eg. scale up / down workers accordingly, change ports or whatever it feels is best. What you are now saying is that I need to inject the hypnotoad-config into the app-config (which I may never have seen as it is coming from a random dev).
22:45 coff The beauty of hypnotoad was that the devs could provide an app-config in their puppet-manifests, and hypnotoad could get it's config completely separate from that.
22:46 marcus coff: ;
22:46 marcus oops, typo, n/m
22:47 tempire I guess I still don't see the problem.
22:47 tempire you can still separate them using a specific mode
22:47 tempire myapp.conf
22:47 tempire and myapp.puppetmode.conf
22:48 jzawodn joined #mojo
22:49 marcus tempire: they are saying that breaks because they don't know if the app is using a config loader and which one
22:49 coff tempire: ok, so then I _can_ have eg. the myapp.puppetmode-for-hypnotoad.conf placed in an appropriate location, and similarly with myapp.conf (which would hold the app-specific config)?
22:49 bobkare Would a patch to add support for $ENV{MOJO_LISTEN} to Hypnotoad.pm be accepted so it in that respect works like Mojo::Server::Daemon?
22:49 tempire coff: yes.  MOJO_MODE=puppetmode-for-hypnotoad hypnotoad myapp
22:50 coff tempire: where does hypnotoad look for the file in that case? Or did you leave out path now for brevity?
22:50 marcus bobkare: would have to talk to sri about that, hypnotoad has some other considerations than ::Daemon due to the preforking.
22:51 tempire app home directory
22:51 tempire or MOJO_CONFIG env var
22:52 tempire everything you're looking for is in http://mojolicio.us/perldoc​/Mojolicious/Plugin/Config
22:52 tempire except cookies
22:52 tempire sri never includes cookies
22:52 tempire :(
22:53 bobkare marcus: OK, I'll ask him when I see he's around
22:55 coff tempire: ok, now we're getting closer. :) So then one would set MOJO_CONFIG (/etc/someconfigdir/) to point to a directory when both the app and hypnotoad configfiles can be found, plus set MOJO_MODE (magichypnotoadmode) so that both myapp.conf and myapp.magichypnotoadmode.conf will be loaded (from /etc/someconfigdir).
22:57 tempire sounds reasonable.
23:00 * tempire slices open his first avocado
23:02 coff tempire: Great. And the config loaded by hypnotoad depending on MOJO_MODE will and should always be in perl-format? Also the app can then freely load whatever config using whatever plugin it wants? Bottom line being that we do not need to deeply analyze each app before it is pushed to prod.
23:09 coff I just wish we still had the nice and clear separation that we used to have wrt configuration.
23:14 janus can someone run the test with this: http://nopaste.info/56bdcf1224.html - fixes t/mojolicious/pod_renderer_lite_app.t and all other tests still pass (here)
23:15 janus oh wait, it does not?!
23:16 janus my best guess so far is Test::Builder incompatibilities
23:18 janus yet i don't see how :/
23:19 tempire GOOGLE CODE-IN TIME!
23:19 garu tempire: \o/
23:20 tempire ideas?
23:20 janus left #mojo
23:22 Averna joined #mojo
23:22 garu make Mojo::Message adaptable enough to allow the existance of an external extension which adds http compression to it?
23:22 garu (or maybe this is a bit too much for a young newcomer)
23:22 tempire in 5 days by a 15 year old?
23:22 garu heh
23:23 garu will they allow translations this time?
23:23 garu I remember there was a... discussion last year
23:24 tempire I'd like to a see some async group games
23:24 tempire that would be press-worthy and be fairly simple, I think
23:24 tempire feed the raptor
23:24 garu in the form of short tutorials?
23:25 garu or a competition (wonder if they'll allow those)
23:28 tempire I'm thinking more of an example than a tutorial
23:28 garu ok
23:28 tempire but either one would be fine.
23:31 garu "there are no translation tasks"
23:31 garu also, "tasks should take a student about three or four hours"
23:34 garu tempire: have you seen pjcj's csv?
23:34 garu or that :)
23:35 rem_lex| joined #mojo
23:35 tempire joined #mojo
23:36 garu tempire: have you seen pjcj's csv?
23:36 tempire no
23:36 garu there are four tasks for us there, leftover from last year
23:37 garu hang on
23:40 garu "make http://mojolicio.us more magical"; "speed up the mojolicious test suite"; "Plack::Middleware::Auth::Form example code for mojolicious"; "write simple open source mojolicious examples";  "make a simple CRUD SQL DB interface for mojolicious"; and "make a simple wiki engine for Mojolicious"
23:40 garu tempire: ^^
23:41 garu s/4/6/
23:42 garu tempire: "make a promotional video for mojolicious" sounds like a good one
23:43 tempire I love it.  I'm also scared by it.
23:44 tempire I guess it depends on what is meant by a promotional video.
23:45 tempire quality video production seems like something beyond a 5 day project.
23:45 garu hmmm, you may not have received my last few messages... it's a bit worse than that, actually
23:45 garu "there are no translation tasks"
23:46 garu also, "tasks should take a student about three or four hours"
23:46 tempire oh
23:46 tempire shnikies
23:47 garu they'll be competing for amount of finished tasks in order to win tshirts and a visit to Google HQ
23:55 jpn joined #mojo

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