Emacs extensions in Perl 
Author Message
 Emacs extensions in Perl


| I am reposting this exchange here in the hope of getting a response.

  *AUGH*, I _HATE_ reruns of stupid discussions with clueless people.
  go away!

#:Erik, who hopes that counts as "a response"
--
  religious cult update in light of new scientific discoveries:
  "when we cannot go to the comet, the comet must come to us."



Sun, 10 Sep 2000 03:00:00 GMT  
 Emacs extensions in Perl

Quote:

> > > One pipe dream I've had for years has been an editor that is to Perl
> > > as Emacs is to Lisp.  Or at least a Perl interpreter embedded in Emacs
> > > so that one can write Emacs extensions in Perl.
> On the other hand I get warm fuzzies at the prospect of making Emacs
> extensions in Perl. I am no fan of Lisp (even though I studied AI, or perhaps
> because..), like Larry says, it has all the aesthetic appeal of toenail
> clippings in a bowl of porridge.

This is flame bait.  I've long lost count of the languages I know,
and reckon there are only two languages with less aesthetic appeal
than Perl:  InterCAL and TECO.

There is a very nice editor indeed called Alpha, which is available
for 68k and Power Macintoshes, which is very Emacs-like but uses Tcl
as its extension language.  Alpha is half a megabyte on disc (I don't
know if that's the "fat" binary or just the Power version) and wants
2Mb to run, not too much!  TCL was designed as an extension language;
in particular it is quite convenient for interactive use.  Whatever
the merits of Perl (I've just spent a day reinstalling it simply to
run weblint, which is merit enough for me), it was't designed to be
so used.  In fact, raw Tcl/Tk has very useful editable text widgets,
so it doesn't take very much to make a useful extensible editor in
Tcl/Tk.  Come to that, wish on a PowerMac is tiny, and prefers 4M to
run, and claims to get by in 1M.

This leads to the obvious point that tkperl probably includes the
tk editing widget, so would make an excellent basis for a Perl Emacs.



Mon, 11 Sep 2000 03:00:00 GMT  
 Emacs extensions in Perl

Ira,

If you or someone thinks that Perl would be a good language for writing
a customizable extensible editor, then they should by all means go and
do so.  It doesn't have anything to do with Lisp or GNU Emacs; there's
nothing about the existance of those systems that are in anyone's way.
Merely complaining that Emacs is not written in Perl will not accomplish
anything, except to annoy Lisp programmers and waste your time and our time.

I don't think most of the existing GNU EMACS user community will be
very interested in a Perl EMACS, unless it also includes a compatibility
feature so that it can run the large body of GNU Emacs elisp packages.
Along those lines, someone's undergraduate thesis project was implementing
a GNU EMACS -> Scheme EMACS interpreter, with the test program being
the GNUS newsreader.  But I think that was just academic.


Quote:
> This is flame bait.  I've long lost count of the languages I know,
> and reckon there are only two languages with less aesthetic appeal
> than Perl:  InterCAL and TECO.

Yes, flame bait.  However -- and I don't know whether this was intentional
or not -- but I found this comment to be particularly ironic, since of
course EMACS was originally implemented in TECO.  Stallman wanted to
use Lisp originally, but the Lisp implementations of the day were not
powerful enough (lacking, for example, a string data type.)
Subsequent major EMACS implementations were done in Lisp.

Aesthetic is just a nearly meaningless fancy word indicating "I like it",
and I think there are plenty of TECO hackers who would find this aesthetic:

  !^R Goto Beginning:! !^R Go to beginning of buffer (leaving mark behind).
  With arg from 0 to 10, goes that many tenths of the file
  down from the beginning.  Just C-U as arg means go to end.!

   .:  F F "E J0 '             !* No arg => go to beginning.!
   FS ^R ARGP &6"E ZJ 0 '          !* Just ^U means go to end.!
    *Z/10J 0L .-BFS WINDOW          !* Else go to fractional position (in tenths).!

In any event, if Perl is so great for this task, then by all means
get to it, and let us all know when you want us to take a look at it.  
The proof is in the pudding.  

Meanwhile please go away and spare the bandwidth.  I'm getting tired
of seeing this thread on all Emacs and Lisp newsgroups and mailing lists.

Chris



Mon, 11 Sep 2000 03:00:00 GMT  
 Emacs extensions in Perl


+---------------
| If you or someone thinks that Perl would be a good language for writing a
| customizable extensible editor, then they should by all means go and do so.
+---------------

Actually, a nice framework already exists! See http://mongoose.bostic.com/vi/
for the latest "Nvi" ("new vi") which has (for more than a year now!) hooks
for both Tcl and Perl as extension languages. The Tcl/Tk example in the
distribution shows that you can put the extension language "in front of"
the editor (a la Emacs), not only write "macros" in it.  Although they
don't give an explicit example of doing the "Emacs style" with Perl, one
should be able to do it much the same way as the Tcl/Tk example.

So... To the original poster [not Stacy], I strongly suggest starting with
Nvi -- already a robust, good-performing editor -- as a base, so you can
spend more time on your "extensions" and less on getting a basic editor core
to work.

+---------------
| In any event, if Perl is so great for this task, then by all means
| get to it, and let us all know when you want us to take a look at it.  
| The proof is in the pudding.  
| Meanwhile please go away and spare the bandwidth.  I'm getting tired
| of seeing this thread on all Emacs and Lisp newsgroups and mailing lists.
+---------------

Indeed. Hopefully pointing them to Nvi will quieten things down.
(But I've always been an optimist...)

-Rob

p.s. The extension hooks in Nvi are not specific to Tcl or Perl. It looks
like one should easily be able to hook in any of the Schemes that use a
C-compatible GC as an Nvi extension language, too. "Film at 11..."

p.p.s.  Nvi-1.79 is the current version, and FWIW I've been using it
instead of "vi" as my main editor for over a year (though w/o using any
of the extension-language features... yet). Seems pretty stable.

-----

Silicon Graphics, Inc.          Phone: 650-933-1673 [New area code!]
2011 N. Shoreline Blvd.         FAX: 650-933-4392
Mountain View, CA  94043        PP-ASEL-IA



Tue, 12 Sep 2000 03:00:00 GMT  
 Emacs extensions in Perl



Quote:
> On the other hand I get warm fuzzies at the prospect of making Emacs
> extensions in Perl. I am no fan of Lisp (even though I studied AI, or perhaps
> because..), like Larry says, it has all the aesthetic appeal of toenail
> clippings in a bowl of porridge.

  Hmm, that's the best description of Perl I think I've
ever heard! Thanks! (Trying to start another Perl vs
Lisp flame war, are we?)

  Mike McDonald



Tue, 12 Sep 2000 03:00:00 GMT  
 Emacs extensions in Perl

(snip)

Quote:

> On the other hand I get warm fuzzies at the prospect of making Emacs
> extensions in Perl. I am no fan of Lisp (even though I studied AI, or perhaps
> because..), like Larry says, it has all the aesthetic appeal of toenail
> clippings in a bowl of porridge.

I have finally seen the light.  Thank you dear sir.

Perl is elegant.
Slavery is freedom.
Larry Wall is God.
--
*********************************************
Semi-encrypted email address: m_b_p_o_m_i_j_e_ a_t_ i_n_a_v_ d_o_t_
n_e_t_
All non-solicited commercial email will be billed $1,000.



Tue, 12 Sep 2000 03:00:00 GMT  
 Emacs extensions in Perl

\\\\[oddball character]
(perl is more handy than lisp)

(funcname (args)
 ;; do something with args
 (;; args not mangled to flat list ...)
 ;; (lisp is more handy than perl)
)

[compile] (lisp is more handy than perl)

It's just a question of task context.




Wed, 13 Sep 2000 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Posting: Survey of Tcl, Perl, Python, Emacs Lisp

2. GNU Emacs & (TCL||PERL)

3. Extension to Emacs Verilog-Mode ?

4. Help: GNU emacs Ada extensions

5. Ada LSE emacs extensions

6. Ada extensions for Emacs 19.25?

7. Emacs imenu and tcl extensions

8. TCL Extensions for EMACS?

9. file extension conflict between Perl and prolog

10. Looking for TCL port of Perl mp3Info extension

11. perl extension in tcl

12. Expect-like extension for perl?

 

 
Powered by phpBB® Forum Software