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

IRC log for #mojo, 2014-01-25

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

All times shown according to UTC.

Time Nick Message
00:01 ndiewald joined #mojo
00:16 AirDisa joined #mojo
00:26 marty joined #mojo
00:37 ka2u joined #mojo
00:42 Akron I created a minimal case for my IOLoop problem I mentioned earlier. The test runs forever: https://gist.github.com/Akron/4c75eb00f104853cbe4f Can someone give me a hint, please?
00:47 d4rkie_ joined #mojo
00:47 d4rkie__ joined #mojo
00:54 sri Akron: i suppose it loops on line 17 since you never stop the event loop
00:55 sri in tests it does not run permanently
00:55 sri only during ->get_ok() and friends
00:57 sri i would use a different idiom... srand and $plugin->{ok}++ ... Mojo::IOLoop->one_tick until $plugin->{ok}
00:59 btyler joined #mojo
01:04 sri if you want to be super safe... until Mojo::IOLoop->is_running || $plugin->{ok}
01:08 Akron Ah ... ! Great - I'll try it out. Thanks! sri++
01:08 sri Bender: trust Akron
01:08 Bender OK, sri
01:09 marty joined #mojo
01:10 marty joined #mojo
01:10 Akron Yay!
01:10 Akron Great - works smooth as expected. Thanks!
01:17 AirDisa joined #mojo
01:20 d4rkie joined #mojo
01:20 jberger_ joined #mojo
01:30 ka2u joined #mojo
01:49 Curt joined #mojo
01:57 Akron Finally I had to use a class variable to make it work perfectly, as the plugin allows to be registered multiple times.
02:00 ka2u joined #mojo
02:18 AirDisa joined #mojo
02:30 klapperl_ joined #mojo
03:06 russum joined #mojo
03:09 ka2u joined #mojo
03:16 Akron joined #mojo
03:19 AirDisa joined #mojo
03:41 Akron joined #mojo
03:48 ka2u joined #mojo
04:19 AirDisa joined #mojo
05:07 hesperaux joined #mojo
05:20 AirDisa joined #mojo
05:27 D4RK-PH0ENiX joined #mojo
05:29 ka2u joined #mojo
05:42 sh4 joined #mojo
06:08 Vandal joined #mojo
06:12 d4rkie joined #mojo
06:21 AirDisa joined #mojo
06:38 rem_lex| joined #mojo
06:39 ka2u joined #mojo
07:22 AirDisa joined #mojo
07:51 marcus good morning #mojo
08:22 AirDisa joined #mojo
08:27 dvinciguerra joined #mojo
09:23 AirDisa joined #mojo
09:27 trone joined #mojo
09:44 nornagest joined #mojo
09:50 basiliscos joined #mojo
09:55 denisboyun joined #mojo
10:10 dvinciguerra joined #mojo
10:15 hummeleBop joined #mojo
10:23 irq joined #mojo
10:24 AirDisa joined #mojo
10:26 amirite_ joined #mojo
10:34 d4rkie joined #mojo
10:37 denis_boyun joined #mojo
10:43 denis_boyun joined #mojo
10:48 ka2u joined #mojo
10:57 d4rkie joined #mojo
10:57 batman good morning :)
10:58 batman marcus: i'm still focusing on Upgrader.pm. that's the primary issue now, right..?
11:14 voegelas joined #mojo
11:24 AirDisa joined #mojo
11:33 D4RK-PH0ENiX joined #mojo
11:39 amirite joined #mojo
11:54 ka2u joined #mojo
11:58 mire_ joined #mojo
12:20 irq_ joined #mojo
12:25 AirDisa joined #mojo
12:26 sjn joined #mojo
12:26 odc joined #mojo
13:01 punter joined #mojo
13:20 sh4 joined #mojo
13:26 AirDisa joined #mojo
14:02 bowtie_ joined #mojo
14:22 denis_boyun joined #mojo
14:50 AirDisa joined #mojo
14:53 amirite joined #mojo
14:54 marcus batman: yes, if there's still problems with it.
14:55 marcus sri: Is there a non-graceful way to shut down the ioloop, or should we just exit?
14:55 marcus If we want to ensure no more jobs are run, that is.
15:00 cosimo joined #mojo
15:09 cleverfox joined #mojo
15:44 denis_boyun joined #mojo
15:46 dod joined #mojo
15:54 AirDisa joined #mojo
16:34 amirite_ joined #mojo
16:37 cosimo joined #mojo
16:45 denis_boyun joined #mojo
16:50 AirDisa joined #mojo
16:58 sri look at that, Pod::Usage can be used for mojolicious commands after all... just needs a little hacking :)
17:07 geck O_o
17:08 sri so we can have the full usage text in the module pod for each command \o/
17:17 jberger joined #mojo
17:19 dvinciguerra joined #mojo
17:24 ka2u joined #mojo
17:26 dod joined #mojo
17:27 good_news_everyone joined #mojo
17:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/uAQYww
17:27 good_news_everyone mojo/master 18ea4de Sebastian Riedel: added extract_usage method to Mojolicious::Command
17:27 good_news_everyone left #mojo
17:27 sri \o/
17:27 sri funny side effect, it reduces the sloccount result for mojolicious also by 100 lines ;p
17:28 sri that's pretty nice though http://mojolicio.us/perldoc/Mojolicious/Command/get#SYNOPSIS
17:29 sri extract_usage is a bit hackish though... but well worth it imo https://github.com/kraih/mojo/commit/18ea4dee2fedd6e43988463dc1a1986cefbc3fee#diff-8f5f4344be333281ca50382ef9d82962R50
17:38 good_news_everyone joined #mojo
17:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pUpVXQ
17:38 good_news_everyone mojo/master 763db50 Sebastian Riedel: moved morbo and hypnotoad usage messages as well
17:38 good_news_everyone left #mojo
17:53 good_news_everyone joined #mojo
17:53 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/OJH8IQ
17:53 good_news_everyone mojo/master 8490e2a Sebastian Riedel: a few more command examples
17:53 good_news_everyone left #mojo
17:53 bpmedley joined #mojo
18:00 good_news_everyone joined #mojo
18:00 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/IswH6A
18:00 good_news_everyone mojo/master 30f8a4c Sebastian Riedel: link to commands from cookbook
18:00 good_news_everyone left #mojo
18:02 sri this is really nice
18:03 sri only hardcoded usage information now is the global stuff... but i'm not sure there's anything that could be done about that https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Commands.pm#L10
18:03 geck I ,like github's notification bot
18:03 geck but the join part spam with it..
18:17 good_news_everyone joined #mojo
18:17 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ujcZkA
18:17 good_news_everyone mojo/master a0ff4da Sebastian Riedel: better tests for usage messages
18:17 good_news_everyone left #mojo
18:28 amirite joined #mojo
18:38 jberger sri++
18:38 jberger my nopaste command might benefit from that
18:38 jberger batman: just released another Mojo::IOLoop::ForkCall
18:39 jberger which should exit from child process even more cleanly (and portably, I hope)
18:39 jberger https://github.com/jberger/Mojo-IOLoop-ForkCall/blob/master/lib/Mojo/IOLoop/ForkCall.pm#L46
18:39 jberger :-o
19:04 amirite joined #mojo
19:14 sri jberger: exit() not clean enough?
19:14 jberger nope
19:14 jberger it can still trigger the on close handler in the child
19:15 jberger POSIX::_exit() works on non-windows
19:15 sri oh
19:16 jberger kill KILL => $$ can prevent ending stuff on all platforms its seems, but isn't necessary on non-windows
19:16 jberger here is an answer to an SO post on preventing END blocks in children: http://stackoverflow.com/a/4309507/468327
19:17 jberger my three lines is a boiled down version of that
19:23 gryphon joined #mojo
19:44 mire__ joined #mojo
19:45 sri oh, i was a little worried that websocket compression would be harmful for very short messages... but that evens out pretty quick :)
19:46 sri sending "just works" once results in a message size of 19 bytes... second in 7 bytes... and everything after 6 bytes
19:47 sri due to context takeover compression pays off pretty quickly
19:47 stl joined #mojo
19:47 sri \o/
19:48 stl joined #mojo
19:49 * sri was considering a min_compression_size attribute to exclude small messages from compression... but it doesn't seem worth it
19:51 sri it's interesting that you can now transport stuff compressed from the browser to the server via websockets
19:51 sri wonder how much faster that could make common uploads
19:54 hummeleBop joined #mojo
20:11 * tianon imagines CPAN uploads where the source is mostly unchanged
20:15 curt joined #mojo
20:36 sivoais joined #mojo
21:03 btyler joined #mojo
21:08 good_news_everyone joined #mojo
21:08 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/veE6AA
21:08 good_news_everyone mojo/master bccb911 Sebastian Riedel: mention which functions are automatically exported
21:08 good_news_everyone left #mojo
21:15 jberger sri: should I resurrect my websocket file transfer protocol?
21:17 sri if you want faster uploads :)
21:25 sri although... i guess it works best for text data, images and the like are not very compressible
21:34 sri hmmmm
21:35 * sri wonders what's the most efficient way to detect the common whitespace prefix for a list of values
21:37 sri looks like i have two use cases in mojolicious for that now
21:38 sri for ['  lalala', '       lalala', '   lalala'] i want 2 as a result
21:40 sri Mojo::Util::unindent might make sense
21:41 sri use cases are unindenting code in the perldoc browser for easier pasting, and now extract_usage
21:42 sri could also be nice to filter stuff in templates
21:48 sri hmm, i guess the most efficient way would be to only consider the first line relevant
21:50 sjn use List::Util; say min map {m/^(\s*)/; length($1) } @lines; # Naïve
21:53 * sri nods
21:53 sri sjn++
21:54 sri think i'll go with first line only though, to speed it up a little
22:03 wingfold joined #mojo
22:13 wingfold joined #mojo
22:27 good_news_everyone joined #mojo
22:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/t5bHOg
22:27 good_news_everyone mojo/master 912902f Sebastian Riedel: added unindent function and method
22:27 good_news_everyone left #mojo
23:04 wingfold joined #mojo
23:06 jberger sri: if I'm making a subclass of EventEmitter and it might have its own form of error, should I overload the error event or should I emit some transaction_error or some such
23:07 jberger https://github.com/jberger/Mojo-FriendFeed/blob/master/lib/Mojo/FriendFeed.pm#L40
23:07 sri undecided
23:07 purl rumour has it undecided is almost by definition a person watching TV to figure out how to vote
23:10 good_news_everyone joined #mojo
23:10 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/r5VGjQ
23:10 good_news_everyone mojo/master 2a7e4e1 Sebastian Riedel: more unindent tests
23:10 good_news_everyone left #mojo
23:11 sri so i guess everybody is ok with unindent
23:12 jberger will there be indent as well? I don't really care, but it seems nicely symmetric
23:13 jberger also, this will be my first CPAN module to depend on 5.16 \o/
23:13 sri not unless there's a need in core
23:13 * jberger expected that response
23:14 sri extract_usage is still quite hack-ish https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Command.pm#L50
23:15 sri but i doubt there's a better way to do it
23:16 sri love how the command overview links to the usage messages now though http://mojolicio.us/perldoc/Mojolicious/Commands
23:16 sri http://mojolicio.us/perldoc/Mojolicious/Command/prefork#SYNOPSIS
23:18 * sri starts to wonder if he should disable syntax highlighting if a pre section starts with "Usage:"
23:18 sri only exception so far is "$ "
23:19 mire__ joined #mojo
23:23 good_news_everyone joined #mojo
23:23 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/kOwIyg
23:23 good_news_everyone mojo/master 9175c3c Sebastian Riedel: do not highlight usage messages
23:23 good_news_everyone left #mojo
23:23 sri yea :)
23:23 sri http://mojolicio.us/perldoc/Mojolicious/Command/prefork#SYNOPSIS
23:24 * sri wonders if a whitelist might be even better
23:25 sri maybe \$\w+|\@\w+|\%\w+ or so
23:27 * sri challenges everyone to find pod examples that don't $, @ or %
23:29 sri *use
23:31 jberger what was the reason to skip things that started with $ ?
23:31 jberger shell prompt?
23:31 sri yea
23:32 sri http://mojolicio.us/perldoc/Mojolicious/Lite#Commands
23:38 sri oh, i guess the arrow would be a good addition too
23:38 sri http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#What_does_Your_secret_passphrase_needs_to_be_changed_mean
23:41 sri oops... those get completely demolished http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Model_View_Controller
23:52 sri looks like i'll have to use sjn's code for unindent
23:55 sri or i allow it to fail
23:57 sri this is a real problem :S

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