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

IRC log for #mojo, 2015-10-18

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

All times shown according to UTC.

Time Nick Message
00:20 damaya joined #mojo
00:29 aborazmeh joined #mojo
00:33 damaya joined #mojo
00:41 panshin joined #mojo
00:49 sri \o\
00:49 sri /o/
01:27 damaya joined #mojo
02:14 noganex_ joined #mojo
02:23 asarch joined #mojo
02:29 nnutter joined #mojo
02:44 panshin joined #mojo
02:49 davido_ joined #mojo
03:37 jamesw joined #mojo
04:46 panshin joined #mojo
05:40 damaya joined #mojo
05:42 irqq joined #mojo
06:30 damaya joined #mojo
06:30 dod joined #mojo
06:36 dod joined #mojo
07:19 damaya joined #mojo
07:32 kaare joined #mojo
07:33 meshl joined #mojo
07:43 kanishka joined #mojo
08:09 Vandal joined #mojo
08:40 amon joined #mojo
08:41 al joined #mojo
09:22 Zoffix joined #mojo
09:32 gaunt_ joined #mojo
09:36 meshl joined #mojo
10:12 MartinR joined #mojo
12:25 panshin joined #mojo
12:34 * sri yawns
12:36 Zoffix Guten morgen!
12:41 sri moin! (as we say in the north)
12:59 Zoffix <guten>
12:59 Zoffix (that's guten tag)
13:12 aborazmeh joined #mojo
13:26 panshin joined #mojo
13:58 jberger xml invalid, mornings end, </guten> required
14:01 pink_mist lol'd @ guten tag
14:04 lb <guten/>
14:36 panshin joined #mojo
14:55 meshl joined #mojo
15:02 sh4 joined #mojo
15:09 asarch joined #mojo
15:13 ajr_ joined #mojo
16:26 mattastrophe joined #mojo
16:41 cpan_mojo Mojolicious-Plugin-SizeLimit-0.005 by GRAF https://metacpan.org/release/GRAF/Mojolicious-Plugin-SizeLimit-0.005
16:43 lluad joined #mojo
16:52 panshin joined #mojo
17:22 damaya joined #mojo
17:34 ajr_ joined #mojo
17:34 nnutter sri, do you use Minilla?
17:34 nnutter i.e. for Mojo::Pg
17:56 sri nnutter: no
17:57 sri i'm a purist, i use only EU::MM
17:58 sri back in the days i was more eager to try new things, but got burned with Module::Install
17:58 sri which used to have many problems, dunno if that's still the case
17:58 preaction yes
17:59 preaction well, i mean, it's recommended to move away from it, if you've got the chance
18:04 Grinnz Dist::Milla's docs suggest that the author liked the idea of Module::Install, but it has fundamental issues which are not easily fixable, and dzil avoids those issues; to me, M::I is a remnant of a time before configure_requires
18:05 Grinnz it has you bundling modules, and auto-installing modules, when really all of that should be taken care of by the cpan installer seeing what you specify under configure_requires
18:06 kaare joined #mojo
18:06 Grinnz unfortunately the CPAN.pm before 5.12 (iirc) does not know about configure_requires, so you still have to cater to those clients
18:08 Grinnz but the better way to cater to those clients is simply to provide a Module::Build (core in 5.10.1) or EUMM fallback
18:08 Grinnz and dzil has automatic ones for you to use ;)
18:16 MartinR joined #mojo
18:17 pink_mist . o O ( Dist::Mojo .. a Dist::Zilla-alike with no non-core dependencies :3
18:17 pink_mist )
18:17 MartinR Does mojo have some utility for opening files for download ? Can't see any..
18:18 pink_mist what does "opening files for download" mean?
18:18 preaction you mean downloading files? use Mojo::UserAgent
18:18 pink_mist you're writing a script using some kind of Mojo. is that script meant to download files from a server, or is it meant to be a server that other clients can download from?
18:19 MartinR pink_mist: the former ;)
18:20 MartinR file is on mojo server
18:20 MartinR so the fiel opening include sending correct headers
18:20 MartinR s/fiel/file
18:20 pink_mist so you already have a Mojolicious server running and it serves files with no problem?
18:21 pink_mist you just want to connect to it to download the file?
18:21 pink_mist then what preaction said
18:21 preaction i think this was in freenode #perl last night
18:21 MartinR yy no ;) it wasn't
18:22 MartinR that was about files but in some other circumstances
18:22 preaction the answer's the same: use an HTTP client to download the file. Mojo::UserAgent is an HTTP client
18:23 preaction just like HTTP::Tiny and LWP::UserAgent
18:26 MartinR hmm, UA in this case sounds odd to me but maybe I didn't get it
18:27 MartinR there is get request to the server which has the file, so I was thinking about something like this:
18:27 pink_mist use Mojo::UserAgent to connect to the server and get the file for you
18:27 MartinR get '/down' => sub{ serve file here ... }
18:27 pink_mist what is so hard for you to grasp?
18:27 pink_mist wait
18:27 preaction User Agent is fancy-speak for "an agent that acts on behalf of the user", it's a more-generic name for "web browser"
18:27 pink_mist now you're in the server
18:28 pink_mist MartinR: what do you mean?!?!??!?!?!?!? what are you writing???
18:28 pink_mist MartinR: are you writing the script to download from a server?
18:28 Martin90 joined #mojo
18:28 pink_mist MartinR: or are you writing the server script that allows things to be downloaded from it???
18:29 pink_mist MartinR: I thought earlier when I asked you this question you said you were writing the script to download from the server
18:29 pink_mist but now it seems like you were lyinhg
18:29 pink_mist *lying
18:29 pink_mist or misunderstanding my question
18:29 pink_mist if you were misunderstanding, ask for clarification
18:29 Martin90 no, server script that allows things to be downloaded from it --> thats it ;)
18:29 pink_mist if not, clarify wtf you want
18:29 pink_mist so take a loot at App::SimpeHTTPServer
18:30 pink_mist *take a look at
18:30 pink_mist damnit
18:30 pink_mist App::SimpleHTTPServer
18:30 Martin90 your module ?
18:30 pink_mist yes
18:32 pink_mist MartinR: https://metacpan.org/source/COFFEE/Mojolicious-Plugin-Directory-Stylish-1.003/lib/Mojolicious/Plugin/Directory/Stylish.pm#L75 <-- this is the most relevant line of code for your scenario
18:32 Martin90 hmm, the synopsis doesn't tell me much ;/
18:32 Martin90 ok I will check it
18:33 pink_mist yeah, sorry, App::SimpleHTTPServer is a commandline program so I haven't really written the perl docs for it that I should :/ I'll haveto get to that
18:34 Martin90 what about the old CGI way --> open filehandle and then while( read($in_fh, $buf, $speed) ) {print %buf} ?
18:34 sri pink_mist: be nice
18:34 pink_mist sri: my damnit was to myself for mispelling
18:34 pink_mist sri: but I apologise
18:34 pink_mist oh wait, I seem to have inadvertenly put a 'wtf' in one of my lines oops
18:34 pink_mist really sorry
18:35 sri and i imagine the answer is http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Serving-static-files
18:35 Martin90 YES, thank you sri !
18:35 Martin90 this looks like the way to go..
18:35 pink_mist humm, I don't think I got static to work the way I wanted it to when I tried using that
18:38 Martin90 feel bad that I haven't find it ealier.., anyway thanks pink_mist for help ;)
18:39 Martin90 if nginx is in front of mojo it should take the responsibility for serving that static request, right ?
18:40 preaction that would be ideal for performance reasons, yes
18:43 Martin90 ok, thanks
18:46 nnutter sri, preaction, Grinnz: thanks for info about M:I and EU:MM
19:17 PryMar56 joined #mojo
19:21 good_news_everyon joined #mojo
19:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vCxn7
19:21 good_news_everyon mojo/master fe7166f Sebastian Riedel: mention more details about how static files are served
19:21 good_news_everyon left #mojo
19:23 yt7fms joined #mojo
19:26 irqq joined #mojo
19:31 Martin90 if no nginx then it uses io::handle to open that files ?
19:33 Martin90 I mean $c->reply->static('uploaded/file.txt');
19:36 sri literally the next section http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Custom-responses
19:41 panshin joined #mojo
19:43 Martin90 ok it's more or less what I was asking, sorry and thanks ;)
19:59 damaya joined #mojo
20:03 jberger joined #mojo
20:29 panshin joined #mojo
20:51 kaare joined #mojo
21:00 damaya joined #mojo
21:16 damaya joined #mojo
21:29 yt7fms joined #mojo
21:53 irqq_ joined #mojo
21:55 panshin joined #mojo
22:32 meshl joined #mojo
23:12 nnutter joined #mojo
23:37 dabudabu joined #mojo
23:48 damaya joined #mojo
23:53 zivester joined #mojo

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