Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #17001
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Is there a better way? |
| Date | 2012-11-02 19:21 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <k71kht$1to$1@dont-email.me> (permalink) |
| References | (5 earlier) <2012Nov2.183108@mips.complang.tuwien.ac.at> <7xehkb7vnx.fsf@ruckus.brouhaha.com> <2012Nov2.191217@mips.complang.tuwien.ac.at> <7xobjf97sp.fsf@ruckus.brouhaha.com> <1484723.8tIG7fdbSn@sunwukong.fritz.box> |
On 11/2/2012 7:15 PM, Bernd Paysan wrote:
> Paul Rubin wrote:
>
>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>> The other way would be to write STR= and STR<, just like there is D=
>>> and D< (and likewise, there is no F> F<= F>=, U<=, U>=, and U> is
>>> Core
>>> Ext). Forthers know how to use this kind of comparison.
>>
>> How would you defined STR<= in terms of STR= and STR< without having
>> to scan the string twice? F<= doesn't face that issue to the same
>> extent, since floats are fixed-size.
>
> : str> ( addr1 u1 addr2 u2 -- flag ) 2swap str< ;
> : str<= ( addr1 u1 addr2 u2 -- flag ) str> 0= ;
> : str>= ( addr1 u1 addr2 u2 -- flag ) str< 0= ;
>
> Should be obvious. You declare F<= the same way: FSWAP F< 0=.
>
> I would go for str= and str<= as implemented primitives, because for
> sorting, you want str<= ("already sorted"). Creating two-primitve
> composites for the other three cases is not such a big problem, and the
> two most performance critical parts have an easy interface.
I think you are missing his point. COMPARE gives you all this info. If
you want to do sorting you need to run more than one of these words.
His point about floats is that they are not expensive to scan more than
one. Strings can be much longer and more wasteful to scan a couple of
times.
Rick
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 04:58 -0700
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 05:22 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 05:44 -0700
Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-10-31 11:29 -0400
Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-10-31 11:40 -0400
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 08:45 -0700
Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-02 04:48 -0400
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-10-31 21:42 -0400
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-01 19:19 -0700
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 13:06 -0400
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-02 12:18 -0500
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 14:34 -0400
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 11:39 -0700
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 14:43 -0400
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 02:36 -0600
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-04 14:18 -0500
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-02 14:38 -0700
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 03:01 -0600
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-04 03:54 -0800
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 07:59 -0600
Re: Is there a better way? Elizabeth D Rather <erather@forth.com> - 2012-11-04 08:34 -1000
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 15:22 -0800
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-05 02:39 -0800
Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-05 14:01 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-05 10:39 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-05 21:07 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-06 20:57 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-06 21:43 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-07 03:52 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 19:55 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-07 20:46 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-08 10:39 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-12 03:48 -0600
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 07:57 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-12 19:50 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-12 19:49 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 15:00 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-13 00:50 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-13 00:58 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 23:17 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-13 13:44 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-13 13:53 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] Alex McDonald <blog@rivadpm.com> - 2012-11-13 06:39 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-13 18:02 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] Alex McDonald <blog@rivadpm.com> - 2012-11-13 12:10 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-15 16:59 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-13 07:55 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:34 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-14 05:01 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-14 16:11 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 09:36 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] humptydumpty <ouatubi@gmail.com> - 2012-11-14 12:19 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-13 10:20 -0600
Re: Words consuming arguments, was [Re: Is there a better way?] Brad Eckert <hwfwguy@gmail.com> - 2012-11-13 08:50 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:42 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-14 14:14 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-14 15:28 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-14 17:54 +0100
Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-14 15:01 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] Mark Wills <forthfreak@gmail.com> - 2012-11-15 00:08 -0800
Strings (was: Words consuming arguments) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-15 15:18 +0000
Re: Strings (was: Words consuming arguments) albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-15 16:36 +0000
Re: Strings (was: Words consuming arguments) "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 18:35 -0500
Re: Strings (was: Words consuming arguments) stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-16 00:36 +0000
Re: Strings (was: Words consuming arguments) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-16 17:42 +0000
Re: Strings (was: Words consuming arguments) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-16 17:55 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-17 04:18 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] Alex McDonald <blog@rivadpm.com> - 2012-11-17 04:56 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-17 07:24 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-19 15:58 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] Brad Eckert <hwfwguy@gmail.com> - 2012-11-20 08:17 -0800
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:30 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 09:06 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 06:18 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-13 04:26 -0600
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-14 06:29 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-14 06:03 -0600
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 07:15 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-15 11:51 -0600
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-15 18:44 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-16 03:50 -0600
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-15 08:09 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] "Elizabeth D. Rather" <erather@forth.com> - 2012-11-06 21:19 -1000
Re: Words consuming arguments, was [Re: Is there a better way?] "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 20:00 -0500
Re: Words consuming arguments, was [Re: Is there a better way?] stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-08 10:49 +0000
Re: Words consuming arguments, was [Re: Is there a better way?] albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-07 14:01 +0000
Re: Is there a better way? awegel@arcor.de (Alex Wegel) - 2012-11-04 11:07 +0100
Re: Is there a better way? awegel@arcor.de (Alex Wegel) - 2012-11-04 11:36 +0100
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-04 03:48 -0800
Re: Is there a better way? awegel@arcor.de (Alex Wegel) - 2012-11-04 13:31 +0100
Re: Is there a better way? Coos Haak <chforth@hccnet.nl> - 2012-11-04 13:29 +0100
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-04 04:42 -0800
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-04 02:38 -0600
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 10:20 -0400
Re: Is there a better way? humptydumpty <ouatubi@gmail.com> - 2012-10-31 05:53 -0700
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 09:23 -0400
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 06:41 -0700
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-10-31 11:46 -0500
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:27 -0700
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 14:32 -0700
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-10-31 16:15 -0700
Re: Is there a better way? Coos Haak <chforth@hccnet.nl> - 2012-10-31 22:49 +0100
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-10-31 17:13 -0500
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 23:39 -0700
Re: Is there a better way? "Elizabeth D. Rather" <erather@forth.com> - 2012-10-31 20:58 -1000
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-01 02:04 -0700
Re: Is there a better way? "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-10-31 19:13 -0400
Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-02 17:31 +0000
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 10:37 -0700
Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-02 18:12 +0000
Re: Is there a better way? "Elizabeth D. Rather" <erather@forth.com> - 2012-11-02 08:29 -1000
Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-05 14:53 +0000
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 11:30 -0700
Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 00:15 +0100
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 19:21 -0400
Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 00:42 +0100
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 20:21 -0400
Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 01:44 +0100
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-03 12:12 -0400
Re: Is there a better way? Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-03 18:24 +0100
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-03 14:00 -0400
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-03 10:29 -0700
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-02 18:42 -0700
Re: Is there a better way? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-05 11:45 +0000
Re: Is there a better way? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-01 21:00 +0000
Re: Is there a better way? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-10-31 15:26 +0000
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 12:22 -0400
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 15:07 -0700
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-10-31 19:16 -0400
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 06:31 -0700
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-11-01 10:34 -0400
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-11-01 10:48 -0400
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 08:55 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 08:49 -0700
Re: Is there a better way? Doug Hoffman <glidedog@gmail.com> - 2012-11-01 12:46 -0400
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-01 09:37 -0500
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-11-01 07:41 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-01 08:52 -0700
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-01 12:18 -0500
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-01 19:38 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-02 02:29 -0700
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 21:48 -0800
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-05 02:44 -0800
Re: Is there a better way? Graham NEWS <gray@forthman.plus.com> - 2012-11-01 15:52 +0000
Re: Is there a better way? Josh Grams <josh@qualdan.com> - 2012-11-03 16:38 +0000
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:26 -0700
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-01 13:42 -0400
Re: Is there a better way? Graham <""gray\"@forthman@plus.com"> - 2012-10-31 17:05 +0000
Re: Is there a better way? Peter Fälth <peter.falth@tin.it> - 2012-10-31 12:07 -0700
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 12:12 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:17 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 14:21 -0700
Re: Is there a better way? Pablo Hugo Reda <pabloreda@gmail.com> - 2012-10-31 14:50 -0700
Re: Is there a better way? Pablo Hugo Reda <pabloreda@gmail.com> - 2012-10-31 14:51 -0700
Re: Is there a better way? Paul Rubin <no.email@nospam.invalid> - 2012-10-31 14:57 -0700
Re: Is there a better way? Coos Haak <chforth@hccnet.nl> - 2012-10-31 23:47 +0100
Re: Is there a better way? mhx@iae.nl (Marcel Hendrix) - 2012-11-01 21:28 +0200
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-10-31 15:11 -0700
Re: Is there a better way? Pablo Hugo Reda <pabloreda@gmail.com> - 2012-10-31 15:44 -0700
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-01 13:55 -0400
Re: Is there a better way? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-10-31 16:10 -0700
Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 01:10 -0700
Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 01:18 -0700
Re: Is there a better way? Mark Wills <forthfreak@gmail.com> - 2012-11-02 01:58 -0700
Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 02:14 -0700
Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 02:16 -0700
Re: Is there a better way? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-02 06:16 -0500
Re: Is there a better way? Charles Mélice <charles.melice@gmail.com> - 2012-11-02 06:04 -0700
Re: Is there a better way? rickman <gnuarm@gmail.com> - 2012-11-02 13:13 -0400
csiph-web