Camelia, the Perl 6 bug

IRC log for #mojo, 2012-04-08

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

All times shown according to UTC.

Time Nick Message
00:00 tempire getting rid of relaxed placeholders seems scary.
00:01 sri really?
00:01 sri if we rework formats they might become rather unnecessary
00:02 sri normal placeholders could gain relaxed semantics
00:02 tempire oh, well that sounds better.
00:03 sri the point of normal placeholders not matching "." was to make formats in their current form work
00:05 sri whole thing could turn out to be a rather big routes change
00:05 sri there are many many side effects
00:05 tempire huh
00:05 tempire ('/foo',formats=>[qw/html js rss/]) works?
00:05 sri ye
00:06 tempire I did not know this.  That's pretty cool :)
00:06 sri http://mojolicio.us/perldo​c/Mojolicious/Lite#Formats
00:06 sri all placeholders can have an arrayref with options
00:06 tempire has it been that way forever?
00:06 sri it's rather new, change we made a few months ago
00:07 tempire ok.  I only feel a few months bad, then.
00:08 sri well, june 2011
00:08 sri in 1.49
00:08 tempire that is quite a few months.
00:09 sri http://mojolicio.us/perldoc/Mojolic​ious/Lite#Restrictive_placeholders
00:09 sri alternatives get compiled to a regex for you
00:09 tempire seems like I should have mentioned that in e2
00:10 * sri nods
00:10 * tempire blames sri
00:10 * sri blames marcus
00:11 * tempire blames Marcus
00:11 sri :D
00:11 sri what i don't like about the current format handling is that it's a special case
00:12 tempire how so?
00:12 sri it's implicit and not handled like a normal placeholder
00:12 sri has its own regex for example
00:12 sri we have one route and one format regex
00:13 sri big problem is the stupid "."
00:14 sri can't really have an optional format without changing the whole optional placeholder system
00:15 preflex joined #mojo
00:15 sri in a clean system you would need two routes for "/foo" and "/foo.json"
00:15 sri (clean = all placeholders are equal)
00:17 tempire the current method seems ok to me.
00:17 hide TagHelpers should work the same regardless if a lite app or not right?
00:17 tempire hide: yes
00:17 * tempire makes tacos
00:18 sri it's less of a problem since respond_to
00:19 sri allowing formats for all routes still seems a little too liberal imo, like marcus said
00:19 sri (by default)
00:20 tempire you mean allowing all formats for each route?
00:20 sri ye
00:20 sri all routes kinda have an implicit "(:format)" by default
00:24 hide Getting this failure when testing against a non-lite app - https://gist.github.com/2333098 everything renders right except for the link_to with a hash_ref
00:46 sri perhaps it's still too early to rethink routes :)
01:07 Elraraniel joined #mojo
01:08 Elraraniel Say I specifically want to set a cookie that is not handled by Mojo's session management nor protected against tampering (so other apps can read it). How would I do this?
01:47 tempire Elraraniel: http://mojolicio.us/perldoc/M​ojolicious/Controller#cookie
01:51 Elraraniel tempire: Thanks :) I thought that was signed also, guess not.
02:14 buu Elraraniel: Signed cookies don't prevent other people from reading it..
02:14 Elraraniel buu: True, but I need to store a simple value that nginx/apache can read. I am not worried about tampering.
03:06 ispy_ joined #mojo
03:08 Liam joined #mojo
03:13 tempire https://fbcdn-sphotos-a.akamaihd.net/h​photos-ak-ash3/555475_1015066362194242​4_286683382423_9589839_229721954_n.jpg
03:14 Elraraniel tempire: :)
03:18 tempire here in #mojo, we encourage rainbows and unicorns
03:18 tempire AND ABOVE ALL
03:18 tempire http://smarterware.org/wp-content/u​ploads/2011/03/100-nice-people.png
03:21 Liam joined #mojo
03:40 asarch joined #mojo
05:23 Patterner Invisible Pink Unicorns?
05:38 mire_ joined #mojo
05:48 Elraraniel left #mojo
05:57 kaare joined #mojo
06:15 Skolem joined #mojo
06:20 Skolem What's the easiest way to serve multiple domains with multiple Mojolicious apps running on the same IP address?  With Apache I'd use a VirtualHost directive, but I don't want to use anything outside Mojolicious if I can help it. Currently, I have two instances of morbo on the same server (which has only one external IP address), one for each app, one running on on port 80 and 8080, and I'd like to put them both on port 80.
06:21 buu Are you intending to give them different domain names?
06:27 Skolem yes.
06:27 buu This is just a guess, but I strongly suspect morbo doesn't support virtual hosts.
06:27 buu You could 'host' one app in another one
06:27 Skolem That makes sense, how would I tell which host a request was for?
06:28 buu The Host: header
06:28 Skolem I figured as much. Is there any good way to group all my requests for one host together?
06:29 Skolem Without using the HeaderCondition plugin and adding a bunch of "host => foo.com" and "host => bar.com" to each route?
06:29 Skolem err, adding either "host => foo.com" or "host => bar.com" to each route in the new, combined app?
06:30 Skolem By the way, I'm not wedded to "morbo", but I would like to do this all within mojolicious if possible. I understand mojolicious also includes a different web server, but I've never used it.
06:30 buu This sounds like a massive amount of effort to avoid using an actual webserver
06:31 Skolem I suppose it is. What's the simplest "actual web server" that would let me accomplish this?
06:31 buu Simplest to.. configure? Install? Update? Patch? =]
06:31 Skolem Understand. I feel like I understand what morbo is doing, for instance.
06:31 Skolem I've never fully understood apache.
06:32 buu oh
06:32 buu Webservers are honestly pretty simple
06:32 buu But I suppose it would be difficult to summarize in an irc chat
06:32 Skolem Let's define "Simplest" in terms of lines of source code then.
06:33 Skolem You may not have an answer ready at hand to the question when it's posed that way, since you evidently think in sensible terms like ease of configuration, installation, updating, and patching.
06:34 buu People say nginx is pretty simple and easy to understand
06:34 buu It's certainly smaller than apache
06:34 buu Also neither mojo server seems to support virtualhost
06:34 Skolem Cool, I'll give nginx a try then. Thanks for the help and for the recommendation!
06:35 buu I have no idea if this is working and/or simple http://search.cpan.org/~markov/HTTP-Server-Mu​ltiplex-0.11/lib/HTTP/Server/VirtualHost.pod
06:35 buu But it's perl!
06:35 buu There's like a dozen plack based perl servers on cpan now
06:36 Skolem Oh, cool!
07:15 Skolem joined #mojo
07:26 marcus Weird that nobody has written a renderer for Template::Mustache
07:47 avkhozov joined #mojo
07:48 fibo joined #mojo
07:57 black joined #mojo
08:10 marcus sri: still really wish the plugin generator would make Mojolicious-Plugin-MyPlugin/
08:20 psimanx1 joined #mojo
08:23 dwierenga joined #mojo
08:28 Psyche^ joined #mojo
08:51 sri skolem/buu: http://mojolicio.us/perldo​c/Mojolicious/Plugin/Mount
08:53 buu Chihuahua::Mount
08:54 buu sri: Oh. Woah. Suggest: add the phrase "virtualhost" somewhere on that page!
08:54 buu (so google will find it)
08:55 sri that's an apache term, kids these days don't really learn apache anymore
08:56 buu We'll force them to.
08:56 buu Besides, what else would you call it?
08:56 Htbaa joined #mojo
08:57 sri host header based dispatch?
08:57 * sri shrugs
08:57 sri https://github.com/shariful​in/mojolicious-plugin-i18n2 # looks like my i18n plugin worries were unwarranted
09:23 memowe marcus: what do you mean by "a lot"? #bootylite
09:50 sri http://4.bp.blogspot.com/_D_Z-D2tzi14/S8TRIo​4br3I/AAAAAAAACv4/Zh7_GcMlRKo/s400/ALOT.png
09:51 memowe I KNOW THAT ALOT!
10:10 avkhozov joined #mojo
10:52 marty joined #mojo
11:36 marty_ joined #mojo
11:42 sven^ joined #mojo
12:19 hipyhop joined #mojo
12:34 sri http://3.bp.blogspot.com/_D_Z-D2tzi14/S8TTPQ​CPA6I/AAAAAAAACwA/ZHZH-Bi8OmI/s400/ALOT2.png
12:36 sri oh, 600 watchers on github \o/
13:06 sri btw. happy zombie jesus day everyone!
13:17 sh4 joined #mojo
13:31 abra joined #mojo
13:33 abra joined #mojo
14:43 sri https://github.com/kraih/mojo/pull/313 # whoever sent this pull request, i'm assuming it was accidental
14:45 hide it's mine, I've talked about it here, no one respondes
14:45 hide so I sent a pull request, hoping someone would see.
14:45 hide it's either something I've misconfigured or a bug
14:45 sri personally, i really don't like huge pull requests out of the blue
14:45 hide but I'm having problems using tag helpers in an application
14:46 hide and I wrote tests to test them, and they're failing
14:46 hide I can understand that, I read the contribution documentation before sending it.
14:46 hide tried to follow that
14:47 sri think i've seen your pastes and ignored them because they were all walls of text
14:47 * sri has a very very short attention span
14:47 hide I won't be offended if it's rejected, just wanted to help out
14:47 hide figured failing tests was the easiest way
14:47 sri duplicating 50000 tests is not such a good start, it only distracts from the actual problem
14:48 sri i also don't really see the point, lite routes are internally just normal routes
14:49 hide it's not the routes, it's the tag helpers
14:49 hide any one with a hash ref is failing
14:50 sri then that's what you actually need to test
14:50 hide and they're there.
14:51 sri give me that one test case please
14:51 hide ok
14:51 sri if it's something that simple i don't actually care about it being a unit test, oneliner would be fine too
14:52 hide this gist shows 1 falling test - https://gist.github.com/2333098
14:52 sri that gist tells me nothing
14:53 hide give me a couple minutes and I'll rip out 1 test and put it into a separate file.
14:57 sri https://github.com/kraih/mojo/blob/mast​er/lib/Mojolicious/Routes/Route.pm#L281
14:57 sri that's how lite routes are generated
14:57 sri so inconsistencies between normal and lite apps are pretty much impossible
15:00 marcus Hide: i don't understand what is failing in that paste.
15:01 hide form/23, the 23 is missing from the { test => 23} in the links_to tag
15:01 marcus Expected seems very similar to what you got.
15:01 sri the important part is missing from the gist
15:02 marcus hide: the route definition?
15:02 sri i have a hunch hide just forgot to name his route
15:02 marcus Hide: probably you borked the route name in url_for
15:02 marcus Me too.
15:03 marcus So its probably got a default name like formtest
15:03 * sri nods
15:03 hide https://gist.github.com/2337755
15:04 sri bingo
15:04 sri that route is wrong
15:04 sri very very wrong
15:04 hide ok, that's fine, that's what I'm after, what's wrong with it? :)
15:05 hide ultimately I'm trying to figure out why my checkbox isn't being checked and this is just supposed to be a stepping stone to that point.
15:05 sri first of all, you need two routes
15:05 sri /links and /form/:test
15:07 sri when you're translating lite routes and don't yet fully understand what's going on it helps to use the lite-ish methods
15:08 sri get 'form/:test' => 'form'; becomes $r->get('form/:test' => 'form');
15:09 sri and later maybe $r->route('form/:test')->via('GET')->name('form');
15:09 hide that was it, the => 'form' made the difference, thank you.
15:09 sri that's the route name
15:09 marcus I actually like the liteish ones better.
15:10 sri http://mojolicio.us/perldoc/Mojoli​cious/Guides/Routing#Named_routes
15:10 marcus I tend to use get() rather than route() in non-lite apps now.
15:10 sri here are the rules for naming
15:10 sri marcus: me too, ->route is just the primitive
15:11 hide I'm using get() and post() in my app too, I was just trying to change as little as possible
15:11 sri it could also be $r->get('form/:test')->name('form');
15:11 sri :)
15:11 sri to make it absolutely obvious
15:12 sri btw. here's a recipe you might like too http://mojolicio.us/perldoc/Mojoli​cious/Guides/Routing#Introspection
15:12 hide so once I get these fixed up, is there any advantage to having them, or do I just keep them for myself?
15:13 sri "them"?
15:13 purl "them" are Tony and Marty.
15:13 hide the lite app tag helper tests running as an application
15:13 sri i'm afraid they are not very useful
15:14 hide that's fine
15:15 hide like I said, they're just a step to figure out why check_box with a stash or param value isn't being checked, I have a fix locally that does it, but I'm trying to track it down.
15:15 sri we test many of the more advanced features only with lite apps, since they are internally 100% equal to normal apps
15:16 sri fun fact, Mojolicious::Lite started as a way to make core tests easier :)
15:16 hide sri: that's what I thought, I didn't expect the tests I wrote to fail at all, and was certain it was something I'd done wrong.
15:16 hide I just didn't know what it was that I did wrong :)
15:18 hide thank you both for your help.
15:21 sri you're welcome
15:47 black joined #mojo
15:47 Psyche^ joined #mojo
15:48 batman joined #mojo
16:12 avkhozov joined #mojo
16:25 hide using the previous test, except this time trying to set the check boxes to checked, what have I done wrong? https://gist.github.com/2338286
16:28 hide do I have to code the checked logic myself?
16:30 sh4 joined #mojo
16:35 sri hide: i think you're misunderstanding something
16:35 hide that would not surprise me :)
16:36 sri test case makes no sense, why would the checkboxes be checked?
16:36 hide if I've set the stash or param before rendering, shouldn't they be checked?
16:36 hide that's what I'm trying to do, set a checkbox from my controller
16:37 sri you set param to "a"
16:37 sri that's not the value of the checkbox
16:38 sri and no, stash should not have any effect
16:38 sri as documented
16:38 sri http://mojolicio.us/perldoc/Mojolic​ious/Plugin/TagHelpers#DESCRIPTION
16:53 hide so, what do I set in my controller so that the checkbox ends up checked?
16:56 hide nm, got it.
16:58 hide thanks again.
17:00 hide spent entirely too much time on that.
17:06 mattp_ joined #mojo
17:33 asarch joined #mojo
18:41 inokenty sri: I think we should add something like this http://pastebin.com/Jwbq1zfg to "Apache deployment" wiki page
18:42 inokenty For serve static files via Apache
18:42 sri inokenty: it's a wiki, do whatever you like
18:47 black joined #mojo
18:51 buu sri: Speaking of adding things, am I completely dumb or does mojowhatever generate app; not take a name for the app as an argument?
18:54 inokenty buu: mojo generate app Buu
18:55 buu Well that makes sense.
18:55 buu inokenty: Now if only mojo help generate; told me that =]
18:56 sri mojo generate help app
18:57 sri mojo generate points at that
19:00 sri hmm
19:00 sri mojo generate app -h should work too but doesn't
19:00 buu OH
19:00 buu But ..
19:00 buu $ mojo help generate
19:00 buu usage: /usr/local/bin/mojo generate GENERATOR [OPTIONS]
19:01 buu $ mojo generate help app
19:01 buu usage: /usr/local/bin/mojo generate app [CLASS]
19:02 sri maybe --help and -h should be removed
19:02 sri not sure they could ever work correctly
19:03 buu sri: Should I ask why it doesn't actually list the options? Or at least tell you that 'help generator' will be useful?
19:03 sri there are no options
19:04 sri and why do you ask if you should ask?
19:04 * sri is confused
19:09 xaka joined #mojo
19:09 buu sri: It's a rhetorical device used to place extra emphasis on parts of the sentence
19:10 sri i see
19:10 buu It might be a construction only familiar to native speakers
19:11 buu Although I suppose it's not literally emphasis. I'm not sure exactly how to describe that, but it's a device to change how you perceive the sentence.
19:12 buu I suppose it's a way of being more deferential or polite now that I think about it.
19:13 xaka1 joined #mojo
19:14 athenot joined #mojo
19:21 GitHub9 joined #mojo
19:21 GitHub9 [mojo] kraih pushed 1 new commit to master: http://git.io/lowNOw
19:21 GitHub9 [mojo/master] fixed bug that prevented --help and -h flags from working for generator commands - Sebastian Riedel
19:21 GitHub9 left #mojo
19:31 Psyche^ joined #mojo
19:32 xaka joined #mojo
19:38 tempire has anyone gotten perlito to compile perl5 to js?
19:38 tempire marcus? ^
19:50 GitHub19 joined #mojo
19:50 GitHub19 [mojo] kraih pushed 1 new commit to master: http://git.io/JaMVPg
19:50 GitHub19 [mojo/master] improved help command to be less strict - Sebastian Riedel
19:50 GitHub19 left #mojo
19:50 sri that makes "mojo help generate app" work
19:56 buu Yay
20:01 sri i kinda hate showing the full path of the script
20:07 buu sri: Hey, uh, this is offtopic but I can't figure it out at all.. do you happen to know how I can add multiple users to a github repo?
20:07 sri somewhere in the repo settings
20:08 sri admin > collaborators
20:09 buu sri: I'm on the repo page, I go to admin > collaborators, but it just says "you have 0/0 private collaborators left" or so
20:09 buu But it's a public repo =[
20:09 sri i get a list of people and an add collaborators form
20:10 buu Oh uh, perhaps they need to be watching me or something?
20:53 tempire HAPPY EASTER EVERYONE
20:54 tempire 🐰
21:03 hipyhop joined #mojo
21:05 mercutioviz joined #mojo
21:07 sri http://static.fjcdn.com/pictu​res/Zombie_5614a0_397837.png
21:36 mattp_ joined #mojo
21:36 avkhozov joined #mojo
21:36 dwierenga joined #mojo
21:36 BlueT_ joined #mojo
21:36 d4rkie joined #mojo
21:36 perlite joined #mojo
21:36 jamesw joined #mojo
21:36 rafl joined #mojo
22:18 mire_ joined #mojo
23:16 xaka joined #mojo
23:25 xaka1 joined #mojo
23:31 xaka joined #mojo
23:54 runester joined #mojo
23:57 runester joined #mojo
23:58 runester I have a question about installing and using mojolicious lite on a hosted web server.
23:58 runester if it's like Plack and is it's own http server, then how does this integrate with providers like goDaddy.com?

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