Camelia, the Perl 6 bug

IRC log for #mojo, 2012-06-21

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

All times shown according to UTC.

Time Nick Message
00:07 jventer left #mojo
00:45 Akron joined #mojo
00:53 Akron Regarding ua-plugins: I don't see why this has to be a complete different "plugin" concept, if all it can do changing hooks localy (if I am right) it should rather be a concept similar to shortcuts for routes (although I again don't know if shortcuts with returning routes are supported .. but I always use non supported awesomeness ...). I really like the possibilities of M::Plugins and...
00:53 Akron ...sometimes a concept like "gzip" an have a lot of different aspects to it, as  part of a cache-helper, a shortcut for static content, and maybe as part of a ua. So something like "add_ua_helper" I would like, but not a different extension sphere like Mojolicious::Commands.
00:54 Akron "do [is] changing", localy -> locally, an -> can
00:54 sri Akron: for now i'd rather not add more types of helpers
00:55 sri the plugin proposal was just for hooking into events
00:55 laouji joined #mojo
00:56 sri and yes, shortcuts returning routes are very much supported
00:56 Akron sri: Buut that's something I already can do, right? So the proposal was merely limiting these changes to one ua?
00:56 sri it's what they are meant to do :)
00:56 sri Akron: not sure i follow
00:56 Akron sri: Puhhh! :)
00:56 Akron Well, I already can hook into events of the ua, right?
00:57 sri you can't add helpers to the user agent
00:57 sri oh, yes
00:57 sri plugins were just for packaging common extensions
00:57 sri (which are not many apparently)
00:57 Akron So your proposal was just something that says "make these events do something with ths special ua", right?
00:58 sri ye
00:59 Akron I can see a gzip-Plugin for many reasons, so "add_ua_helper" (or whatever) would be great, but ua->plugin("gzip") sounds like a "different sphere". Just like commands, that can't be bundled in a Mojolicious::Plugin.
01:00 Akron I would like a gzip plugin to be able to give me shortcuts, give me helpers, give me event hooks ... all the stuff with a common idea in mind.
01:00 Akron (And a common codebase ;))
01:02 scott_ joined #mojo
01:02 sri i don't see that happening anytime soon
01:03 sri we encourage plugins to use their own user agent instances
01:03 Akron (sri: Hmmm ... although the shortcut example returns a route, I think it's not clear from the routing guide how cool it is to be able to pipe a couple of them.)
01:05 Akron sri: So whenever I set UA-Hooks in a plugin they are used everywhere, right? And that's the problem you wnt to circumvent with a ua-helper (and I say "helper", as I think it's closer than the plugin instanciation codification of "plugin")?
01:05 sri no
01:05 sri they are local to the ua instance
01:06 Akron Oh. I didn't know that. (Never played with them.) Just let me have a look ...
01:06 sri it's pretty much only the start event atm
01:07 sri from which you get access to more events in the transaction
01:07 Akron Ah, yeah, I see. I was wrong, sorry.
01:07 Akron Well, than it's pretty close to the shortcut concept, right?
01:08 sri there are no helpers
01:08 sri no AUTOLOAD
01:08 sri just an event ;p
01:09 sri i actually never planned ua helpers
01:09 Akron Okay okay ... I mean - shortcuts modify locally a route, and your ua plugin concept would locally modify a ua by llowing to bundle event hooks.
01:09 Akron allowing
01:10 sri yes
01:10 sri it's like hooks
01:10 sri hooks are local to an application instance too
01:10 sri if you have embedded apps then they all have their own set of plugins
01:11 Akron Sure, but with ua->on they are local like "under your blanket".
01:12 Akron Which is, by the way, great and I can eventually see problems with know default global secrets btw.
01:12 Akron know -> now.
01:12 sri what problems?
01:13 Akron Maybe I don't want to share a session.
01:13 sri then you set a different cookie name
01:14 sri :)
01:14 Akron That would mean I always have to influence the codebase I embed.
01:15 sri if you don't share it they just crash and burn
01:15 sri so you have to influence the codebase anyway
01:16 sri one will always invalidate the session cookie of the other if they have different secrets
01:16 Akron So it should be encouraged to set my own cookie name, right?
01:16 sri not really
01:16 sri after todays change you just share the session
01:17 sri like you shared the stash before already
01:17 sri you can customize it all, but that seems a sensible default to me
01:17 Akron Hm ... right.
01:18 Akron I wasn't clear about the stash thing before today, but you are right. Seems to be rational.
01:19 * sri wonders if there really needs to be a catch everything route recipe n the routing guide
01:20 Akron However ... where were we? Oh yes: Yeah for "add_ua_helper" (or whatever ... "add_behviour" maybe), Booh for a different plugin sphere.
01:20 Akron sri: What do you mean?
01:21 Akron And it would be extremely cool to be able to add commands in plugins for 4.0. ;)
01:21 sri earlier MisterHatt complained that he had to override so much in Mojolicious, and it wasn't obvious to him that a /*whatever route would catch everything and disable the default 404
01:21 sri Akron: you can do that already :)
01:22 Akron Oh, yeah, I read that. However he said, he hadn't the dev bg ... so it might be obvious for devs.
01:22 sri push @{$app->commands->namespaces}, 'Mojolicious::Plugin::Fun::Command';
01:22 Akron I have to create a new Command-package as far as I know.
01:22 sri yes
01:22 Akron Sure, that's how I do it.
01:23 zivester_ joined #mojo
01:23 sri got a better idea?
01:24 * sri suspects you want app->commands->add_command(foo => sub {...})
01:25 Akron Something like app->add_command(desc => ..., run => sub { ... }).
01:25 Akron Yeah ... I'm too predictable.
01:25 sri i tried that once, but got annoyed with setting meta data
01:26 Akron You mean enforcing metadata?
01:26 sri enforcing and setting it for every command
01:26 sri usage messages
01:27 Akron It may not be good in every case, so Mojolicious::Command is pretty useful, but sometimes ...
01:27 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Command/get.pm#L15 # <- fun!
01:27 Akron For example commands that just release hooks once.
01:28 sri i can see your point
01:28 Akron Yes. That's nothing I want to do in sub params. ;)
01:29 Akron It's like M::Controller and to => sub { .... }. There are different use cases.
01:29 Akron Sorry -> to(cb => sub {... }.
01:34 Akron Damn late ... I have to go. Thanks for your time and patience! Good night!
01:34 sri nn
01:34 GabrielVieira joined #mojo
01:43 d4rkie joined #mojo
01:54 diegok joined #mojo
02:07 noganex_ joined #mojo
02:26 sri tempire, marcus: what do you think about a command redesign?
02:41 * sri really doesn't like the idea of a hybrid class+closure design, but wouldn't be opposed to a complete revamp
03:18 CromeDome joined #mojo
03:24 cfm joined #mojo
03:26 cfm Just want to give props to the Mojolicious presentation at YAPC! It was awesome!
03:35 tempire :D
03:36 tempire sri: what would be the reasoning behind it?
04:02 Leandr joined #mojo
04:44 memowe_ joined #mojo
05:03 xaka joined #mojo
05:08 preflex joined #mojo
05:15 Leandr joined #mojo
05:34 laouji joined #mojo
05:45 AmeliePoulain joined #mojo
05:50 AmeliePoulain joined #mojo
05:52 ver joined #mojo
06:02 Foxcool joined #mojo
06:08 ovnimancer joined #mojo
07:18 fhelmber_ joined #mojo
07:20 Foxcool joined #mojo
07:30 vishwanathms joined #mojo
07:30 vishwanathms_ joined #mojo
07:32 Vandal joined #mojo
07:37 vishwanathms left #mojo
07:38 vishwanathms joined #mojo
07:38 vishwanathms_ joined #mojo
07:39 vishwanathms joined #mojo
07:39 vishwanathms_ joined #mojo
07:40 mike_ joined #mojo
07:46 pau4o joined #mojo
08:26 cosmincx joined #mojo
08:32 rem_lex| joined #mojo
08:34 cosmincx joined #mojo
08:34 scott_ joined #mojo
08:44 pau4o joined #mojo
08:50 ncc joined #mojo
08:52 ncc hello .. if I want my application to launch a "generate app" command, how should i do ? .. i'm trying this, but it doesn't work, plus I don't know how to specify a directory : my $app = Mojolicious::Command::generate::app->new;   $app->run(($name));
08:54 spleenjack joined #mojo
09:15 lukep joined #mojo
09:23 ncc sri: are you there ?
09:31 diegok tempire: it doesn't happen here. It asks for my credentials everytime I try to deploy my mojo app. It works ok when using 'heroku' cli.
09:34 bc547 tempire: very nice presentation at yapc
09:44 pau4o joined #mojo
09:54 Foxcool joined #mojo
10:08 Foxcool joined #mojo
10:15 Properler joined #mojo
10:19 Properler joined #mojo
10:22 knshaum joined #mojo
10:31 daxim joined #mojo
10:43 mire joined #mojo
10:57 marty joined #mojo
11:01 sri tempire: commands are currently not very popular
11:01 mikegrb ake
11:01 diegok sri: deploy to heroku command is "fantastic" ;-)
11:02 sri diegok: i mean as a platform ;)
11:02 diegok ok :)
11:02 sri so i'm wondering if it would be more commonly used if it used normal plugins and closures
11:03 xaka joined #mojo
11:03 sri app->commands->add_command(deploy => sub {...}, description => '...', usage => '...');
11:03 diegok hm, so you load commands as app plugins instead of mojo wide?
11:04 sri ye
11:04 stephan48 would definitively be cool
11:04 sri plugin 'GetCommand';
11:05 diegok but.. in a lot of use cases commands are generators and should exists without any app...
11:06 stephan48 maybe allow both?
11:06 diegok sure that's cool, but mojo wide ones are also cool...
11:06 stephan48 plugin specific and global plugins
11:06 diegok yup
11:07 stephan48 this way you get the best of both approches, plugin specific if the app needs the plugin configured for the command, and global for generators
11:07 sri how would global ones work?
11:07 stephan48 Mojolicious::Commands::*
11:07 stephan48 like now
11:07 sri :(
11:08 stephan48 mh?
11:08 sri i hate the hybrid idea, makes the code very ugly
11:08 stephan48 we would need to retain that anyway for some releases, to keep backwards compat
11:08 stephan48 k
11:08 sri nope, major release can break everything
11:09 sri backcompat is only an issue again after 3.0
11:09 stephan48 such break i would do for 4.0 because introducing such a break days before 3.0 is released without a longer aknowlidging period seems bad to me
11:10 sri that's silly
11:10 sri we could just wait a few more weeks with 3.0
11:10 stephan48 if thats an option ok
11:11 sri we have to wait for IO::Socket::IP 0.16 anyway
11:11 stephan48 i just dont feel confidently about it when you break that behaviour and then release like on the beginning of next week
11:11 stephan48 comfortable*
11:11 sri i don't see how waiting would make any difference at all
11:12 stephan48 cpan authors could adapt their modules to a different mechanism?
11:12 diegok I've stopped my deploy script of updating mojolicious after I can see i18n working as a separate plugin... but I don't see a change in commands breaking anything here...
11:12 sri never happened before
11:12 nic c'mon IO::Socket::IP, WE'RE WAITING!
11:13 stephan48 okey
11:13 stephan48 then i never complained :)
11:13 sri and nobody should blindly upgrade to a major release
11:13 stephan48 a regular cpanm Mojolicious and the damage is done
11:14 sri don't do that on production machines
11:14 diegok I've just stopped :-p
11:14 stephan48 hehe
11:14 stephan48 i usually just do it when i see a bug, or what i believe to be a bug, or i need some new feature
11:15 diegok I use the same on my dev machine, so if it runs on my box, it should run on the same version in production :)
11:16 nic What if there was an upload between those two events?
11:17 diegok on the other hand, it was a problem when hypnotoad stopped reading .conf because I was using morbo... but it was an easy fix :)
11:17 pau4o joined #mojo
11:17 diegok nic: then everything can happen.
11:18 diegok nic: sure, it's not a great idea what I had :(
11:19 nic mojolicious being pure perl makes safe deployment easy
11:20 sri i kinda would like to rename Mojo::Command to Mojolicious::Command
11:20 sri hmm
11:20 nic In contrast, ssl is a bit of a biatch
11:21 nic (if you've compiled your own perl)
11:24 nic sri: What is the rationale between Mojo vs Mojolicious -- I can remember finding that a bit confusing in the beginning
11:24 nic It doesn't help that there's a MojoMojo and that MojoX is old
11:24 sri Mojolicious is the framework, Mojo the framework building toolkit
11:25 nic I see
11:25 sri Mojolicious is mostly made up stuff, Mojo mostly based on RFCs
11:26 sri i guess it's arguable where Mojo::Command belongs
11:27 sri it contains some basic functionality, but is also the base class for all commands, which are a Mojolicious thing
11:27 ncc sri: so, how can I launch a "generate app " from my code ?
11:28 sri ncc: i'm usually not very helpful when i'm busy with design
11:29 ncc sri: haha, ok .. good luck, sorry
11:30 sri hmm, maybe it really is best not to touch commands
11:35 human39 joined #mojo
11:39 human39 joined #mojo
11:41 human39 joined #mojo
11:43 sri while i like the idea of ad-hoc commands, i really hate having two command eco systems
11:44 sri you'd have to decide between Mojolicious::Command::foo and Mojolicious::Plugin::FooCommand
11:45 nicolasbd i think Mojolicious::Command::foo is better than the plugin way
11:45 nicolasbd the actuel "two eco systems" isn't that bad : it's coherent to me
11:46 nicolasbd Mojo::Command = command "base" class
11:46 nicolasbd and Mojolicious::Command uses it as for others Mojo "base" classes I guess
11:46 nicolasbd it's a good design to me
11:47 memowe_ \o/
11:48 sri hmmmm
11:48 sri \o\
11:55 GitHub94 joined #mojo
11:55 GitHub94 [mojo] kraih pushed 1 new commit to master: http://git.io/7P-Pfg
11:55 GitHub94 [mojo/master] do not search the obsolete Mojo::Command namespace - Sebastian Riedel
11:55 GitHub94 left #mojo
11:56 nicolasbd why \o/ and \o\ ?
11:57 nicolasbd am i wrong to say so ? :/
11:57 sri /o/
11:58 nicolasbd c'mon please it's hard to understand sarcasm :)
11:58 sri throw your hands in the air!
11:59 nicolasbd ok, sorry .. \o/
11:59 sri \o/
11:59 sri we are cheering a lot around here ;)
12:00 nicolasbd i can see that now
12:00 nicolasbd (i solved my problem with commands by the way, so i can cheer myself : |o| \o/ /o/ )
12:01 sri then you can solve my problem now :)
12:01 nicolasbd the design problem ?
12:01 * sri nods
12:02 * nicolasbd wonders if sri nods up/down or left/right
12:02 sri up/down
12:03 nicolasbd i didn't follow the start of the conversation : why is the current design a problem ?
12:04 sri because it's not very commonly used
12:04 sri the question is if that's a problem of the current design and if ad-hoc commands would make it better
12:05 sri ad-hoc being app->commands->add_command(deploy => sub {...}, description => '...', usage => '...');
12:09 nicolasbd sri: maybe people doesn't need them .. but the actual way is very great, I had to use it to tell morbo to watch a specific directory, or to generate an app from my app .. the syntax you're suggesting is far more complicated than most of the actual mojolicious commands, and functions in general
12:10 sri interesting you say that
12:15 nicolasbd why ?
12:15 sri because so far i got the impression that those ad-hoc commands are easier to grok
12:16 nicolasbd maybe i didn't understand it
12:17 nicolasbd how would you translate something like : "my $app = Mojolicious::Command::generate::app->new; $app->run($name);" in the new way ?
12:18 nicolasbd by the way, how can I define a working directory for this command only ? I tried $app->rel_dir("./folder") but didn't work
12:18 sri app->commands->cache->{'generate app'}->{cb}->($name) or so
12:19 sri there is no built in way to change the directory
12:20 nicolasbd i prefer the actual command system .. it's more "high level" and "understandable" .. the command is just like a core function of mojolicious, and that's why I find it easy to use, I don't have to know what is done
12:21 nicolasbd (ok for the directory stuff)
12:25 nicolasbd so, you definitely want to avoid the actual way ?
12:26 sri i have no idea what i want :)
12:26 nicolasbd (i never worked on an open source project, and i'm kinda new to perl & mojolicious .. but the "directory" option in the generate app command seems to be something i can handle .. but don't know how to proceed)
12:27 nicolasbd sri: don't bother yourself with that, then .. :) commands are great like that
12:30 nicolasbd (see how i try to influence you ? i'm from the Great Mojolicious Lobbyist Association)
12:33 sri :D
12:34 sri btw. you prolly want something like chdir($app->rel_dir('foo/bar')), but i'm just guessing
12:35 nicolasbd i'll give it a try .. i was writing something with "move" after the app is being created, but chdir looks better
12:36 nicolasbd great! thank you
12:37 nicolasbd i don't know why i have to use "chdir" AND "rel_dir" but it's ok
12:37 sri rel_dir generates paths portably
12:38 sri you could also use File::Spec yourself
12:38 nicolasbd so chdir is not just about my "$app" and i sould take it back to ".." after my operation ?
12:38 sri whole process
12:38 nicolasbd ?
12:39 sri it affects the whole process
12:40 sri the fact that you are using a command like that does seem a bit awkward though
12:40 nicolasbd ok .. it looks like it didn't change the working directory of the app, since if i run the function a second time, it works fine too
12:41 nicolasbd yes but i want to generate app in a subfolder of my actual app (in "/apps"), so i have to do that
12:41 sri "cd apps; mojo generate app Whatever; cd .."?
12:42 nicolasbd i run the command from my running app
12:43 sri that sounds dangerous
12:43 nicolasbd why that ? :/
12:43 sri why would you do that?
12:45 nicolasbd *ahem* .. i know it's not a big secure application, but it's intend for an internal use : i'm making a webdesktop, and the admin can generate sub apps in a sub folder named "apps", and each one of them can be mounted as a plugin (or not), in order to be used by the desktop (following a specification) .. it's just an easy way for the admin (= myself) to
12:45 nicolasbd generate apps "on the fly"
12:45 sri :o
12:46 nicolasbd you think it's crazy ?
12:46 sri yes
12:47 sri but i'm not sure if in a good or bad way yet ;p
12:47 nicolasbd and dangerous ?
12:47 nicolasbd haha ok
12:47 nicolasbd it works fine for now
12:47 nicolasbd i know it might be insecure, but as long as the admin know exactly what the sub app do .. no problem
12:48 nicolasbd for us, I mean, as the desktop is not intended to be used by anyone
12:49 nicolasbd anybody ?
12:49 nicolasbd don't know what is the right word here ..
12:51 nicolasbd and the users can only "install" & run apps validated by the admin
12:51 gryphon joined #mojo
12:52 nicolasbd and the main app will only mount the apps the user installed .. i can show you when it's all functionnal
13:09 Psyche^ joined #mojo
13:10 Debolaz[Lo] joined #mojo
13:11 memowe joined #mojo
13:13 gsocker joined #mojo
13:15 gsocker Hi, is there a good way to deal with displaying content of mysql select result in nicee html table?  i would like to have all sort asc/desc already implemented.
13:19 daxim joined #mojo
13:19 CromeDome joined #mojo
13:23 asarch joined #mojo
13:23 osprey joined #mojo
13:26 marty gsocker:  If you can return the query results as a json object you can use a jquery widget like jqgrid or kendui grid to display the table.   If not, you'll just have to loop though the return results and build your table.
13:30 gsocker thanks
13:31 gsocker is it possible to make "select_field" have "selected" parameter on?
13:32 jnap joined #mojo
13:46 marty I think you can do selected => 1 in the attributes array
13:47 nic What is a clean way to use 'www' in place of 'public'?
13:47 nic I'm guessing it looks like push(@{...}, app->root->rel_dir('www'))
13:47 nic I think I saw an example a while back but can't pin it down now
13:48 nic hm, app->home->...('www')
13:52 marty nic:  Is this what you are looking for?   http://search.cpan.org/dist/Mojolici​ous/lib/Mojolicious/Static.pm#paths
13:53 nic push(@{Mojolicious::Static->new->paths}, ...)
13:53 nic heh, yes, thanks marty
13:56 nic push( @{Mojolicious::Static->new->paths}, Mojo::Home->new->rel_dir(q{www}) )
13:57 nic woops
13:58 nic unshift( @{Mojolicious::Static->new->paths}, Mojo::Home->new->rel_dir(q{www}) )
14:02 nic k, that was rubbish
14:20 Leandr joined #mojo
14:21 batman joined #mojo
14:30 d4rkie joined #mojo
14:40 rnp joined #mojo
14:40 rnp greetings from nyc
14:40 * marcus waves from Oslo
14:40 rnp trying to figure out the best way to cache an object on per session basis - is this even possible?
14:42 marcus rnp: there's no cache layer in Mojolicious?
14:44 rnp marcus: this behaves akin to storing an object in $self->app, no? at the global level
14:44 rnp marcus: that is Mojo::Cache i was speaking about
14:45 marcus rnp: Mojo::Cache is mostly an internal thing.
14:45 marcus rnp: I recommend using a proper cache like memcached or varnish (depending on what you need to cache, and at which layer)
14:48 sri https://github.com/kraih/mojo/pull/342 # <- this scares me, i think he's using ojo for actual scripts
14:49 osprey left #mojo
14:51 rnp marcus: hmm i suppose what im trying to do here is maintain state for each user so that objects aren't recreated every time they navigate through the page
15:04 nicolasbd sri: is there something like moose method modifier "before" in mojolicious controller ? would be great to check the session before executing a method for example
15:05 nicolasbd maybe with "on" ?
15:13 daxim http://stackoverflow.com/questions/11141068/how-to​-relaod-the-mojolicious-built-in-webserver-daemon
15:23 asarch joined #mojo
15:46 Leandr joined #mojo
15:49 russum joined #mojo
15:59 vishwanathms joined #mojo
15:59 vishwanathms_ joined #mojo
16:03 russum joined #mojo
16:23 alester hey daxim
16:26 mire joined #mojo
16:29 daxim o hi, what's the matter?
16:40 pau4o left #mojo
16:47 alester I just wanted to tell about how I gave you big props in my YAPC talk
16:48 alester I talked about translation as a way to participate in open source without having to do programming.
16:48 alester and so I showed off bobby-tables.com and explained how you set up the infrastructure and did the German trnaslation to start it off.
16:48 alester I hope it triggered some ideas for folks.
16:49 * daxim grins
16:49 alester Did I ever get back to you on the infrastructure stuff you wanted to chagne?
16:49 daxim no
16:49 alester sorry about that.
16:50 alester I say run with it.
16:50 alester Agreed that it's weird to have translations.html on the site.
16:50 daxim good
16:50 alester And if Module::Build is more better than EU:MM, hey, drive it.
16:50 alester I don't know M:B at all, but I trust your mojo.
16:50 alester So to speak.
16:51 daxim currently it's plain make + shoe string + bubble gum
16:51 alester Right
16:51 alester There are two things that I think we should hcnage for future maintainability
16:52 alester 1) Do MD headings as "# heading" instead of that "heading\n=======" stype.
16:52 alester style.
16:53 alester 2) make links be done with footnote style.  URLs are currently part of the strings to be translated, and that seems like it's likely to break things when we have to change/fix URLs.
16:53 alester We need to make the text as text-only as possible.
16:53 GitHub196 joined #mojo
16:53 GitHub196 [mojo] kraih pushed 1 new commit to master: http://git.io/BpfuZg
16:53 GitHub196 [mojo/master] reflow generator template - Sebastian Riedel
16:53 GitHub196 left #mojo
16:54 daxim aha, that should cut down a bit on the translation churn
16:54 alester That's my hope.
16:54 alester As it is now, if I have to change a URL, I need to change it in the original .md file, and then also the two .po files, right?
16:55 daxim yes
16:57 alester We're averaging about 100 visits/day.  except for 1500 on April 12, and 3600 on April 27 and 2800 on the 28th.
16:57 alester I wonder where it got posted.
16:58 daxim I thought you copy the site to your own server, don't you keep referer logs?
16:58 alester I'm looking in Google Analytics right now
16:58 alester 9800 visits from stackoverflow
16:59 daxim oh wow, that could've been my "fault" even
17:00 alester heh
17:00 alester This makes me happy: People using it as a resource. http://stackoverflow.com/questions/1​0370932/updating-db-from-grid-array
17:01 alester Which was exactly why I did it.
17:02 daxim I always link to the site when appropriate
17:15 zivester joined #mojo
17:38 batman joined #mojo
17:41 tempire sri: It seems like the change would break the "myapp somecommand" functionality
17:42 tempire having to specify a plugin would be cumbersome for things like deploy
17:43 tempire as for popularity, I think people just don't know about it
17:43 tempire the deploy command is the only one that's even been marginally marketed outside the core distribution
17:43 tempire I would suspect people don't realize it's something meant for easy extention
17:43 tempire *extension
17:43 tempire we need more deploy commands
17:44 tempire I wonder if it would do any good to make a call for deploy commands to different services
17:44 tempire bc547: thanks
17:45 sri tempire: yea, i don't know
17:45 tempire diegok: that is strange
17:45 tempire diegok: can you do a test, and determine whether the command is indeed creating ~/.heroku/credentials?
17:46 tempire (rename the existing file first)
17:46 tempire diegok: what os/perl ver?
17:46 tempire what are the popular services the kids are using these days?
17:46 tempire heroku, dreamhost
17:47 tempire amazon ec2 (I'm guessing)
17:47 * tempire pokes everyone
17:47 tempire what do you deploy to?
17:47 tempire there are 5 cpan distributions that use Mojo::Command right now
17:48 GabrielVieira joined #mojo
17:48 sri tempire: what do you think about Mojo::Command vs Mojolicious::Command?
17:48 sri where does the module belong?
17:49 tempire Mojo::Command makes sense to me because it's generally the "mojo" command
17:49 sri haha... but the actual mojo command uses Mojolicious::Commands! ;p
17:51 tempire well, I guess it would make more sense
17:51 tempire if the command authors would only have to change that module reference, I'm ok with the change.
17:52 sri i think two methods would become Mojo::Util functions too, but nobody depends on that i believe
17:53 sri maybe you
17:53 sri ;p
17:53 sri oh wait
17:54 sri there's a bigger problem, people depend on Mojo::Command->get_data
17:54 tempire I want to know how sharifulin is using ojo
17:54 tempire mind if I reopen that issue?
17:54 sri tempire: knock yourself out
17:57 sri most of the renderer plugins use Mojo::Command to get at the DATA templates :S
17:57 tempire I presume that would go into mojo::util
17:57 sri or Mojo::Loader
17:58 tempire how many template modules are there?
17:58 sri awesome... now cpan grep is down :(
17:59 * tempire always forgets about that site
17:59 sri Mojo::Command might turn out to be a very hard to get rid of
18:00 sri xslate and tt should be using it
18:01 sri or maybe cpan grep data was outdated last i looked
18:01 sri the renderer does have helper methods for that after all
18:02 sri http://mojolicio.us/perldoc/Mojol​icious/Renderer#get_data_template
18:02 sri that's what they should be using
18:02 sri since it handles multiple template classes
18:03 sri http://api.metacpan.org/source/GRAY/MojoX-Rend​erer-Xslate-0.07/lib/MojoX/Renderer/Xslate.pm
18:03 sri dammit
18:03 sri uses Mojo::Command
18:04 sri tt renderer does it right
18:06 sri all the others don't support DATA or do it right
18:08 tempire so only one.  that's not so bad.  contacting the author in advance might to the trick
18:08 sri 2011-05-04
18:08 sri we do show the correct way in the rendering guide since at least
18:08 sri oops
18:12 tempire oh!
18:12 tempire I know what I want for my birthday
18:12 tempire https://github.com/alevchuk/vim-clutch
18:12 sri lol
18:13 bc547 lol
18:30 sri hmmm
18:31 sri tempire: you are also using one of the methods that should be moved -.-
18:31 sri class_to_path
18:32 sri renaming would be quite a mess :/
18:34 sri i bet memowe also uses those extensively
18:37 sri think we are trapped with Mojo::Command
18:48 marcus tempire: http://dx.com/p/usb-foot-switch-keyboar​d-mouse-control-foot-pedal-58167?item=1 10$ with free shipping
18:48 vishwanathms_ joined #mojo
18:48 vishwanathms joined #mojo
19:02 Properler joined #mojo
19:19 knshaum joined #mojo
19:43 sri http://blog.kraih.com/a-new-look-for-mojolicious # better late than never i guess ;p
19:49 marty sri++  \\o//
19:49 sri \o/
19:50 tempire excellent.  deluge 'em with headlines
19:53 tempire memowe: you might want to think about putting the words "Perl blog engine" in your contenticious title, or at least a description meta tag.
19:54 tempire would be great to offset the current google results http://goo.gl/CKF8v
19:55 sri "80 personal results. 1,300,000 other results." # <- fuck you google!
19:56 tempire it lists that for you at the top?
19:56 sri yea
19:56 sri not sure if that's new
19:56 tempire I don't have any personal results
19:56 tempire just "About 1,350,000 results"
19:57 sri i really hope they get some serious competition soon
19:57 tempire bing isn't competition?
19:57 tempire or you probably mean mindshare
19:57 sri yea
19:58 tempire I use google primarily because I like their results for my name.
19:58 tempire I admit it.
19:58 sri i think microsoft lost all the bing developers and might be stuck now
20:04 tempire lulz http://www.youtube.com/watch?v=7GM4Lt5k24s
20:09 sri rofl
20:43 yko joined #mojo
20:48 sri tempire, marcus: what do you think we should do about Mojo::Command?
20:52 tempire I agree that it should be changed, but I'd prefer to give the cpan devs time to do the adjustment.
20:53 sri problem is not really devs
20:54 sri but lefover installations of abandoned commands
20:54 sri *+t
20:55 sri i only know of you and memowe actually using those features in maintained commands
20:56 sri it's the unmaintained ones i'm afraid of
20:56 tempire that's the ones I'm talking about, we could send the devs an email at the very least, whether or not they respond.
20:57 sri which ones?
20:57 sri those that abandoned their modules?
20:57 tempire I'd have to look, but whatever is found on cpan grep.  maybe it would give them incentive to pick it back up
20:58 sri cpan grep seems dead
20:59 sri i wouldn't count on it coming back, the index was already a year old
21:01 sri if we don't do it in 3.0 i think it will never happen
21:02 sri chances are, commands will become popular between 3.0 and 4.0, or stay like they are now and require a complete revamp
21:05 tempire wait, so the template renderers that you found were all using the right thing?
21:06 sri except for xslate
21:06 sri i'm not worried about renderers
21:06 sri just commands
21:06 tempire what was xslate doing wrong?
21:06 tempire using the ::command instead of the ::renderer, right?
21:07 sri yes
21:07 sri it's very very wrong, only using one template class
21:08 tempire I'll send him an email
21:08 sri tempire++
21:08 tempire do you know exactly what he should do?
21:09 sri just use http://mojolicio.us/perldoc/Mojol​icious/Renderer#get_data_template
21:10 sri ash shown here http://mojolicio.us/perldoc/Mojolicious/Guides/​Rendering#Adding_your_favorite_template_system
21:10 sri he just has to remove code basically :)
21:14 sri tempire: except for you and memowe i can only find two affected commands on cpan
21:14 sri https://metacpan.org/module/​Mojolicious::Command::secret
21:14 sri https://metacpan.org/source/KOORCHIK/Mo​jolicious-Plugin-JSUrlFor-0.08/lib/Mojo​licious/Command/generate/js_url_for.pm
21:15 sri everything else is already borked
21:15 tempire xslate email sent
21:15 sri \o/
21:30 tempire it would be neat if you could have cpan releases according to events
21:30 tempire "release this version of module when version x of module x is released"
21:30 tempire er, version x of module y
21:31 sri i would be fine with better versioning
21:31 sri like use different versions of a module
21:35 Andrei666 joined #mojo
21:36 Andrei666 hey guys
21:36 Andrei666 in my template I do this:  <li><%= link_to url_for($_->movie_id->name)->url_unescape => url_for("/movies/$_->movie_id")->url_unescape %></li>
21:37 Andrei666 but in my html it transforms to this: <a href="/movies/5/0-%3Emovie_id">Fight Club</a>
21:38 Andrei666 the problem is that the url should be something like /movies/:id, and id =~ /\d+/
21:38 fg3 joined #mojo
21:38 Andrei666 5/0 is something like the amount of memory or something like that
21:39 Andrei666 can someone guide me to the correct way of doing that?
21:39 fg3 where can I find docs for parsing json from the command line: mojo get url/data.json  ???
21:41 ynonp joined #mojo
21:44 lukep joined #mojo
22:00 tempire fg3: there's not much to it.  just give it a pointer string.
22:03 tempire mojo get 'search.twitter.com/search.json?q=mojolicious' '/results/0/text'
22:04 tempire Andrei666: you're using url_for incorrectly
22:04 andrefs joined #mojo
22:05 tempire http://mojolicio.us/perldoc/M​ojolicious/Controller#url_for
22:06 Andrei666 tempire: thanks, i read that..I'm trying to get around it and see how I should write it to my needs
22:14 sri dammit
22:14 sri the code gets so nice and clean after the Mojo::Command renaming :(
22:27 brambles joined #mojo
22:28 brambles_ joined #mojo
22:29 GitHub112 joined #mojo
22:29 GitHub112 [mojo] kraih pushed 1 new commit to master: http://git.io/7GCB7Q
22:29 GitHub112 [mojo/master] renamed Mojo::Command to Mojolicious::Command - Sebastian Riedel
22:29 GitHub112 left #mojo
22:29 sri tempire, marcus: please review
22:29 sri ops
22:29 sri please don't
22:29 sri :)
22:31 GitHub127 joined #mojo
22:31 GitHub127 [mojo] kraih pushed 1 new commit to master: http://git.io/m2CBQQ
22:31 GitHub127 [mojo/master] added Mojolicious::Command - Sebastian Riedel
22:31 GitHub127 left #mojo
22:31 sri review both -.-
22:34 sri tempire: feel like writing a mail to the list? :)
22:34 * sri pokes memowe and Akron
22:35 andrefs joined #mojo
22:36 sri omg, tweetbot for os x :O
22:37 sri \o/
22:37 gryphon joined #mojo
22:45 GitHub117 joined #mojo
22:45 GitHub117 [mojo] kraih pushed 1 new commit to master: http://git.io/8O8fvg
22:45 GitHub117 [mojo/master] simplified get_data - Sebastian Riedel
22:45 GitHub117 left #mojo
22:48 tempire sri: saying what?
22:48 sri Mojo::Command -> Mojolicious::Command
22:49 tempire there's nothing new except for the namespace, right?
22:49 sri and 4 methods have moved, should be less important though
22:50 tempire I'll see about in the next day or so
22:50 sri class_to_file/class_to_path are now in Mojo::Util and get_data/get_all_data in Mojo::Loader
22:50 sri tempire: thanks :)
22:51 fg3 code review please  -> http://pastebin.com/Fc1WGV7U     # does it look ideal?
22:53 sri tempire: if you have any other ideas how to make commands more accessible please... shoot
22:54 tempire we just need some really "whoa" examples, I think
22:54 sri like deploy... hmmm
22:55 tempire or, blog entries presenting them in a whoa fashion
22:55 tempire the scaffolding deploy command is there, I was thinking about making a blog entry saying so.
22:56 tempire but it would be cool if there was at least one more other than mine
22:59 sri hmm
23:00 sri https://github.com/kraih/mojo/blob/ma​ster/lib/Mojolicious/Commands.pm#L128
23:00 sri should that line maybe warn instead of die?
23:00 sri (at least for 3.0)
23:01 sri then bad commands would make noise but not kill the command line interface
23:02 Akron joined #mojo
23:03 Akron sri: Nice and coherent imho.
23:03 tempire yes.  warn
23:03 sri :)
23:06 Akron But class_to_path and class_to_file do not sound like Mojo::ByteStream method names ...
23:07 sri Akron: haha, my thoughts exactly
23:07 sri but then i couldn't think of something better
23:08 Akron You could be inconsistent and don't provide it in M::BS.
23:09 sri hmm
23:10 Akron Oh ... late again. Have to go. Good night everybody!
23:10 sri nn
23:16 inokenty joined #mojo
23:22 tempire I'm going dancing tonight
23:22 tempire WHO WANTS TO COME!
23:23 fg3 if it's salsa dancing: http://i.imgur.com/BmNUf.gif
23:30 GitHub61 joined #mojo
23:30 GitHub61 [mojo] kraih pushed 1 new commit to master: http://git.io/GGlM1A
23:30 GitHub61 [mojo/master] made bad commands less fatal - Sebastian Riedel
23:30 GitHub61 left #mojo
23:30 sri ok, that should mitigate most command incompatibilities
23:32 tempire \o/
23:32 tempire let's celebrate
23:32 tempire http://gifsound.com/?gif=http%3A%2F%2Fi.imgur.c​om%2FBmNUf.gif&amp;sound=http%3A%2F%2Fwww.youtu​be.com%2Fwatch%3Fv%3DMv1ZsSrE03o&amp;start=10
23:32 sri \o/
23:32 tempire \o\
23:33 tempire \o_
23:33 tempire _o/
23:33 fg3 nice!
23:38 sri is $stream->class_to_path acceptable or not?
23:39 sri at first it looks a bit strange next to $stream->camelize and $stream->to_string, but now i'm not sure
23:41 GitHub137 joined #mojo
23:41 GitHub137 [mojo] kraih pushed 1 new commit to master: http://git.io/3XyjHg
23:41 GitHub137 [mojo/master] better error message for bad commands - Sebastian Riedel
23:41 GitHub137 left #mojo

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