From austin.pm at sam-i-am.com Mon Sep 8 03:13:37 2008 From: austin.pm at sam-i-am.com (Sam Foster) Date: Mon, 08 Sep 2008 11:13:37 +0100 Subject: APM: web application deployment? Message-ID: <48C4FAD1.7010308@sam-i-am.com> hi all, I've not yet hooked up with my local pm group, so you are still my local community for now :) I've got a pretty simple perl/cgi app that I need to deploy in a couple places. One is a shared hosting account where I have shell access. Another is a shared hosting account where I dont have shell access, and a third is a friends server where I currently have no account at all and will be delivering a hopefully-easily-deployable package of some sort. All are linux boxes of various flavours, all have other jobs they need to do. To compound the fun I'm developing primarily on osx (intel), though I've got a ubuntu vm that its running on too. In brief, what are the best practices for this kind of thing? My app is simple, but it has a number of dependencies, including things like the JSON module, and XML::LibXML - which have XS components. I dont have the option of sitting on the server and manually installing these modules. Using the cpan shell to install stuff is a non-starter anyway as 1) I dont have a shell everywhere, and 2) I dont want to require that of my friend who is not familiar with perl. So I've spent a while with the PAR and pp tools to create a self-contained package, but I'm buggered if I can get it to work fully - even fiddling with the various switches to do runtime dependency checking and adding known dynamic dependencies with -M. I can bully through that if that's the way to go, but I'm also discouraged because the standalone executable is large and loads like a dog (does it play with FastCGI? I dunno the ins and out of that). I've tried just using pp to create a par file and writing a little deployment script to unpack and install that on the remote server and that's a little less magical, but still awkward, and until I can get every dependency accounted for not viable. I'm also not clear that I can expect architecture-sensitive modules like XML::LibXML to work on different hardware and linux flavors when I built them on my Ubuntu vm. The other option is to do module installation from my deployment script, rather than shipping them myself. I'm not sure what that looks like though You all have presumably been though this before - what do you do? Sam From mlehmann at lehmbrain.net Mon Sep 8 07:40:04 2008 From: mlehmann at lehmbrain.net (Mark Lehmann) Date: Mon, 8 Sep 2008 09:40:04 -0500 Subject: APM: September Meeting - Perl 5.10 - aka Perl 6 implemented in Perl 5 Message-ID: <8fa2a6330809080740r70a66526vb7de363388cd1e7d@mail.gmail.com> Subject: September Meeting - Perl 5.10 - aka Perl 6 implemented in Perl 5 We're getting close to the meeting. A couple of things: - Does anyone have a project that we can use for the meeting? - Is anyone keenly interested in specific parts of perl 5.10, so we can focus on them? - Who would like to assist with the presentation? - For lack of a better place, I'll get the room at Mangia Duval again, with a fall back to Mangia Mesa. The key issue is having a place that we can has no cover charge, that will do individual checks, where people can come an go at different times, and has a room closed off from other customer chatter. -- Mark Lehmann 512 689-7705 M -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlehmann at lehmbrain.net Mon Sep 8 07:47:51 2008 From: mlehmann at lehmbrain.net (Mark Lehmann) Date: Mon, 8 Sep 2008 09:47:51 -0500 Subject: APM: Website update. Message-ID: <8fa2a6330809080747m78b42eebx28ddb291a156c618@mail.gmail.com> Would the website maintainer update the website for Wednesdays meeting? For presenter put Austin Regular Attenders (I'll do some of the presentation, and I'd like some others in the group to do some other parts of the presentation), for the time 7:00pm Sept 10th. Location TBD (probably Mangia). -- Mark Lehmann 512 689-7705 M -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlehmann at lehmbrain.net Mon Sep 8 09:04:44 2008 From: mlehmann at lehmbrain.net (Mark Lehmann) Date: Mon, 8 Sep 2008 11:04:44 -0500 Subject: APM: Mangia Mesa - 7:00pm http://www.mangiapizza.com/12/Mesa.htm Message-ID: <8fa2a6330809080904k7a24d0cdq6b87b4a8172d166a@mail.gmail.com> I have the reservation. Mangia Mesa - 7:00pm http://www.mangiapizza.com/12/Mesa.htm -- Mark Lehmann 512 689-7705 M -------------- next part -------------- An HTML attachment was scrubbed... URL: From taylor at codecafe.com Tue Sep 9 07:58:07 2008 From: taylor at codecafe.com (Taylor Carpenter) Date: Tue, 9 Sep 2008 09:58:07 -0500 Subject: APM: Website update. In-Reply-To: <8fa2a6330809080747m78b42eebx28ddb291a156c618@mail.gmail.com> References: <8fa2a6330809080747m78b42eebx28ddb291a156c618@mail.gmail.com> Message-ID: <98DF026D-9712-43C4-BF13-08D8098CC20A@codecafe.com> Done. On Sep 8, 2008, at 9:47 AM, Mark Lehmann wrote: > Would the website maintainer update the website for Wednesdays > meeting? For presenter put Austin Regular Attenders (I'll do some > of the presentation, and I'd like some others in the group to do > some other parts of the presentation), for the time 7:00pm Sept > 10th. Location TBD (probably Mangia). > > -- > Mark Lehmann > 512 689-7705 M > _______________________________________________ > Austin mailing list > Austin at pm.org > http://mail.pm.org/mailman/listinfo/austin -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2421 bytes Desc: not available URL: From howanitz at gmail.com Thu Sep 11 06:42:30 2008 From: howanitz at gmail.com (Keith Howanitz) Date: Thu, 11 Sep 2008 08:42:30 -0500 Subject: APM: UT jobs Message-ID: To Rich (I believe?) who was looking for work - I have no connection to UT (well, my wife in a Texas Ex) but hope you find something soon: http://www.utexas.edu/its/about/jobs.php http://utdirect.utexas.edu/pnjobs/index.WBX Thanks for the presentation Mark. Wayne - please send me the prime number regex you told us about. -- -Keith howanitz at gmail.com From mlehmann at lehmbrain.net Thu Sep 11 06:47:01 2008 From: mlehmann at lehmbrain.net (Mark Lehmann) Date: Thu, 11 Sep 2008 08:47:01 -0500 Subject: APM: Presentation Charts In-Reply-To: References: Message-ID: <8fa2a6330809110647k7dcfb5adk476468e210343ed9@mail.gmail.com> The charts that someone else wrote and I presented. http://en.oreilly.com/oscon2008/public/schedule/speaker/3189 -- Mark Lehmann 512 689-7705 M -- Mark Lehmann 512 689-7705 M -------------- next part -------------- An HTML attachment was scrubbed... URL: From tmcd at panix.com Thu Sep 11 08:22:13 2008 From: tmcd at panix.com (Tim McDaniel) Date: Thu, 11 Sep 2008 10:22:13 -0500 (CDT) Subject: APM: Primality regexp In-Reply-To: References: Message-ID: On Thu, 11 Sep 2008, Keith Howanitz wrote: > Wayne - please send me the prime number regex you told us about. I'm Wayne only in my heroin-induced wildest dream, but Googling for "prime number" "regular expression" perl got, among its hits, But the regular expression appears to miss the edge cases. The real test appears to be this: ('1' x $the_number_to_be_tested) !~ /^1?$|^(11+?)\1+$/ The short explanation: - the left side of the | handles 0 or 1 - the right side of the | factors the number. It tests each possible factor via the magic of backtracking. It first tries 11 (meaning "2"), because +? is the non-greedy-matching operator. That side of the expression tries to match 11 followed by one or more exact repetitions of 11 (with nothing left over). That attempt matches only if the string is divisible by 2. If it fails, the regexp parser backtracks to 11+? and tries again, with one more character: it attempts to match with 111 (== 3). If that fails, 1111. 11111. 111111. ... -- Tim McDaniel, tmcd at panix.com From lrstott at swbell.net Thu Sep 11 12:35:52 2008 From: lrstott at swbell.net (Rich Stott) Date: Thu, 11 Sep 2008 12:35:52 -0700 (PDT) Subject: APM: Thanks for the link Keith... Message-ID: <639290.5569.qm@web81505.mail.mud.yahoo.com> Keith, You have a better name memory than I. Thanks for the link. Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian at remmler.org Thu Sep 11 21:29:54 2008 From: ian at remmler.org (Ian Remmler) Date: Thu, 11 Sep 2008 23:29:54 -0500 Subject: APM: Perl 6 Propaganda Message-ID: <20080912042954.GA25409@brane> Sorry I couldn't make the meeting yesterday, but to make up for it, I'll provide some material to brainwash^Wconvince you that Perl 6 is The Future (TM). (If you only watch one of these, watch Conway's talk - it's quite mad) Patrick Michaud progress report (good overview of Perl 6 on Parrot progress) http://www.rakudo.org/2008/09/final-report-for-mozilla-found.html Larry Wall - Google Tech Talk (pretty dry, but interesting) http://www.youtube.com/watch?v=JzIWdJVP-wo OSCon videos: Object Orientation, The Perl 6 Way - Jonathan Worthington video: http://blip.tv/file/1219850/ slides: http://www.jnthn.net/papers/2008-yapc-eu-perl6oo.pdf Putting Types To Work In Perl 6 - Jonathan Worthington video: http://blip.tv/file/1225913/ slides: http://www.jnthn.net/papers/2008-yapc-eu-perl6types.pdf Perl Myths - Tim Bunce (second half is about Perl 6) http://blip.tv/file/1150746/ Temporally Quaquaversal Virtual Nanomachine Programming In Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces ... Made Easy! - Damian Conway -- - Ian. From ian at remmler.org Fri Sep 12 06:17:03 2008 From: ian at remmler.org (Ian Remmler) Date: Fri, 12 Sep 2008 08:17:03 -0500 Subject: APM: Perl 6 Propaganda In-Reply-To: <20080912042954.GA25409@brane> References: <20080912042954.GA25409@brane> Message-ID: <20080912131703.GA27522@brane> On Thu, Sep 11, 2008 at 11:29:54PM -0500, Ian Remmler wrote: > Temporally Quaquaversal Virtual Nanomachine Programming In Multiple > Topologically Connected Quantum-Relativistic Parallel Timespaces ... > Made Easy! - Damian Conway Oh, you actually wanted the link to the video? Fine... http://blip.tv/file/1145545/ -- - Ian. From howanitz at gmail.com Wed Sep 24 09:39:46 2008 From: howanitz at gmail.com (Keith Howanitz) Date: Wed, 24 Sep 2008 11:39:46 -0500 Subject: APM: chokes on dos formatted csv file Message-ID: This sample runs great if the file is Unix formatted, but if I upload a file from a windows system it dies with error: Error getting csv data. (Bad file descriptor) at ./test-csv2 line 13, line 1. Any suggestions? #!/usr/bin/perl -w use strict; use Text::CSV_XS; my $csv = Text::CSV_XS->new (); chomp (my $FN = $ARGV[0]); open MYCSV, $FN or die "Error opening csv file. ($!)"; while () { chomp; $csv->parse($_) or die "Error getting csv data. ($!)"; #this is where it dies on a dos formatted file my @list = $csv->fields; #split fields into @list print $list[1] . "\n"; } close MYCSV; From tmcd at panix.com Wed Sep 24 10:13:12 2008 From: tmcd at panix.com (Tim McDaniel) Date: Wed, 24 Sep 2008 12:13:12 -0500 (CDT) Subject: APM: chokes on dos formatted csv file In-Reply-To: References: Message-ID: On Wed, 24 Sep 2008, Keith Howanitz wrote: > This sample runs great if the file is Unix formatted, but if I upload > a file from a windows system it dies with error: > Error getting csv data. (Bad file descriptor) at ./test-csv2 line 13, > line 1. > > Any suggestions? See what happens if you strip carriage returns yourself? I don't see how it can hurt with any reasonable file. 6> chomp (my $FN = $ARGV[0]); You shouldn't have to chomp a command-line argument. chomp() gets rid of a trailing line-terminator character, and it takes a special effort to get one of those in even in a Linux environment. 11> while () { 12> chomp; 13> $csv->parse($_) 14> or die "Error getting csv data. ($!)"; #this is where it dies on a dos formatted file When I want to be sure that line terminators are being totally stripped on Windows, I do chomp; s/\r+$//; That gets rid of the Windows standard \r\n line-terminator. I had a problem for a little while where some lines were ending in \r\r\n or \r\r\r\n (some source-control parameters were misset), so the above code would handle them too. If you want to stomp out \r even in the middle of lines, where they shouldn't be anyway, I think it's tr/\r//d; but I've not tested it and I very rarely use tr///. -- Tim McDaniel, tmcd at panix.com From wwalker at bybent.com Wed Sep 24 10:15:44 2008 From: wwalker at bybent.com (Wayne Walker) Date: Wed, 24 Sep 2008 12:15:44 -0500 Subject: APM: chokes on dos formatted csv file In-Reply-To: References: Message-ID: <20080924171544.GA11279@bybent.com> I don't do much perl anymore, but in the CSV_XS man page there is a flag where you specify the line delimiter. You just have to change that before you read the file in. On Wed, Sep 24, 2008 at 11:39:46AM -0500, Keith Howanitz wrote: > This sample runs great if the file is Unix formatted, but if I upload > a file from a windows system it dies with error: > Error getting csv data. (Bad file descriptor) at ./test-csv2 line 13, > line 1. > > Any suggestions? > > #!/usr/bin/perl -w > use strict; > use Text::CSV_XS; > my $csv = Text::CSV_XS->new (); > > chomp (my $FN = $ARGV[0]); > > open MYCSV, $FN > or die "Error opening csv file. ($!)"; > > while () { > chomp; > $csv->parse($_) > or die "Error getting csv data. ($!)"; #this is where it dies on > a dos formatted file > my @list = $csv->fields; #split fields into @list > print $list[1] . "\n"; > } > close MYCSV; > _______________________________________________ > Austin mailing list > Austin at pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker wwalker at bybent.com Do you use Linux?! http://www.bybent.com Get Counted! http://counter.li.org/ Perl - http://www.perl.org/ Perl User Groups - http://www.pm.org/ Jabber: wwalker at jabber.bybent.com AIM: lwwalkerbybent IRC: wwalker on freenode.net From howanitz at gmail.com Wed Sep 24 13:54:36 2008 From: howanitz at gmail.com (Keith Howanitz) Date: Wed, 24 Sep 2008 15:54:36 -0500 Subject: APM: chokes on dos formatted csv file In-Reply-To: <20080924171544.GA11279@bybent.com> References: <20080924171544.GA11279@bybent.com> Message-ID: Thanks guys! Tim's "s/\r+$//;" got me going for today. It took me way too long to realize why my test file worked but the user supplied file did not. ("Bad file descriptor" had me thinking open errors for a bit.) I think I need to look into telling vim not to auto hide the display of dos line ending characters. Here it is: http://vim.wikia.com/wiki/File_Format Does OS X still really use CR instead of LF? I keep hoping the day will come when I will not have to support users of windows at all, but my next task is to write data to a series of csv files for import into access. -- -Keith howanitz at gmail.com