Camelia, the Perl 6 bug

IRC log for #mojo, 2012-05-09

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

All times shown according to UTC.

Time Nick Message
00:21 MichaelRpdx joined #mojo
00:54 scott joined #mojo
00:54 vel joined #mojo
01:19 JerJer joined #mojo
01:19 gangabass left #mojo
01:28 JerJer joined #mojo
01:57 d4rkie joined #mojo
02:22 JerJer joined #mojo
02:25 JerJer1 joined #mojo
03:01 scott joined #mojo
03:03 GabrielVieira joined #mojo
03:15 xaka joined #mojo
03:32 scott joined #mojo
03:51 xaka joined #mojo
04:16 quicoju joined #mojo
05:25 plu joined #mojo
05:53 rem_lex|pivo joined #mojo
06:38 mattastrophe joined #mojo
06:39 fhelmber_ joined #mojo
06:50 ki0 joined #mojo
06:50 batman joined #mojo
06:55 Foxcool joined #mojo
07:06 Vandal joined #mojo
07:09 cosmincx joined #mojo
07:15 pau4o joined #mojo
07:27 scott_ joined #mojo
07:42 pau4o joined #mojo
08:02 daxim joined #mojo
08:21 alexeiras joined #mojo
08:26 * sri yawns
08:27 * diegok morning
08:27 sri a diegok morning to you too!
08:27 diegok \o/
08:29 diegok I've changed start_tag and end_tag on one of my apps (to use [%%]) and now it's failing to render exception template... how should I do to have both things working? :)
08:29 diegok (using EP) ^
08:30 diegok well, failing... it's not rendering well because it uses <%%> :)
08:31 GitHub24 joined #mojo
08:31 GitHub24 [mojo] kraih pushed 1 new commit to master: http://git.io/XvZFnA
08:31 GitHub24 [mojo/master] better one_tick description - Sebastian Riedel
08:31 GitHub24 left #mojo
08:31 sri diegok: use a different extension of course
08:32 sri index.html.dep (diegok embedded templates)
08:32 sri s/templates/perl/
08:32 diegok sri: so, I should "add another view" based on EP. Ok, it's what I was thinking I should :)
08:35 diegok sri: is there any example on how to declare another extension/config for EP?
08:36 sri https://github.com/kraih/mojo/blob/ma​ster/t/mojolicious/twinkle_lite_app.t
08:37 diegok sri: ok, it's name attribute (just saw plugin source).
08:37 diegok thank you!
08:46 hugh joined #mojo
09:31 inokenty joined #mojo
09:46 nic tempire: oh wow, thanks for the perloku link
09:54 trone_ joined #mojo
10:05 omega why does EPLRenderer complain about invalid enocoding on dotcloud, but not on my local machine?
10:05 omega I have but invalid encoding into the template on purpose
10:13 JerJer joined #mojo
10:13 sri i wish perl had anonymous classes :/
10:17 JerJer1 joined #mojo
10:25 crab hi.
10:25 crab i have a route like this: $x = $y->route('/pending'); $x->get('/(:cert).(:ext)', ext => [qw/pdf jpg/])
10:25 crab which used to work (well, the outer route used to be a waypoint, but the whole thing worked)
10:26 crab now it doesn't work. i assume it's because of the format detection changes. what is the correct way to write it?
10:26 crab i tried just ->get('/(:cert)', format => [qw/pdf jpg/]), but that didn't match.
10:27 crab i've also tried setting format => 0 on the outer route and then trying /(:cert).(:ext), but it stops working when i add a constraint on ext at all.
10:30 crab to be clear: ->get('/(:cert).(:ext)') matches, but ->get('/(:cert).(:ext)', ext => [qw/pdf jpg/]) doesn't.
10:31 crab also, dropping ext and using ->get('/(:cert)') works, and stash('format') has the right value. but specifying format => ... makes it not match.
10:31 crab is this a misunderstanding on my part or a bug?
10:32 MisterHatt I dont suppose anyone's used AnyEvent::Redis with mojolicious?
10:34 sri crab: perl -Mojo -E'a("/:cert", [format => [qw/pdf jpg/]] => sub { $_[0]->render_text(join ",", $_[0]->stash("cert"), $_[0]->stash("format")) })->start' get /foo.pdf
10:35 sri works for me
10:37 crab is there a similar way to make a nested route on the command line?
10:37 crab (your example works for me too)
10:38 sri perl -Mojo -E'a->routes->route("/foo"​)->route("/bar")->to(text => "works!"); a->start' get /foo/bar
10:39 crab no, it's not the nested route. i moved it outside the nested route and it still doesn't match. let me see if i can figure out a minimal case.
10:40 sri crab: and you are 100% sure that route worked before?
10:40 crab yes.
10:40 sri because i'm 100% sure it doesn't
10:41 crab no no, my customers depended on it at a very fundamental level.
10:41 sri "$x->get('/(:cert).(:ext)', ext => [qw/pdf jpg/])" <- that ext =>... is garbage
10:41 crab garbage how?
10:41 sri it doesn't do anything
10:42 crab maybe it was a regexp. let me look at the git log.
10:42 sri except for quite possibly messing up stuff
10:42 andrefs joined #mojo
10:42 sri i guess you mean [ext => [...]]
10:43 sri there is no way in hell that ever worked
10:44 crab [ext => [...]]? what does that even do?
10:44 sri equivalent to Mojolicious::Lite
10:44 crab $r->route('/:name', name => ['bender', 'leela'])
10:45 crab ^ this is from ::Guides::Routing
10:45 sri ->route != ->get
10:45 sri ->route is a primitive for ->get
10:47 sri perhaps i should remove ->route and ->bridge from the routing guide if it confuses even you
10:47 crab oh, that was just a typo on irc from me
10:47 crab -    $pending->route('/(:cert).(:ext)', ext => [qw/pdf jpg/])
10:47 crab that's the actual line that used to match. sorry for the confusion.
10:51 crab hmm. but there must have been somewhere else i was being stupid, because now it works. heh.
10:51 sri -.-
10:52 * memowe is glad it works now. :) Just check your diffs to find out whar changed. :)
10:54 sri crab: please review the routing guide anyway and tell me if it makes sense to get rid of route/bridge in favor of any/under http://mojolicio.us/perldoc/Mojolicious​/Guides/Routing#More_convenient_routes
10:54 stephan48 from my point of view yes it would make sense(not having read the link), it just sounds cleaner
10:55 stephan48 and more lets say explaining
10:55 sri i'm guessing it has been some time since you last read it, *a lot* has changed
10:55 stephan48 i wouldnt deprecate them
10:55 stephan48 yea
10:56 crab will read.
10:57 crab memowe: yes, i've figured it out, but due to abject embarrassment will pretend it was someone else's fault. ;-)
10:59 sri i like the idea of a simpler routing guide, but on the other hand a lot of explanations for the flexibility of the router would get lost
10:59 sri like ->via(qw/GET POST/) for routes matching multiple methods
11:01 stephan48 maybe explain both ways
11:01 crab sri: i don't like the idea of getting rid of the explanations of route and bridge because people do use the routing guide also as a reference and not just a tutorial. "
11:01 stephan48 a shortcut with any/under/get/post etc and route/via/bridge
11:01 al yep, it is a reference
11:01 crab "how does x work?" on irc often is answered with "see routing guide", and people will continue to use and encounter route/bridge in real code.
11:01 stephan48 as a longer part
11:02 crab but maybe some more examples would be good. let me go through it carefully from top to bottom once.
11:05 sri if lite examples are necessary earlier we would also need a new introduction to the similarities between normal and lite
11:34 andrefs joined #mojo
11:52 GabrielVieira joined #mojo
12:14 alexeiras joined #mojo
12:18 quicoju joined #mojo
12:21 hugh joined #mojo
12:40 andrefs joined #mojo
12:48 GabrielVieira2 joined #mojo
13:21 d4rkie joined #mojo
13:42 sri hmm
13:43 sri all templates get compiled into Mojo::Template::Sandbox atm. that can be problematic if people import functions directly into their templates
13:45 sri if we generate pseudo-anonymous classes we might leak memory though
13:45 sri sooo, what is better, possible namespace clash or memory leaks?
13:46 * sri pokes crab, tempire and marcus
13:48 stephan48 why potential memory leaks?
13:50 cosmincx joined #mojo
13:53 sri because classes are never cleaned up by perl
13:59 sri and of course we have inline templates and the like
14:04 CromeDome joined #mojo
14:04 sri well, i don't care very much, but it might come up as a problem again in the future
14:05 mire joined #mojo
14:11 stephan48 cant you prefix imported functions in a template by the template name?
14:12 sri please elaborate
14:12 cosmincx joined #mojo
14:15 andrefs joined #mojo
14:19 stephan48 sri: i mean that they are imported like M::T::SB::template_importedfunc
14:19 * sri doesn't get it
14:19 * stephan48 doesnt know howto explain
14:20 sri i'm talking about "% use Scalar::Util 'weaken';" and the like
14:20 sri if another template does "% use MyModule 'weaken';" the other template is screwed
14:24 alexeiras joined #mojo
14:33 jnap joined #mojo
14:54 ki0 joined #mojo
15:07 ki0 joined #mojo
15:10 preflex joined #mojo
15:15 xaka joined #mojo
15:21 andrefs joined #mojo
15:24 alexeira1 joined #mojo
15:27 GabrielVieira joined #mojo
15:32 sri hmm
15:32 sri increase in memory usage is substantial if we switch to one class per template
15:33 sri crab, tempire, marcus: i really need a vote on this
15:34 sri a test with 30 templates went from 21.6MB to 22.3MB
15:37 crab i'd say do nothing for now
15:38 preflex_ joined #mojo
15:38 crab it's probably not many people who use modules in templates to begin with, and it doesn't seem unreasonable to ask them to be extra cautious
15:40 * sri nods
15:41 sri the problem i see it templates from plugins
15:42 sri s/t/s/
15:43 sri with helpers we can log collisions, but modules in templates are a problem
15:50 nic tempire: Re heroku... are you using 'cedar'?
15:51 nic Following the perloku example, I just get "Heroku push rejected, no Cedar-supported app detected"
15:56 taryk joined #mojo
15:59 pau4o left #mojo
16:00 pau4o joined #mojo
16:01 JerJer joined #mojo
16:11 kanishka joined #mojo
17:09 pau4o left #mojo
17:13 preflex joined #mojo
17:58 jnap joined #mojo
18:11 marcus Sri: i am against increased memory.
18:11 marcus :)
18:12 sri marcus: so you are in favor of namespace collisions!
18:12 marcus Seems like a rare problem.
18:12 * sri wonders if he will ever see marcus not use an ipad again
18:13 marcus I am on the iPhone actually.
18:13 sri :o
18:13 marcus I usually use the iPad keyboard now ;)
18:17 taryk joined #mojo
18:18 taryk left #mojo
18:38 tempire nic: you're probably not following the directions on judofyr's repo properly
18:41 tempire sri: changing something because of something that might be a problem to someone sometime is against your core programming.
18:41 * tempire tweaks sri
18:41 * sri crashes
18:42 * sri reboots
18:43 * sri glares at tempire
18:44 tempire it's ok to reboot if you're a lightweight process.
18:44 * sri starts strangling tempire
18:44 whee I think I left my DOS boot disk in there
18:45 * tempire triggers sri's unruly imperative side-effects
18:45 * tempire watches as he gets distracted by something else and goes about his business
18:46 * sri is confused
18:46 * sri reacquires target and runs after tempire
18:48 * tempire spawns half a million vm threads to keep sri busy
18:48 * sri gets distracted by a new simpsons episode
19:05 sri tempire: what i'm afraid of is that we won't be able to change it if it becomes a problem later
19:05 sri if a template bundled with a plugin for example imports some function it will be available in all templates
19:06 sri now, even a helper can redefine that function
19:06 sri for *all* templates, including the original plugin one
19:07 sri with helpers that's not a big deal, since you see a friendly debug warning
19:09 sri i can see people depend on that behavior
19:10 sri and others getting into trouble
19:13 jzawodn joined #mojo
19:13 jzawodn joined #mojo
19:16 sri 2.94 release might be a good idea
19:21 jzawodn joined #mojo
19:42 JasonCrome joined #mojo
19:46 arpadszasz joined #mojo
19:47 rem_lex| joined #mojo
20:00 JerJer joined #mojo
20:11 JerJer1 joined #mojo
20:24 xaka joined #mojo
20:26 fibo joined #mojo
20:33 preflex_ joined #mojo
20:37 perlite_ joined #mojo
21:07 andrefs joined #mojo
21:14 nic joined #mojo
21:18 taryk joined #mojo
21:36 batman joined #mojo
21:51 andrefs joined #mojo
21:53 lukep joined #mojo
21:56 jnap joined #mojo
22:00 marcus I think it's a feature that you can do your imports one place for all your templates.
22:01 andrefs joined #mojo
22:01 memowe ZOMG. One of my dancing students (!) just asked me to give a 2hrs talk in our university information system thing admin group about mojo and orm stuff.
22:01 memowe :)
22:02 memowe I never talked with him about computer related stuff.
22:22 marcus memowe: Awesome
22:27 * marcus is trying to test graphite. Man what a bad install experience.
22:43 kwaping joined #mojo
22:45 kwaping hi everyone, I'm having a problem and have been unable to solve it on my own so far...
22:46 kwaping I have a standard install that copies one of the tutorials, but when I'm running it via psgi/plack, I am getting an error about Can't locate object method "new" via package "My::Module::Here" at /home/y/lib/perl5/site_perl/Mojo/Server.pm line 18.\n
22:46 kwaping the module in question has the line:
22:46 kwaping use Mojo::Base 'Mojolicious';
22:53 kwaping is there an issue with the namespace starting with Foo::Bar::Baz instead of just Foo or Foo::Bar?
22:54 kwaping I did another test installation which this is a copy of and that one worked fine
22:58 mire joined #mojo
23:27 marty joined #mojo
23:33 jzawodn_ joined #mojo

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