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

IRC log for #mojo, 2015-02-11

| 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 pushed 1 new commit to master: http://git.io/NL9W
00:20 good_news_everyon mojo/master b542059 Sebastian Riedel: expires needs to be an attribute
00:20 good_news_everyon left #mojo
00:21 sri expires was a bit of an odd case, documented as an attribute everywhere, but implemented with a weird method that upgrades to a Mojo::Date object
00:22 sri leftover code from the early days i suppose
00:23 sri $cookie->expires(Mojo::Date->new(time + 60)) is no longer documented, but still works... although i doubt anyone does that
00:25 Ptolemarch joined #mojo
00:27 Adura joined #mojo
00:27 sri (not that it was tested... documentation and tests were very very far apart on expires)
00:29 sri jberger: 8770 lines btw. :)
00:30 absolut_todd joined #mojo
00:32 pink_mist ... why would they name it mojomojo when it's based on catalyst? 0_o
00:32 sri to be fair, mojomojo came before mojolicious
00:32 pink_mist oh
00:32 sri and marcusr made it ;p
00:33 pink_mist well then he should port it :P
00:33 sri indeed he should
00:33 Grinnz_ then it would have to be renamed to MojoMojoMojo
00:33 * sri shakes marcusr
00:45 jberger yo dawg
00:51 good_news_everyon joined #mojo
00:51 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NLA4
00:51 good_news_everyon mojo/master 8180023 Sebastian Riedel: remove a few useless imports
00:51 good_news_everyon left #mojo
00:53 Grinnz_ parenthageddon
01:00 sri Mojo::Message::Request::proxy is a bit odd too
01:01 sri you can do $tx->req->proxy(0), $tx->req->proxy('socks://...') and $tx->req->proxy(Mojo::URL->new(...))
01:05 sri 0 is special in that it disables proxy use, undef enables detection, and other values get upgraded to a Mojo::URL object
01:42 n2plato kmx around?
02:08 ignacio_ joined #mojo
02:23 good_news_everyon joined #mojo
02:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NtnJ
02:23 good_news_everyon mojo/master 83f55e0 Sebastian Riedel: mention that leftover data is consumed
02:23 good_news_everyon left #mojo
02:28 * tempire sets up pgbouncer
02:35 damaya joined #mojo
02:35 stryx` joined #mojo
02:35 damaya Hi guys, how do you capacity test mojo?
02:35 damaya Any tools you use?
02:36 damaya Actually, I'd be testing hypnotoad I guess
02:38 preaction i use siege
02:39 damaya Ah, siege
02:39 damaya awesome
02:39 damaya Is there a sample mojo app that'd be good to test against?
02:39 preaction why not test against yours?
02:39 damaya Mine is not done yet, so I'm just curious to see how these servers perform.
02:39 preaction that sounds like a terrible benchmark
02:39 damaya Yeah, I guess I can test against what I have actually. It does make sense.
02:40 damaya preaction: how so?
02:40 damaya preaction: you mean testing with a random app vs. what's actually going to run there?
02:40 preaction testing against a "sample" app sounds pointless
02:40 damaya preaction: yeah, actually, I agree with you.
02:40 damaya preaction: thanks for pointing me to siege :D
02:41 damaya sorry for putting your name in my messages constantly, habit
02:41 damaya haha
02:52 sri damn... so many sites use non-standard expires values in cookies now :O
02:53 sri just saw this on twitter.com... Fri, 10-Feb-2017 02:53:08 UTC
02:53 preaction wow
02:54 good_news_everyon joined #mojo
02:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Nt8h
02:54 good_news_everyon mojo/master 0ea6b5d Sebastian Riedel: be a little more liberal with expires values
02:54 good_news_everyon left #mojo
02:57 klapperl joined #mojo
03:04 sri argh
03:04 sri even on google.com i find non-standard dates
03:04 sri Tue, 27 Apr 1971 19:44:06 EST
03:11 noganex_ joined #mojo
03:11 preaction i found this as the most recent cookie rfc: http://tools.ietf.org/html/rfc6265#section-5.1.1 -- looks like as long as the day of the month comes before the year (if the year is two digits), it's "valid"
03:13 sri yea
03:13 sri http://tools.ietf.org/html/rfc6265#section-4.1.1
03:14 sri you're supposed to generate a 2616 date though
03:15 preaction yeah. not that 2616 is much better... ISO8601 forever!
03:16 preaction and an 8601 datetime wouldn't be valid in Expires: because it uses a number for the month... lame...
03:20 good_news_everyon joined #mojo
03:20 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NtzT
03:20 good_news_everyon mojo/master 1502135 Sebastian Riedel: test a few more special cases
03:20 good_news_everyon left #mojo
03:26 asarch joined #mojo
03:35 good_news_everyon joined #mojo
03:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Nt21
03:35 good_news_everyon mojo/master 45226f6 Sebastian Riedel: handle a few more special cases
03:35 good_news_everyon left #mojo
03:45 good_news_everyon joined #mojo
03:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NtVl
03:45 good_news_everyon mojo/master 5547dff Sebastian Riedel: expires is a valid cookie name
03:45 good_news_everyon left #mojo
03:51 hshong joined #mojo
03:52 good_news_everyon joined #mojo
03:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NtwB
03:52 good_news_everyon mojo/master 5805894 Sebastian Riedel: be even more liberal
03:52 good_news_everyon left #mojo
03:55 tempire IT IS DONE.
03:55 * tempire NEVER HAS TO QUERY MONGODB AGAIN
04:01 preaction hooray!
04:11 inokenty-w joined #mojo
04:12 * Grinnz wishes he could say the same about mysql
04:33 good_news_everyon joined #mojo
04:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NtMt
04:33 good_news_everyon mojo/master eb223af Sebastian Riedel: more whitespace
04:33 good_news_everyon left #mojo
04:35 Grinnz yay parsing things people do on the internet
04:41 sri the rules in the rfc are pretty hardcore http://tools.ietf.org/html/rfc6265#section-5.1
04:41 Grinnz because other date standards arent cool i guess?
04:42 sri if we were following those rules strictly Mojo::Util::split_cookie_header would be impossible
04:42 sri since you can't tokenize the string before parsing
04:45 Grinnz_ joined #mojo
04:46 sri of course a *correct* implementatio would be a slow 200 line spaghetti monster
04:59 Grinnz lol
05:14 sri urllib tries to tokenize too https://github.com/python/cpython/blob/master/Lib/http/cookiejar.py#L452
05:14 sri some interesting code in there
05:14 sri but i think what we have qualifies as "good enough"
05:17 Grinnz joined #mojo
05:19 jberger talk went well, people were impresseeed
05:19 jberger talk went well, people were impressed
05:19 jberger wtf, crappy hotel Wi-Fi
05:19 jberger drinks were had, sleep is needed
05:30 Grinnz joined #mojo
05:52 dotandimet joined #mojo
06:31 cpan_mojo Statocles 0.036 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.036 (depends on Mojolicious)
06:38 melo joined #mojo
06:49 basiliscos joined #mojo
06:49 dotandimet1 joined #mojo
06:58 punter joined #mojo
07:17 dotandimet joined #mojo
07:37 Vandal joined #mojo
07:40 kaare_ joined #mojo
07:53 dotandimet joined #mojo
07:54 reneeb joined #mojo
08:04 hotsnow joined #mojo
08:08 marmez joined #mojo
08:13 eseyman joined #mojo
08:24 reneeb joined #mojo
08:28 trone joined #mojo
08:46 kwa joined #mojo
08:48 aleksey joined #mojo
09:02 Grinnz_ joined #mojo
09:20 ovnimancer joined #mojo
09:53 fhelmber_ joined #mojo
10:17 amon joined #mojo
10:25 dp_ joined #mojo
10:41 absolut_todd joined #mojo
10:46 melo joined #mojo
11:16 niczero joined #mojo
11:17 niczero Mojo::IOLoop->next_tick(sub ..) doesn't run the sub on the next tick, but rather on the next fork
11:18 niczero What explanation might help me remember that?
11:19 niczero nope
11:19 niczero Reading the cookbook and Mojo::IOLoop, I can't squeeze both explanations into my head
11:20 niczero Is the cookbook definitely correct about next_tick, or am I reading it wrongly?
11:20 niczero s/or/and/
11:20 odc niczero, the IOLoop never forks
11:21 niczero yep
11:22 niczero I'm looking for an explanation why the IOLoop doesn't run the sub on the next tick
11:22 niczero I think the fork thing is when you attach a sub to tick 0
11:22 niczero so there's probably some v small explanation that joins this stuff up in my head
11:22 odc hmm, maybe because your program does not let it run the next tick
11:22 niczero "your program" does not exist
11:22 niczero we're discussing online docs
11:23 odc ah
11:24 niczero I think the likely explanations are (a) the cookbook is wrong, or (b) there's an implicit 0 somewhere, or (DDDDD) I'm misunderstanding
11:25 niczero oh hang on, there's a simple explanation
11:25 niczero the statement about using next_tick for forking only applies if you attach the sub _before_ you start (each instance of) the app
11:26 odc niczero, of which cookbook are you talking about?
11:26 niczero so it's all clear and simple
11:27 niczero and there's a plugin avail if you want a sub to attach to the next fork
11:40 niczero To translate the cookbook's Lite example to full app, do you use ->timer(0 => ..  in startup?
11:47 triamazikamno joined #mojo
12:45 neilhwatson joined #mojo
12:48 asarch joined #mojo
12:58 niczero At last I get a project where I can play with timers; fun fun fun
13:10 kaare__ joined #mojo
13:12 jontaylor joined #mojo
13:15 sri niczero: you're misunderstanding something
13:16 punter joined #mojo
13:20 fhelmber_ joined #mojo
13:26 good_news_everyon joined #mojo
13:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NmQs
13:26 good_news_everyon mojo/master e307506 Sebastian Riedel: better explanation for using next_tick with preforking
13:26 good_news_everyon left #mojo
13:33 dotan joined #mojo
13:33 niczero ahh
13:33 marty joined #mojo
13:34 niczero so next_tick works even in startup cos the ioloop hasn't yet start
13:34 niczero thanks
13:36 marty_ joined #mojo
13:45 niczero while building up an app, IOLoop->recurring used to give back an id like 0 or 9 or 96
13:45 niczero but now it gives back a long string in hex
13:45 niczero it doesn't seem to be a problem, I'm just curious what that signifies
13:45 muraiki_ joined #mojo
13:46 niczero (the only consequence so far is just changing a debug sprintf from %u to %s)
13:49 sri it's an arbitrary id that can change again
13:50 niczero When I was getting short ids that looked decimal, was that just cos they were extremely short hex just happening to have no digits above 9?
13:53 sri i think we used a refaddr at the time
13:53 sri and there were collisions
13:53 sri must have been a loooooong time ago though
13:54 niczero k
13:58 sri hmm, python supports http dates without weekday https://github.com/python/cpython/blob/master/Lib/http/cookiejar.py#L235-L240
13:58 sri has anyone ever seen those in the real world?
14:04 hotsnow joined #mojo
14:05 Lee is it possible to set a flash value in Test::Mojo, much like you would a session value?
14:09 sri flash value is just a session value
14:09 Lee that's what i though, but setting it in the session doesn't work
14:09 * Lee digs a bit deeper
14:12 Lee ah, redirects. Oauth2: "i heard you like redirects..."
14:42 melo joined #mojo
14:53 oetiker batman a question about Mojo::SNMP does it serialize the requests sent to the same host, or do they get thrown at it in 'parallel' ?
14:59 PotatoGim^Home joined #mojo
15:11 n2plato joined #mojo
15:17 irq joined #mojo
15:30 mishantil Is there a way when running tests with Test::Mojo to check if the app has set a certain session value?
15:31 mishantil Specifically I need to make a request and check if the server has set eg. foo = 'bar' in the session.
15:31 Grinnz https://metacpan.org/pod/Test::Mojo::Session
15:31 Grinnz perhaps
15:32 Grinnz i would rather a method that allows retrieving the session data itself too, but thats something
15:32 genio $t->app->sessions...
15:33 Grinnz aha
15:33 Grinnz you do have the app ref
15:35 mishantil Grinnz: Ah. That looks awesome. Thanks. :)
15:38 sh4 joined #mojo
15:40 elik joined #mojo
15:45 Ptolemarch joined #mojo
15:58 ilbot2 joined #mojo
15:58 Topic for #mojo is now 🐯 hear me roar | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
15:58 bc547 joined #mojo
16:02 Bender joined #mojo
16:03 enty oh, there they come
16:03 enty netsplit-mania I guess
16:08 mst eh?
16:08 enty well, I sent my messages, then disconnected and now I saw them coming in
16:10 mst internets slightly flappy today, no actual split
16:13 n2plato joined #mojo
16:15 diegok ente: sure you can redir
16:15 muraiki_ joined #mojo
16:16 jberger $t->app->sessions is the object that does the handling, not the data itself
16:16 jberger remember that the data is stored in a client-side cookie
16:16 ente *nod*
16:18 Grinnz_ ente: you can do anything you want in an under that you would do in a normal action, just as long as you return false if you don't want more actions to be run
16:18 cpan_mojo Mojolicious-Plugin-OAuth2-Server 0.07 by Lee Johnson - http://metacpan.org/release/LEEJO/Mojolicious-Plugin-OAuth2-Server-0.07
16:19 Oleg joined #mojo
16:20 Vandal joined #mojo
16:32 ente I see
16:33 ente Grinnz_: true for "go on", false for "don't run any more actions" and undef for "defer"?
16:34 dod joined #mojo
16:36 Grinnz_ ente: undef is false in this case
16:36 Grinnz_ deferring is just continuing a previously stopped action
16:36 Grinnz_ continuing from*
16:36 Vandal joined #mojo
16:36 ente hm, I see
16:40 ente so the $c->continue is essential in that case?
16:40 ente do I need to continue before I actually perform any actions, or the other way around?
16:44 Grinnz_ the $c->continue needs to be run for it to start looking at the next actions again
16:44 Grinnz_ https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Routing.pod#Under
16:47 sri Grinnz_: Test::Mojo::Session is implemented wrong though, and will prolly break a lot
16:48 sri we actually expose the serializer/deserializer http://mojolicio.us/perldoc/Mojolicious/Sessions#serialize
16:48 sri so a proper implementation is not that hard
16:48 Grinnz_ yeah, i was thinking you could just use the object to deserialize the cookie
16:49 marmez joined #mojo
16:58 jberger or just inject a route into your app that closes over the session data
16:59 jberger my $session; $t->app->routes->any('/TESTING/get_session' => sub { $session = shift->session });
17:00 jberger probably need a little more than that, but you get the point
17:03 Ptolemarch joined #mojo
17:10 ignacio_ joined #mojo
17:13 triamazikamno1 joined #mojo
17:36 dod joined #mojo
17:43 triamazikamno joined #mojo
17:44 sri Grinnz_: is there a good reason you want to test what's actually in the session cookie?
17:44 Grinnz_ sri: was mishantil not me
17:44 sri oh
17:45 sri then this doesn't mean what i thought it meant http://irclog.perlgeek.de/mojo/2015-02-11#i_10098357
17:47 Grinnz_ sri: i was just saying, because in my tests i geenrally need to retrieve the JSON data from $t->tx->res directly, if i was testing session data i'd probably want the option to do the same
17:48 Grinnz_ which that module didnt provide
17:51 Adura joined #mojo
17:51 sri ah
18:03 stephan48 would render_later be allowed in a bridge/under?
18:04 stephan48 f.e when theres a async process going on in an under?
18:04 Grinnz_ stephan48: https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Routing.pod#Under
18:04 Grinnz_ the third example there we were just discussing, is probably a better way
18:04 stephan48 perfect thanks
18:06 dotandimet joined #mojo
18:08 good_news_everyon joined #mojo
18:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/N3Ry
18:08 good_news_everyon mojo/master bc479b5 Sebastian Riedel: more whitespace
18:08 good_news_everyon left #mojo
18:12 good_news_everyon joined #mojo
18:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/N3Eb
18:12 good_news_everyon mojo/master b235e2c Sebastian Riedel: test split_cookie_header with additional whitespace as well
18:12 good_news_everyon left #mojo
18:13 sri annoying case that complicates tokenizing cookies :S
18:18 dotandimet joined #mojo
19:01 skiehn joined #mojo
19:02 hernan604 joined #mojo
19:05 skiehn left #mojo
19:13 ovnimancer joined #mojo
19:40 btyler joined #mojo
19:46 disputin joined #mojo
19:52 Grinnz sri, have you come across this? https://rt.cpan.org/Public/Bug/Display.html?id=93107
19:56 sri Grinnz: yes
19:59 Grinnz i see they just discussed it in #perl
19:59 Grinnz does that affect mojo running with tls?
20:04 melo joined #mojo
20:07 dotandimet joined #mojo
20:11 ente why do e
20:11 ente aehgh
20:12 sri Grinnz: nope
20:13 sri we remove the handle before upgrade, and readd it afterwards
20:13 sri if you were to use $reactor->io(...) yourself, you could still stumble over it though
20:16 marty joined #mojo
20:16 tracers joined #mojo
20:17 tracers hello everyone...I have run into a mojo issue and can't seem to find a solution
20:18 good_news_everyon joined #mojo
20:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Ns6b
20:18 good_news_everyon mojo/master 577d17c Sebastian Riedel: better description for respond_to
20:18 good_news_everyon left #mojo
20:19 tracers I have an encoded url string that I am sending to the webserver and sometimes it has a front slash  (%2F) encoded and that seems to break the call
20:19 tracers is there something I can do to escape that?
20:19 dotandimet joined #mojo
20:19 hasan joined #mojo
20:19 hasan hi all
20:20 hasan I set a secret password with $self->secrets(['SOME string HERE!11!1']); but my app still says the passphrase needs to be changed.
20:20 hasan am I missing something?
20:21 dotandimet1 joined #mojo
20:22 hasan well now it works.
20:22 hasan I didn't change anything.
20:26 Grinnz_ sri: hmm ok, i don't suppose there's anything i can do to prevent POE::Loop::Mojo_IOLoop from potentially having this issue since it's too low level
20:26 sri right
20:27 sri i might accept a patch to port Mojo::Reactor::Poll to IO::Poll::_poll()
20:27 sri depending on how ugly the code ends up
20:27 sri it could be very simple or very hard
20:29 sri we currently use it only for https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor.pm#L19
20:30 Grinnz_ hmm
20:30 Grinnz_ what is _poll exactly? a direct poll() syscall?
20:33 sri https://metacpan.org/source/GBARR/IO-1.25/IO.xs#L239
20:34 sri https://metacpan.org/source/GBARR/IO-1.25/lib/IO/Poll.pm#L86
20:34 sri used like that by IO::Poll
20:34 Grinnz_ ah
20:34 Grinnz_ there are definitely not enough vowels in that function
20:35 sri we have the mask in Mojo::Reactor::Poll::watch(), just need to store that instead of pushing it all into IO::Poll
20:35 sri and then handle everything else in the main loop
20:35 sri (it could be easy)
20:36 sri @poll seems to be just a list of $fd => $mask pairs
20:37 sri and i suspect _poll() changes the $mask value to the result
20:37 sri so you just check that for the constants we are interested in
20:43 hasan sri: I guess Mojo::Pg isn't experimental and highly dangerous anymore?
20:44 sri hasan: it is stable now
20:45 hasan ok cool.
20:45 hasan I will check it out now.
20:47 kaare joined #mojo
20:52 sri Grinnz_: are you working on it?
20:52 Grinnz_ sri: not at the moment, i might but this C code is a bit gibberish
20:52 sri allright, then i'll try an idea
20:53 hasan sri: for example. concurrent inserts: what is the right way (or the difference between): query each insert with a new db handler or use IOLoop?
20:53 hasan because the modules docs suggests separate db handlers. but there is an example given with IOLoop for a SELECT query
21:00 sri Grinnz_: haha, first try works
21:00 dparry joined #mojo
21:02 dparry hi, I'm trying to write to a websocket from a Mojo::IOLoop::Server but I either seem to get Can't locate object method "send" via package "Mojo::Transaction::HTTP" if I create the server after the websocket, or the server does not seem to start up when created within the websocket... any ideas?
21:03 dparry I wonder if there is some interaction between $server->reactor->start and Mojo::IOLoop::start that I am unaware of...
21:04 human39 joined #mojo
21:04 dparry I guess it is the blocking part of the reactor start
21:06 sri Grinnz_: lines of code are the same and it's a little bit faster
21:08 Grinnz_ sri: nice
21:08 sri and when i say a little bit i mean 8300rps vs 11700rps :)
21:08 Grinnz_ sri: plus, now its not bounded by weird things IO::Poll does
21:09 Grinnz_ wow... that sounds like it puts it on EV poll level
21:10 sri not quite, EV is at 14500rps
21:11 Grinnz_ hmm there was not quite that big a difference in my tests
21:12 sri i profile with examples/microhttpd.pl
21:12 Grinnz_ dparry: yes, both of those block until the reactor stops
21:13 sri there was a time when i could get it to 21000rps, but it became too unstable then
21:14 sri little optimizations like trying to write right away, before checking if the descriptor is writable
21:15 sri there is still a lot that can be optimized if someone cared enough :)
21:21 good_news_everyon joined #mojo
21:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NGt4
21:21 good_news_everyon mojo/master f3a06f3 Sebastian Riedel: make Mojo::Reactor::Poll a little faster and reliable
21:21 good_news_everyon left #mojo
21:21 sri testing on different platforms would be appreciated
21:22 reneeb joined #mojo
21:22 sri os x looks good so far
21:23 sri linux too https://travis-ci.org/kraih/mojo/builds/50405921
21:23 tgt joined #mojo
21:29 Grinnz_ sri: on linux, 6500->9000, EV with epoll is at about 10000, EV with poll is about 8500
21:29 Grinnz_ lol
21:30 Grinnz_ using that example microhttpd
21:30 cpan_mojo Convos 0.8604 by Marcus Ramberg - http://metacpan.org/release/MRAMBERG/Convos-0.8604 (depends on Mojolicious::Plugin::LinkEmbedder)
21:32 Grinnz_ if this goes in i will probably stop bothering with EV at all
21:32 Grinnz_ it just messes with exceptions
21:32 sri \o/
21:33 sri i think the event loop also loses quite a bit of performance extending timeouts
21:33 sri with ->again()
21:34 sri might be an opportunity for optimization too
21:42 dotandimet joined #mojo
21:46 good_news_everyon joined #mojo
21:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NGWh
21:46 good_news_everyon mojo/master e6fe5ca Sebastian Riedel: use a little less code
21:46 good_news_everyon left #mojo
21:46 sri now it's actually less code
21:47 Grinnz_ hah
21:47 sri too bad all the $self->{io} can't be replaced with $io
21:48 sri but we need to handle the case where all get cleared with ->reset
21:48 Grinnz_ yeah, i actually found a bug in IO::Async's select loop doing that
21:48 Grinnz_ at least, i think it's a bug so far :P
21:49 Grinnz_ i only found it because on win32 IO::Async is forced to select sometimes
21:57 Grinnz_ i need to stop leaving these test daemons running after im done benchmarking lol
21:58 good_news_everyon joined #mojo
21:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NGEt
21:58 good_news_everyon mojo/master b6133ab Sebastian Riedel: just use splice
21:58 good_news_everyon left #mojo
21:58 sri i can get up to 12k rps now
22:00 sri little more with perl 5.21.8
22:00 * sri loves removing code
22:00 Grinnz_ :)
22:01 Grinnz_ sri: i'm curious, what loop is EV using on your mac?
22:01 sri default is select
22:02 sri i can force kqueue though
22:02 Grinnz_ wow, you're getting that performance with select?
22:02 sri select is actually pretty fast
22:02 sri it just doesn't scale
22:02 Grinnz_ true
22:03 Grinnz_ i'm not seeing any difference with the last change but thats probably because its perl 5.10.1 :P
22:03 sri here's how i make mojolicious scale on os x https://gist.github.com/kraih/ac0502106bf0f643ea10
22:04 Grinnz_ i'm a little wary of kqueue afte rseeing all the BSD tests fail on it on POE::Loop::EV
22:05 Grinnz_ well, its only a few tests that usually fail
22:05 Grinnz_ FreeBSD luckily doesnt default to it but NetBSD does
22:06 sri omg, house of cards season 3 leaked? :o
22:07 * sri runs to the interwebs
22:07 * Grinnz_ tries EV with select backend
22:07 Grinnz_ o rly
22:08 Grinnz_ hmm, EV with select isn't beating out epoll either
22:08 Grinnz_ theyre all hovering around 9k
22:09 Grinnz_ perhaps some other bottleneck i'm running into
22:10 Grinnz_ i should try it on my box with 5.18.1
22:20 Grinnz_ sri: on that box ::Poll went from 10500 to 16500
22:24 Grinnz_ EV epoll is at 18500, select 18000 and poll around 17500
22:47 sri \o/
22:47 sri Grinnz_: i'm load testing with wrk btw.
22:48 Grinnz_ yeah this is with the suggested command from that example
22:52 Grinnz_ my POE and IOAsync reactors don't do so well hehe
22:52 Grinnz_ too much overhead
23:21 Ptolemarch joined #mojo
23:38 good_news_everyon joined #mojo
23:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NZtQ
23:38 good_news_everyon mojo/master dd9ea0b Sebastian Riedel: poll does not need to be deleted anymore
23:38 good_news_everyon left #mojo
23:41 Grinnz_ i'm getting to use Mojo::Pg for a tiny project, it's awesome
23:41 Grinnz_ sri++
23:47 Grinnz_ also THIS DATABASE KNOWS WHAT ARRAYS ARE
23:47 Grinnz_ IT'S AMAZING
23:47 purl It's the mirrors
23:50 sri seriously, there's some really cool tricks in Minion::Backend::Pg
23:52 sri no sql generation at all https://github.com/kraih/minion/blob/master/lib/Minion/Backend/Pg.pm#L194
23:52 sri "task = any (?)" and just pass in an array ref of values you're looking for
23:52 Grinnz_ yeah i just figured out how to do that
23:53 Grinnz_ so nice
23:55 sri another one i liked was optional conditions "(state = $1 or $1 is null)"
23:55 sri pass a value or undef to have that condition ignored
23:55 sri the query planner just optimizes it out
23:57 good_news_everyon joined #mojo
23:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/NZCY
23:57 good_news_everyon mojo/master 3bbe73c Sebastian Riedel: no need to preserve the value
23:57 good_news_everyon left #mojo
23:58 sri (other databases may be able to do that too... but i was still very happy when explain analyze told me it gets optimized out)

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