Re: [Boston.pm] Data::Dumper formatted for linked lists?

2013-02-08 Thread Ron Newman

On Feb 8, 2013, at 12:33 PM, Chris Devers wrote:

 I'd advise reading this:
 
 http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/
 
 Then think real hard about if YAML is the way to go for *anything* right
 now.
 
 The current problem is with Ruby, but it seems plausible that other
 languages could be affected as well.

If Ruby's YAML parser stuck to just deserializing into 'boring' data structures 
(strings, numbers, booleans, arrays, and hashes), this security problem would 
not occur.   The issue is that it can deserialize an arbitrary Ruby object of 
any class, and set its attributes.Does the Perl YAML parser have any 
similar facility?

___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Quantum Books (was: schwag for next meeting)

2009-06-22 Thread Ron Newman


On Jun 22, 2009, at 9:23 AM, Diab Jerius wrote:


They're now TechBookSolutions. Same friendly people.  Here's contact
info:

TechBookSolutions
60 Thoreau St., Suite 295
Concord, MA 01742
Cell 978-807-3234
Voice 978-610-2787
Fax 978-759-0073



If http://TechBookSolutions.com is their web site, I'm not impressed ;-)

If it isn't, where is their website?  Google does not help.  Where  
did you find this address and phone number?



___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Punt advised RE: Reminder: Tech Meeting, Tuesday, February 12, at MIT

2008-02-12 Thread Ron Newman
I'd say keep the meeting as scheduled.  You are right next to the Red  
Line, and I don't expect it to stop running just because of a little  
snow or ice.

(That said, I haven't yet decided if I'm going to your meeting or the  
Ruby meeting in the same neighborhood tonight.)


 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Social Meeting in August

2007-08-16 Thread Ron Newman

Another brew pub in the area is John Harvard's in Harvard Square.
It's a but yuppity, but has a geek-friendly basement venue :-P

Unless you're in the private room, John Harvard's is really, really loud.
 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Short time in Boston

2006-09-15 Thread Ron Newman
 on Oct. 22nd. 

If the Red Sox are *not* playing

This year, that's a VERY safe assumption ;-(
 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Short time in Boston

2006-09-15 Thread Ron Newman

If you're coming in with a cruise ship, you might be docking somewhere
near the aquarium

Maybe, but Black Falcon terminal in South Boston is more likely.  Unfortunately,
that's not near much of anything.  You can take a Silver Line bus from there
to South Station, or get a water taxi to the Aquarium -- 
http://www.citywatertaxi.com

 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] version of perl that can use scalar filehandles

2006-05-23 Thread Ron Newman
more importantly, what is the syntax for passing a filehandle 
into a routine if it is FILEHANDLE instead of $FILEHANDLE?

foo(*FILEHANDLE)
 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Combinatorics (Permutations

2005-11-29 Thread Ron Newman

On Nov 30, 2005, at 12:03 AM, Federico Lucifredi wrote:

 my $maxlen = 4;

 my @indices = (0, 0, 0, 0); # how do I init this array so that it is
 $maxlen zeros long ?

my @indices = 0 x $maxlen;


unless (++$i == $maxlen)
{ last; } # can we get rid of some braces somehow ?!

last unless (++$i == $maxlen);

 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Trying to learn about the problems with eval()

2005-08-15 Thread Ron Newman

On Aug 15, 2005, at 11:17 AM, Kripa Sundar wrote:
 I asked him to re-write it as:

 system(cat $somefile | mail -s '$something' $audience);

Which of course should really be written as:

system(mail -s '$something' '$audience'  $somefile);

 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Pizza

2005-08-09 Thread Ron Newman

 Any suggestions for a pizza place near MIT for tonight?

There's always Bertucci's, on Main Street between Central and Kendall 
squares.

 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Can I do a chgrp() without invoking a child process?

2004-11-23 Thread Ron Newman
On Nov 24, 2004, at 1:15 AM, Kripa Sundar wrote:
I want to do a chgrp() without invoking a child process.
perldoc -f chown says:
  chown LIST
   Changes the owner (and group) of a list of files.  The 
first
   two elements of the list must be the numeric uid and 
gid, in
   that order.  A value of -1 in either position is 
interpreted by
   most systems to leave that value unchanged.

so it looks to me like you can use chown(-1, $newgid, $filename) to do 
what you want.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


[Boston.pm] Re: defined(lc(undef()))

2004-08-12 Thread Ron Newman
I've never really understood the rules for when it's OK to use undef as if
it were 0 or , and when it is not OK (generates a warning).  Can someone
summarize them, or point me to a reference?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Tech Meeting Followup

2004-08-06 Thread Ron Newman
 That's not a typical web crawler, and obviously not what I meant.
Such databases already exist (e.g. bugmenot) but using them to rip a
page is definitely abusive.

Not abusive at all.  It's a public service.

 Think Google, not rip-off.

Go to news.google.com and you will see many results that say things like

Kansas City Star (subscription)

So the Google crawler does indeed subscribe to some registration-required sites
and crawl them.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Re: Uploading a picture with perl

2004-08-03 Thread Ron Newman
Upon further testing I verified that the statement
my $picture = $query-upload($file);
is indeed returning undefined.

What would cause that?

Show us the entire HTML FORM that contains the file upload field.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


[Boston.pm] CGI::Carp and mod_perl

2004-08-03 Thread Ron Newman
If I run this under mod_perl:

#!/usr/bin/perl
use CGI::Carp;
die Death by chocolate\n;

the Apache error log reads:

[Tue Aug  3 17:54:00 2004] [error] [Tue Aug  3 17:54:00 2004] null: Death by
chocolate

If I run it without mod_perl, it prints out the name of my script instead of
null.  

Why does it print null when run under mod_perl, and how can I fix this?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Weird regex behavior?

2004-08-02 Thread Ron Newman
On Aug 2, 2004, at 8:04 AM, Palit, Nilanjan wrote:
In each case, the actual $_ substitution occurs fine. Case A seems to
behave as expected. However, in case B, somehow $1  $2 lose their 
value
once inside the {}.
This does not happen when I run your program with perl 5.8.1-RC3 on 
MacOS X 10.3.4 .
What version of perl are you using?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] uploading a picture with perl

2004-08-02 Thread Ron Newman

Assuming your using CGI.pm (and you really do want to for this sort of
thing, IMHO) all you should need to add to your CGI is:
   use CGI qw(:standard);
   my $cgi = new CGI;
   my $picture = $cgi-upload('forms_file_field_name');
   Error(no file?) unless defined $picture; # your Error

Also, the HTML FORM element that contains the file-upload input widget needs
to include this attribute:
 
   ENCTYPE=multipart/form-data


___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Need time since 1900-01-01 00:00:00

2004-07-28 Thread Ron Newman
On Jul 28, 2004, at 8:58 PM, Ranga Nathan wrote:
Is there a quick way to convert a time stamp (date  time)  as seconds
since 1900-01-01 00:00:00?
time() uses 1970 as base (epoch).
time() + (24*60*60)*((365*70)+int(70/4))
24*60*60 is the number of seconds in a day
365*70 is the number of days in 70 ordinary (non-leap) years
int(70/4) is the number of leap days to add.  (note that 1900 is not a 
leap year)

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] FW: GBC/ACM Announcements

2004-06-11 Thread Ron Newman
On Jun 11, 2004, at 11:21 PM, Dan Sugalski wrote:
Good question. So far as I know, it's open to the public. (I assumed 
it was, at least, but I completely forgot to check)
GBC/ACM meetings are always open to the public.
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Variable used only once warning

2004-06-07 Thread Ron Newman

$grand_total += total1;
$grand_total += total2;
$grand_total += total3;
$grnad_total += total4;
 ^^^

$grnad_total is used only once and is most likely a tupo.

use strict should complain about that, even without warnings turned on.  Assuming
that you never declared $grnad_total, of course.
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Tech Meeting Rescheduled

2004-05-07 Thread Ron Newman
I'd rather have the meeting at the same time every month, so we can enter it
into the regular schedules of places like www.bugc.org and www.bostonusergroups.com
.   Is it that big a deal to occasionally have a Red Sox game going on 3 blocks
away?
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


[Boston.pm] Non-matching regexp doesn't set $1 to undef. Should it?

2004-04-20 Thread Ron Newman
If I try to match a regular expression that contains parentheses, and 
the match fails, shouldn't $1 be set to undef rather than keeping 
whatever value it had before?   The following program demonstrates what 
looks to me like very strange behavior.   Adding local $1 = undef; in 
the position shown did not change this behavior.

---
#!/usr/bin/perl -w
use strict;

sub1(There are 100 words.);

sub sub1 {
  my $s = shift;
  $s =~ /There are (\d+) words./;
  print sub1 (before call): \$1=$1\n;
  sub2($s);
  print sub1 (after call): \$1=$1\n;
}
sub sub2 {
  my $s = shift;
  # local $1 = undef;  --- Adding this has no apparent effect.
  print sub2 (before match): \$1=$1\n;
  $s =~ /There are ([a-z]+) words./;
  print sub2 (after match): \$1=$1\n;
  }
--
The output:
sub1 (before call): $1=100
sub2 (before match): $1=100
sub2 (after match): $1=100
sub1 (after call): $1=100
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Tech meeting?

2004-04-12 Thread Ron Newman
On Apr 12, 2004, at 10:40 AM, Sean Quinlan wrote:

If Boston.com is not available I do have access to rooms near the T.
Why are we no longer able to use Boston.com?  Has everyone there 
switched to Python or PHP or Ruby?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] GUI work ...

2003-12-17 Thread Ron Newman
On Dec 17, 2003, at 11:15 AM, [EMAIL PROTECTED] wrote:
I use perl/Tk, and I have written a LOT of GUI's for
scripts at work.
I installed this on my OS X machine, and got this error when I ran your 
script:

unknown option text at 
/Library/Perl/5.8.1/darwin-thread-multi-2level/Tk/Widget.pm line 205.
 at - line 9

Also, when I ran the test suite on OS X, I got these errors.   How 
significant are they?

t/entry..NOK 327# Test 327 got: '0 0.724137' 
(t/entry.t at line 1245)
# Expected: '0 0.827586'
#  t/entry.t line 1245 is: skip($skip_font_test, join( , map { 
substr($_, 0, 8) } $e-xview), 0 0.827586);
t/entry..NOK 329# Test 329 got: '0 0.724137' 
(t/entry.t at line 1259)
# Expected: '0 0.827586'
#  t/entry.t line 1259 is: skip($skip_font_test, join( , map { 
substr($_, 0, 8) } $e-xview), 0 0.827586);
t/entry..NOK 333# Test 333 got: '0.1875 0.75' 
(t/entry.t at line 1278)
# Expected: '0.1875 0.8125'
#  t/entry.t line 1278 is: ok(join( ,@scrollInfo),0.1875 0.8125);
t/entry..NOK 334# Test 334 got: '0.315789 0.789474' 
(t/entry.t at line 1284)
# Expected: '0.315789 0.842105'
#  t/entry.t line 1284 is: ok(join( ,map { sprintf %8f, $_ } 
@scrollInfo),0.315789 0.842105);

t/regexp.NOK 10# Failed test (t/regexp.t at 
line 47)
#  got: undef
# expected: '4.5'
t/regexp.NOK 11# Failed test (t/regexp.t at 
line 48)
#  got: '0'
# expected: '3'

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] empty versus zero

2003-08-14 Thread Ron Newman
On Wednesday, August 13, 2003, at 12:55  PM, Vince Coccia wrote:
Wouldn't the simple solution work? Just check for the defined-ness of 
the
element?
No.  The element IS defined, but it is an empty string.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] empty versus zero

2003-08-14 Thread Ron Newman
On Wednesday, August 13, 2003, at 01:21  PM, Timothy Kohl wrote:
(!$value)

will catch zero 0 and undefs, but not 0.0.
He doesn't want to catch either 0 or 0.0 .

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] OT: Mail.app junk mail filter performance of late

2003-07-14 Thread Ron Newman
On Monday, July 14, 2003, at 12:07  PM, Mikey Smelto wrote:

Has anyone else noticed that Mail.app's junk filter has basically 
stopped filtering out junk mail?
Not me.  It doesn't catch everything, but it catches quite a bit.

It is possible that your ~/Library/Mail/LSMMap file has been corrupted? 
 Try reloading an old one from a backup.
(You do backups, right?)

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Help with very sluggish perl process?

2003-06-18 Thread Ron Newman
I don't know if either of these really address the performance issue, 
but ...
	
$REC=;
$REC=CXIBIO;
the first assignment serves no purpose since you are immediately 
overwriting it.

# Contruct Host Response String
$RECIN=$RECIN.$REC;
Would the Perl compiler generate better code for

  $RECIN .= $REC

?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] open a gz file

2003-02-27 Thread Ron Newman
On Thursday, February 27, 2003, at 01:43  PM, Carlton Lo wrote:

Hi,
	I'm new to perl, I'm trying to write a pl script that would open a 
gzipped txt file. Is there any functions where I can call for this. 
I've tried the followings:

method #1	open(IN, gunzip -c data.gz) || die cannot open input 
data file;
isn't there a pipe character missing?   Try this:

   open(IN, gunzip -c data.gz | )

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Email filtering...

2003-02-11 Thread Ron Newman

On Tuesday, February 11, 2003, at 12:23  PM, Gyepi SAM wrote:

I don't see how '*@*.aol.*' can match '[EMAIL PROTECTED]'.
How do you account for the first '.' in the match expression?


For that matter, can a regular expression validly begin with * at all?
What does that mean?

And why would you want to match a string of zero or more @ characters?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm



Re: [Boston.pm] environment variables that stick

2003-01-16 Thread Ron Newman
You *could* have the perl script set all of the environment
variables, then exec a new shell.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm



Re: [Boston.pm] environment variables that stick

2003-01-16 Thread Ron Newman
Unix folks are used to these limitations on how you can use
environment variables.   Do things work the same way in Windows?

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm



[Boston.pm] Need help with CPAN module

2003-01-15 Thread Ron Newman
I'm trying to use the CPAN shell to fetch and build a package,
but not having any luck.  What am I doing wrong, and how do
I reconfigure my system to do it right?

cpan make DBI
Running make for module DBI
Running make for T/TI/TIMB/DBI-1.32.tar.gz
Issuing /usr/bin/ftp -n
/usr/bin/ftp: No address associated with nodename
Not connected.
Local directory now /Users/rnewman/.cpan/sources/authors/id/T/TI/TIMB
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL 
ftp://ftp.perl.org/pub/CPAN/authors/id/T/TI/TIMB/DBI-1.32.tar.gz.

Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/T/TI/TIMB/DBI-1.32.tar.gz
LWP failed with code[500] message[LWP::Protocol::MyFTP: Bad hostname 
'ftp.perl.org']
Fetching with Net::FTP:
  ftp://ftp.perl.org/pub/CPAN/authors/id/T/TI/TIMB/DBI-1.32.tar.gz
Please check, if the URLs I found in your configuration file () are 
valid.
The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch authors/id/T/TI/TIMB/DBI-1.32.tar.gz
Giving up on 
'/Users/rnewman/.cpan/sources/authors/id/T/TI/TIMB/DBI-1.32.tar.gz'
Note: Current database in memory was generated on Wed, 15 Jan 2003 
07:18:13 GMT

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] OT: Favorite Mac OS X utilities

2003-01-03 Thread Ron Newman

On Friday, January 3, 2003, at 03:51  PM, Drew Taylor wrote:


I just ran across an Eudora importer for Mail.app on version tracker 
yesterday.
Eudora Mailbox Cleaner - 1-step migration from Eudora to Mail.app
http://www.versiontracker.com/moreinfo.fcgi?id=13341db=mac

It's not perfect, but it's got to be better than the stock importer 
for Mail. It was slow and did a less than perfect job of importing all 
my mailboxes (some had only 1 mail, which never displayed in the 
folder).

The original Jaguar Mail.app importer was pretty buggy.  They fixed
most if not all of the problems in a subsequent Jaguar update
(either 10.2.1 or 10.2.2, I don't recall which now)

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm



[Boston.pm] Listing ourselves at bugc.org and BostonUserGroups.com

2002-10-22 Thread Ron Newman
Most user groups in the Boston area are listed on these two web sites:

   http://www.bugc.org - Boston user Groups Calendar
   http://www.BostonUserGroups.com

The first site has a very useful day-by-day calendar of user group 
meetings.

The second has a fixed list of regularly scheduled meetings (that 
happen at
the same time monthly), plus links to home pages for all the
user groups.

We're not listed in either place.  Should we be?   If someone is 
interested in
C# or Java or Linux or Visual Basic, these pages tell her where to go
locally.   I think we should add ourselves to these pages,
so that Perl users can find us too.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] question puzzle

2002-10-09 Thread Ron Newman


On Tuesday, October 8, 2002, at 11:18  PM, Chris Devers wrote

 On a different note, last weekend on NPR there was a puzzle that it 
 seems
 to me could be solved pretty neatly by a Perl script, and I'm curious
 what solutions people would try for it. Consider the following string:

 1 2 3 4 5 6 7 8 9=2002

 The problem is to add any number of addition  multiplication 
 operations
 wherever you'd like on the left such that in the end you have a valid
 equation.

Do you have to keep the digits in the same order?

If so, there are only 3^8=6561 solutions to try.  Between each digit you
can have +, *, or nothing.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm