Camelia, the Perl 6 bug

IRC log for #mojo, 2012-04-11

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

All times shown according to UTC.

Time Nick Message
00:01 mmajchrzak joined #mojo
00:26 * tempire prances
00:28 marty Liam: Maybe this is what you are looking for.  http://mojolicio.us/perldoc/Mojolicious/Gu​ides/Routing#More_restrictive_placeholders
00:28 * marty dances
00:29 Liam I don't see how I do a redirect with that
00:29 marty Not a redirect, but an alias type of thing.
00:44 hugh joined #mojo
01:04 scott joined #mojo
01:17 xaka1 joined #mojo
01:21 Leandr joined #mojo
01:27 jnap joined #mojo
01:55 xaka1 joined #mojo
02:20 xaka joined #mojo
02:33 SmokeMachine left #mojo
02:55 dwierenga joined #mojo
02:59 d4rkie joined #mojo
03:09 jsut_ left #mojo
04:45 scott_ joined #mojo
05:38 d4rkie joined #mojo
05:55 Foxcool joined #mojo
06:03 GitHub5 joined #mojo
06:03 GitHub5 [mojo] kraih pushed 1 new commit to master: http://git.io/MCby1Q
06:03 GitHub5 [mojo/master] fixed small keep alive bug - Sebastian Riedel
06:03 GitHub5 left #mojo
06:39 AmeliePoulain joined #mojo
06:40 fhelmber_ joined #mojo
06:58 spleenjack joined #mojo
07:07 omega joined #mojo
07:07 batman joined #mojo
07:10 GitHub78 joined #mojo
07:10 GitHub78 [mojo] kraih pushed 1 new commit to master: http://git.io/4JZw-Q
07:10 GitHub78 [mojo/master] improved debug messages to show more details - Sebastian Riedel
07:10 GitHub78 left #mojo
07:11 taryk joined #mojo
07:11 sri http://hastebin.com/raw/witevapuge
07:12 sri marcus: i think you will like the latest version
07:12 marcus sri: I think you're right
07:12 sri \o/
07:18 marcus http://iome.me/fwp/santorum%20drops%20out
07:28 GitHub41 joined #mojo
07:28 GitHub41 [mojo] kraih pushed 1 new commit to master: http://git.io/YHPtFA
07:28 GitHub41 [mojo/master] better WebSocket debug messages - Sebastian Riedel
07:28 GitHub41 left #mojo
07:44 tempire I like the host:port url
07:45 plu hmm
07:46 plu if Mojo::UserAgent is following redirects and I have http headers set, the follow up requests do not set these headers
07:47 plu e.g. mojo get -r -H 'Accept-Language: en' http://www.xing.com/groups
07:47 fhelmber_ joined #mojo
07:47 sri not all redirects are equal
07:48 sri exact behavior depends on the response code
07:48 plu the response code of the first request is 302
07:49 Vandal joined #mojo
07:50 GitHub136 joined #mojo
07:50 GitHub136 [mojo] kraih pushed 1 new commit to master: http://git.io/JmwMDw
07:50 GitHub136 [mojo/master] show accepted connections - Sebastian Riedel
07:50 GitHub136 left #mojo
07:51 sri should we not handle redirects spec compliant please file a bug report referencing the specific spec section
07:52 tempire learning perl: http://bit.ly/HACTmd
08:06 GitHub49 joined #mojo
08:06 GitHub49 [mojo] kraih pushed 1 new commit to master: http://git.io/PquHcQ
08:06 GitHub49 [mojo/master] tweaked debug messages a little more - Sebastian Riedel
08:06 GitHub49 left #mojo
08:10 ki0 joined #mojo
08:13 batman joined #mojo
08:41 alex joined #mojo
08:45 ver I have backcompat problems. I make update mojolicious from 1.31 to 2.7 and I've got an error "Uncaught SyntaxError: Unexpected token <" after a rendering html page.
08:45 ver What I need to change?
08:47 ver And I've got "Resource interpreted as Script but transferred with MIME type text/html: "http://testnms.unisnet.ru:3000/users/edit/1" on line "</script>". I didn't use javascript helper, just html tag
08:52 buu ver: Is it a template or a 'plain' html page?
08:52 ver template
08:52 purl template is the reason or Template Toolkit (http://search.cpan.org/~ab​w/Template-Toolkit-2.15/) or at http://www.template-toolkit.org/ or right I see the h1
08:52 buu ver: can you paste it to the pastebot?
08:53 ver one moment
08:54 ver 1. Layout: http://hash.su/7372
08:55 ver 2. Template: http://hash.su/7373
08:56 ver 3. Controller: http://hash.su/7374
08:58 ver I tried to fix it about 2 days but nothing found
08:59 buu Sorry, nothing is really jumping out at me. The only advice I can offer is to remove things until it works and use that to see what specifically is causing the error.
09:05 ver oh, thanks, I try it
09:08 random joined #mojo
09:21 mmajchrzak_ joined #mojo
09:21 cosmincx joined #mojo
09:24 Foxcool_ joined #mojo
09:24 diegok morning!, Is there a reason why "relaxed placeholder" isn't present in lite docs? -> http://mojolicio.us/perldoc/Mojolicious/Lite
09:28 arpadszasz joined #mojo
09:29 dbr joined #mojo
09:40 sri diegok: because i don't like relaxed placeholders and would like to remove them
09:41 diegok sri: hm... not fan of it. But I'm doing a service that need to capture dots. What would be the alternative if we remove it?
09:42 sri i want bigger changes
09:42 diegok I mean, something to say on the tutorial about "if you need to capture dots but not slashes..."
09:42 sri normal placeholders would replace them
09:42 sri nono, i want to change all semantics
09:43 random a normal placeholder would nkow what it shoudl capture then?
09:43 sri you can always customize the regex
09:43 diegok sri: oh!, like that. But then, what would happen to auto-extensions?
09:43 random via hooks?
09:43 sri auto extensions would go away
09:44 diegok sri: I was out for some weeks, should I read backlog or is something only in your head?, how would be the deprecation path for this "big" changes?
09:44 sri i'm not saying the plan is perfect, but that's the direction i would like to go
09:45 sri diegok: no deprecation, breaking changes in a major release
09:45 diegok sri: I'm fine with that. There are no perfect plans :p
09:45 diegok oh!, so, 3.0! :)
09:45 sri more like 4.0
09:46 diegok ah!, ok, then I can rest for a while on this :p
09:46 sri sure, if i make breaking routes changes i want to be absolutely sure, so it will take a lot of time
09:47 geira joined #mojo
09:47 sri and more user feedback, maybe auto extensions work out fine for our users and need to stay
09:48 zivester joined #mojo
09:48 sri i've also considered changing the relaxed placeholder syntax in that case
09:49 sri like /+foo instead of /(.foo)
09:49 sri which would allow deprecation
09:55 diegok I like that change!
09:56 diegok I don't like parenthesis there :)
09:56 diegok and, I as a user, I'm not using auto-extensions.
10:11 diegok + looks like a smaller * for me. So +++ ;-)
10:13 daxim joined #mojo
10:15 sri :)
10:17 sri diegok: there's a problem though
10:17 migo joined #mojo
10:17 sri perl -Mojo -E'a("/foo+bar" => {text => "works!"})->start' get /foo+bar
10:18 sri + is an allowed character :(
10:18 diegok oh!, and it should be :(
10:19 diegok hm... so we can only use something urls don't allow or solve this issue with creativity...
10:19 daxim joined #mojo
10:19 sri ye
10:20 diegok I was thinking on allowed relaxed placeholder only after /, but + is also allowed there, so no gain.
10:20 diegok (only loss)
10:22 sri like /#foo
10:24 sri the list of available chars is actually very very small, since we hande escaping transparently :(
10:24 sri *handle
10:25 sri even unicode characters are not available
10:26 sri /?foo works too
10:27 vervain joined #mojo
10:28 sri that might be it... ? and #
10:31 sri everything else seems to be breaking
10:33 sri diegok: http://hastebin.com/raw/nocatagefi
10:38 diegok sri: not sure. I'm asking my coworker and not getting anything clear right now...
10:38 diegok both seems to be a bit confusing :(
10:39 diegok ? mean optional for me. # is available but still a url component.
10:53 binaryking joined #mojo
10:53 binaryking hey
10:53 binaryking i need help
10:54 binaryking how do i get a text input from a user and store it into a file
10:54 binaryking ??
10:54 binaryking plz. help
11:20 batman joined #mojo
11:22 ver binaryking, did you mean from request?
11:53 stuart joined #mojo
12:00 stuart hi, is there a way better  way to include static elements into a template than using something like 'Mojo::Template->new()->rend​er_file('public/text.txt')'
12:04 MichaelRpdx joined #mojo
12:12 Foxcool__ joined #mojo
12:21 migo joined #mojo
12:27 Akron joined #mojo
12:32 Akron stuart: It depends on your "static" content. In most cases you can use the include-helper: http://search.cpan.org/~sri/Mojolicious-2.80/li​b/Mojolicious/Plugin/DefaultHelpers.pm#include , then your static file is treated like a template. If you just want to embed a static file you can also use something like File::Slurp.
12:34 GitHub84 joined #mojo
12:34 GitHub84 [mojo] kraih pushed 1 new commit to master: http://git.io/JYKX1w
12:34 GitHub84 [mojo/master] more Test::Mojo examples - Sebastian Riedel
12:34 GitHub84 left #mojo
12:35 Foxcool__ joined #mojo
12:39 azawawi joined #mojo
12:39 azawawi hi
12:39 purl hello, azawawi.
12:40 sri Akron: there's also http://mojolicio.us/perldo​c/Mojo/Home#slurp_rel_file
12:41 Akron sri: Oh - of course.
12:41 azawawi im nearly done with 0.01 Pedro... a Mojo plugin to edit Perl using ACE editor + PPI :)
12:41 * sri waves
12:41 * azawawi waves back
12:42 * sri has not looked at the ACE editor in a few months
12:42 azawawi how can a plugin access it parent application path?
12:43 sri be more specific
12:43 azawawi plugin 'M:P:Pedro';
12:43 sri $app->home?
12:43 azawawi # Pedro will attach itself to /pedro
12:43 azawawi # and edit the current mojo application via the web and morbo
12:44 sri $app->routes->route()?
12:44 * azawawi checks
12:45 sri you can do whatever you like with $app, exactly the same you could in a startup sub
12:45 azawawi http://code.google.com/p/p​erl-swt/source/detail?r=38   # forget the perl-swt... it is dead... im just prototyping it :)
12:46 azawawi and it is not currently a plugin, ... it is a mojo app
12:46 azawawi say $self->home;  # works perfectly
12:47 azawawi i've been thinking about web browsers and editing within it for a while
12:47 azawawi even though im a padre fan
12:48 sri azawawi: i think you will like this recipe, since you bundle static files and templates http://mojolicio.us/perldoc/Mojolicious/Gui​des/Rendering#Bundling_assets_with_plugins
12:48 azawawi i thought it is worth a try to do it within mojo
12:48 daxim http://stackoverflow.com/questions/10094​986/what-is-the-equivalent-of-tts-return​-directive-in-the-mojolicious-renderer
12:49 azawawi sri: btw...
12:49 azawawi sri: $self->render(json => \@array); # works perfectly
12:49 azawawi sri: $self->render(json => @array); # unendless looping...
12:50 stuart Thanks for the advice Akron and sri,
12:50 sri i bet that's no endless loop
12:50 azawawi sri: in general $self->render(...) is not throwing exception on invalid keys
12:50 spleenjack http://c.yandex-team.ru/tickets/151151
12:50 sri just nothing being rendered at all
12:50 azawawi sri: it is endless for a while in the browser... :)
12:51 sri yea, but nothing is looping and eating cpu
12:51 azawawi correct
12:51 azawawi sorry for the bad terminology
12:51 sri it's just how the renderer works, individual handlers have a lot of power
12:51 azawawi im learning mojo as i go :)
12:52 sri we can't know which arguments are good and which are bad
12:52 azawawi cool
12:53 sri $self->render(json => @array); is actually a funny case because there's like a dozen things that can go wrong depedning on what @array contains
12:54 sri if the number of elements is even, the "json" will be interpreted as the name of a template for example :)
12:55 azawawi maybe it is safer to add $self->render_json... etc?
12:55 sri already exists
12:55 azawawi im talking from a mojo noob :)
12:55 azawawi point of view
12:55 purl i guess point of view is key
12:55 azawawi key? :)
12:55 sri but shares the same semantics
12:55 azawawi cool
12:56 stuart byee alll
12:59 azawawi basically ACE editor (Cloud9 IDE) is cool but the Perl regex-based javascript code is bad
12:59 GitHub26 joined #mojo
12:59 GitHub26 [mojo] kraih pushed 2 new commits to master: http://git.io/Ce7HVA
12:59 GitHub26 [mojo/master] Update lib/Mojolicious/Guides/Rendering.pod - Nils Diewald
12:59 GitHub26 [mojo/master] Merge pull request #315 from Akron/patch-1 - Sebastian Riedel
12:59 GitHub26 left #mojo
12:59 azawawi so i was working on how to route all syntax highlighting to the backend
12:59 azawawi and use PPI
13:00 sri Akron: not sure about fork-to-edit and typo fixes yet
13:00 Akron It's kind of verbose - especially regarding GitHub's news stream.
13:00 sri yea
13:00 azawawi my final goal is to have a PPI document cache for the current document at all times so we can move fun stuff like refactoring... i.e. padre in mojo :)
13:01 azawawi s/move/move to/
13:01 sri sounds fun
13:02 Akron sri: Do you know how I can get line numbers in POD rendered files in the Github Interface?
13:02 sri i'm not convinced yet that i'll ever use a browser based editor for something serious though :)
13:02 sri Akron: not a clue
13:03 azawawi think of it ... morbo + pedro can be a killer app... an error occurs and pedro kicks in to edit the line in question :)
13:03 azawawi i have a dream and it is called Pedro :)
13:06 GitHub27 joined #mojo
13:06 GitHub27 [mojo] kraih pushed 1 new commit to master: http://git.io/WwFoIg
13:06 GitHub27 [mojo/master] more render examples - Sebastian Riedel
13:06 GitHub27 left #mojo
13:08 jnap joined #mojo
13:33 Foxcool joined #mojo
13:57 Foxcool joined #mojo
14:08 mire joined #mojo
14:09 plu sri++
14:09 plu thanks for supporting Uwe :)
14:13 azawawi joined #mojo
14:13 azawawi hi
14:13 azawawi how can i test a mojo plugin using morbo?
14:14 azawawi i.e. without installing it ...
14:19 sri azawawi: "mojo generate plugin MyPlugin" contains everything you need
14:19 azawawi lib/ and Makefile.PL
14:23 inokenty joined #mojo
14:25 zivester joined #mojo
14:26 dbr joined #mojo
14:30 d4rkie joined #mojo
15:01 sri interesting, according to cloc we are already below 10k lines of code :o
15:02 sri with 9953 lines
15:03 inokenty Perlgolf
15:03 purl hmmm... Perlgolf is like sniping!!11 :>
15:03 mercutioviz joined #mojo
15:03 sri without golfing
15:20 Foxcool joined #mojo
15:44 xaka joined #mojo
15:47 Psyche^ joined #mojo
16:05 mire joined #mojo
16:10 baton8 joined #mojo
16:24 xaka joined #mojo
16:34 jnap joined #mojo
16:46 mire joined #mojo
17:10 batman joined #mojo
17:58 azawawi joined #mojo
17:59 fibo joined #mojo
18:09 jnap joined #mojo
18:16 sshaw joined #mojo
18:19 mattastrophe joined #mojo
18:21 arpadszasz joined #mojo
18:22 mattastrophe joined #mojo
18:26 * azawawi puts the final touches into Mojolicious::Plugin::Pedro :)
18:29 azawawi http://code.google.com/p/mojolicious-plugin-pedro/
18:31 jnap joined #mojo
18:39 jnap joined #mojo
18:39 kanishka joined #mojo
18:52 azawawi cpanm -v http://cpan.metacpan.org/authors/id/A/AZ/AZ​AWAWI/Mojolicious-Plugin-Pedro-0.01.tar.gz  # PPI-based Perl editor in your web browser :)
18:52 azawawi and then:
18:52 azawawi pedro daemon
18:52 azawawi http://127.0.0.1:3000/pedro  # in your browser
19:06 sshaw azawawi: grep PPI Makefile.PL || echo 'PREREQ_PM => { PPI => 0 }'
19:06 sshaw PREREQ_PM => { PPI => 0 }
19:18 kanishka is it safe to run starman server as standalone , rather than a reverse proxy behind nginx ?
19:18 buu sshaw: He's gone =[
19:22 SmokeMachine_ joined #mojo
19:23 Leandr joined #mojo
19:26 MisterHatt joined #mojo
19:44 tabbi joined #mojo
19:44 tabbi left #mojo
19:47 mattastrophe_ joined #mojo
19:57 jnap_ joined #mojo
20:01 mattastrophe_ joined #mojo
20:18 jnap joined #mojo
20:34 mee joined #mojo
20:51 stephan48 joined #mojo
21:17 mmajchrzak joined #mojo
21:18 mmajchrzak Is there any mojo support for example emacs ? After update my padre with a mojo syntax I anc use padre any more...
21:40 sshaw mmajchrzak: no :^(
21:44 mmajchrzak Hmm strange. I gave <script type="text/javascript" src="/jquery-1.7.2.js"/> to my layout in head and now mojo dont see this layout ... why ?
21:49 lukep joined #mojo
23:13 John joined #mojo
23:15 John hi. need help. how get values from request header from hook/helper/plugi? iam using latest mojolicious version from cpan. tnx.
23:32 mercutioviz_ joined #mojo
23:56 zivester joined #mojo
23:57 tempire John: the first argument to a helper callback is the controller object
23:57 tempire http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Helper_plugins

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