Camelia, the Perl 6 bug

IRC log for #mojo, 2012-03-20

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

All times shown according to UTC.

Time Nick Message
00:01 sri hmm, i tend towards removing it again
00:41 GitHub75 joined #mojo
00:41 GitHub75 [mojo] kraih pushed 1 new commit to master: http://git.io/8_AeoA
00:41 GitHub75 [mojo/master] link to other helper plugin - Sebastian Riedel
00:41 GitHub75 left #mojo
00:47 tempire gotta leave it to see if it's useful
01:01 sri Y U NO TELL ME!
01:07 ilbot2 joined #mojo
01:07 Topic for #mojo is now Mojolicious real-time web framework ūüźę http://mojolicio.us ūüźę http://irclog.perlgeek.de/mojo/today
01:14 scott joined #mojo
01:18 jnap joined #mojo
01:25 SmokeMachine joined #mojo
01:25 sri hmm
01:26 * sri wonders if splitting up Mojolicious::Routes into a dispatcher and a route class makes sense
01:26 sri then ->namespace() and friends wouldn't even be available for nodes
01:43 sri Mojolicious::Routes::Route?
01:44 tholen42 joined #mojo
01:52 zivester joined #mojo
01:54 ispy_ joined #mojo
01:56 GitHub27 joined #mojo
01:56 GitHub27 [mojo] kraih pushed 1 new commit to master: http://git.io/TFtu2A
01:56 GitHub27 [mojo/master] added Mojolicious::Routes::Route - Sebastian Riedel
01:56 GitHub27 left #mojo
01:56 sri clean split between nodes and dispatcher
01:56 CromeDome joined #mojo
02:09 xaka joined #mojo
02:09 GitHub25 joined #mojo
02:09 GitHub25 [mojo] kraih pushed 1 new commit to master: http://git.io/92LICA
02:09 GitHub25 [mojo/master] fixed small condition bug - Sebastian Riedel
02:09 GitHub25 left #mojo
02:12 jwang joined #mojo
02:17 jnap joined #mojo
02:25 mattastrophe joined #mojo
02:42 sri "mojo eval 'app->routes->route("/")->namespace("Foo")'" -> "Can't locate object method "namespace" via package "Mojolicious::Routes::Route...""
02:42 sri \o/
03:08 SmokeMachine joined #mojo
03:14 SmokeMachine joined #mojo
03:28 SmokeMachine Hi, how can I know if exists a template for the current controller?
03:44 tholen42 joined #mojo
03:46 tempire What's a node?
03:46 purl a node is the id of the object in the database, not the row #
03:47 sri a route element
04:09 GitHub29 joined #mojo
04:09 GitHub29 [mojo] kraih pushed 1 new commit to master: http://git.io/967pSA
04:09 GitHub29 [mojo/master] added root method to Mojolicious::Routes::Route and deprecated dictionary in favor of conditions - Sebastian Riedel
04:09 GitHub29 left #mojo
04:19 Oleg left #mojo
04:45 xaka1 joined #mojo
04:47 xaka joined #mojo
04:48 xaka1 joined #mojo
05:08 bgsmith joined #mojo
06:08 Foxcool_ joined #mojo
06:35 kitt_vl joined #mojo
06:53 geck joined #mojo
07:54 spleenjack joined #mojo
08:24 amirite joined #mojo
08:29 preflex_ joined #mojo
08:36 cosmincx joined #mojo
09:05 hugh joined #mojo
09:44 abra joined #mojo
10:00 d4rkie joined #mojo
10:07 daxim joined #mojo
10:09 binaryking joined #mojo
10:09 binaryking tempire: ping!
10:10 batman joined #mojo
10:11 binaryking hey guys
10:11 binaryking I'm developing an app basically for web access
10:12 binaryking i wanna know that how do i use diff. perl files for diff. webpages?
10:13 binaryking like i'm specify the get '/' method for index.html.ep and i wanna keep /englang in a diff. perl file.
10:13 binaryking how can i do that?
10:45 amirite how do i control expiration headers w/ morbo
10:45 amirite i don't want javascript to cache
10:45 amirite sucks for development
10:59 memowe binaryking: do you want different templates (like index.html.ep) or different controllers?
11:03 memowe sri: (not too much)++ #magic
11:08 memowe pffff #binaryking
11:20 GabrielVieira joined #mojo
11:29 Oleg joined #mojo
11:33 Oleg Peroples, how to set session expiration in Mojolicious::Lite on browser close? I tried app->sessions->default_expiration(0); but browser doesn't send session cookie at all, even on next request
11:47 arne joined #mojo
11:47 arne HURRA!
11:47 judofyr joined #mojo
11:51 mire_ joined #mojo
11:53 * sri yawns
11:54 sri any thoughts about the Mojolicious::Routes/Mojolicious::Routes::Route split?
11:59 [R] Q: is there any cool, non-blocking xmlrpc client interface that one could recommend me to use together with my mojo apps? (I know xmlrpc sucks)
12:00 Oleg sri: Why after app->sessions->default_expiration(0); browser doesn't send session cookie? In perldoc "Mojolicious::Sessions" I read "Setting the value to 0 will allow sessions to persist until the browser window is closed". It seems this doesn't work for me
12:01 marcus magic/
12:21 sri Oleg: what do you think about the Mojolicious::Routes/Mojolicious::Routes::Route split?
12:25 bobkare [R]: I've had less pain with Protocol::XMLRPC than with most other xmlrpc implementations
12:25 Oleg sri: I am not familar with Mojolicious::Routes :)  Used only Mojolicious::Lite so far, without dipping into details
12:25 [R] bobkare: cool, thanks very much for your hint :-)
12:26 [R] bobkare: does it work in a non-blocking fashion together with in mojo subroutine?
12:26 sri Oleg: default_expiration(0) should work, i just looked, it has good unit tests
12:27 bobkare [R]: yeah, you have to supply your own http useragent, so you can use mojo's
12:28 bgsm joined #mojo
12:28 [R] bobkare: thats _very_ cool, thanks so much
12:28 [R] bobkare++
12:29 marcus mitmproxy is so awesome
12:34 GitHub7 joined #mojo
12:34 GitHub7 [mojo] kraih pushed 1 new commit to master: http://git.io/IPzOgw
12:34 GitHub7 [mojo/master] removed root method from Mojolicious::Routes::Route again - Sebastian Riedel
12:34 GitHub7 left #mojo
12:35 Oleg sri: Ok, I will try to make test to prove and submit bug report
12:42 mire_ joined #mojo
12:54 hugh joined #mojo
12:56 GitHub159 joined #mojo
12:56 GitHub159 [mojo] kraih pushed 1 new commit to master: http://git.io/cWuaEw
12:56 GitHub159 [mojo/master] improved memory usage of Mojolicious::Routes by moving conditions and shortcuts back - Sebastian Riedel
12:56 GitHub159 left #mojo
13:04 Oleg left #mojo
13:04 GitHub197 joined #mojo
13:04 GitHub197 [mojo] kraih pushed 1 new commit to master: http://git.io/WLEuOA
13:04 GitHub197 [mojo/master] made routes without conditions slightly faster - Sebastian Riedel
13:04 GitHub197 left #mojo
13:22 CromeDome joined #mojo
13:35 inokenty joined #mojo
13:49 GabrielVieira joined #mojo
14:28 sri ok, on to giving Mojo::IOWatcher a real name
14:29 sri suggestions so far... Mojo::Reactor
14:31 judofyr Mojo::MyLittlePony
14:32 sri Mojo::MyLittleJudofyr?
14:32 judofyr let's save that for Mojo::IOLoop
14:37 spleenjack joined #mojo
14:37 sri ioloop can't ever be renamed
14:37 judofyr :(
14:38 judofyr sri: if you could, what would you rename it to?
14:38 judofyr (except Mojo::MyLittleJudofyr)
14:43 sri actually not sure
14:43 sri ioloop is not such a bad name
14:43 judofyr eventloop is more accurate at least
14:43 sri not really
14:44 sri i think iowatcher is more of an eventloop
14:45 sri think i'll start calling ioloop a framework for non-blocking i/o clients and servers
14:45 sri and iowatcher the actual reactor
14:48 ki0 joined #mojo
14:58 sri judofyr: https://github.com/stevan/p5-mop # what i was talking about btw. :)
14:58 sri most of us have very high hopes for it
14:58 judofyr sri: yeah, I've heard a lot about the MOP; never really read throughly about it though
15:05 jnap joined #mojo
15:19 Oleg joined #mojo
15:20 Oleg Ok, default_expiration(0) works well :) It seems I forgot to update my Mojolicious
15:21 judofyr Oleg: \o/
15:22 GabrielVieira joined #mojo
15:27 xaka1 joined #mojo
15:39 jamesw joined #mojo
15:41 GitHub18 joined #mojo
15:41 GitHub18 [mojo] kraih pushed 1 new commit to master: http://git.io/zvw4YA
15:41 GitHub18 [mojo/master] renamed Mojo::IOLoop to Mojo::Reactor - Sebastian Riedel
15:41 GitHub18 left #mojo
15:42 sri ops
15:42 sri wrong commit message
15:42 sri iowatcher not ioloop :)
15:43 judofyr :)
15:43 inokenty sri: How did you do it so quickly?
15:43 judofyr inokenty: magic
15:43 GitHub39 joined #mojo
15:43 GitHub39 [mojo] kraih force-pushed master from 4489fec to add0768: http://git.io/BhzC7A
15:43 GitHub39 [mojo/master] renamed Mojo::IOWatcher to Mojo::Reactor - Sebastian Riedel
15:43 GitHub39 left #mojo
15:44 inokenty judofyr: Yep, pure magic
15:44 inokenty But.. how?
15:44 inokenty I wanna know
15:45 sri unicorns
15:45 purl unicorns is probably http://xrl.us/2dn5
15:46 d4rkie joined #mojo
15:46 Psyche^ joined #mojo
15:48 inokenty Is this operation painless for projects on older version of Mojolicious?
15:48 sri the whole iowatcher api is experimental
15:48 sri so i don't care
15:49 inokenty Ok
15:49 sri in fact, should some have problems with the change i'm going to yell at them for not giving me feedback :D
15:53 sri second design problem http://mojolicio.us/perldoc/Mojo/Reactor#watch
15:53 sri how to make that api as user friendly as possible?
16:01 xaka1 sri: readable(fd => sub ...), writable(fd => ...)? also every reactor handler could be Handler object with pause/resume/cancel methods? $r = reactor->recurring(...); $r->pause, $->cancel, ... ;)
16:01 Oleg left #mojo
16:02 sri that's silly
16:03 xaka1 btw, if it's called Reactor now, it would be cool to see SIGCHLD handler as EV does
16:04 sri and no, it would not
16:05 xaka1 you could re-use it in hypnotoad ;)
16:05 sri no, i could not
16:06 sri hypnotoad master is not event loop based
16:06 batman joined #mojo
16:06 sri if it was we would inherit wonky fork problems from all event loop backends that will ever exist
16:09 marcus hrm, is really reactor a better name?
16:09 marcus the only thing I think about when I hear it is NUCLEAR
16:09 sri \o/
16:09 sri it's the reactor pattern
16:09 xaka1 marcus: it's the pattern name so i like it more :)
16:10 xaka1 anyway it sholud be full-featured reactor with black jack and so on
16:10 xaka1 *should
16:14 mire_ joined #mojo
16:17 marcus and hookers
16:18 xaka1 marcus: ;)
16:25 GitHub88 joined #mojo
16:25 GitHub88 [mojo] kraih pushed 1 new commit to master: http://git.io/aY2Awg
16:25 GitHub88 [mojo/master] better reactor descriptions - Sebastian Riedel
16:25 GitHub88 left #mojo
16:30 xaka1 joined #mojo
16:48 mattastrophe http://mojolicio.us/perldo‚Äčc/Mojo/Template#trim_mark
16:48 mattastrophe line: $mt           = $mt->trim_mark('-');
16:49 mattastrophe should that be a '='?  All of the other examples use the default values.
16:50 sri no
16:53 GitHub166 joined #mojo
16:53 GitHub166 [mojo] kraih pushed 2 new commits to master: http://git.io/SSK0fg
16:53 GitHub166 [mojo/master] removed MOJO_REACTOR_DEBUG - Sebastian Riedel
16:53 GitHub166 [mojo/master] small documentation tweaks - Sebastian Riedel
16:53 GitHub166 left #mojo
16:55 sri marcus: got any alternative ideas to Mojo::Reactor?
16:55 marcus sri: IOWatcher? :D
16:56 sri but it doesn't just watch io!
16:56 marcus Mojo::Demultiplexer
16:56 sri someone has been reading wikipedia :D
16:57 marcus yes
16:57 sri that's where i go to for finding names too ;p
16:57 marcus Is that wrong? :p
16:58 marcus demultiplexer is a horrible name tho
16:58 marcus so hard to type
16:58 * marcus goes to fetch a burger & ponder
16:58 marcus planning to upgrade our google nexus phone to android 4 today
16:59 marcus using cyanogenmod
16:59 sri sounds sensible
16:59 * sri wants a burger too :(
17:01 mire_ joined #mojo
17:08 marcus Mojo::Switchboard?
17:09 sri Mojo::NUCLEAR
17:09 marcus \o/
17:09 marcus Can we spell it like Bush does?
17:10 sri Mojo::Nu::Cu::Lar?
17:10 marcus mmm
17:30 tempire Reactor is pretty deemed user friendly as it is
17:30 tempire derned, even
17:32 tempire There should be a link to maybe the Wikipedia article on what a reactor pattern is.  That's not immediately obvious from the name.
17:38 sri i would really like to stabilize that layer
17:39 kaare joined #mojo
17:40 sri timers and start/stop are a no-brainer
17:40 sri just io/watch is what i'm unsure about
17:42 sri $reactor->watch($handle, 1, 1); vs $reactor->watch($handle, READ | WRITE);
17:42 sri vs $reactor->watch($handle, 'rw');
17:43 sri vs $reactor->watch($handle, READ_WRITE);
17:43 athenot joined #mojo
17:43 sri vs $reactor->read_write($handle);
17:44 sri vs $reactor->readable($handle)->writable($handle);
17:45 sri i want it to be as minimalistic as possible, so avoiding guard objects
17:45 inokenty I think that 'rw' is appropriate, but 'READ | WRITE' is pleasant to read
17:46 sri the problem with 'rw' is that it can get a little tedious when you have multiple options in your code
17:47 sri https://github.com/kraih/mojo/blob/m‚Äčaster/lib/Mojo/IOLoop/Stream.pm#L164
17:47 sri the point of ->watch() is to be able to quickly switch with minimal cost
17:47 xaka1 guard object means something that "recurring" call would return?
17:48 sri just search for all ->watch calls in that module
17:48 sri it's constantly switching
17:49 sri true and false are much easier to compute from arbitrary conditions
17:52 tempire yes, 'rw' is annoying to code for.
17:53 tempire I like "1, 1".  it's really easy to grok, and it's basic perl.
17:53 * tempire wonders when he started using the term grok so often
17:53 xaka1 but "1, 1" means nothing when you read the code
17:57 tempire expected convention beats out spoken language in an imperative language
17:57 sri tempire: what about the combined readable/writable callback?
17:57 sri http://mojolicio.us/perldoc/Mojo/Reactor#SYNOPSIS
17:58 * sri wonders what happened to crab
17:59 tempire he's been out on the town
17:59 tempire http://empireenterprises.com/sk‚Äčitch//crab-20120320-105927.png
18:00 tempire my ($reactor, $handle, $writable, $readable) = @_;
18:01 xaka1 my opinion is that "watch" VS "readable/writable" depends on what is more usual in this world - either listening for both read/write events or the only one. Mojo could be good example of that
18:01 tempire if you're struggling with understanding code, that extra bit helps a lot
18:03 tempire I'm ok with READ | WRITE by the way.  But I'm fine with 1, 1.
18:05 tempire especially the way it's explained in http://mojolicio.us/perldoc/Mojo/Reactor#watch
18:06 tempire it's 1, 1 is immediately understandable by common perl convention.
18:06 tempire s/it's//
18:07 tempire actually, the first thing I'd do if I needed this in code is wrap it behind a functional name anyway.
18:07 GabrielVieira joined #mojo
18:10 sri yea, it's rather low level
18:10 GabrielVieira hey, how can I find out if there is a template to the current controller?
18:10 sri tempire: what do you mean with "my ($reactor, $handle, $writable, $readable) = @_;"?
18:11 tempire is that's what you were asking about?
18:11 sri currently $writable is true or false
18:11 tempire yes, I'm just saying it's easier to understand if you include an extra item in that list.  it's a nit-pick.
18:12 sri not sure i get it
18:12 sri $readable would serve no real purpose
18:19 xenu meh, no Mojolicious::Plugin::Mongodb in ActivePerl's PPM ;_;
18:19 xenu so i have to install it from cpan...
18:21 GabrielVieira hey, how can I find out if exists a template to the current controller?
18:23 tempire GabrielVieira: a template isn't associated with a controller specifically.  do you mean check if it's in templates/controllername/?
18:24 GabrielVieira tempire: if the coder uses get '/' => 'index', how can I check that 'index' is the template for '/'?
18:27 GitHub112 joined #mojo
18:27 GitHub112 [mojo] kraih pushed 1 new commit to master: http://git.io/lHD7aQ
18:27 GitHub112 [mojo/master] clarify Mojo::Reactor documentation - Sebastian Riedel
18:27 GitHub112 left #mojo
18:28 GabrielVieira tempire: could you understand?
18:28 GabrielVieira I want to generate a template if none was set to the current controller
18:30 tempire GabrielVieira: I don't know
18:30 sri hmm, as much as i would love to stabilize Mojo::Reactor, i don't see it happening in this release :/
18:31 GabrielVieira :T
18:31 GabrielVieira tkz
18:34 tempire game room by cpanel at yapc.  neat.
18:38 GabrielVieira sri: can you help me how I can find out with a template was set ( via => 'template_name' or if the template file exists) to a controller?
18:39 * sri is busy preparing a release
18:45 memowe sri++ #2.63
18:45 memowe Now I can get rid of that /s :)
18:45 sri \o/
18:48 sri wait a minute, that module is the opposite of what i expected :)
18:48 sri ops
18:49 sri https://metacpan.org/module/PEVANS/IO-Asyn‚Äčc-Loop-Mojo-0.01/lib/IO/Async/Loop/Mojo.pm # btw
18:50 memowe Yay, works great. #2.63
18:54 sri hmm, now that other event loops hook into ours stabilizing should be a top priority
19:01 GitHub17 joined #mojo
19:01 GitHub17 [mojo] kraih pushed 1 new commit to master: http://git.io/5a9yFw
19:01 GitHub17 [mojo/master] mention that the watch method accepts true and false values - Sebastian Riedel
19:01 GitHub17 left #mojo
19:04 * tempire really wants his twitter for mac client back
19:05 GitHub147 joined #mojo
19:05 GitHub147 [mojo] kraih pushed 1 new commit to master: http://git.io/upHNOg
19:05 GitHub147 [mojo/master] update EV description as well - Sebastian Riedel
19:05 GitHub147 left #mojo
19:15 * sri wants a better twitter client for mac :/
19:15 sri tweetbot for mac or so
19:16 tempire trying twitterific
19:16 tempire hrm.
19:17 tempire oh, twitterific isn't so bad with the sidebar hidden
19:21 * memowe liked the old Tweetie.
19:21 omega I'm using twitterific, because it isn't awful, and has tweet marker support
19:21 tempire !
19:21 tempire finally got twitter for mac working again
19:28 * sri really wants something with tweetmarker support
19:29 tempire twitterific has that
19:30 sri yea, but it's not pretty :/
19:30 tempire well.  it's prettier than yorokfurofu
20:06 burk joined #mojo
20:33 sjn joined #mojo
20:45 kmx joined #mojo
20:47 lukep joined #mojo
20:55 marcus latest oosfora isn`t so bad.
20:55 marcus but I still dream of tweetbot for mac.
20:57 omega marcus: I only find osfoora for iOS?
20:58 marcus why? :
20:58 marcus :p even
20:58 marcus http://itunes.apple.com/no/app/osf‚Äčoora-for-twitter/id502401238?mt=12
20:59 omega not sure
20:59 omega http://www.osfoora.com/
20:59 omega ended up there
21:00 marcus http://osfoora.com/mac
21:00 mercutioviz joined #mojo
21:12 tempire looks pretty enough.
21:12 tempire now that I've got the twitter for mac client working, I'm happy.
21:19 tempire wow, I didn't get it before, but now I understand why icon fonts are awesome.
21:19 tempire http://css-tricks.com/examples/IconFont/
21:20 CromeDome joined #mojo
21:33 GitHub46 joined #mojo
21:33 GitHub46 [mojo] kraih pushed 1 new commit to master: http://git.io/wEmkpA
21:33 GitHub46 [mojo/master] deprecated Mojolicious::Routes->controller_base_class in favor of Mojolicious::Routes->base_classes - Sebastian Riedel
21:33 GitHub46 left #mojo
21:36 sri iconfonts have problems at smaller sizes though
21:41 sri https://github.com/php/php-src # watching the commits should be entertaining
21:54 GitHub73 joined #mojo
21:54 GitHub73 [mojo] kraih pushed 1 new commit to master: http://git.io/ICjrlA
21:54 GitHub73 [mojo/master] documentation tweaks - Sebastian Riedel
21:54 GitHub73 left #mojo
21:59 sri purl: seen crab
21:59 purl crab was last seen on #mojo 12 days, 6 hours, 23 minutes and 21 seconds ago, saying: there are hundreds of people watching you and laughing quietly to themselves at this very moment  [Mar  8 15:35:55 2012]
22:11 abra joined #mojo
22:22 Cyrus joined #mojo
22:29 sri tempire: what happened to your asset pipeline btw?
22:32 * sri is starting to get why judofyr was so impressed by https://github.com/celluloid/celluloid-io
22:41 perlite joined #mojo
22:51 lammel2 joined #mojo
23:08 tempire it's part of a current project.  I'll release it after I've used it for a bit.
23:09 tempire right now each template has % asset '[assetfile]'
23:09 tempire not sure if that is best or whether a central mapping per file is best.
23:15 sri %= asset 'foo' seems reasonable
23:16 sri you have nother helper to compile assets right?
23:16 sri like $self->asset(foo => ['jquery/foo.js', 'bar.js']);
23:23 tempire actually, in the template: % asset css => 'css file'
23:23 tempire in the appropriate place in the layout, %= assets 'css'
23:23 sri hmm, that's unexpected
23:24 tempire er, %== assets 'css'
23:24 tempire it doesn't compile yet.  just lists them.  another reason I haven't released it.
23:24 sri wrap the result in a Mojo::ByteStream to avoid escaping
23:24 sri oh i see
23:25 tempire oh good. I didn't like the %==
23:25 tempire is there any way to avoid a newline without <%= =%>?
23:25 sri nope
23:28 tempire even with compiling, I'd like to just have %= assets 'css', which would compile and include appropriate tags.
23:28 sri i wouldn't push compiling down to the template
23:30 sri app->css(main => ['main/*.css']); .... %= css 'main'
23:31 sri compile assets on startup into a custom public directory
23:31 sri compare mtime for updates
23:32 sri generate funky urls like /assets/main-13244243998742847.css
23:33 tempire I don't see why it's necessary to create classifications of assets.
23:34 sri preprocessing
23:34 sri you want to support minifying
23:34 sri possibly precompile less, sass, coffeescript at some point in the future
23:35 tempire could that not be handled in the first request?
23:36 sri plugin Assets => {css => ['CSS::Minifier']};
23:36 sri why would you want that?
23:37 sri if you do it on startup you can do it before the server even starts
23:38 sri you could change the target directory based on mode, so you don't commit compiled files
23:38 sri mojolicious will happily serve static files from wherever you like
23:41 sri on the other hand... you could just add an assets directory and exclude that in gitignore :)

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