Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-23

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

All times shown according to UTC.

Time Nick Message
00:03 zivester joined #mojo
00:07 vervain left #mojo
00:07 vervain joined #mojo
00:14 Molaf_ joined #mojo
00:30 GabrielVieira joined #mojo
01:14 Mike-PerlRecruiter_ joined #mojo
01:57 marty_ joined #mojo
02:43 Liam`` joined #mojo
02:50 Liam`` joined #mojo
02:58 Liam`` joined #mojo
03:20 Liam`` joined #mojo
03:29 Liam` joined #mojo
03:37 zivester joined #mojo
03:38 noganex joined #mojo
03:39 Liam`` joined #mojo
04:23 xaka joined #mojo
04:38 marty joined #mojo
04:46 Liam`` joined #mojo
05:55 jberger sri++, keeping it cool
06:17 d4rkie joined #mojo
07:00 yakudza joined #mojo
07:21 durcais joined #mojo
07:24 durcais vervain++ for nominating his house for mojocon 2014
07:24 * durcais hopes he has a garage for the spillover assembly
07:34 Vandal joined #mojo
07:34 amirite hey sup
07:34 * amirite getting into websockets today
08:24 egopro joined #mojo
08:35 sh4 joined #mojo
08:42 Foxcool joined #mojo
08:50 ObseLeTe joined #mojo
08:54 egopro_ joined #mojo
09:08 Vandal is there a way to make Mojo::DOM ignore self-closing of tag?
09:23 dod joined #mojo
09:23 dod joined #mojo
09:24 PanzerBjorn left #mojo
09:42 ryozi joined #mojo
09:54 dod joined #mojo
09:58 kitt_vl joined #mojo
10:12 sh4 joined #mojo
10:22 ObseLeTe joined #mojo
10:44 basic6 joined #mojo
10:52 inokenty joined #mojo
11:02 egopro joined #mojo
11:09 bc547 joined #mojo
11:15 lammel2 joined #mojo
12:03 eugen joined #mojo
12:10 marty joined #mojo
12:10 marty joined #mojo
12:14 Miked joined #mojo
12:59 amirite i want to init a websocket connection -> fork -> send back a message after fork has finished
12:59 amirite without using waitpid or blocking in any sense
12:59 amirite is this possible?
12:59 amirite without polling?
13:13 Mike-PerlRecruiter_ joined #mojo
13:22 batman amirite: you need a job scheduler. forking is wrong in 101% of the time
13:59 asarch joined #mojo
14:23 ObseLeTe joined #mojo
14:24 ObseLeTe joined #mojo
14:32 anaio joined #mojo
14:52 gryphon joined #mojo
14:54 Miked joined #mojo
15:10 good_news_everyone joined #mojo
15:10 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/0K5WIA
15:10 good_news_everyone mojo/master 6269c82 Sebastian Riedel: added accept_interval setting to Hypnotoad
15:10 good_news_everyone left #mojo
15:31 jberger sri: I think I can extend my plugin, Mojolicious::Plugin::ModuleBuild to work for EUMM toolchain too
15:31 jberger course I would rename it to Mojolicious::Plugin::FileShareDir
15:31 jberger but it would employ the same directory tree and general logic
15:37 mire_ joined #mojo
15:46 good_news_everyone joined #mojo
15:46 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/uAb48w
15:46 good_news_everyone mojo/master 70463d7 Sebastian Riedel: reduced idle CPU usage of Mojo::Reactor::Poll
15:46 good_news_everyone left #mojo
15:51 jberger https://github.com/jberger/Mojoliciou​s-Plugin-ModuleBuild/blob/master/lib/​File/ShareDir/Install/Mojolicious.pm
15:57 human39 joined #mojo
16:22 jberger updated: https://github.com/jberger/Mo​jolicious-Plugin-FileShareDir
16:55 eugen joined #mojo
17:00 jberger hmmm, actually perhaps my changes are overkill
17:01 jberger EUMM installs the files from the path tree I specify without File::ShareDir so I think the plugin is sufficient without an EUMM helper mechanism
17:01 jberger I guess I'm going to rename it again, to Mojolicious::Plugin::InstallPaths or some such
17:04 yakudza joined #mojo
17:05 mire_ joined #mojo
17:08 sh4 joined #mojo
17:08 anewkirk omg, I just thought of the most killer feature for mojolicious ...
17:09 anewkirk ... template filtering
17:09 anewkirk (as most people I know have come to call it)
17:09 anewkirk basically you filter the template and alter it before its used but after its rendered
17:11 anewkirk ... and mojolicious is at a unique advantage to offer something like this out-of-the-box because it has it's own templating system -and- it's own DOM parser
17:11 anewkirk the problem this solves is that some things are best left to the template, while other things are best done with a DOM parser
17:25 bjoernfan When would you use this? </curious>
17:25 bjoernfan Might have a been a bit quick with that end tag, I'm still curious. ;)
17:27 anewkirk bjoernfan, I'll show you
17:27 anewkirk brb
17:28 bjoernfan Not that it's me you need to convince or anything.
17:31 anewkirk bjoernfan, here you go -- http://paste.scsys.co.uk/220189​?tx=on&amp;submit=Format+it%21
17:36 bjoernfan I don't get why I woundn't just properly set the title from the controller.
17:36 bjoernfan Or whatever else you're changing.
17:36 buu anewkirk: I occasionally hack that into my mojo/catalyst apps
17:36 * bjoernfan scratches his head
17:37 anewkirk buu, thats aweful
17:37 buu bjoernfan: I'm not sure 'title' is the perfect example but there's a number of times when I've wanted to keep some, say, configuration type variable, such as the /css/ directory as a variable outside templates
17:37 * marty wonders what information is available after a template is rendered that is not available before a template is rendered .   Seems redundant.
17:38 buu And I don't particularly want to put every single one of those inside a template line with a variable..
17:38 anewkirk as I said before ...
17:38 anewkirk The problem this solves is that some things are best left to be handled by the
17:38 anewkirk template, while other things are best done by using regex or a DOM parser.
17:38 anewkirk other things are best done by using regex or a DOM parser
17:38 marty what are "some things"
17:38 anewkirk ummm
17:38 anewkirk cool
17:39 anewkirk how about determining which option should be selected in a forms select-field/combo-box
17:39 anewkirk thats 1
17:40 anewkirk how about conditionally altering HTML element attributes
17:40 anewkirk using conditionals to do that in a template is really really ugly
17:41 buu Rendering a navigational list where you want one of the buttons 'active' is pretty ugly also..
17:41 anewkirk but a dom parser that supports css selectors makes that really easy
17:41 vervain Or when you may want to use your sites static HTML files and inject things from your templating system.
17:42 dod joined #mojo
17:44 anewkirk check it out:
17:44 anewkirk % filter begin
17:44 anewkirk % my ($c, $dom) = @_;
17:44 anewkirk $dom->at('#industry option[value*="'. $c->param('industry') .'"]')->attrs(selected => 'selected');
17:44 anewkirk % end
17:44 anewkirk BOOM
17:44 anewkirk easy peezy
17:44 sri please do not paste code into the channel
17:45 anewkirk yup
17:45 bjoernfan anewkirk: So it's like moving some conditionals from the generated HTML (or whatever format) out of the way? That might be nice...
17:46 anewkirk yeah, and it could push the filters on a stack like with Moose's BUILD then execute them in the order received after the template is rendered
17:48 vervain This is the sort of thing we've often injected js into the page to do, but this is a much nicer idea.
17:49 anewkirk exactly, because JS can be turned off
17:49 anewkirk ... and there goes your user-experience
17:53 sri just last week i asked if there was interest in a new hook that runs after a page has been rendered :)
17:53 bjoernfan sri: What did we reply then? :)
17:53 sri total silence
17:54 vervain I'm interested
17:54 sri which ultimately resulted in this recipe http://mojolicio.us/perldoc/Mojolicious/​Guides/Rendering#Postprocessing_content
18:01 sri actually, the topic has come up many times already
18:01 sri http://irclog.perlgeek.de/​mojo/2012-11-30#i_6200905
18:03 buu Cool.
18:04 anewkirk all the stuff you're referencing is thinking of hooks in a global perspective as opposed to ad-hoc
18:05 anewkirk s/in/with/
18:06 sri well, ad-hoc doesn't require anything new from the framework
18:09 sri you can already do it in like 20 lines of code with an after_dispatch hook and a filter helper
18:09 anewkirk oh, yeah that makes sense
18:10 anewkirk I'll actually do that in a project I'm working on now
18:10 marcus anewkirk: congrats on this week's most passive-aggressive blog-post =)
18:10 anewkirk I do what I can
18:10 anewkirk I think this is the most conversation we've ever had
18:10 anewkirk awesome
18:11 marcus anewkirk: template toolkit does filtering btw, is what you want something similar to that?
18:11 sri oh, i did not see the blog post yet
18:12 marcus sri: http://blogs.perl.org/users/al_newkirk/2012/​12/a-killer-feature-for-mojolicious.html?utm​_source=webspacecraft&amp;utm_medium=twitter
18:12 * marcus has a tweetbot search setup for tweets about things he's interested in.
18:12 sri hmm
18:12 sri and there goes my interest
18:17 marcus sri: I guess ep blocks is quite similar to TT filters?
18:17 sri fyi. whenever someone tried to pressure me with passive agressiveness in the past, they went straight to my ignore list
18:17 sri i have a zero tolerance policy there
18:18 anewkirk I'm wasn't trying to pressure anyone
18:18 marcus sri: to be fair, he did actually come here to discuss it even tho he said he wouldn't ;-)
18:18 sri marcus: they can be, i think there are examples
18:18 anewkirk I actually had zero confidence the idea would get considered
18:18 anewkirk but apparently "other" users thought it was a good idea
18:19 anewkirk so I guess that sucks for them
18:19 sri well, now you have to go through other core devs, only when one of them champions your idea it will be considered
18:19 sri and here you go again
18:19 anewkirk it's just Perl code
18:20 anewkirk if I want to change something, I will, not that big-a-deal
18:21 sri marcus: second example http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Adding_helpers
18:21 marcus anewkirk: you could probably trivially implement what you want with http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Content_blocks
18:22 marcus I meant to paste sri's url, not mine :)
18:22 anewkirk yeah, it's not hard to implement, it's a common problem I've seen in lots of companies I've worked with
18:22 anewkirk most use regex or other aweful implementation
18:23 anewkirk implementations*
18:23 marcus anewkirk: I meant, a plugin shipping with a helper would probably be the best way to do it.
18:23 anewkirk most shy away from DOM parser's because they're already using TT or something and don't want to have two template mechanisms
18:24 anewkirk marcus++ I'll add it to the honey-do list
18:31 bpmedley Given: http://paste.debian.net/218617/        I'm wondering if it's possible for the "post with parameters" route to match 1st, even if "post without parameters" is listed before it.   Does this make any sense?
18:34 sri first route that matches wins
18:40 bpmedley Are they matched in the order they are defined?
18:40 marcus yeah
18:40 bpmedley Cool, thanks.
18:49 marty_ joined #mojo
18:52 marty joined #mojo
18:55 good_news_everyone joined #mojo
18:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/rFnUpQ
18:55 good_news_everyone mojo/master 982257e Sebastian Riedel: mention in which order routes match
18:55 good_news_everyone left #mojo
18:56 sri odd that wasn't mentioned before
18:56 vervain I'd have swore that I read that somewhere when I first started with Mojo.
18:58 jberger fwiw, something that makes it just a little easier to say mark a menu link as active or disabled would be really useful
19:00 dabudabu joined #mojo
19:02 xaka joined #mojo
19:06 _xaka_ joined #mojo
19:07 rem_lex|pivo joined #mojo
19:34 sri jberger++ # those installer are not something i would use, but i'm sure it will be useful for others
19:35 jberger I even say it right in the doc, they are for the simple case, else use the main interface
19:36 jberger I'm glad you would think its useful
19:38 jberger like I said, its going to get another name change since the EUMM recipe doesn't need File::ShareDir
19:46 jberger what about the name Mojolicious::Plugin::InstallablePaths
19:46 jberger ?
20:08 marcus hmm, wonder if we can do something clever for pjax in the routing layer.
20:09 marcus guess I could use conditions.
20:10 sri what would router support for it do?
20:11 * sri thought a conditional layout helper would be enough for pjax
20:12 sri % layout_unless_pjax 'default';
20:18 rem_lex joined #mojo
20:24 connor_goodwolf joined #mojo
20:28 rem_lex joined #mojo
20:49 jberger http://blogs.perl.org/users/joel_berger/2012/12/re​-announcing-mojoliciousplugininstallablepaths.html
20:50 jberger Mojolicious::Plugin::InstallablePaths released to cpan
21:11 perlite_ joined #mojo
22:16 good_news_everyone joined #mojo
22:16 good_news_everyone [mojo] kraih tagged v3.70 at be78429: http://git.io/74I_Kg
22:16 good_news_everyone left #mojo
22:46 chorny joined #mojo
23:05 jberger sri: during after_dispatch, if I modify the $c->tx->dom will it be reflected back in the response or do I have to do something to do that
23:13 batman marcus: i think respond_to(pjax => ..., ...) is a better idea
23:30 Liam`` joined #mojo
23:51 edenc joined #mojo
23:54 Liam`` joined #mojo
23:59 Liam`` joined #mojo

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