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

IRC log for #mojo, 2017-09-11

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

All times shown according to UTC.

Time Nick Message
00:13 disputin joined #mojo
00:49 aborazmeh joined #mojo
01:00 tchaves joined #mojo
02:13 noganex joined #mojo
03:16 zivester joined #mojo
04:04 dboehmer_ joined #mojo
05:22 dod joined #mojo
05:27 dod joined #mojo
05:31 disputin joined #mojo
06:21 dod joined #mojo
06:29 dod joined #mojo
06:38 petru joined #mojo
06:42 Lee joined #mojo
06:58 bianca joined #mojo
06:58 AndrewIsh joined #mojo
06:59 absolut_todd joined #mojo
07:09 Vandal joined #mojo
07:27 bianca joined #mojo
07:35 inokenty-w joined #mojo
07:39 trone joined #mojo
07:39 bianca joined #mojo
08:09 tyldis joined #mojo
08:27 rshadow joined #mojo
08:39 kamyl joined #mojo
08:58 n16gel joined #mojo
10:06 [1]mohawk joined #mojo
10:08 mrallen1_ joined #mojo
10:10 eseyman joined #mojo
10:11 TBSliver joined #mojo
10:42 bianca joined #mojo
10:48 trippeh joined #mojo
10:49 Ptolemarch joined #mojo
10:53 trone joined #mojo
11:27 umask001 joined #mojo
12:11 bianca joined #mojo
12:19 chandwki does anyone know how to configure hypnotoad to listen on a unix domain socket?
12:21 chandwki I can't find it documented anywhere
12:22 vicash chandwki: perldoc Mojo::Server::Daemon has the "listen" config option showing how to do it. it is the same for Hypnotoad as mentioned in perldoc Mojo::Server::Hypnotoad
12:31 umask001 joined #mojo
12:38 petru joined #mojo
12:42 margeas joined #mojo
12:44 trone joined #mojo
12:53 tcohen joined #mojo
12:59 bianca joined #mojo
13:09 petru joined #mojo
13:14 rickbol_ joined #mojo
13:18 gizmomathboy joined #mojo
13:20 shmoo joined #mojo
13:21 shmoo Hi there is a funny behavior when uploading big files
13:22 shmoo it hangs forever
13:22 stryx` joined #mojo
13:23 shmoo unless I ask for $c->req->body_size
13:24 shmoo or $c->req->is_limit_exceeded
13:25 shmoo am I doing something wrong?
13:25 shmoo seems like a bug to me
13:31 karjala_ joined #mojo
13:35 margeas is mojolicious fat-packable? I mean the "standard" distro which can be downloaded from CPAN and its dependencies....
13:39 Pyritic joined #mojo
13:43 haarg i think it should be
13:56 Lee_ joined #mojo
14:11 n16gel joined #mojo
14:13 bianca joined #mojo
14:13 stryx` joined #mojo
14:17 Pyritic joined #mojo
14:19 petru joined #mojo
14:20 bianca joined #mojo
14:39 dod joined #mojo
14:39 stryx` joined #mojo
14:48 ChmEarl joined #mojo
14:51 dod joined #mojo
14:57 Pyritic joined #mojo
15:04 disputin joined #mojo
15:11 zivester joined #mojo
15:18 maschine joined #mojo
15:27 sri shmoo: that does not sound like something mojo does by default
15:28 sri margeas: people have been reporting success
15:37 Grinnz some of the optional dependencies are not fatpackable, like IO::Socket::SSL
15:37 Grinnz but otherwise
15:46 orev joined #mojo
16:19 marty joined #mojo
16:20 marty joined #mojo
16:22 jnbek joined #mojo
16:23 bianca joined #mojo
16:26 sh14 joined #mojo
16:37 dod joined #mojo
17:02 andy joined #mojo
17:03 arcanez is there a way to check if a query param exists? (ie: I want to say ?pretty instead of ?pretty=1)
17:05 Grinnz it would have the value of empty-string in that case
17:05 Grinnz so, as long as it's defined
17:05 arcanez ok, I'll check
17:05 maschine wouldn't that just be something like if (my $pretty  = $self->param{'pretty'}) { ... }?
17:05 Grinnz maschine: empty string is a false value
17:06 sri hmm, our docs are inaccurate in a few places
17:06 sri we use MB/GB to mean MiB/GiB
17:06 maschine Grinnz: exactly what I meant :)
17:06 sri wonder if the values or the docs should change
17:06 Grinnz yes, so that if statement would fail...
17:06 arcanez maschine: I'd check exists/defined
17:07 Grinnz also it's ->param('pretty')
17:07 arcanez I'm doing defined $c->param('pretty')
17:07 arcanez (and that works)
17:08 arcanez I didn't see a hash interface to params like stash
17:08 Grinnz there's ->to_hash but it's more a representation than an interface
17:08 Grinnz and theres really no need for that here
17:09 Grinnz if a parameter accessed by name is defined, it exists
17:10 Grinnz or put another way, urlencoded parameters can't be undefined if they exist
17:20 tchaves joined #mojo
17:28 bianca joined #mojo
17:33 ChmEarl joined #mojo
17:37 kavuria joined #mojo
17:38 bianca joined #mojo
17:41 arcanez is there a reason I wouldn't see a 'json' key in $c->stash in before_render? (if I ->render(json => ...))
17:48 brunoramos joined #mojo
17:49 bianca joined #mojo
17:51 arcanez trying to be able to specify $c->render(json => { foo => bar }) and have before_render switch to the json_pretty handler if defined $c->param('pretty')
17:51 arcanez *shrug*
17:52 arcanez I think that'd save me from writing $c->render($pretty ? 'json_pretty' : 'pretty' => { foo => 'bar' }) for all endpoints
17:54 trone joined #mojo
17:55 kavuria I do it in after_render -- http://mibpaste.com/y3qWZj
17:56 arcanez bit of extra cpu cycles to decode & encode
17:57 arcanez ideally, people would just pipe to jq, but apparently some people look at it in their browsers :X
17:57 jberger there are browser plugins for that too
17:57 jberger currently I use https://github.com/tulios/json-viewer
17:58 kavuria yeah, I use postman and it has a pretty viewer but I can't ask all my API consumers to use the same :-/  They expect pretty output by default .. grr
17:58 jberger tell them this is better for performance
17:58 jberger and IMO, yes you can
17:59 jberger JSON isn't intended for human consumption
17:59 jberger that said, I think a parameter and a before_render is perfectly acceptable if you must
18:00 arcanez jberger: I'm not seeing a 'json' key in $args or $c->stash in my before_render if I $c->render(json => ..) though
18:00 jberger check the args hash passed into the before_render
18:00 Grinnz 'json' is handled specially by render; if you must do it by a single render key, i would make a custom one for this purpose
18:00 jberger in a before_render you have to check both
18:01 arcanez Grinnz: that's what I was guessing, but wanted to verify.. and that's not a bad approach, _really_
18:01 arcanez leaving json intact for a defined behavior
18:01 jberger Grinnz: he could encode manually and render it as data
18:01 arcanez $c->render(jason => ...); heh
18:02 Grinnz lol
18:02 jberger this feels so familiar, didn't I just go over this with someone?
18:02 jberger arcanez: was it you?
18:02 arcanez you have the plugin, yes
18:02 arcanez but I believe your example uses different endpoint names
18:03 jberger endpoint names?
18:03 jberger this is about a handler
18:03 arcanez your example was "any '/pretty' => { json_pretty => $data }"
18:04 jberger https://gist.github.com/jberger/687fff38763e70b6712975f6aea8779c
18:04 jberger right, but if you read it all you see that there is an option for it to take over all json renders
18:05 jberger https://gist.github.com/jberger/687fff38763e70b6712975f6aea8779c#file-pretty-pl-L36
18:06 * arcanez does more tias
18:09 kavuria +1 for Mojolicious::Plugin::JSONPretty
18:10 arcanez looks like the issue needing to delete $args->{json} when putting it into $c->stash->{json_pretty} / $args->{json_pretty}
18:13 jberger it does that when you set the "always" parameter
18:13 jberger as I keep saying, anyone is welcome to take ownership of that code and put it on CPAN
18:13 jberger a simple thanks in the doc would be sufficient
18:17 arcanez I should have realized that after reading ::Renderer
18:17 arcanez I also learn a fair amount reading batman source code
18:23 bianca joined #mojo
18:25 petru joined #mojo
18:28 disputin1 joined #mojo
18:29 umask001 joined #mojo
18:35 rshadow joined #mojo
18:47 gryphon joined #mojo
18:49 kavuria I thought the JSONPretty plugin is already available in CPAN.  Unless someone beats me to it, I am happy to publish it on CPAN. @jberger, thanks for authoring it.
18:50 jberger perhaps someone has made one that I'm unaware of
18:50 jberger search first
18:50 kavuria it's not there, a few secs ago, at least.
18:50 jberger it will need documentation and tests
18:51 kavuria yep, realized that. I will get those in place.
18:51 jberger excellent
18:51 jberger I'll be happy to review if you like
18:51 kavuria I will be glad if you could review.  Thanks!
19:15 bwf joined #mojo
19:21 kavuria joined #mojo
19:22 bwf joined #mojo
19:50 bwf joined #mojo
19:56 kavuria joined #mojo
20:00 genio joined #mojo
20:07 perlpilot joined #mojo
20:09 bwf joined #mojo
20:30 bwf joined #mojo
20:52 kavuria joined #mojo
21:31 good_news_everyon joined #mojo
21:31 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v5181
21:31 good_news_everyon mojo/master 8a405d8 Sebastian Riedel: fix a few typos in the documentation
21:31 good_news_everyon left #mojo
21:41 bwf joined #mojo
21:41 kavuria joined #mojo
21:43 marty joined #mojo
21:50 bwf joined #mojo
22:16 pirateFinn joined #mojo
22:16 kwa joined #mojo
22:17 Xyem joined #mojo
22:24 erry joined #mojo
22:32 tits joined #mojo
22:32 tits LOOK AT ALL THE NIGGERS LOOTING IN FLORIDA ROFL!!
22:32 tits JOIN THE DISCUSSION torniggaiaoxhlcl.onion/6667
23:02 karjala_ joined #mojo
23:04 karjala_ joined #mojo
23:30 disputin joined #mojo
23:49 Gedge joined #mojo

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