Camelia, the Perl 6 bug

IRC log for #mojo, 2010-10-18

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

All times shown according to UTC.

Time Nick Message
00:00 vel joined #mojo
00:49 GabrielVieira2 joined #mojo
00:51 MojoGuest111 joined #mojo
00:51 MojoGuest111 From: http://news.ycombinator.com/item?id=1277067 (1 hits)
00:51 MojoGuest111 left #mojo
00:54 GabrielVieira left #mojo
02:35 janus left #mojo
03:12 janus joined #mojo
03:43 alnewkirk|com joined #mojo
03:45 a|newkirk[assoc] joined #mojo
03:48 alnewkirk left #mojo
03:48 a|newkirk[assoc] is now known as alnewkirk
03:49 alnewkirk|com left #mojo
04:04 tl joined #mojo
04:06 tholen42 left #mojo
04:16 kimoto left #mojo
04:55 vel left #mojo
05:15 ysyrota joined #mojo
06:03 kvorg left #mojo
06:09 pid joined #mojo
06:17 stephan48 vti: mh.... no commits according to git
06:23 stephan48 neither do github, still at broken commit
06:27 ltriant left #mojo
06:31 vel joined #mojo
06:33 vel left #mojo
06:33 vel joined #mojo
06:35 vel left #mojo
06:35 vel joined #mojo
06:36 vel left #mojo
06:36 vel joined #mojo
06:37 vel left #mojo
06:53 koban joined #mojo
07:16 jawnsy left #mojo
07:21 doubi joined #mojo
07:22 jawnsy joined #mojo
07:27 doubi left #mojo
07:48 koban left #mojo
07:57 fhelmber_ joined #mojo
08:13 rhaen moin!
08:19 Alias left #mojo
08:21 stephan48 hi rhaen
08:22 Alias joined #mojo
08:25 doubi joined #mojo
08:26 doubi sri: http://paste.scsys.co.uk/53462 Remove the text between the textarea tags and the remaining markup appears inside the textarea. Mojo::DOM bug, or is my html non-conformant?
08:33 kimoto joined #mojo
08:35 viking-3 hello! i have problems with i18n and the TT plugin. i use [% h.l('string') %] in the templates and with some debugging i see localize is called and returns the translated string, but the strings are not shown in the page
08:36 viking-3 anyone has i18n and TT working?
08:40 kvorg joined #mojo
08:49 sri moin
08:49 vti moin
08:50 vti stephan48: how can i get that error? everything seems to work here
08:51 sri doubi: which version?
08:52 doubi 0.999930
08:52 sri from?
08:53 doubi github, not sure when. Hang on and I'll update
08:53 doubi (should've though to do so before, sorry)
08:55 doubi "Already up-to-date"
08:57 stephan48 vti: puh... idk
08:57 sri doubi: can't find a bug though
08:57 stephan48 vti: i thought you broke something
08:57 sri doubi:     $form->at('textarea')->replace_inner('Test!'); works flawless
08:58 doubi sri: You can't reproduce what I see in that example?
08:58 sri i'm even using your example
08:58 doubi o_o
08:59 sri http://paste.scsys.co.uk/53491 # works flawless
08:59 stephan48 http://abc123.pastebin.com/VAaRWkZn i git now, afet a hard reset
09:00 viking-3 what is the besta way for serving static content directly from the webserver without passing through Mojolicious in Nginx?
09:00 stephan48 vti: k, maybe it was caused because i tried to bind to a already used port and then mojo blow up
09:01 sri easiest might be to just let mojolicious serve static content but have nginx cache it
09:01 doubi sri: And with "You in the Wong Place" removed?
09:01 sri doubi: replaced with Test!
09:01 viking-3 the problem is that i noticed a strange behaviour with a ttf font, it's served in 2 chunks and that doesn't work in the CSS
09:02 doubi sri: Sorry, I've been confusing: The bug only shows up with no text at all between the textarea tags
09:02 sri i would imagine that generatign an empty tag
09:02 stephan48 http://abc123.pastebin.com/46FV1NrJ @ vti, current error but it works
09:03 sri doubi: Description: <textarea cols="40" rows="5" /><br />
09:03 vti sri: ok, thanks
09:03 sri just an empty tag
09:03 sri vti: what did i do? :)
09:04 doubi sri: yes. And that doesn't put the subsequent markup in the textarea for you??
09:04 sri huh?
09:04 vti stephan48: ok, thanks :)
09:04 vti sri: just thank you for the greates web framework!
09:04 vti *greatest
09:04 sri \o/
09:04 doubi Hmm... what's the best way for me to give you a screenshot?
09:05 stephan48 pastebin
09:05 sri doubi: it is valid xml
09:05 sri doubi: if your browser screws up thats unfortunate
09:06 sri but there is no way for us to know when it is better to generate empty tag pairs instead of an empty tag
09:06 stephan48 vti: thanks for comments, now i will need to check howto make mojo know the correct hostname instead of 127.0.0.1:PORT
09:06 sri maybe an xhtml doctype can fix it
09:07 stephan48 but i will check into that later
09:08 sri stephan48: X-Forwarded-For
09:08 * doubi shrugs
09:09 doubi Yea, I couldn't see anything wrong with the xml
09:09 doubi Firefox bug then~
09:09 doubi doctype din't help unfortunately
09:09 stephan48 sri: mh?
09:09 omega doubi: I think <input></input> is not allowed?
09:09 omega that might be confusing things?
09:10 stephan48 sri: no.. i mean the munging of letting mojo know its hostname is blog.stejau.de and now 127.0.0.1:....
09:10 doubi omega: Good point but <input type="text" /> doesn't make a difference either
09:10 sri browsers don't like <textarea /> i think
09:11 stephan48 "ProxyPreserveHost On" <- that made it
09:11 stephan48 thanks sri for mojo and vti for booty* :)
09:12 sri stephan48: that activates X-Forwarded-For ;p
09:12 omega no, they don't like <textarea />
09:12 stephan48 no.. it doesnt change Host:
09:13 omega the only ones you should ever have as empty tags like that, are the single ones from old HTML4, like <img />, <br />, <input /> etc.
09:13 * sri need coffee
09:14 doubi omega, the weird thing is that in this case Firefox can't even grok <textarea></textarea>. I need to make it <textarea> </textarea> to render right
09:14 sri just reading up on it
09:14 sri it seems ie hates empty textarea pairs too
09:15 omega doubi: what mode is firefox in then?
09:15 sri in the test case it was quirks mode
09:16 doubi omega: Mode? I din't know there were others besides safe and regular
09:16 doubi It's just Firefox 4b4 in 'regular' mode
09:18 omega if you bring up page info (cmd-i on mac), it tells you rendering mode
09:19 omega standards-compliant or quirks
09:19 viking-3 sri: http://paste.scsys.co.uk/53492
09:19 sri viking-3: version?
09:19 viking-3 serving the same file from another path (not through Mojolicious) on the same nginx works normally
09:19 doubi omega, Standards Compliance, it says.
09:20 viking-3 sri: 0.999929
09:20 doubi That a good sign for an apparent rendering bug or not?
09:20 sri viking-3: fixed already in github version then :)
09:21 viking-3 meh
09:21 viking-3 i spent too much time on it :(
09:21 viking-3 how reliable is the CPAN one?
09:22 sri not as reliable as the github one
09:22 viking-3 got that :|
09:23 sri <textarea>&#65279; </textarea> seems to be a workaround
09:24 viking-3 any idea about the other problem i mentioned?
09:25 sri viking-3: what other problem?
09:26 viking-3 sri: h.l('string') from TT does not show the strings, but the call is made and i see the translated string from the maketext debug
09:26 viking-3 any ideas?
09:27 sri i'm not a tt user
09:28 viking-3 fair enough
09:37 doubi For Firefox <textarea>&#65279; </textarea> puts garbage text in. Putting a single space between the opening and closing tags seems to be enough for a workaround though.
09:43 forwardever joined #mojo
10:02 doubi The docs say $app->home->rel_dir('../public') should generate an absolute path, but it's just giving me '../sql'. Am I using it wrongly?
10:03 dotan joined #mojo
10:08 alnewkirk left #mojo
10:13 alnewkirk joined #mojo
10:15 spleenjack joined #mojo
10:24 sri doubi: perl -Ilib -Mojo -e 'b(app->home->rel_dir("../foo"))->say' works flawless for me
10:25 DaTa doubi: do you miss read permissions on any parent directory?
10:27 doubi sri: For me too, annoyingly :-s
10:28 doubi DaTa: Perms look fine
10:28 doubi Also, my file permissions are ok.
10:30 doubi Just noticed I specified two different directories in my question before >_< That was not intentional.
10:36 omega in ::Lite-apps, how do I specify PUT/DELETE etc?
10:36 ysyrota left #mojo
10:36 omega any qw[put] seems wasteful?
10:44 doubi omega, you mean how to specify the request type for the route?
10:44 omega yes
10:45 omega like get '/host' => defines a GET route
10:47 doubi I've never tried it but I would've expected put '/host' to work the same way
10:47 doubi What happens?
10:47 kimoto sir: "make test" is failed in 0.999929 in windows. Is is not good for user? they don't install it from cpan in two month from 17 Aug. when is 0.000030 uploaded in cpan?
10:48 omega String found where operator expected at mongrel2-config-ws line 44, near "put '/host'"
10:49 doubi Wacky.
10:49 doubi kimoto: Try github instead of cpan. It's more up to date.
10:52 sri lite only has get and post
10:52 sri think it was because of delete
10:54 omega ok
10:55 kimoto I installed it from github. but many users try to install it from cpan at first. they are maybe sad to see the failuar of installation.
10:56 sri kimoto: cpan version fails on windows, known issue
10:57 forwardever sri: can you provide some thoughts on http://gist.github.com/631117 , removed singular to plural and now let the user define the controller class in cases singular resources should be dispatched to plural controllers or vice versa
10:57 sri forwardever: no time atm
10:58 ysyrota joined #mojo
10:58 forwardever okay
11:06 kimoto i think even if it it is known issue, two month is a little long, 1/6 of year
11:07 sri not like it is not fixed already
11:07 tl left #mojo
11:09 sri if i was starting over again with mojolicious i think i would go the rakudo way and not use version numbers at all :D
11:10 sri cpan releases at this point in time are development snapshots, mind the 0. versions
11:17 kimoto sri: Is 0.  development release?  what is majar release definition?
11:21 doubi Hm, took me a while to realise I couldn't say my @elems = $dom->find([class="foo"])->each(sub{ shift->type } ) or ->each->type. Got what I wanted by declaring @elems first then doing ->each(sub{ push @elems, shift->type }). Is there a more succinct way to do that?
11:28 tholen joined #mojo
11:34 doubi left #mojo
11:38 forwardever sri: created another version: http://gist.github.com/632073 ,so there is no conceptual difference between resource and resources (previous version was quite confusing), now param singular has to be passed explicitly (in case that singular routes should be created)
11:41 sri forwardever: you might get better feedback if you blog about it
11:42 sri kimoto: see CodingGuidelines
11:43 forwardever sri: will thing about it, however, in this case I would have to create a repo on git I can refer to, or should I just refer to the gist ?
11:43 sri up to you
11:44 sri kimoto: the simple truth atm is that no matter how fresh the latest cpan release might be you are always better off using github master
11:47 kimoto sri: i understand it very much. i afraid generally perl user don't understand it. they maybe think cpan release is stable.
11:48 sri well, it's just the web we live in
11:48 sri web standards are also developed out in the open
11:49 sri take websockets for example, they keep breaking, no stable spec in sight, yet nobody cares
11:50 sri we target unstable specs, nobody can expect us to be more stable
11:50 sri in this context the whole "normal cpan release cycle" doesn't make much sense at all
11:51 sri similar to rakudo, the end result is still unknown
11:54 sri maybe that needs to be a rule in the guide
11:54 sri "the web is a moving target, to stay relevant we have to stay in motion too" or so
11:56 sri that said, github master has to my knowledge never been in an unstable state
12:00 kimoto sri: I introduce "cpan Mojolicious" now in my site to install Mojolicious. is this not good in your opinion?
12:01 GitHub173 joined #mojo
12:01 GitHub173 mojo: master Sebastian Riedel * afaf65e (1 files in 1 dirs): updated coding guidelines - http://bit.ly/dpMgY6
12:01 GitHub173 left #mojo
12:01 sri kimoto: thats a good question
12:02 sri kimoto: i'll add something to the readme, just a second
12:08 GitHub158 joined #mojo
12:08 GitHub158 mojo: master Sebastian Riedel * 87651c9 (1 files in 1 dirs): updated readme - http://bit.ly/9HqKGm
12:08 GitHub158 left #mojo
12:08 sri kimoto: thats better
12:09 sri we have no hard prereqs, why not use that to our advantage :)
12:14 sri a commit hook to push a new release to cpan for every new commit would be funny
12:15 stephan48 poor cpan
12:15 kimoto sri: it is very funny.
12:28 kimoto cpan command is very useful and easy as tool. It is happy that latest mojolicious is always in cpan to use cpan command.
12:28 Alias left #mojo
12:32 stephan48 :)
12:32 stephan48 then we have to put sri on drugs so he can manage some hundred commits per day ;)
12:33 sri yes please
12:34 kimoto :)
12:34 sri I'm Bender, baby, please insert liquor!
12:40 Alias joined #mojo
13:26 alnewkirk left #mojo
14:13 pid left #mojo
14:18 a|newkirk[assoc] joined #mojo
14:37 arthas joined #mojo
14:43 marcus hmm
14:57 sri wonder if the new macbook air will have a touchscreen
15:04 marcus I can't bring myself to care about the macbook air
15:05 sri i'm not sure about it
15:06 sri no moving parts seems quite cool, but the screen might be too small for actual work
15:06 sri i really don't need the built in optical drive of my macbook pro
15:07 crab hi
15:07 * sri waves
15:07 crab i've been trying to do real work on my ideapad s10, and failing miserably
15:07 crab though i suspect that's more to do with me than with the laptop
15:08 sri the macbook is really amazing for work
15:09 sri best keyboard i've ever used
15:09 marcus sri: agree, I don't need my optical drive either.
15:09 marcus but I need my 15" anti-glare 1680x1050 screen
15:10 sri 13" glossy here
15:10 marcus ouch
15:10 marcus that was my previous laptop
15:10 marcus glossy makes me want to stab things
15:10 sri i love it
15:10 sri had a 17" before
15:11 marcus because you love seeing yourself reflected in the screen? ;)
15:11 sri of course :D
15:11 marcus or do you only work in the dark?
15:12 sri i can control the lighting in my office very well
15:12 sri that might be a reason
15:12 rhaen hm.
15:14 sri and for working in the garden i have sun umbrellas
15:14 sri and a...need to look up the word
15:14 sri a pavilion
15:16 marcus how cute.
15:16 marcus do you have a group of violinists to provide the music as well?
15:17 sri heh
15:21 rhaen j,.
15:21 rhaen So should I get the ideapad or not?
15:22 sri get a mac
15:24 rhaen I have a macbook - so the world is fine
15:24 sri then the answer is no
15:24 rhaen cool - it's all so easy!
15:28 spleenjack1 joined #mojo
15:32 spleenjack left #mojo
15:41 rhaen hm.
15:42 sri hmm
15:56 GabrielVieira2 left #mojo
16:04 spleenjack1 left #mojo
16:07 spleenjack joined #mojo
16:09 rhaen sri: here are a few thing I don't "like" about mojo stuff
16:09 rhaen maybe they are worth thinking about them
16:09 rhaen you can launch a mojolicious daemon on a different port with the option --listen http://*:3001
16:09 rhaen however, this: --listen http://*:3001/ won't work
16:10 rhaen I can understand why this is not working but you'll get a strange behavior without any warnings or errors
16:11 rhaen maybe that could be worth an error message or a warning like; '/' are not allowed as last...
16:11 rhaen next thing - if you run a daemon on port 3000 and start another daemon on port 3001 with the listen option
16:12 rhaen it displays: Server already running with PID 25705.
16:12 rhaen uhm, yes - there is a server running but on a different port
16:12 rhaen when I want to start more than 1 server but on different ports e.g for different application
16:12 rhaen s
16:13 rhaen or even for for the same app but to keep at least one server instance up to update the other instance
16:13 rhaen this error is irrating to me.
16:14 rhaen Running an app with --reload is not a good option as is runs the startup sub everythime.
16:14 rhaen suggestions? :)
16:39 rhaen ok $self->home();
16:39 rhaen bbl
16:44 kvorg left #mojo
16:49 spleenjack left #mojo
16:51 ysyrota left #mojo
17:10 vel joined #mojo
17:16 dotan left #mojo
17:18 spleenjack joined #mojo
17:18 kvorg joined #mojo
17:19 vel left #mojo
17:21 sri rhaen: 1) the regex should be improved, 2) thats a very complicated topic, to make it short, no this can't be easily changed, 3) what?
17:22 sri rhaen: whats wrong with running startup multiple times?
17:23 dotan joined #mojo
17:23 sri the whole point of --reload is to reset as much state as possible
17:23 dotan left #mojo
17:23 sri as in undef $app as a whole
17:25 kvorg left #mojo
17:28 dotan joined #mojo
17:29 dotan sri: if the github version always trumps the cpan release, maybe http://mojolicious.org/Mojolicious-latest.tar.gz should redirect to http://github.com/kraih/mojo/tarball/master ?
17:31 sri dotan: true
17:31 sri there is even a good download link
17:31 sri ...umm...as you pointed out
17:31 * sri is really slow today
17:31 dotan who was it that said github has the best url design?
17:32 dotan Also comes in zipball flavor :)
17:35 GitHub49 joined #mojo
17:35 GitHub49 mojo: master Sebastian Riedel * 39e785b (4 files in 3 dirs): remove pid file support from daemon - http://bit.ly/9bZbmd
17:35 GitHub49 left #mojo
17:35 sri rhaen: that should solve number 2
17:35 sri the sledgehammer way :)
17:35 sri more preparation for hypnotoad
17:43 dotan left #mojo
17:48 MojoGuest756 joined #mojo
17:48 MojoGuest756 From: http://news.ycombinator.com/item?id=1277067 (2 hits)
17:49 MojoGuest756 left #mojo
17:49 MojoGuest830 joined #mojo
17:49 MojoGuest830 From: http://news.ycombinator.com/item?id=1277067 (3 hits)
17:50 MojoGuest830 left #mojo
17:50 MojoGuest450 joined #mojo
17:50 MojoGuest450 From: http://news.ycombinator.com/item?id=1277067 (4 hits)
17:50 MojoGuest450 left #mojo
17:52 forwardever sri: <%= link_to index => begin %>Home<% end %> is really complicated, would it be possible to do something like: <%= link_to index, title => 'Home' %>
18:00 Htbaa joined #mojo
18:02 Akron joined #mojo
18:11 rhaen sri, I thought running through startup everytime is a huge performance impact
18:12 rhaen ok, so at least 2 of 3 points are something of interest
18:15 sri rhaen: of course it is, but why does it matter?
18:15 sri forwardever: sure you can with your own helper
18:16 forwardever sri: isnt that a "core" feature?
18:16 sri forwardever: no, and it shouldn't
18:17 forwardever sri: can you explain a bit further so I understand why
18:17 sri forwardever: whats there to explain?
18:18 sri scalar pairs are used differently
18:19 forwardever I thought templating is one of the core features, so just wanted to provide a suggestion for simpler api, now you tell me that these kind of things have to be done writing my own helpers
18:20 sri thats not what i said
18:20 sri your example just doesn't work
18:20 spleenjack left #mojo
18:21 koban joined #mojo
18:21 sri the current tag helpers are just a start and supposed to serve as examples for whats possible
18:21 sri users should now release their own tag helper plugins so we can see which ones are most popular
18:21 sri and lates add those to the core
18:22 sri *later
18:22 sri conventions take time to establish
18:22 forwardever sri: this was what I wanted to know, so the concept is to let people create plugins and implement the most popular ones later
18:23 sri yes
18:27 forwardever regarding my resourceful routes plugin: is there a way to modify the "mojolicious generate" command via a plugin, so that I could say "mojolicious generate resource foo" ?
18:27 sri forwardever: you can just add new commands, see existing ones for examples
18:28 rhaen sri: oh, when running a website which has to been online all the time
18:28 rhaen sri: you may want to update your app code on the fly
18:29 forwardever sri: okay, will check that out later, thanks for the hint
18:29 sri rhaen: --reload is not meant for that
18:29 rhaen sri: so why not running two daemons, ...
18:29 sri hypnotoad will have proper hot deployment
18:29 rhaen sri: right :) I know. That's why I wanted to run two daemon on the same time
18:29 sri ?
18:30 sri are you still refering to point 2?
18:30 rhaen sri: so I can stop the first daemon, update the code, turn it back on and enable it in the loadbaalncer
18:30 rhaen sri: yep
18:30 rhaen sri: but you fixed it - very cool!
18:30 rhaen thanks btw.
18:30 sri sure, hypnotoad will fix it all :)
18:31 sri forwardever: http://github.com/kraih/mojo/blob/master/li​b/Mojolicious/Command/Generate/Makefile.pm
18:31 sri thats a good example
18:32 Akron left #mojo
18:34 kvorg joined #mojo
18:40 koban left #mojo
18:43 a|newkirk[assoc] left #mojo
18:48 GitHub22 joined #mojo
18:48 GitHub22 mojo: master Sebastian Riedel * abf861a (5 files in 4 dirs): long method name cleanup - http://bit.ly/9JlIUX
18:48 GitHub22 left #mojo
19:25 sri current link_to behavior is a bit weird indeed atm
19:33 sri the whole ucfirst thing was a bad idea
19:34 sri <%= link_to Name => 'route' %> is more useful
19:34 alnewkirk joined #mojo
19:34 sri <a href="/route">Name</a>
19:36 arthas left #mojo
19:40 forwardever sri: much better
19:45 Htbaa hey guys. Aside from perlcast.com aren't there any other Perl podcasts?
19:47 sri not seen any
19:47 Htbaa that's too bad. Podcasts get me through the day at the moment. And as fun as these  Ruby podcasts are I don't program with Ruby :P
19:51 Htbaa hey sri, that tweet of yours about node-ffi. Doesn't Alien do that already? (or maybe I'm confused with Alien for Lua)
19:51 jamesw joined #mojo
19:51 Htbaa oh wait, those seem to be separate wrapper libraries
19:53 sri you are mixing things up
19:55 Htbaa ugh. I guess people are running out of package names. There's Alien for Linux, Perl and Lua and they all seem to do different things ^_^
20:07 stephan48 vti, is there a way to disable comment feature globally or enable disable per article based?
20:10 GabrielVieira joined #mojo
20:24 vel joined #mojo
20:24 GitHub118 joined #mojo
20:24 GitHub118 mojo: master Sebastian Riedel * dcfb19a (3 files in 3 dirs): improved link_to tag helper - http://bit.ly/bDBIKo
20:24 GitHub118 left #mojo
20:24 sri forwardever: there ya go
20:27 Htbaa left #mojo
20:35 forwardever sri: works and looks much cleaner :)
20:39 fhelmber_ left #mojo
20:44 vti stephan48: give me 5 minutes
20:51 GitHub82 joined #mojo
20:51 GitHub82 mojo: master Sebastian Riedel * 028b747 (1 files in 1 dirs): cleanup - http://bit.ly/aQdh37
20:51 GitHub82 left #mojo
20:52 sri i think we are also handling attributes wrong
20:52 sri list doesn't work so well
20:54 sri my main problem is <%= form_for (method => 'POST') => begin %>...
20:54 sri thats impossible
20:54 sri since it would be mistaken for a route name
20:55 sri <%= form_for undef, (method => 'POST') => begin %>
20:55 sri that would be the working version
20:56 sri it would be way easier if we could make attributes an arrayref or named hashref
20:56 sri <%= form_for [method => 'POST'] => begin %>
20:57 sri <%= form_for attrs => {method => 'POST'} => begin %>
20:58 sri thoughts?
20:59 forwardever what would <% form_for (method => 'POST') ... do, so far, I have only used it with a URL or route name after form_for ?
20:59 sri use current route
20:59 sri (if it worked)
21:01 sri maybe i'm just crazy and it would overcomplicate things
21:02 ltriant joined #mojo
21:02 sri <%= input country => [type => 'radio', value => 'germany'] %>
21:02 sri vs
21:02 sri <%= input 'country', type => 'radio', value => 'germany' %>
21:02 sri which one?
21:03 janus the latter is shorter
21:04 forwardever maybe, instead of undef, one could also pass a reserved word, like current_route
21:04 forwardever second one looks better
21:04 sri that is a possibility too
21:05 sri i actually like "current"
21:06 vti stephan48: disabling globbaly works, check out readme
21:10 forwardever it's important that a user understands what is passed, so undef is the worst option, current is the shortest, and current_route is the one which might cause least confusion (current is very general and requires a user to read docs again, experienced users might prefer current because its shorter)
21:11 sri <%= form_for current => begin %>
21:11 sri gonna make current a special case
21:11 forwardever okay
21:11 sri always refering to the current route
21:11 sri <%= url_for 'current' %> will work the same
21:17 forwardever another question, not sure whether it makes sense: <% end %> works fine, however, when I started with tag helpers a couple of days ago, one common mistake was to write <%= end %>, as e.g. form_for also starts with <%=, would it make sense to make it more liberal?
21:17 jamesw left #mojo
21:18 sri doesn't it work?
21:18 forwardever Bareword "end" not allowed
21:18 sri feel free to try and fix the underlying compiler
21:19 forwardever :)
21:19 GitHub41 joined #mojo
21:19 GitHub41 mojo: master Sebastian Riedel * 08e94e5 (5 files in 5 dirs): added reserved route name current - http://bit.ly/byJSnZ
21:19 GitHub41 left #mojo
21:19 sri it's in Mojo::Template
21:21 forwardever will have to gain more experience before I try this crazy stuff
21:21 GitHub27 joined #mojo
21:21 GitHub27 mojo: master Sebastian Riedel * f0091e5 (1 files in 1 dirs): cleanup - http://bit.ly/bp9Q7G
21:21 GitHub27 left #mojo
21:23 GitHub172 joined #mojo
21:23 GitHub172 mojo: master Sebastian Riedel * 5c84205 (1 files in 1 dirs): cleanup - http://bit.ly/bvoOyo
21:23 GitHub172 left #mojo
21:26 stereonaut left #mojo
21:37 vti stephan48: disabling comments per article works now too
21:47 GitHub23 joined #mojo
21:47 GitHub23 mojo: master Sebastian Riedel * 40d700b (1 files in 1 dirs): fixed typo - http://bit.ly/aVzGrJ
21:47 GitHub23 left #mojo
21:47 sri forwardever: actually i don't think it can be more liberal
21:47 sri very complicated problem
21:49 stereonaut joined #mojo
21:57 GitHub54 joined #mojo
21:57 GitHub54 mojo: master Sebastian Riedel * 33bf578 (2 files in 2 dirs): relaxed end tag a bit - http://bit.ly/8YVvnD
21:57 GitHub54 left #mojo
21:57 sri forwardever: wasn't actually too hard
21:57 sri :)
22:00 GitHub160 joined #mojo
22:00 GitHub160 mojo: master Sebastian Riedel * dc51f97 (1 files in 1 dirs): cleanup - http://bit.ly/dcd0dd
22:00 GitHub160 left #mojo
22:01 forwardever okay, downloading the lastest git hub version via cpanm for the fifth time today :)
22:03 forwardever works :)
22:04 forwardever sri: one last question regarding mojo base, as far as I can see, attr creates an accessor for objects, not classes, now the problem: it also works for classes ( it appears that a global hash is created or so), there should be something like a check for ref $_[0] in $code ?
22:05 sri forwardever: got an example?
22:06 forwardever an example for the problem or the solution?
22:06 sri the problem
22:06 forwardever will try to create one, as the problem occured some time ago
22:10 sri you should have an example before asking
22:12 forwardever i know, i had one in one of my folders, still looking for it...
22:13 forwardever will create a new one...
22:20 forwardever okay, it's late, hope you understand what I mean: http://pastie.org/1231179
22:28 sri oh you mean ref check the invocant?
22:28 sri no can do
22:28 sri costs performance without a real gain
22:35 forwardever use strict/warnings is not active when  $code is compiled, so a global var is created in the class, it might not be a problem if there is only one user (at least the user won't notice the problem), but could become a problem if there are multiple users saving data to the accessor, so it's hard to debug
22:43 sri i don't follow, but in the end stupidity will always find a way
22:44 sri i'm not willing to sacrifice 5% performance for something that so far has never caused a single problem
22:44 sri surely there are many more ways to screw up
22:44 Alias_ joined #mojo
22:45 forwardever okay
22:45 sri ref check for every accessor invocation is madness
22:48 forwardever looking at Mojo::Command::Generate::Makefile, is there a clean way to determine the name of an app, so far, the only way I can see is to look into the script directory and read the name of the file (e.g. script/my_mojo_app), app name would be my_mojo_app
22:48 sri not possible to detect
22:49 sri you can only hope it is $0
22:49 sri people rename their apps
22:55 forwardever if I want to create a controller file through a "generate controller" command e.g., I need access to /lib/app_name/ (default controller directory), so people would not only have to pass the name of the controller, but also the app name, otherwise something could go wrong
22:57 sri the routes command might help
22:57 sri Zzz
22:57 sri nn
22:58 forwardever nn
23:01 jamesw joined #mojo
23:05 forwardever left #mojo
23:34 kimoto left #mojo
23:36 alnewkirk left #mojo
23:44 kimoto joined #mojo
23:45 perlrocks left #mojo
23:54 alnewkirk joined #mojo

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