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

IRC log for #mojo, 2016-08-18

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

All times shown according to UTC.

Time Nick Message
00:00 jontaylor joined #mojo
00:42 Pierre joined #mojo
01:00 bossert joined #mojo
01:03 cpan_mojo Mojo-SQLite-1.000 by DBOOK https://metacpan.org/release/DBOOK/Mojo-SQLite-1.000
01:04 genio big version jump :)
01:05 Grinnz depends on your perspective :P
02:03 jontaylor joined #mojo
02:09 gizmomathboy joined #mojo
02:14 noganex_ joined #mojo
03:10 lluad joined #mojo
04:05 tl joined #mojo
04:06 jontaylor joined #mojo
04:20 lluad joined #mojo
04:52 rubes joined #mojo
04:53 rubes Is there a way to see errors that occur on a controller from morbo
04:54 rubes I have a module for websocket logic and I'm not getting the errors on morbo just on the development.log
05:12 rubes joined #mojo
05:16 vicash joined #mojo
05:27 Pierre joined #mojo
05:33 Atog joined #mojo
05:43 inokenty-w joined #mojo
06:09 jontaylor joined #mojo
06:10 trone joined #mojo
06:58 laidback_01 joined #mojo
07:06 rubes joined #mojo
07:11 AndrewIsh joined #mojo
07:11 Vandal joined #mojo
07:31 ashimema joined #mojo
07:37 jontaylor joined #mojo
07:53 osfabibisi joined #mojo
08:45 ivi joined #mojo
08:50 dod joined #mojo
08:56 cuechan joined #mojo
08:56 * sri still thinks he would like Mojo::SQLite and Mojo::mysql more if those modules focused more on the strengths of their databases instead of emulating Mojo::Pg
08:57 sri both pubsub implementations seem very sketchy
09:19 Pierre joined #mojo
09:22 sri ouch http://www.rafayhackingarticles.net/2016/08/google-chrome-firefox-address-bar.html
09:26 tl_ joined #mojo
09:27 mvorg joined #mojo
09:28 mishanti1 Ouch indeed.
09:29 sri and btw. re Mojo::DOM text trimming, snother spec i stumbled over https://rocallahan.github.io/innerText-spec/
09:30 sri s/s/a/
09:34 sri hahahaha, and an australian newspaper paid $180,000 to have their own domain .auspost
09:48 sri that's a newspaper that only has 50k followers on twitter
09:48 sri guess the newspaper business has recovered
09:58 mvorg is there any way to access the IP originating the request in the request object?
10:00 sri http://mojolicious.org/perldoc/Mojolicious/Controller#tx
10:02 mvorg thanks...I did actually searched that page for something like "ip", while I'd have better do a an "address" scan....
10:11 meshl joined #mojo
10:20 dotan joined #mojo
10:22 kivilahtio joined #mojo
10:58 tchaves joined #mojo
10:59 lluad joined #mojo
11:02 tchaves joined #mojo
12:01 csson joined #mojo
12:41 gizmomathboy joined #mojo
12:42 neilhwatson joined #mojo
12:56 orev joined #mojo
13:11 AirDisa joined #mojo
13:12 zivester joined #mojo
13:12 jontaylor joined #mojo
13:19 FatalNIX joined #mojo
13:34 Kripton joined #mojo
13:39 cpan_mojo Mojo-Weixin-1.1.8 by SJDY https://metacpan.org/release/SJDY/Mojo-Weixin-1.1.8
13:53 ptolemarch joined #mojo
13:58 rubes joined #mojo
14:41 jberger sri: so for Test2 I have hit an interesting stumbling block
14:42 jberger we are discussing fixing it on the Test2 side, but I thought I'd start a conversation here too just in case
14:42 jberger all of the Test::Builder/Test::More backcompat works fine, but when you use Test2 directly it no longer allows you to use a # in a test name
14:43 jberger this is per the TAP spec, but of course Test::More and TAP::Harness have always allowed it
14:43 jberger and of course we do things like "match selector tag#id" all over the place
14:43 jberger I'm not sure what we would even do about it
14:44 jberger most things seems pretty terrible like doing s/#/<hash>/ or stupid crap like that
14:45 jberger other good points have been brought up for things like tests like "user #2" so it is possible that Test2 will end up relaxing the restriction
14:47 genio Hm.  I wonder how many places I'm doing that.  I'm glad you mentioned it
14:48 mcsnolte joined #mojo
14:49 cafe joined #mojo
14:52 jberger its fine if you are using Test::More
15:02 zivester joined #mojo
15:13 Bean joined #mojo
15:13 Grinnz jberger, i ran into that recently (I had the habit in some tests at work of including relevant strings in the test name)
15:13 Grinnz there was another character you can't use too, / i think?
15:13 Grinnz no..not that
15:14 jberger newline
15:15 Grinnz ah yes
15:15 Grinnz but you can use those in note or diag fine, right? i need to start doing that
15:16 Grinnz basically the intent was to give visibility into what kind of values the test was finding
15:58 PryMar56 joined #mojo
16:28 orev joined #mojo
16:37 jacoby joined #mojo
16:40 jacoby joined #mojo
17:05 Pierre joined #mojo
17:11 itaipu joined #mojo
17:30 Zx3 joined #mojo
17:52 kes joined #mojo
18:06 itaipu joined #mojo
18:07 Pierre joined #mojo
18:22 itaipu joined #mojo
18:22 simcop2387 Is Mojolicious::Plugin::CHI a decent way to deal with caching?
18:42 jberger simcop2387: CHI is decent
18:43 jberger I'm not sure about the plugin, I'll peek
18:43 simcop2387 it looks like it should be decent, but i'm not positive either.
18:44 simcop2387 there was another one, Mojolicious::Plugin::Cache::Action that i found first, but decided it wasn't good enough (and hasn't been updated in years)
18:45 jberger Akron is a pretty respectable author
18:45 jberger it seems to do a bit more than I would have done but I assume that's the reason for a plugin rather than just holding a CHI instance
18:45 jberger and since I'm not exactly sure what all of that is, I'm not going to rule on whether or not its good
18:46 jberger generally I'd trust Akron's stuff though
19:05 simcop2387 jberger: that's basically what my opinion of it was.  looks like a nice quick way to get things into place for this simple service
19:06 simcop2387 the main thing that helps for this is it makes the op side of thing easier by making it simple to purge/clear the cache
19:19 jberger oh, I like CHI
19:19 jberger the compute method is exactly how I think caching ought to be implemented
19:29 laidback_01 joined #mojo
19:56 sri wow, even powershell is now open source https://github.com/PowerShell/PowerShell
20:07 demian joined #mojo
20:09 demian I successfully used the UserAgent check several thousand journal doi, which was pretty neat
20:10 demian I wanted to check in here to see if there was a faster way to go about it.
20:11 demian I use a simple foreach @dois{ say "error: $_ " unless $ua->get("http://doi.org/api/handles/".$_)->res}
20:12 demian can i do this faster using nonblocking calls?
20:13 Grinnz depends if the server can handle the simultaneous connections
20:13 mpapec2 joined #mojo
20:16 demian if it can, would I insert into the foreach loop the           Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
20:16 demian ?
20:16 demian along with the call back
20:18 perlpilot joined #mojo
20:19 sri it's more complicated than that, you'd want to build a little queue system to run only like 10 requests concurrently at a time
20:19 sri i think there were examples somewhere
20:20 sri maybe jberger wrote something?
20:20 demian ok, that's a good lead!  thanks
20:21 jberger I wrote a gist: https://gist.github.com/jberger/5153008
20:21 jberger it does queue, it does NOT rate limit or check robots.txt etc
20:21 jberger use with EXTREME caution
20:21 jberger (this is why I haven't put it on cpan)
20:22 demian great! extreme caution noted
20:25 mpapec while ( $self->{concurrent} < $concurrency and my $url = shift @{ $self->queue } )
20:25 mpapec invokes slight wtf
20:26 mpapec my $url = shift @{ $self->queue } or last;
20:27 mpapec is imho more perlish and easier to follow
20:33 batman demian: here is a similar gist: https://gist.github.com/jhthorsen/0827a57c154a652c1a70 (same warnings as jberger, hehe)
20:34 batman with Test::Mojo, should it be possible to do this? $t->websocket_ok('/events')->post_ok('/foo')->send_ok({json => {}});
20:34 batman what i mean is: can i mix websocket and "normal" http requests?
20:35 batman i have this case where i do this and then message_ok->message_like tests, and then afterwards $t->send_ok() fails
20:35 batman "do this" = "mixing ws and regular http requests"
20:36 batman here is the actual test: https://ssl.thorsen.pm/paste/f29f52a3f02b
20:38 sri batman: you can't
20:39 sri you can make a second Test::Mojo instance though
20:39 batman ok. i'll do that then
20:39 batman thanks
20:39 sri advantage of the oo api
20:40 batman :)
20:41 batman kind of weird that message_ok and message_like tests are successful
20:59 mishanti1 Any advice on which modules for sending UDP to use/avoid? I see there are quite a few.
21:01 batman mishanti1: i just use IO::Handle::UDP and hook the socket into Mojo::Reactor->io()
21:02 batman wow!
21:02 * batman reboots brain
21:02 batman i meant IO::Socket::INET
21:03 mishanti1 batman: Thanks. I hadnt considered that. :) Sounds like fun.
21:03 preaction IO::Socket::IP might be the better option there, since it also supports IPv6 transparently
21:03 preaction they are otherwise identical API-wise
21:04 mvorg joined #mojo
21:04 batman mishanti1: i use it here: https://metacpan.org/source/JHTHORSEN/Mojo-SNMP-0.12/lib/Mojo/SNMP/Dispatcher.pm#L72
21:17 mishanti1 batman: Excellent. Thank you for again being very helpful. :)
21:18 batman yeah... i sometimes have my moments after a brain reboot ;)
21:18 batman you're welcome
21:28 marty joined #mojo
21:29 tempire Oh man
21:29 tempire I just watched Attach on Titan on Netflix
21:29 tempire And then The Get Down
21:29 tempire SOGOOD
21:30 sri start playing overwatch ;p
21:34 mvorg is there any way to extract the user agent string as reported by the requesting agent from the req object?
21:35 sri http://mojolicious.org/perldoc/Mojolicious/Controller#req
21:39 batman mvorg: $c->req->headers->user_agent;
21:39 batman iirc
21:39 mvorg tnx sri and batman
22:44 jontaylor joined #mojo
22:53 itaipu joined #mojo
22:57 gizmomathboy joined #mojo
23:40 jontaylor joined #mojo
23:55 cafe joined #mojo

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