Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Extension Language for a Text Editor

Reply
Thread Tools

Extension Language for a Text Editor

 
 
Nikolai Weibull
Guest
Posts: n/a
 
      10-10-2003
* Brett H. Williams <> [Oct, 10 2003 23:00]:
> Here is the first problem that we found:
>
> def somemethod(something)
> return Array.new() unless @var.class == Array
> end

Aw great. Oh well, I guess I'll have to start debugging from the start
again. Thanks for finding this.
>
> The use of the .class method confuses the syntax. If you use the
> deprecated type() method, this problem goes away.

OK. Yeah, you're probably correct. I'll have to look at how to solve
this.
>
> If I notice anything else I'll be sure to provide feedback. If I can get
> to the point where a gg=G can be relied on as I used to rely on Emacs, I'll
> be extremely happy indeed.

I hope it will too . It does for the 1.6.8 version of tk.rb anyway.
That's a 3500 line file or similar and it indents it flawlessly and in
under 10 seconds on my computer,
nikolai

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

 
Reply With Quote
 
 
 
 
Joerg Fischer
Guest
Posts: n/a
 
      10-10-2003
* Nikolai Weibull wrote:
> * Charles Hixson <> [Oct, 10 2003 20:30]:
>> Not to discourage you, but have you looked at NEdit? It doesn't have a
>> full scripting language,


That's right. However nedit's macro language is very easy to learn
and does exactly what you need 99% of the time inside a text
editor. (Most folks like to get their job done quickly rather than
to program their editor.)

> Yes. And let me tell you, it's crap. Sorry, I don't want to heat up
> the discussion here, but in my eyes, NEdit just isn't very good. It's
> an attempt to bring Windows like editors to Unix.


This is wrong in any way. It is a GUI editor following the Unix
philosophy of doing one job (text editing) very well. Other task are
transfered to other specialized programs.
Windows programs tend to duplicate functionality. There are
virtually no editors on Windows w/o built-in file manager, ftp
client, diff tools, cvs tools (if it is an expensive one) and so on.

The top of this is emacs - add everything into a single application
and claim it would be a powerful *text editor*. IMO it isn't even a
good one .

> It has a lot of weird design decisions that I just don't like
> (and neither do many of the people I've spoken to about it at
> the Computer Technics (whatever that's really called in English)
> Department at Uni).


Oh, you just don't like it and that is why it is not good. I see.

> It's just not powerful enough. Vim _is_ powerful enough, but it
> still feels wrong somehow.


Interesting. Nedit has no hex editor and has no built-in folding.
It also requires an X server, where vim is a console editor. What
else do you believe you can do with vim but not with nedit?

Cheers,
Jörg

fup2 comp.editors

--
Niki -- The NEdit WiKi:
http://www.nr.no/~joachim/Niki/
 
Reply With Quote
 
 
 
 
Gavin Sinclair
Guest
Posts: n/a
 
      10-10-2003
On Saturday, October 11, 2003, 5:30:16 AM, Brett wrote:

> Thank you. I see matchit is working correctly as well--I was relying on
> Ned Konz's version to get this.


LOL. I included it, and I *still* can't get it to work. Mind you,
laziness has greatly overtaken impatience and hubris and even been
taken out of context now.

Cheers,
Gavin


 
Reply With Quote
 
Brett Williams
Guest
Posts: n/a
 
      10-11-2003

"Gavin Sinclair" <> wrote in message
news:...
> On Saturday, October 11, 2003, 5:30:16 AM, Brett wrote:
>
> > Thank you. I see matchit is working correctly as well--I was relying on
> > Ned Konz's version to get this.

>
> LOL. I included it, and I *still* can't get it to work. Mind you,
> laziness has greatly overtaken impatience and hubris and even been
> taken out of context now.


Hmmm... perhaps I just am not encountering whatever situation causes you
problems. What exactly doesn't work?



 
Reply With Quote
 
Mark Hurvitz
Guest
Posts: n/a
 
      10-14-2003
Nisus Writer for Classic (Mac OS 9) still supports the "graphic
editor" mentioned here. It's also available in our free version for
Classic (Nisus Writer 4.1.6), though version 6.5 has more graphic
"bubbles" to represent all of what can be typed in than does 4.1.6.

Nisus Writer Express (form Mac OS X) also uses a graphic editor (gui)
for its Find/Replace.

Check it out at:

<http://www.nisus.com>

`//rite On!
,\\ark Hurvitz
Vice President for Communications
Nisus Software Inc.
<http://www.nisus.com>


Charles Hixson <> wrote in message news:<>...
> Nikolai Weibull wrote:
>
> > ...
> >
> >>Well, to be blunt, whatever you come up with won't be as popular or
> >>useful as the existing regular expressions, just because they'll be a
> >>nonstandard replacement of something already very common. PCRE
> >>regexps are extremely flexible and well-known.
> >>
> >>

> >As useful? Please, my dear sir, there has to be something better than
> >the way we describe regular expressions now. At least for searching
> >text. The syntax we have today for regular expressions is basically the
> >same, only extended, as that that Ken Thompson uses in his 1968 paper on
> >it. Or that of _real_ regular expressions long before it. And
> >remember, real regular expressions only have * (Kleene star) and no +.
> >There has to be a simpler syntax that can be useful for interactive text
> >search-and-replaces. Look at Vim, Emacs, and Perl (and thus,
> >basically, Ruby)'s syntax. They are all extensions of this, adding new
> >short cryptic ways of saying things that you often don't need, and if
> >you did you wouldn't want to do it that way anyway. The real example of
> >how it has gotten out of hand is the overuse of backslash (\). It is
> >everywhere. having to move my hand to the upper right corner of my
> >keyboard all the time is a real pain.
> >Of course we'll have to see if I'm actually able to come up with
> >anything better. It's probably not going to be as easy as I'd like to
> >suggest here. However, look at the Perl 6 Apocalypse 5[1] to see one way
> >of moving away from cryptic (?:...) metasyntaxes.
> >
> >

> I've seen one (1) way of improving regexp's. It involved using graphic
> representations while creating them. After expression creation, it was
> rendered into text (and if you knew what you wanted, you could just type
> it in). I haven't seen any actual language improvements that weren't in
> some way isomorphic. (I.e., you can use pretty graphics for each of the
> inserted characters, and you might do something to make typing the
> escape character easier, but improving the semantics ... I haven't seen
> any better options. And improving the syntax... possibly if you switch
> to unicode...but then how do you enter it?
>
> >>That isn't to say people won't use them, ...
> >>
> >>

> >Nah OK. You've got a point. But, as with most free software, this
> >one's for me . If anyone wants to tag along later on, fine. But I
> >
> >

> So you won't be interested in the graphic editor. I've got a vague idea
> of how much additional work that would be. It was in a commercial
> product on the Mac, but I don't think it's being made any more. (Either
> Nisus or Qued/M ... probably Qued/M, but if it's Nisus, I seem to
> remember that the feature went away in a later version... too complex
> for many of their potential customers, perhaps.)
>
> >won't care if no one is interested, Emacs and Vim are fine editors.
> >Even notepad has its uses. It can, for example, tell you if a file is
> >smaller or greater than 65535 bytes very easily .
> >I have, perhaps, failed to describe the real winning here. (Alas, I
> >realize I forgot to mention it.) As you perhaps know, Vim, and most
> >other UNIX software, operate on a line-by-line basis. This restriction...
> >
> >--
> >::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
> >::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
> >::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
> >main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
> >
> >

> Not to discourage you, but have you looked at NEdit? It doesn't have a
> full scripting language, but it has some nice pattern recognition
> mechanisms. And it's GPL. (OTOH, I've never gotten their source to
> compile...they don't use a standard make system, but something of their
> own creation that seems to me to have problems.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cinema.Craft.Encoder.SP.v2.70.01.05, Magic.Bullet.Editor.v.1.01.for.Avid.Xpress.Pro, Magic.Bullet.Editor.v.1.01.for.Premiere.Pro, Magic.Bullet.Editor.v.1.01.for.Sony.Vegas, Avid.Xpress.Pro.HD.v5.0 1CD, Sony.Vegas.v5.0d, ola DVD Video 0 01-14-2005 10:53 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM
ANN: New low-cost XML Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio XML 0 08-03-2004 03:21 PM
I need a text editor written with text draw calls Mark Hahn Python 0 09-01-2003 04:57 PM
XML Editor WYSIWYG Word processor-like validating XML Editor ?! Hatem KNANI XML 2 08-04-2003 03:22 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57