[Mojolicious] Re: Поясните параметр

2013-12-19 Thread sri
The language of this list is english, please respect that. I'm closing this thread as a warning. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mo

Re: [Mojolicious] testing performance of hypnotoad setup

2013-12-19 Thread sri
> > The example doesn’t really help me. > Of course it does, it gives you valuable keywords to Google for. Now you know that Linux needs to be tuned for high concurrency, and that you have to figure out what the Linux equivalent for kqueue is, and how to activate it in EV. -- sebastian -- Y

[Mojolicious] Rotating secrets (heads up)

2013-12-19 Thread sri
Just wanted to give you a quick heads up about a security related deprecation that will affect most secure applications in one way or another. app->secret('s3cret'); That line should look familiar. So far whenever you wanted to change your application "secret", you were forced to invalidate a

[Mojolicious] Re: M and M::L routes

2013-12-26 Thread sri
> > First short path, then more long, and more long. > Actually, the general rule of thumb is that the more specific a route is, the higher up it should be... so in your words "long paths before short ones". -- sebastian -- You received this message because you are subscribed to the Google G

[Mojolicious] Re: A question on Mojo::Base

2013-12-26 Thread sri
> E.g. the Mojo::Base equivalent of "use base qw(Foo Bar)" > Unsupported, and that's intentional. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email t

Re: [Mojolicious] Re: A question on Mojo::Base

2013-12-26 Thread sri
> > Okay, so why intentional? Is there something inherently bad about > multiple inheritance or is it just a case of "don't need it so let's not > go there and muck with it"? > I've been a proponent of multiple inheritance in the past (with Catalyst), but since changed my stance. The delegatio

Re: [Mojolicious] Re: A question on Mojo::Base

2013-12-26 Thread sri
> > "can't use 'Foo::Comp::Search' as a hashref ..." > Actually, i think i know this one. :) https://github.com/kraih/mojo/commit/c6ddf11f44a941de550cde51a2b5ef461d1f1e34#diff-b9415bf02cb61707bcfa1aa8ad876397L85 Someone forgot a "no strict 'refs'" which allowed attribute accessors to be

[Mojolicious] Wishlist thread

2014-01-01 Thread sri
Happy new year everyone! 2013 has been a great year for Mojolicious and we've made a lot of progress, lets start 2014 by trying something new. In this thread you can post changes or features you would like to see in Mojolicious, no rules, just blurt away. :) P.S.: Our official roadmap can be fo

Re: [Mojolicious] Re: Wishlist thread

2014-01-02 Thread sri
> > > Mojolicious is such an elegant and clean framework, it has a chance to > > define or at least be at the forefront of what it means to write > scalable, > > event-driven apps for any programming language. For example, the > recentish > > 'continue()' method was a huge help. More developm

[Mojolicious] Re: Wishlist thread

2014-01-02 Thread sri
> > It's also a major rewrite because blocking style does not easily lend > itself to this. > Personally, i would like to explore coroutine/generator based APIs more, but that's not really an option for anything serious as long as Coro is the only game in town. https://gist.github.com/kra

Re: [Mojolicious] Wishlist thread

2014-01-02 Thread sri
> > I would like to use the Test::Mojo module for external APIs > (sites) testing. > > Something like this: > > my $t = Test::Mojo->new( path => 'http://example.com/api/v3' ); > $t->post_ok('/search.json' => form => {q => 'Perl'}) ... . > Already works. my $t = Test::Mojo->new; $t->post

Re: [Mojolicious] Wishlist thread

2014-01-02 Thread sri
> > All the Mojo* scripts seem to use '/usr/bin/env perl' in their header. > ... > Basically, it would save us time at each new Mojo* update if the > build/make code picked up the path of the perl binary used to build it. >FWIW, I'd be happy to contribute patch(es) to this effort if this is

[Mojolicious] Re: Wishlist thread

2014-01-02 Thread sri
> > $res = $t->get_ok(...)->tx->res; > like( $res->json('/foo/bar'), qr(baz), "baz found" ); > > rather than: > > $t->get_ok(...)->json_like('/foo/bar' => qr(baz)); > I'm on the edge about this, i can see it being useful but the inconsistency with the "is_deeply()" based json_is() (a

Re: [Mojolicious] Wishlist thread

2014-01-02 Thread sri
> > My thought, similar to Joe, I think, is that the Mojo built-in Login would > be a best practices method (like with CSRF and Validation) that grants > security, at least from a prototyping perspective. > I doubt there would be consensus on how exactly something like that should look like.

Re: [Mojolicious] Wishlist thread

2014-01-02 Thread sri
> > Let's say there could be. Would that be sufficient to approve? > I'm not opposed to the feature, if that's what you mean, but of course it has to go through the usual approval process. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious

[Mojolicious] Re: Wishlist thread

2014-01-02 Thread sri
> $t->get_ok(...)->json_like('/foo/bar' => qr(baz)); >> > > I'm on the edge about this, i can see it being useful but the > inconsistency with the "is_deeply()" based json_is() (and > json_message_is()) bugs me. > Discussing this feature on IRC had some interesting results, we are going t

Re: [Mojolicious] Re: Wishlist thread

2014-01-04 Thread sri
> > So, assuming there is no clean path, how should I have begun in the first > place using Mojo::IOLoop::Delay? It seems there are two distinct and > incompatible ways to build a web app: blocking and non-blocking, with the > former extremely well-documented and the latter only documented in

Re: [Mojolicious] Re: Wishlist thread

2014-01-04 Thread sri
> > ...please share! > I think the best we have at the moment is Convos. http://blog.kraih.com/post/69783934209/convos-chatting-in-the-cloud-with-mojolicious -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe fr

Re: [Mojolicious] Wishlist thread

2014-01-05 Thread sri
> > Is there a more concise means to accomplishing that? If not, could there > be? > Please do not abuse this thread for general questions by attaching a "If not, could there be?" to the end. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojoli

[Mojolicious] Re: Wishlist thread

2014-01-08 Thread sri
> > I want to have "before_render" hook. > Why? We generally don't add new hooks unless they have at least two independent use cases, to ensure they are generic enough. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscr

Re: [Mojolicious] Re: Wishlist thread

2014-01-08 Thread sri
> > ...then use $self->render_partial to > render the bits you need... That reminds me of one of the biggest problems the before_render hook had... recursion whenever someone tried to render inside the hook. Don't laugh, that was a common complaint. -- sebastian -- You received this messa

[Mojolicious] Re: Mojo::IOLoop->recurring

2014-01-09 Thread sri
> > Within the sub, is it possible to adjust the $interval of the event loop > for that sub? > No, we only support restarting a timer. http://mojolicio.us/perldoc/Mojo/Reactor#again -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious"

[Mojolicious] Re: reuse option

2014-01-09 Thread sri
> > What is the purpose of reuse=1 and how are you supposed to use it? > http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Zero_downtime_software_upgrades -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from t

[Mojolicious] Re: Is it safe to "use lib"?

2014-01-09 Thread sri
> > I don't understand why/when this has to be done. Could someone please > explain it for me? > https://metacpan.org/pod/lib#Adding-directories-to-INC -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this gro

[Mojolicious] Re: Is it safe to "use lib"?

2014-01-09 Thread sri
> > I understand about lib and @INC. But I am confused about what this means: > > "installable scripts can't use lib without breaking updated dual-life > modules." > https://github.com/kraih/mojo/issues/462 -- sebastian -- You received this message because you are subscribed to the Google Gr

[Mojolicious] Re: Wishlist thread

2014-01-12 Thread sri
> > 1.) app wide exception and not found templates / messages especially > useful for json apps > Any concrete proposals? -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails f

[Mojolicious] Re: Wishlist thread

2014-01-12 Thread sri
> > sub render_exception > > sub render_not_found > > ... > > $r->set_render_not_found(\&mysub); > $r->set_render_exception(\&mysub); > I'm afraid that doesn't really tell me much, actual semantics and deprecation paths for current behavior would be much more helpful. Perhaps even a partial pa

[Mojolicious] Re: Wishlist thread

2014-01-13 Thread sri
> > I'd be fine if there was an optional Mojo::JSON::C that was compiled at > installation for those who chose to do so. > This is not going to happen in core, but i don't see a reason why there can't be a Mojo::JSON::XS module on CPAN that works similar to Mojo::Base::XS. https://metacpa

[Mojolicious] Re: Maintenance page

2014-01-14 Thread sri
For future reference, the correct way to do this is with an optional wildcard placeholder. perl -Mojo -E 'a("/*everything" => {everything => "", text => "Maintenance!"})->start' daemon -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" g

Re: [Mojolicious] Listening with IPV6

2014-01-14 Thread sri
> > Is it possible for one Mojolicious process to listen on port 80 for both > the IPv6 address as well as the IPv4 address? > Should we have IPv6 experts on this list, this might be worth investigating (and possibly patch), but i suppose portability and backwards compatibility (especially reg

Re: [Mojolicious] Listening with IPV6

2014-01-14 Thread sri
> > I don't know what this means, but between lines 63 and 64 of > Mojo::IOLoop::Server, I did `undef $fd;'... > Ah! That makes perfect sense and is easy to improve. :) https://github.com/kraih/mojo/commit/1c14ddae57c1ce9220227c7b966e8551c71e531b -- sebastian -- You received this messa

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-15 Thread sri
> > Since this same question seems to pop up on a more and more regular > basis, and honestly it's starting to get on my nerves a bit how often > people assume that merely using Mojo::IOLoop or running things under > Morbo or Hypnotoad make things non-blocking... > This has been bugging me too

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-15 Thread sri
> > So... what can be done about it? Perhaps a reading list to say if you're > gonna go down this path, read these things, and understand this stuff > first. Ben and sri, how can I know what you guys know?? What did you > read? Where did you go to school? What proj

[Mojolicious] Re: Wishlist thread

2014-01-15 Thread sri
> > This is not going to happen in core, but i don't see a reason why there > can't be a Mojo::JSON::XS module on CPAN that works similar to > Mojo::Base::XS. > I have to admit that i'm a little disappointed that this has not happened yet, there have been 3 requests in this thread alone. Wonde

[Mojolicious] Re: Mojo::JSON::XS

2014-01-15 Thread sri
> > $self->renderer->add_handler(json => sub { >my ($self, $c, $output, $data) = (@_); >$$output = JSON::XS->new->encode($data->{json}); > }); > Can be done, but doesn't work for all the other aspects of the framework where Mojo::JSON is also used. (WebSockets for example) Btw. Might

Re: [Mojolicious] Re: Mojo::JSON::XS

2014-01-15 Thread sri
> > Ah, okay didn't know that... what's your feeling on having an attribute > exposed in Mojolicious.pm that sets the JSON encoder/decoder class? > Strong -1 vote from me... we've tried that before and it was terrible. The Mojo::Base::XS approach just works, has no overhead for anyone who doesn

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread sri
> > Like with Ben's write up, I'd recommend posting it on a Non-blocking > section of the Wiki. > It's a wiki, everybody can edit it and add new pages. ;) -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this g

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread sri
Here's my first attempt at explainaing the difference between blocking and non-blocking operations in the Mojolicious documentation. https://github.com/kraih/mojo/commit/2772cba060999a25d621c4c8caaff4db54d2cc07 I'd really like something similar for explaining event loops, possibly with a "

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread sri
> > I'd really like something similar for explaining event loops, possibly > with a "while (1) {...}" block example. > And here's my first attempt at explaining event loops, i've tried to reduce it to the absolute essentials as well. https://github.com/kraih/mojo/commit/c3ae16e86dda0e7015

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-17 Thread sri
> > I'll take that as an invitation to go ahead. :) > > https://github.com/kraih/mojo/wiki#performance > Great, that's what it was meant to be. :) Here's another great blog post on the topic Glen just published. http://tempi.re/a-mojolicious-non-blocking-web-service-why- -- sebastian --

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-17 Thread sri
> > What a phenomenal story! I'll add this into the wiki section on the topic. > Btw. I've intentionally avoided the word "performance", because non-blocking I/O is about "scalability". Those terms are often used interchangeably, but they shouldn't. -- sebastian -- You received this message

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-18 Thread sri
> > I remember now one reason this was so difficult for me to grasp. > > "Number of worker processes, defaults to 4. A good rule of thumb is two > worker processes per CPU > core." > Adjusted. https://github.com/kraih/mojo/commit/c7

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-18 Thread sri
> > Adjusted. > And a few more. https://github.com/kraih/mojo/commit/acc842efee90539593cbba4ad68dfb22cb4f7237 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it,

Re: [Mojolicious] simplistic Q -- where are the options for the 'res'(result) class?

2014-01-27 Thread sri
FYI: All commands show usage information in their synopsis sections since Mojolicious 4.70. http://mojolicio.us/perldoc/Mojolicious/Command/get#SYNOPSIS -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

Re: [Mojolicious] Re: Alternative templates

2014-01-28 Thread sri
> > There is no alternative to before_render, but i'm not opposed to bringing > the hook back *if* there are at least two good use cases for it. > Since i'm now aware of three valid use cases (dynamic layout selection, cutesy render arguments and customized not_found/exception rendering), i'm

Re: [Mojolicious] Re: Alternative templates

2014-01-28 Thread sri
> > Since i'm now aware of three valid use cases (dynamic layout selection, > cutesy render arguments and customized not_found/exception rendering), i'm > bringing back the before_render hook. ;) > And i imagine this new content negotiation helper will make it even more powerful. :) http

Re: [Mojolicious] Re: Alternative templates

2014-01-29 Thread sri
> > And i imagine this new content negotiation helper will make it even more > powerful. :) > Here's a fun hack combining the two, it allows you to intercept and modify not_found/exception rendering. hook before_render => sub { my ($self, $args) = @_; # Make sure we are rendering th

[Mojolicious] Re: Mango 0.22 count on cursors returning 0

2014-01-30 Thread sri
> > This doesn't work with Mongdb 2.0.2 on Precise. Had to upgrade to latest > MongoDB. Thank you! > As the documentation says, Mango only supports the latest stable release of MongoDB, this is currently 2.4 and will soon be 2.6. -- sebastian -- You received this message because you are sub

Re: [Mojolicious] Mojo::UserAgent and Mojo:IOLoop question

2014-02-03 Thread sri
Maybe these FAQ answers we recently added can be of help. http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#What_is_the_difference_between_blocking_and_non-blocking_operations http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#Will_my_code_magically_become_non-blocking_with_Mojoliciou

Re: [Mojolicious] Mojo::UserAgent and Mojo:IOLoop question

2014-02-03 Thread sri
> > I think what could help me would be a more complete exemple of a > Non-blocking HTTP requests that does work inside a running event loop. > http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Backend_web_services -- sebastian -- You received this message because you are subscribed to

Re: [Mojolicious] Re: Alternative templates

2014-02-04 Thread sri
> I can't understand the last line of code. Because in my cases, the code > "$self->accepts('json')" always returns string "json", even if content is > html; > http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#accepts -- sebastian -- You received this message because you are su

Re: [Mojolicious] Mojo::UserAgent and Mojo:IOLoop question

2014-02-06 Thread sri
> > So I made a pull request to add a working example code for it. For now > it's pending but you can find it here: > https://github.com/13pass/mojo/blob/master/examples/non-blocking_agent_inside_loop.pl > Like i said in the pull request, i'm no fan of undocumented examples in the core distrib

Re: [Mojolicious] Re: Alternative templates

2014-02-07 Thread sri
> > http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#accepts > Here's also an idiom for checking if a specific format has been requested. https://github.com/kraih/mojo/commit/c5c48783a68736b96ca32440ea87733f758a96ca -- sebastian -- You received this message because you are s

[Mojolicious] Re: Ask for routing

2014-02-08 Thread sri
> > error on not ? > not. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To post to this group, send e

Re: [Mojolicious] Re: Ask for routing

2014-02-08 Thread sri
> > why ? im install old version 4.41 and all works again on debian perl 5.14 > Your routes were nonsense before 4.68 and conflict with a new feature afterwards. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe fro

[Mojolicious] Re: Why the Content-Type for *.jpg and *.JPG is different?

2014-02-08 Thread sri
> > HEAD http://127.0.0.1:3000/public/file.JPG > ... > Content-Type: text/plain > Fixed in Mojolicious 4.78. Btw. It would be nice if someone turned MIME::Types into a Mojolicious plugin that registers all types in existence with app->types. ;) -- sebastian -- You received this message beca

[Mojolicious] Re: Mojoconf in Oslo

2014-02-13 Thread sri
> > Anyone planning to do some talks ? Mojoconf has not officially been announced yet. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojoliciou

Re: [Mojolicious] Re: Mojoconf in Oslo

2014-02-13 Thread sri
> > As Maddingue (Sébastien Aperghis-Tramoni, the man behind the ACT > platform) tweeted about it[1], so I thought it was open. > He shouldn't have tweeted about it, the Oslo Perl Mongers are currently looking for sponsors for the event. -- sebastian -- You received this message because you

Re: [Mojolicious] Re: Mojoconf in Oslo

2014-02-13 Thread sri
Oh well, now it's official! :D http://blog.kraih.com/post/76535091594/mojoconf-2014 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious

[Mojolicious] How to handle scalars with numeric and string values in Mojo::JSON

2014-02-14 Thread sri
Yes, that topic has come up again, and i'd like to get it resolved once and for all. https://github.com/kraih/mojo/issues/591 Please state your opinions on GitHub. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscrib

Re: [Mojolicious] Websocket scaling

2014-02-21 Thread sri
Since this appears to become kind of an FAQ, it's now in the cookbook. https://github.com/kraih/mojo/commit/ff5997a717c60f50f1b4bf137d05091bbf768caf -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this gro

Re: [Mojolicious] Re: Alternative templates

2014-03-04 Thread sri
> > As I read in docs I know: "defaults to returning the first extension if no > preference could be detected". But why I get an empty string after > $c->accepts('json') if I have html content? But I get "json" if I have GIF > content? > Your test must be flawed. $ perl -Mojo -E 'a(sub { $_

[Mojolicious] Re: Mojoconf 2014 - Call for Papers / Call for Speakers

2014-03-05 Thread sri
And don't forget to register, even if you're not giving a talk! http://www.mojoconf.org/ -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojoli

Re: [Mojolicious] Re: Why the Content-Type for *.jpg and *.JPG is different?

2014-03-05 Thread sri
> > What should be done about conflicting types? e.g. dwg is > application/x-acad, image/x-dwg, and image/vnd.dwg > Just like "xml". https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Types.pm#L30 -- sebastian -- You received this message because you are subscribed to the Google

Re: [Mojolicious] High CPU consumption on Linux Mint 16 and raspian with hypnotoad

2014-03-07 Thread sri
> > And specifically what the problem is is that I ran hypnotoad as a non-root > user and of course hypnotoad can't set the user and group to www-data as > defined by default in the config. > I've made some changes so these kinds of errors become much easier to track down. https://github

[Mojolicious] Re: Help with 'Growing' tutorial

2014-03-09 Thread sri
> > The document does not specify what the results are supposed to be. When I > run the test I get a lot of failures which makes me think I've done > something wrong. Have I? > No, and i've updated the guide to make that more clear. https://github.com/kraih/mojo/commit/ad0233b0f4dae0eb5a

[Mojolicious] Different templates for different devices

2014-03-12 Thread sri
I remember the topic popping up every now and then, so this new feature might be of interest to some of you. https://github.com/kraih/mojo/compare/defc52f02de9c8a81bf9cf4b039ed35e34dd01b4...17b351156d000b2dbb62d9ab96ff426300f98ebc#diff-65cf575515a0ad467194433b39cd30d3R201 -- sebastian --

[Mojolicious] Re: Different templates for different devices

2014-03-13 Thread sri
There's been more opposition to this feature than i expected on IRC, not sure if it will make it into the next release. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from i

[Mojolicious] Re: Different templates for different devices

2014-03-13 Thread sri
The argument is that we should not be encouraging different templates for different devices, in case anyone here wants to chime in. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving e

[Mojolicious] Re: Different templates for different devices

2014-03-13 Thread sri
Thanks everyone, we'll keep the feature. :) -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To post to thi

[Mojolicious] Talking points for Mojoconf 2014

2014-03-17 Thread sri
I'll post some things in this thread i think we might want to talk about at Mojoconf, and possibly make decisions about while we are all at the same physical location. 1) HTTP/2 support. Where do we start? How far do we want to go? 2) New Perl 5 features (such as subroutine signatures). How are

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-03-17 Thread sri
5) Redesign of Mojolicious::Controller::param() to get rid of the list context attack vector. What can we do? How would it affect similar APIs like Mojolicious::Validator::Validation::param()? -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicio

Re: [Mojolicious] Re: Reusable Template Blocks and Scope

2014-03-27 Thread sri
> >include: 53 wallclock secs (51.21 usr + 1.41 sys = 52.62 CPU) @ > 95.02/s (n=5000) > It took me 10 minutes with Devel::NYTProf to double the include performance. So if something is too slow for you, just grab a profiler and send patches. https://github.com/kraih/mojo/commit/565e6

Re: [Mojolicious] Re: Reusable Template Blocks and Scope

2014-03-27 Thread sri
> > Thank you for this optimization. But it still doesn't fit to use for > "markup-only helpers". Is it possible to make macros-importer (RTB > importer) from another templates? > There is no way we would consider any new features for performance alone, unless there have been at least a few at

[Mojolicious] A job queue for Mojolicious

2014-03-27 Thread sri
Since the topic keeps coming up pretty regularly around here, my latest project might be of interest to some of you. https://github.com/kraih/minion The idea is to build a minimalistic resque inspired (but Mango based) job queue, that's very tightly integrated into Mojolicious and therefore

[Mojolicious] Need volunteers for GitHub issues

2014-04-01 Thread sri
Since i don't have as much time anymore to look after issues on GitHub, they've started piling up a little. So if you're looking for an opportunity to get more involved in the project, some help investigating and dealing with them would be very much appreciated. https://github.com/kraih/moj

Re: [Mojolicious] Need volunteers for GitHub issues

2014-04-01 Thread sri
> > Just for the curious, the list is already confirmed by the core devs? > Nope, everything needs to be discussed as well, confirmed bugs would be tagged. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

Re: [Mojolicious] A job queue for Mojolicious

2014-04-01 Thread sri
Minion is still experimental, but i don't expect too many big changes anymore, the 0.05 release should be ready for testing. Certain bigger features like a REST API are still planned, but will have to wait until after Mojoconf. -- sebastian -- You received this message because you are subscri

Re: [Mojolicious] A job queue for Mojolicious

2014-04-02 Thread sri
> > In the README, you say that it is a "A Mango job queue for the > Mojolicious real-time web framework." but it seems to that it could be > used for any other job queue purpose. > Not sure what you mean by that, does the current description imply certain limitations i'm not aware of? -- seb

Re: [Mojolicious] A job queue for Mojolicious

2014-04-02 Thread sri
> > Certain bigger features like a REST API are still planned, but will have > to wait until after Mojoconf. > Since the REST API has to wait, Minion will use a command for now, suggestions for making the output more pretty would be very welcome. http://pastie.org/8988591 -- sebastian -

Re: [Mojolicious] A job queue for Mojolicious

2014-04-02 Thread sri
> > Since the REST API has to wait, Minion will use a command for now, > suggestions for making the output more pretty would be very welcome. > After some IRC discussions this is what we ended up with, still rudimentary, but i think it gets the information across. http://pastie.org/8989093

[Mojolicious] Re: Mojo::JSON and Mojolicious::Controller::render confusion

2014-04-03 Thread sri
> > 1.) What is causing this escaping behavior? I suspect it's something like > I'm completely misunderstanding the 'json' directive to the render method. > It's simply what's supposed to happen when you JSON encode a string. http://tools.ietf.org/html/rfc7159 -- sebastian -- You receive

[Mojolicious] Re: Mojo::Test and responds_to

2014-04-03 Thread sri
> > So upon further research, I've discovered the accepts helper. However, > with the above test both: > > $self->accepts('json') > and > $self->accepts('html') > > evaluate true. > http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#accepts -- sebastian -- You received this mess

[Mojolicious] Re: Mojo::Test and responds_to

2014-04-03 Thread sri
> > So upon further research, I've discovered the accepts helper. However, >> with the above test both: >> >> $self->accepts('json') >> and >> $self->accepts('html') >> >> evaluate true. >> > > http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#accepts > Or to be more precise, what

[Mojolicious] Re: how to handle maintenance functions

2014-04-03 Thread sri
> > I have a simple web/db application built with Mojolicious. I'm building > some maintenance tools for db record culling. Normally, I would just > make these cron jobs, but I'm wondering if there is an approach that is > more Mojo? > Think i'd use either a cron job calling an application spe

Re: [Mojolicious] A job queue for Mojolicious

2014-04-04 Thread sri
> > Do you have a plan to add non-blocking API for Minion? (at least for > enqueue, so you can using Minon in non-blocking Mojolicious projects) > Already done. :) https://github.com/kraih/minion/commit/7be80c0f3eb2fd814989b71a04f2dd2ca1b6bb3a Do you have a plan to add capabilities to da

Re: [Mojolicious] A job queue for Mojolicious

2014-04-04 Thread sri
> > Do you have a plan to add capabilities to daemonize workers?​ >> > > Not sure yet... > Two more points i'm a little unsure about. a) Events for extensions... so far i've only added very basic ones. https://github.com/kraih/minion/commit/d93c94d60117892c28e08a53d94786cb7daf73d5 b) Job

Re: [Mojolicious] A job queue for Mojolicious

2014-04-04 Thread sri
> > The real question I wanted to ask is : do I need a mongoDB connection > for Minion ? > You do, Minion only works with MongoDB. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving

[Mojolicious] Re: valid (i thought) route gives me 404

2014-04-11 Thread sri
I would recommend posting the output of "routes -v" rather than that of the 404 page. http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Introspection It shows a lot more details. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious"

[Mojolicious] Re: How do catch hypnotoad start errors?

2014-04-12 Thread sri
One of the motivations for making "hypnotoad myapp.pl" automatically start hot deployment when you run it twice, was to allow the second call to catch application errors early on and be able to report them to STDERR. If you're building your own start script i'm afraid you're on your own. -- seb

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-18 Thread sri
> > Something more like what sensio labs did with symfony > 1.4 > Not a day goes by where someone doesn't ask for a Mojolicious book, we are in desperate need of one. -- sebastian -- You received this message because you are subsc

[Mojolicious] Re: Error on 'user agent (ua)' get.

2014-04-19 Thread sri
> > Hades Apache Mod: 1.0 > I believe this header name is invalid, although Chrome seems to accept it, so i've made some adjustments. https://github.com/kraih/mojo/commit/6c18df3380e7fa99fbbf270baeb6b00cca38da81 -- sebastian -- You received this message because you are subscribed to the

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-22 Thread sri
> > 3) Promises instead of continuation-passing style for non-blocking APIs. > Does it make sense? Is it the future? How would it look like? > In case it's not clear how this is a problem... most of our blocking/non-blocking hybrid methods take an optional CODE reference as last argument for s

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-22 Thread sri
A fun example for promises vs. supply are timers. # Promise my $promise = Mojo::IOLoop->timer(5); $promise->then(sub { say '5 seconds later.' }); # Supply my $supply = Mojo::IOLoop->recurring(5); $supply->tap(sub { say 'Another 5 seconds later.' }); -- sebastian -- You received thi

Re: [Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-22 Thread sri
> > Unless there's a use case for mixed "blocking" and "non-blocking" > behaviour coming from a single $ua object. > I'm afraid there are use cases for it, Minion for example needs it to emulate a running worker for the test features. (Jobs may be enqueued non-blocking, while workers only use

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-23 Thread sri
> > 2) New Perl 5 features (such as subroutine signatures). How are we going > to support them? Which versions of Perl 5 are we going to support in the > future? > I believe this one will be a very important topic during Mojoconf, and specifically how we are going to deal with the new subrouti

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-23 Thread sri
Preliminary tests with Promises have been catastrophic, once you start chaining things together it's nearly impossible to avoid cycles. http://pastie.org/9106756 Starting to get the feeling that Perl and Promises don't mix. -- sebastian -- You received this message because you are subscri

Re: [Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-24 Thread sri
> > Maybe we should contact Stevan Little, the creator of Promises, about it. > Already talking to him, and so far we agree that it's a conceptual problem with Perl garbage collection (or lack thereof). http://pastie.org/9106784 Our delays are affected too, but we can mitigate the problem

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-25 Thread sri
> > Preliminary tests with Promises have been catastrophic... > Quick update, after further research i've found a way to make it work, inside-out objects. Preliminary test results have been so good that inside-out storage has already been added as a feature to Mojo::IOLoop::Delay. It basically

[Mojolicious] Re: Talking points for Mojoconf 2014

2014-04-26 Thread sri
> > Quick update, after further research i've found a way to make it work, > inside-out objects. > And here's an actual prototype for a promise class. https://gist.github.com/kraih/11328864 The only problem now is that to use promises effectively we would have to make breaking changes to

  1   2   3   4   5   6   7   8   9   >