Camelia, the Perl 6 bug

IRC log for #mojo, 2011-08-27

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

All times shown according to UTC.

Time Nick Message
00:09 irs Sjors: they mostly use a config plugin
00:09 irs hmm
00:09 * irs wonders if it would make sense to add <%%= 1 + 1 %> to Mojo::Template
00:10 irs it would result in <%= 1 + 1 %>
00:10 irs i've stumbled over it a few times now
00:22 tempire to prevent errors from typos?
00:25 irs tempire: to generate templates
00:25 tempire so like template macros, then
00:26 irs it's not so complicated
00:27 irs a <%% start would just tell the parser to replace the tag start with <% and consider the rest of the expression normal text
00:27 tempire oh. escaping.
00:27 purl hmmm... escaping is not idempotent.
00:28 irs kinda, ye
00:29 tempire seems like the only use case would be for ep docs/howtos
00:29 irs the use case is generating templates
00:29 irs we would even use it in code for mojo generate app
00:29 irs *core
00:31 tempire it is more of a macro, then.  template code to generate template code.  seems like an idea that could spawn a lot of other good ideas.
00:32 irs at the moment you would have to configure new tags, which is not so nice
00:32 arne joined #mojo
00:34 irs hmm, maybe it's not useful enough
00:37 irs i actually have it implemented already, but it would be 15 more lines in the parser :/
00:43 irs i really don't like that the parse method is so huge
00:44 irs https://github.com/kraih/mojo/blob​/master/lib/Mojo/Template.pm#L197
00:44 irs lots of multi line regexes and comments though
00:45 irs not sure it could be split without making it massively slower
00:50 Cside joined #mojo
01:12 GitHub0 joined #mojo
01:12 GitHub0 [mojo] kraih pushed 1 new commit to master: http://git.io/Ua9FlA
01:12 GitHub0 [mojo/master] added experimental support for escaped tags to Mojo::Template - Sebastian Riedel
01:12 GitHub0 left #mojo
01:13 irs i think it rounds up Mojo::Template
01:20 GitHub101 joined #mojo
01:20 GitHub101 [mojo] kraih pushed 1 new commit to master: http://git.io/dkpLug
01:20 GitHub101 [mojo/master] improved test - Sebastian Riedel
01:20 GitHub101 left #mojo
01:36 Cside joined #mojo
02:28 arpadszasz joined #mojo
02:33 memowe joined #mojo
02:39 perlrocks Twitter: "Mojolicious: made by Lite. Keep moving in the port Starman high pl, how do I connect a reverse proxy from apache that out to 80." (ja) --CLCLCL http://twitter.com/CLCLCL/​status/107280972407504897
03:01 perlrocks Twitter: "Reverse proxy for localhost in Apache: localhost in it to take a Starman 5000: Mojolicious launched in 5000 it was confirmed that the application works Lite." (ja) --CLCLCL http://twitter.com/CLCLCL/​status/107286583107002369
03:13 irs damn, i would really like to refactor Mojo::Template::parse
03:41 ispy_ joined #mojo
04:16 ispy_ joined #mojo
04:19 kaare joined #mojo
04:47 Skylos left #mojo
04:51 xaka joined #mojo
04:53 kaare joined #mojo
05:19 GitHub70 joined #mojo
05:19 GitHub70 [mojo] kraih pushed 1 new commit to master: http://git.io/ueYxTA
05:19 GitHub70 [mojo/master] fixed small bug in template parser - Sebastian Riedel
05:19 GitHub70 left #mojo
05:55 Firkin joined #mojo
06:15 zakame hmm is it possible to fork a new app daemon in a test script using Test::Mojo->test_server?  I'm trying that to run tests with Selenium::Remote::Driver, and while test_server creates a daemon listening, it doesn't respond to requests
06:16 zakame I see test_server creating a Mojo::Server::Daemon and going to prepare_ioloop, but not run...
06:17 irs we use non-blocking io
06:17 irs you have to build your own fork daemon thingy
06:19 tempire zakame: Test::Fork will help you
06:20 tempire works well, easy-to-use syntax
06:20 tempire as far as thingies go
06:20 sugar joined #mojo
06:21 zakame irs: right, forgot that :)
06:21 zakame tempire: will look into that :)
06:21 zakame thanks D
06:23 * tempire really wants parrot to be released into the world with docs and an accessible environment
06:24 irs oh noes
06:24 irs template trimming is borked
06:25 irs looks like nobody is using it to make pretty html -.-
06:29 tempire just in the latest release?
06:29 irs nope, for quite some time
06:29 irs it's actually wrong by design
06:30 irs trimming *a lot* more than it should
06:30 irs it goes across lines
06:30 irs no idea what i was thinking back then
06:31 irs basically all tests expect broken behavior
06:32 tempire that's concerning
06:32 irs makes no sense at all
06:32 tempire hope no one is depending on that broken behavior
06:32 irs for what?
06:32 purl for fun.
06:32 irs it makes no sense at all
06:33 irs the only reason to ever trim is to make the output pretty
06:33 irs which is impossible atm
06:33 tempire I've never used it, I guess.
06:33 tempire it's a helper?
06:34 irs nope, template system
06:34 irs <%= $foo =%>
06:34 irs second =
06:34 tempire huh
06:34 irs right now it will make absolutely all whitespace around it vanish without boundaries
06:34 tempire I didn't know about that
06:35 irs while it should not cross lines
06:37 irs strange nobody reported this
06:41 irs not hard to fix though, gonna review the whole code while i'm at it anyway
06:44 zakame oh, I used that for <%= content =>
06:44 alpha6 joined #mojo
07:02 Eugene joined #mojo
07:59 irs neat, managed to remove 100 lines from the parser :)
08:00 irs and squished another 2 or 3 small bugs
08:00 perlrocks Twitter: "serversman, I stopped again. But Apache is running as. Did I even stopped working awhile ago I Mojolicious. SAKURA already applied for a new contract can not ssh." (ja) --purasiibo http://twitter.com/purasiib​o/status/107361914069331968
08:15 GitHub36 joined #mojo
08:15 GitHub36 [mojo] kraih pushed 1 new commit to master: http://git.io/SP6YQA
08:15 GitHub36 [mojo/master] fixed trimming bug in Mojo::Template - Sebastian Riedel
08:15 GitHub36 left #mojo
08:15 irs ok, now it should be fine
08:16 irs please test!
08:20 GitHub176 joined #mojo
08:20 GitHub176 [mojo] kraih pushed 1 new commit to master: http://git.io/UCltXA
08:20 GitHub176 [mojo/master] release preparation - Sebastian Riedel
08:20 GitHub176 left #mojo
08:21 irs gonna release later if there are no problems
08:37 eugen joined #mojo
08:39 irs http://www.reddit.com/r/perl/comments/juy2a/m​ojolicious_hack_of_the_day_html5_eventsource/
08:39 irs :S
08:43 Sjors irs: I just saw a weird bug, probably caused by me, but still a strange phenomenon
08:43 Sjors irs: I hadd a Mojolicious::Controller which called $self->render('home')
08:43 Sjors it was called Search; so I had templates/search/home.html.ep
08:43 Sjors when the page loaded, I got a page filled with "Mojolicious::Controller(0xsomehexstring)", lots of times, always the same hex string
08:43 Sjors when I changed $self->render('home') to $self->render('search/home'), it worked fine
08:44 Sjors I can show you a screenshot of the page...
08:44 irs if it's a bug please try turning it into a simple unit test
08:45 Sjors I'll try that
08:46 Sjors (test driven development at work here! nice)
08:47 Sjors irs: also, I found `morbo` also reloads the daemon when I start editing a file in vim
08:47 Sjors irs: probably because vim creates a .file.swp
08:47 Sjors maybe you should add not reloading the daemon if the only change was a .swp file
08:57 GitHub147 joined #mojo
08:57 GitHub147 [mojo] kraih pushed 1 new commit to master: http://git.io/IYY0Jw
08:57 GitHub147 [mojo/master] improved Morbo to ignore dotfiles - Sebastian Riedel
08:57 GitHub147 left #mojo
08:57 irs Sjors: there ya go
09:02 zakame irs: that latest post is neat!  gonna try fitting that in on mojoten :)
09:10 black joined #mojo
09:12 perlrocks Twitter: "Mojolicious 1.93 by SRI - http://t.co/Ei6t1IL" (ms) --cpan_new http://twitter.com/cpan_new​/status/107380055440760832
09:45 sromanov joined #mojo
09:51 arpadszasz joined #mojo
09:54 bedivere joined #mojo
10:01 noganex joined #mojo
10:08 rhaen moin
10:18 arpadszasz joined #mojo
10:20 * irs waves
10:21 rhaen hej irs.
10:21 rhaen you are releasing more version than I could build rpms for at work.
10:21 irs that's the plan
10:21 rhaen I guess there are some projects which should _never_ ever be packaged.
10:22 rhaen in "official" distributions.
10:22 rhaen I only rely on CPAN, github for mojolicious.
10:22 irs really happy with how small i got the template parser :)
10:22 rhaen :)
10:22 rhaen what about a mojoconf2012?
10:23 irs maybe a little early for a conference ;)
10:23 rhaen I might be able to provide space for it.
10:23 rhaen nah, I don't think so. :)
10:24 irs maybe start with a meetup at a yapc or gpw
10:24 rhaen oh. good idea!
10:24 rhaen hm, a little girl next to me wants my attention.
10:24 rhaen brb...
10:24 rhaen girls.
10:25 irs purl: pony?
10:25 purl well, pony is big brother is watching you.
10:25 irs hmm, wonder where that factoid went
10:27 irs purl: no, pony is <action> PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY
10:27 purl okay, irs.
10:27 irs purl: pony?
10:27 * purl PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY PONY
10:31 GitHub148 joined #mojo
10:31 GitHub148 [mojo] kraih pushed 1 new commit to master: http://git.io/ShjD_A
10:31 GitHub148 [mojo/master] cleanup - Sebastian Riedel
10:31 GitHub148 left #mojo
10:32 irs https://metacpan.org/release/YKO/Mojo-Base-XS-0.02 # looks like yko is serious about performance
10:33 irs lol!
10:33 yko No, just like experimenting
10:33 irs use Mojo::Base::XS infect => 1;
10:33 yko irc: you can offer better interface, but I need an option to run in standalone mode and option to replace Mojo::Base
10:33 irs use Mojo::Base::XS -infect; would be more in line though
10:33 yko damn
10:33 yko I forgot to update pod on it :((
10:34 yko actually it works as use Mojo::Base::XS -infect, not as specified in pod
10:34 yko aargh
10:34 irs i think your approach is perfectly reasonable actually
10:35 yko you may run existing applications without any modifications via perl -MMojo::Base::XS=-infect script/yourapp
10:35 irs sweet
10:36 rhaen oh, irs?
10:36 purl i heard irs was Infernal Revenue Service or bastards or at see http://xrl.us/uoov for example
10:36 rhaen I can return from my callback using $c->rendered; - this works nicely.
10:44 irs NOOOOO!
10:44 irs i broke two generators in the last release
10:44 zakame awwww
10:46 rhaen generators for what?
10:48 arpadszasz joined #mojo
10:48 GitHub24 joined #mojo
10:48 GitHub24 [mojo] kraih pushed 1 new commit to master: http://git.io/ERA23A
10:48 GitHub24 [mojo/master] fixed lite_app and plugin generators - Sebastian Riedel
10:48 GitHub24 left #mojo
10:53 perlrocks Twitter: "Mojolicious 1.94 by SRI - http://t.co/Sz2zgrt" (ms) --cpan_new http://twitter.com/cpan_new​/status/107405378068824064
10:55 perlrocks Twitter: "released Mojo::Base::XS, that can make your #Mojolicious-based application 10-15% faster" --ykorshak http://twitter.com/ykorshak​/status/107405812225425408
10:56 zakame yko++
10:57 rhaen oh :)
10:57 yko oh. I thought perlrocks not with us anymore. great
10:57 yko soon on cpan, already on metacpan :D
10:58 yko silly yko forgot to set-up repository and bug tracking in Makefile.PL -_-
10:59 yko actually, I mostly released it because one of Kiev.pm members asked me. he loves mojo accesors design and wanted to have something very fast with same interface
11:00 yko because I actually would like it to be hidden in my basement until BlackPerl workshop
11:00 yko who mirrored sri?
11:01 irs i'm the evil twin!
11:01 yko lol
11:04 yko damn, in russian we usually say "i'm his malicious twin brother". English can be laconic
11:43 abra joined #mojo
12:03 black joined #mojo
12:07 perlrocks Twitter: "Mojolicious-Plugin-DOCRenderer 1.02 by EXC - http://t.co/ibJwz7W" --cpan_new http://twitter.com/cpan_new​/status/107423918293389312
13:10 Eugene joined #mojo
13:11 perlrocks Twitter: "@ Takayuki_shmz @ __gfx__ Mojolicias is Amon2 easy to can move the environment from a lack of dependency on the module almost four Mojo + sqlite and I was a little cool but the size of the body from which to maximize the Perl modules in reverse Challenges of the month did" (ja) --mandy_44 http://twitter.com/mandy_44​/status/107440031165202432
13:12 * yko measures sri's rpm (releases per minute)
13:12 GitHub192 joined #mojo
13:12 GitHub192 [mojo] kraih pushed 1 new commit to master: http://git.io/NMkOsA
13:12 GitHub192 [mojo/master] cleanup - Sebastian Riedel
13:12 GitHub192 left #mojo
13:13 * irs measures yko's rpm -.-
13:19 yko well, they are just the same, but in my case m stands for "month"
13:50 GabrielVieira2 joined #mojo
13:51 abra joined #mojo
14:20 sugar joined #mojo
14:29 Foxcool joined #mojo
14:36 sugar joined #mojo
14:37 mattastrophe joined #mojo
14:51 abra joined #mojo
15:15 marcus yko: did you try benching hello world with mojo::base::xs vs without? :)
15:15 yko marcus, i "benched" default generated app
15:15 yko and default 404 page
15:16 yko feel free to run own benchmark :)
15:20 yko marcus: default 404 page give me about 15-20% up, but those wasn't real benchmark, just ab from the same machine
15:21 yko I intend to run real benchmark, but later. maybe after one or two weeks, if noone will do that for me :D
15:34 stephen joined #mojo
15:41 stephen1 joined #mojo
15:45 irs marcus: http://search.cpan.org/~jamadam/Moj​olicious-Plugin-PlackMiddleware-0.2​1/README.pod#mojo_req_to_psgi_env
15:45 irs should be trivial to add a little psgi loader
15:46 marcus irs: nice, maybe I'll give it a shot tonight.
15:46 irs no, i will sure as hell not do it ;)
15:46 marcus did not think you would ;)
15:47 marcus I have a lot of catalyst apps running tho, would be nice to run them on hypnotoad
15:47 irs it will almost certainly result in terrible hello world benchmarks ;p
15:47 marcus starman vs hypnotoad - FIGHT!
15:49 diegok marcus: will you test it live on iusethis? :)
15:49 marcus diegok: I think I'd pick a smaller site first, like iwatchthis.com ;)
15:49 irs hmm, if you implement it by subclassing Mojo you could even use the mount plugin
15:50 irs or actually subclassing Mojolicious
15:51 diegok marcus: interesting results on this would need a lot of testing I guess...
15:52 alpha6 joined #mojo
15:53 diegok ^ and lots of requests
16:34 arpadszasz joined #mojo
16:53 noganex_ joined #mojo
17:09 perlrocks Twitter: "Pimping #mojolicious left and right, like a boss. http://t.co/YaBsdPW" --kappataumu http://twitter.com/kappataum​u/status/107499918377230336
17:20 ispy_ joined #mojo
17:20 Eugene joined #mojo
17:39 alpha6 joined #mojo
17:40 judofyr joined #mojo
18:12 alpha6 joined #mojo
18:56 Firkin left #mojo
19:38 xaka joined #mojo
19:54 cstamas joined #mojo
19:55 tempire .file.swp!
19:55 tempire old school
19:55 purl removing vi, vim, nvi, emacs, pico, nano, jed, ee, and using ed
19:55 tempire Sjors: :set nobackup, :set noswapfile
19:55 tempire git is the new swap
19:56 tempire and you never have to worry about all those ridiculous 'file already open' warnings
19:59 rhaen tempire: omg!
19:59 cstamas hi, need some help
20:00 cstamas if I call render, the execution stops so I do not have exit or anything else
20:00 cstamas but it seems that with render(json => .... ) the execution does not stop
20:01 cstamas is this expected?
20:01 tempire execution does not stop with render
20:01 cstamas hmm
20:01 cstamas ok
20:02 tempire if you want it to stop, you can "return $self->render"
20:02 cstamas okay, thx
20:07 cstamas tempire: otoh, if I call render("1st") and later render("2nd") what happens?
20:07 tempire not sure
20:07 tempire try it
20:07 cstamas :)
20:07 cstamas first I fix my code :)
20:10 cstamas but one can say that I should not do that, right?
20:11 tempire I don't see any reason you would
20:17 alpha6 joined #mojo
20:20 cstamas I have a mojo app which calls another mojo app with mojo::useragent (and exchanges data with json), I would like to log the originator IP address, what is the recommended way to do that?
20:21 cstamas i read http://mojolicio.us/perldoc/Mojoliciou​s/Guides/Cheatsheet#MOJO_REVERSE_PROXY but i do not entirely understand it
20:21 cstamas (and not sure if that is for me)
20:27 tempire mojo_reverse_proxy is not what you're looking for
20:28 tempire there's nothing special necessary to do that
20:28 tempire you can use the built in logging if you want
20:28 cstamas ok, but I want to get the client IP on the 2nd node
20:29 cstamas not the 1st node which proxy the request
20:29 tempire you're getting json from the 2nd node
20:29 tempire so get it via json
20:30 cstamas ok
20:30 cstamas (no, I need the other way around)
20:31 cstamas but this looks fine http://mojolicio.us/perldo​c/Mojo/UserAgent#on_start
20:31 cstamas thx
20:31 cstamas the case is:
20:31 cstamas user -> node1 -> node2
20:42 cstamas and now I can tell apache to log x-forwarded-for instead of remote_address
20:53 bedivere left #mojo
20:57 Sjors irs: I found more information about the bug I told you about earlier
20:58 Sjors irs: just dropping in some information half-way, maybe it rings a bell and you can give me a hint how to continue
20:58 Sjors irs: apparantly, the page I get filled with Mojolicious::Controller=HASH(0x...) is exception.development.html.ep
20:58 Sjors but, every time Mojolicious outputs _anything_, the output is Mojolicious::Controller=HASH(0xfoobar) where foobar is the same for the complete page
20:59 Sjors something is causing Mojolicious to output the stringified version of the Controller object instead of what should really be outputted
20:59 Sjors i.e. <%= $e->message %> also comes out as that hash again
21:22 ghenry joined #mojo
21:22 ghenry Do I have a big learning curve coming from Catalyst world?
21:23 ghenry Looking for a framework to create a RESTful API
21:26 tempire ghenry: mojolicious does most things for you
21:26 tempire without extra plugins, attributes, etc
21:27 tempire the core author of mojolicious is the original author of catalyst, so the lessons learned with catalyst were brought here
22:55 GabrielVieira joined #mojo
23:31 Cside joined #mojo
23:32 cstamas I would like to run a mojo app running as a special uid and running foreground, logging to stdout with apache handling/proxying the incoming connections
23:33 Kulag joined #mojo
23:33 cstamas what would you suggest for this?
23:33 diegok cstamas: hypnotoad
23:33 purl hmmm... hypnotoad is at http://www.r33b.net/ or ALL GLORY TO THE HYPNOTOAD!
23:33 cstamas there are several way, but which one is the most convenient/supported?
23:34 cstamas and I setup apache to proxy the connections to a special port?
23:34 diegok ^ is kind of standard deployment opcion for mojo
23:34 diegok for example.
23:35 cstamas ok, thx
23:44 gshank joined #mojo

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