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

IRC log for #mojo, 2016-01-13

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

All times shown according to UTC.

Time Nick Message
00:00 melo joined #mojo
00:06 berov1 left #mojo
00:43 melo1 joined #mojo
01:00 jontaylor joined #mojo
01:03 ribasushi joined #mojo
01:05 kaare joined #mojo
01:05 disputin joined #mojo
01:08 jacoby_ joined #mojo
01:15 rwp joined #mojo
01:25 marty joined #mojo
01:45 melo joined #mojo
02:01 melo1 joined #mojo
02:09 melo joined #mojo
02:11 melo2 joined #mojo
02:19 melo joined #mojo
02:46 jacoby__ joined #mojo
03:03 melo joined #mojo
03:10 geheimnis` joined #mojo
03:15 _dave_ joined #mojo
03:42 jacoby_ joined #mojo
03:54 noganex_ joined #mojo
04:08 Adura joined #mojo
04:25 c--_ joined #mojo
04:27 lsm joined #mojo
05:32 ZoffixWin joined #mojo
06:20 melo1 joined #mojo
06:27 kes joined #mojo
06:29 melo joined #mojo
06:46 sue joined #mojo
06:58 melo1 joined #mojo
07:11 dod joined #mojo
07:17 dod joined #mojo
07:20 melo joined #mojo
07:21 melo2 joined #mojo
07:25 inokenty-w joined #mojo
07:43 melo joined #mojo
07:46 melo1 joined #mojo
07:54 melo joined #mojo
08:03 jontaylor joined #mojo
08:04 Vandal joined #mojo
08:08 melo1 joined #mojo
08:19 trone_ joined #mojo
08:20 osfabibisi joined #mojo
08:21 melo joined #mojo
08:21 AndrewIsh joined #mojo
08:26 melo1 joined #mojo
08:28 cpan_mojo App-mojopaste-0.16 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/App-mojopaste-0.16
08:37 melo joined #mojo
08:42 melo1 joined #mojo
08:47 melo joined #mojo
09:07 punter joined #mojo
09:15 melo1 joined #mojo
09:26 melo joined #mojo
09:33 melo1 joined #mojo
09:37 melo2 joined #mojo
10:18 melo joined #mojo
10:20 melo1 joined #mojo
10:23 cpan_mojo Minion-Backend-mysql-0.05 by BPMEDLEY https://metacpan.org/release/BPMEDLEY/Minion-Backend-mysql-0.05
10:24 bpmedley Woohoo.. we now have Minion 4.0 support in Minion::Backend::mysql
10:37 berov joined #mojo
10:37 berov joined #mojo
10:45 melo joined #mojo
10:47 melo1 joined #mojo
10:52 punter joined #mojo
10:55 melo joined #mojo
10:59 melo1 joined #mojo
11:02 melo joined #mojo
11:05 melo2 joined #mojo
11:06 batman bpmedley++
11:06 * batman need to have a look at Mojo::mysql
11:07 batman jberger++ # making issue
11:10 neilhwatson joined #mojo
11:11 trone_ joined #mojo
11:21 kaare joined #mojo
12:01 asarch joined #mojo
12:54 ajr_ joined #mojo
13:11 jberger bpmedley++
13:19 osfabibisi joined #mojo
13:43 dabudabu joined #mojo
14:08 stephan48 batman: will look at the repo for App::mojopaste later
14:17 osfabibisi joined #mojo
14:25 jacoby joined #mojo
14:27 jnbek joined #mojo
14:31 bc547_ joined #mojo
14:33 batman stephan48: cool :)
14:45 marty joined #mojo
14:57 dod joined #mojo
15:11 bpmedley_ joined #mojo
15:29 sue joined #mojo
15:33 vanHoesel joined #mojo
15:39 cpan_mojo Swagger2-0.68 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Swagger2-0.68
15:55 bpmedley_ batman++ #  We love swagger2
15:56 batman bpmedley_: thank you!
15:57 lluad joined #mojo
16:16 mspo finally, Axis for REST
16:17 mspo ;)
16:26 sri yesterday i linked to a free http2 ebook, this one is also pretty good http://daniel.haxx.se/http2/
16:27 sri from the curl guy
16:42 Kogurr joined #mojo
16:44 melo joined #mojo
16:44 melo1 joined #mojo
16:46 jberger "Get Wireshark 2.0 to dissect HTTP/2 frames."
16:47 jberger I wonder if we can peek at their output formatting and copy it in our DEBUG output
16:47 jberger or draw inspiration from
16:47 sri think we'll do something like MOJO_WEBSOCKET_DEBUG=1
16:52 mspo sri: I read the curl one this morning
16:52 mspo also part of the google guy one
16:53 mspo http://nghttp2.org/ is the defacto lib right now, it seems
16:58 sri you can get the impression, but i don't think it's the most deployed one
16:59 disputin joined #mojo
17:00 sri twitter uses the netty implementation, google the one shipping with Go, and i think the nginx one is used a lot too already
17:00 sri and of course microsoft has their own too
17:01 mspo yeah I suppose so
17:01 mspo the nghttp2 is the apache module base, anyway :)
17:02 mspo but I think nginx is probably ahead of the game
17:02 mspo I actually have an app that would be a good fit for http2 but fastly doesn't support it
17:03 sri for now most will prolly just use nginx reverse proxies to add http/2 support to apps
17:04 mspo cowboy still doesn't have it
17:05 sri i expect more interest in native mojolicious support in maybe 2 years, when people start wanting to scrape http/2 sites, and use it to optimize backend services
17:06 mspo sri: did you see this? https://medium.com/@kansi/erlang-otp-architectures-cowboy-7e5e011a7c4f#.rpu07tv8k
17:06 sri for now i'm happy we know how to add support if we have to
17:07 mspo since you seemed to be studying other web servers/frameworks (phoenix + cowboy, at least)
17:07 sri mspo: yes, doesn't help us much, since it's so erlang specific
17:11 sri the one thing that interests me atm is connection management
17:11 sri what kind of abstractions the different servers implementations use
17:12 sri s/s//
17:14 sri think everything else is solved, and merely grunt work now
17:30 vanHoesel joined #mojo
17:31 vicash hello. does the 'number_field' TagHelper accept floating point values ? How would the min,max work then ? Or is that something that needs to be internally managed in the controller.
17:34 ajr_ joined #mojo
17:44 sri see the html5 spec
17:48 marty_ joined #mojo
17:48 good_news_everyon joined #mojo
17:48 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/08616b4b66f4de810a3e726c4dff503c3f7501ff
17:48 good_news_everyon mojo/master 08616b4 Sebastian Riedel: mention the HTML Living Standard
17:48 good_news_everyon left #mojo
17:49 marty joined #mojo
18:02 sue joined #mojo
18:13 sue joined #mojo
18:14 fkafka joined #mojo
18:14 good_news_everyon joined #mojo
18:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/a9bbba40ae8e0663ca19bc65f898d9b03dbbdeea
18:14 good_news_everyon mojo/master a9bbba4 Sebastian Riedel: fix a few typos
18:14 good_news_everyon left #mojo
18:14 fkafka How come this does not work? $ua->websocket('ws://localhost:3000/server' => json => { msg => 'Hello World'});
18:15 fkafka I receive the connection, but I don't see the msg.
18:15 Grinnz_ that's not how to setup a websocket connection... https://metacpan.org/pod/Mojolicious::Guides::Cookbook#WebSocket-web-service
18:17 fkafka I have the websocket server set up, similar to the example you linked, now I'm just trying to send it data, but I don't see an example for a client using Mojo::UserAgent
18:17 fkafka Every example I've seen uses Javascript.
18:17 fkafka I'm trying to send data from one server to another using websocket, no browser.
18:18 sri so, how do you send a json body with the javascript api?
18:18 fkafka If that is mindblowingly stupid, let me know :D
18:18 Grinnz_ oh, from a useragent
18:18 Grinnz_ https://metacpan.org/pod/Mojolicious::Guides::Cookbook#WebSockets
18:18 fkafka @sri: Using ws.send?
18:18 Grinnz_ if you are doing it during a request, you'll also want to put that in a delay
18:19 Grinnz_ ... or maybe not, idunno
18:19 Grinnz_ ive never done a websocket client "in" anything else
18:19 sri fkafka: where have you seen that?
18:19 fkafka ok, I think I need the delay, I was doing it like in the example you linked and I had a sleep at the end, but it was going like crazy when mojo_useragent_debug was set to 1, because non-blocking.
18:20 Grinnz_ i dont think a delay makes sense because a websocket doesn't "render"
18:20 fkafka sri: In the example here, https://metacpan.org/pod/Mojolicious::Guides::Cookbook#WebSocket-web-service, the Javascript part under // Outgoing messages.
18:21 fkafka I see, it does a ws.onopen, opening a websocket connection, then ws.send
18:21 sri ah, ok, you're just misunderstanding the whole thing
18:21 fkafka lol, I figured as much
18:21 sri i thought you meant there was something missing from the api
18:21 fkafka no, no, just trying to understand it
18:21 sri like sending a message body with the handshake
18:22 fkafka I assume that you open a websocket and you're constantly sending information to the server with useragent, what I'm trying to do is compile some information into a JSON object then send every 30 seconds.
18:23 fkafka I had done it using non-blocking, like in the example, but it was ignoring the sleep and sending constantly (though nothing ever made it to the other end, it only saw the connection).
18:25 sri http://mojolicious.org/perldoc/Mojo/UserAgent#SYNOPSIS
18:25 ajr_ joined #mojo
18:27 sue joined #mojo
18:27 marty joined #mojo
18:32 PryMar56 joined #mojo
18:35 sue_ joined #mojo
18:41 fkafka ahaha
18:41 fkafka ok, it was as simple as moving sleep from inside the ws callback to after it.
19:29 jberger fkafka: you don't actually mean "sleep" right?
19:38 cpan_mojo Test-Mojo-Role-SubmitForm-1.001008 by ZOFFIX https://metacpan.org/release/ZOFFIX/Test-Mojo-Role-SubmitForm-1.001008
20:04 lestrrat joined #mojo
20:07 good_news_everyon joined #mojo
20:07 good_news_everyon [mojo] kraih tagged v6.40 at 80449a1: https://github.com/kraih/mojo/commits/v6.40
20:07 good_news_everyon left #mojo
20:08 good_news_everyon joined #mojo
20:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/1ca8da021113612b3e5b7494be1ac23809eb79fa
20:08 good_news_everyon mojo/master 1ca8da0 Sebastian Riedel: bump version
20:08 good_news_everyon left #mojo
20:08 sri i bet some stuff depending on finish event timing will break ;p
20:34 melo joined #mojo
20:38 cpan_mojo App-mojopaste-0.17 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/App-mojopaste-0.17
21:14 punter joined #mojo
21:25 sri jberger: i've run out of things to clean up again
21:27 melo joined #mojo
21:28 mspo perfect software is so rare ;)
21:36 vicash hello, how do I make a stash persist across a single 302 redirect ?
21:36 punter mspo: perfect like mojolicious!
21:37 preaction vicash: i think that's what the flash is for
21:38 vicash preaction: ok. i will try that too. my problem is that i am stashing some data and redirecting to some route. but before going to that route, another route is being called to check if the user is logged in. during this the stashed data disappears
21:39 preaction why does checking if the user is logged in require a 302 redirect?
21:39 preaction are you saying flash won't solve your problem?
21:39 vicash preaction: let me try flash first quickly
21:40 vicash preaction: you're right. i should use flash instead of stash. thanks.
21:40 orev1 I think the route itself should be checking for a session, not redirecting to another route to check for that ?
21:41 orev session checking should be done in an under instead?
21:42 vicash orev: that's exactly what i am doing. using under() for checking session as given in the Mojo examples
21:42 orev oh, so the under is causing the redirect to the login page?
21:43 melo joined #mojo
21:43 orev sounds like you need session data, not stash data.
21:44 vicash yea
21:44 orev so don't use stash, use session
21:45 orev stash is only for the current request.  flash is for the next request, session is for everything else
21:45 vicash got it!
21:46 vicash thanks. that is succinct
21:50 orev vicash: http://mojocasts.com/e4 go to 1:30
21:51 orev be aware that session data is stored in a browser cookie that is readable by the user.  if you have a lot of data, you probably want a database backend
21:53 sri login is the topic of the growing guide http://mojolicious.org/perldoc/Mojolicious/Guides/Growing
21:54 vicash yes, understood. i am using session to store the login info and using flash for passing data between requests.
22:03 mgrimes joined #mojo
22:31 sue joined #mojo
23:10 punter joined #mojo
23:59 bpmedley joined #mojo

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