Camelia, the Perl 6 bug

IRC log for #mojo, 2012-04-29

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

All times shown according to UTC.

Time Nick Message
00:46 GitHub176 joined #mojo
00:46 GitHub176 [mojo] kraih pushed 1 new commit to master: http://git.io/pF3qjA
00:46 GitHub176 [mojo/master] added another Mojo::DOM namespace example - Sebastian Riedel
00:46 GitHub176 left #mojo
00:47 marty joined #mojo
01:58 arpadszasz joined #mojo
01:59 GitHub39 joined #mojo
01:59 GitHub39 [mojo] kraih pushed 1 new commit to master: http://git.io/U50j1Q
01:59 GitHub39 [mojo/master] added a few more Mojo::DOM examples - Sebastian Riedel
01:59 GitHub39 left #mojo
02:31 inokenty joined #mojo
03:54 inokenty joined #mojo
04:13 garu what's the difference between Mojo::DOM's content_xml(), xml() and to_xml()? When should I use which?
04:14 garu ok, I think I get xml(), it assumes content is html5 but disables semantics so it's case sensitive and whatnot
04:15 garu but xml() is said to "render DOM to XML", and content_xml() "render content of this element to XML"
04:16 garu so xml() == entire dom, content_xml() == specific element ?
04:55 rem_lex|pivo joined #mojo
05:00 garu err, to_xml() == entire dom, content_xml() == specific element?
05:07 garu also, I thought Mojo::Base would let me new( attr_name => value ) on all subclasses, but Mojo::UserAgent->new( inactivity_timeout => 60 ) doesn't seem to work as (I) expected
05:07 garu (whereas $ua->inactivity_timeout(60) did)
05:54 dbr joined #mojo
06:36 rem_lex joined #mojo
06:41 rem_lex|pivo joined #mojo
06:43 rem_lex| joined #mojo
07:27 Vandal joined #mojo
07:37 Vandal joined #mojo
07:38 sri joined #mojo
07:55 Htbaa joined #mojo
08:14 rafl joined #mojo
08:26 fibo joined #mojo
08:34 fibo joined #mojo
08:48 batman joined #mojo
08:56 Leandr joined #mojo
09:17 fhelmber_ joined #mojo
09:52 mire joined #mojo
10:29 black joined #mojo
10:30 inokenty joined #mojo
10:50 arpadszasz joined #mojo
11:48 batman joined #mojo
11:49 fibo joined #mojo
11:52 nic Debolaz: If you're on a truly embedded platform, something like in a military tank or in a car console then you won't be considering a dynamic language like perl
11:53 nic cos you have to operate within strict finite memory capacity, without luxuries like swap space
11:54 nic so I'm guessing you just mean a mini-platform, like my (ARM) NAS which I'm coding to control my central heating system
11:55 nic Around 18 months ago I was ignoring Mojolicious cos I assumed it was too similar to Catalyst to do the kinds of projects I work on
11:55 nic So I stuck with something far more bare bones and predictable (CGI::Application)
11:56 nic However 2011 and the progress the Mojolicious team made, meant that ignoring Mojolicious was a stupid thing to do
11:56 nic Now that I've given it some rudimentary testing, I find that actually it's far closer to CGI::Application in its resource consumption than I expected
11:57 nic Turns out the Mojolicious code is quite smart yet doesn't get carried away with filling your ram
11:57 nic I'm one of the dastardly loons who strips POD out of the PMs (using my pm2lean script)
11:58 nic cos my projects generally have tight FS footprint requirements
11:59 nic And lo, I find that the Mojolicious core platform fits in less than 1 MB of FS and gives me almost everything I'd want it to
11:59 nic As far as memory requirements go, that's far outweighed by how you code _your_ code
12:00 nic If you choose to shove Encyclopedia Britannica into the ->stash then of course you'll consume lots of ram
12:01 nic So far I have not found Mojolicious sneakily consuming more ram than I'd expect
12:01 nic so I'd be confident it will perform well in your tests
12:01 GitHub172 joined #mojo
12:01 GitHub172 [mojo] kraih pushed 1 new commit to master: http://git.io/eWXIsQ
12:01 GitHub172 [mojo/master] better to_xml example - Sebastian Riedel
12:01 GitHub172 left #mojo
12:02 nic The Mojolicious team are uncommonly strict about the quality of (code in) the core platform
12:04 * nic stops selling and checks his commission meter
12:13 batman https://github.com/jhthorsen/mojolicious-plugin-se​cret/blob/master/lib/Mojolicious/Plugin/Secret.pm <-- i'm writing a plugin which creates a secret for me
12:13 batman what do you think?
12:13 purl I think batman should try flossing more often!
13:50 batman joined #mojo
14:17 GitHub65 joined #mojo
14:17 GitHub65 [mojo] kraih pushed 1 new commit to master: http://git.io/IX6X1Q
14:17 GitHub65 [mojo/master] Mojo::DOM documentation tweaks - Sebastian Riedel
14:17 GitHub65 left #mojo
14:42 irq joined #mojo
14:50 amirite joined #mojo
14:55 d4rkie joined #mojo
15:32 mire joined #mojo
15:48 Psyche^ joined #mojo
15:49 Foxcool joined #mojo
16:04 alnewkirk how could something so simple fail - https://gist.github.com/2551555
16:11 alnewkirk cargo-culting, thats how
16:38 Debolaz nic: I would like to point out that I said "ARM", not "embedded". :)
16:58 mire joined #mojo
17:01 preflex_ joined #mojo
17:28 mire joined #mojo
17:58 arpadszasz joined #mojo
18:00 ask what's the appropriate way to add stuff to Mojolicious::Command::?  Add Mojolicious/Command/foo.pm to my distribution?  That doesn't seem right.  Add it to MyApp.pm as an extra package statement?
18:01 kanishka joined #mojo
18:02 tempire ask: yes, add Mojoliciuos::Command::foo to your distribution
18:03 kanishka could I run a mojo code (reverse proxy) on multiple server's as load-balancer over nginx ?
18:07 ask tempire: Really?    So someone can install Mojolicious::Command::account from CPAN and get my stuff -- or more confusingly your distribution with the same command will get rejected.
18:08 ask kanishka: You want your Mojo server to be a proxy in front of nginx or the other way around?  Either way should be possible.
18:08 ask s/should be/is/
18:10 kanishka ask :
18:10 kanishka server A - nginx with reverser proxy with mojo
18:10 kanishka server B - nginx with reverser proxy with mojo
18:10 kanishka Nginx is configured with loadbalancer with both servers A & B
18:10 kanishka does is this settings work on mojo
18:14 GitHub124 joined #mojo
18:14 GitHub124 [mojo] kraih pushed 1 new commit to master: http://git.io/UIz_hA
18:14 GitHub124 [mojo/master] added tests for disabled cookie jar - Sebastian Riedel
18:14 GitHub124 left #mojo
18:15 tempire ask: yes.  it would be just like any other duplicate namespace.
18:16 sri ask/tempire: i think it also depends on how generic the command actually is
18:16 sri if it's app specific i would just add another namespace
18:19 sri but if it's generic http://mojolicio.us/perldoc/Mojolicious/Gui​des/Cookbook#Adding_commands_to_Mojolicious
18:23 garu sri: did you get my question about Mojo::Base's new()? can't use it to initialize attributes in a subclass (namely, Mojo::UserAgent). Is this a design decision, a missing feature or a plain bug?
18:23 sri garu: i do not understand the question
18:24 garu my $ua = Mojo::UserAgent->new( inactivity_timeout => 60 ); doesn't work, I have to always do an empty new() and then $ua->inactivity_timeout(60);
18:25 sri perl -Mojo -E'say Mojo::UserAgent->new(inactivity_timeout => 60)->inactivity_timeout'
18:25 sri i have not the slightest idea what you're talking about
18:25 garu oO
18:26 garu I'm sorry, I tested this late last night and I was sure it wasn't working
18:26 * garu doublechecks
18:26 sri there are a few classes that have special new() semantics, but those are documented
18:26 sri Mojo::DOM, Mojo::Path and the like
18:30 garu sri++ # that's what I get for debugging code at 4am
18:31 * sri would advice against that
18:31 garu hmmm
18:31 inokenty joined #mojo
18:39 garu I see what happened, the server I'm querying is too slow, and too inconsistent. Since I wasn't timing, it must have really timed out when I was passing the arguments via new()
18:39 sri check the error message
18:40 garu I did, 'inactivity timeout.', which is why I thought 'something must be wrong, I *am* setting a higher value'. Of course, I underestimated how time passes when you're drowsy :)
18:41 garu and since it worked when I changed it to $ua->inactivity_timeout(60), it was of course a bug in new(), not in me being awake for way too long
18:41 d4rkie joined #mojo
18:43 garu sri: which reminds me, what's the difference between to_xml and content_xml? One is full DOM and the other is a specific element?
18:43 sri see recent documentation updates :)
18:43 garu heh :)
18:58 xaka joined #mojo
19:03 d4rkie joined #mojo
19:21 garu sri: all xml is supposed to be xml_escape()'d ? I mean, I'm fetching <name>Foo 'Bar</name> and getting name as "Foo &#39;Bar"
19:22 garu is there a way to disable that and get the raw text?
19:41 xdbr joined #mojo
21:18 ask sri: it's very app specific.  How do I add it to another namespace and make the command system pick it up?
21:18 ask kanishka: yes, that'd be a very common setup.
21:19 ask oh, he left.
21:28 sri actually, there is no pretty solution yet, you have to instantiate Mojolicious::Commands yourself
21:29 sri push @{$app->commands->namespaces}, 'MyApp::Commands'; would have been nice, maybe in the future
21:31 * sri hates writing command tests though... so distant future prolly ;p
21:33 irq joined #mojo
22:02 SmokeMachine joined #mojo
22:05 sri or maybe you're lucky, just had an idea for a test case
22:12 nic sri: I want to be able to peruse the Mojolicious guides and docs while on remote mountains, eg on my kindle
22:13 nic So I'm compiling an ebook (.epub + .mobi) of 108 docs, essentially all the pods that come with core Mojolicious
22:14 nic It's conceivable that I'm not the only one wanting that
22:15 nic Do you have any feelings about such a thing being distributed (once the Mojolicious team have had a chance to look at it of course) ?
22:18 sri i know there have been requests for an ebook version
22:21 garu nic, sri => http://perlybook.org
22:21 sri Oo
22:21 garu yup :)
22:22 garu it's in my TODO list to integrate that with metacpan
22:22 garu sadly, ETOOMUCHSTUFFONMYPLATERIGHTNOW
22:22 nic garu: Will that compile the 108 PODs into a single book with inter-chapter links working?
22:23 nic (if so, I can stop learning kindlegen)
22:23 sri it's even built with mojolicious... are you kidding me ;p
22:23 garu sri: yup :)
22:24 garu nic: I don't know. I'm also not the author, nor am I invalidating your endeavour. I just figured it's something worth looking at before spending your time on it, if only to get some ideas
22:25 nic indeed
22:26 nic It probably would have saved me some time to see their toolchain
22:26 nic Instead I went pod2markdown -> pandoc -> kindlegen
22:26 nic which seemed sane...
22:27 nic till I found pod2markdown is mega buggy, pandoc isn't quite ready for what I need, and kindlegen is a little temperamental
22:28 nic Anyroads, nice as that site is it doesn't do the 'integrated book' thing
22:28 garu nic: try downloading Mojolicious-2.91.mobi over there at perlybook.org. It might do the inter-chapter things
22:28 garu I haven't downloaded any 'books' from there yet
22:29 garu (just did the Mojolicious one, but my Kindle is in another castle)
22:29 nic ERROR: Module name not accepted.
22:29 garu really? I just typed 'Mojolicious' and it went ok
22:29 nic yeah, that's for Mojolicious.pm
22:29 garu ah
22:29 nic that's missing around 107 PODs :)
22:30 sri epub version looks complete
22:30 garu nic: then it might be cool to patch that and make it download the full dist's pod, with working links
22:34 nic sri: When you click on a chapter link in the epub, does it take you there?
22:35 sri yes
22:37 nic Within Mojo::Asset, when I click on "Mojo::EventEmitter" it just hangs
22:37 nic Anyroads, that looks like it's almost working and is very close to what my makefile is churning out
22:43 * nic goes back and grabs DBIx::Class.mobi
22:45 SmokeMachine joined #mojo
22:58 GitHub37 joined #mojo
22:58 GitHub37 [mojo] kraih pushed 1 new commit to master: http://git.io/sLxyug
22:58 GitHub37 [mojo/master] added commands attribute to Mojolicious - Sebastian Riedel
22:58 GitHub37 left #mojo
22:58 sri ask: that should make it trivial
22:59 sri but as usual, if i don't get feedback it will be gone again
22:59 tempire my epub reader doesn't jump to the links
23:01 tempire would be cool if it had a table of contents, like search.cpan.org
23:01 tempire would be even cooler if search.cpan.org wasn't down
23:01 sri tempire: would be nice if you could take a look at the commands thingy while you're around :)
23:01 * sri closes the channel door before tempire can sneak out again
23:01 tempire already on it
23:02 sri commands are a little tricky, there's a lot to go wrong
23:02 tempire oh, it just allows you to add a namespace?
23:03 sri well, you also get access to all the utility functions from Mojo::Command
23:03 sri but primarily, yes, it just allows you to add namespaces
23:03 tempire yes, that is useful indeed
23:03 tempire upvote
23:03 sri even plugins can add command namespaces
23:05 * tempire thinks mojolicious commands are a very powerful tool that no one has discovered yet
23:06 sri maybe easy application specific commands help
23:16 sri doubt those utility functions will be very useful though... they are rather command specific
23:28 mire joined #mojo
23:33 GitHub185 joined #mojo
23:33 GitHub185 [mojo] kraih pushed 1 new commit to master: http://git.io/c6R6pw
23:33 GitHub185 [mojo/master] better descriptions for path generation methods - Sebastian Riedel
23:33 GitHub185 left #mojo
23:50 sven^ joined #mojo

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