The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-02-03

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

All times shown according to UTC.

Time Nick Message
00:18 jack joined #mojo
00:30 sugama joined #mojo
00:32 elvis joined #mojo
00:32 batman joined #mojo
01:09 d4rkie joined #mojo
01:26 d4rkie_ joined #mojo
01:26 btyler joined #mojo
01:57 ka2u joined #mojo
02:24 klapperl joined #mojo
02:43 KindOne joined #mojo
03:59 crab joined #mojo
04:06 omega !search backtv
04:06 omega err, wrong channel, sorry :)
04:14 sugama joined #mojo
04:31 laouji joined #mojo
04:32 dvinciguerra joined #mojo
04:34 sugama joined #mojo
04:48 laouji_ joined #mojo
04:49 ka2u joined #mojo
04:50 sri kinda cute template system, i like that it doesn't really use closures/blocks https://github.com/Knio/dominate
04:55 jberger I like its use of context managers
04:57 ka2u joined #mojo
04:59 jberger sri: shared it with my friend who is just learning web stuff using python
04:59 jberger (I did take the opportunity to show off mojo, especially the command line conveniences)
05:05 thowe In the tutorial, what am I supposed to see when I call "/echo" here?  http://mojolicio.us/perldoc/Mojolicious/Lite#HTTP
05:05 thowe I don't know what rendering "data" does.  I just get nothing
05:06 thowe The Controller docs don't tell me what data does either.
05:07 buu thowe: Are you calling it with a body?
05:07 buu And why is that a GET
05:07 btyler joined #mojo
05:07 damaya joined #mojo
05:08 thowe I guess I'm not sure what that means "calling with a body".
05:08 buu thowe: That handler echoes out the body of the request you send it
05:08 buu So you need to send it a GET /echo with a body
05:09 buu As in basic HTTP terminology
05:09 jberger buu, I agree, sri that example should probably be post
05:10 thowe Like "http://localhost:3000/echo?something=anything" ?  how do you send a body?
05:10 jberger http://stackoverflow.com/a/983458/468327
05:10 jberger thowe, I don't even know
05:11 jberger change the echo route to be a "post"
05:11 purl jberger: that doesn't look right
05:11 * jberger bites purl
05:11 * purl bites jberger back
05:12 buu jberger: Technically its allowed, its just not seen very often
05:12 jberger and "has no semantic meaning"
05:12 crab hi.
05:12 jberger "So, yes, you can send a body with GET, and no, it is never useful to do so."
05:12 jberger crab, o/
05:13 buu thowe: A body is the section of the HTTP message that comes after the headers.
05:13 thowe I don't know how to send a body
05:13 buu And before the end of the message.
05:14 buu http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4
05:15 jberger thowe, you can use the 'mojo get' command and use the -c option: http://mojolicio.us/perldoc/Mojolicious/Command/get
05:15 jberger in fact that will even work with the get route I would assume
05:17 jberger save the example as a file, say 'test.pl'
05:17 jberger perl test.pl get /echo -c 'My Content'
05:18 thowe How do I see the header I altered per the example?
05:18 jberger set MOJO_USERAGENT_DEBUG=1
05:19 jberger MOJO_USERAGENT_DEBUG=1 perl test.pl get /echo -c 'My Content'
05:19 thowe Nifty.
05:19 jberger the 'get' command is so useful and so often overlooked
05:20 good_news_everyone joined #mojo
05:20 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/rUP6Gw
05:20 good_news_everyone mojo/master f78355d Sebastian Riedel: better form generator example
05:20 good_news_everyone left #mojo
05:20 thowe Cool.  I dare say all my questions were answered and I have emerged more knowledgeable.
05:20 jberger thowe, service with a smile ----> :-)
05:21 ka2u joined #mojo
05:21 thowe This mojo stuff is neat!  Are other web frameworks like this?  There's so much deep figury-outy stuff in there that does stuff for you.
05:22 jberger thowe, not that I know of. sri++
05:22 jberger thowe, spread the word
05:23 thowe I need to figure out how to make it use my DBIC stuff for work...
05:23 jberger thowe, sorry that's on you ;-)
05:23 thowe Is there some authorization/authentication stuff?
05:24 jberger there are some plugins, bridges/under should do most of what you need tho
05:24 jberger http://mojolicio.us/perldoc/Mojolicious/Lite#Under
05:25 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Bridges
05:27 thowe Is that like chained in Catalyst?
05:28 good_news_everyone joined #mojo
05:28 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/YQOWzQ
05:28 good_news_everyone mojo/master 9610d20 Sebastian Riedel: changed route in example from get to post
05:28 good_news_everyone left #mojo
05:29 thowe now that it is post I don't know how to test it anymore.
05:30 jberger -M POST
05:30 jberger happy "Superb Owl" everyone, nn
05:30 sri agreed about the method, not sure if text/data deserve some kind of mention though
05:30 btyler joined #mojo
05:31 sri there are so many little things going on that can't all be explained in detail before the guides later on
05:36 jberger sri: I'm having a hard time writing the book because I was trying to not start with Lite, but it really works best in that order it seems
05:37 jberger also re: dominate, it reminds me of Template::Caribou, except that that uses blocks
05:37 jberger ok, now I'm off to bed
05:37 jberger o;
05:37 jberger (not sure what that one is)
05:37 jberger o/
05:38 thowe If you are writing a book, please test it better than the Catalyst book got tested.  I spent more time working around the mistakes in that book than doing anything else.
05:38 crab what sort of mistakes?
05:39 thowe typos, omissions, it was amazing.  I contributed a number of things to the errata, but then it disappeared when the publisher changed there website around.  Never has an errata been so needed.
05:40 thowe Some chapters could simply not be done without starting with the finished example code.
05:41 thowe Very disappointing because it had some interesting things in it.  At least for me, I don't know much about this kind of stuff yet.
05:43 thowe I started looking into Mojo today because I was just introduced to the concept of content negotiation...
05:51 sri the packt book?
05:51 purl the packt book is probably dreadful
05:51 * sri pats purl
05:51 * purl bites!
05:52 thowe No, Apress.  I don't mean to ruffle any feathers, but I have learned a lot of things from books.  No book has made me spend so much time working around its errors/problems.
05:53 thowe It's been a while and I still remember the frustration clearly...
05:56 sri i've not heard much bad stuff about the apress book
05:56 thowe It stings because I have some affection for MST.
05:57 sri was going to say "and that's why you need good editing for your book kids!"... because i expected it to be the packt one...
05:57 thowe And he even spent some time helping me with it some.
05:57 sri jberger: interesting you say the get command doesn't get enough attention... maybe a mention in the tutorial is in order
05:59 good_news_everyone joined #mojo
05:59 good_news_everyone [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/75e5075be938f5806fe39806dc6930ad8ce8f05a
05:59 good_news_everyone mojo/master 75e5075 Sebastian Riedel: mention get command to tutorial
05:59 good_news_everyone left #mojo
05:59 thowe I just don't think anyone actually tried to work through the book who didn't know Catalyst inside and out.
06:00 sri writing a book for beginners is really hard... since anyone who can do it prolly can't relate to the audience
06:00 sri i'm failing constantly with the tutorial, remixing stuff whenever a problem pops up
06:01 thowe MST said he wouldn't try to do another book, but instead thought a living online document was the way to go.  So, yeah, makes sense.
06:02 thowe Maybe there needs to be more pedantic know-nothings like me trying to work through it ;)
06:02 sri you need real books too though, it's a different writing style that appeals to a different crowd
06:03 thowe It's also kind of important for mind-share (if people still use the term).
06:04 * sri nods
06:04 thowe Anyway, I'm quite sure I'm not adding anything useful to your day.  I'll let you get back to it and I'll move on.  Thanks for your time!
06:05 sri you already have actually... see commits above :)
06:06 thowe Well, if I get lost again I'll mention it.  Some of my confusion just comes from not being really up to date on what the cool kids are doing in web dev land...
06:06 thowe Plus I learn Perl better when I have my Aha moments :)
06:07 thowe eg, I know what "state" means now...
06:09 thowe wow, that shows up right on the web page immediately...
06:09 thowe good show
06:13 good_news_everyone joined #mojo
06:13 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/wbN9fQ
06:13 good_news_everyone mojo/master 21cb31a Sebastian Riedel: added a few render examples
06:13 good_news_everyone left #mojo
06:13 sri actually strange that method didn't have examples before... everything else in the class has
06:13 sri maybe that can answer a few of the first questions beginners have
06:14 sri not comprehensive, just pointers
06:14 bpmedley Don't forget the guides also show how some json rendering examples.. :)
06:15 sri yea, but beginners come from the tutorial, which links to the render method right away
06:15 bpmedley I see
06:15 sri just want them to pass the first few bumbs a bit smoother
06:15 sri *bumps
06:16 sri they should also acclimate to proper unicode handling with the text/data separation :)
06:16 bpmedley The quality of the documentation is very high.  It's like was said a while back that the types of questions is morphing because the documentation is so good.
06:19 Vandal joined #mojo
06:21 thowe The docs are most appreciated.  Also the fact that you are giving them this level of thought is comforting to me as a newbie...
06:21 good_news_everyone joined #mojo
06:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/KGZDbA
06:21 good_news_everyone mojo/master 0526aab Sebastian Riedel: added template rendering examples
06:21 good_news_everyone left #mojo
06:33 sri the new github traffic stats are actually rather interesting
06:34 sri apparently there were 52 people browsing our issues in the last 2 weeks
06:35 sri that html5 data attribute issue won with 182 views and 27 visitors
06:37 sri 96 people clicked on the changes link of my tweet announcement
06:37 sri for v4.68
06:38 sri 7497 views and 1571 visitors overall for the last two weeks
06:38 bpmedley That's cool.  Where can you see those?
06:39 sri Graphs/Traffic
06:39 sri another important takeaway, this is our most popular wiki page https://github.com/kraih/mojo/wiki/Example-applications
06:39 sri it could use some love!
06:40 sri 341 views and 188 visitors
06:40 sri people want examples
06:43 dabudabu joined #mojo
07:02 good_news_everyone joined #mojo
07:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/km6PWQ
07:02 good_news_everyone mojo/master 7198e60 Sebastian Riedel: use verbose option in command example
07:02 good_news_everyone left #mojo
07:07 basiliscos joined #mojo
07:21 dpetrov_ joined #mojo
07:23 rawler joined #mojo
07:28 hrupp joined #mojo
07:29 marty_ joined #mojo
07:32 Tiger joined #mojo
07:55 buu Ok, how the hell does $dom->children->type actually work?
07:55 buu I thought ->children returned a Mojo::Collection?
07:56 buu Oh
07:56 buu autoload
07:56 purl autoload is what causes it
07:56 buu Cute
07:58 rem_lex|pivo joined #mojo
08:04 dod joined #mojo
08:11 dod joined #mojo
08:31 trone joined #mojo
08:32 arthas joined #mojo
08:34 odc joined #mojo
08:36 trone joined #mojo
08:40 dod joined #mojo
08:55 laouji joined #mojo
09:01 bjakubski joined #mojo
09:09 maxhq joined #mojo
09:13 pierrick joined #mojo
09:15 laouji joined #mojo
09:17 pierrick Hello ! i have a little question about Mojolicious templates. In order of reuse my templates outside of Mojolicious i search a way to render templates in a simple perl script ( run as crontab) ? i try with Mojolicious::Renderer with no success.  Any ideas ?
09:18 moritz pierrick: perldoc Mojo::Template
09:19 pierrick i think i already read it and not find what i want, I will retry thanks
09:24 odc pierrick, you need to use Mojo::Template->render(), which returns an html string
09:25 pierrick ok thanks
09:25 odc or render_file()
09:44 rawler joined #mojo
09:45 pierrick it works thank you, i was pretty sure i already try but seems not
09:46 denisboyun joined #mojo
09:47 odc yw
09:56 hummeleBop joined #mojo
10:02 Bender joined #mojo
10:05 malikai joined #mojo
10:06 malikai howdy.. anyone ever do stud as an ssl R/P for WSS w/mojo?
10:07 malikai works a charm with node.js, but not so happy with mojo..
10:08 malikai i suspect i'm probably doing.it.wrong(tm)
10:08 nicomen TOOMANYTLD
10:08 nicomen ETOOMANYTLD
10:08 nicomen ETOOMANYTLA
10:08 nicomen haha
10:09 malikai b0.0b.bs
10:10 nicomen I've never used stud, but what is not working?
10:11 malikai well, i set it up, have it connecting to morbo on localhost:3000, listening on 0:443, point the browser at it, and what i end up with is the browser being redirected to http://index.html which is definitely not what i want
10:13 nicomen is it mojolicious that is causing the redirect?
10:14 rawler joined #mojo
10:14 malikai i'm pretty sure.. although i do have stud sending x-forwarded-for.. so it is doing some header rewriting
10:14 nicomen malikai: I would do a tcpflow -c -i eth0 port 3000 on the server mojolicious is running to see what stud sends, and what mojolicious answers
10:15 nicomen if mojolicious is sending Location: index.html I guess that is wrong-ish
10:15 malikai lemme do that.. it seems really weird and not what mojo would do
10:16 malikai it's bloody centos6 so it's gross to begin with..
10:20 nicomen you could also check what stud is sending out with openssl s_client -connect 127.0.0.1:443 (-servername example.com) and run HTTP commands after connecting
10:26 malikai i did check out s_client, which did all look good
10:26 malikai just about set here
10:31 malikai so, client sends get / with standard headers looking good.. then mojo sends 302, connection close, and Location: http:index.html
10:31 malikai mojo not happy :(
10:31 malikai let's see what happens without x-forwarded-for
10:36 basiliscos joined #mojo
10:39 malikai no joy... with tls or ssl option in stud, with or without x-forwarded-for.. same result
10:40 dvinciguerra joined #mojo
10:42 sugama joined #mojo
10:44 malikai ok so i think this is because of $r->get('/')->to('server#index')->name('index');
10:45 malikai is that still the right way to return /index.html from get /?
10:45 malikai because when i specify /index.html, i get all my static content (websocket still busted)
10:52 malikai websocket not busted.. i'm busted :)
10:52 malikai but question about $r->get remains..
10:58 malikai also, x-forwarded-for always breaks with 302 even if i get /index.html
10:59 malikai morbo or hypnotoad
11:04 Dandre joined #mojo
11:06 zM joined #mojo
11:12 batman joined #mojo
11:12 elvis joined #mojo
11:13 ivan joined #mojo
11:18 ver joined #mojo
11:23 nicomen wait what?
11:23 purl there's more!
11:24 nicomen malikai: first thing, the reidrect from / is wrong right?
11:33 malikai nicomen, yep, throws a 302 at me when i just want /index.html (static)
11:33 malikai i.e. get / gives you /index.html
11:34 nicomen $r->get('/')->to('server#index')->name('index'); <-- This will just tell mojo which controller and method it should execute when matching / (if you want a real redirect, that is to send back a 302 or, probably 301, with a Location: with an URL that is absolute, then you need to do an explicit redirect)
11:34 voegelas joined #mojo
11:34 nicomen apparently since something is sending a 302, there is a redirect_to call somewhere in your server#index controller?
11:35 malikai yes indeed.. return $self->redirect_to('index.html');
11:36 nicomen right
11:36 nicomen which is wrong ;)
11:36 malikai i'm actuallly not wanting to redirect, i just want an apache-like return of index.html
11:37 nicomen try '/index.html'
11:37 nicomen http://mojolicio.us/perldoc/Mojolicious/Controller#redirect_to
11:37 nicomen (index.html would be relative to the current path)
11:38 nicomen in addition you need to match /index.html and do something with that
11:41 malikai isn't there an easy way to say get / = return /index.html?
11:41 Adurah Routes.
11:42 malikai so something like: $r->route('/')->to('/index.html');
11:42 Adurah I don't think routes go to uri.
11:43 Adurah Routes go to controllers.
11:45 nicomen malikai: yes
11:45 nicomen malikai: did you want a redirect, or just both URLs work?
11:46 malikai i'm just looking for / to return the static content in /index.html
11:46 malikai get /
11:49 nicomen aah
11:49 nicomen try this: $r->get('/' => sub { this->redirect_to('/index.html'); });
11:50 nicomen argh
11:50 nicomen try this: $r->get('/' => sub { shift->redirect_to('/index.html'); });
11:52 malikai that's closer.. but still not happy with ssl proxy in front
11:52 malikai since it redirects me to http:// when i'm going to https://
11:54 nicomen aha
11:55 nicomen http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad
11:55 nicomen {hypnotoad => {proxy => 1}}; in the config file, to use X-Forwarded-For and X-Forwarded-HTTPS
12:02 malikai i'm actually setting a bunch of application stuff in the config file (not sure if i should be doing that or using my own and slurping it)
12:04 malikai but i'm setting $self->config({ hypnotoad => { proxy => 1 } }); in startup which i hope is comparable
12:05 malikai i suspect my use case is weird: i have a bunch of static content and need a "dumb webserver" for it.. serve up /index.html from get /, and then the client connects a websocket and from there the server does the real work
12:06 sugama joined #mojo
12:08 basiliscos joined #mojo
12:19 Drossel joined #mojo
12:23 nicomen malikai: yeah sounds like something one would do with a afat client
12:23 nicomen like angular or something
12:23 nicomen but are you using hypnotoad to run the server?
12:23 nicomen (you mentioned morbo earlier)
12:30 malikai i've been testing with both.. ideally i'll run hypnotoad in production
12:31 malikai basically, you'll download the client.. then the server will provide the data over the socket
12:41 nicomen well, only hypnotoad would use the X-Forwarded headers obviously ;)
12:45 d4rkie joined #mojo
12:45 firnsy left #mojo
12:47 firnsy joined #mojo
12:50 malikai maybe what i should do is specify the client side uri in the config and use that to set the shift->redirect_to("$uri/index.html")?
12:52 malikai ironically, this seems like it would be far easier if i was using a template as opposed to a static index.html
12:52 nicomen is there something not working using hypnotoad, telling it to pick up forwarded headers and the previous redirect fix?
12:52 Adurah Or, lighttpd/nginx.
12:53 dod joined #mojo
12:57 cpan_mojo Mojolicious-Plugin-Qaptcha 0.08 by HRUPP - http://metacpan.org/release/HRUPP/Mojolicious-Plugin-Qaptcha-0.08
13:01 d4rkie joined #mojo
13:02 malikai yea.. something's not happy with x-forwarded-for.. when i set shift->redirect_to("$uri/index.html"), it does what i want without x-forwarded-for.. but when i turn that on, now i get a redirect loop
13:03 malikai so at least it's being clear about what's broken :)
13:04 nicomen why would you add $uri ?
13:05 malikai well, when it sends the redirect, it's prepending http://hostname when from the client i'm talking to https://hostname (via stud)
13:05 malikai so i'm forcing "https://hostname"
13:09 nicomen you shouldn't need to force a hostname when x-forwarded-for is active
13:09 nicomen also, the Location: probably returns /index.html so the browser should be using https:// anyway...
13:11 malikai just checked on my version: Mojolicious (4.73, Top Hat)
13:12 malikai maybe i should up that just to be sure?
13:15 malikai the exact return without forcing the uri is: Location: http://localhost/index.html
13:16 malikai (i'm proxying localhost:443 -> localhost:8080 via stud)
13:16 malikai in the browser i'm using: https://localhost
13:17 malikai to be fair, mojo thinks it is http://localhost:8080
13:21 Sjors joined #mojo
13:22 btyler joined #mojo
13:40 nicomen hm
13:42 gryphon joined #mojo
13:42 nicomen malikai: is stud really setting the forwarded protocol?
13:44 nicomen ah stud doesn't set anything
13:48 malikai 127.000.000.001.34825-127.000.000.001.08080: PROXY TCP4 127.0.0.1 127.0.0.1 34178 443
13:48 malikai it does
13:50 malikai ...but then all hell breaks loose
13:58 nicomen hm I was expecting this to work:
13:58 nicomen $ perl -Mojo -wlE 'a("/" => sub { my $c = shift; $c->req->url->scheme("https"); $c->redirect_to("/index.html"); })->start;' get -v / 2>&1 | grep Location:
13:58 nicomen Location: http://localhost:52265/index.html
14:04 dod joined #mojo
14:15 denisboyun joined #mojo
14:22 btyler joined #mojo
14:23 dvinciguerra joined #mojo
14:37 malikai nicomen, that does work.. but it's handling the https itself isn't it?
14:39 KindTwo joined #mojo
14:39 bluescreen joined #mojo
14:56 btyler joined #mojo
15:05 nicomen malikai: well, as far as I read on the web , stud is a dummy ssl terminator, so it will never rewrite headers, or even add headers, like the "X-Forwarding-" family
15:06 nicomen so you would need to hardcode ssl handling in the app
15:06 nicomen not sure how node.js does this
15:10 mire__ joined #mojo
15:14 Tiger joined #mojo
15:20 btyler joined #mojo
15:30 marty joined #mojo
15:30 marty_ joined #mojo
15:39 denis_boyun joined #mojo
15:42 sh4 joined #mojo
15:45 KindOne joined #mojo
15:48 arthas joined #mojo
15:57 good_news_everyone joined #mojo
15:57 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/BzHz1w
15:57 good_news_everyone mojo/master 273b533 Sebastian Riedel: simplify IO::Socket::IP specific code
15:57 good_news_everyone left #mojo
16:04 good_news_everyone joined #mojo
16:04 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sPfZZg
16:04 good_news_everyone mojo/master c6f1a27 Sebastian Riedel: updated IO::Socket::IP requirement to 0.20 for certain bug fixes
16:04 good_news_everyone left #mojo
16:05 laouji joined #mojo
16:05 sri same version IO::Socket::SSL requires
16:20 rem_lex|pivo joined #mojo
16:26 basiliscos joined #mojo
16:37 howitdo joined #mojo
16:40 ponycorn joined #mojo
16:51 punter joined #mojo
16:56 cleverfox joined #mojo
16:57 ponycorn I have a moral dilemma.
16:57 ponycorn Transformers movies are horrid.
16:57 ponycorn But this next one has Mark Wahlberg in it, who is awesome.
16:57 ponycorn I can't.
16:59 sri mark wahlberg is a racist
16:59 KindTwo joined #mojo
17:02 ponycorn how so?
17:03 sri http://en.wikipedia.org/wiki/Mark_wahlberg # see assaults and convictions
17:03 Adurah Once he dropped Marky, he became evil.
17:04 ponycorn Ah, he was a kid.
17:05 ponycorn I don't think he's the same person. Post Marky, I like him.
17:08 mire__ joined #mojo
17:10 bluescreen_ joined #mojo
17:21 sri http://pastie.org/8692338 # i take it nobody likes ->all_content('comments')
17:21 sri s/content/contents/
17:24 ponycorn I don't see any problem with it
17:25 tianon sri: it definitely feels consistent to me
17:35 mire__ joined #mojo
17:40 sri dunno about that, most comparable methods actually take selectors
17:42 tianon oh, right :x
17:43 good_news_everyone joined #mojo
17:43 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/8qlsAg
17:43 good_news_everyone mojo/master b3268d6 Sebastian Riedel: make selectors in examples more obvious
17:43 good_news_everyone left #mojo
17:44 sri i kinda also like that the all_contents example hints at how to do more advanced stuff http://mojolicio.us/perldoc/Mojo/DOM#all_contents
17:51 mire__ joined #mojo
17:54 tianon +1 - the grep makes it super obvious, and clear that really advanced stuff is just a little code away
17:54 tianon sri++ :D
17:55 sri i take that as a -1 :)
17:57 tianon hahaha
17:57 * tianon sets self on fire
17:58 abra joined #mojo
18:06 zM joined #mojo
18:14 beyondcreed joined #mojo
18:14 rdunklau joined #mojo
18:14 rdunklau Hello.
18:15 rdunklau I'm not familiar enough with mojo, but is such a thing as a "request context" ? That is, a place to store variables which will be thrashed at the end of the request, and is safe to use in a multithreaded environment ?
18:17 ashleydev joined #mojo
18:24 cpan_mojo Test-Mojo-Session 1.0 by Andrey Khozov - http://metacpan.org/release/AVKHOZOV/Test-Mojo-Session-1.0
18:38 good_news_everyone joined #mojo
18:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/FqPyqQ
18:38 good_news_everyone mojo/master 1758614 Sebastian Riedel: more render examples
18:38 good_news_everyone left #mojo
18:39 r0b3rt joined #mojo
18:45 KindOne joined #mojo
18:59 davido_ joined #mojo
19:00 good_news_everyone joined #mojo
19:00 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/CjkKUA
19:00 good_news_everyone mojo/master 1c89077 Sebastian Riedel: fixed typo in rendering guide
19:00 good_news_everyone left #mojo
19:10 DaTa rdunklau: i guess you mean the stash: http://mojolicio.us/perldoc/Mojolicious/Controller#stash
19:13 bowtie_ joined #mojo
19:16 rdunklau DaTa: I've seen this, but the documentation is terse about its lifecycle.
19:17 rdunklau When is the stash trashed away ? Can I store, for example, a database handle in the stash and release it properly in an after_dispatch hook ?
19:22 KindOne joined #mojo
19:29 eugen joined #mojo
19:35 eugen joined #mojo
19:48 eugen joined #mojo
20:00 zM joined #mojo
20:01 mire__ joined #mojo
20:07 Adurah joined #mojo
20:20 good_news_everyone joined #mojo
20:20 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2aPMkA
20:20 good_news_everyone mojo/master b463eeb Sebastian Riedel: hint at life cycle of stash and session
20:20 good_news_everyone left #mojo
20:21 rem_lex|pivo joined #mojo
20:39 lukep joined #mojo
20:43 nic hmm, 'all content' scans better (to me) than 'all contents'
20:43 nic (cos 'contents' already means 'all')
20:43 nic "the contents of my suitcase" eq "all the content of my suitcase"
20:44 nic hmm, s/suitcase/book/ would scan even better :)
20:45 sri it seems to valid english though... https://www.google.com/search?q="all+contents"
20:45 sri *+be
20:45 nic yeah yeah, I'm sure it's valid English; just not sure it's good English :)
20:46 sri contents was chosen because of jquery
20:47 nic gosh, even google hits are agreeing with me.  The only 'all contents' hits on my first page were French
20:47 sri it is *all* contents of the current element... while all_content is *all* content of the current element and its children
20:47 sri i don't see you come up with a better name
20:48 nic ah, that would be more confusing, if 'all content' is greater than 'all contents'
20:48 nic Is 'contents' by itself a candidate?
20:48 sri i don't understand
20:48 sri we have ->contents and ->all_contents
20:48 nic 'contents' rather than 'all_contents'?
20:48 nic ah, nm
20:49 nic PLs are allowed to take liberties with language, so ignore my comments
20:49 sri and then there's Mojo::DOM::Node::content which allows one to edit the actual text content of a node
20:50 nic yep, sounds like all_contents is a good candidate
20:51 nic just checking really :)
20:51 sri we also have ->xml_content, ->prepend_content, >append_content and ->replace_content
20:52 sri s/xml_content/content_xml/
20:52 nic Is there something that helps the distinction between it and all_content?
20:52 nic eg this_content ?
20:52 nic or node_content?
20:53 sri anyway... look yourself... http://mojolicio.us/perldoc/Mojo/DOM#toc
20:53 nic k
20:54 sri content generally refers to a single "thing", usually a string... while contents is a collection of node and element objects
20:54 nic actually, if it's already in the docn, it's not worth me taking up air time on it; it was just a v small point
20:54 nic ah, that's useful (for me remembering the distinction)
20:54 sri can always deprecate and add with a new name
20:56 nic Do we have an 'all_content' or did I misunderstand?
20:59 nic I haven't been on much in the past 3 months, busy with too many other things
21:00 nic One of those things is using mojo in alien contexts; not web dev and not async, just using it to express algorithms elegantly
21:01 nic Had a really nice result last week. The mojo version beat mysqld by knocking 98% off the execution time :)
21:01 nic I nearly fell off my seat
21:01 nic That was using Mojo::Base attributes and all the nice things rather than doing things the fast & tacky way like I used to
21:02 nic So I thought the mojo way would be elegant and maintainable; didn't expect it to be lightening fast too :)
21:02 good_news_everyone joined #mojo
21:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/FGwXXg
21:02 good_news_everyone mojo/master 5c298cf Sebastian Riedel: fixed indentation error in documentation
21:02 good_news_everyone left #mojo
21:05 KindOne joined #mojo
21:13 KindTwo joined #mojo
21:14 good_news_everyone joined #mojo
21:14 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/JeIDww
21:14 good_news_everyone mojo/master c807181 Sebastian Riedel: removed old IO::Socket::SSL workaround
21:14 good_news_everyone left #mojo
21:22 KindTwo joined #mojo
21:35 rem_lex| joined #mojo
21:37 good_news_everyone joined #mojo
21:37 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/4uMxmQ
21:37 good_news_everyone mojo/master 355ea88 Sebastian Riedel: a few more parameter examples
21:37 good_news_everyone left #mojo
22:25 good_news_everyone joined #mojo
22:25 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/d1dtUw
22:25 good_news_everyone mojo/master a6dc994 Sebastian Riedel: better description for contents
22:25 good_news_everyone left #mojo
22:27 KindOne joined #mojo
22:35 TitanOfOld joined #mojo
22:37 marty joined #mojo
22:55 zM joined #mojo
22:55 marty joined #mojo
22:56 punter left #mojo
23:03 good_news_everyone joined #mojo
23:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/kDwPwA
23:03 good_news_everyone mojo/master baf84d8 Sebastian Riedel: improved Mojo::DOM::HTML to generate better HTML
23:03 good_news_everyone left #mojo
23:07 * sri just wanted to make the tag helpers a little smarter too... but noticed we have mixed XML/HTML semantics documented
23:26 good_news_everyone joined #mojo
23:26 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/4tNc2A
23:26 good_news_everyone mojo/master d13ca2c Sebastian Riedel: small optimization
23:26 good_news_everyone left #mojo
23:47 Akron joined #mojo

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