[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] [NO LONGER OFF-TOPIC] Mac FTP alternative



Noah Iliinsky <noahi@quando.com> writes:
}At 4:18 PM -0500 7/31/97, Chris Nandor wrote:
}>At 11.17 7/31/97, Jon S. Jaques wrote:
}>>> Other transfer programs are often disasters.
}>>
}>The only way FTP for any platform can be considered "foolproof" is if you
}>have artificial intelligence driving it.  So don't hold your breath ...
}>
}>I know, though, that I've had as many problems with Windows FTP clients as
}>with Macs.  More problems, actually.  But it usually comes down to line
}>endings.
}
}For transfering files between our macs and our suns we use netatalk
}<http://www.umich.edu/~rsug/netatalk/index.html> . It's a free AppleShare
}server and print spooler for unix/linux, and being specifically designed
}to connect macs and unix boxes, it is very good about file formats and
}translations.

And the reason it works is that it transparently changes line endings upon
transfer.  If you use a text editor like Alpha that tells you what type of
text file it's looking at and open a Unix text file on a netatalk mounted
volume, it tells you it's a Mac text file, because that's what Alpha sees.
(Incidentally, for those who installed the Appleshare 3.7 client that does
TCP/IP, there's a set of patches for netatalk that allows it to work over
TCP/IP.  I now mount Unix volumes on my Mac at home via Appletalk while
dialed into my PPP account).  It's a slightly dangerous thing, since
netatalk can be fooled and translate something that shouldn't be
translated.  So many netatalk users turn translation off, and there's a
compile time option to do this. A good Mac text editor handles Unix files
(Alpha and BBEdit both do) with no trouble, so turning off end-of-line
translation is a reasonable thing to do.

Getting back to Perl, one of the most reliable ways to decide how to send a
file is Perl itself.  It's reasonably hard to fool -T (.pdf's are a notable
exception), so it's easy to cobble together a set of rules to tell Net::FTP
when to transfer text mode and when to transfer binary.  I believe Fetch
relies on Mac file type TEXT and maybe file extensions in the name, which
is not a very good way of deciding whether a file is text or not.  Perl at
least examines a block of the actual content of the file.

}
}Most of the perl I write is using BBEdit on files that reside on a sun
}volume mounted on my mac. These files execute fine on either platform
}(other platform differences notwithstanding).
}
}Disclaimer: we're using netatalk v1.4b2 for solaris. Because it is still
}in beta it isn't as stable as it should be. I hear it's better on other
}(BSD based) platforms, and a non-beta of v1.4 is due out RSN.
}
}Cheers, Noah
}
}--
}Noah Iliinsky                   noahi@quando.com
}Webmaster                      (503) 225-1988 vox
}Quando, Inc.                   (503) 225-1987 fax
}
}
}

---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch