Camelia, the Perl 6 bug

IRC log for #mojo, 2012-08-08

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

All times shown according to UTC.

Time Nick Message
00:00 sri cpantesters is a good indicator
00:01 noganex well... you could alter the shell script and add --skip-tests ;)
00:02 sri failed test reports we get from normal people are usually pretty terrible too, i believe cpan running tests by default might have caused more harm than good
00:02 tqm noganex: sorry to waste your time, wasn't my intention :-(
00:03 sri automated cpantesters results pretty much always contain better information than something a human did
00:03 sri yay for robots!
00:04 noganex sri: i think Moo handles it "neatly". if i'm not mistaken they run only a few tests during install, but got a maintainer test thingy which downloads tests cases via git
00:04 noganex tqm: why? you didn't waste my time. java software did. ;)
00:05 sri i believe Moo might be following the latest trend of having an xt directory with maintainer tests
00:05 sri i kinda like it
00:05 tqm ;)
00:10 noganex mh... i was involved in the development of a big application written almost entirely in perl. eight men, several years. it took us quite some time to get tested ;)
00:10 noganex so having too much test cases can't be wrong.
00:11 noganex after we had a really nasty bug we even got time from our boss to write more tests instead of features ;)
00:13 sri the only downside of xt tests is lack of cpantesters testing :(
00:13 noganex and test cases sometimes help to get one's point across better then documentation or examples.
00:14 noganex uh... indeed. there's no target.
00:14 * sri generally does TDD or DDD
00:15 sri or both
00:16 noganex i'm trying to. but there are some things which i find hard to test. atm i'm writing a small web app (not too big and only one html page with about three routes), but testing html...
00:16 sri umm
00:16 noganex testing the javascript on the html?
00:16 sri Test::Mojo
00:17 sri Selenium
00:17 noganex that's where i don't want to go for small web apps ;)
00:18 sri then test at least that the right dom elements are there
00:18 sri http://mojolicio.us/perldoc/Test/Mojo#SYNOPSIS
00:18 sri there is no excuse for not at least doing minimal testing
00:19 noganex i'm doing more then the minimal testing ;)
00:20 noganex but there was one thing i wondered about: i'm generating about 180 form elements on the page dynamically and i don't know when which elements should be where. i only know this during runtime.
00:20 noganex so i could only test with mock objects
00:20 noganex but the data for the objects is about 25M
00:22 noganex right now i'm testing it, but if i wanted to publish the stuff...
00:22 noganex i'd have no chance to get it tested.
00:24 noganex but that's not a mojo problem.. ;) psgi / plack / mojo are doing it the right way.
00:28 GitHub83 joined #mojo
00:28 GitHub83 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/00​8a388ce0fcfd12ffd7414948df1acb864633a1
00:28 GitHub83 [mojo/master] documentation tweaks - Sebastian Riedel
00:28 GitHub83 left #mojo
01:00 laouji joined #mojo
01:08 tqm good night all
01:32 jamesw joined #mojo
01:40 sri ls
01:40 sri :)
01:46 crab Password:
01:58 d4rkie joined #mojo
02:05 daniel_ joined #mojo
02:06 D4RK-PH0ENiX joined #mojo
02:25 jnap joined #mojo
02:27 xaka joined #mojo
02:38 Psyche^ joined #mojo
02:39 sri hunter2
02:57 noganex_ joined #mojo
03:59 GitHub84 joined #mojo
03:59 GitHub84 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/4f​a29b3c6da2aa09c1f02cd2555057e3ac39d3eb
03:59 GitHub84 [mojo/master] better cleanup tests - Sebastian Riedel
03:59 GitHub84 left #mojo
04:28 noganex seems like i'm not the only one with a damaged sleep-wake cycle...
04:36 sri robots don't sleep
04:37 noganex "nah robots don't dream of electric sheep" ;)
04:39 noganex oh. it was androids, not robots... been quite some time since i've read it.
04:58 mire joined #mojo
05:33 jp joined #mojo
05:33 jp hey everyone
05:33 jp i have a question regarding hypnotoad and websockets
05:34 jp if i want to keep an active list of connection users between hypnotoad process, how might i do that?
05:34 jp an active list of connected* users
05:34 ovnimancer joined #mojo
05:37 Britzel joined #mojo
05:47 spleenjack joined #mojo
05:48 mire joined #mojo
05:56 crab keep it in a shared database of some sort
06:14 jp i don't think you can store socket connections in a db
06:15 tempire jp: you store an identifier
06:16 jp will other hypnotoad processes be able to send information based on those identifiers?
06:17 crab i thought you wanted a list of users, not to store sockets
06:17 crab no, you can't expect a socket in one process to work from another
06:18 jp how would you scale a hypnotoad websocket app in that case?
06:18 jp say for example, a network game
06:24 crab dunno.
06:24 jp boourns
06:29 crab boourns?
07:03 fhelmber_ joined #mojo
07:06 Vandal joined #mojo
07:09 batman joined #mojo
07:15 taryk joined #mojo
07:24 berov joined #mojo
07:25 berov sri: When do you sleep :)…
07:26 berov just ti say "Hi" :)
07:47 marcus ti hi
07:50 crab hi marcus, berov.
07:51 berov tO :)
07:52 berov hi all
07:55 pau4o joined #mojo
07:59 marcus mr crab!
08:34 rem_lex joined #mojo
09:03 cosmincx joined #mojo
09:08 daxim joined #mojo
09:11 amirite joined #mojo
09:13 cosmincx joined #mojo
10:06 batman if i make a request to a mojo server, will the server continue with async operations even though the client disconnect?
10:06 batman so the request hits a method in a controller which start an async operation interally to create a response
10:07 batman s/interally//
10:08 mire joined #mojo
10:09 crab yes
10:10 batman ok
10:11 batman so if i want to know if the client has disconnected i could do Mojo::IOLoop->stream($self-​>tx->connection)->on(close => sub {....}) ?
10:11 crab yes.
10:11 batman awesome
10:12 crab or just $self->on(finish => ...)
10:13 batman oh. i though "finish" was "server is finished"
10:15 crab why would you need an event for that?
10:15 batman logging maybe... not sure :)
10:21 Lucas1 joined #mojo
11:06 tm joined #mojo
11:09 tm morning
11:09 tm oh, that's afternoon here already :D
11:15 espent joined #mojo
11:16 berov joined #mojo
11:24 amirite joined #mojo
12:05 Lucas11 joined #mojo
12:08 kmx joined #mojo
12:22 Lucas1 joined #mojo
12:42 * batman <3 Mojo::IOLoop
12:48 berov1 joined #mojo
13:07 Lucas1 joined #mojo
13:18 CromeDome joined #mojo
13:26 pau4o joined #mojo
13:29 jnap joined #mojo
13:35 cosmincx joined #mojo
13:36 inokenty joined #mojo
13:37 tm hmmm got app error when trying to add entry to Redis... wtf? wide character in syswrite?!
13:42 crab you need more syswrite bandwidth, so your wide characters will fit through
13:43 tm best part - the string added is not wide... it's all ascii
13:49 Grauwolf joined #mojo
13:52 gryphon joined #mojo
14:28 labrown joined #mojo
14:35 daniel_ joined #mojo
14:43 alester joined #mojo
14:57 asarch joined #mojo
15:45 baton8 joined #mojo
15:54 tm this is what noganex told me yesterday... perl 5.10 :)
15:54 noganex i did what? yesterday?
15:55 * noganex is still awake *yawn*
15:55 noganex ah. utf8. there you go tm ;)
15:55 tm hehehe right on - right in my face :D
15:56 noganex tm: http://stackoverflow.com/a/6163129/479133 << this answer contains great information about unicode
15:58 tm tnx, will check in a min... for now trying to process big incomplete data set and come up with missing bits :-/
15:59 tm don't even ask... long story, very long
16:00 xaka joined #mojo
16:02 noganex well.. it's a dangerous thing... i remember stuff like this: http://projects.webappsec.org/w/pag​e/13247002/XML%20Entity%20Expansion
16:21 Coff joined #mojo
16:40 pau4o left #mojo
16:41 Britzel joined #mojo
16:49 sri hmm
16:50 sri wonder if we should get rid of the guarantee that Mojo::IOLoop stops if there are no event watchers anymore
16:54 crab why?
16:54 sri it limits our ability to add new backends
16:55 sri many event loops make it pretty much impossible to replicate those semantics
16:58 sri IO::Async, AnyEvent and friends don't make that guarantee either
16:59 sri i'm looking at event loops like Glib
17:01 sri in fact, even right now we make false promises
17:01 sri some versions of EV don't stop when there are no more watchers
17:03 sri i really like the simplicity of having Mojo::IOLoop stop when there are no more watchers, but if we want to keep growing that can't be guaranteed
17:04 sri when i recently told marcus to make an IO::Async backend i wasn't aware of this problem, such a backend is impossible right now
17:06 sri tempire, marcus, crab: i'd like to hear your opinions on this
17:07 pollux joined #mojo
17:07 pollux hi
17:08 pollux what's the recommended way to get from a Mojo::Upload to a Mojo::Asset::File regardless of size? I need to process the uploaded file line by line and sent response in chunks
17:08 pollux ideally I would get a filehandle out of this
17:18 sri tempire, marcus, crab: even if you don't have an opinion, it would be nice if you said something so i can move on
17:21 crab i think having the event loop stop when it has nothing to do is more friendly to users than not
17:22 sri completely agree there, but the is it worth the tradeoff of being limited to IO::Poll and EV backends?
17:22 sri s/the//
17:23 sri depending on backend you could still get the same automatic stopping behavior, we just can't guarantee it with every backend
17:24 sri for example if you enforce Mojo::Reactor::Poll, nothing changes
17:24 sri with Mojo::Reactor::Glib the behavior would change to always block
17:26 sri i guess it all comes down to the question of "do we want to allow more reactor backends such as IO::Async, AnyEvent, Event, Glib, Irssi...?"
17:26 sri if the answer is yes, then we can't make that guarantee
17:32 jnap joined #mojo
17:39 crab i'm not greatly excited about more reactor backends, to be honest
17:40 sri you did notice i'm involved in a PSGI for perl event loops project right? :)
17:40 sri so new backends is gonna happen
17:42 fhelmber_ joined #mojo
17:42 jnap_ joined #mojo
17:47 sri i think for now we could remove the "...or no events are being watched anymore." part of the Mojo::IOLoop->start/one_tick and Mojo::Reactor->start/one_tick documentation and leave everything else as is
17:47 sri that leaves enough room for new backends with different semantics
17:48 sri Mojo::Reactor::Poll and Mojo::Reactor::EV would keep the "...or no events are being watched anymore." part, since it's just and extension of the basic behavior
17:48 pollux_ joined #mojo
17:50 sri and auto detection of event loops with different semantics can be limited too, maybe make it depend on $INC{'Some/Other/Loop.pm'}
17:50 jp joined #mojo
17:55 jnap joined #mojo
17:55 GitHub63 joined #mojo
17:55 GitHub63 [mojo] kraih pushed 1 new commit to master: http://git.io/PusDqQ
17:55 GitHub63 [mojo/master] better reactor tests - Sebastian Riedel
17:55 GitHub63 left #mojo
18:02 sri on the other hand... custom reactors are only used when requested explicitly
18:03 sri so, maybe documenting the default behavior is fine, since you have to know that the custom reactor changes ioloop sematics
18:03 * sri shrugs
18:10 xaka i think what makes sense and what mojo should depend on is low-level primitives like IO watches (readable/writable) and timer to make async life possible, everything else up to user - when start, when stop, ... and you probaly shouldn't care about it
18:12 sri start/stop are primitives
18:28 jnap_ joined #mojo
18:33 mire joined #mojo
18:35 jnap joined #mojo
18:38 jnap joined #mojo
18:51 GitHub32 joined #mojo
18:51 GitHub32 [mojo] kraih pushed 1 new commit to master: http://git.io/P387EQ
18:51 GitHub32 [mojo/master] improved many tests - Sebastian Riedel
18:51 GitHub32 left #mojo
18:54 sri marcus, tempire, crab: so, what should it be? keep documentation as is and leave explanations about semantic changes to the backend modules or relax our existing documentation to not mention automatic stop semantics?
18:55 batman i'm not in the list, but i want the latter
18:56 sri everybody is welcome to voice their opinion of course :)
18:56 batman :)
18:56 xaka +1 for not metion such info
18:56 xaka *mention
18:56 sri i'm just poking them because it's their job
18:58 sri so, am i understanding you right that you are in favor of removing "...or no events are being watched anymore." from http://mojolicio.us/perldoc/Mojo/IOLoop#start?
18:58 batman the one thing that i hate the most about mojolicious is that it makes me rewrite everything because it rocks
18:58 xaka when i was working on Net::DBus::Reactor backend based on Mojo, i was looking only for watchers/timers/start/stop - that was more than enough to make work done
18:58 d4rkie joined #mojo
18:59 batman i want to remove it from the doc
18:59 sri ok
18:59 batman it = "...auto stop..."
19:00 sri and leave it in Mojo::Reactor::Poll/EV as an implementation detail of the backend i guess
19:00 batman yes
19:00 batman but from my point, this is details :)
19:01 xaka if you have running loop withoout any hooks inside (timer, watcher, ...) - what the point it being running? no hooks == no ways to start another hooks == no work to do
19:01 batman xaka: maybe the loop does stuff on its own
19:01 xaka i'm talking about the case when even loop has nothing to do on its own
19:02 batman if(@no_events) { shoot_a_rocket_to_the_moon() } ?
19:02 sri xaka: that's not the point at all, that behavior simply depends on the backend
19:02 xaka no_events != nobody_is_waiting_for_events
19:02 sri argue with the IO::Async folks
19:03 sri they do not stop, and there is nothing we can do about it
19:03 sri there are no workarounds we could do
19:03 sri the backend just doesn't support it
19:04 sri some like EV stop automatically, others like IO::Async, Event, Glib do not
19:07 xaka if you write async crawler and your requests queue is empty i'd expect application to stop, right, but if it's service/daemon/whatever listening on socket i won't stop untill SIGINT/TERM/...
19:07 GitHub41 joined #mojo
19:07 GitHub41 [mojo] kraih pushed 1 new commit to master: http://git.io/suxAxg
19:07 GitHub41 [mojo/master] relax Mojo::IOLoop and Mojo::Reactor documentation to leave room for more reactor backends with different semantics - Sebastian Riedel
19:07 GitHub41 left #mojo
19:08 sri xaka: that's irrelevant
19:09 Leandr joined #mojo
19:12 batman sri: on the other side: shouldn't such a feature be consistent?
19:12 sri batman: it can't
19:12 sri that's the whole point
19:13 batman if IOLoop::EV returns on empty queue, but IOLoop::Foo doesn't -- won't that be weird?
19:13 batman then i think you should encourage users to call ->stop when they are done
19:13 sri don't act like it's a choice
19:14 sri because it isn't, the event loops decide
19:15 sri it might not even be consistent between multiple versions of an event loop
19:15 sri EV is known to sometimes block
19:15 sri (or used to before 4.0)
19:16 batman i see. what do you think about encourage users to use ->stop instead of expecting a behaviour ?
19:16 sri are we not doing that now?
19:16 batman oh :P haven't looked at the doc lately :/
19:17 sri pretty sure all examples use ->stop
19:17 sri as soon as you have a listen socket or recurring timer it will never stop anyway
19:17 sri so examples without would be a bad idea
19:18 batman true :)
19:19 sri perhaps we should explicitly mention that blocking or stopping depends entirely on the reactor
19:20 sri "Start the loop, this will block until C<stop> is called, some reactors also stop when there are no events being watched anymore."
19:25 batman hm... over 12 hours @work... maybe about time to go home...
19:35 jnap joined #mojo
19:38 jnap joined #mojo
19:49 xaka joined #mojo
20:07 GitHub101 joined #mojo
20:07 GitHub101 [mojo] kraih pushed 1 new commit to master: http://git.io/GLehdg
20:07 GitHub101 [mojo/master] mention that some reactors stop automatically - Sebastian Riedel
20:07 GitHub101 left #mojo
20:20 sri http://mojolicio.us/perldoc/Mojoli​cious/Guides/Cookbook#Event_loops # am i overusing "event loop" a little there?
20:21 * sri likes saying event loop, it's a fun word
20:21 sri (or fun two words)
20:30 xaka wonder why it still says "IOLoop" and "backend" instead of "Reactor" and "backend" after refactoring you did long time ago
20:31 perlite joined #mojo
21:10 GitHub140 joined #mojo
21:10 GitHub140 [mojo] kraih pushed 1 new commit to master: http://git.io/OEtzCQ
21:10 GitHub140 [mojo/master] better event loop recipe - Sebastian Riedel
21:10 GitHub140 left #mojo
21:15 xaka that's better i think :)
21:16 labrown http://boingboing.net/2012/08/08/s​tick-up-kid-foiled-by-beer-th.html  I see a new olympic sport here!
21:47 lukep joined #mojo
22:44 sri oh, perl 5.16.1 is out
22:53 amirite joined #mojo
23:14 jnap joined #mojo
23:36 tm ok my utf8 problem solved... I was using encoding => undef for Redis.pm and if any data had any wide chars it had to fail
23:37 tm so trading speed for predictability... because I can't guarantee data will be ASCII only :D

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