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

IRC log for #mojo, 2013-11-19

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

All times shown according to UTC.

Time Nick Message
00:02 mst batman: Oh, it is what the ANSI standard suggests. I know that. It's also a FUCKING STUPID default collation.
00:05 dsteinbrunner_ joined #mojo
00:05 KindTwo joined #mojo
00:11 basic6 joined #mojo
00:32 btyler joined #mojo
00:35 dsteinbrunner joined #mojo
00:39 asarch joined #mojo
00:39 russum left #mojo
00:52 laouji joined #mojo
00:53 ronsavage joined #mojo
00:59 ronsavage See: https://gist.github.com/ronsavage/7538324. Add to default generated code lines 10 .. 12. OK. Added line 4. Gets error as per title of gist. Doesn't matter which module I use.
01:29 dsteinbrunner joined #mojo
01:42 ka2u joined #mojo
02:00 d4rkie joined #mojo
02:17 basic6_ joined #mojo
02:38 duncanthrax joined #mojo
02:43 ronsavage joined #mojo
02:55 KindTwo joined #mojo
03:10 cfedde joined #mojo
03:13 ronsavage joined #mojo
04:07 mst ronsavage: what does Devel::Confess and -d:Confess tell you?
04:11 preflex_ joined #mojo
04:16 ronsavage See: https://gist.github.com/ronsavage/7540238 Same thing in detail
04:22 * mst sighs
04:22 mst https://metacpan.org/pod/File::HomeDir#home
04:22 mst you're importing a subroutine called home().
04:22 mst that's overwriting the class' home() method.
04:22 mst so $self->home, as called inside Mojo.pm
04:23 mst is calling home($self), and $self is not a valid unix user, so home() returns undef
04:23 * sri would advice against doing that
04:23 mst ronsavage: since that function is documented to be legacy
04:23 mst ronsavage: I would recommend you instead 'use File::HomeDir ();'
04:25 mst btw, my thought process here was "what does ->parts get called on? ah, $self->home ... where's that ... ah, it's an attribute with Mojo::Home->new as a default ... so that can't return undef ... maybe I should check the File::HomeDir docs to see what it exports"
04:25 ronsavage Well done sir! Take the rest of the day off. Tell the boss I said it was OK.
04:25 mst ronsavage: ^^ obviously, you probably won't manage it in ten minutes the first time you try it
04:26 mst ronsavage: but it's still pretty basic debugging
04:26 mst ronsavage: the key thing to remember is that "open source" means you're totally allowed to actually *look*
04:26 ronsavage Yep
04:27 mst (bear in mind I've never looked at that part of the Mojo source before now, so I was basically coming from cold too)
04:28 mst also ... "using any module" was a lie. you actually meant "using File::HomeDir specifically, because I never tried anything else"
04:28 mst ronsavage: ^^ please be more accurate next time :)
04:30 sri sooo... beer is on ronsavage
04:30 mst :D
04:31 ronsavage I also tried by itself my Local::Config, which happens to use Config::Tiny, File::Copy (), File::HomeDir, Moo, Path::Tiny and Types::Standard. So it wasn't quite a lie!
04:32 mst then somehow, your Local::Config is exporting a home() too
04:32 mst ... or it broke it some other way
04:32 mst but that's still not "any module"
04:34 ronsavage True, but since File::HomeDir is in there, and not File::HomeDir (), that would explain it, surely?
04:34 ronsavage sri: A long tall cool virtual pint is being emailed to you as I speak...
04:38 sri wow, new firefox nightly looks amazing on os x
04:38 mst ronsavage: well, no, because that doesn't explain why Local::Config exports home()
04:38 mst ronsavage: but, basically, "I tried using File::HomeDir and one other thing that also uses File::HomeDir" is different to 'any'
04:39 mst ronsavage: http://shadow.cat/blog/matt-s-trout/sherlock-holmes/
04:45 ka2u joined #mojo
04:53 KindOne joined #mojo
05:07 laouji joined #mojo
05:11 omega_ sri: yeah, I've been using the UX branch for months, it looks amazing :)
05:13 omega_ upside of it merging to nightly is that 1password works with nightly \o/
05:30 d4rkie joined #mojo
06:17 ver joined #mojo
06:42 laouji joined #mojo
06:43 abra_ joined #mojo
07:12 laouji joined #mojo
07:18 asarch joined #mojo
07:26 sivoais joined #mojo
07:35 batman mst: ANSI-SCREWUP: i agree.
07:37 batman http://codefirefox.com/ # if i only used firefox and not TheBestBrowserInTheUniverse, i would probably be more interested ;)
07:37 zivester joined #mojo
07:45 basiliscos joined #mojo
07:52 dod joined #mojo
07:53 Vandal joined #mojo
07:53 rem_lex joined #mojo
07:55 highflying joined #mojo
08:21 dod joined #mojo
08:34 trone joined #mojo
08:42 laouji joined #mojo
08:51 mire_ joined #mojo
08:55 themage joined #mojo
09:07 maxhq joined #mojo
09:32 dotan joined #mojo
09:42 hrupp batman,jberger: I've to store some things encryptet in db. What do you think about a in-/deflate mechanism (like the dbic one) in Mandel ?
09:51 bc547 does hypnotoad periodically restart a worker?
09:52 batman bc547: yes, when it has reached the connection limit. not really periodically maybe :P
09:52 batman bc547: https://metacpan.org/pod/Mojo::Server::Hypnotoad#accepts
09:53 batman hrupp: i'm not against it :)
09:54 batman but can't you just add a method which override the original?
09:54 bc547 batman: tnx! somehow I missed that part :-(
09:54 batman like sub password_plain { my $self = shift; return decrypt $self->get('/password/encrypted'); } ?
09:55 batman in the Document class ^
10:01 Vandal joined #mojo
10:04 dod joined #mojo
10:12 hrupp batman: sure, this possibility didn't came up to my brain :) I'll do that in this way...
10:13 dotan joined #mojo
10:23 Dandre joined #mojo
10:26 batman hrupp: you might not even want to define the field. just add $self->set() + $self->get() to the custom method...
10:26 batman or name it something else so you can still reach down to the raw data..?
10:28 nicomen joined #mojo
10:29 batman nevermind the last comment. that's actually why i added get/set: so you didn't have to define the field unless it made sense
10:30 Tiger joined #mojo
10:33 Vandal joined #mojo
10:36 hrupp batman: just works now :)
10:43 Vandal joined #mojo
10:48 ka2u joined #mojo
10:52 athenot joined #mojo
10:53 fhelmber_ joined #mojo
10:54 nicomen I collegue is ahving problems fetching a local static file from a route, supposedly due to something blocking, does that sound correct?
10:54 nicomen that you can't fetch files from the same server from within a request?
10:57 dsteinbrunner joined #mojo
11:00 abra joined #mojo
11:02 batman hrupp: awesomelicious :)
11:03 batman nicomen: yes, you need to do it non-blocking
11:04 batman nicomen: something like this: https://metacpan.org/source/MRAMBERG/Mojolicious-Plugin-Proxy-0.3/lib/Mojolicious/Plugin/Proxy.pm
11:10 nicomen batman: :-(
11:13 laouji joined #mojo
11:13 mst nicomen: the server won't start a new request while a current blocking one is running.
11:14 Lee joined #mojo
11:14 mst nicomen: otherwise it would be very easy to write an infinite recursion that kept going until it ran out of RAM or file descriptors
11:14 nicomen that sounds like the server can only serve one request at a time?
11:15 mst if you're only running a single process and you block ... it blocks
11:15 mst Mojo allows you to do async. If instead you decide to block, you block.
11:15 nicomen but this is with morbo that is supposed to run several server instances?
11:16 mst morbo is the single process development server
11:16 nicomen ah lol
11:16 mst hypnotoad is the preforking production server
11:16 nicomen right right
11:16 mst but fetching your own static file in blocking code thereby tying up two handlers is still silly
11:17 nicomen I agree-ish
11:21 mire joined #mojo
11:30 d4rkie joined #mojo
11:30 batman nicomen: i'm not sure if it matter. if you're unlucky hypnotoad should also be possible to send the request to the same process..?
11:30 batman i'm not sure about this. my unix skills are lacking.
11:30 batman nicomen: blocking is always silly in my mojo world :)
11:35 dod joined #mojo
11:40 basiliscos joined #mojo
11:55 hummeleBop joined #mojo
11:59 dvinciguerra joined #mojo
12:05 ka2u joined #mojo
12:16 mjb152 joined #mojo
12:18 mjb152 i've created an app to let me send pictures and some data to a SQLIte blob,  and retrieve them again. in the controller I can save the data to a file, and it's fine,  but how can I send that binary data straight to a template for displaying ?
12:18 moritz mjb152: usually you don't do that
12:19 mjb152 I'm sending it in the stash,  but now sure how to display it from there
12:19 mjb152 ahh. save it locally first and link to it ?
12:19 moritz mjb152: instead you emit an <img> tag with a URL
12:19 hrupp joined #mojo
12:19 moritz mjb152: and that URL can point to your mojo app again, and you can simply return the image blob (plus the appropriate header)
12:20 moritz (return the image from the second request, that is)
12:21 mjb152 hmm,  so I've got some text fields and a photo,  and I'm trying to display those in one hit
12:23 mjb152 right, I read it again and understand more now,  so write another route to process the image and a header.     Next question,  what kind of header do I need to send ?
12:23 moritz the appropriate content-type
12:23 moritz oh, there's also another possibility
12:24 moritz you can embed images base64-encoded with data://-URLs
12:24 moritz http://www.websiteoptimization.com/speed/tweak/inline-images/
12:25 mjb152 sounds better, rather than making 2 calls to the database. thanks for that link.
12:27 batman mjb152: it's not better in most cases.
12:28 batman the db hit is insignificant compared to the mess of inlining the image
12:28 batman in 99.9999% of the cases
12:28 mjb152 so the preferred option is to write a route to handle the generation of images and their content ?
12:30 mjb152 don't suppose you know of any sample code out there ?
12:37 batman you're thinking too complicated. you already have the sample code...
12:37 mjb152_ joined #mojo
12:39 burb joined #mojo
12:46 mjb152_ left #mojo
12:46 mjb152_ joined #mojo
13:01 basiliscos joined #mojo
14:19 sh4 joined #mojo
14:26 iSlug joined #mojo
14:26 dvinciguerra joined #mojo
14:28 sh3 joined #mojo
14:32 d4rkie_ joined #mojo
14:47 btyler joined #mojo
14:47 bluescreen joined #mojo
15:05 cfedde joined #mojo
15:10 cfedde joined #mojo
15:12 r0b3rt joined #mojo
15:12 Vandal joined #mojo
15:36 * sri loves that helpers cost nothing anymore
15:44 cfedde joined #mojo
15:49 cfedde joined #mojo
15:49 trone joined #mojo
15:51 Vandal joined #mojo
15:51 mst sri: how so?
15:54 cfedde joined #mojo
16:06 asarch joined #mojo
16:27 gryphon joined #mojo
16:29 trone joined #mojo
16:38 sri mst: https://github.com/kraih/mojo/commit/d38bf39293ad67649150c5705b9fba44da339b13
16:39 cfedde joined #mojo
16:40 basiliscos joined #mojo
16:41 sri helpers are now just monkey patched once into the template namespace and have no overhead otherwise anymore
16:41 punter joined #mojo
16:44 cfedde joined #mojo
16:48 fhelmbe__ joined #mojo
16:59 good_news_everyone joined #mojo
16:59 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/NSy3Kw
16:59 good_news_everyone mojo/master c7764bb Sebastian Riedel: Mojo::JSON is not so relaxed anymore
16:59 good_news_everyone left #mojo
17:07 beyondcreed joined #mojo
17:15 fhelmber_ joined #mojo
17:19 mire joined #mojo
17:20 andrefs joined #mojo
17:24 delias joined #mojo
17:31 dod joined #mojo
17:37 fhelmber_ joined #mojo
17:44 cfedde joined #mojo
17:45 rem_lex|pivo joined #mojo
17:46 andrefs joined #mojo
17:49 cfedde joined #mojo
17:55 cfedde joined #mojo
18:00 cfedde joined #mojo
18:05 cfedde joined #mojo
18:10 cfedde joined #mojo
18:11 tianon gotta say, that commit message had me scared for a moment
18:11 tianon was thinking, "shit, how more unrelaxed could he make it??"
18:12 tianon then saw it was just updating the POD to match what the module actually does, because it's not relaxed at all :)
18:12 mst sri: I thought they got poked into controllers as well
18:12 sri mst: AUTOLOAD, they were always cheap
18:13 mst ohh, that's how you did it
18:13 sri tianon: :D
18:15 cfedde joined #mojo
18:19 KindOne joined #mojo
18:25 mattp joined #mojo
18:36 * sri is a little surprised there have been no requests for new validation checks in core yet
18:38 tianon you're just that good 😎
18:39 sri 😎
18:59 Mikey most of us already wrote our form validation code
19:08 gtodd ::)
19:08 gtodd left #mojo
19:13 Mike-PerlRecruiter_ joined #mojo
19:20 fhelmber_ joined #mojo
19:52 fhelmber_ joined #mojo
20:36 lukep joined #mojo
20:45 good_news_everyone joined #mojo
20:45 good_news_everyone [mojo] kraih tagged v4.58 at 31d4f23: http://git.io/cqYA5w
20:45 good_news_everyone left #mojo
21:24 punter joined #mojo
21:32 cfedde joined #mojo
21:35 trone joined #mojo
22:09 basiliscos joined #mojo
22:12 iSlug joined #mojo
22:32 good_news_everyone joined #mojo
22:32 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/6p4cpQ
22:32 good_news_everyone mojo/master 77c5c4b Sebastian Riedel: mention that collections stringify
22:32 good_news_everyone left #mojo
22:47 abra_ joined #mojo
23:16 DrForr joined #mojo
23:18 Saravanan joined #mojo
23:19 Saravanan Hi
23:19 purl niihau, Saravanan.
23:19 Saravanan I am new to mojolicious.. I want to run mojolicious as cgi in backend
23:19 Zoffix joined #mojo
23:19 Saravanan ge
23:19 Saravanan geeks help me
23:20 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#ApacheCGI
23:20 Zoffix left #mojo
23:21 Saravanan without apache we cannot configure?
23:21 DrForr Maybe read the documentation first?
23:21 sri Saravanan: just to be sure, you're not using the term "geeks" in a condescending context, are you?
23:22 DrForr Just below the Apache/CGI entry it has a bunch of ways to run the app without Apache.
23:23 Saravanan @sri No
23:24 Saravanan DrForr : Okay
23:26 Saravanan left #mojo
23:34 good_news_everyone joined #mojo
23:34 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/nGXrNw
23:34 good_news_everyone mojo/master a74701e Sebastian Riedel: slightly more consistent synopsis examples
23:34 good_news_everyone left #mojo
23:45 dsteinbrunner joined #mojo
23:58 hesperaux joined #mojo

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