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

IRC log for #mojo, 2016-08-10

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

All times shown according to UTC.

Time Nick Message
01:03 vicash purl: who are you
01:03 purl I am a (modified) flooterbuck infobot, and my owner is perigrin.  Download source at http://flooterbuck.sourceforge.net/ or edenc's bitch or espertinho or bugado or stupid. or the mongodb of irc bots or Nuclear Biological Chemical or a big metal dummy. or he mongodb of irc bots or a big fat liar
01:04 vicash purl: { error: null }
01:04 purl vicash: sorry...
01:05 Grinnz "the mongodb of irc bots" is still hilarious
01:06 vicash purl: eval "exit;"
01:06 purl vicash: excuse me?
01:06 vicash purl: purl: purl: eval "exit"
01:06 purl vicash: excuse me?
01:08 vicash i am purl
01:08 vicash i am purl:
01:08 Grinnz vicash, surely there's a better venue for this :P
01:08 vicash haha yea i am stopping
01:18 Zx3 joined #mojo
02:16 mcsnolte joined #mojo
02:16 Janos joined #mojo
02:24 noganex_ joined #mojo
02:45 zivester joined #mojo
03:02 sugar joined #mojo
03:05 ivi joined #mojo
03:10 ivi joined #mojo
03:25 ivi joined #mojo
04:42 zivester joined #mojo
04:53 che-quest joined #mojo
05:46 inokenty-w joined #mojo
07:21 batman doc: not sure if you're awake, but... my strategy for converting cgi scripts is that i mount each cgi script into the mojo application and then i convert small parts of the cgi script and at the same time make nicer urls + redirects.
07:22 mishanti1 joined #mojo
07:22 batman i never convert half of a resource. i don't think that's possible. at least not with M::P::CGI. even if it was possible, it gets very messy imo
07:23 stephan48 service information: doc left already
07:24 batman oh. thanks.
07:24 * batman takes a note of a bug in the version of convos
07:32 Vandal joined #mojo
08:13 osfabibisi joined #mojo
08:41 ksmadsen joined #mojo
08:57 Atog digging into the ioloop delay helper, loving it so far!
08:57 Atog props for all the neat docs around it!
09:18 orev joined #mojo
09:22 sri Phil21/jberger: any news on the server?
09:32 dolmen joined #mojo
09:42 dolmen Mojolicious 7.01 (probably other versions before) does not properly install on perl 5.10.1 because of an issue in Time::Local since release 1.2100
09:42 dolmen https://rt.cpan.org/Ticket/Display.html?id=116825
09:42 dolmen I've already sent a patch to the Time::Local maintainer
10:09 jkramer joined #mojo
10:09 jkramer Ahoy!
10:12 jkramer It appears that when I have a request with render_later and some async stuff with Mojo::IOLoop->delay, hypnotoad kills the worker before the request is finished when the worker reaches the "accepts" limit
10:12 jkramer Is there some way to prevent this from happening?
10:12 sugar joined #mojo
10:13 ladnaV joined #mojo
10:20 sri jkramer: you can increase the timeout, or cancel your async operation when the finish event in Mojo::IOLoop gets emitted
10:20 sri dolmen: ouch, i guess that might be a good reason to bump the requirement to 5.12
10:26 sri anyone interested in this? https://github.com/kraih/mojo-pg/issues/26
10:36 batman sri: i think i would like to know _why_ first
10:36 CHYC If my use-case counts for anything, subclassing Mojo::Pg::Results would help me immensely in altering Mojo::Pg::Results#expand
10:37 sri that's the use case, adding methods to the db and results classes
10:37 sri same as Mojolicious::controller_class
10:37 sri so there is precedent
10:38 batman right.
10:39 batman guess it wouldn't be too bad have $pg->{database_class} = sprintf "%s::Database", ref $pg: ?
10:42 sri wat?
10:42 purl Watt?  Watt?  I can't hear you, there's this buzzing noise where my brain should be. or https://www.destroyallsoftware.com/talks/wat
10:42 * sri pokes purl
10:42 * purl hits sri onna nose widda stick.
10:48 sri anyway, it seems we have multiple users for the feature
10:48 sri so adding the attributes might make sense
10:59 tchaves joined #mojo
11:13 jkramer sri: Which timeout do you mean? inactivity_timeout is already set to 3600.
11:14 jkramer Setting heartbeat_{interval,timeout} both to 60 seems to help, but I'm not sure if this is just random and will fail later
11:15 sri http://mojolicious.org/perldoc/Mojo/Server/Hypnotoad#graceful_timeout
11:16 jkramer Ah
11:17 jkramer Thanks, so I'll just set this to the same value as inactivity_timeout I guess
11:18 tchaves joined #mojo
11:20 tchaves joined #mojo
11:53 sri added it for now https://github.com/kraih/mojo-pg/commit/ed9125e1f8f431c0adc0a0ad984f1525fc5f8b4a
11:54 CHYC sri: Thank you :)
12:26 gizmomathboy joined #mojo
12:29 sri hmm, Mojo::Pg::PubSub has pretty big issues actually
12:30 perlpilot joined #mojo
12:38 sri hopefully fixed now https://github.com/kraih/mojo-pg/commit/74d26c4d6160717caa0c2f39332ac892bbf779ca
12:43 kid51 joined #mojo
12:44 sri yay, looks like the latest IO::Socket::SSL release broke mojolicious
12:48 sri looks like i'm out of open source time, someone else will have to take care of that
12:48 sri https://travis-ci.org/kraih/mojo/jobs/151199821
12:49 zivester joined #mojo
12:50 neilhwatson joined #mojo
12:51 cpan_mojo Mojo-Pg-2.29 by SRI https://metacpan.org/release/SRI/Mojo-Pg-2.29
12:55 meshl joined #mojo
13:11 kaare joined #mojo
13:12 kaare joined #mojo
13:32 kaare joined #mojo
13:37 AirDisa joined #mojo
13:42 jacoby joined #mojo
13:44 jkramer left #mojo
13:56 Atog joined #mojo
13:56 cpan_mojo Mojo-Weixin-1.1.7 by SJDY https://metacpan.org/release/SJDY/Mojo-Weixin-1.1.7
13:56 cpan_mojo Mojo-Webqq-1.8.4 by SJDY https://metacpan.org/release/SJDY/Mojo-Webqq-1.8.4
14:24 Phil21 sri: everything assigned and hardware largely setup, we are just waiting on us getting our new prod "stuff" up around it, but can accelerate
14:24 Phil21 basically we are pushing for our first "prod" release of what jberger/preaction have been working on, and this server will sit behind that
14:24 Phil21 I could manually provision now though :)
14:25 itaipu joined #mojo
14:27 kid51 joined #mojo
14:30 sugar joined #mojo
14:52 zivester joined #mojo
15:04 Bean joined #mojo
15:04 Bean_ joined #mojo
15:04 kes joined #mojo
15:06 lluad joined #mojo
15:06 mcsnolte joined #mojo
15:11 disputin joined #mojo
15:13 Adura joined #mojo
15:24 jberger sri: it looks like the new IO::Socket::SSL changes how global ssl defaults are handled
15:24 jberger I think the fix to the test (and the one documentation snippet that is like it) is relatively easy
15:24 jberger and yet it makes me wonder if we should offer some handling for passing in one of these "ssl contexts
15:24 jberger "
15:35 blonewolfs joined #mojo
15:44 Bean__ joined #mojo
15:47 asarch joined #mojo
15:56 Bean joined #mojo
16:12 disputin joined #mojo
17:05 kaare joined #mojo
17:16 cpan_mojo Mojolicious-Plugin-AssetPack-1.19 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.19
17:20 brian_ joined #mojo
17:22 kaare joined #mojo
17:23 Bean_ joined #mojo
17:30 mattp_ joined #mojo
17:51 cuechan joined #mojo
18:54 Bean_ I'm trying to send myself some JSON data via post request. That's working fine, but I access it with $self->tx->req->content->controller->{content}
18:55 Bean_ that seems wrong to me
18:56 jberger Bean_: the usual way is $self->req->json
18:56 jberger (where $self is the controller)
18:57 Bean_ right. I thought so. I guess I'm doing something wrong somewhere else.
18:58 blonewolfs joined #mojo
19:08 disputin joined #mojo
19:13 t4nk913 joined #mojo
19:15 t4nk913 Mojolicious seems to retry a route until something is rendered. Is this because of development mode? Is there a way to stop this and report an error?
19:16 jberger t4nk913: I'm not sure what you mean
19:18 cpan_mojo Mojolicious-Plugin-OpenAPI-0.12 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-OpenAPI-0.12
19:18 t4nk913 I'm not sure either. I'm using morbo to run my mojo app. When I GET a route that has a handler that forgets to render any content, either morbo or mojo re-runs the handler.
19:20 jberger without any rendered content it should just wait for a delayed render (meaning a later response from a non-blocking action)
19:21 jberger are you sure your client isn't making multiple requests?
19:22 t4nk913 Yep, the request log has one, very long running request.
19:22 jberger so why do you think the code is run multple times?
19:23 t4nk913 In case there's any confusion my route is: $r-get('/test')->to('action#test')
19:24 t4nk913 Test is defined as sub test { say STDERR 'called'; }, and in my console, after making one request I see multiple "called"
19:24 jberger are you using a reverse proxy?
19:24 t4nk913 No, I'm connecting directly to morbo
19:26 jberger can you make a minimal example that demonstrates?
19:29 batman jberger: did you see https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Pipe::Vuejs ?
19:29 t4nk913 I'll try
19:32 jberger batman: no I haven't
19:32 jberger interesting
19:32 batman jberger: it's super experimental (since it's a hack), but i hope it works
19:32 batman works for convos
19:42 Bean_ figured it out. I was sending it data: {doge : 'wow'} which is not valid. Changing it to data: '{"doge" : "wow"}' worked
19:51 jberger Bean_: ah yeah, it has to be valid json :-P
19:52 batman Bean_: maybe you want $c->render(json => {doge => "wow"}) ?
19:53 mgrimes_ joined #mojo
19:55 asarch joined #mojo
20:00 Bean_ I want $self->req->json so that I can assign it to a hash variable to use with SQL::Abstract. Working perfectly now
20:02 blonewolfs joined #mojo
20:03 batman Bean_: cool!
20:29 t4nk913 jberger: Looks like it's chrome's fault as you suspected. It's silently retrying the request when it doesn't get any response from the server.
20:29 jberger yeah, I've seen a surprising amount of that
20:29 jberger generally, it is always best to be sure you return content :-P
20:29 jberger well, a response of some kind
20:31 t4nk913 Is there any way to prevent this? Like sending headers only? I forgot the render, and spent half an hour trying to hunt down a double delete bug (not my API)
20:31 t4nk913 I don't want to get caught by this again
20:33 jberger I don't really think so
20:34 jberger if you are rendering synchronously then you are already in the same place that you would have to set some setting
20:34 jberger if you are rendering asynchronously then there is no good place to check
20:37 Grinnz_ for GET requests it's perfectly reasonable for browsers to retry as much as necessary. this is why you make sure not to make anything that modifies state a GET
20:38 lluad Or, at least, that only modifies it once on multiple GETs.
20:39 Grinnz_ POST should never be retried by a browser unless explicitly requested (this is why you get the popup when refreshing a POSTed page)
20:40 Grinnz_ PUT and DELETE technically should be repeatable with no ill consequences, but in practice I don't think browsers do this
20:41 Grinnz_ well, it's usually javascript and not the browser doing that sort of request, too
20:41 genio http://restcookbook.com/HTTP%20Methods/idempotency/  has some information on which you can "trust"
20:44 t4nk913 Grinnz_: POSTs will be retried too
20:44 Grinnz_ only in the case of bugs
20:44 Grinnz_ e.g. apache's reverse proxy
20:45 Grinnz_ no correct implementation will retry a POST without user approval
20:50 tyldis joined #mojo
20:57 tyldis joined #mojo
21:28 Kripton joined #mojo
22:02 Kripton joined #mojo
22:02 sugar joined #mojo
22:10 disputin joined #mojo
22:51 sugar joined #mojo
23:35 disputin joined #mojo
23:39 sugar joined #mojo

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