Camelia, the Perl 6 bug

IRC log for #mojo, 2011-05-23

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

All times shown according to UTC.

Time Nick Message
00:57 GitHub8 joined #mojo
00:57 GitHub8 mojo: master Sebastian Riedel * 9aa0d59 (1 files in 1 dirs): improved routes command output a bit - http://bit.ly/ijwPow
00:57 GitHub8 left #mojo
00:59 sri http://pastie.org/1958734 # think i like it now
00:59 sri nested routes are a bit sleeker
01:17 tardisx I like
01:34 perlrocks Twitter: "We've cleaned up the #mojolicious routes command a bit today, hope you like it. :) http://t.co/AVUCYTV #perl" --kraih http://twitter.com/kraih/status/72475553277542400
01:37 sri i'd like to make the regex cleaner, but that would require perl 5.10 :(
02:07 zoo-zed joined #mojo
02:07 perlrocks Twitter: "To draw text / Mojolicious Reference: ... $ c -> render_text ('Hi there!'); Internal string is automatically converted to UTF-8 byte string. There are arguments in Perl's internal string ... http://bit.ly/jjTHfJ" (ja) --baito__ http://twitter.com/baito__​/status/72483717267984384
02:38 zoo-zed left #mojo
03:04 trcjr left #mojo
03:09 trcjr joined #mojo
04:02 D4RK-PH0ENiX joined #mojo
04:03 d4rkie left #mojo
04:13 d4rkie joined #mojo
04:15 D4RK-PH0ENiX left #mojo
04:42 D4RK-PH0ENiX joined #mojo
04:44 d4rkie left #mojo
05:09 fhelmber_ joined #mojo
05:18 D4RK-PH0ENiX left #mojo
05:29 koban` joined #mojo
05:32 ysyrota joined #mojo
06:02 rhaen left #mojo
06:04 d4rkie joined #mojo
06:12 kaare joined #mojo
06:21 arthas joined #mojo
06:47 AmeliePoulain joined #mojo
07:10 cosmincx joined #mojo
07:19 perlrocks Twitter: "www/p5-Mojolicious - 1.34: - Update to 1.34  PR:             ports/157258 Submitted by:   Murilo Opsfelder <mops... http://bit.ly/mlbjDT" --freshports_org http://twitter.com/freshports​_org/status/72562152665399296
07:34 arpadszasz joined #mojo
08:07 arpadszasz left #mojo
08:35 ajgb joined #mojo
08:48 stigtsp left #mojo
09:13 su-bzero_ е
09:26 spleenjack joined #mojo
09:58 Akron joined #mojo
10:25 Foxcool joined #mojo
10:29 sh4 joined #mojo
10:33 marcus yo dawgs
10:33 snearch joined #mojo
10:43 cosmincx left #mojo
10:45 Sugar joined #mojo
10:58 cosmincx joined #mojo
11:22 sh4 left #mojo
11:23 jdixon left #mojo
11:41 tabbi joined #mojo
11:41 j3nnn1 left #mojo
11:41 tabbi left #mojo
12:15 snearch left #mojo
12:28 arthas left #mojo
12:29 arthas joined #mojo
12:46 Foxcool left #mojo
13:04 abra left #mojo
13:10 sh4 joined #mojo
13:16 abra joined #mojo
13:22 marty joined #mojo
13:29 metaperl left #mojo
13:31 amoore joined #mojo
13:53 nuba left #mojo
13:54 cosmincx left #mojo
13:54 cosmincx joined #mojo
13:56 perlrocks Twitter: "To draw text / Mojolicious Reference - Getting Started with Perl code samples http://bit.ly/luJvOr" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/72662076153274369
13:56 perlrocks Twitter: "Draw a template / Mojolicious Reference - Getting Started with Perl code samples http://bit.ly/mb1PsK" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/72662079944921089
13:56 nuba joined #mojo
13:57 * sri yawns
13:58 * marty good morning my homies
13:59 sh4 left #mojo
14:06 metaperl joined #mojo
14:16 AmeliePoulain left #mojo
14:16 tholen left #mojo
14:32 spleenjack left #mojo
14:32 spleenjack joined #mojo
15:00 koban` left #mojo
15:01 d4rkie left #mojo
15:28 edenc_ joined #mojo
15:42 tholen joined #mojo
15:44 Sugar left #mojo
15:49 d4rkie joined #mojo
15:50 edenc left #mojo
15:50 edenc_ is now known as edenc`
15:50 edenc` is now known as edenc
15:50 nuba left #mojo
15:51 tholen left #mojo
15:53 metaperl i'm wondering where the render render_data render_static render_text methods are documented
15:53 metaperl I need the one which says 'render this template with its specified layout' , so I can switch this code - http://paste2.org/p/1431034
15:54 metaperl right now I have an if-then with 2 GET routes. I would like one GET route with a single if-then, but I dont know how to rewrite GET '/' => 'index' as a subroutine calling a rendering emthod
15:55 nuba joined #mojo
15:59 metaperl ah, found it - http://mojolicio.us/perldoc?Mojol​icious/Guides/Cheatsheet#template
16:00 arpadszasz joined #mojo
16:00 mattastrophe joined #mojo
16:07 tabbi joined #mojo
16:08 tabbi left #mojo
16:13 arpadszasz left #mojo
16:24 ysyrota left #mojo
16:24 sh4 joined #mojo
16:32 ajgb left #mojo
16:37 sh4 left #mojo
16:37 AigleNoir left #mojo
16:38 AigleNoir joined #mojo
16:38 sh4 joined #mojo
16:42 * sri wonders why mondays are always so silent
16:59 sh4 left #mojo
17:07 mattastrophe left #mojo
17:08 trone where fall a route with Controller but without Action specified?
17:11 trone I see that Mojo look for a template with the name of Controller, then I suppose that look for a ->to( controller => 'name' ) it's equal to 'name#name'
17:14 sh4 joined #mojo
17:16 snearch joined #mojo
17:20 tabbi joined #mojo
17:20 tabbi left #mojo
17:23 trone_ joined #mojo
17:28 trone left #mojo
17:28 Akron left #mojo
17:35 spleenjack left #mojo
17:40 sh4 left #mojo
17:57 metaperl one serious problem with layouts --- the title is supposed to be a function of the content ... and the render method (http://mojolicio.us/perldoc?Mojo/Template#render) doesnt say what @arguments it takes ...
17:58 * sri has no idea what metaperl is talking about
17:59 sri Mojo::Template doesn't even have a concept of layouts
18:00 sri you might want to just read the high level documentation
18:01 sri @arguments are arbitrary arguments passed to @_
18:03 sri pretty much every single example in the file shows it
18:05 metaperl sri - you say every example in 'the' file. but I dont know what file you are talking about and it is not linked to from here - http://mojolicio.us/perldoc?Mojo/Template#render   ...where you see @arguments with no docs about its function or what receives it
18:06 sri the file you linked to of course
18:06 sri http://mojolicio.us/perldoc?Mojo/Template#SYNOPSIS
18:06 sri it's everywhere
18:08 sri "Mojo::Template templates work just like Perl subs (actually they get compiled to a Perl sub internally). That means you can access arguments simply via @_."
18:08 sri there are descriptions everywhere
18:08 metaperl OK, I just need to provide an argument to the layout sub with a title
18:09 sri "Mojo::Template doesn't even have a concept of layouts"
18:09 * sri has no idea what metaperl is doing
18:10 sri could it be that you skipped the higher level documentation?
18:11 sri please don't do that, i invested a hell of a lot of time in it
18:11 sri http://mojolicio.us/perldo​c?Mojolicious/Lite#Layouts
18:12 sri http://mojolicio.us/perldoc?Mojo​licious/Guides/Rendering#Layouts
18:18 fhelmber_ left #mojo
18:19 metaperl yes, the high level docs are good. It's just my first instinct when thinking about a templating issue was the look at Mojo::Template ... maybe there should be some link between the two because most templating systems have a concept of layout (WRAPPER in tt, for instance)
18:20 metaperl that's where I figured out my answer - the high level docs
18:21 sri your first instinct should always be to look at the actual documentation, not the api reference
18:23 sri there are three layers in good documentation... tutorials, topical guides, api reference... you should look in that order
18:25 sri hmm, maybe our api reference is too good with those little tutorialish introductions
18:25 sri maybe they should be removed to make the layers more obvious
18:26 sri i just assumed everybody knows about the three layers :/
18:26 sri since it's a general best practice
18:27 metaperl i just go charging in, googling like crazy
18:27 metaperl i find a lot of help in the mojo wiki and the full sample apps there
18:28 sri so you did not read the tutorial and made your way through the guides?
18:29 sri ok, then you don't count :)
18:29 sri and i'm out eating ice cream
18:29 sri (mmm....chocolate chips)
18:31 metaperl I did look at the tutorial. It was great. That's why I chose this over Catalyst
18:35 tabbi joined #mojo
18:36 tabbi left #mojo
18:37 kaare left #mojo
18:44 Foxcool joined #mojo
18:51 Foxcool left #mojo
19:00 uniejo joined #mojo
19:01 uniejo left #mojo
19:15 arpadszasz joined #mojo
19:17 Foxcool joined #mojo
19:23 Foxcool left #mojo
19:32 nuba left #mojo
19:32 nuba joined #mojo
19:32 nuba left #mojo
19:38 nuba joined #mojo
19:40 Foxcool joined #mojo
19:46 sugar joined #mojo
19:52 mattastrophe joined #mojo
19:53 janus the three layers?
19:53 * janus cannot resist thinking of three layers of fail :P
19:54 janus not related, completely bogus and inappropriate comment... but my kind of fun :)
19:55 marty janus: on Monday, it is so slow, even non-related comments are good.  :p
19:56 janus deployed my first protovis graphs at work today... also powered by mojo :)
19:57 janus (more related)
19:57 marty Protovis looks really slick.  How did it all turn out for you?
19:58 marty I use google charts (graphs) right now.  It's works pretty good, but it is missing some niceties
19:59 marty I am anxiously awaiting the mongo full stack so I can pass jason objects to things like google graphs and such.
20:07 snearch left #mojo
20:13 metaperl left #mojo
20:16 * marcus has opened a shopping cart and is implementing WebService::Shopify in Perl.
20:16 marcus opened a shop even
20:17 marty Ooooo, Marcus, sounds very kewl.  I looked at Shopify once, seemed nice.
20:18 marty I think it's a ruby app, is it not?
20:18 marcus marty: yeah, it's a rails app. I quite like it.
20:18 marcus http://www.littleangryboy.no/ <- our store
20:18 marcus (only shipping to norway for now)
20:19 marty Looks clean.  Loads fast.
20:19 * marty is still working on his Mojolicous ecommerce app.
20:20 Akron joined #mojo
20:21 marcus sri: when is mojolicious getting something like activeResource? ;) https://github.com/Shopify/shopify_api
20:22 sri marcus: when you write it? :)
20:23 elb0w left #mojo
20:23 sri too boring for me
20:25 marcus I can see that
20:25 metaperl joined #mojo
20:25 marty and it's too hard for me.  Hmmm, guess that leaves you, Marcus.  :)
20:25 * marcus shakes fist at wife for falling asleep with $daughter, rather than watching game of thrones e06 with me.
20:25 sri e07 has been leaked too
20:27 sri i like how main characters can die at any time
20:27 marty I've never even heard of it.
20:28 marty Looks like it is an HBO thing?
20:28 sri yea, it's really good
20:28 sri every episode ends with a cliffhanger
20:33 Foxcool left #mojo
20:36 metaperl I'm imitating the setup here to create titles in the layout - http://mojolicio.us/perldoc?Mojo​licious/Guides/Rendering#Layouts   ... and I'm getting """Global symbol "$title" requires explicit package name at template line 6
20:38 marty metaperl: can you pastbin your code?
20:39 metaperl kinda ... its in several places ... the start.pl and the templates
20:40 marty check that you do not have any spaced before @@
20:40 marty it has to be the first thing on the line
20:41 marty s/spaced/spaces/
20:44 yko left #mojo
20:45 yko joined #mojo
20:46 metaperl here is start.pl - http://pastebin.com/68MS2nC2
20:47 metaperl here is backend-index.html.ep - http://pastebin.com/GyzeUJJK
20:48 metaperl here is cam.html.ep - http://pastebin.com/guy5jeWA   (the one with $title in it)
20:50 metaperl here is the error log - http://pastebin.com/WLiw4KzX
20:51 marty Hmm, persoanlly I alwyas use the title helper by itself.  ie...  % title 'my title here';
20:52 elb0w joined #mojo
20:52 metaperl well I'm imitating the tutorials exactly... where can I read on the title helper
20:52 metaperl and the title is a function of which content page called layout
20:52 metaperl so it has to be variable
20:56 metaperl In this sample app, they dont have  dollar-sign in front of title - https://github.com/VeroLom/FW/blob/master​/fw/templates/layouts/default.html.ep#L15
20:56 sri metaperl: you obviously did not
20:56 sri because the example works perfectly
20:56 metaperl sri - my code is just like the sample AFAICT
20:56 metaperl I pasted it
20:56 sri http://pastie.org/1963118
20:56 sri i pasted it too
20:57 sri flawless
20:57 metaperl sri that is @@ notation... my templates are in files
20:57 sri meaningless
20:57 purl somebody said meaningless was existentialism ...
21:00 metaperl sri do you see a mistake in the files I pasted?
21:00 sri i generally don't review full apps
21:00 sri just minimal test cases
21:00 metaperl it's just a few files :)
21:00 metaperl the start.pl and the two templates
21:01 sri still too much for my attention span
21:02 crab metaperl: do you understand what % layout 'x', title => 'y'; does?
21:02 metaperl crab - evidently not... I got rid of the dollar sign in the layout file and now it works, with no error
21:02 metaperl it "worked" either way. it's just it threw errors with the dollar-sign
21:03 crab metaperl: weird, it should work with $title
21:03 crab that's how i always do it.
21:03 sri he prolly doesn't have a title
21:04 sri the helper just doesn't throw an error or so
21:04 metaperl sri "dont have a title how" ?
21:05 crab metaperl: anyway, layout 'x', title => 'y' is like including a template named 'x' and setting title => "y" in the stash
21:05 sri i still would very much recommend reading the documentation... you just have to know how the stash works in mojolicious
21:05 crab whether you do it using $self->stash(title => "y") before the call to render, or pass title => "y" to render, or set it using the layout helper, it's all the same.
21:07 metaperl so why does it work when I remove the dollar sign and have this in my layout - <title><%= title %></title>
21:08 Akron I think backend-index is okay - does the error only occur with other templates?
21:08 sri it prolly doesn't actually work
21:08 sri https://github.com/kraih/mojo/blob/master/li​b/Mojolicious/Plugin/DefaultHelpers.pm#L131
21:09 sri you're just doing something wrong because you don't know how the stash works yet
21:09 metaperl hmm, theres only one other template ... index.html.ep
21:09 Akron Does it provide a title for the layout?
21:11 sri interesting, Hype was actually built by former apple developers
21:11 metaperl Akron yes
21:16 Akron Please pastebin index.html.ep
21:18 metaperl ok
21:18 metaperl though for the call to backend-index.html.ep , the error is occurring, per the paste of start.pl
21:19 Akron Where are your templates located?
21:19 metaperl here is index.html.ep - http://pastebin.com/vJNNeFsD
21:20 metaperl Akron - in the templates directory --- I didnt alter anything... I'm trying to get the whole app under github right now
21:21 sri if you really want this to be solved reduce it to a minimal test case
21:21 sri like the one i pasted
21:22 sri you can even inflate my example to see that external templates make no difference whatsoever
21:24 Akron metaperl: And the layout is correctly in templates/layouts/cam.html.ep ?
21:27 arpadszasz left #mojo
21:29 metaperl Akron there it is - http://pastebin.com/WLiw4KzX
21:29 metaperl notice that it fails as shown --- with dollar-sign in front of title, but works fine without the dollar-sign in front
21:30 Akron Works fine means - you have a title or does it mean "no error message"?
21:30 metaperl aha!
21:30 metaperl I got it!
21:31 sri your mojolicious also seeems rathr old, newer ones show the template name in error messages
21:31 metaperl when a certain jquery javascript was not found. mojo tried to throw a not-found.html.ep and evidently it wanted to wrap that in a layout (even though I never said to do so) and the layout had the $title in it, and since the not-found.html.ep did not define title, the error was thrown
21:32 metaperl that's it!
21:33 sri i don't see how that could happen with a recent mojolicious
21:33 Akron You set the layout as a default layout?
21:34 sri what does "mojo version" say?
21:34 metaperl I never set a default layout ... where would I do that....
21:34 metaperl sri -  Mojolicious (1.22, Smiling Cat Face With Heart-Shaped Eyes)
21:35 sri 6 releases behind
21:35 metaperl but it was the only layout, so perhaps it became the default for everything?
21:36 metaperl cpanp i Mojo has been issued
21:36 sri if you can turn it into a minimal test case i'll investigate
21:36 sugar left #mojo
21:36 metaperl i already figured it out
21:36 sri it shouldn't be possible though
21:37 metaperl now to update the strawberry perl windows version
21:37 sri not_found and exception templates can't have layouts
21:37 sri (unless you mess with the renderin logic)
21:37 sri *+g
21:37 metaperl cpanp i Mojo did not truly update Mojo - http://paste2.org/p/1431418
21:40 sri a newer version would have shown you what was happening much earlier btw
21:41 sri 3 or so releases ago the renderer got new log messages
21:41 metaperl sri I think a --insecure option needs to be added to the cpanmin.us install option - http://pastie.org/1963337
21:42 miyagawa metaperl: your curl is old
21:42 metaperl miyagawa - I see... thank slackware :)
21:42 metaperl dont think I chose slackware :)
21:43 miyagawa cpan i Mojolicious would work also
21:43 miyagawa eh cpanp
21:44 metaperl that fails on strawberry perl - cpanp i Mojolicious ---> http://pastie.org/1963356
21:44 metaperl and cpanp i Mojo just sits there with no feedback :)
21:47 metaperl cpan Mojolicious works fine
21:54 arpadszasz joined #mojo
21:56 amoore left #mojo
21:57 Akron left #mojo
21:57 arthas left #mojo
22:06 GitHub153 joined #mojo
22:06 GitHub153 mojo: master Sebastian Riedel * 0a72e39 (1 files in 1 dirs): improved Mojolicious::Controller documentation - http://bit.ly/m1gyw2
22:06 GitHub153 left #mojo
22:25 mattastrophe left #mojo
22:32 tabbi joined #mojo
22:32 tabbi left #mojo
23:02 marty left #mojo
23:29 tempire I wonder if it's actually 8000kloc of php
23:29 arpadszasz left #mojo
23:29 tempire I heard they're using a custom variant, called hphp
23:29 tempire something they made inhouse
23:39 yegor joined #mojo
23:46 yegor left #mojo
23:52 Alias joined #mojo
23:56 sri tempire: they use a php to c++ compiler
23:56 sri https://github.com/facebook/hiphop-php/
23:56 metaperl left #mojo

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