Camelia, the Perl 6 bug

IRC log for #mojo, 2011-12-31

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

All times shown according to UTC.

Time Nick Message
00:10 sri i'll start by removing the scheme argument from test_server
00:10 sri it's not really necessary anymore
00:10 sri https can be faked easily
00:15 MojoGuest518 joined #mojo
00:15 MojoGuest518 From: http://blog.kraih.com/perl-is-ready-for-html5 (96 hits)
00:15 MojoGuest518 test
00:20 sri hmm
00:21 sri it does require a little hack though
00:22 sri the cookiejar would have to be X-Forwarded-HTTPS aware
00:46 MojoGuest513 joined #mojo
00:46 MojoGuest513 From: http://www.google.co.uk/url?sa=t&rct=j&am​p;q=html5%20irc%20client&source=web&c​d=3&ved=0CDwQFjAC&url=http%3A%2F%2Fde​v.xantus.org%2F&ei=dFv-TvKhA4qV8QPs7LzOAQ​&usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
00:48 bvierra joined #mojo
00:49 mire joined #mojo
00:54 xaka joined #mojo
00:56 MojoGuest568 joined #mojo
00:56 MojoGuest568 From: http://networkedblogs.com/33Knp (38 hits)
01:01 GitHub196 joined #mojo
01:01 GitHub196 [mojo] kraih pushed 1 new commit to master: http://git.io/8sw_yw
01:01 GitHub196 [mojo/master] removed test_server method from Test::Mojo and scheme argument from test_server method in Mojo::UserAgent - Sebastian Riedel
01:01 GitHub196 left #mojo
01:02 sri crab: you might want to take a look at this, considering the scheme argument was added for you
01:07 GitHub86 joined #mojo
01:07 GitHub86 [mojo] kraih pushed 1 new commit to master: http://git.io/opRTUg
01:07 GitHub86 [mojo/master] renamed tls_lite_app.t to session_lite_app.t - Sebastian Riedel
01:07 GitHub86 left #mojo
01:20 sri and user agent is down to 388 lines
01:22 MojoGuest513 cunt
01:22 MojoGuest513 was kicked by sri: Your behavior is not conducive to the desired environment.
01:25 sri OMG
01:25 sri http://i.imgur.com/IIdZu.png
01:25 sri this is pure genius
01:44 tempire what's the service?
01:44 purl please hold, purl's call is being answered in the order it was recieved
01:47 sri no idea
01:50 tempire hmm
01:50 buu Kitten bots
01:50 tempire so if Ev is used transparently, through Mojo::IOWatcher::EV
01:50 buu Are terrifying killing machiens.
01:50 tholen42 joined #mojo
01:51 tempire that means I can call EV::periodic at any time
01:51 tempire and go around ioloop
01:51 sri if EV is available, yes
01:51 sri that's how AnyEvent just works too
01:52 tempire I didn't see a way to fire an event at an absolute time using anyevent
01:55 sri i think there's actually a market for kitten captchas
02:02 tempire https://gist.github.com/1542477
02:02 tempire should that work, to your knowledge?
02:13 tempire I suppose I can do the same thing with Mojo::IOLoop->timer
02:13 tempire I'm guessing it doesn't work because EV::io is blocking somehow
02:13 sri that should work
02:13 tempire it doesn't
02:13 sri just tested, works
02:14 tempire hmm
02:14 tempire works with daemon
02:14 tempire not with morbo
02:20 sri that can happen when EV gets initialized in the parent process
02:21 sri it doesn't survive fork
02:21 sri same with hypnotoad
02:34 bvierra joined #mojo
02:40 amoore joined #mojo
03:12 tholen42 joined #mojo
03:37 Psyche^ joined #mojo
04:40 wheelnotkiss joined #mojo
04:41 wheelnotkiss sri: commit 3a1d0b7 broke my app's tests in a way that seems hard to fix...
04:42 wheelnotkiss one of the controllers returns a redirect to the /login page, and after that change, Mojo::UserAgent tries to connect to https://localhost:random and fails (because it's not listening on https anymore)
04:43 wheelnotkiss I suppose I could set max_redirects(0) and fiddle with the Location header to s/https/http/g or something.
04:53 bvierra joined #mojo
05:19 mire joined #mojo
05:52 Foxcool joined #mojo
05:56 kaare joined #mojo
06:12 Psyche^ joined #mojo
06:57 Psyche^ joined #mojo
07:06 Vandal joined #mojo
07:17 marcus wheelnotkiss: I don't think it was supposed to break that.
07:17 wheelnotkiss that's a relief ;-)
07:18 wheelnotkiss I wasn't sure if I was doing something unsupported.
07:24 marcus wheelnotkiss: hmm, https://github.com/kraih/mojo/commit/3a1d0​b7d6f440a0b4622b45554ddcd91bbe8bbcd#L7L104
07:24 marcus wheelnotkiss: I'll discuss the backwards compat issues with sri when he wakes up.
07:24 wheelnotkiss thx
07:24 wheelnotkiss I'm about to go to sleep myself, I appreciate it.
07:25 * marcus just woke up. :)
07:25 sugar joined #mojo
07:26 wheelnotkiss I left a comment with repro steps on #258; hopefully it's detailed enough.
07:27 marcus wheelnotkiss: thanks
07:27 wheelnotkiss np
07:27 wheelnotkiss g'night!
07:30 marcus nite
08:07 marcus https://gist.github.com/1525217
08:39 tholen42 joined #mojo
09:01 mire joined #mojo
09:16 kaare_ joined #mojo
09:19 kaare__ joined #mojo
09:23 kaare_ joined #mojo
09:41 kaare_ joined #mojo
09:44 Ivan joined #mojo
09:51 abra__ joined #mojo
10:28 d4rkie joined #mojo
11:06 MojoGuest4 joined #mojo
11:06 MojoGuest4 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=1&ved=0CB0QFj​AA&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​juz-TvPtA6PV0QH2pMGcAg&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=jUoxQEkbMYJ5b7ZjGm4Auw (1 hits)
11:18 rhaen hep.
11:22 d4rkie joined #mojo
11:31 MojoGuest83 joined #mojo
11:43 sri hmm
12:08 GitHub70 joined #mojo
12:08 GitHub70 [mojo] kraih pushed 1 new commit to master: http://git.io/4c3ZYQ
12:08 GitHub70 [mojo/master] added scheme argument to test_server again and improved tests - Sebastian Riedel
12:08 GitHub70 left #mojo
12:08 sri https://github.com/kraih/mojo/issues/258 # it will break again unless we find a permanent solution
12:19 kaare joined #mojo
13:03 tholen42 joined #mojo
13:22 marcus sri: understandable, and I know it's experimental, but I thought it was a pretty strong use case.
13:24 sri marcus: agreed
13:26 sri perhaps we really need to just expose the daemon as $ua->daemon
13:27 marcus how will that work when you're not doing unit tests?
13:27 sri what do you mean?
13:28 marcus this is instead of _server ?
13:28 inokenty http://www.phoboslab.org/ztype/      Love this game
13:28 sri yes, kinda
13:28 marcus sri: just asking because I don't see the consequences, not saying it's wrong.
13:28 sri i'm not sure it's right :)
13:29 sri there are problems, like blocking -> non-blocking -> blocking request switching automatically killing and restarting the test daemon
13:30 sri it's really complicated
13:32 marcus doesn't really feel right for the ua to have a server. more like it belongs in test::mojo
13:33 sri wouldn't work for non-blocking tests
13:34 hshong joined #mojo
13:34 sri https://github.com/kraih/mojo/blo​b/master/t/mojo/websocket.t#L155
13:34 sri these tests only work because the app is associated with the ua, and the ua automatically starts a test server for relative urls
13:39 sri Mojo::UserAgent->app and Mojo::UserAgent->test_server are the api for this
13:40 sri it's a consequence of the blocking/non-blocking hybrid design
13:41 marcus i see
13:50 marcus it needs to happen in ua so they can share ioloop?
14:19 sri marcus: yes, and only ua knows which ioloop to use
14:19 sri that's how we can emulate blocking while running server and client in the same process
14:20 marcus sri: why can't test::mojo set up a ioloop and make both the daemon and the ua use it?
14:20 sri because ua switches ioloop
14:20 marcus oh
14:20 sri blocking and non-blocking use different ones
14:21 sri blocking = $ua->ioloop, non-blocking = Mojo::IOLoop->singleton
14:21 marcus i see.
14:22 marcus let's start forking instead? :D
14:22 marcus (not serious suggestion)
14:22 * sri sets marcus on fire
14:22 * marcus burns while watching doctorow speak at 28c3
14:23 sri don't get me wrong, what we have works perfectly and doesn't need to be rewritten, i'm just looking for a cleaner api
14:24 marcus I understood
14:24 marcus I still think it's a bit icky for the ua to need to deal with all this server stuff.
14:25 sri do it better
14:33 tholen42 joined #mojo
14:37 sri you're also exaggregating a bit, "all this server stuff" is 10 lines of code
14:37 marcus :)
14:39 sri it's the concepts that are hard, and i very much doubt those could get any easier as long as we have a blocking/non-blocking hybrid design
14:40 marcus sri: I agree, but I think it's better to keep it the way it is than to expose it as daemon.
14:41 sri marcus: i'm ok with that, your minion brought the topic up ;p
14:42 marcus sri: yeah, he's doing a request recorder and wants to record https
14:42 marcus so being able to fudge the test server more is probably his ulterior motive
14:48 marcus sri: maybe you can suggest ways to accomplish these things in a cleaner fashion - https://gist.github.com/1544187
14:48 marcus sri: for one, he wants to disable connect for https so that he can store the request in the proxy.
14:55 sri marcus: doesn't make much sense to me
14:56 sri if he doesn't want sane http why not just fall back to plain sockets?
14:56 sri actually, i have no idea why he would disable connect
14:57 marcus sri: because with connect he can't store the response?
14:57 sri why?
14:57 marcus sri: since it's piping it directly through the proxy to the user agent?
14:57 marcus rather than terminating it in the proxy.
14:58 sri you just have to intercept the connection
14:58 sri you have to do that anyway
14:58 marcus it's encrypted tho.
14:58 marcus sri: the way this works now, the proxy will do a normal GET https://....
14:58 marcus and then return the response as normal http to the proxy client
14:59 sri why would he mess with the client?
15:00 marcus sri: to make it stop using connect for https?
15:01 sri that sounds like a proxy server
15:01 sri but why?
15:01 marcus uhm
15:01 marcus feels like we're going in circles
15:02 marcus sri: how would it work if the client is doing connect?
15:02 sri i told him yesterday that he can steal the handle server side and manipulate it any way he likes
15:02 sri to build a real tls intercepting proxy
15:03 marcus that sunds like a better solution than breaking http.
15:05 sri basically you let the daemon answer the connect request with a 200 ok, steal the handle afterwards, upgrade to tls yourself and do whatever you want with the followup requests
15:05 sri in fact, i wouldn't be surprised if you could put the handle back into the stream after handling the tls upgrade yourself and have the daemon just work again
15:07 sri total hack job, but you're intercepting https after all
15:07 marcus sri: you'd have to turn off certificate validation in the client tho, right?
15:07 sri right
15:07 tholen42 joined #mojo
15:09 sri i think streams currently just do nothing when you steal the handle, so readding the upgraded one might just work when you do pause/resume right
15:10 sri all experimental and unsupported though
15:10 marcus no worse than what we're doing now :)
15:11 sri marcus: maybe i should ask, what is the actual purpose of that experiment?
15:12 marcus sri: tests for a payment process, which goes via a redirect to an external payment provider.
15:12 sri hmm
15:12 marcus sri: so we want to store the requests in the proxy to get predictable and offline-working tests.
15:13 sri have you considered hacking up the user agent?
15:13 marcus sri: well, we kinda are? :)
15:13 sri i mean, we have dozens of events that can be used for stuff like that
15:14 sri we have experimental support for cloning request objects
15:14 marcus isn't it cleaner to do it as a proxy tho?
15:14 sri https://github.com/kraih/mojo/blo​b/master/t/mojo/user_agent.t#L196
15:14 sri that test is a basic recorder for request/response
15:15 sri marcus: i don't know, just pointing out that there are many ways
15:15 marcus sri: I'm adding your comments to the discussion for the branch pull request
15:15 tholen42 joined #mojo
15:15 marcus judofyr is probably celebrating new years, will pick it up with him again on monday or so
15:15 sri but, if all you're after is replaying http messages, maybe you shouldn't go too high level
15:16 sri you could for example just observe and record raw bytes that go over the wire and exploit our request/response parsers to tell you where messages end
15:19 marcus think TLS has replay protection to prevent that from working well?
15:19 sri nono, you would still be intercepting
15:19 tholen42 joined #mojo
15:20 noganex joined #mojo
15:21 sri i can think of at least 5 ways to implement this, but i'm afraid i don't really understand what the problem exactly is
15:35 marcus sri: thanks for the input.
15:55 Vandal joined #mojo
15:56 tester8707 joined #mojo
15:57 tester118 joined #mojo
16:44 Andrei666 joined #mojo
16:48 xaka joined #mojo
17:25 sri marcus: sure
17:26 * marcus has started on the beer =)
17:26 * sri too
17:26 marcus this one is not great tho
17:26 * sri sticks with the traditional Beck's
17:26 marcus self fermented danish beer
17:26 marcus very sour
17:27 sri :S
17:27 marcus http://www.ratebeer.com/beer/​mikkeller-spontanale/124867/
17:28 marcus http://www.klwines.com/detail.asp?sku=1053633 was pretty good tho (previous)
17:34 Vandal I'm in 2012!!
17:35 tempire Vandal: is it safe?
17:35 purl Owwwww!!!!
17:35 Vandal there is no armageddon
17:35 tempire wait for it...
17:36 marcus I AM DISSAPOINT
17:36 Vandal :)
17:59 memowe Vandal: do you have still weather?
18:02 Vandal memowe, what do you mean?
18:06 d4rkie joined #mojo
18:13 sugar joined #mojo
18:25 stephan48 Vandal: is it stormy over at your place or rather not so stormy, windless, no rain etc
18:26 Vandal no, why?
18:27 Vandal it just was blackout for about hour
18:28 Vandal but the powers of lights defeats powers of dirkness
18:40 sri THE POWERS OF BEEER
18:40 sri marcus: am i crazy for wanting to rename test_server to app_server?
18:46 marcus sri: I'll send for the stretchers.
18:46 marcus not sure, it might make sense. use cases outside of testing?
18:47 sri marcus: perl -Mojo -E'a("/" => {data => "happy new year! *hic*"})' get /
18:47 sri that uses it too
18:48 sri basically everything that makes user agent nteract with apps
18:53 sri $ua->server seems a bit random
18:57 sri or we hide the server concept
18:58 sri and call it something like $ua->app_url
18:58 sri $ua->url_for_app('https')
18:59 sri $ua->local_server('https')
19:01 sri hate typing code on the iphone...
19:03 marcus thinking.
19:03 purl hmmm... thinking is see `made of meat`
19:09 marcus app_url ?
19:09 marcus shorter to type on the iphone :)
19:14 marcus sri: Considered changing Mojolicious to a regular release schedule?
19:24 tempire darknet - and BEYOND! http://www.bbc.co.uk/news/technology-16367042
20:01 sri marcus: app_url kinda doesn't bring the point across that the argument actually changes server state
20:01 tholen42 joined #mojo
20:01 sri what would be the advantage of a regular release schedule?
20:02 * sri ate way too much…
20:17 marcus sri predictability in deprecations?
20:17 marcus sri, I'm working on something.
20:17 marcus please take a look and see if you think it's useful.
20:19 tholen42 joined #mojo
20:19 sri looks nice
20:19 marcus cool
20:19 sri number of releases has gone done drastically recently though, i expect it to go down further next year
20:19 sri i'm running out of things to fix :)
20:20 marcus I think this is a good thing :)
20:20 marcus but I seem to remember you saying the same thing after 1.0 ;-)
20:21 marcus lots of goodies added since then tho
20:21 mire joined #mojo
20:21 sri this time i'm serious though ;p
20:21 sri besides the few design quirks you know about, i'm out of plans
20:22 sri websockets will prolly evolve further, but that will happen over a longer period
20:26 sri hmm, the more i think about app_url the more i actually like it
20:38 sri question is if $ua->app_url('https'); makes sense
20:56 marcus https_app_url ?
20:58 sri there's $ua->app_url, $ua->app_url('http') and $ua->app_url('https')
20:58 sri with argument it's a protocol switch
20:58 marcus could ('http')  be the default?
20:58 sri it is
20:59 sri but switching back and forth is common for tests
21:00 marcus but couldn't they always switch if it's on the other?
21:01 sri that's bad too, you might want to use it just to get a url object for testing basic auth
21:01 * marcus is up to 2.15 in Changes
21:02 sri http://mojolicio.us/perldoc/Test/Mojo#ua
21:02 sri there's actually an example
21:03 marcus sri: why did the profile helper go away?
21:04 sri some recursion problems
21:06 sri no feedback and i didn't care enough to fix it, so it went away
21:36 bvierra joined #mojo
21:37 tholen42 joined #mojo
21:41 bvierra_ joined #mojo
23:28 sri happy new year
23:30 Quai happy new year :)
23:31 Quai (only true geeks spends new years eve on IRC...)
23:33 jwang joined #mojo
23:36 tholen42 joined #mojo
23:40 marcus +1
23:40 purl 1
23:41 tholen42 joined #mojo
23:42 Quai finally 2012, and no more end-of-year-bugs-introduced-by-stupid-people for almost a year! :D
23:45 tholen42 joined #mojo
23:46 GitHub148 joined #mojo
23:46 GitHub148 [mojo] kraih pushed 1 new commit to master: http://git.io/PSyT0w
23:46 GitHub148 [mojo/master] renamed test_server method in Mojo::UserAgent to app_url - Sebastian Riedel
23:46 GitHub148 left #mojo
23:46 sri first commit of the year :D
23:46 sri because i'm that geeky!
23:51 tholen42 joined #mojo

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