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


Groups > comp.lang.forth > #15527

Re: Forth as a polarising language

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!postnews2.euro.net!news.wanadoo.nl!not-for-mail
From mhx@iae.nl (Marcel Hendrix)
Subject Re: Forth as a polarising language
Newsgroups comp.lang.forth
Message-ID <94891995948435@frunobulax.edu> (permalink)
Date Sat, 8 Sep 2012 16:14:09 +0200
References <504b26cb$0$286$14726298@news.sunsite.dk>
X-Newsreader iForth 2.0 console (October 21, 2006)
Lines 44
Organization Wanadoo
NNTP-Posting-Date 08 Sep 2012 14:13:39 GMT
NNTP-Posting-Host s529d937f.adsl.wanadoo.nl
X-Trace 1347113619 dr2.euro.net 241 82.157.147.127:50358
X-Complaints-To abuse@wanadoo.nl
Xref csiph.com comp.lang.forth:15527

Show key headers only | View raw


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

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web