unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Small Perl job for Tramp: base64 encoding/decoding
@ 2002-07-27 16:45 Kai Großjohann
  2002-07-27 16:59 ` Steve Kemp
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2002-07-27 16:45 UTC (permalink / raw)


Tramp looks whether Perl is present on the remote host.  If so, it
might use that Perl for base64 encoding/decoding.  There is also some
Perl code in tramp.el which is supposed to implement the operations,
but the Perl code is said to be buggy.

Is anyone volunteering to write new Perl code to do the job?

I need two commands which read from stdin and write to stdout.  One
command encodes, the other decodes.

(There is a Perl module which I could just use, but I think that this
module is not installed by default.  So it might not work for all
Perl installations.)

(If you happen to have a solution based on sed or something, then
that'd be great, too.  The goal is that the command should work on as
many Unix systems as possible.)

Thanks,
kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Small Perl job for Tramp: base64 encoding/decoding
  2002-07-27 16:45 Small Perl job for Tramp: base64 encoding/decoding Kai Großjohann
@ 2002-07-27 16:59 ` Steve Kemp
  2002-07-27 20:38   ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Kemp @ 2002-07-27 16:59 UTC (permalink / raw)
  Cc: emacs-devel

On Sat, Jul 27, 2002 at 06:45:39PM +0200, Kai  Großjohann wrote:

> Tramp looks whether Perl is present on the remote host.  If so, it
> might use that Perl for base64 encoding/decoding.  There is also some
> Perl code in tramp.el which is supposed to implement the operations,
> but the Perl code is said to be buggy.
> 
> Is anyone volunteering to write new Perl code to do the job?
> 
> I need two commands which read from stdin and write to stdout.  One
> command encodes, the other decodes.

  There's a uudecode sample included in all the modern distributions of
 Perl.  On my Debian GNU/Linux system it's located in:

	/usr/share/doc/perl/examples/uudecode

Steve
---
www.steve.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Small Perl job for Tramp: base64 encoding/decoding
  2002-07-27 16:59 ` Steve Kemp
@ 2002-07-27 20:38   ` Kai Großjohann
  2002-07-27 20:43     ` Steve Kemp
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2002-07-27 20:38 UTC (permalink / raw)
  Cc: emacs-devel

Steve Kemp <skx@tardis.ed.ac.uk> writes:

>   There's a uudecode sample included in all the modern distributions of
>  Perl.  On my Debian GNU/Linux system it's located in:
>
> 	/usr/share/doc/perl/examples/uudecode

That's good to know.  But where is uuencode?  And the filename
suggests that it will be in wildly differing locations on other
systems.  So it will be difficult to find with the autodetection code.

Or are you suggesting that I incorporate the code found there in
Tramp?  Then the copyright would have to be assigned.  [time passes]
Oh, the whole file is only 15 lines.  So what do I do?

Ah, it's not so difficult to write the encoders and decoders in
Perl.  Now I have to figure out how to integrate those in Tramp.

Thanks,
kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Small Perl job for Tramp: base64 encoding/decoding
  2002-07-27 20:38   ` Kai Großjohann
@ 2002-07-27 20:43     ` Steve Kemp
  2002-07-28 10:16       ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Kemp @ 2002-07-27 20:43 UTC (permalink / raw)
  Cc: emacs-devel

On Sat, Jul 27, 2002 at 10:38:29PM +0200, Kai  Großjohann wrote:

> Or are you suggesting that I incorporate the code found there in
> Tramp?  Then the copyright would have to be assigned.  [time passes]
> Oh, the whole file is only 15 lines.  So what do I do?
> 
> Ah, it's not so difficult to write the encoders and decoders in
> Perl.  Now I have to figure out how to integrate those in Tramp.

  Sorry to be less clear - I was suggesting that you study the code
 there as it is very small and should be straightforward to understand.

  (On my system I also have a uuencode script in the same location)

  I've just about to head to work now - but I'll mail you a small
 encode + decode script tommorow if you've not received one by then.

Steve
---
www.steve.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Small Perl job for Tramp: base64 encoding/decoding
  2002-07-27 20:43     ` Steve Kemp
@ 2002-07-28 10:16       ` Kai Großjohann
  2002-07-29  8:54         ` Kim F. Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2002-07-28 10:16 UTC (permalink / raw)
  Cc: emacs-devel

Steve Kemp <skx@tardis.ed.ac.uk> writes:

> Sorry to be less clear - I was suggesting that you study the code
> there as it is very small and should be straightforward to
> understand.

Unless the authors have signed papers, I'm not allowed to study the
code, I think.

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Small Perl job for Tramp: base64 encoding/decoding
  2002-07-28 10:16       ` Kai Großjohann
@ 2002-07-29  8:54         ` Kim F. Storm
  0 siblings, 0 replies; 6+ messages in thread
From: Kim F. Storm @ 2002-07-29  8:54 UTC (permalink / raw)
  Cc: Steve Kemp, emacs-devel

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Steve Kemp <skx@tardis.ed.ac.uk> writes:
> 
> > Sorry to be less clear - I was suggesting that you study the code
> > there as it is very small and should be straightforward to
> > understand.
> 
> Unless the authors have signed papers, I'm not allowed to study the
> code, I think.

I'm not sure, but since it is sample code included with the Perl
distribution, (location is: /usr/share/doc/perl/examples/uudecode), I
would assume that the code is to be viewed as _documentation_, and
that you are allowed to _read_ the code for to learn how to
uuen/decode in perl.

In any case, the magic part is _probably_ (I haven't looked at the
code either) perl's built-in pack and unpack commands with "u"
(uuencode) option.  Check the perlfunc man-page for details.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-07-29  8:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-27 16:45 Small Perl job for Tramp: base64 encoding/decoding Kai Großjohann
2002-07-27 16:59 ` Steve Kemp
2002-07-27 20:38   ` Kai Großjohann
2002-07-27 20:43     ` Steve Kemp
2002-07-28 10:16       ` Kai Großjohann
2002-07-29  8:54         ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).