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

IRC log for #mojo, 2015-02-13

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

All times shown according to UTC.

Time Nick Message
00:20 good_news_everyon joined #mojo
00:20 good_news_everyon [mojo] kraih tagged v5.78 at f512e3e: http://git.io/NRkO
00:20 good_news_everyon left #mojo
00:21 good_news_everyon joined #mojo
00:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NRkr
00:21 good_news_everyon mojo/master ad00a3f Sebastian Riedel: bump version
00:21 good_news_everyon left #mojo
00:22 cpan_mojo Mojolicious 5.78 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.78
00:22 noganex joined #mojo
00:22 Adurah joined #mojo
00:22 skittles__ joined #mojo
00:22 D4RK-PH0ENiX joined #mojo
00:22 Grinnz_ :)
00:46 jberger \o/
00:52 Grinnz_ one step closer to never using an mlehmann module, as far as i'm concerned....
00:53 pink_mist oh? how's that?
00:54 Grinnz_ ::Reactor::Poll has basically equivalent performance to EV on linux now, from my testing anyway
00:54 pink_mist oh nice =)
00:54 marmez joined #mojo
00:54 Grinnz_ or at least.. close enough :P
00:57 Grinnz_ i guess it was 16500 rps vs 18k-ish
00:57 sri you'll see a bigger difference at 10k+ connections
00:57 Grinnz_ with epoll, probably yeah
00:57 sri for kqueue/epoll you'll need EV
00:57 Grinnz_ right
00:58 Grinnz_ unless of course, i write Mojo::Reactor::Epoll... muhahaha
00:59 jberger Grinnz_: use your newfound Reactor writing powers and write Mojo::Reactor::UV
01:00 Grinnz_ not sure about that: https://metacpan.org/pod/UV#THERE-IS-SOME-LIMITATIONS-AT-THIS-TIME
01:00 jberger the new FFI::Platypus might even help there
01:00 jberger bind to it yourself
01:00 Grinnz_ hah
01:00 jberger I tried to do one based on FFI::Raw and it was too hard
01:00 Grinnz_ like i want to mess with C...
01:01 jberger http://blogs.perl.org/users/graham_ollis/2015/01/practical-ffi-with-platypus.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+PerlWeekly+%28Perl+Weekly+newsletter%29
01:01 jberger curse you google
01:02 jberger http://blogs.perl.org/users/graham_ollis/2015/01/practical-ffi-with-platypus.html
01:02 Grinnz_ oh, alternative to XS eh
01:02 sri don't forget that UV has the same problem Net::DNS::Native had
01:02 sri so you'll need to work around some stuff
01:03 Grinnz_ don't worry, i have no plans to touch that :P
01:03 jberger sri: might be my next side project, who knows
01:03 jberger Phantom is basically ready to go
01:04 jberger just waiting on Exodist
01:04 Grinnz_ Epoll on the other hand, i think would be doable
01:04 Grinnz_ and you mac users are silly anyways
01:04 * sri wonders why "cover -test" gives him different results every time
01:05 sri Grinnz_: actually, been there, done that
01:05 Grinnz_ oh?
01:09 sri https://github.com/kraih/mojo/commit/ad8d32401a790e60dca46903ee01aafedd2b7dd8
01:09 sri big commit
01:09 sri when you see it you'll laugh though
01:10 sri spoiler https://github.com/kraih/mojo/commit/ad8d32401a790e60dca46903ee01aafedd2b7dd8#diff-e1ff0917cfe96898ca5f0a2e6c267f23L1
01:11 sri lets find a more friendly link
01:11 sri https://github.com/kraih/mojo/blob/a1b937ac0da5f74d131702333fabe8c9ddd3bcf3/lib/Mojo/IOWatcher/Epoll.pm
01:16 sri all this stuff has evolved so much since then
01:18 sri Mojo::IOLoop was a huge mess when it all started :) https://github.com/kraih/mojo/blob/v1.0/lib/Mojo/IOLoop.pm
01:18 sri but there was epoll and kqueue!
01:23 stryx` joined #mojo
01:24 marmez left #mojo
01:24 jberger hahahah, that's quite a module
01:31 Grinnz lol
01:50 zivester joined #mojo
01:56 davido__ joined #mojo
02:00 jberger reneeb: would you mind adding Statocles to your matrix?
02:07 asarch joined #mojo
02:40 cpan_mojo Statocles 0.037 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.037 (depends on Mojolicious)
02:54 klapperl joined #mojo
03:08 noganex_ joined #mojo
03:23 sri have to admit, i'm a little surprised just how fast the new poll reactor is
03:23 Adura joined #mojo
03:28 sri did not see that in the nytprof results
03:32 Adura joined #mojo
03:36 inokenty-w joined #mojo
04:22 Grinnz sri, i believe the timeout value for _poll is supposed to be specified in milliseconds, not seconds like IO::Poll accepts (just stumbled on this trying to figure out epoll)
04:23 Grinnz like IO::Poll->poll, rather
04:24 sri oh shit
04:24 sri $timeout * 1000
04:24 sri there it is
04:31 sri idle cpu usage is through the roof... gonna need another release soon :(
04:32 good_news_everyon joined #mojo
04:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/N0U5
04:32 good_news_everyon mojo/master 18519e3 Sebastian Riedel: fix bug in Mojo::Reactor::Poll that caused excessive idle CPU usage
04:32 good_news_everyon left #mojo
04:35 Grinnz good thing i'm trying this epoll thing lol
04:35 sri i missed it because i only had the memory usage tab open :(
04:36 Oleg joined #mojo
04:36 sri hate that they split that up two os x versions ago
04:36 Grinnz haha
04:36 Grinnz i use htop or gkrellm, even in windows
04:38 Grinnz should Reactor::Poll check for POLLNVAL also? poll(2) says it can send that one as well even if it's not masked
04:38 Grinnz i found it odd because epoll doesn't have an equivalent to that one
04:38 Grinnz it is apparently if the fd is not open on output
04:39 dotandimet joined #mojo
04:43 sri i guess it doesn't hurt
04:44 good_news_everyon joined #mojo
04:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/N0kD
04:44 good_news_everyon mojo/master 8c1ea1e Sebastian Riedel: just check for POLLNVAL too
04:44 good_news_everyon left #mojo
04:44 sri it signals a closed descriptor for example
04:45 sri as in programming error, passing a closed descriptor to poll
04:45 Grinnz ah
04:46 Grinnz i guess epoll doesn't have an equivalent then because the descriptors are passed separately from the poll
04:49 sri friday the 13th... i bet we'll see a few more releases before the day is over ;p
04:50 davido__ joined #mojo
04:50 Grinnz haha
04:53 sri stupid multi-core cpus... hiding bugs like that
04:58 sri nytprof still says Mojo::Reactor::Poll::again is the bottleneck
04:59 sri lots of calls to Mojo::Util::steady_time
04:59 Grinnz hmm
05:01 sri i can see why EV caches the current time
05:01 elik joined #mojo
05:06 sri doesn't increase the performance by a lot though
05:07 sri 12000 rps to 12200 rps
05:31 good_news_everyon joined #mojo
05:31 good_news_everyon [mojo] kraih tagged v5.79 at 1672eb0: http://git.io/N03P
05:31 good_news_everyon left #mojo
05:32 good_news_everyon joined #mojo
05:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/N03b
05:32 good_news_everyon mojo/master f7795ca Sebastian Riedel: bump version
05:32 good_news_everyon left #mojo
05:33 cpan_mojo Mojolicious 5.79 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.79
05:34 dotandimet joined #mojo
05:56 Grinnz well it's working, but the performance isn't quite there
05:56 Grinnz https://github.com/Grinnz/Mojo-Reactor-Epoll/blob/master/lib/Mojo/Reactor/Epoll.pm
05:57 Grinnz code mostly stolen from Mojo::Reactor::Poll and IO::Epoll :P
05:58 dotandimet joined #mojo
06:03 Grinnz haha... i was thinking maybe the epoll_create size arg could be tweaked, but: "Since Linux 2.6.8, the _size_ argument is ignored, but must be greater than zero"
06:03 Grinnz i don't think that's what ignored means, but ok
06:30 melo joined #mojo
06:33 dotandimet joined #mojo
06:39 irq joined #mojo
06:42 Anon021 joined #mojo
06:54 csson joined #mojo
06:55 marmez joined #mojo
06:58 cpan_mojo Mojo-Reactor-Epoll 0.001 by DBOOK - http://metacpan.org/release/DBOOK/Mojo-Reactor-Epoll-0.001
07:11 marcusr good morning.
07:11 purl For you maybe.
07:12 * marcusr stabs purl repeatedly.
07:12 marmez Good morning
07:12 purl Lies!
07:15 * marmez wonders why purl is so 'purl'?
07:19 marcusr marmez: she has been trained by the worst.
07:19 marcusr purl: who's your father?
07:19 purl somebody said my father was oznoid, son of the fifth house of Betazed or me or me
07:20 marmez purl: wow
07:20 purl marmez: i'm not following you...
07:24 stryx` joined #mojo
07:38 fhelmber_ joined #mojo
07:57 eseyman joined #mojo
08:10 trone joined #mojo
08:18 Vandal joined #mojo
08:25 basiliscos joined #mojo
08:28 absolut_todd joined #mojo
08:35 reneeb joined #mojo
08:37 absolut_todd joined #mojo
09:58 nicomen hm padre is really crappy by default
10:15 punter joined #mojo
10:38 reneeb joined #mojo
10:40 jontaylor joined #mojo
11:12 reneeb joined #mojo
11:21 punter joined #mojo
11:24 reneeb jberger: I added Statocles to the matrix. It will be included with the next run (currently the tests for 5.79 are running and already made a pull request for Ado...)
12:09 amon joined #mojo
12:12 marmez left #mojo
12:43 dotandimet joined #mojo
12:55 dotandimet1 joined #mojo
12:56 jberger reneeb: thanks
12:56 jberger preaction ^^
13:04 asarch joined #mojo
13:11 neilhwatson joined #mojo
13:27 blabla joined #mojo
13:28 n2plato joined #mojo
13:56 Ptolemarch joined #mojo
13:57 basiliscos joined #mojo
14:12 marty joined #mojo
14:24 gryphon joined #mojo
14:32 sri hmm
14:32 sri i've seen this warning a few times now
14:32 sri https://travis-ci.org/kraih/mojo/jobs/50592255#L361
14:32 zivester joined #mojo
14:33 sri it's a result of removing "close $handle;"
14:35 Grinnz the variable is a ref but is undef?
14:35 Grinnz i hate global destruction...
14:36 sri fileno seems to return undef
14:36 Grinnz it says it's calling fileno on undef
14:36 sri the method FILENO
14:37 sri not fileno()
14:37 Grinnz ah
14:47 jberger hmmmmm
14:47 good_news_everyon joined #mojo
14:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Nu7B
14:47 good_news_everyon mojo/master 1447311 Sebastian Riedel: handles may already be closed during global destruction
14:47 good_news_everyon left #mojo
14:47 sri i'm not sure if this is the right solution
14:47 sri but this seems to be global destruction only
14:47 Grinnz yeah
14:49 sri odd thing... the close $handle was actually *after* the $reactor->remove($handle)
14:51 sri oh, it does not actually solve the problem
14:53 good_news_everyon joined #mojo
14:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NuFF
14:53 good_news_everyon mojo/master ba87e5e Sebastian Riedel: that did not actually solve the problem
14:53 good_news_everyon left #mojo
14:53 sri i don't get how the close $handle helps there
14:54 jberger and that fix prevents it? weird
14:54 sri what fix?
14:55 jberger oh nm, you were rolling it out
14:56 sri so far only the "close $handle;" we removed for your ->reset fix makes it go away
14:56 jberger that's so odd
14:56 jberger Grinnz: agreed, global destruction sucks
14:56 sri you can trigger the problem with "TEST_TLS=1 prove -l t/mojo/ioloop_tls.t"
14:56 sri randomly
14:56 purl rumour has it randomly is key here
14:56 sri 1 in 10 for me
14:58 Grinnz yeah i'm getting it too
14:58 sri oh wait
14:58 Grinnz actually got it twice on run
14:58 sri the close $handle does not fix it :)
14:58 Grinnz one*
14:58 Grinnz huh
14:58 sri this might be related to the poll reactor
14:58 firnsy joined #mojo
15:00 irq_ joined #mojo
15:02 sri https://metacpan.org/source/SULLR/IO-Socket-SSL-2.012/lib/IO/Socket/SSL.pm#L1964
15:02 sri that package looks very suspicious
15:02 sri with the weaken and stuff
15:03 jberger I haven't gotten it once btw
15:04 jberger then again I'm using blead, from about a month or so ago
15:18 dotandimet joined #mojo
15:21 sh4 joined #mojo
15:32 sh4|2 joined #mojo
15:33 sri jberger: and you're testing with TEST_TLS=1?
15:34 jberger yes
15:36 jberger then again, I'm not getting it on 5.16.3 either :-/
15:36 * sri tests with 5.21.8
15:37 sri got it on 5.21.8 after 23 tries
15:37 sri while true; do TEST_TLS=1 prove -l t/mojo/ioloop_tls.t ; done
15:38 Grinnz_ i was getting it consistently on 5.18.whatever
15:42 jberger got bored waiting on 5.16.3, I'll try on 5.18
15:46 jberger hahaha, got it right away on 5.18
15:46 jberger and seemingly every time
15:46 jberger ok, not every time
15:46 jberger but at least half
15:48 sri now fix it! ;p
15:53 arthas joined #mojo
15:58 * Grinnz_ ruminates on what namespace to put his Mojo::IRC based bot in
16:00 jberger http://pastie.org/9944885
16:00 jberger Grinnz_: I have Toastr, don't take it!
16:00 Grinnz_ jberger: lol that patch
16:00 jberger it works
16:00 Grinnz_ jberger: i already have a *name*, i just want a namespace :P
16:01 Grinnz_ Bot:: is an usual one i guess
16:01 jberger I guess I should run the whole test suite
16:01 sri haha
16:01 sri hide all the errors!
16:01 Grinnz_ lol
16:01 Grinnz_ just run the whole reactor in an eval, it'll be fine
16:05 jberger :-)
16:08 sri pretty sure we could also hide it with a Mojo::IOLoop->reset at the end of the affected tests :)
16:10 sri the problem seems to be that during global destruction something inside IO::Socket::SSL might get destroyed too early
16:11 sri preventing it from calling ->FILENO on an underlying object
16:17 Vertig0 joined #mojo
16:27 sri yea, Mojo::IOLoop->reset makes it go away too
16:29 jberger strange that it is so dependent on perl version
16:30 sri global destruction order changes a lot between perl versions i think
16:31 disputin joined #mojo
16:32 jberger yeah, I seem to recall some work being done around then, now that I think about it
16:32 gryphon joined #mojo
16:33 sri i'm not even sure if this is something we should solve or IO::Socket::SSL
16:38 Oleg joined #mojo
16:40 bwf joined #mojo
16:41 jberger it seems there are several things that might be improved in the cleanup of IO::Socket::SSL
16:41 Grinnz_ indeed
16:45 sh4 joined #mojo
16:47 Vertig0 joined #mojo
17:18 sri btw. re IO::Socket::SSL versions, centos7 only ships IO::Socket::IP 0.21, and we require 0.26 for quite some time
17:19 sri the perl is 5.16.3
17:19 sri so you need to wrangle with modules there anyway
17:19 Grinnz_ yeah, i never would be relying on rhel/centos versions, i mean, they have to install an updated Mojolicious somehow anyway
17:20 Grinnz_ might as well assume they can install a recent IO::Socket::SSL etc
17:21 Grinnz_ there's some kind of error if you try to listen on https without a sufficient IO::Socket::SSL right?
17:21 sri MOJO_NO_TLS=1 mojo daemon -l https://*:8080
17:22 Grinnz_ :)
17:24 dod joined #mojo
17:26 good_news_everyon joined #mojo
17:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Ngm3
17:26 good_news_everyon mojo/master 08bc738 Sebastian Riedel: newer versions are ok too
17:26 good_news_everyon left #mojo
17:49 jonas_ joined #mojo
17:50 jonas_ hey, is it possible to let hypnotoad stay in foreground?
17:50 Oleg yes ;)
17:51 jonas_ and how?
17:51 Oleg RTFM!
17:52 jonas_ some backgrounds: i want to use this https://github.com/ldidry/lutim on my server, but i want it to be started by upstart, only works well with processes staying in the foreground
17:52 Oleg https://metacpan.org/pod/hypnotoad
17:52 jonas_ "carton exec hypnotoad script/lutim" forks it into the background
17:53 jonas_ "carton exec hypnotoad script/lutim -f" should do it, right?
17:53 Oleg right
17:53 good_news_everyon joined #mojo
17:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NgR5
17:53 good_news_everyon mojo/master 0ae7f5c Sebastian Riedel: no need to call the css method twice
17:53 good_news_everyon left #mojo
17:58 jonas_ Oleg: worked, thanks for your help :)
17:59 Oleg thanks to Mojolicious documentation :)
18:08 good_news_everyon joined #mojo
18:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NgVV
18:08 good_news_everyon mojo/master 1e2492a Sebastian Riedel: link to scripts
18:08 good_news_everyon left #mojo
18:20 Oleg Recently my colleague found something interresting about Mojo::UserAgent and SOCKS proxy. If we'll get some page from host1 via SOCKS proxy1, then will change proxy to proxy2 and will get some other (or same) page from same host1 Mojo::UserAgent will get it through proxy1 instead of expected proxy2. As we found this is caused by keep alive connection. Should Mojo::UserAgent detect SOCKS proxy changing in such cases and restart connection? sri, what do you think?
18:29 fhelmber_ joined #mojo
18:41 punter joined #mojo
18:43 dotandimet joined #mojo
18:51 sri Oleg: no, i think it's just fine the way it is
18:53 Oleg And I think this is not expected behavior. We didn't expect it :)
18:53 sri if there's a valid use case, we could have a $ua->reset though
18:53 sri i disagree
18:54 Oleg we made some web scrapping with random proxy changing
18:55 sri ok, bypassing rate limits is a bit meh... as far as use cases go
18:56 Oleg ok
18:57 sri funny thing is, Mojo::UserAgent::reset already exists, just not in the public api https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent.pm#L71-L85
18:57 sri would literally just have to rename that method
18:58 Oleg I think this may be usefull
19:00 sri "may be"
19:43 jberger soooooo, remember me running those fork_call examples yesterday, and finally the last change fixed it
19:44 jberger I left it running in the background, forgot about it
19:44 jberger then when I was trying to figure out where my battery was draining to ... found it :-P
19:44 jberger I'm assuming this is that timeout thing Grinnz_ found?
19:45 Grinnz_ if you were running the poll reactor version 5.78 yeah
19:46 * Grinnz_ checks that he's not running a benchmark server still
19:49 jberger yeah, confirmed, master fixes it, checking out the commit that removed close takes a lot of cpu
19:49 jberger I assumed so
19:50 kaare joined #mojo
19:54 good_news_everyon joined #mojo
19:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/N2uM
19:54 good_news_everyon mojo/master 7ff9053 Sebastian Riedel: updated CREDITS section
19:54 good_news_everyon left #mojo
19:55 sri should have credited the poll reactor fix to Grinnz in the first place, even though he's slacking with pull requests :)
20:03 jontaylor joined #mojo
20:06 jberger ahahahahah: http://www.rexify.org/api/Rex.pm.html
20:11 Grinnz_ hehe
20:28 preaction just converted one of my old, blocking Catalyst apps to non-blocking and Mojolicious. immediately went from 50 users destroying the app to 350 users still mostly getting their data.
20:28 preaction last night's DDoS is now solved, for good... *ominous sting*
20:30 Grinnz_ 50 user DDoS, hahaha
20:31 preaction it was less than that, really.
20:31 preaction just terrible, terrible performance
20:32 Grinnz_ unfortunately converting our app to Mojo does nothing about the blocking problem, since we're still using mysql
20:32 Grinnz_ but fork_call helps with that for some particularly onerous queries
20:32 preaction handlersocket maybe?
20:42 punter joined #mojo
20:51 marmez joined #mojo
20:54 good_news_everyon joined #mojo
20:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Nafo
20:54 good_news_everyon mojo/master b21fd0a Sebastian Riedel: better examples for render method
20:54 good_news_everyon left #mojo
21:42 stephan48 jberger: jfried is looking into the issue
21:53 alnewkirk joined #mojo
22:04 punter joined #mojo
22:11 asarch joined #mojo
22:12 sri so, nobody has a good use case for $ua->reset?
22:15 sri i guess the fact that we already do it on fork automatically kills a lot of very good ones
22:23 n2plato joined #mojo
22:25 sri hmm, i suppose Mojo::Pg should really be activating AutoInactiveDestroy
22:26 Grinnz_ +1
22:26 purl 1
22:26 sri anything else while i'm at it?
22:33 sri the defaults now https://github.com/kraih/mojo-pg/blob/master/lib/Mojo/Pg.pm#L18
22:35 good_news_everyon joined #mojo
22:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Nabs
22:35 good_news_everyon mojo/master 258a84f Sebastian Riedel: fix a few typos
22:35 good_news_everyon left #mojo

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