Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-07

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

All times shown according to UTC.

Time Nick Message
00:24 jpn joined #mojo
00:38 jpn left #mojo
00:59 laouji joined #mojo
01:09 crab joined #mojo
01:14 Mike-PerlRecruiter_ joined #mojo
01:28 phips joined #mojo
02:00 d4rkie joined #mojo
02:00 d4rkie joined #mojo
02:20 Nom- joined #mojo
02:21 Nom- Hey Guys... I'm trying to do some slightly nasty hackery to invoke a CGI script from Mojolicious... I'm using CGI::Emulate::PSGI and trying to work out how to render the response back from a Mojolicious::Controller.  Can anyone steer me in the right direction?
02:22 bpmedley Nom-: http://mojolicio.us/perldoc/​Mojolicious/Lite#User_agent ?
02:23 Nom- Sorry, I should clarify... the existing .cgi is being loaded in using CGI::Compile, so i'm invoking the code directly
02:25 Nom- Looks like I'm getting back an array with status code, headers & content... i can probably work with that *dives into doco*
02:28 egopro joined #mojo
02:45 xaka joined #mojo
02:55 xaka joined #mojo
03:49 jnbek joined #mojo
03:58 noganex_ joined #mojo
04:14 Foxcool joined #mojo
05:15 Vandal joined #mojo
05:17 laouji joined #mojo
05:31 zivester joined #mojo
05:59 LordV joined #mojo
06:00 LordV It's so very obvious that the Mojolicious project centers around the webserver side.  But I hafta say, Mojo::DOM for parsing/spidering web pages is absolutely awesome.
06:15 DesertFox joined #mojo
06:15 rem_lex joined #mojo
06:29 spleenjack joined #mojo
06:36 dpetrov_ joined #mojo
06:45 Averna joined #mojo
06:53 yakudza joined #mojo
07:13 Molaf joined #mojo
07:15 Nom- Only thing missing from Mojo is the Rails Assett pipeline :)
07:15 Nom- There's some half-baked Plack middlewares that do part of the functionality though
07:46 dod joined #mojo
07:54 yakudza joined #mojo
08:05 spleenjack1 joined #mojo
08:17 dod joined #mojo
08:19 suy joined #mojo
08:36 mire_ joined #mojo
08:48 memowe \o
08:48 memowe hellomojo
08:49 cosmincx joined #mojo
08:54 judofyr joined #mojo
08:54 sinkovsky joined #mojo
09:00 D4RK-PH0ENiX joined #mojo
09:33 d4rkie joined #mojo
09:36 batman joined #mojo
09:43 judofyr sri: is there a way to set watch files for morbo in an env-variable?
09:43 judofyr sri: or in the config and/or app?
09:47 spleenjack joined #mojo
09:53 fhelmber_ joined #mojo
10:05 alexeiras joined #mojo
10:12 nic judofyr: yes, it's built-in to the OS :)
10:12 nic what shell do you use?
10:12 judofyr nic: hm?
10:12 nic bash?
10:12 judofyr nic: bash
10:12 nic yay
10:13 judofyr nic: function + exec?
10:13 nic WATCH="-w file1 -w file2 -w dir1"; morbo $WATCH myapp
10:13 nic :)
10:14 judofyr marcus: hm. maybe we should just do what nic said ^
10:14 judofyr better than nothing :)
10:14 marcus judofyr: suppose so
10:16 dabudabu joined #mojo
10:36 jnbek^dt joined #mojo
10:45 spleenjack1 joined #mojo
10:51 spleenjack joined #mojo
10:54 ver joined #mojo
11:00 ver joined #mojo
11:09 judofyr sri: woah. Ruby 2.0 supports IFs in regexes: http://hastebin.com/gititivage.rb
11:11 marcus conditions
11:11 batman joined #mojo
11:24 sri you won't impress perl programmers with that :)
11:30 judofyr sri: :)
11:32 judofyr sri: Ruby forked Oniguruma to implement it: https://github.com/k-takata/Onigmo
11:32 sri i tweeted that ;p
11:34 judofyr sri: the Onigmo link is better. \K, \R and \X is also supported now
11:34 judofyr sri: what does (?adlu) refer to?
11:39 sunson joined #mojo
11:56 sri judofyr: i think you will like http://perldoc.perl.org/perlre.html
11:57 sri it's modifiers btw
11:57 judofyr aha
12:02 * sri wonders how many of those regex features are official ruby features and might not just break if they decide to switch engines again
12:07 espent joined #mojo
12:07 sri http://perldoc.perl.org/perlretut.html # also good
12:08 b2b joined #mojo
12:12 espent joined #mojo
12:50 espent joined #mojo
12:52 ObseLeTe joined #mojo
12:52 ObseLeTe joined #mojo
12:56 mire_ joined #mojo
13:04 sunson can there be parallel requests in flight with morbo development server?
13:04 spleenjack left #mojo
13:14 Mike-PerlRecruiter_ joined #mojo
13:19 sunson In my app, '/foo' ends up executing IPC::Cmd::run_forked('wget http://localhost:3000/bar') and this hangs. Why? I'm running morbo development server.
13:20 sunson and it eventually times out.
13:23 sunson when I run the same with hypnotoad this works fine. whereas with morbo and the inbuilt 'daemon' it locks up.
13:25 sunson (actually: the 'wget' example is a distorted example. what I actually do is run a script which ends up downloading a 'file' from the server in order to complete the activity.)
13:54 CountryGeek left #mojo
13:57 nic I'm thinking it could be useful to have a 'library' of templated apps (::generate::app)
13:57 nic eg people put their own on github and link it on a dedicated wiki page
13:58 dod joined #mojo
13:58 nic eg ::generate::app00 -- installs a full app that uses Google single sign-on
13:58 nic eg ::generate::app01 -- installs a full app that uses a db-backed session
13:58 nic etc
13:58 nic sri: for, against, neutral?
13:59 sri like https://metacpan.org/search?q​=mojolicious+command+generate ?
13:59 nic I was thinking specifically about ::command::generate::app
13:59 sri if it doesn't touch core i'm ok with pretty much everything :)
13:59 nic but it could be useful to have ::lite-app too I suppose
14:00 nic sri: Do you want them in MojoX::Command::... namespace?
14:00 sri look at my link
14:01 sri there already are generators on cpan
14:01 nic :D
14:06 sri even the descriptions say that you're welcome to fork the existing commands ;) https://metacpan.org/module/Mojoliciou​s::Command::generate::app#DESCRIPTION
14:08 nic yeah I know, it was really the use of wiki & namespace I wanted to check
14:08 nic I'm not going to do any of that till I've got a bit more experience with it though
14:08 sri http://mojolicio.us/perldoc/Mojolicious/Gui​des/Cookbook#Adding_commands_to_Mojolicious
14:09 sri i thought that makes the namespace thing pretty clear
14:09 nic indeed
14:10 nic using the Mojolicious:: namespace makes things a bit easier
14:11 * sri is glad we switched from Mojo::Command to Mojolicious::Command
14:11 sri Mojo::Command:: and Mojolicious::Plugin:: was really confusing
14:12 nic I find Mojo:: nice and clear when it indicates something you could validly use without Mojolicious.pm
14:13 sri you couldn't
14:13 nic ?
14:13 sri it was not possible
14:13 nic I'm using Mojo::Base in lots of scripts that don't care about Mojolicious.pm
14:14 nic I'm finding Mojo is freeing me from the tyranny of complication
14:15 nic Instead of using my own collection of classes that tried to do absolutely everything I could possibly want,
14:15 nic I now use Mojo:: and just stick to what's provided
14:15 nic If Mojo doesn't provide it then it was probably a bad idea me implementing it in the first place and I'm better off without it :)
14:18 nic eg some of my setters used to return the old value, some returned the new value
14:18 nic Now I try to just do attributes the Mojo way and boy does the code get simpler :)
14:33 good_news_everyone joined #mojo
14:33 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/wWSF6w
14:33 good_news_everyone mojo/master d058f31 Sebastian Riedel: small optimizations
14:33 good_news_everyone left #mojo
14:56 mire_ joined #mojo
14:58 bluescreen joined #mojo
15:15 Britzel_ joined #mojo
15:20 nakamura joined #mojo
15:20 nakamura hi, anyone alive ?
15:21 judofyr nakamura: yup
15:21 nakamura i got a simple question, how do we manual install mojo if we don't have the permission on server ?
15:23 nakamura i downloaded the tarball, extracted it.
15:24 b2b nakamura: still there?
15:24 nakamura yup
15:24 b2b have you tried out the perlbrew environment
15:25 judofyr nakamura: you can use cpanminus for this: curl -L http://cpanmin.us | perl - -L vendor Mojolicious
15:25 judofyr nakamura: that will install Mojolicious in the vendor directory
15:26 judofyr nakamura: then run: eval `perl -Mlocal::lib=vendor` in your shell, and everything should just work
15:27 b2b judofyr: but if nakamura has perlbrew, is it not better to install from within? (honest curiousity, i assumed but i dont know for sure if its better)
15:30 judofyr b2b: that is true
15:30 judofyr b2b: but he might not want to install a custom Perl. I dunno :)
15:30 judofyr nakamura: but yeah: you probably want to install an updated Perl too.
15:30 judofyr nakamura: so try perlbrew first, but local::lib is probably simpler
15:32 nic nakamura: first check what perl you have available (perl -V)
15:32 nic if it's 5.10.1 or better (5.010001 or greater) then quickest just to use what you have, at least to start with
15:34 b2b judofyr: thanks
15:34 nic since mojolicious is pure perl (ignoring extras like https) you can just put the stuff in the right places yourself
15:36 nic the usual practice is to mkdir ~/perl5 and put {bin,lib} under that, then use local::lib, or just PERL5LIB=$HOME/myproj/lib:$HOME/perl5/lib
15:37 judofyr cpanm is simpler ;)
15:37 judofyr it also tests it for you
15:37 judofyr actually, installing cpanm in a local::lib is probably a good idea
15:37 judofyr curl -L http://cpanmin.us | perl - -L vendor --self-upgrade
15:37 nic other than tests, cpanm is just doing the ~/perl5 bit, you still have to have that in your @INC
15:38 nic isn't "vendor" just a complication?
15:38 nic and a risky assumption on what value it had in the built perl?
15:38 nic (scrap that, no assumption)
15:40 nic If you s|vendor|$HOME/perl5| then you're on more familiar ground
15:40 nic (Personally I detest the perl5 convention, but it's best for people to start with the conventions)
15:42 bluescreen joined #mojo
15:44 suy I like to have locally installed stuff in $HOME/local, so I don't need to install anything as root, and I don't have many directories directly under $HOME. I guess that's acceptable too, provided that you change the path, and other env variables, right? (perl noob here)
15:47 knshaum joined #mojo
15:48 nakamura guess i will need to do as nic suggested 'put the stuff in the right places yourself'
15:48 nakamura getting curl: (7) couldn't connect to host
15:49 nakamura and wget hang there 'Connecting to raw.github.com|207.97.227.243|:443...'
15:50 judofyr nakamura: og. crappy proxy? :/
15:51 nakamura nic: so where is the right places ?
15:51 nakamura judofyr: yea
15:52 nic nakamura: The convention people follow is to create ~/perl5
15:53 nic (so if your $HOME dir is /home/nakamura that ends up as /home/nakamura/perl5)
15:53 nakamura okay...
15:53 nic is your version of perl good enough?
15:53 nakamura however, the mojo modules somehow required to be `readable` by the web server daemon?
15:54 nakamura if i put the stuff at my home, would it work ?
15:54 nic to start with, I'd recommend just running everything as yourself, so everything will work out correct cos you copied the dirs as you
15:54 judofyr nakamura: you can start a server on your own user and proxy requests from Apache/Nginx to that port
15:57 nakamura so, it doesn't work right away with Apache ?
15:57 nic If you're just getting started, I'd recommend ignoring apache and just get things working via morbo
15:57 nic reverse proxies etc would come later
15:58 nic with morbo you can be trying out stuff in less than 2 mins
15:58 nakamura nic:  btw my perl version v5.10.0
15:58 nic ah, not good enough I'm afraid
15:59 nic you can either download the mojolicious backport which works with 5.8.something and above
15:59 nic or fix your network issues and install perlbrew
16:01 nakamura nic: what if this, (v5.12.2) ?
16:02 nakamura and all i got for the web server is apache httpd.
16:03 nakamura not sure if i have the permission to open a port
16:03 nic nakamura: you get three web servers for free when you install mojolicious!
16:03 nic v5.12.2 is plenty good enough \o/
16:03 nic nakamura: when you set your environment to use 5.12, do you then have cpanm available?
16:04 nakamura nic: nope
16:04 nic never mind, you can fix that later
16:04 nic so once you've put bin and lib under perl5, you can "~/perl5/bin/morbo"
16:05 nic it should say that it's listening on port 3000
16:05 nic then you point a web browser at that ip:3000 (or localhost:3000 if on the same box)
16:05 nic and you should see the sample app
16:10 nic then start reading the Mojolicious::Lite tutorial and as you try out examples, point morbo at those instead
16:11 nic (~/perl5/bin/morbo ~/example42)
16:11 nakamura nic: Thanks! this opened whole new world.
16:11 nakamura nic: btw, i need to plan for deployment.
16:12 nakamura if i got my apps working
16:12 nic yep, and it keeps getting better
16:12 nakamura and need to host it under apache http server.
16:12 nakamura what do we need ?
16:12 nic nakamura: is your audience on a private network or the www?
16:13 nakamura private, intranet
16:13 nic Look at the cookbook guide
16:13 nic On an intranet lots of people are happy with hypnotoad
16:14 nic You can use apache too, with mod_proxy to hypnotoad, but personally I wouldn't unless I had extra reasons
16:15 nic In some environments you need to put your app behind apache just so that other people take your project seriously
16:45 mire_ joined #mojo
17:02 amirite joined #mojo
17:03 mire__ joined #mojo
17:10 yakudza joined #mojo
17:10 amirite joined #mojo
17:10 rhaen joined #mojo
17:10 rhaen hep
17:13 xaka joined #mojo
17:17 amirite joined #mojo
17:31 SmokeMachine joined #mojo
17:32 SmokeMa__ joined #mojo
17:33 amirite joined #mojo
17:39 ladnaV joined #mojo
17:46 amirite joined #mojo
17:48 mattastrophe joined #mojo
17:55 amirite joined #mojo
18:02 amirite joined #mojo
18:20 zaltekk joined #mojo
18:21 inokenty joined #mojo
18:21 d4rkie joined #mojo
18:24 lammel2 joined #mojo
18:25 amirite joined #mojo
18:31 sh4 joined #mojo
18:38 d4rkie joined #mojo
18:38 rhaen joined #mojo
18:40 fhelmber_ joined #mojo
18:40 amirite joined #mojo
19:01 amirite joined #mojo
19:42 amirite joined #mojo
19:53 mire__ joined #mojo
20:17 sh4|2 joined #mojo
20:19 detrov_ joined #mojo
20:29 amirite joined #mojo
20:43 amirite joined #mojo
20:45 bpmedley_ joined #mojo
20:55 tempire huh
20:56 tempire the god of python is leaving google
21:09 xaka joined #mojo
21:50 amirite joined #mojo
22:23 amirite joined #mojo
22:38 rem_lex|pivo joined #mojo
22:40 stephan48 joined #mojo
22:44 sri well, i suspect all new development happens in Go
22:58 b2b joined #mojo
23:05 sinkovsky joined #mojo
23:18 Adurah joined #mojo
23:19 jzawodn joined #mojo

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