Camelia, the Perl 6 bug

IRC log for #mojo, 2012-01-06

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

All times shown according to UTC.

Time Nick Message
00:25 fibo joined #mojo
00:26 fibo hi foomator
00:27 fibo hi all
00:27 fibo i'm porting a desktop app on Mojo, it is a really great framework thanks to devvvvs
00:29 alnewkirk giving flattery is its own reward
00:36 jnap joined #mojo
01:10 tempire nonsense.  flattery is a fully acceptable currency.  as is glitter.
01:20 d4rkie joined #mojo
01:32 buu What about flattery. Made out of glitter.
01:43 ashleydev joined #mojo
01:52 jnap joined #mojo
02:03 vel joined #mojo
02:23 quicoju joined #mojo
02:25 quicoju hi, i've seen the vim settings for mojolicious, does anyone have some kind of mojo-mode for emacs or some settings ?
02:25 quicoju for emacs
02:47 jnap joined #mojo
02:49 tempire not many emacs mentions in here
02:50 tempire everyone is mostly text mate or vim
02:50 * tempire nominates quicoju to create a mojo-mode for emacs
03:00 bvierra joined #mojo
03:16 hshong joined #mojo
03:23 mattastrophe joined #mojo
03:27 bvierra joined #mojo
03:38 Psyche^ joined #mojo
03:55 mire joined #mojo
04:40 chansen joined #mojo
04:54 marcus joined #mojo
05:05 bvierra joined #mojo
05:17 alnewkirk joined #mojo
05:53 * sri yawns
06:01 xaka joined #mojo
06:30 * buu lights sri's toes on fire
06:52 marcus oh hai
06:55 * sri burns
06:55 * marcus bbqs some sausages for breakfast
06:57 * marcus is first in the office, and can play loud 80s music.
06:57 sri \o/
07:03 D4RK-PH0ENiX joined #mojo
07:11 buu Play some dubstep!
07:14 * marcus plays some christian dubstep
07:16 * marcus chokes on own vomit
07:16 buu haha
07:16 buu I was trying to figure out exactly how that would work
07:16 * marcus puts on ZZ Top
07:25 marcus Sharp dressed man!
07:32 Vandal joined #mojo
08:31 berov joined #mojo
08:35 sugar joined #mojo
08:43 cosmincx joined #mojo
08:53 * crab finishes his slides just in time
08:54 crab good old slidy. plus jquery and raphaël.js
09:22 marcus crab: who are you talking for_
09:22 marcus to?
09:22 purl to is Tonga Islands
09:22 marcus against
09:22 marcus CRAB VS SNAKE - RAP BATTLE!
09:31 * tempire takes a seat and waits for the show
09:31 * tempire munches on popcorn
09:34 * sri steals the popcorn
09:34 * tempire cries
09:34 sri *munch*
10:35 alnewkirk joined #mojo
10:40 crab marcus: it's a talk about feathers, to the delhibird group
10:40 crab but i wrote more javascript code for the presentation than english words :-)
10:53 vti_ joined #mojo
10:53 vti_ left #mojo
11:03 trone Hi there. I'm reading rfc2616 (HTTP/1.1) and understanding something more about header definition and utilization. I was thinking: but who have precedence among http headers and html headers (as meta http-equiv content-type). I think that client read FIRST the server response block, and after read the body entity, but looking for info
11:05 sri how could it be any other way?
11:09 trone sri: Often I don't trust my brain so much. :)
13:12 batman hi
13:12 batman how do you tackle circular references in mojo?
13:12 batman like when you're passing $self on to callbacks...
13:12 sri da da da da da da da da da batman
13:13 batman :P
13:13 sri nothing mojo specific about that
13:14 batman so the examples will probably create circular refs, but they are cleaned up when the child process exit?
13:14 sri maybe, maybe not
13:15 sri impossible to answer
13:15 berov there were somwhere "weaken" used
13:15 batman care to explain?
13:15 purl care to explain is, like, DBIx::Class itself a subclass of ResultSet
13:15 berov if this has something to do with it
13:15 batman berov: yes, it has
13:15 berov :)
13:16 sri we use weaken to prevent leaking in the core, in your code you're responsible
13:16 berov good
13:16 batman ok. so i should do something like $envelope=[$self]; weaken $envelope->[0]; in my code?
13:16 sri rule of thumb, every sophisticated perl web app leaks in some way
13:17 berov but then the childrens live for N request and are dropped away
13:17 berov requests
13:17 purl requests are going to the module as I stated above
13:17 sri yes, you're supposed to weaken if you have to
13:17 sri often you don't have to
13:17 batman ok
13:17 batman is there any way to know when to weaken?
13:17 marcus if you leak...
13:17 marcus ;)
13:18 batman :D
13:18 sri when you leak a $self per request it actualy shows pretty quickly in a load test
13:18 batman so in my unittests i should probably use Test::Memory::Cycle and then weaken if i leak?
13:18 marcus circular reasoning.
13:18 purl circular reasoning is a driving factor in a scary number of non-technical minds, imho.
13:18 sri but Devel::Cycle is your friend
13:18 batman sri: "in a load test" ? like t/00-load.t ?
13:18 batman i only "use" stuff in my load test...
13:19 sri ab
13:19 batman ab?
13:19 purl well, ab is the Apache Benchmarking tool
13:19 sri botsnack!
13:19 purl thanks sri :)
13:20 sri small leaks are no big deal, hypnotoad and other production servers restart worker processes regularly
13:20 batman ok
13:20 berov that is what I wanted to say actually :)
13:21 batman i wonder if anyone are looking into changing the gc in perl...
13:22 sri nobody
13:22 sri it is not recognized as a problem
13:22 batman i wonder if it's possible to change the gc without breaking existing code
13:22 batman i don't understand why it's *not* a problem :(
13:23 batman it's quite frustrating
13:23 sri yes it is
13:23 batman but it guess frustrating != a bug :/
13:27 batman is there a better way than $envelope=[$self]; weaken $envelope->[0]; ...?
13:27 batman i tried $self = \$self; weaken $$self; which could make the code easier to read, but that did not work as expected :S
13:28 batman perl -le'$a="foo"; $a=\$a; print $$a'
13:28 sri did you actually check if you're leaking?
13:28 sri wekaning randomly can cause *a lot* of problems
13:28 batman i am leaking. but it's not really mojo's fault
13:29 batman yeah. i've experienced that as well :)
13:29 sri you need to be absolutely certain what you're doing, or stuff just starts disappearing randomly
13:29 batman i'm being cautious
13:29 batman i know
13:29 batman that's why i don't like perl's gc. it makes *things* difficult :/
13:30 sri what's really sad is that python has solved this years ago, even though they are still using ref counting
13:30 batman impressive
13:30 batman who to pay for making a fix in perl? :)
13:32 batman this is also frustrating: "NOTE: Copying a weak reference creates a normal, strong, reference."
13:32 batman even making a "sticky" weaken method would be quite nice
13:32 sri python solved it by adding cycle detection that runs every now and then like normal gc
13:34 sri http://www.python.org/getit/releases/2.0/n​ew-python.htm#SECTION000900000000000000000
13:34 sri the reason i heard against it from p5p was performance
13:35 batman typical
13:36 sri if there is one perl quirk that makes me consider a language switch it's lack of gc
13:36 batman i agree
13:36 batman i don't know any other language though :P
13:36 batman i just know why i won't change to python and ruby :)
13:36 jnap joined #mojo
13:37 sri javascript will be the one language in a few years
13:37 batman i love javascript
13:37 batman i like it even better than perl...
13:37 batman it's just that i don't know how to do server side stuff with it
13:38 batman and i also don't want to quit perl, so... :)
13:38 inokenty What about haskell? )
13:38 batman don't know it
13:38 purl don't know it is worth doing disguise for putting is at top of the function
13:39 sri khan academy will be teaching programming to the masses with javascript
13:40 netfeed i tried to learn haskell, but thought that the syntax was kinda off-putting, same with erlang
13:40 sri prolog syntax makes me want to poke my eyes out
13:41 inokenty netfeed: I learn it with this book http://learnyouahaskell.com/
13:41 inokenty Funny pictures makes learning easy =)
13:41 netfeed i've read that one, good book, but the syntax is till, i shouldn't say bad, but not to my liking
13:42 netfeed i kinda like lisps syntax though
13:43 sri everybody likes lisp
13:43 sri but mankind is not ready for it yet
13:44 netfeed it never will be
13:46 sri coroutines in the perl core could also make the weaken problem much easier to cope with
13:48 batman coroutines?
13:48 purl coroutines is when you save the current context of my program... stack and lexical and dynamic scopes, so you can call them later
13:48 batman hm...
14:21 d4rkie joined #mojo
14:23 d4rkie joined #mojo
14:53 d4rkie joined #mojo
14:54 batman is there any utility that can clean up my cycles?
14:55 batman like Test::Memory::Cycle tells me where they are, but i can't reach them and clean up the memory...
14:55 batman would be nice, evil and dangerous :)
14:57 sri and impossible
14:57 purl impossible is nothing!
14:58 sri vry much doubt you could automatically resolve circular references in closures
15:13 batman ok :)
15:21 noganex_ joined #mojo
15:30 GitHub40 joined #mojo
15:30 GitHub40 [mojo] kraih pushed 2 new commits to master: http://git.io/_189JA
15:30 GitHub40 [mojo/master] make Mojo::Exception subclassing easier - Oleg G
15:30 GitHub40 [mojo/master] Merge pull request #259 from olegwtf/master - Sebastian Riedel
15:30 GitHub40 left #mojo
15:40 d4rkie joined #mojo
15:57 tholen42 joined #mojo
15:58 d4rkie joined #mojo
16:27 diogo joined #mojo
16:29 mire joined #mojo
16:33 metaperl joined #mojo
16:36 abra_ joined #mojo
16:40 Therstrium joined #mojo
16:43 ladnaV joined #mojo
16:45 arpadszasz joined #mojo
16:47 metaperl|2 joined #mojo
16:47 Vandal joined #mojo
16:53 xaka joined #mojo
16:56 arpadszasz joined #mojo
16:58 zenista joined #mojo
16:58 zenista hi guys i am on a shared hosting, so i think i have to manually setup mojo... please guide or give some pointers
16:59 marcus zenista: did you look at the cookbook guides?
17:00 zenista yep... but as didn't find
17:00 zenista it tells to install thru curl -l .... cpan kind but that doesn't work on my shared hosting
17:00 marcus zenista: http://mojolicio.us/perldoc/Mojol​icious/Guides/Cookbook#DEPLOYMENT
17:01 marcus zenista: you can just use it directly by including it in your app if you prefer
17:01 marcus zenista: it has no dependencies outside of core perl
17:01 zenista yep thats why i m interested in it
17:02 zenista as my host doesn't allow install cpan modules
17:02 marcus that's fine
17:02 zenista cool
17:02 marcus zenista: http://showmetheco.de/articles/2010/10/how-to-inc​lude-mojolicious-in-your-apps-git-repository.html
17:03 zenista i have the app but thats in PHP
17:03 marcus zenista: ?
17:03 zenista so i will try to build that in mojo and see
17:03 zenista to me mojo looks awesome
17:03 marcus cool :) It is awesome.
17:04 zenista after researching on different perl frameworks i have pin point mojo and marson... first i will try mojo
17:04 marcus zenista: anyways, that post explains how to include mojolicious in your app. how to deploy it kind of depends on your hosting. worst case you could do CGI mode, but fastcgi would be preferrable.
17:04 zenista my hosts docs says they support fcgi for perl
17:05 metaperl joined #mojo
17:05 marcus zenista: cool. then use that
17:07 zenista the other one is for fallback as it seem not to be full stack... my first choice is mojo
17:07 zenista thanks for your help
17:07 zenista i will let you know
17:08 marcus good luck. read through the guides, they are good.
17:08 zenista yep
17:08 marcus start by learning the lite version, it's just sugar for the full one
17:08 marcus so it's easier to get started that way.
17:08 marcus http://mojolicio.us/perldoc/Mojolicious/Lite <- tutorial
17:09 zenista thanks buddy... more i read perl code.... more i feel ... oh my god... i should have found this earlier
17:10 marcus sounds good.
17:27 bvierra joined #mojo
17:36 batman joined #mojo
17:41 zenista from deployment guide under apache cgi it says to use scriptAlias
17:41 zenista i think i have to use .htaccess to redicrect / to a particular file or folder
17:41 zenista but which one?
17:43 Akron joined #mojo
17:47 Akron zenista: If you have mod_rewrite, you may be able to just use something like RewriteRule ^(.*)$ /Myapp.fcgi/$1 [L,QSA]
17:47 zenista yep i have that
17:47 zenista and my host says it has fcgi for perl also
17:48 zenista so does that mean i have to follow apache/cgi path or psgi/plack path as mentioned in development cookbok
17:50 Akron In case of FastCGI it should be simple - you just have to install the FastCGI driver and maybe start your app in the Myapp.fcgi with Strupat->start('fastcgi');
17:50 Akron Sorry Myapp->start('fastcgi');
17:50 zenista k
17:51 zenista and how to installation ... just untar the gz file in my hosting folder
17:51 Akron Copy and paste from here: http://search.cpan.org/~arpi/Mojo-Server​-FastCGI-0.2/lib/Mojo/Server/FastCGI.pm
17:51 Akron You have a "gz"-Folder?
17:52 zenista yep download from mojo website
17:52 zenista i tried curl -l cpan method but its not working
17:52 zenista i think as i have shared hosting i don't have enough permission for that
17:53 diogo joined #mojo
17:54 Akron That's not necessary. If you have a cgi-bin-folder or something, just Copy everything under "lib" in your gz in /cgi-bin/lib/.
17:54 Akron Do the same with the FastCGI driver.
17:54 zenista including the example directory
17:55 Akron No. That's not necessary.
17:55 zenista k
18:00 Akron You may have to check, if fast-cgi is really enabled - meaning: Is the perl driver for fastcgi installed.
18:00 zenista my host docs says that they support fcgi on perl
18:01 zenista i have untar gz file in /cgi-bin/lib
18:03 Akron zenista: Good! Support for perl doesn't necessarily mean that FCGI is preinstalled.
18:03 Akron But you can just check with an example app now.
18:04 zenista k
18:04 zenista what will be url for example app
18:05 Akron Just create a test.fcgi in your http root folder. This will allow you to start /test.fcgi.
18:05 Akron zenista: Don't forget to chmod 755 your app (although this may be not necessary in all cases).
18:05 zenista sk
18:05 zenista k
18:05 zenista buddy
18:06 zenista but just for the curosity how come without any installation my peral script will find mojo
18:08 Akron Maybe it can't - than you have to say, where your app can find it. Your example app can be something like that: https://gist.github.com/1571698
18:08 Akron s/than/then/
18:08 zenista k
18:10 kaare__ joined #mojo
18:11 Akron If it doesn't work and you have no clue why, you need to look into the server logs, as fastcgi error handling is sometimes a mistery (well ... to me it sometimes is). And maybe you have to check fcgi (http://search.cpan.org/~flora/FCGI-0.74/FCGI.PL).
18:12 Akron Shared webhosters do sometimes crazy stuff with their apache configurations as well.
18:20 Akron zenista: Have to leave now. Good luck! :)
18:20 zenista k buddy
18:20 zenista thanks for the help
18:20 Akron You're welcome!
18:25 trone I'm playing with mojo get. I've seen that I need --verbose to see headers in STDERR, and this is ok. Furthermore, I noticed that I need to use --verbose also when I use --method HEAD.
18:26 trone So --method HEAD not show anything I suppose. could to be useful set --verbose option always true if --method HEAD is used?
18:52 newbie joined #mojo
18:56 zenista which version of perl is required by mojo
18:56 tempire zenista: minimum 5.10
18:57 zenista k
18:57 zenista thanks
18:57 tempire 5.10.1
18:57 zenista yep
19:22 deeno joined #mojo
19:40 diogo joined #mojo
19:55 tempire mankind is not ready to move past imperative programming.  functional requires you to retrain your brain, and that's more work than the imperitocracy desires to put forth
19:55 tempire death to the imperitocracy
20:41 ccushing_ Use of uninitialized value $msgs[0] in join or string at /home/ccushing/perl5/perlbrew/perls/perl​-5.14.2/lib/site_perl/5.14.2/Mojo/Log.pm line 52.
20:42 ccushing_ why doesn't mojo croak or carp this stuff up
20:48 Akron joined #mojo
20:49 Akron zenista: Is it running?
20:50 tempire zenista dissipated into the ether
20:50 Akron Oh ... the ethering is not logged? ;)
21:08 batman joined #mojo
21:15 fmerges joined #mojo
21:29 Therstrium joined #mojo
22:51 jnap joined #mojo
22:52 jnap left #mojo
23:06 j3nnn1 joined #mojo
23:10 metaperl joined #mojo
23:15 jnap joined #mojo
23:24 marcus http://ttjjss.wordpress.com/2012/​01/06/state-of-dancer-on-perl-6/
23:41 xaka wtf "unless 'data'.IO ~~ :d {" is?
23:42 marcus unless data is a folder.
23:43 xaka i'd cut of the hands for such syntax
23:44 marcus that sounds bad.
23:45 tempire interesting
23:45 xaka perl6 has good features, but introducing unreadable stuff awful
23:46 tempire unreadable is subjective
23:46 tempire spanish is unreadable…unless you know spanish
23:46 xaka in the case above it's objective
23:46 xaka people complain about perl syntax a lot already and what they do in perl6? trying to confuse people even more
23:47 xaka it isn't the way to make perl community bigger
23:48 xaka unless (-d "...") better and easier to read than code above
23:53 marcus 'data'.IO.exists or something would have been nice.
23:54 xaka they have 'data'.IO.f
23:55 marcus I'm intrigued by PerlNinja's ideas - http://www.xirinet.com/2012/01/why-t​his-unholy-marriage-of-perl-and.html

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