Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #15259 > unrolled thread

Re: Article

Started byHugh Aguilar <hughaguilar96@yahoo.com>
First post2012-08-29 23:00 -0700
Last post2012-09-07 09:57 -0700
Articles 20 on this page of 126 — 29 participants

Back to article view | Back to comp.lang.forth

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-29 23:00 -0700
    Re: Article Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-30 01:47 -0700
      Re: Article anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-30 12:13 +0000
    Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-08-30 11:31 -0400
      Missing from USENET - was [Re: Article] Richard Owlett <rowlett@pcnetinc.com> - 2012-08-30 10:37 -0500
        Missing from USENET - was [Re: Article] Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-30 10:30 -0700
    Re: Article hughaguilar96@yahoo.com - 2012-08-30 19:56 -0700
      Re: Article awegel@arcor.de (Alex Wegel) - 2012-08-31 12:35 +0200
    Re: Article "Greg Bailey" <greg@greenarraychips.com> - 2012-08-31 17:51 -0700
      Re: Article Whammo <sidciavic@gmail.com> - 2012-08-31 18:22 -0700
      Re: Article Mark Wills <forthfreak@gmail.com> - 2012-09-01 01:04 -0700
        Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-02 16:18 -0700
      Re: Article Alex McDonald <blog@rivadpm.com> - 2012-09-01 01:48 -0700
      Re: Article rickman <gnuarm@gmail.com> - 2012-09-02 18:38 -0400
      Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-02 16:59 -0700
      Re: Article Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-09-03 13:07 -0500
        Re: Article Alex McDonald <blog@rivadpm.com> - 2012-09-03 14:25 -0700
        Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-04 17:04 -0700
          Re: Article Ron Aaron <rambamist@gmail.com> - 2012-09-05 06:23 +0300
      Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-03 18:17 -0400
        Re: Article "Elizabeth D. Rather" <erather@forth.com> - 2012-09-03 12:37 -1000
          Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-04 04:48 -0400
            Re: Article Alex McDonald <blog@rivadpm.com> - 2012-09-04 03:39 -0700
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 02:48 -0400
            Re: Article awegel@arcor.de (Alex Wegel) - 2012-09-04 13:18 +0200
              Re: Article Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-04 16:03 +0200
                Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 03:29 -0400
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 03:24 -0400
            Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-04 08:12 -0700
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 16:06 -0400
            Re: Article Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-09-04 11:35 -0500
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 02:40 -0400
                Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-05 13:28 -0700
            Re: Article "Elizabeth D. Rather" <erather@forth.com> - 2012-09-04 08:32 -1000
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 02:22 -0400
                Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-05 10:08 -0700
                  Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 16:07 -0400
                    Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-05 13:39 -0700
                Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-05 13:35 -0700
              Re: Article "Ed" <invalid@nospam.com> - 2012-09-07 17:24 +1000
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-07 05:28 -0400
                Re: Article Mark Wills <markrobertwills@yahoo.co.uk> - 2012-09-07 03:28 -0700
                Re: Article Ron Aaron <rambamist@gmail.com> - 2012-09-07 13:31 +0300
                  Re: Article jacko <jackokring@gmail.com> - 2012-09-07 06:33 -0700
                    Re: Article Howerd <howerdo@yahoo.co.uk> - 2012-09-07 09:06 -0700
                Re: Article Howerd <howerdo@yahoo.co.uk> - 2012-09-07 09:03 -0700
          Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-04 16:45 -0700
        Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-03 21:38 -0700
          Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 02:51 -0400
            Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-05 10:49 -0700
              Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 16:20 -0400
          Re: Article "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-09-05 16:06 -0400
            Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-05 13:32 -0700
              Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-05 13:50 -0700
                Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-05 22:34 -0700
                  Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-07 14:05 -0700
                    Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-08 01:53 +0200
                      Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-07 18:22 -0700
                        Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-09 00:08 +0200
                          Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-08 17:34 -0700
                            Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-09 15:57 +0200
                              Re: Forth as a polarising language Mark Wills <markrobertwills@yahoo.co.uk> - 2012-09-09 08:12 -0700
                                Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-09 22:07 +0200
                              Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-09 15:14 -0700
                                Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-10 01:52 +0200
                                  Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-09 19:17 -0700
                                    Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-10 15:01 +0200
                                      Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-10 07:00 -0700
                                        Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-11 01:07 +0200
                                          Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-10 18:47 -0700
                                            Re: Forth as a polarising language Elizabeth D Rather <erather@forth.com> - 2012-09-10 16:08 -1000
                                            Re: Forth as a polarising language anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-09-11 07:51 +0000
                                              Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-11 19:24 +0200
                                              Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-11 21:40 +0200
                            Re: Forth as a polarising language "Elizabeth D. Rather" <erather@forth.com> - 2012-09-09 14:58 -1000
                              Re: Forth as a polarising language Paul Rubin <no.email@nospam.invalid> - 2012-09-09 18:24 -0700
                        Re: Forth as a polarising language Anonymous <nobody@remailer.paranoici.org> - 2012-09-09 13:42 +0000
                      Re: Forth as a polarising language mhx@iae.nl (Marcel Hendrix) - 2012-09-08 10:34 +0200
                        Re: Forth as a polarising language Doug Hoffman <glidedog@gmail.com> - 2012-09-08 07:06 -0400
                          Re: Forth as a polarising language mhx@iae.nl (Marcel Hendrix) - 2012-09-08 16:14 +0200
                            DEFER (was: Forth as a polarising language) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-09-08 16:47 +0000
                            Re: Forth as a polarising language Doug Hoffman <glidedog@gmail.com> - 2012-09-09 04:22 -0400
                        OOP (was: Forth as a polarising language) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-09-08 11:38 +0000
                          Re: OOP Doug Hoffman <glidedog@gmail.com> - 2012-09-08 08:19 -0400
                            Re: OOP mhx@iae.nl (Marcel Hendrix) - 2012-09-08 16:41 +0200
                              Re: OOP Doug Hoffman <glidedog@gmail.com> - 2012-09-09 04:24 -0400
                                Re: Forth as a polarising language mhx@iae.nl (Marcel Hendrix) - 2012-09-09 12:03 +0200
                                  Re: Forth as a polarising language "A. K." <akk@nospam.org> - 2012-09-09 13:20 +0200
                                  Re: Forth as a polarising language Doug Hoffman <glidedog@gmail.com> - 2012-09-10 08:33 -0400
                            Re: OOP mhx@iae.nl (Marcel Hendrix) - 2012-09-08 16:54 +0200
                              Re: OOP Doug Hoffman <glidedog@gmail.com> - 2012-09-09 04:12 -0400
                          OOP (was: Forth as a polarising language) mhx@iae.nl (Marcel Hendrix) - 2012-09-08 16:28 +0200
                          Re: OOP (was: Forth as a polarising language) mhx@iae.nl (Marcel Hendrix) - 2012-09-08 16:56 +0200
                            Re: OOP (was: Forth as a polarising language) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-09-08 15:00 +0000
                          Re: OOP (was: Forth as a polarising language) Roger Ivie <rivie@ridgenet.net> - 2012-09-08 11:56 -0500
                            Re: OOP Doug Hoffman <glidedog@gmail.com> - 2012-09-09 04:20 -0400
                        Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-09 00:15 +0200
                        Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-09 00:50 +0200
                          Re: Forth as a polarising language mhx@iae.nl (Marcel Hendrix) - 2012-09-09 03:12 +0200
                            Re: Forth as a polarising language Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-09 16:01 +0200
                        Re: Forth as a polarising language "Elizabeth D. Rather" <erather@forth.com> - 2012-09-09 14:54 -1000
                          [OT] Newsreader problem - was [Re: Forth as a polarising language] Richard Owlett <rowlett@pcnetinc.com> - 2012-09-10 06:33 -0500
                            Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] Doug Hoffman <glidedog@gmail.com> - 2012-09-10 08:16 -0400
                              Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] Doug Hoffman <glidedog@gmail.com> - 2012-09-10 08:28 -0400
                              Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-09-10 12:43 +0000
                                Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] Doug Hoffman <glidedog@gmail.com> - 2012-09-10 09:24 -0400
                              Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] Richard Owlett <rowlett@pcnetinc.com> - 2012-09-10 08:12 -0500
                                Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] Doug Hoffman <glidedog@gmail.com> - 2012-09-10 09:32 -0400
                              Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] "Elizabeth D. Rather" <erather@forth.com> - 2012-09-10 07:40 -1000
                                Re: [OT] Newsreader problem - was [Re: Forth as a polarising language] Richard Owlett <rowlett@pcnetinc.com> - 2012-09-10 14:42 -0500
                          Re: Forth as a polarising language Doug Hoffman <glidedog@gmail.com> - 2012-09-10 07:59 -0400
                          Re: Forth as a polarising language rickman <gnuarm@gmail.com> - 2012-09-10 12:27 -0400
                            Re: Forth as a polarising language "Elizabeth D. Rather" <erather@forth.com> - 2012-09-10 07:44 -1000
                          Re: Forth as a polarising language rickman <gnuarm@gmail.com> - 2012-09-10 12:30 -0400
              Re: Article "Ed" <invalid@nospam.com> - 2012-09-09 14:13 +1000
                Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-11 11:26 -0700
                  Re: Article "Paul E. Bennett" <Paul_E.Bennett@topmail.co.uk> - 2012-09-11 21:02 +0100
                  Re: Article vandys@vsta.org - 2012-09-11 20:37 +0000
                  Re: Article "Ed" <invalid@nospam.com> - 2012-09-12 20:01 +1000
                Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-11 16:50 -0700
                  Re: Article Mark Wills <forthfreak@gmail.com> - 2012-09-12 00:45 -0700
                    Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-12 18:44 -0700
                    Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-12 20:26 -0700
                  Re: Article "Ed" <invalid@nospam.com> - 2012-09-12 20:47 +1000
      Re: Article Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-09-06 19:28 -0700
        Re: Article John Passaniti <john.passaniti@gmail.com> - 2012-09-07 09:57 -0700

Page 5 of 7 — ← Prev page 1 2 3 4 [5] 6 7  Next page →


#15534 — DEFER (was: Forth as a polarising language)

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2012-09-08 16:47 +0000
SubjectDEFER (was: Forth as a polarising language)
Message-ID<2012Sep8.184720@mips.complang.tuwien.ac.at>
In reply to#15527
mhx@iae.nl (Marcel Hendrix) writes:
>is DEFER standard already?

DEFER has been accepted into Forth200x a long time ago (with an IS
that can be implemented as a STATE-smart word, and a non-parsing
"DEFER!" for those cases where IS is inappropriate).

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2012: http://www.euroforth.org/ef12/

[toc] | [prev] | [next] | [standalone]


#15551 — Re: Forth as a polarising language

FromDoug Hoffman <glidedog@gmail.com>
Date2012-09-09 04:22 -0400
SubjectRe: Forth as a polarising language
Message-ID<504c51a7$0$286$14726298@news.sunsite.dk>
In reply to#15527
On 9/8/12 10:14 AM, Marcel Hendrix wrote:
> Doug Hoffman <glidedog@gmail.com> wrote Re: OOP packages
>
>> On 5/15/12 2:37 PM, Marcel Hendrix wrote:
>>> Doug Hoffman<glidedog@gmail.com>  writes Re: OOP packages
> [..]
>
>> try replacing the one DEFER word with a value, then change the two other
>> definitions affected (changes in UPPER CASE):
>
>> 0 VALUE allotocate
>> : makeobj  ( class -- o) pre-obj allotocate EXECUTE post-obj ;
>> : make ( xt -- o) TO allotocate ' >body state @
>>    if postpone literal postpone makeobj else makeobj then ;
>
>> This then compiled and ran fine for me on my version of iForth, no
>> extraneous stack items.
>
> Actually, only one change is necessary: iForth's compiled IS is
> written as [IS], like this:
>
> : make ( xt -- o) [is] allotocate ' >body state @
>     if postpone literal postpone makeobj else makeobj then ;
>
> The problem with the extra stack items was my test:
> it was based on insufficient understanding of your code. I should
> not have pasted the output of your posting verbatim.
>
> \ Original (wrong) test
> dict> var value x
> x .s init: \ ok
> cr x p: 5  \ ok
>
> \ New test
> dict> var value x
> x .s init: \ ok
> cr x p:    \ 5 ok
>
> Sorry about that.
>
> Conclusion: This OOP package works on all major Forths with only
> a single cosmetic (is DEFER standard already?) change.
>
> -marcel
>

Has there been a time warp?  This looks identical to a post you made a 
month or so ago to a different thread.

-Doug

[toc] | [prev] | [next] | [standalone]


#15523 — OOP (was: Forth as a polarising language)

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2012-09-08 11:38 +0000
SubjectOOP (was: Forth as a polarising language)
Message-ID<2012Sep8.133842@mips.complang.tuwien.ac.at>
In reply to#15521
mhx@iae.nl (Marcel Hendrix) writes:
>I have been interested in FOOP ever since Dick Pountain wrote his 
>BYTE articles (30 years ago?). However, in all that time I have 
>*never* seen an interesting Forth program that uses (needed to use) 
>OOP.

Gray uses OOP (a pretty simple one, a predecessor to mini-OOF) and you
seemed to find it interesting.

Bernd Paysan has Minos for his BerndOOF.

But yes, for most stuff that I did, objects did not look useful, so I
used OOP rarely, and if I did, it's something very simple.  Maybe
vmgen and libcc would have profited from OOP if I had used it.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2012: http://www.euroforth.org/ef12/

[toc] | [prev] | [next] | [standalone]


#15525 — Re: OOP

FromDoug Hoffman <glidedog@gmail.com>
Date2012-09-08 08:19 -0400
SubjectRe: OOP
Message-ID<504b37d4$0$294$14726298@news.sunsite.dk>
In reply to#15523
On 9/8/12 7:38 AM, Anton Ertl wrote:

> But yes, for most stuff that I did, objects did not look useful, so I
> used OOP rarely, and if I did, it's something very simple.

Years ago I wrote a spreadsheet-like data input class.  It had rows and 
columns and horizontal and vertical scrolling.  The data (text) was 
edited directly "in the spreadsheet cell" exactly as can be done with a 
good spreadsheet like Excel.  The object code (Mops) was non-trivial and 
included 2-dimensional text array objects, scrollbar objects, font 
objects, blinking caret objects (which of course were subclasses of line 
objects), string objects, rectangle objects, and many more object types. 
  As many of these "editList" objects as desired could of course be 
placed in a single window, each list could have its own cell width, 
font, real-time data input filtering algorithm, and so on.  I would not 
want to try to reproduce that code without OOP.

-Doug

[toc] | [prev] | [next] | [standalone]


#15529 — Re: OOP

Frommhx@iae.nl (Marcel Hendrix)
Date2012-09-08 16:41 +0200
SubjectRe: OOP
Message-ID<84621995948435@frunobulax.edu>
In reply to#15525
Doug Hoffman <glidedog@gmail.com> wrote Re: OOP packages

> On 5/15/12 2:37 PM, Marcel Hendrix wrote:
>> Doug Hoffman<glidedog@gmail.com>  writes Re: OOP packages
[..]

> try replacing the one DEFER word with a value, then change the two other 
> definitions affected (changes in UPPER CASE):

> 0 VALUE allotocate
> : makeobj  ( class -- o) pre-obj allotocate EXECUTE post-obj ;
> : make ( xt -- o) TO allotocate ' >body state @
>   if postpone literal postpone makeobj else makeobj then ;

> This then compiled and ran fine for me on my version of iForth, no 
> extraneous stack items.

Actually, only one change is necessary: iForth's compiled IS is
written as [IS], like this:

: make ( xt -- o) [is] allotocate ' >body state @
   if postpone literal postpone makeobj else makeobj then ;

The problem with the extra stack items was my test: 
it was based on insufficient understanding of your code. I should
not have pasted the output of your posting verbatim. 

\ Original (wrong) test
dict> var value x
x .s init: \ ok
cr x p: 5  \ ok

\ New test
dict> var value x
x .s init: \ ok
cr x p:    \ 5 ok

Sorry about that.

Conclusion: This OOP package works on all major Forths with only 
a single cosmetic (is DEFER standard already?) change.

-marcel

[toc] | [prev] | [next] | [standalone]


#15552 — Re: OOP

FromDoug Hoffman <glidedog@gmail.com>
Date2012-09-09 04:24 -0400
SubjectRe: OOP
Message-ID<504c5232$0$286$14726298@news.sunsite.dk>
In reply to#15529
On 9/8/12 10:41 AM, Marcel Hendrix wrote:
> Doug Hoffman <glidedog@gmail.com> wrote Re: OOP packages
>
>> On 5/15/12 2:37 PM, Marcel Hendrix wrote:
>>> Doug Hoffman<glidedog@gmail.com>  writes Re: OOP packages
> [..]
>
>> try replacing the one DEFER word with a value, then change the two other
>> definitions affected (changes in UPPER CASE):
>
>> 0 VALUE allotocate
>> : makeobj  ( class -- o) pre-obj allotocate EXECUTE post-obj ;
>> : make ( xt -- o) TO allotocate ' >body state @
>>    if postpone literal postpone makeobj else makeobj then ;
>
>> This then compiled and ran fine for me on my version of iForth, no
>> extraneous stack items.
>
> Actually, only one change is necessary: iForth's compiled IS is
> written as [IS], like this:
>
> : make ( xt -- o) [is] allotocate ' >body state @
>     if postpone literal postpone makeobj else makeobj then ;
>
> The problem with the extra stack items was my test:
> it was based on insufficient understanding of your code. I should
> not have pasted the output of your posting verbatim.
>
> \ Original (wrong) test
> dict> var value x
> x .s init: \ ok
> cr x p: 5  \ ok
>
> \ New test
> dict> var value x
> x .s init: \ ok
> cr x p:    \ 5 ok
>
> Sorry about that.
>
> Conclusion: This OOP package works on all major Forths with only
> a single cosmetic (is DEFER standard already?) change.
>
> -marcel
>

Another time warp?  Note date of 5/15/12 for this thread.  Or is my 
newsgroup reader having problems?

-Doug

[toc] | [prev] | [next] | [standalone]


#15553 — Re: Forth as a polarising language

Frommhx@iae.nl (Marcel Hendrix)
Date2012-09-09 12:03 +0200
SubjectRe: Forth as a polarising language
Message-ID<84009194948435@frunobulax.edu>
In reply to#15552
Doug Hoffman <glidedog@gmail.com> writes Re: Forth as a polarising language

> On 9/8/12 10:14 AM, Marcel Hendrix wrote:
>> Doug Hoffman <glidedog@gmail.com> wrote Re: OOP packages
>>
[..]
> Has there been a time warp?  This looks identical to a post you made a 
> month or so ago to a different thread.
[..]
> Another time warp?  Note date of 5/15/12 for this thread.  Or is my 
> newsgroup reader having problems?

Wrong directory in my newsreader, sorry. These usenet messages 
were cancelled from within the Google interface about 1 minute 
after they appeared there. I could have sent an offical
CANCEL message but from past experience Google does that, too. 
Old-timers with real news-readers will probably see the 
postings anyway.

-marcel

PS: I prepared a long reply to your posting with Pountain quotes. It
got lost in the same 'accident,' and I don't have the time to rewrite
it. However, my conclusion was that we agree a lot more than you seem
to think.

PPS: 'Embarassingly object-oriented', is not meant negatively. For 
some problems (i.e GUI/Windows) OOP is the obvious choice. 

[toc] | [prev] | [next] | [standalone]


#15554 — Re: Forth as a polarising language

From"A. K." <akk@nospam.org>
Date2012-09-09 13:20 +0200
SubjectRe: Forth as a polarising language
Message-ID<504c7b78$0$6561$9b4e6d93@newsspool4.arcor-online.net>
In reply to#15553
On 09.09.2012 12:03, Marcel Hendrix wrote:
> Doug Hoffman <glidedog@gmail.com> writes Re: Forth as a polarising language
>
>> On 9/8/12 10:14 AM, Marcel Hendrix wrote:
>>> Doug Hoffman <glidedog@gmail.com> wrote Re: OOP packages
>>>
> [..]
>> Has there been a time warp?  This looks identical to a post you made a
>> month or so ago to a different thread.
> [..]
>> Another time warp?  Note date of 5/15/12 for this thread.  Or is my
>> newsgroup reader having problems?
>
> Wrong directory in my newsreader, sorry. These usenet messages
> were cancelled from within the Google interface about 1 minute
> after they appeared there. I could have sent an offical
> CANCEL message but from past experience Google does that, too.
> Old-timers with real news-readers will probably see the
> postings anyway.
>
> -marcel
>
> PS: I prepared a long reply to your posting with Pountain quotes. It
> got lost in the same 'accident,' and I don't have the time to rewrite
> it. However, my conclusion was that we agree a lot more than you seem
> to think.
>
> PPS: 'Embarassingly object-oriented', is not meant negatively. For
> some problems (i.e GUI/Windows) OOP is the obvious choice.
>
>

Forth has its niche and excels in it, but the niche is really not being 
a programming tool for desktops and servers. So isn't OOP in Forth.
( I can't wait for the standard Minos reply, yawn  ;-) )

BTW recently I played around with Go and found it quite "productive", 
better than Python IMHO.

But no, I won't compare it with Forth. But yes, it has some good 
aspects, obviously based on heavily using late-binding techniques 
internally. But that's not important. The Go makers also made some good 
design choices for the syntax.

Alas modern compiler syntax (and the internal compiler workings behind 
of course) plays no role in the Forth ecosphere. Instead "people" like 
to add new words to the already fat word zoo, or it's just as always: 
"roll your own, mate".

[toc] | [prev] | [next] | [standalone]


#15574 — Re: Forth as a polarising language

FromDoug Hoffman <glidedog@gmail.com>
Date2012-09-10 08:33 -0400
SubjectRe: Forth as a polarising language
Message-ID<504dde18$0$282$14726298@news.sunsite.dk>
In reply to#15553
On 9/9/12 6:03 AM, Marcel Hendrix wrote:

> PS: I prepared a long reply to your posting with Pountain quotes. It
> got lost in the same 'accident,' and I don't have the time to rewrite
> it.

Understood.  Don't bother with a rewrite, I get the idea.

> However, my conclusion was that we agree a lot more than you seem
> to think.

OK.  Then I have changed my thinking.  Didn't mean to "talk down" in my 
post.  Just trying to be complete in conveying my thoughts.

-Doug

[toc] | [prev] | [next] | [standalone]


#15530 — Re: OOP

Frommhx@iae.nl (Marcel Hendrix)
Date2012-09-08 16:54 +0200
SubjectRe: OOP
Message-ID<80811995948435@frunobulax.edu>
In reply to#15525
Doug Hoffman <glidedog@gmail.com> writes Re: OOP

> On 9/8/12 7:38 AM, Anton Ertl wrote:

>> But yes, for most stuff that I did, objects did not look useful, so I
>> used OOP rarely, and if I did, it's something very simple.

> Years ago I wrote a spreadsheet-like data input class.  It had rows and 
> columns and horizontal and vertical scrolling.  The data (text) was 
> edited directly "in the spreadsheet cell" exactly as can be done with a 
> good spreadsheet like Excel.  The object code (Mops) was non-trivial and 
> included 2-dimensional text array objects, scrollbar objects, font 
> objects, blinking caret objects (which of course were subclasses of line 
> objects), string objects, rectangle objects, and many more object types. 
>  As many of these "editList" objects as desired could of course be 
> placed in a single window, each list could have its own cell width, 
> font, real-time data input filtering algorithm, and so on.  I would not 
> want to try to reproduce that code without OOP.

'Embarassingly object-oriented', but nevertheless, it would make a 
very good example.

How do yo manage the complex hierarchy of objects? I mean, say you want 
to add graphical objects to a cell, and such objects can be plots 
where you need the user to enter and format texts to be used as labels 
along the axes?

-marcel

[toc] | [prev] | [next] | [standalone]


#15549 — Re: OOP

FromDoug Hoffman <glidedog@gmail.com>
Date2012-09-09 04:12 -0400
SubjectRe: OOP
Message-ID<504c4f57$0$286$14726298@news.sunsite.dk>
In reply to#15530
On 9/8/12 10:54 AM, Marcel Hendrix wrote:
> Doug Hoffman <glidedog@gmail.com> writes Re: OOP

>> Years ago I wrote a spreadsheet-like data input class.  It had rows and
>> columns and horizontal and vertical scrolling.  The data (text) was
>> edited directly "in the spreadsheet cell" exactly as can be done with a
>> good spreadsheet like Excel.  The object code (Mops) was non-trivial and
>> included 2-dimensional text array objects, scrollbar objects, font
>> objects, blinking caret objects (which of course were subclasses of line
>> objects), string objects, rectangle objects, and many more object types.
>>   As many of these "editList" objects as desired could of course be
>> placed in a single window, each list could have its own cell width,
>> font, real-time data input filtering algorithm, and so on.  I would not
>> want to try to reproduce that code without OOP.
>
> 'Embarassingly object-oriented', but nevertheless, it would make a
> very good example.

It's only embarrassing when used inappropriately.

> How do yo manage the complex hierarchy of objects?

There isn't always a deep (complex) hierarchy when using class-based 
objects.  An object is often used as an instance variable, for example, 
in another class - no hierarchical relationship.  In other words, just 
because a lot of different classes are used to make up a single class 
doesn't mean that all those classes must be related to each other via a 
hierarchy.

Probably the most complex hierarchy used was for the blinking caret used 
for text editing (the typical blinking vertical line).  Caret is a 
subclass of line, line a subclass pen (line has two point instance 
variables), and finally pen a subclass of object (pen has width, height, 
and pattern instance variables).

It helps to be able to "browse" your code, which really isn't much 
different than browsing non-oop code, IMO.  My practice is to place the 
source code for each class in just one file.  Using a multi-window text 
editor that can summon definitions via option-click or whatever helps a 
lot.  I also use an editor that displays all methods of a class 
(alpha-sorted) in a popup.  A pick from the popup takes you to that method.

> I mean, say you want
> to add graphical objects to a cell, and such objects can be plots
> where you need the user to enter and format texts to be used as labels
> along the axes?

I would not call that a complex hierarchy.  I would call it a somewhat 
complex object.  To your question:  I would first design a plot object 
with axes and labels and so forth.  This would be done completely 
independently of the existing spreadsheet-like data input code.

Lastly I would look for the method in the "spreadsheet" object that 
draws the contents of a cell.  Replace drawing the textual data with 
drawing the graphical plot.  One would switch the array of text to be an 
array of anonymous objects.  It wouldn't be quite that simple because 
likely the size of the plot would exceed the size of the spreadsheet 
cell and the existing "spreadsheet" code isn't set up to auto-expand for 
such cases.  A kludge could be to draw the plot in a separate area of 
the window.

No doubt someone will point out that all of this could be done without 
objects which is true.  One could use structs and switch "active object" 
pointers in variables to point to different structs to simulate multiple 
objects of the same class.  But I would find that cumbersome and prone 
to error due to lack of data/method encapsulation (protection).  Objects 
work well when you want multiple copies of the same entities but with 
differing data in each entity.  Objects also work well if you have also 
already designed classes (strings, lines, pens) that can be easily 
re-used to form a solution to a new problem.  For example I often see 
recurring discussion about the problems with strings in Forth because 
the destination has to be large enough to handle the result of the 
string operation (insert, concat, etc.).  I quit worrying about this 
decades ago by using string objects that automatically resize if in the 
heap or throw an error when not enough room if in the dictionary (any 
decent string package should do the same I would guess).

-Doug



[toc] | [prev] | [next] | [standalone]


#15528 — OOP (was: Forth as a polarising language)

Frommhx@iae.nl (Marcel Hendrix)
Date2012-09-08 16:28 +0200
SubjectOOP (was: Forth as a polarising language)
Message-ID<80071995948435@frunobulax.edu>
In reply to#15523
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: continue equivalent in Forth?

> mhx@iae.nl (Marcel Hendrix) writes:
[..]
> My question about SECURE was actually meant as follows: If SECURE is
> on, iForth apparently does not accept some Forth-94-compliant control
> structures.  What does it offer that is worth that cost?

For that cost, you can compile code that other Forths won't.

Of course, it would be better to have gForth-like diagnostics with a
SECURE flag to disable them for exceptional cases. Maybe for the next 
redesign -- after my retirement, or when iForth goes open-source :-)

> BTW, your posting would have been easier to read if your newsreader
> also put quote characters in front of cited empty lines.

You actually notice uncited empted lines between all the 
quoted-printable crap that has become the standard lately?

-marcel

[toc] | [prev] | [next] | [standalone]


#15531 — Re: OOP (was: Forth as a polarising language)

Frommhx@iae.nl (Marcel Hendrix)
Date2012-09-08 16:56 +0200
SubjectRe: OOP (was: Forth as a polarising language)
Message-ID<04791995948435@frunobulax.edu>
In reply to#15523
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: OOP (was: Forth as a polarising language)

> mhx@iae.nl (Marcel Hendrix) writes:
>>I have been interested in FOOP ever since Dick Pountain wrote his 
>>BYTE articles (30 years ago?). However, in all that time I have 
>>*never* seen an interesting Forth program that uses (needed to use) 
>>OOP.

>Gray uses OOP (a pretty simple one, a predecessor to mini-OOF) and you
>seemed to find it interesting.

I still think its interesting, but I have to admit I have never 
thought about it as 'object-oriented' but always as 
'extremely Forth-like'.  Maybe even a little bit too Forth-like 
even, because Crenshaw's series of articles is a lot easier to 
understand and maintain :-)

> Bernd Paysan has Minos for his BerndOOF.

For user interface/GUI type problems object-orientation is 
beyond question and the time-and-tried solution. 

> But yes, for most stuff that I did, objects did not look useful, so I
> used OOP rarely, and if I did, it's something very simple.  Maybe
> vmgen and libcc would have profited from OOP if I had used it.

I suspect they would not. IMHO, complex, seldomly-used programs that 
contain expert knowledge should be as simple and straight-forward as 
possible.

-marcel

[toc] | [prev] | [next] | [standalone]


#15532 — Re: OOP (was: Forth as a polarising language)

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2012-09-08 15:00 +0000
SubjectRe: OOP (was: Forth as a polarising language)
Message-ID<2012Sep8.170001@mips.complang.tuwien.ac.at>
In reply to#15531
mhx@iae.nl (Marcel Hendrix) writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: OOP (was: Forth as a polarising language)
>
>> mhx@iae.nl (Marcel Hendrix) writes:
>>>I have been interested in FOOP ever since Dick Pountain wrote his 
>>>BYTE articles (30 years ago?). However, in all that time I have 
>>>*never* seen an interesting Forth program that uses (needed to use) 
>>>OOP.
>
>>Gray uses OOP (a pretty simple one, a predecessor to mini-OOF) and you
>>seemed to find it interesting.
>
>I still think its interesting, but I have to admit I have never 
>thought about it as 'object-oriented' but always as 
>'extremely Forth-like'.

The object-orientation is an implementation detail, not something
that's readily visible to the user.

>> But yes, for most stuff that I did, objects did not look useful, so I
>> used OOP rarely, and if I did, it's something very simple.  Maybe
>> vmgen and libcc would have profited from OOP if I had used it.
>
>I suspect they would not. IMHO, complex, seldomly-used programs that 
>contain expert knowledge should be as simple and straight-forward as 
>possible.

The reason why I think that objects might have been useful there is
because they both have a bunch of global variables that tend to get
saved and restored at around the same time.  Putting them in a struct
or object, having a pointer to them in a global (or a current-object
pointer), and just changin that might make them easier to maintain.
BerndOOF with its implicit current object pointer is designed for
that kind of legacy code.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2012: http://www.euroforth.org/ef12/

[toc] | [prev] | [next] | [standalone]


#15535 — Re: OOP (was: Forth as a polarising language)

FromRoger Ivie <rivie@ridgenet.net>
Date2012-09-08 11:56 -0500
SubjectRe: OOP (was: Forth as a polarising language)
Message-ID<slrnk4mu6i.eeq.rivie@stench.no.domain>
In reply to#15523
On 2012-09-08, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> mhx@iae.nl (Marcel Hendrix) writes:
>>I have been interested in FOOP ever since Dick Pountain wrote his 
>>BYTE articles (30 years ago?). However, in all that time I have 
>>*never* seen an interesting Forth program that uses (needed to use) 
>>OOP.
>
> Gray uses OOP (a pretty simple one, a predecessor to mini-OOF) and you
> seemed to find it interesting.
>
> Bernd Paysan has Minos for his BerndOOF.

There were two OOP Forths for MacOS, Yerk and Mops, that were popular at
one time. Presumably, folks wrote programs using them. I would guess
that some of them were interesting.

The compilers are available at www.forth.org/compilers.html, but these
days you'd probably be hard pressed to find a MacOS to run them. Last
time I fiddled with them, they were 68K compilers.
-- 
roger ivie
rivie@ridgenet.net

[toc] | [prev] | [next] | [standalone]


#15550 — Re: OOP

FromDoug Hoffman <glidedog@gmail.com>
Date2012-09-09 04:20 -0400
SubjectRe: OOP
Message-ID<504c512f$0$286$14726298@news.sunsite.dk>
In reply to#15535
On 9/8/12 12:56 PM, Roger Ivie wrote:

> There were two OOP Forths for MacOS, Yerk and Mops, that were popular at
> one time. Presumably, folks wrote programs using them. I would guess
> that some of them were interesting.
>
> The compilers are available at www.forth.org/compilers.html, but these
> days you'd probably be hard pressed to find a MacOS to run them. Last
> time I fiddled with them, they were 68K compilers.

Not for Mops.  Nao Sacrada has recently ported the complete PowerMops 
(PowerPC native by Michael Hore) to Mac OS Intel native.  It is now 
called iMops and is available at the old PPC location:

http://sourceforge.net/projects/powermops/files/

You are right that there is a 68k version of Mops, but it was ported to 
the Mac OS PPC native a long time ago (15 years?).

-Doug

[toc] | [prev] | [next] | [standalone]


#15540 — Re: Forth as a polarising language

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-09-09 00:15 +0200
SubjectRe: Forth as a polarising language
Message-ID<1533156.Ohti0OGcJx@sunwukong.fritz.box>
In reply to#15521
Marcel Hendrix wrote:
>>                      And the fact is that most of them are rather
>> rudimentary, even though the authors don't want to acknowledge.
> 
> As you are the author of, IIRC, 2 or 3 of these 20 OOP extensions,
> your last remark is the perfect Blub illustration :-)

Hm, at least I would acknowledge that mini-oof is quite a bit cumbersome 
to use with its explicit on-stack object pointer for everything.

> I have been interested in FOOP ever since Dick Pountain wrote his
> BYTE articles (30 years ago?). However, in all that time I have
> *never* seen an interesting Forth program that uses (needed to use)
> OOP. All we get is the same old trivial examples.

MINOS is clearly not in that "same old trivial example" ballpark.  
Probably your Blub.  But you said in another post that this is proven 
and perfect to do UI stuff in OO.  Maybe you consider UIs as something 
not worth doing?

> At least your heap/heap1 code is easy to understand and interesting,
> but Mini-OOF results in a ridiculous 7..50 times slowdown.

Probably because you can't inline DOES> code.  Mini-OOF is not tuned for 
performance, it is too small to do that.  I've to run the Mini-OOF part 
with VFX to compare, VFX can inline DOES> code and should produce 
something reasonable.

> In my opinion the problem is not that FOOP creators think their
> particular version is the greatest thing since sliced bread, but that
> they are not able to convince others that this is indeed the
> case. At least not by example.

Indeed.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#15542 — Re: Forth as a polarising language

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-09-09 00:50 +0200
SubjectRe: Forth as a polarising language
Message-ID<2097404.2psJB3vpnK@sunwukong.fritz.box>
In reply to#15521
Marcel Hendrix wrote:
> At least your heap/heap1 code is easy to understand and interesting,
> but Mini-OOF results in a ridiculous 7..50 times slowdown.

Ok, I did the same changes to heap.fs which make VFX happy, and here are 
the benchmark results with VFX:

     heap (mini-oof)        heap1
10 ins      11,617ns      7,323ns
10 del       7,421ns      5,064ns
256 ins     65,836ns     45,393ns
256 del    173,988ns    116,564ns
4k ins   1,052,728ns    462,301ns
4k del   3,781,767ns  2,640,110ns

The worst slowdown is for the 4k ins.

If you see 7..50 times slowdown, your compiler probably "sucks" or 
whatever the derogative word of the month is ;-).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#15547 — Re: Forth as a polarising language

Frommhx@iae.nl (Marcel Hendrix)
Date2012-09-09 03:12 +0200
SubjectRe: Forth as a polarising language
Message-ID<16910094948435@frunobulax.edu>
In reply to#15542
Bernd Paysan <bernd.paysan@gmx.de> writes Re: Forth as a polarising language

> Marcel Hendrix wrote:
> > At least your heap/heap1 code is easy to understand and interesting,
> > but Mini-OOF results in a ridiculous 7..50 times slowdown.

> Ok, I did the same changes to heap.fs which make VFX happy, and here are 
> the benchmark results with VFX:
[.. see below ..]

> The worst slowdown is for the 4k ins.

> If you see 7..50 times slowdown, your compiler probably "sucks" or 
> whatever the derogative word of the month is ;-).

No, I don't see that. In the earliest postings I showed the correct 
numbers, but the "7..50 times" come from (1) erroneously comparing 
the linear heap with the binary one, not from mini-OOF binary to 
normal binary, (2) from erratic timing / slow cache warming on 
Windows. Below I use the best of 3 runs results.

                    heap        heap1          heap     heap1
-----------------------------------------+-------------------
                    VFX          VFX     |    iForth   iForth
-----------------------------------------+-------------------
  10 inserts     11,617ns      7,323ns   |     13 us    11 us
  10 deletes      7,421ns      5,064ns   |      9 us     7 us
 256 inserts     65,836ns     45,393ns   |     53 us    26 us
 256 deletes    173,988ns    116,564ns   |    100 us    67 us
4096 inserts  1,052,728ns    462,301ns   |    527 us   282 us
4096 deletes  3,781,767ns  2,640,110ns   |  1,894 us 1,317 us

There is not much of a difference. iForth indeed inlines DOES> code.

-marcel

[toc] | [prev] | [next] | [standalone]


#15557 — Re: Forth as a polarising language

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-09-09 16:01 +0200
SubjectRe: Forth as a polarising language
Message-ID<1866645.yAHTatYJ47@sunwukong.fritz.box>
In reply to#15547
>> If you see 7..50 times slowdown, your compiler probably "sucks" or
>> whatever the derogative word of the month is ;-).
> 
> No, I don't see that. In the earliest postings I showed the correct
> numbers, but the "7..50 times" come from (1) erroneously comparing
> the linear heap with the binary one, not from mini-OOF binary to
> normal binary, (2) from erratic timing / slow cache warming on
> Windows. Below I use the best of 3 runs results.

Erratic timing is always a problem on current machines.  Best of 3 runs 
is a good counter-measure.

>                     heap        heap1          heap     heap1
> -----------------------------------------+-------------------
>                     VFX          VFX     |    iForth   iForth
> -----------------------------------------+-------------------
>   10 inserts     11,617ns      7,323ns   |     13 us    11 us
>   10 deletes      7,421ns      5,064ns   |      9 us     7 us
>  256 inserts     65,836ns     45,393ns   |     53 us    26 us
>  256 deletes    173,988ns    116,564ns   |    100 us    67 us
> 4096 inserts  1,052,728ns    462,301ns   |    527 us   282 us
> 4096 deletes  3,781,767ns  2,640,110ns   |  1,894 us 1,317 us
> 
> There is not much of a difference. iForth indeed inlines DOES> code.

I would have been surprised if not...

The price you are paying here is the price of flexibility: the heap.fs 
code can insert all sorts of objects into heaps, the heap1 code only 
integers (and needs rewriting for other objects).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


Page 5 of 7 — ← Prev page 1 2 3 4 [5] 6 7  Next page →

Back to top | Article view | comp.lang.forth


csiph-web