Camelia, the Perl 6 bug

IRC log for #mojo, 2011-11-02

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

All times shown according to UTC.

Time Nick Message
01:01 GitHub188 joined #mojo
01:01 GitHub188 [mojo] kraih pushed 1 new commit to master: http://git.io/jZFgtw
01:01 GitHub188 [mojo/master] fixed bug in user_agent.t - Sebastian Riedel
01:01 GitHub188 left #mojo
01:24 GitHub100 joined #mojo
01:24 GitHub100 [mojo] kraih pushed 1 new commit to master: http://git.io/hdnEsg
01:24 GitHub100 [mojo/master] removed CSS4 selector subject support from Mojo::DOM::CSS until we actually know the exact semantics - Sebastian Riedel
01:24 GitHub100 left #mojo
01:24 sri not much of a point keeping it for now
01:27 Alias left #mojo
01:28 sri been catching up on the css4 design discussions, and they are not sure yet about anything
01:29 sri the whole thing might get redesigned as a pseudo-class
01:29 perlrocks Twitter: "Mojolicious 2.21 by SRI - http://t.co/41SfOYkN" --cpan_new http://twitter.com/cpan_new​/status/131543438960230402
01:47 DaTa but why remove the (experimental) feature? just change it when the spec changes
01:50 sri having something implemented that will break with a 99% certainty makes me feel uncomfortable
01:50 sri especially since it might get changed in ways that require a Mojo::DOM::CSS redesign
01:52 sri if someone implements it more sane i would consider adding it as experimental again
01:52 sri but it needs to have support for multiple subject matches
01:53 sri (what judofyr assumed earlier)
01:58 sri actually i think our whole search strategy was wrong
01:58 sri a 2 step search should be better
02:22 sri DaTa: or do you know any good reason to keep it?
02:27 crab good morning
02:27 purl For you maybe.
02:27 * sri waves
02:27 crab wow, 2.21 already
02:28 sri with almost 300 less lines of code than 2.20 :)
02:30 crab i'm expecting 3.0 in two weeks, with only one line of code!
02:36 sri sounds like a plan
02:54 xaka joined #mojo
03:11 Eugene joined #mojo
03:23 newbie joined #mojo
03:33 perlrocks Twitter: "Updating the Duct Tape for HTML5: Websockets in Perl (Mojolicious) http://t.co/jZQwMOs8" --dev_links http://twitter.com/dev_link​s/status/131574561090187264
03:52 perlrocks Twitter: "Updating the Duct Tape for HTML5: Websockets in Perl (Mojolicious) http://t.co/meVV7NLx" --thefrontend http://twitter.com/thefronte​nd/status/131579462704832512
03:57 crab updating the duct tape for html5?
03:58 crab oh. how strange. but nice that someone paid attention to the websockets example.
04:22 MojoGuest393 joined #mojo
04:22 MojoGuest393 From: http://news.ycombinator.com/item?id=1277067 (69 hits)
04:45 mwp joined #mojo
05:16 perlrocks Twitter: "pushed my #mojolicious #couchdb authentication plugin to #github - it is singled out of my last mojo based apps" --norbu09 http://twitter.com/norbu09​/status/131600444341489665
06:27 Foxcool joined #mojo
06:28 koban joined #mojo
06:28 * sri yawns
06:33 tholen_ joined #mojo
06:34 sri think i know how to do css4 selector subject support right
06:34 Eugene joined #mojo
06:39 MojoGuest218 joined #mojo
06:39 MojoGuest218 From: http://www.google.com.au/url?sa=t&rct=j&a​mp;q=html5%20irc%20client&source=web&​cd=4&ved=0CDgQFjAD&url=http%3A%2F%2Fd​ev.xantus.org%2F&ei=SOWwTu3ePIOdiAem99HtA​g&usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
06:39 MojoGuest218 left #mojo
07:06 sugar joined #mojo
07:08 marty joined #mojo
07:25 migo joined #mojo
07:27 Vandal joined #mojo
07:30 ispy_ joined #mojo
07:41 cosmincx joined #mojo
07:41 spleenjack joined #mojo
07:46 arthas_ joined #mojo
07:48 MojoGuest842 joined #mojo
07:48 MojoGuest842 From: http://www.google.it/url?sa=t&rct=j&q=​websocket%20extjs&source=web&cd=7&​ved=0CF8QFjAG&url=http%3A%2F%2Fdev.xantus.​org%2F&ei=C_GwTr21DMOF-wbE4-iLAg&usg=A​FQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&cad=rja (1 hits)
07:48 MojoGuest842 hello
07:55 xoma joined #mojo
08:01 spleenjack joined #mojo
08:09 esskar joined #mojo
08:39 tholen_ joined #mojo
08:47 andrefs joined #mojo
08:51 MojoGuest842 left #mojo
08:57 xoma joined #mojo
09:20 schlumpf joined #mojo
09:26 burk sri: thanks, works in version 2.20 though
09:30 sri i see, depending on a helper for cpre functionality like that was never a good idea anyway
09:34 Vandal how to redirect with delay?
09:41 marcus sri: huzzah
09:41 judofyr joined #mojo
09:43 sri marcus: what are you cheering at?
09:43 marcus sri: css4 selector subject support
09:44 sri oh, i actually removed it
09:44 judofyr
09:44 judofyr :(
09:44 marcus sri: that's your defintion of 'right'? :)
09:44 sri for now it is i'm afraid
09:44 sri the spec is too unstable even for experimentation
09:45 sri i've gone through the discussions and things will prolly change completely
09:45 marcus fairy snuff
09:46 judofyr sri: link to discussion? there's a public mailing list?
09:46 sri the w3c lists
09:46 sri it's many small discussions though
09:47 sri those lists are messy
09:48 sri http://lists.w3.org/Archives/Public/www-style/
09:48 sri think i started there
09:51 sri once a browser implements selector subject support we can talk about it again
09:53 mire joined #mojo
09:54 sri the right implementation i think would be to evaluate the selector in two steps btw
09:55 sri "a > $b > c" would become something like 1) find all elements matching "a > b" and 2) search in all subtrees for "> c"
09:57 sri i've also thought about supporting "> c" natively
09:57 sri like $dom->find("a > b")->grep(sub { $_->at("> c") })
09:58 sri the second selector would be relative to the root element of the current tree
09:59 crab what is cpre?
09:59 sri s/cpre/core/
09:59 crab Vandal: create a timer and do it in the callback
09:59 Vandal crab, I don't understand
10:00 judofyr sri: isnt "> c" the same as ":root > c"?
10:00 judofyr Mojo::DOM doesn't support :root?
10:00 Vandal crab, I want something like Refresh: 5; url=
10:00 sri :root only matches the actual document root
10:00 crab oh
10:00 judofyr ah
10:02 sri relative combinators make sense because we'll most likely need to implement them internally anyway for selector subjects
10:03 sri if someone found a way to make this method simple and easy to follow, that person would forever be my hero :) https://github.com/kraih/mojo/blo​b/master/lib/Mojo/DOM/CSS.pm#L150
10:04 sri it's the core of the css engine, where combinators are handled
10:05 sri i would love pluggable combinators too, like some js engines have
10:06 ruz sri: http://pastie.org/2798014 # patch that makes tmpl inheritance more sane in my eyes
10:07 ruz fixes problem when content of a template thrown away, http://pastie.org/2796057
10:10 sri ruz: please elaborate
10:12 ruz when you have chained extends then templates in the middle don't update 'content'
10:12 ruz http://pastie.org/2796057 # in this example <strong> wrapper is just ignored
10:14 ruz actually whole template rendered but ignored, except those parts that interract with stash, for example content_for
10:14 ruz I think my patch is not perfect but address two thing
10:15 ruz 1) give access to old values in content/content_for blocks. so they can wrap old values
10:16 ruz 2) keep updating 'content' in stash while walking inheritance chain
10:17 ruz second part should be adjusted a little bit to better deal with the current reality
10:17 sri checking if this is a bug
10:17 ruz I have to run, will be back in a couple hours
10:18 sri the patch breaks one test, have to verify if the test case is wrong
10:19 sri but at first sight, it does seem like a bug that the whole content gets lost
10:23 sri it's actually the first part i'm unsure about
10:32 alpha6 left #mojo
10:42 Vandal so there is no way to render and set Refresh?
10:47 mire joined #mojo
10:49 GitHub113 joined #mojo
10:49 GitHub113 [mojo] kraih pushed 1 new commit to master: http://git.io/z8E_Wg
10:49 GitHub113 [mojo/master] fixed a few template inheritance bugs - Sebastian Riedel
10:49 GitHub113 left #mojo
10:49 sri ruz: thanks, fixed
11:08 crab sri: what was this "fixed route pattern bug" about?
11:09 sri crab: https://github.com/kraih/mojo/commit/087ed​7d0243186f92cd8fa36a949fc82c29c62a3#L4R192
11:10 sri .0 was previously picked up as a format
11:10 sri which broke such routes
11:44 tholen_ joined #mojo
12:18 ispy_ joined #mojo
12:20 z4ph0d joined #mojo
12:23 GitHub182 joined #mojo
12:23 GitHub182 [mojo] kraih pushed 1 new commit to master: http://git.io/4Z2vlg
12:23 GitHub182 [mojo/master] added experimental --verbose option to routes command - Sebastian Riedel
12:23 GitHub182 left #mojo
12:24 sri should be quite a bit more readable now
12:24 sri and i've tried to inlcude the format regex
12:26 fmerges joined #mojo
12:28 GitHub113 joined #mojo
12:28 GitHub113 [mojo] kraih pushed 1 new commit to master: http://git.io/-aRocw
12:28 GitHub113 [mojo/master] move introspection recipe to basics - Sebastian Riedel
12:28 GitHub113 left #mojo
12:29 sri http://mojolicio.us/perldoc/Mojoli​cious/Guides/Routing#Introspection
12:29 sri that's how the command looks now
12:33 perlrocks Twitter: "Mojolicious 2.0.21 http://t.co/wXQIMZ09" --campuscodi http://twitter.com/campuscod​i/status/131710556146118656
12:35 Vandal why in one word? /ajaxinfo/:key  GET  ajaxinfokey
12:37 Vandal what it column for?
12:38 judofyr Vandal: the name of the route
12:38 judofyr url_for('ajaxinfokey', key => 1) # => "/ajaxinfo/1"
12:39 Vandal thanks
13:02 noganex_ joined #mojo
13:20 cosmincx1 joined #mojo
13:23 GitHub47 joined #mojo
13:23 GitHub47 [mojo] kraih pushed 1 new commit to master: http://git.io/nxXxAA
13:23 GitHub47 [mojo/master] use Mojo::Util more - Sebastian Riedel
13:23 GitHub47 left #mojo
13:25 smpb joined #mojo
13:31 cosmincx joined #mojo
13:31 mwp joined #mojo
13:40 ruz sri: back, I will review your fix and see if it fits everything I want to do
13:43 ruz sri: one thing about inheritance bugs me
13:44 ruz if template in the middle only uses content_for and other things that manipulate stash and at the end has no output
13:45 ruz then probably content should be kept intact
13:53 metaperl joined #mojo
13:54 cosimo https://metacpan.org/module/Devel::Cycle
13:55 cosimo re: finding cycles a few screens ago
13:57 sri ruz: how would that work?
13:57 sri there is pretty much always at least whitespace output
13:57 ruz sri: skip whitespace only
13:58 sri not sure about that
13:58 ruz otherwise after my change each template should have <%= content %> recordd
13:58 ruz I think some examples in guides that describe inheritance don't do that
13:59 MojoGuest512 joined #mojo
13:59 MojoGuest512 From: http://news.ycombinator.com/item?id=1277067 (70 hits)
13:59 ruz cosimo: Devel::Leak::Object is very handy for OO programs
13:59 ruz sri: let me write a test
13:59 sri ruz: have it implemented already
13:59 sri just not sure if it is right
14:01 ruz I'm not sure what's right
14:01 ruz http://search.cpan.org/~sri/Mojolicious/lib/Mojol​icious/Guides/Rendering.pod#Template_inheritance
14:02 arpadszasz joined #mojo
14:02 ruz example in that doc suffers
14:03 * sri doesn't follow
14:04 ruz cooking example
14:04 sri please elaborate
14:08 GitHub58 joined #mojo
14:08 GitHub58 [mojo] kraih pushed 1 new commit to master: http://git.io/QGQ11w
14:08 GitHub58 [mojo/master] improved template inheritance by ignoring whitespace-only content - Sebastian Riedel
14:08 GitHub58 left #mojo
14:09 sri i might have to revert it at some point, but i'm willing to at least try it
14:09 sri ignoring whitespace-only does seem very dwim
14:12 ruz sri: http://pastie.org/2799006, look into body
14:14 ruz I mean after rendering
14:14 sri looks perfect to me
14:14 sri (after the commit above)
14:14 ruz ah"
14:14 ruz :)
14:15 sri that kind of inheritance does look very nice, i think whitespace detection does have a good chance to survive
14:16 ruz sri: with these changes you don't need content_for
14:17 d4rkie joined #mojo
14:17 sri content_for is nice for partials
14:17 ruz as content call may reuse content inside to put either before or after
14:21 sri the main motivation for content_for is partial templates that also want to add a style tag or so to the head section
14:24 sri http://mojolicio.us/perldoc/Mojolicious/Gu​ides/Rendering#Including_partial_templates
14:27 ruz sri: http://pastie.org/2799072 # expected this to work on master, but it doesn't
14:30 ruz anyway, I'm happy at the moment and should return back to work, return back to mojo in 6 hours :)
14:30 sri i'll look into it :)
14:35 sri ruz: ah, they get rendered in opposite order, last template in the inheritance chain first
14:35 sri and the content value does not get redefined
14:36 MojoGuest636 joined #mojo
14:36 MojoGuest636 From: http://www.google.com.ar/url?sa=t&amp;rct=j&am​p;q=websocket%20irc%20client&amp;source=web&am​p;cd=3&amp;ved=0CC0QFjAC&amp;url=http%3A%2F%2F​dev.xantus.org%2F&amp;ei=xVSxTpjhDMSftge81pimA​g&amp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&a​mp;sig2=FkgGNTFCjNR0rSJHtIqzJA&amp;cad=rja (1 hits)
14:36 sri content blocks are completely overridden
14:41 Foxcool joined #mojo
15:01 mercutioviz joined #mojo
15:25 kaare joined #mojo
15:26 cosmincx1 joined #mojo
15:38 MojoGuest788 joined #mojo
15:38 MojoGuest788 From: http://www.google.com/url?sa=D&amp​;q=http://dev.xantus.org&amp;usg=A​FQjCNF_rM6vpg9DT3eh4McOgWqn8mn5Xw (6 hits)
15:54 sromanov joined #mojo
15:55 xaka joined #mojo
15:57 MojoGuest394 joined #mojo
15:57 MojoGuest394 From: http://news.ycombinator.com/item?id=1277067 (71 hits)
16:04 andrefs joined #mojo
16:32 sromanov joined #mojo
16:39 Eugene joined #mojo
16:54 perlrocks Twitter: "Mojo::Server::FastCGI v0.2 (compatible with #mojolicious 2.x) is now on CPAN: http://t.co/kWBtvVuD Thanks @kraih and other contributors!" --arpadszasz http://twitter.com/arpadszas​z/status/131776234962165760
16:55 marcus yay fastcgi
16:55 purl yay fastcgi is, like, in sid
17:07 tholen_ joined #mojo
17:13 batman joined #mojo
17:15 MojoGuest997 joined #mojo
17:15 MojoGuest997 From: http://blog.kraih.com/perl-is-ready-for-html5 (18 hits)
17:16 MojoGuest997 test
17:16 * marty waves
17:25 grim_fandango joined #mojo
17:33 amoore joined #mojo
17:40 d4rkie joined #mojo
17:44 estrai hi, in mojo lite when I have a route say any '/*thing' => sub { ... } how can I access the "thing" in the sub?
17:47 d4rkie joined #mojo
17:47 Vandal estrai, http://mojolicio.us/perldoc/M​ojolicious/Lite#Placeholders
17:49 estrai ugh, I was staring at that in the morning, thank Vandal
17:49 estrai thanks
18:02 GitHub112 joined #mojo
18:02 GitHub112 [mojo] kraih pushed 1 new commit to master: http://git.io/OYhwLA
18:02 GitHub112 [mojo/master] better chunked example - Sebastian Riedel
18:02 GitHub112 left #mojo
18:11 mercutioviz joined #mojo
18:24 sugar joined #mojo
19:03 xaka sri: still wonder if you can add some introspection info into Mojo::Base to get list of "has" defined attributes. Also it'd be good to have set_x, get_x methods which user can redefine and impl his own logic separately (for get and set)
19:04 judofyr joined #mojo
19:18 nicomen joined #mojo
19:18 sri xaka: Mojo::Base is for internal use, you might want to try Moose
19:20 xaka Mojo::Base already operates like Moose (1%, properties) so i don't want to introduce such huge dependencie. I like Mojo::Base more to build my own object model. Just need something to iterate over defined props in generic way
19:21 xaka Moose is all about tons of deps, files and bla bla bla. No, thanks :)
19:21 sri if the mojolicious code doesn't benefit from it there is no chance of it going into core
19:21 mercutioviz Moose, as in "as heavy as a"
19:22 xaka but what about benefits for users? ;)
19:22 xaka it's the framework, it's ok to have such things inside it
19:22 sri no it's not
19:23 sri mojolicious is not a kitchensink
19:23 xaka especially if it has "has" already, list of defined "has" really good idea
19:25 sri feel free to fork the module, but in core it's not gonna happen unless we need it for actual mojolicious features
19:26 xaka hm, your policy is too strict, dunno why you don't want to introduce things which fits pretty well into the framework and just because of such policy i have to use Moose or whatever.
19:27 xaka fork also means i have to monitor master changes which is even badly
19:28 judofyr joined #mojo
19:28 xaka btw, i'm stop talking. I spammed idea and it's up to you what to do with it.
19:28 sri how does being able to list attributes help write better web applications?
19:29 xaka you build your in-memory object module based on Mojo::Base and if you have list of attrs you can write generic code to convert such objects into json or xml or whatever without hardcoding attr names in every object case
19:30 xaka object_to_json(object) { json_encode({map key => value } for attr in object.attr_list } - just an example of the usage
19:31 sri not convinced
19:32 sri if you can get others to support your idea we can talk about it again
19:32 xaka others, where are you?
19:33 xaka there is no mailing lists, forums, only IRC with dead souls :) looks like i'm in a bad ass
19:33 yko sri++
19:34 diegok xaka: mouse?, moo?
19:34 yko mo and m!
19:34 sri they key to getting a questionable feature in is usually to convince people like tempire, yko, marcus or crab
19:34 sri then you've convinced me too
19:35 sri (most of the time)
19:35 * yko is proud of such confidence
19:35 sri btw. a mailing list is linked right from the frontpage
19:35 * tempire accepts bribes in the form of cookies
19:36 * sri hugs yko
19:36 * sri accepts cookies too
19:36 yko json_encode({%$object}) should be enough in most cases
19:36 diegok hm... cookies doesn't fit well with beer...
19:37 tempire then throw out the beer
19:37 diegok yko: oh my!
19:37 tempire cookies over beer
19:37 * tempire chants
19:37 diegok tempire: :-)
19:37 yko if you really need such functionality... you can use base 'Mojo::Base' and add such method
19:38 * sri sides with beer
19:38 yko just iterate over keys of object and check if $object->can($key)
19:38 tempire hmm.
19:38 tempire http://www.google.com/trends?q=cookies%2Cbeer&​amp;ctab=0&amp;geo=all&amp;date=all&amp;sort=0
19:38 tempire seems you win
19:38 tempire THIS TIME.
19:39 sri \o/
19:39 yko :)
19:39 tempire lulz
19:39 tempire "- Scale is based on the average worldwide traffic of cookies in all years."
19:40 tempire The Chinese eat very little cookies
19:40 tempire Germany eats the same amount of cookies as it drinks beer
19:40 * tempire plans a move
19:41 yko http://www.google.com/trends?q=perl%2Cporn&am​p;ctab=0&amp;geo=all&amp;date=all&amp;sort=1
19:41 yko damn, looks like Perl loose :(
19:42 tempire shnikies.
19:44 schlumpf is there some kind of mojolicious-mode for emacs?
19:49 MojoGuest664 joined #mojo
19:49 yko schlumpf, only for vim :p
19:49 MojoGuest664 From: http://twitter.com/ (5 hits)
19:50 schlumpf yko: you make kitty sad ;-(
19:50 MojoGuest689 joined #mojo
19:50 yko schlumpf, I tried to convince somebody of emacs-users to write something for emacs, but everyone so lazy...
19:50 MojoGuest689 From: http://news.ycombinator.com/item?id=1277067 (73 hits)
19:51 schlumpf hmm, i could look into it
19:52 tempire schlumpf: do it.
19:52 schlumpf basically it's just nxml-mode plus perl-mode
19:52 schlumpf i did something like that for c with embedded lua
19:52 yko tempire++ # did I say that I'm happy mojo.vim is used in mojocasts?
19:52 tempire :)
19:53 tempire oh that reminds me.
19:53 tempire I need to finish the next one for monday
19:53 yko :)
19:53 sri :o
19:54 yko also very nice voice in mojocasts
19:55 sri yko++ # mojo.vim and command-t are the only addons i can't live without
19:56 yko O_o
19:56 yko command-t? :)
19:56 sri it totally rocks for buffer navigation
19:56 yko oh, nice
19:57 sri https://wincent.com/products/command-t
19:58 sri when i learned it can not just open files but also navigate buffers it blew my mind :)
20:07 tempire nerd tree is the top for me.
20:07 tempire I only use command-t in uber large projects
20:08 sri dunno, split window doesn't work for me
20:16 * yko uses project.tar.gz
20:22 perlrocks Twitter: "Mojolicious plus Redis equals RestMQ-pl http://t.co/ZdkJTvWu" --rbucker http://twitter.com/rbucker​/status/131828464771792896
20:25 amoore joined #mojo
20:27 metaperl joined #mojo
21:32 andrefs joined #mojo
21:33 andrefs joined #mojo
22:06 amoore joined #mojo
22:38 tempire http://sqlkorma.com/ - looks great.
22:38 tempire someone needs to make this for perl
22:39 hernan joined #mojo
22:40 hernan joined #mojo
22:41 hernan joined #mojo
22:42 hernan joined #mojo
22:43 hernan joined #mojo
22:44 hernan joined #mojo
23:05 marty tempire:  Rose::DB:Object is pretty close
23:20 tardisx joined #mojo
23:23 DaTa sri: http://pastie.org/2801693 is that hard to fix?
23:50 mire joined #mojo

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