Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #12206 > unrolled thread
| Started by | quiet_lad <gavcomedy@gmail.com> |
|---|---|
| First post | 2012-05-15 23:27 -0700 |
| Last post | 2012-05-18 22:58 -0700 |
| Articles | 20 on this page of 158 — 33 participants |
Back to article view | Back to comp.lang.forth
I beleive that forth could supplant ruby and perl and python if it wanted to quiet_lad <gavcomedy@gmail.com> - 2012-05-15 23:27 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to marko <marko@marko.marko> - 2012-05-16 17:50 +1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-16 06:51 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to BruceMcF <agila61@netscape.net> - 2012-05-16 07:59 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Jason Damisch <jasondamisch@yahoo.com> - 2012-05-16 09:28 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-17 04:08 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Elizabeth D. Rather" <erather@forth.com> - 2012-05-16 22:22 -1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "A. K." <akk@nospam.org> - 2012-05-17 11:43 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-17 10:22 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "A. K." <akk@nospam.org> - 2012-05-17 17:03 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-18 01:15 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-17 19:19 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-18 12:40 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-18 00:17 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to vandys@vsta.org - 2012-05-17 16:02 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "A. K." <akk@nospam.org> - 2012-05-17 18:08 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to vandys@vsta.org - 2012-05-17 16:58 +0000
Re: I beleive that forth could supplant ruby and perl and python if it to Nomen Nescio <nobody@dizum.com> - 2012-05-17 19:03 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-17 12:27 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to vandys@vsta.org - 2012-05-17 18:52 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-17 18:18 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-18 01:39 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 04:50 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-18 04:40 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to humptydumpty <ouatubi@gmail.com> - 2012-05-18 15:15 +0300
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Elizabeth D. Rather" <erather@forth.com> - 2012-05-18 08:02 -1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-17 12:40 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-17 18:32 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 01:45 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-19 11:28 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Peter Knaggs" <pjk@bcs.org.uk> - 2012-05-17 21:38 +0100
Re: I beleive that forth could supplant ruby and perl and python if it wanted to vandys@vsta.org - 2012-05-17 21:17 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to stephenXXX@mpeforth.com (Stephen Pelc) - 2012-05-18 09:41 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 04:55 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to stephenXXX@mpeforth.com (Stephen Pelc) - 2012-05-18 13:50 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Mark Wills <markrobertwills@yahoo.co.uk> - 2012-05-18 03:24 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 06:10 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-18 08:10 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Mark Wills <forthfreak@gmail.com> - 2012-05-18 05:57 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Elizabeth D. Rather" <erather@forth.com> - 2012-05-18 08:14 -1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to John Passaniti <john.passaniti@gmail.com> - 2012-05-18 10:01 -0700
VFX code quality (was: I beleive that forth could supplant ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-18 12:58 +0000
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 09:43 -0500
Re: VFX code quality anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-19 10:54 +0000
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-19 11:43 -0500
Re: VFX code quality anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-22 08:26 +0000
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-22 03:52 -0500
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-22 04:02 -0500
Re: VFX code quality anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-22 09:25 +0000
Re: VFX code quality Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-30 23:39 +0200
Re: VFX code quality anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-31 15:07 +0000
Re: VFX code quality Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-31 20:24 +0200
Re: VFX code quality (was: I beleive that forth could supplant ...) stephenXXX@mpeforth.com (Stephen Pelc) - 2012-05-18 15:25 +0000
Re: VFX code quality (was: I beleive that forth could supplant ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-19 11:31 +0000
Re: VFX code quality (was: I beleive that forth could supplant ...) Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-20 17:41 +0200
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-20 12:49 -0500
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-20 11:43 -0700
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-20 14:01 -1000
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-20 19:10 -0700
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-20 17:05 -1000
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-20 20:38 -0700
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-20 21:37 -1000
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-21 01:27 -0700
Re: VFX code quality m.a.m.hendrix@tue.nl - 2012-05-21 01:52 -0700
Re: VFX code quality Ecki <ecki@intershop.de> - 2012-05-21 11:06 +0200
Re: VFX code quality mhx@iae.nl (Marcel Hendrix) - 2012-05-21 20:34 +0200
Re: VFX code quality Ecki <ecki@intershop.de> - 2012-05-22 08:54 +0200
Re: VFX code quality anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-21 14:36 +0000
Re: VFX code quality mhx@iae.nl (Marcel Hendrix) - 2012-05-21 20:33 +0200
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 04:29 -0500
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-21 08:39 -0700
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 15:22 -0500
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-22 12:47 -0700
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-22 11:25 -1000
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-23 03:19 -0500
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-24 22:51 -0700
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-24 23:16 -0700
Re: VFX code quality Fritz Wuehler <fritz@spamexpire-201205.rodent.frell.theremailer.net> - 2012-05-23 17:36 +0200
Re: VFX code quality Doug Hoffman <glidedog@gmail.com> - 2012-05-21 12:57 -0400
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-21 08:42 -1000
Re: VFX code quality Doug Hoffman <glidedog@gmail.com> - 2012-05-21 19:41 -0400
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-21 21:53 -0700
Re: VFX code quality Doug Hoffman <glidedog@gmail.com> - 2012-05-22 07:10 -0400
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-21 08:36 -1000
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-21 21:46 -0700
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-21 20:30 -1000
Re: VFX code quality David Kuehling <dvdkhlng@gmx.de> - 2012-05-22 14:06 +0200
Re: VFX code quality Doug Hoffman <glidedog@gmail.com> - 2012-05-22 08:59 -0400
FP locals (was: VFX code quality) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-22 13:39 +0000
Re: FP locals Doug Hoffman <glidedog@gmail.com> - 2012-05-22 14:03 -0400
Re: FP locals (was: VFX code quality) C G Montgomery <cgm@physics.utoledo.edu> - 2012-05-22 18:09 -0400
Re: FP locals (was: VFX code quality) Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-05-23 03:47 -0700
Re: FP locals (was: VFX code quality) "Ed" <invalid@nospam.com> - 2012-05-26 21:03 +1000
Re: FP locals (was: VFX code quality) Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-05-26 04:40 -0700
Re: FP locals (was: VFX code quality) mhx@iae.nl (Marcel Hendrix) - 2012-05-26 18:27 +0200
Re: FP locals (was: VFX code quality) Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-05-26 12:55 -0700
Re: FP locals (was: VFX code quality) BruceMcF <agila61@netscape.net> - 2012-05-26 14:54 -0700
Re: FP locals (was: VFX code quality) Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-05-26 22:02 -0700
Re: FP locals (was: VFX code quality) mhx@iae.nl (Marcel Hendrix) - 2012-05-27 08:50 +0200
Re: FP locals (was: VFX code quality) Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-05-27 05:26 -0700
Re: VFX code quality BruceMcF <agila61@netscape.net> - 2012-05-22 09:04 -0700
Re: VFX code quality "A. K." <akk@nospam.org> - 2012-05-21 09:55 +0200
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-21 01:22 -0700
Re: VFX code quality "A. K." <akk@nospam.org> - 2012-05-21 14:19 +0200
Re: VFX code quality Paul Rubin <no.email@nospam.invalid> - 2012-05-22 12:33 -0700
Re: VFX code quality "A. K." <akk@nospam.org> - 2012-05-22 23:14 +0200
Re: VFX code quality mhx@iae.nl (Marcel Hendrix) - 2012-05-21 20:31 +0200
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 15:17 -0500
Re: VFX code quality BruceMcF <agila61@netscape.net> - 2012-05-21 13:50 -0700
Re: VFX code quality BruceMcF <agila61@netscape.net> - 2012-05-21 16:47 -0700
Re: VFX code quality "Harry Vaderchi" <admin@127.0.0.1> - 2012-05-22 09:57 +0100
Re: VFX code quality BruceMcF <agila61@netscape.net> - 2012-05-22 04:39 -0700
Re: VFX code quality mhx@iae.nl (Marcel Hendrix) - 2012-05-23 20:25 +0200
Re: VFX code quality BruceMcF <agila61@netscape.net> - 2012-05-23 13:47 -0700
Re: VFX code quality humptydumpty <ouatubi@gmail.com> - 2012-05-21 20:23 +0000
Re: VFX code quality BruceMcF <agila61@netscape.net> - 2012-05-20 20:22 -0700
Re: VFX code quality Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-21 10:57 +0000
Re: VFX code quality Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-21 01:35 +0200
Re: VFX code quality Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-20 22:44 -0700
Re: VFX code quality Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-20 22:53 -0700
Re: VFX code quality Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 04:32 -0500
Re: VFX code quality "Elizabeth D. Rather" <erather@forth.com> - 2012-05-21 08:44 -1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-20 00:58 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to stephenXXX@mpeforth.com (Stephen Pelc) - 2012-05-20 15:09 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-18 07:20 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 10:22 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Rod Pemberton" <do_not_have@notemailntt.cmm> - 2012-05-18 22:09 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-19 04:20 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-19 13:19 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-17 18:33 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-18 01:49 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-18 07:59 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-18 10:32 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-20 17:24 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-20 15:43 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to BruceMcF <agila61@netscape.net> - 2012-05-20 16:03 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-20 16:34 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to BruceMcF <agila61@netscape.net> - 2012-05-20 17:02 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 04:46 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Paul Rubin <no.email@nospam.invalid> - 2012-05-21 08:33 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to BruceMcF <agila61@netscape.net> - 2012-05-21 12:10 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 04:40 -0500
address units (was: I beleive that forth could supplant ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-21 14:40 +0000
Re: address units Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-21 10:07 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-21 10:59 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-05-21 14:22 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Bernd Paysan <bernd.paysan@gmx.de> - 2012-05-18 00:43 +0200
Re: I beleive that forth could supplant ruby and perl and python if it wanted to vandys@vsta.org - 2012-05-17 23:10 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Doug Hoffman <glidedog@gmail.com> - 2012-05-17 19:24 -0400
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-05-17 18:38 -0500
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-05-17 22:30 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to BruceMcF <agila61@netscape.net> - 2012-05-17 10:59 -0700
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2012-05-20 13:14 +0100
Re: I beleive that forth could supplant ruby and perl and python if it wanted to marko <marko@marko.marko> - 2012-05-18 11:46 +1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to "Elizabeth D. Rather" <erather@forth.com> - 2012-05-17 20:10 -1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Arnold Doray <invalid@invalid.com> - 2012-05-18 10:32 +0000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to marko <marko@marko.marko> - 2012-05-18 21:27 +1000
Re: I beleive that forth could supplant ruby and perl and python if it wanted to Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-05-18 22:58 -0700
Page 4 of 8 — ← Prev page 1 2 3 [4] 5 6 7 8 Next page →
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-05-20 20:38 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <7x396uurso.fsf@ruckus.brouhaha.com> |
| In reply to | #12324 |
"Elizabeth D. Rather" <erather@forth.com> writes:
> We rarely use variables for a truly "temporary" result, that's what
> the data stack is for. User variables are allocated and managed
> conservatively.
Here's a simple arithmetic problem (multiplying complex numbers)
that I remember having trouble with:
: z* ( a b c d -- ac-bd bc+ad )
.... ;
I found it pretty complicated to do that without some form of temp
variables, even worse if all the data (args and return values) are
floating point numbers rather than ints. Any advice?
> I'm not even sure what a "leak" means in the Forth context.
It just means allocating storage for something repeatedly, without
bothering to free it, so the program's space usage keeps increasing. It
usually means the program has a bug, but it's tolerable in some
situations if the total amount of leakage is bounded to some acceptable
amount.
BruceMcF <agila61@netscape.net> writes:
> Though if you want a randomly accessible stack, you can always build
> one.
I thought the Forth machine model doesn't allow addressing the stack,
except with PICK, whose implementation is allowed to be horrendous.
Some Forth cpus (Chuck's) actually implement non-addressible stacks.
I'm not sure how to build an addressible stack even in a software Forth
that doesn't supply one, without hacking up the underlying interpreter.
Standard Forth has PICK but no obvious (maybe I'm missing something)
O(1) way to write to an arbitrary location in the stack.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2012-05-20 21:37 -1000 |
| Subject | Re: VFX code quality |
| Message-ID | <kNqdne6GPd8sbSTSnZ2dnUVZ_rGdnZ2d@supernews.com> |
| In reply to | #12326 |
On 5/20/12 5:38 PM, Paul Rubin wrote: > "Elizabeth D. Rather"<erather@forth.com> writes: >> We rarely use variables for a truly "temporary" result, that's what >> the data stack is for. User variables are allocated and managed >> conservatively. > > Here's a simple arithmetic problem (multiplying complex numbers) > that I remember having trouble with: > > : z* ( a b c d -- ac-bd bc+ad ) > .... ; I don't understand your stack comment (I'm no mathematician) , but I remember from years past working Chuck, who used complex numbers and defining operators like C* C- and C*/ (multiply complex by a ratio) as primitives. No temp variables; the primitives could use whatever registers were available. Of course, this was in the days before optimizing compilers, but it worked well. > I found it pretty complicated to do that without some form of temp > variables, even worse if all the data (args and return values) are > floating point numbers rather than ints. Any advice? > >> I'm not even sure what a "leak" means in the Forth context. > > It just means allocating storage for something repeatedly, without > bothering to free it, so the program's space usage keeps increasing. It > usually means the program has a bug, but it's tolerable in some > situations if the total amount of leakage is bounded to some acceptable > amount. Ok. My style is to allocate whatever storage you need for this program at the outset and use it, not repeatedly allocate and release (which I can certainly see could cause problems). Alternatively, use temporary space at PAD (which doesn't require any allocation or releasing). Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ==================================================
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-05-21 01:27 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <7xpq9yc516.fsf@ruckus.brouhaha.com> |
| In reply to | #12330 |
"Elizabeth D. Rather" <erather@forth.com> writes:
>> : z* ( a b c d -- ac-bd bc+ad )
>> .... ;
>
> I don't understand your stack comment (I'm no mathematician)
ac-bd just means a*c minus b*d. So the word takes 4 parameters a,b,c,d
representing the two complex numbers a+bi and c+di. It multiplies them
leaving the single complex number (ac-bd) + i*(bc+ad), as two
coefficients on the stack. It's trivial with locals:
: z* { a b c d -- x y }
a c * b d * - b c * a d * + ;
doing it without locals seems quite inconvenient. I think Chuck might
have used globals.
[toc] | [prev] | [next] | [standalone]
| From | m.a.m.hendrix@tue.nl |
|---|---|
| Date | 2012-05-21 01:52 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <31708004-b438-4469-966d-7d40897f14da@googlegroups.com> |
| In reply to | #12333 |
On Monday, May 21, 2012 10:27:49 AM UTC+2, Paul Rubin wrote:
> ac-bd just means a*c minus b*d. So the word takes 4 parameters a,b,c,d
> representing the two complex numbers a+bi and c+di. It multiplies them
> leaving the single complex number (ac-bd) + i*(bc+ad), as two
> coefficients on the stack. It's trivial with locals:
>
> : z* { a b c d -- x y }
> a c * b d * - b c * a d * + ;
>
> doing it without locals seems quite inconvenient. I think Chuck might
> have used globals.
Does this qualify as using locals?
: z* ( a b c d -- ac-bd bc+ad )
params| a b c d | a c * b d * - b c * a d * + ;
' z* idis
$012478C0 : [trashed]
$012478CA pop rbx
$012478CB pop rdi
$012478CC pop rax
$012478CD pop rdx
$012478CE mov r9, rdx
$012478D1 imul r9, rdi
$012478D5 mov r10, rax
$012478D8 imul r10, rbx
$012478DC sub r9, r10
$012478DF mov r10, rax
$012478E2 imul r10, rdi
$012478E6 mov r11, rdx
$012478E9 imul r11, rbx
$012478ED push r9
$012478EF lea rbx, [r10 r11*1] qword
$012478F3 push rbx
$012478F4 ;
These are indeed locals, unless I'd use SSE2.
: z* ( f: a b c d -- ac-bd bc+ad )
flocals| a b c d | a c f* b d f* f- b c f* a d f* f+ ;
see z*
Flags: ANSI
$01247940 : z*
$0124794A fpop,
$01247954 sub rsi, #16 b#
$01247958 fstp [rsi] tbyte
$0124795A fpop,
$01247964 sub rsi, #16 b#
$01247968 fstp [rsi] tbyte
$0124796A fpop,
$01247974 sub rsi, #16 b#
$01247978 fstp [rsi] tbyte
$0124797A fpop,
$01247984 sub rsi, #16 b#
$01247988 fstp [rsi] tbyte
$0124798A fld [rsi #48 +] tbyte
$0124798D fld [rsi #16 +] tbyte
$01247990 fmulp ST(1), ST
$01247992 fld [rsi #32 +] tbyte
$01247995 fld [rsi] tbyte
$01247997 fmulp ST(1), ST
$01247999 fsubp ST(1), ST
$0124799B fld [rsi #32 +] tbyte
$0124799E fld [rsi #16 +] tbyte
$012479A1 fmulp ST(1), ST
$012479A3 fld [rsi #48 +] tbyte
$012479A6 fld [rsi] tbyte
$012479A8 fmulp ST(1), ST
$012479AA faddp ST(1), ST
$012479AC lea r13, [r13 #-32 +] qword
$012479B0 fxch ST(2)
$012479B2 fstp [r13 #16 +] tbyte
$012479B6 fstp [r13 0 +] tbyte
$012479BA add rsi, #64 b#
$012479BE ;
-marcel
[toc] | [prev] | [next] | [standalone]
| From | Ecki <ecki@intershop.de> |
|---|---|
| Date | 2012-05-21 11:06 +0200 |
| Subject | Re: VFX code quality |
| Message-ID | <20120521110618.3402d558@tiger.support.j.intershop.de> |
| In reply to | #12334 |
Please correct me, but isn't the final + missed in the integer version: > : z* ( a b c d -- ac-bd bc+ad ) > params| a b c d | a c * b d * - b c * a d * + ; > > ' z* idis > > $012478C0 : [trashed] > $012478CA pop rbx > $012478CB pop rdi > $012478CC pop rax > $012478CD pop rdx > $012478CE mov r9, rdx > $012478D1 imul r9, rdi > $012478D5 mov r10, rax > $012478D8 imul r10, rbx > $012478DC sub r9, r10 > $012478DF mov r10, rax > $012478E2 imul r10, rdi > $012478E6 mov r11, rdx > $012478E9 imul r11, rbx > $012478ED push r9 > $012478EF lea rbx, [r10 r11*1] qword > $012478F3 push rbx > $012478F4 ; > > These are indeed locals, unless I'd use SSE2. while existing in the floating point version: > : z* ( f: a b c d -- ac-bd bc+ad ) > flocals| a b c d | a c f* b d f* f- b c f* a d f* f+ ; > see z* > Flags: ANSI > $01247940 : z* > $0124794A fpop, > $01247954 sub rsi, #16 b# > $01247958 fstp [rsi] tbyte > $0124795A fpop, > $01247964 sub rsi, #16 b# > $01247968 fstp [rsi] tbyte > $0124796A fpop, > $01247974 sub rsi, #16 b# > $01247978 fstp [rsi] tbyte > $0124797A fpop, > $01247984 sub rsi, #16 b# > $01247988 fstp [rsi] tbyte > $0124798A fld [rsi #48 +] tbyte > $0124798D fld [rsi #16 +] tbyte > $01247990 fmulp ST(1), ST > $01247992 fld [rsi #32 +] tbyte > $01247995 fld [rsi] tbyte > $01247997 fmulp ST(1), ST > $01247999 fsubp ST(1), ST > $0124799B fld [rsi #32 +] tbyte > $0124799E fld [rsi #16 +] tbyte > $012479A1 fmulp ST(1), ST > $012479A3 fld [rsi #48 +] tbyte > $012479A6 fld [rsi] tbyte > $012479A8 fmulp ST(1), ST > $012479AA faddp ST(1), ST > $012479AC lea r13, [r13 #-32 +] qword > $012479B0 fxch ST(2) > $012479B2 fstp [r13 #16 +] tbyte > $012479B6 fstp [r13 0 +] tbyte > $012479BA add rsi, #64 b# > $012479BE ;
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Date | 2012-05-21 20:34 +0200 |
| Subject | Re: VFX code quality |
| Message-ID | <96691514988435@frunobulax.edu> |
| In reply to | #12335 |
Ecki <ecki@intershop.de> writes Re: VFX code quality > Please correct me, but isn't the final + missed in the integer version: >> : z* ( a b c d -- ac-bd bc+ad ) >> params| a b c d | a c * b d * - b c * a d * + ; >> ' z* idis >> $012478C0 : [trashed] >> $012478CA pop rbx [..] >> $012478ED push r9 >> $012478EF lea rbx, [r10 r11*1] qword >> $012478F3 push rbx >> $012478F4 ; [..] The "lea rbx, [r10 r11*1] qword" performs the last addition (without changing flags). -marcel
[toc] | [prev] | [next] | [standalone]
| From | Ecki <ecki@intershop.de> |
|---|---|
| Date | 2012-05-22 08:54 +0200 |
| Subject | Re: VFX code quality |
| Message-ID | <20120522085451.40b2f66a@tiger.support.j.intershop.de> |
| In reply to | #12352 |
> > Please correct me, but isn't the final + missed in the integer > > version: > > >> : z* ( a b c d -- ac-bd bc+ad ) > >> params| a b c d | a c * b d * - b c * a d * + ; > > >> ' z* idis > > >> $012478C0 : [trashed] > >> $012478CA pop rbx > [..] > >> $012478ED push r9 > >> $012478EF lea rbx, [r10 r11*1] qword > >> $012478F3 push rbx > >> $012478F4 ; > [..] > > The "lea rbx, [r10 r11*1] qword" performs the last addition (without > changing flags). Arrgh -- I see, it's time to do some Assembler coding again... Thanks for pointing this out. E.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2012-05-21 14:36 +0000 |
| Subject | Re: VFX code quality |
| Message-ID | <2012May21.163657@mips.complang.tuwien.ac.at> |
| In reply to | #12334 |
m.a.m.hendrix@tue.nl writes:
>Does this qualify as using locals?
>
>: z* ( a b c d -- ac-bd bc+ad )
> params| a b c d | a c * b d * - b c * a d * + ;
Yes. And I notice that your locals-defining word has them in the
right order. Good.
>: z* ( f: a b c d -- ac-bd bc+ad )
> flocals| a b c d | a c f* b d f* f- b c f* a d f* f+ ;
You have "LOCALS| d c b a |", but "FLOCALS| a b c d |"?
- 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 2011: http://www.euroforth.org/ef11/
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Date | 2012-05-21 20:33 +0200 |
| Subject | Re: VFX code quality |
| Message-ID | <12701514988435@frunobulax.edu> |
| In reply to | #12344 |
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes Re: VFX code quality > m.a.m.hendrix@tue.nl writes: >> Does this qualify as using locals? [..] >> : z* ( f: a b c d -- ac-bd bc+ad ) >> flocals| a b c d | a c f* b d f* f- b c f* a d f* f+ ; > You have "LOCALS| d c b a |", but "FLOCALS| a b c d |"? No, the latter is a bug. -marcel
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2012-05-21 04:29 -0500 |
| Subject | Re: VFX code quality |
| Message-ID | <15OdnUnsqb9jlyfSnZ2dnUVZ_qadnZ2d@supernews.com> |
| In reply to | #12333 |
Paul Rubin <no.email@nospam.invalid> wrote:
> It's trivial with locals:
>
> : z* { a b c d -- x y }
> a c * b d * - b c * a d * + ;
>
> doing it without locals seems quite inconvenient. I think Chuck might
> have used globals.
No. As Elizabeth said, Chuck defined a primitive that used whatever
registers were available. This has always been the Forth way to do
it.
Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-05-21 08:39 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <7xvcjpilw1.fsf@ruckus.brouhaha.com> |
| In reply to | #12336 |
Andrew Haley <andrew29@littlepinkcloud.invalid> writes: > No. As Elizabeth said, Chuck defined a primitive that used whatever > registers were available. This has always been the Forth way to do it. Oh my. You mean a CODE word just to get around this issue. That was so far off my radar that it went past me. Thanks.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2012-05-21 15:22 -0500 |
| Subject | Re: VFX code quality |
| Message-ID | <dpudnaSjPIeGOSfSnZ2dnUVZ_vKdnZ2d@supernews.com> |
| In reply to | #12348 |
Paul Rubin <no.email@nospam.invalid> wrote: > Andrew Haley <andrew29@littlepinkcloud.invalid> writes: >> No. As Elizabeth said, Chuck defined a primitive that used whatever >> registers were available. This has always been the Forth way to do it. > > Oh my. You mean a CODE word just to get around this issue. That was so > far off my radar that it went past me. There never has been the slightest barrier to dropping into code for stuff like this; when I was doing Forth full-time I'd use asm whenever it was useful. It never is that much of a big deal to just recode primitives when porting. Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-05-22 12:47 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <7xmx509ewk.fsf@ruckus.brouhaha.com> |
| In reply to | #12358 |
Andrew Haley <andrew29@littlepinkcloud.invalid> writes: > There never has been the slightest barrier to dropping into code for > stuff like this; when I was doing Forth full-time I'd use asm whenever > it was useful. It never is that much of a big deal to just recode > primitives when porting. Thanks for that description-- it helped fill in my picture of what a Forth coder's day is like. Forth used that way seems more like a productivity tool for assembly language programmers, than an HLL in the conventional sense. I'm cool with that, and it is more convincing than the "replace Ruby and Python" picture, at least in low level contexts.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2012-05-22 11:25 -1000 |
| Subject | Re: VFX code quality |
| Message-ID | <DpCdnbZXZYWqmSHSnZ2dnUVZ_rednZ2d@supernews.com> |
| In reply to | #12392 |
On 5/22/12 9:47 AM, Paul Rubin wrote: > Andrew Haley<andrew29@littlepinkcloud.invalid> writes: >> There never has been the slightest barrier to dropping into code for >> stuff like this; when I was doing Forth full-time I'd use asm whenever >> it was useful. It never is that much of a big deal to just recode >> primitives when porting. > > Thanks for that description-- it helped fill in my picture of what a > Forth coder's day is like. Forth used that way seems more like a > productivity tool for assembly language programmers, than an HLL in the > conventional sense. I'm cool with that, and it is more convincing than > the "replace Ruby and Python" picture, at least in low level contexts. Forth works at many levels, from "bare metal" to high-level constructs that are developed to suit the platform and intended use: Windows Forths typically have high-level words to build and manage windows and other UI features, other programs I've worked on have words that perform FFTs and other complex procedures. But the difference is that these extremes (bare metal and high-level constructs) are application-oriented features, we don't attempt to standardize them into a one-size-fits-all language. Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ==================================================
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2012-05-23 03:19 -0500 |
| Subject | Re: VFX code quality |
| Message-ID | <NtGdnXOuLIQfACHSnZ2dnUVZ_q2dnZ2d@supernews.com> |
| In reply to | #12392 |
Paul Rubin <no.email@nospam.invalid> wrote: > Andrew Haley <andrew29@littlepinkcloud.invalid> writes: >> There never has been the slightest barrier to dropping into code for >> stuff like this; when I was doing Forth full-time I'd use asm whenever >> it was useful. It never is that much of a big deal to just recode >> primitives when porting. > > Thanks for that description-- it helped fill in my picture of what a > Forth coder's day is like. Forth used that way seems more like a > productivity tool for assembly language programmers, than an HLL in > the conventional sense. Eh? I don't think that follows from what I wrote. It's not as if asm coding takes a lot of the total time, just that it's occasionally very useful. Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-05-24 22:51 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <7xk400x0yh.fsf@ruckus.brouhaha.com> |
| In reply to | #12402 |
Andrew Haley <andrew29@littlepinkcloud.invalid> writes: >> more like a productivity tool for assembly language programmers, than >> an HLL in the conventional sense. > > Eh? I don't think that follows from what I wrote. It's not as if asm > coding takes a lot of the total time, just that it's occasionally very > useful. Yeah, I didn't mean the total asm time was that large, but rather that asm was used for more purposes than ultra-optimization or low level hardware access, something like the way extension languages or DSL's are used in other environments. Maybe that would have been a better description. Anyway, it demystified things a bit.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2012-05-24 23:16 -0700 |
| Subject | Re: VFX code quality |
| Message-ID | <7xzk8wn5t2.fsf@ruckus.brouhaha.com> |
| In reply to | #12441 |
Paul Rubin <no.email@nospam.invalid> writes: > asm was used for more purposes than ultra-optimization or low level > hardware access, something like the way extension languages or DSL's are > used in other environments. I mean the other way around--Forth is the DSL or extension language in that picture.
[toc] | [prev] | [next] | [standalone]
| From | Fritz Wuehler <fritz@spamexpire-201205.rodent.frell.theremailer.net> |
|---|---|
| Date | 2012-05-23 17:36 +0200 |
| Subject | Re: VFX code quality |
| Message-ID | <7cc626cd19bc22916f9e02007f99de6e@msgid.frell.theremailer.net> |
| In reply to | #12392 |
Paul Rubin <no.email@nospam.invalid> wrote: > Andrew Haley <andrew29@littlepinkcloud.invalid> writes: > > There never has been the slightest barrier to dropping into code for > > stuff like this; when I was doing Forth full-time I'd use asm whenever > > it was useful. It never is that much of a big deal to just recode > > primitives when porting. > > Thanks for that description-- it helped fill in my picture of what a > Forth coder's day is like. Forth used that way seems more like a > productivity tool for assembly language programmers, Yeah, that's what I was saying! ;-)
[toc] | [prev] | [next] | [standalone]
| From | Doug Hoffman <glidedog@gmail.com> |
|---|---|
| Date | 2012-05-21 12:57 -0400 |
| Subject | Re: VFX code quality |
| Message-ID | <4fba73e6$0$288$14726298@news.sunsite.dk> |
| In reply to | #12333 |
On 5/21/12 4:27 AM, Paul Rubin wrote:
> "Elizabeth D. Rather"<erather@forth.com> writes:
>>> : z* ( a b c d -- ac-bd bc+ad )
>>> .... ;
>>
>> I don't understand your stack comment (I'm no mathematician)
>
> ac-bd just means a*c minus b*d. So the word takes 4 parameters a,b,c,d
> representing the two complex numbers a+bi and c+di. It multiplies them
> leaving the single complex number (ac-bd) + i*(bc+ad), as two
> coefficients on the stack. It's trivial with locals:
>
> : z* { a b c d -- x y }
> a c * b d * - b c * a d * + ;
>
> doing it without locals seems quite inconvenient. I think Chuck might
> have used globals.
Some approach this sort of thing with the mindset that the computer and
software, even Forth, are there to service the human. If the locals
solution above is fast enough and fits in memory then I would simply use
it. Forth-like and un-Forth-like are idioms whose definitions are
elusive, or so it seems to me. Btw, locals are in the Forth standard.
-Doug
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2012-05-21 08:42 -1000 |
| Subject | Re: VFX code quality |
| Message-ID | <GJCdnZa0-bMuESfSnZ2dnUVZ_rqdnZ2d@supernews.com> |
| In reply to | #12349 |
On 5/21/12 6:57 AM, Doug Hoffman wrote:
> On 5/21/12 4:27 AM, Paul Rubin wrote:
>> "Elizabeth D. Rather"<erather@forth.com> writes:
>>>> : z* ( a b c d -- ac-bd bc+ad )
>>>> .... ;
>>>
>>> I don't understand your stack comment (I'm no mathematician)
>>
>> ac-bd just means a*c minus b*d. So the word takes 4 parameters a,b,c,d
>> representing the two complex numbers a+bi and c+di. It multiplies them
>> leaving the single complex number (ac-bd) + i*(bc+ad), as two
>> coefficients on the stack. It's trivial with locals:
>>
>> : z* { a b c d -- x y }
>> a c * b d * - b c * a d * + ;
>>
>> doing it without locals seems quite inconvenient. I think Chuck might
>> have used globals.
>
> Some approach this sort of thing with the mindset that the computer and
> software, even Forth, are there to service the human. If the locals
> solution above is fast enough and fits in memory then I would simply use
> it. Forth-like and un-Forth-like are idioms whose definitions are
> elusive, or so it seems to me. Btw, locals are in the Forth standard.
There is no way that a high-level definition, with or without locals, is
going to be anywhere near as fast or as small as a code primitive for
this kind of operation except with an aggressive optimizing compiler.
Even then, the code version is probably easier to write.
Chuck (and most Forth programmers I've worked with) can do this sort of
thing in assembler quite easily. Part of "the Forth way" is to use the
tool appropriate for the job: code, in this case.
Cheers,
Elizabeth
--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
[toc] | [prev] | [next] | [standalone]
Page 4 of 8 — ← Prev page 1 2 3 [4] 5 6 7 8 Next page →
Back to top | Article view | comp.lang.forth
csiph-web