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

IRC log for #mojo, 2015-12-20

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

All times shown according to UTC.

Time Nick Message
01:00 jontaylor joined #mojo
01:06 sri hmm, the websocket working group is actually getting closed
01:06 sri that leaves websockets+http/2 in an awkward spot
01:38 jberger is that meant to force them to consider it?
02:02 jontaylor joined #mojo
02:29 sri don't think it's supposed to mean anything
03:15 voldemortensen joined #mojo
03:25 noganex joined #mojo
03:35 damaya joined #mojo
04:04 damaya joined #mojo
04:05 kaare joined #mojo
04:10 jontaylor joined #mojo
04:13 damaya joined #mojo
04:21 damaya joined #mojo
04:37 voldemortensen1 joined #mojo
04:43 voldemortensen joined #mojo
04:52 buu joined #mojo
04:55 buu So if you have two templates with the same base name but different handler extensions which one gets automatically selected for a method is nearly random?
04:56 buu Why not use the default handler to decide between them?
04:57 buu Ok it's the first one in alphabetical order
04:57 buu But still
05:39 damaya joined #mojo
05:58 damaya joined #mojo
06:05 inokenty joined #mojo
06:14 jontaylor joined #mojo
06:16 damaya joined #mojo
06:49 damaya joined #mojo
07:05 damaya joined #mojo
07:19 damaya joined #mojo
08:11 Vandal joined #mojo
08:18 melo joined #mojo
08:38 damaya joined #mojo
09:01 meshl joined #mojo
09:16 jontaylor joined #mojo
10:17 jontaylor joined #mojo
10:58 meshl joined #mojo
11:18 jontaylor joined #mojo
11:22 tyldis joined #mojo
12:19 jontaylor joined #mojo
12:28 sh4 joined #mojo
13:19 jontaylor joined #mojo
13:33 sugar joined #mojo
14:20 jontaylor joined #mojo
14:27 asarch joined #mojo
15:01 dabudabu joined #mojo
15:21 jontaylor joined #mojo
16:22 jontaylor joined #mojo
16:22 asarch Is there any standard protocol to ask to any server: "Hey, are you REST?"?
16:24 bpmedley asarch : I've never seen a methodology to query a server for their endpoints.  Is that what you're asking?
16:26 asarch Yeah
16:32 sri asarch: you might want to get the restful web services cookbook
16:33 asarch That would be great
16:34 sri http://shop.oreilly.com/product/9780596801694.do
16:34 sri it's pretty good
16:35 asarch Thank you
16:35 asarch Thank you very much sri :-)
16:37 jberger bpmedley: there are ways to do that with link headers etc
16:38 jberger its not tremendously standardized
16:38 bpmedley I see
16:40 sri also OPTIONS
16:41 jberger I thought that and then totally forgot to say it :-P
16:42 jberger bpmedley: I'm pretty sure I mentioned it to you once before though
16:42 jberger (not that that helps now)
16:43 bpmedley Perhaps I should say I've never used a methodology to query endpoints on a popular public api.. :)
16:43 sri convention is to document them properly
16:44 sri then again... https://api.github.com/
17:11 thowe joined #mojo
17:21 trone joined #mojo
17:22 jontaylor joined #mojo
18:20 ladnaV joined #mojo
18:23 jontaylor joined #mojo
18:51 irqq joined #mojo
18:56 sue joined #mojo
19:11 y1mmm joined #mojo
19:21 meshl joined #mojo
19:35 cpan_mojo Mojolicious-Plugin-RenderFile-0.10 by KOORCHIK https://metacpan.org/release/KOORCHIK/Mojolicious-Plugin-RenderFile-0.10
19:52 y1mmm joined #mojo
19:55 jberger and it begins, the search for p6 libraries
19:55 jberger https://www.reddit.com/r/perl/comments/3xjzfq/perl_6_and_qt5/
19:57 sri in the perl reddit...
19:57 Grinnz seems like another example of not understanding that perl 6 is not a new version of perl
20:00 PryMar56 joined #mojo
20:02 jberger I wonder what could give people that impression?
20:03 jberger perhaps this is interesting to someone, a plack handler for mojo's daemon https://gist.github.com/jberger/39be1ed802de4c5c4aad
20:11 jberger very minimal obviously
20:13 sri jberger: i don't like stuff like that, people always use it for terrible benchmarks
20:21 jberger I was more just curious to see if it could be done and how easily
20:36 sri argh
20:36 sri the description of the reddit states "The Perl Programming Language, including both Perl 5 and Perl 6."
20:42 jberger sure, like everything else, p6 gets all its own stuff, but it gets p5's stuff too
20:47 sue joined #mojo
20:51 disputin joined #mojo
21:09 dvinciguerra joined #mojo
21:25 sugar_ joined #mojo
21:25 jontaylor joined #mojo
21:28 sri jberger: any progress on the refactoring?
21:47 disputin joined #mojo
21:47 disputin joined #mojo
21:47 disputin joined #mojo
21:50 sugar__ joined #mojo
22:00 good_news_everyon joined #mojo
22:00 good_news_everyon [mojo] jberger created channel_jberger_4 (+1 new commit): http://git.io/vEkSk
22:00 good_news_everyon mojo/channel_jberger_4 1adc855 Joel Berger: port to Channel object for UserAgent...
22:00 good_news_everyon left #mojo
22:01 sri oh, did it take so long because of the backported stuff? :(
22:03 jberger not really, I was sick all last week basically
22:03 sri ah
22:03 * sri has a cold right now
22:03 jberger which I blame on spending all my free time on the shower the week before
22:03 jberger I still am not 100%
22:04 jberger call it 95%
22:04 jberger now I'm just trying to see if I got all the attribute stuff merged
22:04 jberger then I'll move to the events again
22:05 jberger I really need a three way compare
22:06 nnutter joined #mojo
22:07 sri bit ugly how MOJO_USERAGENT_DEBUG is now used by two classes
22:07 jberger I don't want that to be true forever
22:08 sri ok
22:08 jberger not sure what we will do about it though
22:08 jberger but I want to come up with something
22:08 jberger I guess each channel can have its own, but ... that's kinda annoying too
22:09 sri have its own?
22:09 jberger MOJO_CHANNEL_HTTP_CLIENT_DEBUG=1
22:09 sri eww
22:09 jberger yeah
22:09 jberger but that's a battle for later
22:10 jberger no point in dealing with it now if this doesn't work
22:10 jberger and that's what has me copying it verbatim
22:10 jberger :P
22:10 sri sure
22:10 sri just noticed it thinking about the implications of moving io code to the channel
22:11 * sri still tends to wards separating the io from the channel
22:11 sri s/ //
22:12 sri that's actually a big reason nghttp2 is so popular, it separates the io from protocol handling
22:14 sri you give it chunks of data, it gives you chunks of data, and emits events in between when something happens
22:17 jberger so you'd say stop here and don't move _read and _write to the channel?
22:17 sri yea
22:17 jberger ok
22:17 jberger I think I got the rest of channel_jberger_3 -> 4 then
22:18 sri or do you see this working out?
22:18 jberger I don't have a clear vision from this point
22:18 jberger I was trying it to see how I liked ti
22:18 jberger it
22:18 jberger my original goal was just to turn that hash into a class
22:19 jberger it mostly became the loop refactor
22:19 jberger that I'm very happy with
22:19 sri i'm not sure actually
22:19 jberger hash -> class or loop refactor?
22:19 sri thinking of http2, you can't really have MOJO_USERAGENT_DEBUG working with that
22:19 sri since it's just compressed binary soup
22:20 sri MOJO_CHANNEL_HTTP_CLIENT_DEBUG=1 might have to happen
22:21 sri we already have MOJO_WEBSOCKET_DEBUG
22:21 jberger I'm confused, what was "i'm not sure actually" targeted at?
22:21 sri which shows deserialized frames
22:21 sri jberger: where io should go
22:21 jberger oh, nice, I don't think I've ever used it
22:21 jberger WEBSOCKET_DEBUG
22:22 jberger usually, chrome's websocket frame view has been sufficient, but that only works if I'm using chome (ie if using a browser)
22:23 sri i guess for http2 we can also just have a MOJO_HTTP2_DEBUG, which shows deserialized http2 frames in a lower level protocol module
22:23 sri anyway, is it hard to keep the io stuff in Mojo::UserAgent?
22:24 jberger well, perhaps I should try your original thought of moving tx->client_read/write to the Channel class
22:24 jberger I think that's the same idea seen from two angles
22:24 jberger I'll give that a go
22:24 sri \o/
22:26 jberger k I'm going to greatly simplify the Channel class and then force push that to _4 branch
22:26 jberger I can always refer to _3 if I need to
22:28 good_news_everyon joined #mojo
22:28 good_news_everyon [mojo] jberger force-pushed channel_jberger_4 from 1adc855 to 498634a: http://git.io/vEkxa
22:28 good_news_everyon mojo/channel_jberger_4 498634a Joel Berger: port to Channel object for UserAgent...
22:28 good_news_everyon left #mojo
22:33 good_news_everyon joined #mojo
22:33 good_news_everyon [mojo] jberger force-pushed channel_jberger_4 from 498634a to d9f92f1: http://git.io/vEkxa
22:33 good_news_everyon mojo/channel_jberger_4 d9f92f1 Joel Berger: port to Channel object for UserAgent...
22:33 good_news_everyon left #mojo
22:54 jberger sri: so a couple things here: http://pastie.org/10644217
22:55 jberger I have to do $tx->{state} = 'finished'; which violates encapsulation
22:55 jberger and I have it emitting "unexpected" from the tx
23:00 sri you need a public method clearly
23:00 sri too bad $tx->finish is already taken
23:03 sri $tx->close might be the closest
23:07 sri shouldn't the state move to the channel anyway?
23:07 sri then the encapsulation violation isn't too bad for now
23:08 jberger it might I suppose
23:08 jberger I'm trying to do this piecemeal, that might get harder at this point
23:08 jberger but I really want to keep the tests passing
23:13 jberger similar encapsulation problems moving Mojo::Transaction::WebSocket::client_read to Mojo::Channel::WebSocket::read
23:13 jberger and yes that method is shared between Client and Server classes
23:16 sri i think that's fine for now, the state should move later
23:17 disputin joined #mojo
23:19 jberger do you think all channels will have an ioloop and a tx?
23:19 jberger I'm starting to fill out the inheritance tree now with the WebSocket Channel classes
23:20 jberger meaning, will there be a similar tx for http/2?
23:21 jberger I'd have to guess yes the way things are breaking out now (that or there would be even bigger refactoring in the UA)
23:24 sri an http/2 channel will have multiple transactions
23:25 good_news_everyon joined #mojo
23:25 good_news_everyon [mojo] jberger pushed 1 new commit to channel_jberger_4: http://git.io/vEImM
23:25 good_news_everyon mojo/channel_jberger_4 d9b36c6 Joel Berger: move client_read methods to respective channel classes
23:25 good_news_everyon left #mojo
23:25 jberger the {cb} is going to take some real thought :s
23:31 jberger I think I might end up with some kind of start method on HTTP::Client
23:31 flamey joined #mojo
23:31 jberger Mojo::Channel::HTTP::Client::start($tx, $cb);
23:32 sri oh wait
23:32 sri i was wrong about multiple transactions
23:32 sri that's only the case on the server side
23:33 sri on the client side you'll always pass a transaction to the channel
23:33 sri jberger: hmm, ->start($tx, $cb) actually fits the theme
23:33 sri if we think of channels as individual connections, and the user agent as a pool of channels
23:34 flamey hi guys! how do I stop app started with Hypnotoad after re-logon?
23:34 flamey say, I started a Mojolicious-Light app with hypnotoad: hypnotoad ./stript.pl   ... then logged out --> logged back in, and what to stop it now. if I do "hypnotoad -s ./stript.pl" I get "Hypnotoad server not running." and app is still available
23:35 sri flamey: that should just work
23:36 bpmedley flamey : What do you mean by re-logon?
23:37 sri he means the shell session
23:37 flamey let start off with that I'm new to Linux :( running  Digitalocean's cloud instance..
23:37 flamey yes
23:38 flamey shell accesss
23:38 flamey thnx
23:38 bpmedley flamey : So you, ssh in "hypnotoad ./script.pl" and then "exit" and "ssh back in?
23:39 flamey I connect with terminal, provide my creds.. cd into app folder and "hypnotoad ./script.pl". then I ran "logout" -- that closed my ssh session
23:40 flamey then I came back the same way
23:40 jberger flamey: hypnotoad "daemonizes" meaning it is no longer attached to the terminal session
23:40 bpmedley flamey : Is there sill a "hypnotoad.pid" in the directory?
23:40 flamey yes
23:41 flamey how can I stop my app?
23:41 flamey correctly )
23:41 bpmedley And you're in the directory with "hypnotoad.pid" ?
23:41 flamey yes
23:43 jberger when you look over ps -A do you see the server processes?
23:43 sri first of all, is the mojolicious version the latest?
23:43 sri hypnotoad didn't report a lot of errors in the past
23:45 flamey ps -A .. I don't see hypnotoad, but I do see 5 instances of what I guess is my app (in format: 3598 ?        00:00:08 /home/flamey/pc)
23:45 sri hahahahahahaha https://twitter.com/meneer/status/678289680111153152
23:46 flamey instMojolicious (6.35, Clinking Beer Mugs)
23:46 jberger sri: nice
23:47 bpmedley flamey : What version of Mojolicious are you on?
23:47 jberger flamey: kill those processes and remove the pid file
23:48 jberger then confirm for us that the server is actually down
23:48 jberger (my guess is that the server you think you have isn't the one you actually have)
23:49 bpmedley flamey : You might also be able to verify that jberger  said by checking the PWD of the pid in /proc.
23:49 jberger sri: then what about say redirects, should I allow start to not have a callback and have that steal the cb, or else I could have a restart method
23:50 jberger not an emergency issue
23:50 sri flamey: hypnotoad workers die without a manager
23:50 jberger just something to think about
23:52 sri jberger: isn't it more like ->attach/->detach?
23:52 sri or even ->start/->stop
23:52 jberger and detach returns a callback?
23:53 sri my $cb = $channel->stop?
23:53 jberger yeah
23:53 flamey "(my guess is that the server you think you have isn't the one you actually have)" -- not sure what you mean
23:53 jberger that could work
23:53 flamey I killed the processes
23:53 flamey app is not available
23:53 sri flamey: you're using hypnotoad wrong somehow
23:54 flamey I guess so, what would be the correct way tp do it?
23:54 bpmedley flamey : Would you consider starting the app and then stopping without logging out?
23:54 sri flamey: i'm literally using hypnotoad on a server like you say you do right now
23:54 flamey I'm gonna reboot the instance to start off clean
23:55 flamey bpmedley, I did that before -- it stops correctly
23:56 bpmedley Hrmm.  Will you do an "$ env | sort > before" and an "$ env | sort > after" to compare your environment before logging out and after logging back in?
23:57 flamey should I run the app, or just do this?
23:57 bpmedley Sorry, a) run app, b) run env sort, c) logout, d) login, e) run env sort after, f) compare the files
23:58 flamey I don't know how important this it, but I run under a user, not under root
23:58 flamey ok

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