Camelia, the Perl 6 bug

IRC log for #mojo, 2011-09-09

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

All times shown according to UTC.

Time Nick Message
00:42 j3nnn1 joined #mojo
01:01 newbie1 joined #mojo
01:08 xaka joined #mojo
01:39 xaka joined #mojo
01:41 SmokeMachine joined #mojo
01:57 j3nnn1 joined #mojo
03:44 Skylos_ joined #mojo
03:51 SmokeMachine joined #mojo
04:46 AmeliePoulain joined #mojo
05:10 lammel2 joined #mojo
05:17 tempire http://yapc-surveys.org/html/yn2011-survey.html
05:17 tempire two people want to hear sri speak
05:17 tempire let's go for 3 next year!!!1!
05:18 Alias joined #mojo
05:30 perlrocks Twitter: "Using JQuery and AJAX in Mojolicious / No time to wait: http://t.co/uawK5Gr" (ja) --javascriptalert http://twitter.com/javascripta​lert/status/112035133174980608
05:31 yko lol. that article is like 1 year old ^^^
06:01 Firkin joined #mojo
06:22 arthas joined #mojo
06:26 sromanov joined #mojo
06:31 koban joined #mojo
06:45 Eugene joined #mojo
07:24 cosmincx joined #mojo
07:34 eugen joined #mojo
08:25 arthas joined #mojo
08:28 tholen joined #mojo
08:45 judofyr joined #mojo
08:45 judofyr sri: I get 'Malformed JSON: Expected array or object at line 0, offset 0.', even though the first character is "{"
08:45 judofyr and it's valid JSON
08:47 judofyr could it be encoding related?
08:51 judofyr Use of uninitialized value $_ in pattern match (m//) at /Users/magnus/perl5/perlbrew/perls/perl-​5.14.1/lib/site_perl/5.14.1/Mojo/JSON.pm line 86.
08:52 judofyr seems like an encoding error here
08:53 judofyr it includes characters like \x{e6}
08:53 judofyr not sure if that's valid JSON or not
09:02 judofyr sri: an Encode::from_to $str, "iso-8859-1", "utf8" fixed it!
09:02 judofyr thanks for the help :)
09:09 crab hi
09:09 Properler joined #mojo
09:10 spleenjack joined #mojo
09:29 sugar joined #mojo
09:32 esskar joined #mojo
09:34 metaperl any references / success stories of packing a mojolicous(::lite)? app and all dependencies into a single executable/.pl and deploying to a webhost with only cgi capabilities?
09:36 njlg joined #mojo
09:56 ispeak joined #mojo
10:08 Eugene joined #mojo
10:11 robinsmidsrod joined #mojo
10:15 sri judofyr: you should know only encoded json is real json ;p
10:15 judofyr sri: the error message surprised me though
10:16 sri the second error points at your mojolicious being outdated :o
10:18 judofyr sri: how do I check my mojo-version again?
10:18 sri mojo version
10:18 judofyr feature request: support mojo --version too
10:18 judofyr Mojolicious (1.94, Smiling Face With Sunglasses)
10:19 * judofyr upgrades
10:19 purl upgrades are good!
10:19 sri denied
10:20 judofyr why? most other executables support it…
10:33 preflex_ joined #mojo
10:40 sri too much trouble for too little gain
10:54 marcus Judofyr: if we are getting json as latin1, we should complain.
10:55 judofyr marcus: it's JSON-in-JSON actually
10:55 judofyr so the main JSON is correct, but (somehow) the string inside the JSON is encoded in iso-8859-1 :S
10:56 marcus Oooh
10:56 marcus Yes, that sucks in so many ways
10:58 GitHub66 joined #mojo
10:58 GitHub66 [mojo] kraih pushed 1 new commit to master: http://git.io/WwDvRA
10:58 GitHub66 [mojo/master] better example - Sebastian Riedel
10:58 GitHub66 left #mojo
10:58 judofyr but… how come the main JSON is valid then?
11:00 judofyr fuck encodings
11:38 noganex_ joined #mojo
11:47 judofyr PROTIP: [% FOREACH c IN comments %] is *not* a good idea
11:47 judofyr (because it will override the "c" variable (which is the controller))
12:10 arthas joined #mojo
12:42 yko joined #mojo
12:47 ZadYree restrictive placeholders > all
12:53 Properler joined #mojo
13:01 alnewkirk protip:?
13:01 alnewkirk really
13:13 GitHub54 joined #mojo
13:13 GitHub54 [mojo] kraih pushed 1 new commit to master: http://git.io/udKOeA
13:13 GitHub54 [mojo/master] added experimental --mode flag to Morbo - Sebastian Riedel
13:13 GitHub54 left #mojo
13:27 cosmincx joined #mojo
13:28 GitHub142 joined #mojo
13:28 GitHub142 [mojo] kraih pushed 1 new commit to master: http://git.io/8-rzpA
13:28 GitHub142 [mojo/master] removed --mode flag from Morbo again and cleaned up some usage messages - Sebastian Riedel
13:28 GitHub142 left #mojo
13:40 rwstauner joined #mojo
13:44 cosmincx joined #mojo
13:53 alnewkirk left #mojo
13:54 cosmincx joined #mojo
14:06 SmokeMachine joined #mojo
14:11 sri hmm, could be fun to make Mojo::DOM::CSS extendable
14:11 sri like custom pseudo classes
14:22 Cside joined #mojo
14:28 Skylos_ yes
14:30 metaperl joined #mojo
14:31 metaperl any references / success stories of packing a mojolicous(::lite)? app and all dependencies into a single executable/.pl and deploying to a webhost with only cgi capabilities?
14:44 Skylos_ metaperl?
14:44 purl i think metaperl is confused but I never really fully idgested MOP and Moose, so what is Mojo and what is Stevan's voodoo is all greek to me or TBONE
14:44 Skylos_ isn't that terrence?
14:45 metaperl joined #mojo
14:46 metaperl i'm having internet connection problems ... did someone respond to my question about packing a mojo app?
14:46 Skylos_ Hi metaperl.
14:46 metaperl hi Skylos_
14:46 Skylos Aren't you terrence?
14:46 metaperl i am ...
14:46 Skylos oh hai, I'm David Ihnen.
14:46 metaperl :)
14:47 metaperl you ended up at verio? wtf?!
14:47 Skylos I know, right?
14:47 Eugene joined #mojo
14:47 stephan48 metaperl: look at par::packer, maybe that can help
14:48 metaperl yeah I've glanced over PAR::Packer, but before I cut through the jungle, I was seeing if anyone had already forged a path :)
14:48 Skylos I guess youw ant a local::Lib type setup then.
14:49 koban left #mojo
14:49 stephan48 i thought about using it to pack together a mojo app into a win executable for one project, but didnt continue that way :)
14:50 metaperl I shouldve made friends with google before asking that question - http://www.google.com/search?q=perl+par%​3A%3Apacker+web+applicatoin&ie=utf-8​&oe=utf-8&aq=t&rls=org.mozil​la:en-US:official&client=firefox-a
14:52 perlrocks Twitter: "Playing with Perl's Mojo for a project. Very nice! It's been a long time since I wrote a web app in perl." --cokefloats http://twitter.com/cokefloat​s/status/112176676443664385
15:07 njlg joined #mojo
15:08 random grim_fandango: I'm using ::Plugin::Authentication with DBIx::Class
15:10 random staticperl is alos an option to pack an application into a executable
15:10 random never tried it with mojo though
15:14 doubi joined #mojo
15:16 doubi 'afternoon all. Is there a way to get my hands on the 'raw' contents of a $c->param('foo')? It's the contents of a text area, and it looks like newlines, which are encoded as %0D%0A in the URL, are stripped (turned into a space) by default.
15:20 judofyr sri: in what way is my encoding fucked when Mojo::JSON gives me: "Wide character in input."
15:20 doubi Aha... appearances are deceiving. Nevermind.
15:22 sri judofyr: that means you have characters, while real json would be bytes
15:23 judofyr sri: I have no idea how bytes/characters works in Perl… this JSON comes from another JSON-string
15:23 judofyr as in, it's JSON stored in JSON
15:23 Skylos its like, UTF8
15:23 sri yes, the parser should give you a structure with lots of character data
15:23 Skylos or UTF16 I should say
15:23 judofyr so how can I tell it that this is actually bytes?
15:24 sri i don't even know if nested json is valid
15:24 Skylos if its binary, you should encode it.
15:24 sri judofyr: you can't, you have to know
15:24 Skylos I don't think you can put binary directly into json... thats not one of the data types.
15:25 sri true, real json would always be binary data, which can't just be stored in json
15:25 sri you'd have to base64 encode or so
15:26 judofyr I can't change the data format :(
15:27 judofyr it's already stored as JSON in Solr
15:27 Eugene joined #mojo
15:27 judofyr I'll have to work around it :/
15:27 sri if it's all utf-8 you might get away with just encoding the embedded json string again
15:28 sri utf8::encode $nested; my $result = $json->decode($nested);
15:28 judofyr it seems to be ISO-8859-1
15:28 sri i doubt that
15:29 sri you should be getting perl characters
15:29 judofyr ah
15:29 sri which is nothing
15:29 sri (or you're not supposed to know what it is stored as internally)
15:29 judofyr okay, that fixed this error at least
15:30 judofyr let me see if it also fixes my previous problem
15:31 judofyr okay, let's hope this works :D
15:31 judofyr thanks!
15:32 eugen joined #mojo
15:39 njlg joined #mojo
15:43 Eugene joined #mojo
15:48 xaka joined #mojo
15:57 metaperl joined #mojo
16:01 grim_fandango joined #mojo
16:02 GitHub146 joined #mojo
16:02 GitHub146 [mojo] kraih pushed 1 new commit to master: http://git.io/xh3k7g
16:02 GitHub146 [mojo/master] improved host condition to work in more environments - Sebastian Riedel
16:02 GitHub146 left #mojo
16:04 minimalist joined #mojo
16:06 GitHub148 joined #mojo
16:06 GitHub148 [mojo] kraih pushed 1 new commit to master: http://git.io/cjc3Wg
16:06 GitHub148 [mojo/master] Merge pull request #217 from viliampucik/master - Sebastian Riedel
16:06 GitHub148 left #mojo
16:06 judofyr joined #mojo
16:08 GitHub86 joined #mojo
16:08 GitHub86 [mojo] kraih pushed 1 new commit to master: http://git.io/h7EjyQ
16:08 GitHub86 [mojo/master] updated changes - Sebastian Riedel
16:08 GitHub86 left #mojo
16:14 vel joined #mojo
16:14 abra joined #mojo
16:24 * sri wonders when tempire will release the next mojocast
16:34 GabrielVieira joined #mojo
16:48 GitHub165 joined #mojo
16:48 GitHub165 [mojo] kraih pushed 1 new commit to master: http://git.io/bWoVYg
16:48 GitHub165 [mojo/master] small documentation tweak - Sebastian Riedel
16:48 GitHub165 left #mojo
17:13 eugen joined #mojo
17:15 perlrocks Twitter: "mojo - Mojolicious: Perl Duct Tape For The HTML5 Web! http://t.co/sWBdf9V" --github_pl http://twitter.com/github_p​l/status/112212532168626176
17:28 GabrielVieira joined #mojo
17:39 Cside joined #mojo
17:43 gshank joined #mojo
17:59 * yko wonders if Perl needs fresh blood or we are happy without newbies
18:00 Skylos we need fresh blood
18:00 Skylos we need to teach them OO perl and such.
18:00 yko o rly?
18:00 purl NOWAI!
18:00 Skylos how to use OO patterns in perl, they don't HAVE to use Java or C++
18:00 yko newbies are lame, stupid and annoying
18:01 Skylos stfu.  Newbies are the future
18:01 yko ok. than i need your votes on my suggestion here http://bit.ly/q79k4Z hehe
18:08 crab do newbies have fresher blood than other people?
18:08 yko joined #mojo
18:10 noganex joined #mojo
18:12 GitHub132 joined #mojo
18:12 GitHub132 [mojo] kraih pushed 1 new commit to master: http://git.io/hhF22g
18:12 GitHub132 [mojo/master] micro optimizations - Sebastian Riedel
18:12 GitHub132 left #mojo
18:12 SmokeMachine_ joined #mojo
18:13 sri sneaky yko
18:15 * sri puts a six pack true blood into the channel
18:16 preflex_ joined #mojo
18:18 sri btw. there are some apache questions on the list (in case some experts have not yet left for the weekend)
18:29 eugen joined #mojo
18:35 ispeak left #mojo
18:48 yko sri, yeah, I'm "snacky"
18:48 Skylos snarky?
18:48 purl i guess snarky is http://www.snarkyboy.com/hard or a movie about a gay serial killer policeman in training.
18:50 yko but that's actually perfectly shows that nobody gives a cookie about to attract newbies
18:50 Skylos marketing.
18:50 purl marketing is from the pit of hell. or C-R-A-P or (see: advertising) or NBI (no brains involved) or All Style, No Substance (thanks memepool) or product line management. or All Show, No Go or <reads marketing literature> a fucking load of bullshit or "window dressing" or like the retarded trust-fund-sibling of psychology but where psychology has been cut out of the parents will so has all the money
18:51 Skylos gotta make perl sexy.
18:51 yko I don't really mean "nobody". but most people
18:51 yko we damn need designers in Perl
18:51 Skylos yeah, big time.
18:52 yko sometimes I regret that I sold my sense of beautifulness for a little of piece coding skills
18:52 Skylos and it ended up looking like perl.
18:53 Skylos er, line noise
18:53 Skylos er, whats the diff.
18:55 Skylos beautiful, beautiful perl.  I love you so $perl$
18:58 metaperl joined #mojo
18:58 metaperl line 21 of Mojolicious/Controller.pm currently looks like this - my $T = File::Spec->catdir(File::Ba​sename::dirname(__FILE__), 'templates');  # this line causes problems under a mojolicioius::lite app built with PAR::Packer
18:59 metaperl ...because the entire app is using a temp directory where everything is exported, not a relative path to the executable itself
19:00 Skylos do you have a proposed patch
19:00 metaperl for the moment, I just want to discuss this
19:00 Skylos alright.
19:01 sri what has the executable to do with it?
19:01 Skylos __FILE__
19:01 purl it has been said that __FILE__ is current source file or in perldata
19:01 sri that's the curretn file, not the executable
19:02 metaperl it's a relative path
19:02 * sri doesn't get it
19:02 metaperl well
19:03 sri i don't see how any of that matters
19:04 sri not like templates would magically change directories
19:04 metaperl if I chdir to "$dir\mojo\lib" so that the relative path to __FILE__ is satifsfied, that leads to other errors... I think I should put together an entir github repo so you can pull this... it's just a small mojolicious::lite script and small build script, but PAR::Packer does not find the templates that Mojolicious uses automatically because it cant scan for them
19:04 metaperl so the "simple test case" actually includes a clone of the mojo repo as well
19:05 metaperl I dont know if you would git clone such a thing to reproduce this or not ...
19:05 Skylos it can't just say 'use Mojolicious::lite'?
19:05 Skylos you're not actually modifying the mojolicious code, are you?
19:05 metaperl Skylos- it does say that ...
19:05 metaperl Skylos no
19:05 Skylos then you don't need the mojo code in your test case.  Its just a dependency to actually run the test.
19:06 sri well, when you send me a pull request, make sure to explain everything in detail
19:07 metaperl no
19:07 metaperl not a pull request
19:07 Firkin left #mojo
19:07 metaperl a github repo that you can clone to see the problem
19:07 metaperl I dont have a solution yet
19:07 sri sorry, this is too abstract for me to investigate
19:08 metaperl to build the executable with PAR::Packer requires mojo in the path relative to the script to be built so that the paths resolve sensibly in the packed archive
19:08 metaperl so mojo is not just a dependency.
19:08 Skylos like a local::lib install
19:12 sri think the last time i used PAR was when i wrote the catalyst packaging code :)
19:12 sri a very loooong time ago
19:12 tempire never worked for me
19:13 metaperl Well, I create a repo that builds the executable for Windows using PAR::Packer - https://github.com/metaperl/vcpaste/tree/​master/paste/2011-09-09-15-11-01/packapp   ... I will make the code OS-independant now and post to the PAR::Packer mailing list if I dont hear anything here
19:14 sri wait, you're not letting it discover which files are required on its own, right?
19:15 metaperl sri - either way - it will never find the template files ... that's why mojo is in the PAR::Packer build tree and I do a -a mojo as part of the build so that all of mojo is explicitly included
19:15 sri that would never work, we load stuff dynamically, detection will never ever work
19:15 metaperl you can manually include what you want...
19:16 sri well, no point discussing without more specific information
19:16 sri just guessing here, maybe i shouldn't
19:16 metaperl isnt a github repo that exactly produces the problem specific information? (wink)
19:17 * sri heads off to the cinema
19:17 metaperl but there is one weird thing - why is this warn "MOJO_HOME" never rendered to the screen - https://github.com/metaperl/vcpaste/blob/master​/paste/2011-09-09-15-11-01/packapp/simple.pl#L6
19:18 metaperl I think it is better to use straight Mojolicious and explicitly setup all my paths instead of the various conveniences of mojolicious::Lite
19:19 Skylos maybe warning displays is turned off?
19:19 metaperl it warns the other things, so that cant be it
19:19 Skylos or your stderr is redirected somewhere?
19:20 metaperl the other warns work ...
19:20 Skylos curious.
19:20 * purl gives the small curious key to Bilbo. Thorin sits down and starts singing about gold.
19:20 Skylos maybe it dies in the BEGIN blocks
19:21 Skylos and never gets around to licking it.
19:22 metaperl oh yeah
19:22 metaperl there you go
19:22 metaperl that warn is runtime - the others are comile-time
19:22 Skylos aye.
19:27 Eugene joined #mojo
19:31 SmokeMachine joined #mojo
19:50 mspo mojolicious doesn't  seem to work as a CGI script under ModPerl::Registry
19:52 mspo but as a regular cgi it seems to work okay
19:53 mattastrophe joined #mojo
19:53 Skylos hm.  modperl::registry does have its oddities.
19:54 mspo Skylos: I guess mod_perl means a plack install
19:55 * Skylos looks stupid because he doesn't know what plack means in that context.
19:57 Skylos I woudln't be trying to registry script run it.  I'd be running it as a mod_perl application.  Though if that means plack, I guess it means plack.
19:58 mspo http://plackperl.org/
20:01 Skylos interesting.
20:01 Skylos I can see the value.
20:18 mspo so you  can run mojolicious as a PSGI app
20:18 mspo which can be implemented via mod_perl with Plack
20:23 Skylos excellent.
20:23 purl excellent. are there any japan-natives lurking in here?
20:34 mspo actually things work pretty nicely as cgi
20:34 mspo especially a Lite app
20:49 judofyr joined #mojo
20:50 metaperl well now I get to try to get a new line 22 in Mojolicous::Controller by sebastian - my $T = File::Spec->catdir(File::Basename::​dirname($INC{'Mojolicious/Lite.pm'} || __FILE__), 'templates');
20:50 metaperl instead of my $T = File::Spec->catdir(File::Ba​sename::dirname(__FILE__), 'templates');
20:50 judofyr joined #mojo
20:51 metaperl well time to head off to BMORGANICS.com ... i will be on in about 2 hours
21:24 fhelmbe__ joined #mojo
21:25 fhelmbe__ joined #mojo
21:27 perlite joined #mojo
21:38 sri mspo: i would suggest just not using mod_perl at all
21:40 sri so far i've not heard from anyone that was happy with a mod_perl setup
21:41 sri colombiana sucks btw
21:41 Skylos I have developed entire sites to run under mod_perl
21:41 Skylos I had no reason not to be happy with it.
21:41 Skylos But then, my application architecture wasn't typical either.
21:42 sri if you want to hook into apache fine, but why would you ever run a normal perl web app inside an apache process?
21:42 Skylos Yeah, I used the hooks.
21:43 Skylos But you mean an application layer?
21:43 Skylos with a dispatcher and all that?  Simply because its precached that way.
21:43 Skylos its preforked and ready to go.
21:43 Skylos a known quantity for many.
21:43 Skylos apache is well known.
21:44 sri mod_proxy setups are way better at that
21:45 Skylos yup, that steps toward service oriented architecture.
21:46 sri even back in the catalyst days mod_perl was a total nightmare as a deployment target
21:47 Skylos running and monitoring your own application server is an overhead.
21:47 sri web apps are traditionally not very stable and under constant development
21:47 sri mod_perl sucks when stuff goes wrong
21:48 metaperl joined #mojo
21:48 sri then use fastcgi
21:48 sri mod_fastcgi has a built in proc manager
21:52 sri no deployment environment has caused as much trouble as mod_perl in the many years i've been supporting web frameworks
21:52 Skylos all reasons to use something else.
21:52 Skylos but its not as if there aren't reasons for runnign a normal perl web app in an apache process
21:53 sri if you want to build an smtp server on apache, use mod_perl, but i would never recommend it for normal web apps
21:54 Skylos understood.
21:56 cstamas sri: OTOH fastcgi suxx with apache2
21:56 sri just saying it's better than mod_perl :)
21:57 cstamas at least I had some hard time with it and never worked as I wanted
21:57 sri personally i'm a reverse proxy fan
21:57 sri http all the way
21:58 cstamas yeah, but that has (some other) issues
21:58 sri like?
21:58 cstamas like getting the other ends IP address
21:58 sri mojolicious has X-Forwarded-For support built in
21:58 cstamas passing authententication/access control
21:58 sri auth is usually cookie based these days
21:59 cstamas I am developing with shibboleth
21:59 Skylos the app still has to validate the cookie.
22:00 sri i don't see why that makes reverse proxies problematic
22:02 cstamas if someone does not depend/need shibboleth then some alternative webserver like nginx or lighttpd seems to be much easier with fastcgi
22:02 ispy_ joined #mojo
22:03 cstamas apache's fastcgi is a bit arcane (at least for me)
22:04 sri but at least it works, with mod_perl you never know when things will stop working
22:04 cstamas i tried to start the fastcgi process myself as another app specific user and tell apache to use that, but I was unable to
22:04 Skylos hah.  everything stops working sometimes.
22:04 cstamas sri: yup, I do not say that modperl is better
22:06 sri just look at the ModPerl::Registry problem above, nobody will ever be able to fix that
22:08 * cstamas starts to fall asleep (it is midnight here)
22:08 * sri yawns too
22:16 metaperl joined #mojo
22:16 metaperl Ok this ( https://github.com/metaperl/vcpaste/blob/maste​r/paste/2011-09-09-18-14-49/packapp/README.md ) explains the patch I'd like to see in Mojolicious
22:17 sri metaperl: that exmplanation makes no sense
22:18 metaperl sri - is something incorrect about what I said? what dont you understand?
22:18 sri even if it's in a temporary directory why would __FILE__ return the wrong file?
22:19 metaperl well, all I know is it appears to ... because I echo-printed __FILE__ and it was a relative path
22:19 metaperl I do know my patch gets things working
22:19 sri i don't see the problem
22:20 sri i'm going to need a real explanation before i can apply the patch i'm afraid
22:20 sri what exactly do we have to work around? why is a relative path bad?
22:21 metaperl well, I think your first question was a good one that I cant answer: even if it's in a temporary directory why would __FILE__return the wrong file?
22:21 metaperl so I guess I will take that question to the PAR mailing list and see what they have to say
22:22 sri this is so crazy, i doubt i would ever apply a patch without a test case replicating the exact scenario outside PAR
22:22 metaperl oh maybe that's why
22:23 ispy__ joined #mojo
22:25 metaperl I personally dont understand __FILE__ so well and how you could expect a relative path to never fail to find the right place... I will head to #perl for a thorough understanding of __FILE__ and then move on to PAR to discuss the behavior
23:31 tempire AARRRRRRGGGGGHHHHHH
23:31 Skylos m Salut.
23:31 tempire every time I'm about to wrap up a mojocast, I discover something that would have made it so much better, and would already require re-recording everything.
23:32 Skylos poor guy.
23:32 purl poor guy is writing the whole thing in perl with CGI.pm
23:37 sri purl: i don't think so
23:37 purl sri: sorry...
23:52 mattastrophe joined #mojo
23:54 Cside joined #mojo

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