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

IRC log for #mojo, 2014-01-23

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

All times shown according to UTC.

Time Nick Message
00:33 marty joined #mojo
00:46 jberger_ sri overloading documentation +1
00:47 jberger joined #mojo
00:51 marty joined #mojo
00:51 marty joined #mojo
00:54 Dandre joined #mojo
01:03 D4RK-PH0ENiX joined #mojo
01:05 yokada joined #mojo
01:09 laouji joined #mojo
01:22 ka2u joined #mojo
01:41 dvinciguerra joined #mojo
02:28 mire joined #mojo
02:28 Adurah https://metacpan.org/pod/release/MARIOROY/MCE-1.505/lib/MCE.pod jberger, forky enough for Mojo::IOLoop::ForkCall?
02:33 klapperl_ joined #mojo
02:42 laouji joined #mojo
02:50 laouji joined #mojo
02:58 bpmedley jberger: Do you have a smallish Mojolicious::Lite example for usage with your Mojo::IOLoop::ForkCall?
03:04 Curt joined #mojo
03:25 jberger Adurah not sure I get what you mean
03:25 Adurah It's not similar to the dependencies you use?
03:27 jberger I suppose it serves a similar purpose
03:28 jberger But iirc it does not present a non blocking interface but rather a worker pool one
03:29 Adurah Wonder if you could make the pool variably grow...
03:30 useless_chat joined #mojo
03:37 jberger I imagine that mce is about handling many of the same task
03:38 Adurah Yeah, seems that way.
03:38 jberger fc is about unblocking blocking tasks
03:38 jberger Like system calls
03:38 jberger bpmedley:  imagine using libreoffice to convert doc to pdf
03:39 jberger Easy to do with a system call, but that would block the loop
03:39 bpmedley Understood.  Do you have a usage example?
03:40 jberger http://stackoverflow.com/questions/19505798/using-anyevent-run-cmd-in-mojolicious-i-keep-getting-this-error-anyeventcon/19555801#19555801
03:42 jberger But again, if you need a specific example for fc, then I worry that you aren't understanding non blocking
03:42 jberger This basically just lets you call a sub reference which would block, but in a different process
03:43 bpmedley I was looking more for a Mojo::IOLoop example, sorry for the confusion.
03:43 * sri wonders if classes with autoload should keep using custom sections to describe the feature or use the same name like "=head1 AUTOLOAD"... http://mojolicio.us/perldoc/Mojo/Collection#ELEMENT_METHODS
03:43 mtj joined #mojo
03:43 jberger And it invokes a callback when done, very mojo or node style
03:44 jberger sri I basically think of AUTOLOAD as overloading the arrow operator
03:45 jberger So I say that's a good idea imo
03:45 * sri doesn't quite understand that way of thought
03:45 jberger bpmedley I don't know what you mean
03:46 sri how is "=head1 AUTOLOAD" a good idea because you think of it as arrow overloading?
03:46 jberger I mean that documenting the autoload somehow is a good idea
03:47 bpmedley https://metacpan.org/pod/release/JBERGER/Mojo-IOLoop-ForkCall-0.03/README.pod#SYNOPSIS  <-- Would you turn the SYNOPSIS into a minimal Mojolicious::Lite example?
03:47 jberger That so post does just that
03:47 sri it is documented already, the question was if it should be pointed out in the section name
03:47 jberger Except it uses the ae version
03:48 sri to make it consistent between all classes
03:48 jberger Which is why I ported it
03:48 jberger Oh
03:48 jberger Sure that sounds fine
03:48 jberger Consistency++
03:49 mire joined #mojo
03:51 bpmedley sri: It seems you're suggesting a specific AUTOLOAD section?  If so, then some people like to know if a package uses AUTOLOAD so they can tinker.
04:00 good_news_everyone joined #mojo
04:00 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/I1PaJg
04:00 good_news_everyone mojo/master 580d8aa Sebastian Riedel: document AUTOLOAD use consistently
04:00 good_news_everyone left #mojo
04:00 sri that's all i had in mind
04:01 sri http://mojolicio.us/perldoc/Mojo/Collection#AUTOLOAD
04:02 bpmedley I believe it reads more perl like with the AUTOLOAD section.
04:02 sri my ocd likes consistentcy
04:05 good_news_everyone joined #mojo
04:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/u9MebA
04:05 good_news_everyone mojo/master e955b69 Sebastian Riedel: move AUTOLOAD sections above OPERATORS
04:05 good_news_everyone left #mojo
04:13 laouji joined #mojo
04:14 jberger_ joined #mojo
04:19 tempire__ h@x0r3d!
04:22 laouji joined #mojo
04:24 jberger_ bpmedley, http://pastie.org/8659106
04:24 bpmedley Thanks
04:35 bpmedley Very cool.  The run method's Storable usage is awesome.
04:36 jberger_ I can't take much credit for it
04:36 bpmedley May I ask where you got the code?
04:36 jberger_ https://metacpan.org/source/MLEHMANN/AnyEvent-7.07/lib/AnyEvent/Util.pm#L227
04:40 bpmedley How come you're using IO::Pipely?  Why not just the pipe function?
04:56 jberger_ windows
04:57 jberger_ pipe doesn't work well enough for this task on windows
05:00 stl joined #mojo
05:01 jberger_ admittedly, I haven't done all of the windows specific code in the ae version
05:02 jberger_ I started by trying to port a minimal case, none of the "unnecessary" bits
05:02 jberger_ but slowly I keep finding the reasons for each part
05:02 bpmedley lol
05:03 jberger_ for example, I think I have found why I need POSIX::_exit(0)
05:03 jberger_ but that, according to the comments, might cause more windows problems
05:03 jberger_ :-/
05:03 * jberger_ thinks that eventually, it's going to be a 1-1 port
05:23 ka2u joined #mojo
05:36 ka2u joined #mojo
05:40 laouji joined #mojo
05:53 amirite joined #mojo
05:54 marcus joined #mojo
05:57 marcus joined #mojo
05:59 irq joined #mojo
06:39 dod joined #mojo
06:40 davido_ joined #mojo
07:29 laouji joined #mojo
07:32 dpetrov_ joined #mojo
07:33 laouji joined #mojo
07:39 hummeleBop joined #mojo
07:51 rawler joined #mojo
07:54 dod joined #mojo
08:02 rawler hi, I'm having problems intercepting exceptions in mojo, rendering them as JSON, for JSON-requests.. any ideas?
08:02 trone joined #mojo
08:04 rawler I've looked at render_exception, but unless something has excplicitly set $app->stash('format') by then, it seems it's content negotiation doesn't work..
08:04 rawler (I.E. simply setting the Accept: header to application/json, it will still render the exception in HTML)
08:20 marcus joined #mojo
08:32 odc joined #mojo
08:36 dod joined #mojo
08:54 Vandal joined #mojo
09:10 redr0bin joined #mojo
09:11 redr0bin hi, is there a good rpm spec file example to distribute mojolicious application ?
09:15 Tiger joined #mojo
09:23 basiliscos joined #mojo
09:44 kwa rawler: is the problem you're rendering an exception in a bridge or something, and the format isn't accessible by the render_exception method?
09:45 rawler kwa, yes, something like that.. (I assume you mean "throwing" the exception from a bridge?)
09:46 kwa Well, yeah.
09:47 kwa That's a known problem that's sri's been unable to fix because of the Mojo internals.
09:47 kwa Bridges and under don't properly set the format: http://pastebin.com/CzqZGNYt
09:48 rawler oh.. annoying..
09:48 kwa There's a hack though. Set/override the format in the bridge.
09:48 kwa Using something like: $self->stash(format => $self->match->stack->[-1]->{format}) if $self->match->stack->[-1]->{format};
09:50 rawler anyways, I managed to do a workaround.. catch the exception in an "around_dispatch" and render it through respond_to, with an any-fallback to Mojolicious::Controller::render_exception (override the rendering for json)
09:50 ver joined #mojo
09:51 kwa Fair enough. :)
09:57 rawler btw, shouldn't the "format" always be a list, of formats in preference order? and the generation of that list (now in respond_to) could be some common helper, or pre-dispatch hook that parses the request for format in priority-order? (I.E. ?format=XX in preference over Accept: )
10:00 fhelmber_ joined #mojo
10:04 dod joined #mojo
10:40 maxhq joined #mojo
10:41 denisboyun joined #mojo
11:01 rem_lex joined #mojo
11:06 ka2u joined #mojo
11:38 D4RK-PH0ENiX joined #mojo
11:42 Dandre joined #mojo
11:55 D4RK-PH0ENiX joined #mojo
12:20 irq_ joined #mojo
13:23 CURT joined #mojo
13:31 irq could `mojo get` accept stdin input for parsing with css selectors?
13:45 jberger_ joined #mojo
13:54 CURT joined #mojo
14:06 CURT joined #mojo
14:13 dvinciguerra joined #mojo
14:20 jberger_ irq xargs?
14:30 ka2u joined #mojo
14:34 bluescreen joined #mojo
14:39 jberger joined #mojo
14:42 sri so i guess mojoconf is a real thing now :o
14:43 marcus fo'shizzle.
14:43 marcus poor jberger couldn't take the excitement :-/
14:44 * sri puts some smelling salts under jberger's nose
14:44 marty joined #mojo
14:45 * jberger jolts awake
14:56 hellyna joined #mojo
14:56 btyler joined #mojo
14:57 bluescreen_ joined #mojo
15:01 kwa mojoconf? Nice :)
15:03 marcus kwa: Oslo, May 24th.
15:03 kwa marcus: When I turn up there, you'll all be in San Diego?
15:04 marcus kwa: I wish. San Diego is very nice :)
15:04 mire joined #mojo
15:05 kwa Yes it is. My best mate's Auntie lives in Coronado, and I found that to be the most delightful place I've ever been. :)
15:07 Mikey joined #mojo
15:10 marty joined #mojo
15:11 marty joined #mojo
15:14 mgrimes joined #mojo
15:24 ver_ joined #mojo
15:26 sri kwa, rawler: it's not about "fixing", the change is trivial, the real problem is that we are not sure if it's a bug or a feature... because the whole behavior in general is consistent
15:26 sri format would become a special case if we changed it
15:26 ver__ joined #mojo
15:26 kwa ahh, apologies
15:28 rawler from a high-level perspective, it is a bit unexpected to get a HTML-error when requesting JSON from the client.. so in some way or another there should be a clear way for the application-developer to trap exceptions and render JSON, IMHO..
15:28 ver_ joined #mojo
15:28 sri rawler: that way of thought is wrong imo
15:28 rawler (what I did now is to create my own dispatch_around hook, duplicating some of the code from the builtin exception-handler)
15:28 sri exceptions are something unexpected, real errors
15:28 kwa If you added ?format=json to the query string, that would correctly set the format type for rendering in the bridge. So I would have expected the same to happed from the file extension.
15:29 sri they don't get better just because you package them in json... all you need is the status code
15:29 sri you should never expect a 500
15:29 sri as in making it part of your official api
15:31 moritz would be kinda cool to be able to say Mojo::Exception->new('Please log in first', status => 401) and then some kind of render that packages that into a json or HTML response
15:31 moritz ... or does that even work that way right now?
15:31 sri moritz: that's terrible!
15:31 sri exceptions for flow control are an anti pattern
15:31 moritz why?
15:32 * sri is very old school in that he likes his exceptions to be exceptional
15:32 moritz so, why shouldn't it work in exceptional situations?
15:33 sri login prompt is normal flow, not an exception
15:33 moritz sure, but if the session timed out since the last request, that's a typical case for an exception
15:34 sri considering you wouldn't even know it did, i disagree
15:34 sri normal lifecycle of a web app
15:35 rawler in my controller, I would very much like to, for example, say $self->require_permission($object, 'view'), and expect require_permisson to abort the request with 403 unless the permission is granted..
15:35 moritz why wouldn't I know? If it's an ajax request that normally only originates from a page that user loads if he's already logged in?
15:36 moritz then it only happens if somebody tampers with my app (then I don't care about the quality of error messages), or if a session times out
15:37 sri afraid i don't follow, but it doesn't really matter, there's hooks for everything and you can just build a plugin if you really want to
15:37 moritz sri: it might be that there are other, powerful mechanism in Mojolicious for dealing with such situations; but from reading the docs so far, I simply wouldn't know what to look for
15:37 rawler neither did i.. :)
15:38 moritz and that's kind of a problem. If there were a book on Mojolicious, I'd gladly buy it.
15:38 rawler I had to spend roughly one working day digging through current error-handling in mojolicious, figure out why it didn't do what I want it to, and how to override it..
15:38 moritz something that gives a much broader overview of what each feature could be used for, and how to best use them together
15:39 sri bpmedley and jberger have started writing books
15:39 moritz the Mojolicious::Lite and the Growing docs kinda start with that, but it seems to me they just cover the easy 20% (or less) of Mojo(?:licious)?
15:39 moritz \o/
15:39 kwa moritz: add a helper "oh_noes" which handles the error how you want (respond_to, render etc.). Then call using return $self->oh_noes('session_expired', status => 401) from your controller.
15:39 kwa If you can help from calling die from the controller, it's easier to follow.
15:39 sri moritz, rawler: i have the feeling your expectations are wring though
15:40 sri *wrong
15:40 moritz sri: my expectation is a developer-friendly way of dealing with errors that produce good error messages for the end user
15:40 rawler sri: any suggestion on a _clean_ way to write a helper in Mojolicious to check a condition in a controller, and abort request-processing with a descriptive JSON-error if the condition fails?
15:40 moritz sri: is that wrong? :-)
15:40 sri throwing a Mojo::Exception to render something will never ever be a thing, since it wouldn't work async
15:41 sri you would be tied to using blocking apis
15:41 moritz well, I'm not tied to that approach
15:41 sri rawler: see what i just said
15:42 sri around_dispatch does not work async, you limit yourself to a minimal subset of mojo features
15:42 kwa rawler: Check my example above. That's the cleanest way I've found to handle errors.
15:43 moritz kwa: the problem is really the 'return'; it means the whole call chain must be set up to deal with possible errors
15:43 sri moritz: you're welcome to make a proposal
15:43 sri you seem to think this is a much simpler problem than it really is
15:43 moritz sri: I fear I don't know enough Mojolicious architecture to make a proposal that makes sense
15:43 sri exactly
15:43 moritz but I know there's a problem to which I don't know a good solution yet
15:44 sri as far as you're concerned, there is no exception handling in mojolicious, what's there are fallbacks for when you failed
15:45 kwa moritz: What's wrong with the return? You'd rather call the equivalent without the return (which makes the code flow less ambiguous) and capture the exception in a hook?
15:45 moritz kwa: I just explained what the problem is with return
15:45 sri use Try::Tiny or whatever
15:46 kwa I afraid I don't understand "it means the whole call chain must be set up to deal with possible errors".
15:46 moritz kwa: I'm not sure if exceptions are the only escape mechanism, but it's certainly one
15:46 moritz kwa: consider an authorization checker. Every function that calls it must be aware that it might return unsuccessfully
15:47 moritz kwa: worse, every function that might call any function that might call the authorization checker must be aware that it might return unsuccessfully
15:47 moritz kwa: ad infinitum
15:47 moritz and we're back to C code return code checking
15:48 moritz so probably Try::Tiny is the best approach, though it's a bit ugly to use it in most/all controllers
15:49 rawler kwa: you mean the pastebin you posted? for my requirement, I need it to check for specific permissions.. duplicating that respond_to-logic in every controller-method is not really an option..
15:49 kwa moritz: Well, I perform authorization checking in a bridge. Not in the controller endpoints.
15:49 moritz rawler: could be an application-wide helper instead of a controller method
15:49 kwa rawler: I was referring to a helper, not the pastebin.
15:50 moritz kwa: sadly not all authorization checks are so simple
15:50 moritz authentication, yes
15:51 * moritz -> afk
15:51 gryphon joined #mojo
15:51 kwa I know what you mean. I've written an API, and I check specific authorization checks at the start of the controller. Hmm, I should release the plugin I'm using.
15:54 sri moritz, kwa: which framework has better exception handling?
15:54 kwa rawler: something like http://pastebin.com/0MyjRMTj
15:55 sri s/kwa/rawler/
15:55 kwa sri: I wouldn't say they were better, just different. Coming from Catalyst... oh.
15:55 moritz sri: dunno; I've tried Catalyst, and didn't like it for other reasons; I don't have much experience with other frameworks
15:55 sri moritz, rawler: i'm open for improvements, but you're giving me absolutely nothing to work with
15:56 moritz sri: yes, I am. A problem statement.
15:56 moritz that's something to work with.
15:56 sri not really
15:57 moritz well yes. It's just one to which you don't seem to know a solution right now that you like
15:57 sri i'm not aware of any "solutions"
15:58 moritz that's ok.
15:58 sri in fact, i'm not even aware of any framework that has anything even remotely comparable
15:58 rawler sri: IIRC, Django, Rails, Tornado, Bottle or Flask (I can never remember which is which)
15:59 sri rawler: please give me a link
15:59 * moritz -> really afk
16:00 rawler sorry, don't have one ATM and GTG soon.. but I know for sure I'm used to dealing with these types of errors by throwing exceptions handled by an exception render, and those are the frameworks I've been working mostly with before..
16:01 sri I KNOW FOR SURE... BUT I CAN'T TELL YOU
16:01 rawler sorry, _I don't have the time to look up the details for you_
16:02 sri moritz, rawler: sorry... but i just can't take you two serious anymore
16:02 rawler but, this is not at all constructive and I have to go.. bye..
16:04 amirite joined #mojo
16:06 kwa sri: It's the mentality that needs to change. 8 months ago I was thinking like them, but after taking your advice and properly controlling would-be exceptions, the flow is a lot more logical.
16:07 sri rawler: yea... my bad... should have said "patches welcome" and moved on... instead of trying to actually understand you mean
16:08 sri *+what
16:08 kwa The only problem I encountered is using DBIC which raise its own exceptions. My only solution to that was to trap the error after you implemented around_action.
16:09 ka2u joined #mojo
16:17 CURT joined #mojo
16:19 marty sri: please fix all the things even if they are not broken.  and then...ALL GLORY TO THE HYPNOTOAD!
16:20 sri EBROKENCRYSTALBALL
16:21 nornagest joined #mojo
16:21 kwa Yeah, and stop asking sensible questions. Does my head in.
16:23 marty hot deployment with hypnotoad is soo frakin awesome.
16:23 sri on a more serious note... making respond_to work with .html extensions in bridges is as simple as this http://pastie.org/8660786
16:24 sri i know marcus was interested in that, but i don't remember why he gave up exactly
16:25 marty that might come in useful but I have no use case that comes to mind.
16:25 sri oh, it also applies to all other render calls actually
16:25 sri and auto rendering
16:25 purl auto rendering is independent
16:26 kwa ahh, I thought last time you looked into it, there were other repercussions
16:26 marcus sri: I was to dumb to figure out the router :-/
16:26 marcus *too
16:26 sri wasn't it a documentation issue?
16:26 * sri doesn't remember :/
16:27 sri i'm a bit on the edge about it... format is already kind of a special case... so i don't think the change would make things that much more complicated
16:28 sri only allows bridges to share the detected format for the whole route
16:29 kwa and under too?
16:29 marcus marty: the use-case we had was to respond to json requests with a json error when auth was failed rather than a html error.
16:29 sri under is a bridge
16:29 kwa k
16:29 marcus (we had a auth bridge to check if you are logged in).
16:30 kwa (Same use case we had.)
16:30 sri two solutions actually
16:30 sri respond_to could also try $self->match->stack->[-1]->{format}
16:32 kwa That would work for me. I suppose the only thing would be if people are implementing their own respond_to.
16:32 sri right, question is which one is more "correct"
16:33 sri oops
16:33 sri my bad... normal render call need the format too
16:33 sri so respond_to fix is out
16:33 kwa I'd say knowing the format at any point in the chain would be most beneficial.
16:36 sri marcus, jberger, tempire, crab: thoughts?
16:37 marcus sri: I'm very much in favor of this change.
16:38 sri there's also the case ->under('/foo' => {format => 'txt'} => sub {...})->get('/bar' => sub {...});
16:38 marcus I was actually puzzled when I discovered it didn't work, and I don't see people being sidetracked by it worked as likely.
16:38 sri currently untested, but it might be better not to break it
16:39 sri hmmm
16:39 marcus sri: but won't  //= preserve it?
16:39 sri it would, but is that what we want? ;p
16:40 sri is it more consistent if format is simply set for all bridges
16:40 marcus I'd be fine with that too I guess, I can't see why anyone would do that.
16:42 * sri nods
16:47 bluescreen joined #mojo
16:52 btyler moritz: re async exception handling: it's a thorny enough problem in express/nodejs that the prevailing best practice (as far as I'm aware) when a true exception occurs is to kill the process and have your supervisor start a new one. throwing real exceptions doesn't jibe well at all with async (as manifested in node, at least)
16:53 btyler so you end up with fairly ugly long callback chains with signatures that all start with "err", and checking for that/sending it further up the chain
17:03 good_news_everyone joined #mojo
17:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/9wOz2A
17:03 good_news_everyone mojo/master 300485b Sebastian Riedel: improved router to allow format detection for bridges
17:03 good_news_everyone left #mojo
17:09 irq jberger: I rather meant behavior like mojo get mojolicio.us 'head' | mojo get - 'title' - little sense, but it is just an example
17:09 kwa sri++
17:11 irq ... where second mojo get - gets its contents for processing from stdin, not with real http request
17:13 jberger irq I can't think that far ahead, at that point I would be writing a script
17:14 jberger mojo get is mostly just a debugging tool
17:15 irq ok, but on the other hand mojo tutorials say that `mojo get url 'css-selectors' ` is so nice standalone tool....
17:16 irq very handy for ad-hoc scraping
17:18 irq but some cases might need too much css proficiency that could be just worked around easy just this way
17:18 irq even for your own debugging
17:19 irq so miss `mojo get -` option (or get stdin:// ?)
17:20 irq sri: ... a comment on that, please?
17:21 beyondcreed joined #mojo
18:25 btyler_ joined #mojo
18:28 dod joined #mojo
18:39 marcus joined #mojo
18:46 good_news_everyone joined #mojo
18:46 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/jq2p7g
18:46 good_news_everyone mojo/master fd3debb Sebastian Riedel: bridges do not always match
18:46 good_news_everyone left #mojo
18:47 sri wondering how the format thing should be mention in documentation, but can't really think of anything
19:11 CURT joined #mojo
19:14 btyler joined #mojo
19:42 sri irq: i agree with jberger
19:56 mire joined #mojo
20:07 denisboyun joined #mojo
20:46 CURT joined #mojo
20:51 CURT I'm back with the same Test::Mojo question. Is it possible to test the localhost using the server DNS name? Hopefully, http://pastie.org/8661521 illustrates what I'm attempting to test.
20:59 sri haha, here's a fin exception handling patch http://pastie.org/8661559
20:59 sri *fun
21:00 sri lets just say fuck it... and let everyone roll their own with around_exception and around_not_found hooks
21:04 sri around_not_nound has a nice ring to it :S
21:11 sri i'm not entirely sure, but i might be trolling
21:12 jberger Hehe
21:16 marcus around_trolls
21:31 dvinciguerra joined #mojo
21:34 bowtie_ joined #mojo
21:38 trone joined #mojo
21:48 marty CURT: Is there a reason you do not want to specify the host in the test?  ie:   $t->get_ok('http://example.com')->status_is(200);
21:48 good_news_everyone joined #mojo
21:48 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Ha8zuw
21:48 good_news_everyone mojo/master cd47d8c Sebastian Riedel: mention that built-in exception and not found pages are fallbacks
21:48 good_news_everyone left #mojo
21:49 bluescreen joined #mojo
21:53 CURT In this case, example.com is the name of the local machine. I'm attempting to validate the DNS and want all future tests to use the DNS name.
21:54 lukep joined #mojo
21:56 CURT Guessing I should be setting $tx->req->url->host('example.com');
21:56 CURT But, I only get a response using localhost or 127.0.0.1
21:57 marty I'm don't know how to set the host for all future test (but I'm sure there is a way).  But it seems to me that once you verify DNS is working, running tests against a remote host does not seem to accomplish much.
22:02 CURT Cookies are globally served by a proxy and domain name is validated... Basically the cookies is not valid with localhost
22:11 CURT $tx->req->url->host('example.com'); sets the host for all future tests but I don't get a response... Even with the IP address of the server.
22:28 AirDisa joined #mojo
22:30 btyler joined #mojo
22:53 * marty does hot deployments with hypnotoad just for fun
23:12 dvinciguerra joined #mojo
23:29 alnewkirk what might be a preferred strategy for designing routes to match an optional version prefix?
23:29 alnewkirk e.g. /users and /v(:version)/users
23:32 sri hmm... i have a simple patch for adding left/right trimming to Mojo::Template with <%= $foo ==%> and <%= $foo ===%>
23:32 sri wonder if it's worth the extra line
23:40 sri alnewkirk: see 4.68 release
23:40 sri you're very lucky
23:42 sri jberger, marcus, tempire, crab: thoughts on l/r trimming?
23:47 sproingie <%= $foo ==============================%>
23:48 sri <%== $foo ===%> would be the maximum
23:48 * marty is +1 on left/right trimming
23:49 sri what's more common, right or left side trimming?
23:49 marty I would use that a lot but probably for all the wrong reasons.
23:49 marty I feel about equal for my use.   I
23:50 alnewkirk sri: not sure what you're referring to specifically - https://github.com/kraih/mojo/compare/v4.68...master
23:50 alnewkirk nothing there seems relevant
23:51 sri you're funny
23:51 marty <script> var = '<%== $foo ===%>'; </script>   I hate to say it, I have a lot of that.
23:53 sri that ===%> doesn't do anything
23:53 sri there has to be whitespace around the tag
23:55 sri it doesn't trim the $foo value :)
23:57 denisboyun joined #mojo

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