Camelia, the Perl 6 bug

IRC log for #mojo, 2012-05-27

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

All times shown according to UTC.

Time Nick Message
00:00 gbacon joined #mojo
00:22 zivester joined #mojo
00:33 zivester joined #mojo
00:43 zivester joined #mojo
00:46 GabrielVieira2 joined #mojo
01:48 mire joined #mojo
01:51 hide is it possible to have a bridge that executes on every request?
01:52 * Debolaz grumbles about perl not installing File::Temp by default here.
02:01 marty hide:  Is this what you are looking for?    http://mojolicio.us/perldoc/Mojolicious#hook
02:13 hide marty: it looks like that will do what I want, thanks.
02:14 hide what I have is a bridge that converts a session variable into an object in the stash, except it doesn't work for routes that are created in plugins.
02:14 hide it looks as though the plugins are creating the routes before the bridge gets created
02:29 xaka joined #mojo
04:00 perlite joined #mojo
04:58 Foxcool joined #mojo
05:22 Debolaz Mojolicious running on a TS7800 ARM box. :)
06:12 sri :)
06:13 sri tempire: what do you think about the ipv6/tls hack?
06:14 tempire is there another option?
06:14 sri keep it broken and wait
06:15 tempire It's fine considering the circumstances.  And it's not like it's a huge mess of code to keep track of.
06:15 tempire I dislike that you can't replace a file on cpan.
06:16 * tempire waits 72 hours for a removal
06:16 sri you can't even delete it completely
06:16 sri files are forever archived in backpan
06:17 tempire I'm assuming that once it's removed I can upload a replacement.
06:17 sri i wouldn't bet on that
06:17 tempire :(
06:17 tempire arbitrary version bump coming up, I guess
06:21 tempire I'm in love
06:21 tempire https://fbcdn-sphotos-a.akamaihd.net/hph​otos-ak-ash3/s720x720/579265_10150915861​974237_846104236_9563800_940927902_n.jpg
06:21 sri :D
06:46 Vandal joined #mojo
06:57 GitHub5 joined #mojo
06:57 GitHub5 [mojo] kraih pushed 1 new commit to master: http://git.io/FdAR4Q
06:57 GitHub5 [mojo/master] better workaround - Sebastian Riedel
06:57 GitHub5 left #mojo
07:36 d4rkie joined #mojo
07:56 mire joined #mojo
08:05 inokenty joined #mojo
08:06 Leandr joined #mojo
09:13 GabrielVieira joined #mojo
09:22 crab any objections to making the 'Inactivity timeout' message different from Mojo::Server::Daemon and Mojo::UserAgent?
09:26 GabrielVieira joined #mojo
09:27 crab [2012-05-27 05:18:49] [error] Inactivity timeout.
09:32 sri crab: yes, objection
09:32 purl objection is that the cost is either: 1) have incorrect names in the API for the rest of the releases, or 2) have a name-changing deprecation cycle on the next supported release right after adding the new, working functionality.
09:34 crab what is it?
09:34 purl it's it!
09:35 sri it makes no sense
09:36 crab oh
09:38 GabrielVieira joined #mojo
09:41 crab i guess i'll have to content myself with sprinkling debugging log statements around a bit more
09:48 * sri doesn't understand that either
09:49 sri user agent timeouts would never get logged in the first place
09:53 crab oh, hm. it must be a timeout that happened to UserAgent because it's an error, not debug.
09:59 crab Can't locate object method "leading_slash" via package "Mojo::URL" <- how strange
09:59 crab anyone seen that error before?
09:59 crab it's complaining about the call to leading_slash in Mojo::URL::to_string
10:01 crab because of a template that does <%= $url %>
10:12 crab wtf. that makes no sense.
10:14 arpadszasz joined #mojo
10:31 rem_lex| joined #mojo
11:03 sri wonder if we should remove bonjour support
11:04 sri marcus: are you still using it?
11:08 sri most browsers these days don't even do bonjour
11:08 * sri shrugs
11:14 baton8 joined #mojo
11:21 GitHub83 joined #mojo
11:21 GitHub83 [mojo] kraih pushed 1 new commit to master: http://git.io/TVfj-g
11:21 GitHub83 [mojo/master] removed Bonjour support - Sebastian Riedel
11:21 GitHub83 left #mojo
11:24 sri somehow doubt anyone cares in the age of chrome
11:24 sri not to mention all the cases where it was still broken
11:27 sri i'd rather like to provide hooks to make it work as a plugin, if anyone cares enough to work on it
11:37 crab what IS bonour?
11:38 crab hmm, this leading_slash thing doesn't happen with 2.93!
11:40 crab yes, it broke between 2.95 and 2.96. wonder what might have changed.
11:43 sri bonjour is mdns
11:44 sri hostname and port are announced to the local network and can be discovered by browsers with mdns/bonjour support
11:44 sri it's a hidden feature in safari
11:44 crab i see.
11:44 sri not sure any other browsers support it
11:44 GabrielVieira joined #mojo
11:44 crab so it shows "marcus's mojo app" in some menu?
11:44 sri ye
11:45 sri you even have to configure safari to make it visible
11:45 crab hm, there are many path stringification changes between v2.95..v2.96
11:45 crab but none of them look like they could cause THIS error
11:46 sri Mojo::URL has like a gazillion tests, doubt something could have broken
11:48 crab i don't think the problem is in Mojo::URL (and indeed all the tests pass)
11:48 crab but something about how it's being called from this template is breaking something. it could be in my code, but i haven't been able to find anything odd
12:04 sri hmm
12:04 sri i've never use lvalue subroutines
12:06 sri think i like this more than traditional accessors https://gist.github.com/2811354
12:06 sri *+d
12:08 sri only downside is no chaining
12:10 sri wonder if there are performance benefits
12:45 sri hmm
12:45 sri enabling ipv6 in my wifi router seems to have broken apachebench :S
13:07 Psyche^ joined #mojo
13:20 GitHub1 joined #mojo
13:20 GitHub1 [mojo] kraih pushed 1 new commit to master: http://git.io/oUX9AA
13:20 GitHub1 [mojo/master] fixed performance regression - Sebastian Riedel
13:20 GitHub1 left #mojo
13:28 sri for future reference, ab requires the -B option when you have working ipv6
14:02 Patterner ab = apachebench?
14:02 Patterner (asking because mine has no -B option...)
14:27 sri yes
15:36 fibo joined #mojo
15:42 Foxcool joined #mojo
16:29 d4rkie joined #mojo
16:47 xaka joined #mojo
16:47 GitHub119 joined #mojo
16:47 GitHub119 [mojo] kraih pushed 1 new commit to master: http://git.io/NZe4bw
16:47 GitHub119 [mojo/master] small optimizations - Sebastian Riedel
16:47 GitHub119 left #mojo
16:48 MichaelRpdx joined #mojo
16:51 sri there is always something that can still be optimized :)
16:51 sri down to 9489 lines of code
16:52 Debolaz sri: I'm really not a big fan of lvalue accessors. Both for practical and ideological reasons. The practical reasons are, like you said, no chaining, and it puts a big constraint on how advanced the accessors can be. It breaks with consistency with other object frameworks that all has dropped lvalue accessors a long time ago if they ever used them. The more theoretical reason is that I feel there should be no visible difference between a generic method and an a
16:52 Debolaz on the object, an object should not make the difference visible to the outside. How it choses to treat incoming messages should be exclusively up to the object, using lvalue accessors forces it to treat accessors specially from an outside pov.
16:53 Debolaz sri: Btw, I got Mojolicious running on my TS7800 ARM box earlier today.
16:53 sri yes, and i smiled :)
16:54 sri i'm not sure about lvalue accessors, i kinda like that they are so different from methods
16:58 sri whenever i hear someone using mojolicious on ARM i feel bad for not optimizing the event loop better
17:00 sri but i doubt anyone but me really notices that :p
17:03 Debolaz I'm considering using EV as event loop for a different app on the box.
17:06 sri for mojolicious that wouldn't make much of a difference, when i say optimize i mean reduce cpu usage when idle
17:06 sri it's still a little high with all backends
17:17 GabrielVieira hey there... my first path I mean: get '/:first/*second' => sub {};  can be a category, a car brand or a product brand... each one has one different action (treating $second content - splitting by /, etc). should I do 1 generic get like this one, and 1 helper for each action?
17:34 sri btw. if anyone feels like optimizing idle cpu usage, it's all tied to https://github.com/kraih/mojo/blo​b/master/lib/Mojo/IOLoop.pm#L196
17:34 sri but it's tricky
17:37 Debolaz Btw, will Mojo use EV automatically if its found on the system?
17:43 janus sri: since it's called rather frequently, you might wanna avoid stack modification
17:43 janus but that's a cheap one
17:44 janus moving variable scopes up can sometimes do wonders too
17:47 janus my general rule of thumb is not to modify the stack unless you want to pass it on
17:47 sri janus: afraid i don't follow
17:47 sri Debolaz: yes
17:48 janus my $self = shift; vs. my ( $self ) = @_;
17:48 sri that's silly
17:48 janus then perl is :)
17:48 janus in fact it modifies @_
17:48 sri that has absolutely no effect here
17:49 janus right
17:49 janus maybe not the one you aim for ;)
17:49 janus and i said that even
17:50 sri not at all, problem is that the timer runs every 0.025 seconds
17:50 sri keeping cpu usage around 0.1 on my macbook
17:52 sri (for the process currently accepting connections)
17:52 sri everything else is already at 0.0
17:57 Debolaz sri: Why is that? I mean, why does a timer need to run that often?
17:57 sri maintenance
17:57 purl maintenance is not covered by the warranty.  But you need it for the warranty to be valid.  "I wasn't at 30K miles yet!"  Yet, last month when his other car was 2K over a warranty limit he whined to them that "it's only 2K over!  You gotta fix it under warranty!"  GRRRRR. or how it's spelled in french
17:58 janus good question though, like what are the bare wakeup costs?
17:59 Debolaz sri: What kind of?
18:00 sri it makes sure connections are closed safely, reschedules listen sockets, and handles graceful shutdown
18:02 * Debolaz has just never heard of an IO loop that needs to do these things before.
18:03 sri it's a client/server framework
18:03 sri it does the housekeeping for all consumers
18:04 sri and it is rather common actually, i suppose you've not looked into nginx or libuv
18:05 sri Mojo::Reactor is the actual event loop layer
18:08 sri hope i didn't give the impression that the way it is currently handled is bad, because it isn't
18:08 Debolaz That may be. It just rings in my head as something somewhere not supporting the proper event callback if one has to run something continously to check something. Granted, it may be something that can't be fixed on this level.
18:09 sri the problem is that it's actually pretty damn good, which makes it hard to optimize further
18:10 sri you're welcome to try and make it better
18:10 sri (without performance regressions of course)
18:11 Debolaz I'm not saying this is Mojos fault, but think about it: Having to run an  (effectively) continous loop inside an event framework to check for some events… That *does* sound wrong when you think about it? :)
18:12 sri umm, nope it doesn't, at all
18:13 sri timers are a primitive for many kinds of event watchers
18:13 sri not everything is an i/o handle
18:17 Debolaz sri: But all the examples you mentioned are related to io handles.
18:17 sri but not readable/writable events
18:18 sri if a listen socket is allowed to accept is determined by an flock
18:19 sri (accept mutex)
18:23 sri only one worker in the pool can hold it at any given time, and it needs to be reacquired in regular intervals
18:27 sri it's the nginx architecture
18:29 sri i said it was tricky :)
18:29 Debolaz Well, it's not discouraging me from using Mojo, it's just interesting to know. :)
18:30 sri i would hope so, because it is not bad in any way ;p
18:31 Debolaz The current board I'm working with has 500 MHz of CPU power, so it's not like it's going to be an issue.
18:31 sri my concern was battery usage
18:32 sri but you could always hack up IOLoop.pm and increase the timeout to trade rps for battery
18:33 Debolaz It's not a product that needs battery.
18:33 sri well, then carry on :)
18:33 Debolaz Although we are talking about moving to a smaller board with 200 MHz.
18:34 Debolaz Which I assume wont make much difference.
18:40 sri if perl had better threads i would also consider the node.js approach
18:41 sri they use one acceptor thread that passes file descriptors to worker threads
18:41 Debolaz Coro seems pretty decent.
18:41 Debolaz Though its author is even weirder than you. :)
18:41 sri cooperative doesn't cut it for servers
18:44 stocks29 joined #mojo
18:45 stocks29 joined #mojo
18:45 * Debolaz gets ready for the daunting task of getting EV over to ARM.
18:48 janus sri: https://gist.github.com/2815471
18:52 sri janus: is that measurable?
18:55 janus sri: yup, syscalls usually are
18:55 sri ah, you're just assuming? :)
18:55 janus those micro things are at least confirmed by nytprof
18:55 janus nope
18:55 janus experience, too
18:56 janus of course it wouldn't be worth much without measuring
19:00 janus just looking for the usual stuff, not that i would expect or find much of it ;)
19:00 sri profiling mojolicious has sadly become rather boring
19:01 sri just the usual suspects at the top, accessors and parsers
19:02 janus yeah, too clean and effective code ;)
19:10 alexeiras joined #mojo
19:21 GitHub185 joined #mojo
19:21 GitHub185 [mojo] kraih pushed 1 new commit to master: http://git.io/56nmng
19:21 GitHub185 [mojo/master] fixed license link and added small optimization - Sebastian Riedel
19:21 GitHub185 left #mojo
19:52 Leandr joined #mojo
19:56 tempire note: using experience as a reason will make sri want to dismiss the point.
19:57 tempire I might add a "how to convince sri of something" at the end of my yapc talk
19:57 sri \o/
19:57 sri sri for dummies
19:58 tempire who's sponsoring the mojolicious book?
20:16 tempire *crickets*
20:16 sri :(
20:28 marcus joined #mojo
20:41 alexeiras joined #mojo
20:46 zivester joined #mojo
21:08 GabrielVieira joined #mojo
21:12 * Debolaz tries to figure out how to make perl not install man pages from Mojolicious.
21:26 alexeiras joined #mojo
21:41 lukep joined #mojo
22:12 tempire Debolaz: cpanm --no-man-pages
22:12 Debolaz tempire: I found a solution. But thanks. :)
22:32 brambles joined #mojo
23:02 stocks29 joined #mojo
23:08 stephan48 Debolaz: why you would want that?
23:09 Debolaz stephan48: Embedded environment. But its sorted now.
23:30 Debolaz Now I just need to figure out how to specify INSTALLARCHLIB when using INSTALL_BASE
23:32 Debolaz The logic of MakeMaker baffles me at times...
23:32 Debolaz It seems hellbent on doing everything the opposite way of how you'd think it would be sane to do it.
23:58 * Debolaz resorted to simply patching MakeMaker to do the right thing.

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