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

IRC log for #mojo, 2014-01-16

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

All times shown according to UTC.

Time Nick Message
00:25 dvinciguerra joined #mojo
00:39 marty joined #mojo
00:56 laouji joined #mojo
00:58 russum joined #mojo
01:05 d4rkie joined #mojo
01:07 * jberger_ hugs marty
01:08 marty joined #mojo
01:14 denisboyun joined #mojo
01:24 d4rkie joined #mojo
01:29 ka2u joined #mojo
01:38 TitanOfOld joined #mojo
01:44 d4rkie joined #mojo
02:41 klapperl joined #mojo
02:43 laouji joined #mojo
03:02 jberger joined #mojo
03:34 stephan48 joined #mojo
04:11 preflex_ joined #mojo
04:16 zivester joined #mojo
04:50 tempire joined #mojo
05:01 ka2u joined #mojo
05:02 beyondcreed joined #mojo
05:03 laouji joined #mojo
05:18 laouji joined #mojo
06:24 laouji joined #mojo
06:24 mishantil Anyone here atm?
06:25 mishantil Ever run into Test::Mojo failing a content_like()-test when a utf-8 character is part of the regex?
06:27 mishantil Oh, it seems the tests only fail if i have 'use utf8;'
06:27 mishantil *removing*
06:29 usetheforce joined #mojo
06:31 usetheforce Mojolicious is licensed under Artistic License 2.0... Does this mean that since I am using it as my framework that I absolutely must release the source code for my webapp?
06:33 usetheforce I am hoping that this is the case, because I am worried that the company I work for may take issue with what I am working on, and I want the license of the framework to enforce that what I am creating must be FOSS.
06:35 laouji joined #mojo
06:39 Vandal joined #mojo
06:44 tianon https://en.wikipedia.org/wiki/Artistic_License << see "Copyleft: No", but IANAL (obviously, because I'm recommending "legal advice" from Wikipedia :D)
06:56 usetheforce Dammit, that sucks.
06:57 usetheforce Going to have to use something fundamental to the webapp that is licensed under GPL, but that's easier said than done.
07:01 crab "your software sucks, it's too free" ;-)
07:04 tianon crab++ # :D
07:05 jberger joined #mojo
07:18 dvinciguerra joined #mojo
07:18 mishantil This must be one of the best section headers ever: http://search.cpan.org/~miyagawa/Starman-0.1000/lib/Starman.pm#Why_the_cute_name_instead_of_more_descriptive_namespace?_Are_you_on_drugs?
07:18 hummeleBop joined #mojo
07:24 arthas joined #mojo
08:07 dod joined #mojo
08:08 dotan joined #mojo
08:16 ver joined #mojo
08:20 ka2u joined #mojo
08:25 dod joined #mojo
08:29 Foxcool joined #mojo
08:30 trone joined #mojo
08:37 basiliscos joined #mojo
08:40 odc joined #mojo
09:26 d4rkie_ joined #mojo
10:03 hesperaux_ joined #mojo
10:04 dvinciguerra joined #mojo
10:12 tianon joined #mojo
10:17 preflex joined #mojo
10:29 irq joined #mojo
10:42 ka2u joined #mojo
10:43 nikita joined #mojo
10:43 nikita hello
10:44 nikita have anyone used kiokudb with mojolicious?
10:45 amirite joined #mojo
10:47 nikita i'm definitely doing something wrong with that
11:02 dpetrov_ joined #mojo
11:05 denis_boyun joined #mojo
11:11 dsteinbrunner joined #mojo
11:16 TitanOfOld joined #mojo
11:28 fhelmber_ joined #mojo
11:33 ka2u joined #mojo
12:35 d4rkie joined #mojo
12:36 mire__ joined #mojo
12:45 hrupp joined #mojo
12:50 d4rkie joined #mojo
12:56 dod joined #mojo
13:26 rawler joined #mojo
13:26 rawler heya!
13:26 rawler new to mojo, evaluating for a project where REST-mapping is essential..
13:27 rawler looking to map something like $route->bridge('/entities/#entity_uri')->to('entities#resolve');
13:27 rawler only problem, #entity_uri can, of course, include slashes..
13:28 jberger_ joined #mojo
13:29 rawler *entity_uri is not really suitable, since I want to follow up by, for example; $entity->get('/history')->to('entities#history');
13:30 kwa https://metacpan.org/pod/release/SRI/Mojolicious-4.67/lib/Mojolicious/Guides/Routing.pod
13:30 rawler my natural rection would be to expect the #entity_uri to be url-encoded in the client, and then url-decode the parameters after matching, server-side, but it seems Mojolicious url-decodes the _entire_ path, before trying to match anything?
13:31 rawler suggestions?
13:31 purl suggestions are like suits.  Either they're tailored to the problem at hand, or they don't fit well.
13:31 kwa If you're swallowing slashes, you're not going to be able to ->get('/history') for an entity.
13:31 kwa I suggest mapping each path you want.
13:32 rawler kwa: exactly.. hence #entity_uri, not *entity_uri..
13:32 rawler the thing is, #entity_uri is an opaque identifier, and follows no rules except that for a URI..
13:35 kwa #foo won't take slashes though?
13:36 kwa Regardless. Why are you writing your own dispatcher (under entities#resolve). Just use Mojo's?
13:38 rawler not writing a dispatcher..
13:39 rawler the uri is an opaque identifier, used to lookup an entity from a db..
13:39 rawler it just happens to occasionally contain slashes.. the slashes have no meaning in this context..
13:41 kwa Ah. I thought you were using the placeholder for your own dispatch purposes.
13:41 kwa Well, that's tricky. :)
13:41 rawler I were hoping to be able to simply expect them URL-encoded, like "/entities/https%3A%2F%2Fsome.site%2Fpath", but it seems Mojolicious unescapes _before_ matching, not after, which means requiring double-encode, which is ugly.. :)
13:42 kwa Using the wildcard placeholder doesn't work for you because you want to have /history at the end of the resource?
13:43 rawler exactly..
13:43 kwa Looking at the docs though, it should still support what you want?
13:44 kwa ./sebastian/23/hello -> /*name/hello -> {name => 'sebastian/23'}
13:44 rawler even _if_ it would work in some cases, it would be fragile, since entity_uri might very well end in '/history' itself..
13:44 crab that is hideous, don't do it
13:46 kwa Yeah, it doesn't seem very RESTy. You're not really describing resources. Seems like you're writing your own rest dispatcher under a single route.
13:46 kwa Can you not provide unique identifiers for your entities?
13:47 rawler I'm describing a resource (Entity).. it's just that the natural identifier for the resources might include slashes..
13:47 mil Or take the entity id using a parameter instead of part of the url?
13:47 rawler I don't pick the natural identifiers (clients are).. I can naturally map to an extra id and use that, but I would of course prefer not to..
13:48 rawler mil: taking as parameters works, but also not very RESTy, especially not for, say '/entities/history?id=some_uri'
13:49 mil but if you are already having a second http:// in your url i would say thats ok :)
13:49 jberger_ rawler you are using some kind of singe page JavaScript framework?
13:50 rawler not using and web-front so far.. this is a pure REST backend for some different frontends to be coded later..
13:53 kwa rawler: How about /entities/:id/history - if they want to use a name containing a slash then provide redirection if they really want to use a label /redirect/*entity_label. I don't see anything good coming of using anything other than a unique identifier.
13:53 jberger_ Just asking. Ok then my guess is that you are inadvertently causing mojo to escape
13:53 kwa You said the clients pick the identifiers - so I'm assuming they can even change them. Doesn't sound too good for other services expecting a specific identifier.
13:53 rawler kwa: URI is by definition unique.. ;)
13:53 jberger_ Read this and see which methods will cause that to happen: http://mojolicio.us/perldoc/Mojo/Path
13:54 asarch joined #mojo
13:55 rawler kwa: or, well, at least it is in our specific case.. each client uses his/her own registered domain for URI.. changing is not allowed.. it is considered a new entity if it has a new uri..
13:56 rawler but, so basically, it is not possible to trick Mojo:s router into doing this in any reasonable way?
13:57 jberger_ wait wait, do you want the thing after the literal # not to be part of the fragment but part of the path?
13:58 rawler the # is the notation used in mojo to match something allowed to contain '..' ?
13:59 rawler It's not a fragment-identifier in this context..
14:00 rawler basically, what I would need, is a way to let the Router url_unescape the data matched for placeholders, _after_ matching, instead of url_unescaping the entire path before..
14:01 rawler but after looking at the code, it seems like the it was simply designed differently..
14:01 crab it has repeatedly been proved unsafe to try to unescape and interpret url data piecemeal
14:02 crab you can of course do whatever you want with a before_routes hook or similar
14:03 rawler not sure what you mean by "piecemeal", but I'm not sure how before_routes will help me.. the path seems to be decoded as soon as it's put into the Path-object..
14:03 crab but for what it's worth, i advise against it quite strongly... especially putting the fake-url in the *middle* of your routes, with a /history suffix or whatever.
14:03 jberger_ rawler ok now that i understand can you provide an example of a url that might exist in your app
14:04 crab rawler: "a way to let the Router url_unescape the data matched for placeholders, _after_ matching, instead of url_unescaping the entire path
14:04 rawler jberger_: I would like to be able to handle "/entities/https%3A%2F%2Fsome.site%2Fpath/history" in a reliable way..
14:04 crab before" <- piecemeal
14:05 jberger_ Ok I'm caught up, thanks
14:07 jberger_ I think I would have expected that to work
14:08 jberger_ I'm on my phone so i can't test now
14:09 rawler http://stackoverflow.com/a/3235361/103192 <- this was kindof interesting and related
14:11 jberger_ Ah, makes sense
14:11 rawler although I cannot find where in the spec it says that PATH_INFO should be URL-decoded..
14:11 jberger_ Is it important that the url be human readable?
14:12 rawler not really, but if you're thinking base32 or something like that, I think I'd rather go the extra-id route.. :)
14:12 jberger_ Yeah that was my idea
14:14 kwa It will be easier in the long run. I can't see your clients manually typing in the url anywhere. In theory they would go to /entities and get a list of their entities (if authenticated). That could give them the unique id for their entity, and the human readable description.
14:16 rawler kwa; of course.. typing manually is not a case, it's simply easier to debug and follow logs if natural keys are used (and sometimes saves an extra request/roundtrip)..
14:16 rawler but it seems like this is not an option here.. at least not with Mojolicious as it stands right now..
14:17 kwa rawler: True, but if you're writing your tests (Test::Mojo is excellent) it's not really an issue.
14:17 jberger_ Or double encode, I don't have any other ideas if this is really a requirement
14:18 rawler not talking about debugging during development, of course.. debugging in live environment, as well as simple traceability.. (an important requirement in this shop)
14:18 jberger_ <3 Test::Mojo
14:19 rawler double-encode or base32 is IMHO worse than extra id.. I guess it'll have to be a reasonable compromise for this case..
14:21 rawler (background, the system I'm building is going to be an important authentication-hub for national healthcare as well as other national services.. Auditing is quite a HARD requirement, and of course not limited to readable logs, but readable logs is part of it)
14:22 jberger_ Yeah I get the use case
14:24 jberger_ I was envisioning a way-back machine, but it's the same idea on the surface
14:24 marty joined #mojo
14:24 rawler pretty much, yes..
14:25 jberger_ Sadly this is as far as my expertise in this area of mojo goes
14:26 dvinciguerra joined #mojo
14:26 jberger_ I'm more the real time guy :-)
14:26 * jberger_ defers to the REST guys
14:26 rawler yeah.. basically, it doesn't seem doable with Mojo.. checking Catalyst right now.. (Catalyst is the standard WAF here, were hoping to escape it ;)
14:27 jberger_ I would hate to see that being a blocker for you
14:27 rawler well, unless Catalyst can handle this particular case better (which is far from certain), it won't be..
14:28 rawler and even if it CAN, I'm not sure other parts of Mojo won't still outweigh this, but I have to check with colleagues..
14:29 jberger_ Crazy idea ... use some hook to pre process the uri (eeek)
14:30 rawler nope! :)
14:30 jberger_ http://mojolicio.us/perldoc/Mojolicious#before_routes
14:30 jberger_ :-P
14:30 jberger_ Well I'm off to work
14:30 jberger_ Good luck
14:30 purl You'll need it.
14:31 rawler without checking, I don't think I can prevent uri-escaping through that..
14:35 jberger_ http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Rewriting
14:47 rawler FWIW, catalyst seems to work similarily..
14:48 mire__ joined #mojo
14:49 rawler Thank you for the discussion! :)
14:52 btyler joined #mojo
15:06 sh4 joined #mojo
15:09 Bender joined #mojo
15:34 gryphon joined #mojo
16:03 mire__ joined #mojo
16:36 sh4|2 joined #mojo
17:19 dpetrov_ joined #mojo
17:21 sh4 joined #mojo
17:21 * tempire_ <3
17:24 beyondcreed joined #mojo
17:30 dod joined #mojo
17:31 sh4 joined #mojo
17:32 nornagest joined #mojo
17:35 sh4 joined #mojo
17:38 ka2u joined #mojo
17:47 sh4 joined #mojo
17:49 asarch joined #mojo
17:50 sh4 joined #mojo
17:55 asarch joined #mojo
18:32 rem_lex| joined #mojo
18:42 irq joined #mojo
19:01 ka2u joined #mojo
19:07 meshl joined #mojo
19:17 dpetrov_ joined #mojo
19:39 jzawodn joined #mojo
19:52 dvinciguerra joined #mojo
19:56 good_news_everyone joined #mojo
19:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/KbeJ3Q
19:56 good_news_everyone mojo/master 2772cba Sebastian Riedel: new FAQ answer for blocking and non-blocking operations
19:56 good_news_everyone left #mojo
20:14 darth_vader joined #mojo
20:15 cullum Services on c0ffee.net will experience a short downtime at 15:15 today as the server is rebooted for a kernel update.
20:16 KindTwo joined #mojo
20:17 cullum joined #mojo
20:32 dsteinbrunner joined #mojo
20:35 lukep joined #mojo
20:37 marty joined #mojo
20:37 marty joined #mojo
20:39 mire__ joined #mojo
20:43 irq_ joined #mojo
21:04 mire__ joined #mojo
21:12 Adura joined #mojo
21:20 dsteinbrunner joined #mojo
21:24 meshl joined #mojo
21:44 trone joined #mojo
22:22 ssm joined #mojo
22:29 nic I'm intrigued that cron daemon is so damn reliable
22:29 nic one rainy weekend I'll need to sit down and read the code and see how they do it
22:29 avenj "decades of nothing changing"  ?  ;)
22:32 nic For my own daemons I end up needing to have watchdogs, but who's watching the watchdogs?
22:32 nic Time and again I need to rely on cron for keeping a check that everything else is behaving
22:40 gryphon joined #mojo
22:52 tianon joined #mojo
23:16 basiliscos joined #mojo
23:27 jnbek joined #mojo
23:53 dsteinbrunner joined #mojo

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