Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-29

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

All times shown according to UTC.

Time Nick Message
00:06 forwardever left #mojo
00:23 stephen left #mojo
00:35 tempire_ left #mojo
01:03 jamesw left #mojo
01:06 jamesw joined #mojo
02:34 ispy_ left #mojo
04:03 tholen42 joined #mojo
04:05 tl left #mojo
04:46 achromic left #mojo
04:54 achromic joined #mojo
05:45 stephen joined #mojo
05:49 * sri yawns
05:50 stephen1 joined #mojo
05:51 stephen left #mojo
05:53 josh joined #mojo
06:08 stephen1 left #mojo
06:11 GitHub97 joined #mojo
06:11 GitHub97 mojo: master Sebastian Riedel * b846f93 (1 files in 1 dirs): cleanup - http://bit.ly/ekrZiL
06:11 GitHub97 left #mojo
07:35 kaare joined #mojo
09:13 perlite left #mojo
09:13 perlite joined #mojo
10:18 forwardever joined #mojo
10:19 forwardever sri: moin
10:20 * sri waves
10:20 forwardever not that much time today for programming, could you provide some thoughts on my recent commit
10:20 sri i like the general decoupling idea, but you won't be able to make Match controller independent
10:21 forwardever why not?
10:21 sri ok, i take that back
10:22 sri you won't be able to decouple it from using objects looking like transactions
10:23 forwardever not sure whether I understand, can you explain a bit further
10:24 forwardever there will still be a controller object passed to Match, but it can be any controller object, the sole purpose is to provide it for conditions, which are flexible enough to handle this
10:25 forwardever (as method is a method, and no longer in dictionary)
10:26 sri oh, i've already cleaned that up, i had problems with the changes in Match.pm
10:26 sri i can see you want to move towards something like ->new(GET => '/foo/bar')
10:26 sri thats not gonna work out well
10:27 sri it depends on too much $tx convenience
10:28 forwardever so far, just want to make routes independent of specific controller, so it can be used with any controller
10:28 sri ok, then the commit was a bit misleading
10:28 sri especially the test changes
10:31 forwardever think that testing tx makes no sense in routes.t, as the idea is to just pass in path and method, and get back a match object, tx testing has it't own test file I suppose
10:33 sri now i'm a bit confused about the benefits though
10:33 sri removing the built in condition gains you nothing
10:34 forwardever benefit would be to make routes standalone (from a solution point of view), step by step
10:34 sri i'm not convinced thats possible
10:35 forwardever where do you see the problems?
10:35 sri routes already don't expect much from a cotnroller instance
10:35 sri it has to squeak like a transaction, thats about it
10:36 sri the built in conditions just expect something transaction like
10:36 sri thats never going to change
10:37 forwardever i have not changed the api of conditions (just internal), everyone is free to pass in a controller, or request object, or tx, or whatever
10:38 sri yes, but there is no gain at all
10:38 sri nothing gets improved
10:38 sri in fact it gets slower
10:40 forwardever the gain is decoupling it from a specific controller instance
10:40 sri you keep saying that, but i don't see it
10:41 forwardever probably because you will only use it with Mojo controller :)
10:41 sri i'm talking specifically about the commit
10:41 sri nothing got any less dependent on the controller instance
10:42 kaare_ joined #mojo
10:43 sri maybe it's still too much of a mess, i don't see where it would lead
10:44 forwardever hmm
10:46 forwardever my $path = $c->req->url->path->to_abs_string replaced, less dependent on specific controller
10:47 sri do you want to make it completely independent from anything mojolicious?
10:47 forwardever url_for -> should just return a path as well, outsourcing the Mojo::URL staff
10:47 sri hmm
10:48 sri thats extremely invasive
10:48 forwardever base classes from Mojo would remain there, if needed, for DRY reasons
10:49 forwardever just doing step by step development, I can go on in separate branch, and we will see later where this leads, and whether it makes sense to adopt changes
10:50 sri sounds good
10:50 forwardever what do you mean by "invasive"?
10:50 sri it changes everything
10:51 forwardever it just would make mojolicious component based
10:51 sri could be an infinite number of possible side effects
10:52 forwardever it would become easier to maintain code, less side effects, as there is a clear api, right now, a lot of interdependencies
10:57 sri another big question is if there's even a need
10:57 sri so far i've had no requests from someone who wanted to reuse our routes
10:58 GitHub73 joined #mojo
10:58 GitHub73 mojo: master Sebastian Riedel * 277d9cc (1 files in 1 dirs): small cleanup - http://bit.ly/flSHP7
10:58 GitHub73 left #mojo
10:58 sri but who knows, maybe this even leads to performance improvements
10:58 forwardever i don't know whether there is a huge need, but there is definitly no really good routing api on cpan, Mojolicious has the best api at least
10:58 sri i'll just lay back and watch :)
11:00 sri routes currently have the biggest performance impact in all of mojolicious, so it just shouldn't get slower
11:01 forwardever where is the performance issue exactly?
11:01 sri there is no real issue
11:02 sri it's just the heaviest moving part
11:03 forwardever i mean where is most performance lost in routes modules? Mojolicious::Routes::Pattern _tokenize ?
11:03 sri i've not profiled it in depth, but i wouldn't be surprised
11:04 sri at least for the first request
11:04 sri later on it is likely the matching
11:05 sri url_for is a likely candidate too
11:05 forwardever you have been in rails for some time, how do they do it, also matching a list of regexes against the path? or do they have some indexing?
11:07 yegor left #mojo
11:10 sri actually i don't know how rails3 does it internally
11:10 sri our routes are designed after merb
11:11 sri i would expect rails to have picked up the merb router too
11:11 sri lets take a look :)
11:12 forwardever :)
11:12 sri https://github.com/rails/rails/blob/master/act​ionpack/lib/action_dispatch/routing/mapper.rb # omg
11:13 sri 1400 lines of self explaining spaghetti code!
11:14 forwardever ye, that is just what I wanted to say
11:16 sri the way they monkey patch in all this active_support crap now makes it really hard to follow anything in rails
11:17 forwardever at least they have nice comments :P
11:17 sri :)
11:25 perlrocks Twitter: "Automatically generate I18N lexicons for #mojolicious apps https://github.com/und3f/mojoliciousx-lexemes" --und3f http://twitter.com/und3f/status/31312013141479424
11:39 su-bzero is now known as su-bzero[A]
11:42 su-bzero[A] is now known as su-bzero
12:07 sri https://github.com/sinatra/sinatr​a/blob/master/lib/sinatra/base.rb # sinatra is the same mess
12:10 ispy_ joined #mojo
12:34 stephan48 sri: could i use the detect function from Mojo::Home for my Config Class?
12:40 sri stephan48: what would you need it for?
12:42 sri generally you can just use $app->home->*
12:42 stephan48 ah
12:42 sri the json config plugin for example even allows <%= app->home->* %> inside the config file
12:43 stephan48 k
12:44 stephan48 i thought about using the function in my config class, so i can use it also in my other parts of my app(gearman worker, scripts).. to automatically detect the config path
12:47 sri http://www.sublimetext.com/ # interesting, maybe a textmate killer
12:48 yko mmm... do like
12:48 janus left #mojo
12:48 janus joined #mojo
12:49 sri hmm, python scripting :S
12:58 kaare_ left #mojo
12:58 abra joined #mojo
13:07 chansen http://kodapp.com/
13:14 sri sublime supports textmate syntax and theme files
13:14 chansen yeah, but Kod is open-source =)
13:18 sri not really a big selling point for a text editor
13:18 GabrielVieira joined #mojo
13:21 forwardever sri: Routes::Match line 195 return Mojo::URL->new, line 184 returns undef and in controller, a URL instance based on request data is generated, is that consistant?
13:22 chansen sri: true, but it has potential and followers on github, just give it some time (it's a fairly new app)
13:25 sri forwardever: arguable
13:28 forwardever sri: don't want to argue about that one :), so leaving it as it is ?
13:31 sri forwardever: nope ;p
13:31 sri the code actually gets cleaner the other way around
13:33 sri sets back your decoupling efforts though
13:34 sri hmm, there are multiple solutions
13:36 forwardever * still doesn't want to argue on that one to save energy for more important fights
13:37 sri you might regret pointing me at that ;p
13:38 sri i'm thinking about moving the path code into Match.pm
13:38 sri it makes the code shorter
13:40 forwardever not sure what you mean, moving code from controller to match
13:40 forwardever ?
13:40 sri yes
13:40 forwardever you know what I think about that
13:43 forwardever but I won't be able to keep everything in sync either, but will go the opposite way of course code goes from match to controller
13:43 forwardever i mean the mojo::url stuff
13:43 forwardever just returning a path or so
13:49 sri on the Match layer that might even work, but the actual dispatching with the stash and all will be a huge pain
13:59 forwardever the _dispatch_controller stuff e.g. is very specific and might not belong in Router namespace, don't think about the pain right now, otherwise, I wouldn't even have started :), but will do it step by step if I find some time
14:16 sri you better not look at the last commit ;p
15:02 daviddelikat left #mojo
15:06 daviddelikat joined #mojo
15:19 gshank joined #mojo
15:30 vel joined #mojo
15:43 MojoGuest808 joined #mojo
15:43 MojoGuest808 From: http://news.ycombinator.com/item?id=1277067 (181 hits)
15:44 MojoGuest808 left #mojo
15:47 forwardever sri: still not sure about your fix, shouldn't "# Fix scheme" always be applied to $base?
15:49 sri ?
15:49 sri ah, you mean with a check on $tx
15:51 sri not a bad idea
15:53 sri ah there is a problem though
15:53 sri url_for('some_websocket_route') from a normal one
15:53 sri and you will never call url_for on itself for a websocket xD
15:56 forwardever okay, so no issue, as far as I understand
15:56 sri right
15:56 GitHub134 joined #mojo
15:56 GitHub134 mojo: master Sebastian Riedel * 28b90cd (2 files in 1 dirs): made routes slightly faster - http://bit.ly/fJ5k03
15:56 GitHub134 left #mojo
15:58 forwardever and no issue with # Fix paths in case of "return $url->parse($name)" either?
15:59 sri i guess not, i would expect there to be broken test cases otherwise
16:00 sri actually i'm not even sure what that code does
16:00 forwardever that's the question :)
16:01 sri hmm, removing it breaks nothing Oo
16:02 forwardever ye, all tests pass
16:03 sri weird
16:03 GabrielVieira left #mojo
16:03 GabrielVieira joined #mojo
16:04 GitHub198 joined #mojo
16:04 GitHub198 mojo: master Sebastian Riedel * 294baa8 (1 files in 1 dirs): removed some legacy code - http://bit.ly/fH7NA9
16:04 GitHub198 left #mojo
16:04 sri i don't think it does anything useful
16:05 sri merging path and base doesn't make any sense
16:05 forwardever hope you did your tests right
16:06 sri base path usually only exists for cgi
16:06 sri i can even see it going totally wrong
16:06 sri must be some forgotten legacy code
16:07 forwardever makes moving code back to controller easier :)
16:10 sri forwardever++ # poking around
16:36 perlrocks Twitter: "just renamed #mojolicious i18n lexicon generator https://github.com/und3f/mojoliciousx-lexicon" --und3f http://twitter.com/und3f/status/31390131399172096
16:53 vel left #mojo
17:10 GabrielVieira left #mojo
17:22 perlrocks Twitter: "mojolicious-lexicon 0.9 by UNDEF - http://frepan.org/~undef/mojolicious-lexicon-0.9/" --cpan_new http://twitter.com/cpan_ne​w/status/31401724484784129
18:03 ispy_ left #mojo
18:16 josh left #mojo
18:20 josh joined #mojo
18:20 forwardever sri: done with moving, like the result, all Mojo::URL stuff in Controller, clean code
18:20 forwardever https://github.com/forwardever/mojo/blob​/237ca296b83790ac0fac28a7d30563a43640261​c/lib/Mojolicious/Routes/Match.pm#L160
18:21 forwardever https://github.com/forwardever/mojo/blo​b/237ca296b83790ac0fac28a7d30563a436402​61c/lib/Mojolicious/Controller.pm#L726
18:21 GabrielVieira joined #mojo
18:24 sri forwardever: looks good, mostly what i expected
18:24 sri just don't like the method method
18:25 sri same for endpoint_is_websocket
18:25 forwardever have to think about why i introduced it, suppose that otherwise, one would have to overwrite the default conditions, which makes the api overly complicated
18:25 sri thats should be is_websocket i guess
18:26 forwardever yea, probably
18:26 sri what would be the point of overloading method matching logic?
18:26 sri not like there's much more to do than well... match methods
18:27 sri for more you can always go with conditions
18:27 forwardever note sure what you mean, could you explain a bit
18:28 josh left #mojo
18:28 sri i mean you can always extend route logix with conditions
18:28 sri *logic
18:29 josh joined #mojo
18:30 forwardever hmm, still not sure, are we talking about removing "$self->add_condition(method..." from Routes?
18:30 sri we are talking about sub method
18:30 sri imo it makes not much sense
18:31 forwardever which is a replacement for $self->add_condition(method which was removed to make it controller independend
18:31 sri yes i know
18:31 sri but why is it there?
18:31 sri as a public method
18:31 forwardever $self->add_condition(method requires controller to have request method
18:31 forwardever i mean ->req
18:32 sri nooooo
18:32 sri why is sub method a public method?
18:32 forwardever _method ? :)
18:32 sri for example
18:32 forwardever makes sense
18:33 sri and endpoint_is_websocket is ugly
18:33 sri that should just be is_websocket
18:33 forwardever okay
18:33 sri otherwise i think i can live with the changes
18:33 forwardever just remembered an earlier discussion with you when you told me perl has not private methods :)
18:34 * sri doesn't remember
18:34 forwardever ... and I'm to lazy to search the logs
18:35 sri now you need to find a way to fix your repo :/
18:36 forwardever hmm, apply changes on top of latest mojo, i suppose
18:36 forwardever ?
18:36 sri ye
18:36 sri and squash into single commit
18:37 forwardever okay, will try, but first have to eat something...
18:37 josh left #mojo
18:37 sri puny human
18:44 perlrocks Twitter: "mojoliciousって長い" --yasutaka http://twitter.com/yasutak​a/status/31422393092145152
18:57 perlrocks Twitter: "@patrickdebois #Mojolicious makes it really easy to write websocket clients and servers. You could throw something together quickly." --obfuscurity http://twitter.com/obfuscuri​ty/status/31425832874418177
18:59 perlrocks Twitter: "@patrickdebois And #Mojolicious is seriously cool besides the websockets stuff too! cc: @obfuscurity" --zipkid http://twitter.com/zipkid/status/31426248068571138
19:13 perlrocks Twitter: "ha #mojolicious web framework . http://mojolicio.us/ /thx @zipkid @obfuscurity" --patrickdebois http://twitter.com/patrickdeb​ois/status/31429656049618944
19:17 ispy_ joined #mojo
19:27 forwardever sri: done, commit is in branch decouple, 2 commits
19:27 perlrocks Twitter: "@zipkid @patrickdebois I didn't want to sound like a fanboi. But yeah, #Mojolicious is the bee's knees." --obfuscurity http://twitter.com/obfuscuri​ty/status/31433389735149568
19:38 kaare_ joined #mojo
19:41 kaare left #mojo
19:46 otaviof joined #mojo
20:07 sri forwardever: when you add or change a public method/attribute you are also responsible for the corresponding pod
20:07 tempire pod fail!
20:09 sri !
20:09 forwardever is_websocket, to be documented, I suppose in Match class
20:10 sri you also changed new
20:10 sri and match
20:11 forwardever hmm, ye, will do it in an hour or so, have to leave for a couple of minutes
20:11 sri ok, you can squash everything into one commit then
20:12 forwardever how can i make one out of three commits with git (need a hint)
20:12 sri google for squash
20:13 forwardever okay
20:13 sri thats the best thing about git, you can just rewrite history
20:13 forwardever left #mojo
20:13 moritz or google for "interactive rebase"
20:50 otaviof left #mojo
21:10 ispy_ left #mojo
21:23 forwardever joined #mojo
21:40 ispy_ joined #mojo
21:47 * tempire hugs mojolicious
22:15 forwardever sri: updated docs, but "git rebase -i HEAD~4" doesn't work, can you merge the commits together, no energy left today
22:20 forwardever nn
22:21 forwardever left #mojo
22:21 abra left #mojo
22:33 abra joined #mojo
22:43 * tempire gives a present to purl
22:43 otaviof joined #mojo
22:56 MojoGuest895 joined #mojo
22:56 MojoGuest895 From: http://news.ycombinator.com/item?id=1277067 (182 hits)
22:56 MojoGuest895 left #mojo
22:59 kaare_ left #mojo
23:01 stephan48 am i wrong or does this look fucked up? http://filebase.stephan-jauernick.de/fil​ebase/fileinfo/4d4499c91523f4cd47000000
23:01 stephan48 here its near white front on white background
23:04 stephan48 http://filebase.stejau.de/images/wtf.JPG
23:05 tempire what browser?
23:05 purl browser is broken or http://www.gfd-dennou.org/li​brary/cc-env/OLD/httpd_cern/
23:06 stephan48 firefox 3.6.13 on win xp home sp3
23:06 stephan48 running since about 12h nonstop
23:07 tempire It's been a while since I fired up firefox.  3.6.13 is a recent version, right?
23:07 tempire bleeding edge or stable?
23:08 stephan48 stable
23:08 stephan48 and recent yes
23:08 stephan48 firefox update doesnt give me a new version
23:08 tempire looks the same in chrome?
23:09 stephan48 jap
23:11 stephan48 and in internet explorer it looks ugly
23:11 stephan48 or rather same but there its really white on white
23:29 tempire left #mojo
23:30 tempire joined #mojo
23:52 arthas left #mojo

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