Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41632 > unrolled thread
| Started by | Mark Wills <markwills1970@gmail.com> |
|---|---|
| First post | 2015-09-01 00:49 -0700 |
| Last post | 2015-10-06 01:37 -0400 |
| Articles | 20 on this page of 132 — 35 participants |
Back to article view | Back to comp.lang.forth
Could Forth be getting a bit of traction? Mark Wills <markwills1970@gmail.com> - 2015-09-01 00:49 -0700
Re: Could Forth be getting a bit of traction? mentificium@gmail.com - 2015-09-01 04:18 -0700
Re: Could Forth be getting a bit of traction? Steve Graham <jsgrahamus@yahoo.com> - 2015-09-01 09:51 -0700
Re: Could Forth be getting a bit of traction? Andreas Wagner <andreas.wagner@lowfatcomputing.org> - 2015-09-01 10:23 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-02 13:53 -0700
Re: Could Forth be getting a bit of traction? Greg <borota@gmail.com> - 2015-09-04 17:35 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-04 18:27 -0700
Re: Could Forth be getting a bit of traction? Mux <Yvo.Zoer@gmail.com> - 2015-09-04 21:04 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-05 00:27 -0400
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-04 21:48 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-05 01:10 -0400
Re: Could Forth be getting a bit of traction? Mux <Yvo.Zoer@gmail.com> - 2015-09-04 22:19 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-04 23:31 -0700
Re: Could Forth be getting a bit of traction? Mux <Yvo.Zoer@gmail.com> - 2015-09-05 07:28 -0700
Re: Could Forth be getting a bit of traction? Alfred Singlestone <vitonis@gmail.com> - 2015-09-05 08:10 -0700
Re: Could Forth be getting a bit of traction? foxaudioresearch@gmail.com - 2015-09-05 09:05 -0700
Re: Could Forth be getting a bit of traction? visualforth@rocketmail.com - 2015-09-05 09:07 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-05 13:08 -0400
Re: Could Forth be getting a bit of traction? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-05 16:32 +0000
Re: Could Forth be getting a bit of traction? Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-05 22:19 +0200
Re: Could Forth be getting a bit of traction? Jason Damisch <jasondamisch@yahoo.com> - 2015-09-05 13:28 -0700
Re: Could Forth be getting a bit of traction? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-06 12:09 +0000
Re: Could Forth be getting a bit of traction? Richard Owlett <rowlett@cloud85.net> - 2015-09-06 13:27 -0500
Re: Could Forth be getting a bit of traction? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-07 15:36 +0000
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-07 09:46 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-05 14:20 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-06 20:52 -0700
Re: Could Forth be getting a bit of traction? Mux <Yvo.Zoer@gmail.com> - 2015-09-05 12:11 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-05 19:56 -0700
Re: Could Forth be getting a bit of traction? Greg <borota@gmail.com> - 2015-09-06 09:39 -0700
Re: Could Forth be getting a bit of traction? mhx@iae.nl - 2015-09-06 13:01 -0700
Re: Could Forth be getting a bit of traction? borota@gmail.com - 2015-09-06 18:48 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-06 19:43 -0700
Re: Could Forth be getting a bit of traction? borota@gmail.com - 2015-09-06 20:59 -0700
Re: Could Forth be getting a bit of traction? "WJ" <w_a_x_man@yahoo.com> - 2015-09-08 19:46 +0000
Re: Could Forth be getting a bit of traction? borota@gmail.com - 2015-09-08 13:28 -0700
Re: Could Forth be getting a bit of traction? jim.brakefield@ieee.org - 2015-09-08 17:27 -0700
Re: Could Forth be getting a bit of traction? Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-09 03:35 +0200
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-09-08 19:48 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-08 20:28 -0700
Re: Could Forth be getting a bit of traction? jim.brakefield@ieee.org - 2015-09-08 20:48 -0700
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-09-08 21:00 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-08 21:35 -0700
Re: Could Forth be getting a bit of traction? mhx@iae.nl - 2015-09-10 15:20 -0700
Re: Could Forth be getting a bit of traction? jim.brakefield@ieee.org - 2015-09-10 17:26 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-09-10 14:57 -1000
Re: Could Forth be getting a bit of traction? julian.fondren@endurance.com - 2015-09-10 20:47 -0700
Re: Could Forth be getting a bit of traction? mhx@iae.nl (Marcel Hendrix) - 2015-09-11 10:49 +0200
Re: Could Forth be getting a bit of traction? jim.brakefield@ieee.org - 2015-09-11 10:16 -0700
Re: Could Forth be getting a bit of traction? Ron Aaron <rambamist@gmail.com> - 2015-09-09 07:42 +0300
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-08 18:41 -0400
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-08 19:24 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-09-08 20:59 -1000
Re: Could Forth be getting a bit of traction? Greg <borota@gmail.com> - 2015-09-09 15:47 -0700
Re: Could Forth be getting a bit of traction? borota@gmail.com - 2015-09-11 08:15 -0700
Re: Could Forth be getting a bit of traction? visualforth@rocketmail.com - 2015-10-04 19:59 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-04 17:48 -1000
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-04 21:10 -0700
Re: Could Forth be getting a bit of traction? Roberto Waltman <usenet@rwaltman.com> - 2015-10-05 00:53 -0400
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-05 03:51 -0400
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-04 18:58 -1000
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-04 23:35 -0700
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-04 23:44 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-05 08:54 -1000
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-05 12:58 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-06 01:35 -0400
Re: Could Forth be getting a bit of traction? JUERGEN <epldfpga@aol.com> - 2015-10-06 02:58 -0700
Re: Could Forth be getting a bit of traction? Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-10-06 04:05 -0700
Re: Could Forth be getting a bit of traction? Mark Wills <markwills1970@gmail.com> - 2015-10-06 04:22 -0700
Re: Could Forth be getting a bit of traction? JUERGEN <epldfpga@aol.com> - 2015-10-06 15:00 -0700
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-06 16:02 -0700
Re: Could Forth be getting a bit of traction? Ron Aaron <rambamist@gmail.com> - 2015-10-07 07:49 +0300
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-06 15:04 -0700
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-09 14:16 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-06 09:34 -0400
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-06 09:08 -1000
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-06 20:49 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-07 00:56 -0400
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-06 21:11 -1000
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-09 21:07 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-10 19:38 -0400
Re: Could Forth be getting a bit of traction? Paul Rubin <no.email@nospam.invalid> - 2015-10-10 20:46 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-11 01:16 -0400
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-10-10 22:50 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-04 21:21 -1000
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-10-05 08:26 -0700
Re: Could Forth be getting a bit of traction? Alfred Singlestone <vitonis@gmail.com> - 2015-10-06 07:13 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-10 00:12 -0700
Re: Could Forth be getting a bit of traction? humptydumpty <ouatubi@gmail.com> - 2015-09-08 11:48 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-09-08 20:55 -1000
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-09 02:28 -0700
Re: Could Forth be getting a bit of traction? november.nihal@gmail.com - 2015-09-09 03:36 -0700
Re: Could Forth be getting a bit of traction? Marek Brunda <marekb@phoenics.org> - 2015-09-09 03:59 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-09-09 07:34 -1000
Re: Could Forth be getting a bit of traction? jim.brakefield@ieee.org - 2015-09-09 12:32 -0700
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-10 17:10 -0700
Re: Could Forth be getting a bit of traction? "WJ" <w_a_x_man@yahoo.com> - 2015-09-09 18:59 +0000
Re: Could Forth be getting a bit of traction? Whammo <sidciavic@gmail.com> - 2015-09-09 12:28 -0700
structs/unions/records (was: Could Forth be getting a bit of traction?) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-09 07:10 +0000
Re: structs/unions/records (was: Could Forth be getting a bit of traction?) hughaguilar96@gmail.com - 2015-09-09 02:18 -0700
Re: structs/unions/records rickman <gnuarm@gmail.com> - 2015-09-09 23:27 -0400
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-06 23:18 -0700
Re: Could Forth be getting a bit of traction? awegel@arcor.de (Alexander Wegel) - 2015-09-07 12:57 +0200
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-07 09:55 -0700
Re: Could Forth be getting a bit of traction? "WJ" <w_a_x_man@yahoo.com> - 2015-09-07 18:45 +0000
Re: Could Forth be getting a bit of traction? awegel@arcor.de (Alexander Wegel) - 2015-09-08 00:13 +0200
Re: Could Forth be getting a bit of traction? Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-08 01:51 +0200
Re: Could Forth be getting a bit of traction? awegel@arcor.de (Alexander Wegel) - 2015-09-08 00:13 +0200
Re: Could Forth be getting a bit of traction? "WJ" <w_a_x_man@yahoo.com> - 2015-09-07 18:27 +0000
Re: Could Forth be getting a bit of traction? borota@gmail.com - 2015-09-07 12:23 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-07 16:14 -0400
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-07 17:39 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-08 01:39 -0400
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-05 03:12 -0400
Re: Could Forth be getting a bit of traction? foxaudioresearch@gmail.com - 2015-09-05 09:02 -0700
Re: Could Forth be getting a bit of traction? "WJ" <w_a_x_man@yahoo.com> - 2015-09-05 16:47 +0000
Re: Could Forth be getting a bit of traction? Alfred Singlestone <vitonis@gmail.com> - 2015-09-05 11:13 -0700
Re: Could Forth be getting a bit of traction? josv@planet.nl - 2015-09-01 12:37 -0700
Re: Could Forth be getting a bit of traction? Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-01 22:02 +0200
Re: Could Forth be getting a bit of traction? Mux <Yvo.Zoer@gmail.com> - 2015-09-08 03:45 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-09-08 07:54 -1000
Re: Could Forth be getting a bit of traction? hughaguilar96@gmail.com - 2015-09-08 19:08 -0700
Re: Could Forth be getting a bit of traction? Mux <Yvo.Zoer@gmail.com> - 2015-09-09 15:00 -0700
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-09-09 23:18 -0400
Re: Could Forth be getting a bit of traction? p.lad.work@gmail.com - 2015-10-05 05:04 -0700
Re: Could Forth be getting a bit of traction? foxaudioresearch@gmail.com - 2015-10-05 06:39 -0700
Re: Could Forth be getting a bit of traction? Chris Curl <ccurl609@gmail.com> - 2015-10-05 18:44 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-05 17:47 -1000
Re: Could Forth be getting a bit of traction? Chris Curl <ccurl609@gmail.com> - 2015-10-05 21:58 -0700
Re: Could Forth be getting a bit of traction? Jason Damisch <jasondamisch@yahoo.com> - 2015-10-06 10:55 -0700
Re: Could Forth be getting a bit of traction? "Elizabeth D. Rather" <erather@forth.com> - 2015-10-06 09:13 -1000
Re: Could Forth be getting a bit of traction? rickman <gnuarm@gmail.com> - 2015-10-06 01:37 -0400
Page 3 of 7 — ← Prev page 1 2 [3] 4 5 6 7 Next page →
| From | jim.brakefield@ieee.org |
|---|---|
| Date | 2015-09-08 20:48 -0700 |
| Message-ID | <89eec9fc-de84-4d04-bf53-84f3ed0e4bd3@googlegroups.com> |
| In reply to | #41873 |
On Tuesday, September 8, 2015 at 9:48:59 PM UTC-5, Paul Rubin wrote: > jim.brak...@ieee.org writes: > > A way forward is for the Forth standard to embrace as many higher > > level abstractions (both data and code) as possible and state the > > meaning. > > I think part of the Forth spirit is to collapse away abstraction rather > than add more. This is both enabling and limiting, in their own ways. Programming in the large (e.g. using vectors and arrays as in Numpy) is both terse and avoids writing/testing a lot of loop code. One way to implement vector and array operators is to generate them dynamically, so it is useful to treat word lists as strings, put together the loop code and execute. Of course this can be done by adding a tool vocabulary. It would be good to have some standardization. Another favorite is to have a precedence parser to convert an algebraic expression (starting from the character string representation) to a word definition (that uses locals?), and vice versa.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2015-09-08 21:00 -0700 |
| Message-ID | <87bndctf60.fsf@jester.gateway.pace.com> |
| In reply to | #41875 |
jim.brakefield@ieee.org writes: > Programming in the large (e.g. using vectors and arrays as in Numpy) > is both terse and avoids writing/testing a lot of loop code. Well there is FSL (Forth Scientific Library) though I haven't used it. > One way to implement vector and array operators is to generate them > dynamically, so it is useful to treat word lists as strings, put > together the loop code and execute. Of course this can be done by > adding a tool vocabulary. Not sure what you mean by tool vocabulary, but the above is certainly in the range of existing Forth metaprogramming techniques. > Another favorite is to have a precedence parser to convert an > algebraic expression (starting from the character string > representation) to a word definition (that uses locals?), and vice > versa. Things like this have been done but I don't remember specifics.
[toc] | [prev] | [next] | [standalone]
| From | hughaguilar96@gmail.com |
|---|---|
| Date | 2015-09-08 21:35 -0700 |
| Message-ID | <4a550d55-245f-4788-9694-c62699edcc0b@googlegroups.com> |
| In reply to | #41877 |
On Tuesday, September 8, 2015 at 9:00:56 PM UTC-7, Paul Rubin wrote: > jim.brakefield@ieee.org writes: > > Another favorite is to have a precedence parser to convert an > > algebraic expression (starting from the character string > > representation) to a word definition (that uses locals?), and vice > > versa. > > Things like this have been done but I don't remember specifics. Ching's ABCforth.
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl |
|---|---|
| Date | 2015-09-10 15:20 -0700 |
| Message-ID | <abb18c33-825e-4e35-b18e-07f1bdc1687d@googlegroups.com> |
| In reply to | #41875 |
On Wednesday, September 9, 2015 at 5:48:11 AM UTC+2, jim.bra...@ieee.org wrote:
> On Tuesday, September 8, 2015 at 9:48:59 PM UTC-5, Paul Rubin wrote:
> > jim.brak...@ieee.org writes:
[..]
> Another favorite is to have a precedence parser to convert an
> algebraic expression (starting from the character string
> representation) to a word definition (that uses locals?),
> and vice versa.
Like this?
NEEDS -xopg
0-VALUE GVAL a 0-VALUE GVAL b 0-VALUE GVAL c 0-VALUE GVAL disc
: quadraticroot ( F: a b c -- y1 y2 )
TO c TO b TO a
LET disc=SQRT(b*b-4*a*c):
LET ((-b+disc)/(2*a),(-b-disc)/(2*a)):
;
( x*x-3*x+2=0 ) LET quadratic root (1,-3, 2) :
CR .PRINT CR .PRINT
1.0000000000000000000000000000000000000000e+0000
2.0000000000000000000000000000000000000000e+0000 ok
( goldenratio ) CR LET. MAX(quadraticroot (1,-1,-1)):
1.6180339887498948482045868343656381177203e+0000 ok
\ Or Ferrari's quartic solver:
0-VALUE GVAL Alpha PRIVATE
0-VALUE GVAL Beta PRIVATE
0-VALUE GVAL Gamma PRIVATE
0-VALUE GVAL A PRIVATE
0-VALUE GVAL B PRIVATE
0-VALUE GVAL C PRIVATE
0-VALUE GVAL D PRIVATE
0-VALUE GVAL E PRIVATE
4 GARRAY qsol PRIVATE
LET 1e-40 GVAL qeps
: Beta=0? ( -- bool )
LET greater(ABS(Beta),REAL(qeps)): IF FALSE EXIT ENDIF
LET -B/(4*A): GLOCAL a1
0-VALUE GLOCAL a2p
0-VALUE GLOCAL a2m
LET a2p = SQRT(( SQRT(Alpha^2 - 4*Gamma)-Alpha)/2):
LET a2m = SQRT((-SQRT(Alpha^2 - 4*Gamma)-Alpha)/2):
LET qsol[0]=a1+a2p:
LET qsol[1]=a1-a2p:
LET qsol[2]=a1+a2m:
LET qsol[3]=a1-a2m:
TRUE ; PRIVATE
-- result in qsol
: COMPUTE-QUARTIC ( ??: za zb zc zd ze -- )
TO E TO D TO C TO B TO A
LET Alpha = C/A-0.375*(B/A)^2:
LET Beta = (B/A)^3/8-(B*C)/(2*A*A)+D/A:
LET Gamma = E/A - 3*(B/A)^4/256 + (B*B*C)/(16*A^3) - (B*D)/(4*A*A):
Beta=0? ?EXIT
LET -Alpha^2/12 - Gamma: GLOCAL P
LET -Alpha^3/108 + Alpha*Gamma/3 - Beta^2/8: GLOCAL Q
LET CBRT(-Q/2 + SQRT(Q^2/4+P^3/27)): GLOCAL pU
LET smaller(ABS(pU),REAL(qeps)):
IF LET -5*Alpha/6 - CBRT(Q):
ELSE LET -5*Alpha/6 + pU - P/3/pU:
ENDIF GLOCAL y
LET SQRT(Alpha+2*y): GLOCAL W
LET 3*Alpha+2*y: GLOCAL term1
LET 2*Beta/W: GLOCAL term2
LET -B/(4*A): GLOCAL a1
LET W/2: GLOCAL a2
LET SQRT(-term1-term2)/2: GLOCAL a3p
LET SQRT(-term1+term2)/2: GLOCAL a3m
LET qsol[0]=a1+a2+a3p: \ the sign distribution is tricky
LET qsol[1]=a1+a2-a3p:
LET qsol[2]=a1-a2-a3m:
LET qsol[3]=a1-a2+a3m: ; PRIVATE
: .QUARTIC ( ??: za zb zc zd -- )
COMPUTE-QUARTIC
4 0 ?DO CR ." x" I 1+ 0 .R ." = " LET. qsol[i]: LOOP ;
-marcel
[toc] | [prev] | [next] | [standalone]
| From | jim.brakefield@ieee.org |
|---|---|
| Date | 2015-09-10 17:26 -0700 |
| Message-ID | <3701e184-7832-4ec8-b686-564aede16728@googlegroups.com> |
| In reply to | #41932 |
On Thursday, September 10, 2015 at 5:20:25 PM UTC-5, m...@iae.nl wrote: > On Wednesday, September 9, 2015 at 5:48:11 AM UTC+2, jim.bra...@ieee.org wrote: > > On Tuesday, September 8, 2015 at 9:48:59 PM UTC-5, Paul Rubin wrote: > > > jim.brak...@ieee.org writes: > [..] > > Another favorite is to have a precedence parser to convert an > > algebraic expression (starting from the character string > > representation) to a word definition (that uses locals?), > > and vice versa. > > Like this? > > NEEDS -xopg > 0-VALUE GVAL a 0-VALUE GVAL b 0-VALUE GVAL c 0-VALUE GVAL disc > : quadraticroot ( F: a b c -- y1 y2 ) > TO c TO b TO a > LET disc=SQRT(b*b-4*a*c): > LET ((-b+disc)/(2*a),(-b-disc)/(2*a)): > ; > ( x*x-3*x+2=0 ) LET quadratic root (1,-3, 2) : > CR .PRINT CR .PRINT > 1.0000000000000000000000000000000000000000e+0000 > 2.0000000000000000000000000000000000000000e+0000 ok > > ( goldenratio ) CR LET. MAX(quadraticroot (1,-1,-1)): > 1.6180339887498948482045868343656381177203e+0000 ok > > > \ Or Ferrari's quartic solver: > > 0-VALUE GVAL Alpha PRIVATE > 0-VALUE GVAL Beta PRIVATE > 0-VALUE GVAL Gamma PRIVATE > 0-VALUE GVAL A PRIVATE > 0-VALUE GVAL B PRIVATE > 0-VALUE GVAL C PRIVATE > 0-VALUE GVAL D PRIVATE > 0-VALUE GVAL E PRIVATE > > 4 GARRAY qsol PRIVATE > > LET 1e-40 GVAL qeps > > : Beta=0? ( -- bool ) > LET greater(ABS(Beta),REAL(qeps)): IF FALSE EXIT ENDIF > LET -B/(4*A): GLOCAL a1 > 0-VALUE GLOCAL a2p > 0-VALUE GLOCAL a2m > LET a2p = SQRT(( SQRT(Alpha^2 - 4*Gamma)-Alpha)/2): > LET a2m = SQRT((-SQRT(Alpha^2 - 4*Gamma)-Alpha)/2): > LET qsol[0]=a1+a2p: > LET qsol[1]=a1-a2p: > LET qsol[2]=a1+a2m: > LET qsol[3]=a1-a2m: > TRUE ; PRIVATE > > -- result in qsol > : COMPUTE-QUARTIC ( ??: za zb zc zd ze -- ) > TO E TO D TO C TO B TO A > LET Alpha = C/A-0.375*(B/A)^2: > LET Beta = (B/A)^3/8-(B*C)/(2*A*A)+D/A: > LET Gamma = E/A - 3*(B/A)^4/256 + (B*B*C)/(16*A^3) - (B*D)/(4*A*A): > Beta=0? ?EXIT > > LET -Alpha^2/12 - Gamma: GLOCAL P > LET -Alpha^3/108 + Alpha*Gamma/3 - Beta^2/8: GLOCAL Q > LET CBRT(-Q/2 + SQRT(Q^2/4+P^3/27)): GLOCAL pU > > LET smaller(ABS(pU),REAL(qeps)): > IF LET -5*Alpha/6 - CBRT(Q): > ELSE LET -5*Alpha/6 + pU - P/3/pU: > ENDIF GLOCAL y > > LET SQRT(Alpha+2*y): GLOCAL W > LET 3*Alpha+2*y: GLOCAL term1 > LET 2*Beta/W: GLOCAL term2 > LET -B/(4*A): GLOCAL a1 > LET W/2: GLOCAL a2 > LET SQRT(-term1-term2)/2: GLOCAL a3p > LET SQRT(-term1+term2)/2: GLOCAL a3m > > LET qsol[0]=a1+a2+a3p: \ the sign distribution is tricky > LET qsol[1]=a1+a2-a3p: > LET qsol[2]=a1-a2-a3m: > LET qsol[3]=a1-a2+a3m: ; PRIVATE > > : .QUARTIC ( ??: za zb zc zd -- ) > COMPUTE-QUARTIC > 4 0 ?DO CR ." x" I 1+ 0 .R ." = " LET. qsol[i]: LOOP ; > > -marcel Yes (preferred syntax may vary, but that's just a vocabulary renaming issue: here would prefer LET be lower case and have a non-alphabetic lead in character) As one wanders the Forth websites am finding most of these ideas have been implemented in one way or another (functional programming, locals, optimization, Unicode, data interchange, etc.). Starting to look at libraries to see if something resembling Python's huge library collection is possible? One issue that is not unique to Forth is data bit size requirements: What does it take to have code run correctly on any word size processor. One approach is to state the datum bit size as an enumeration: for Forth the user gets to specify a numeric range for "cell" and "character" and accuracy and exponent range for floats. The compiler either punts or "does the right thing", e.g., cobbles enough addressable units together to form an adequate representation. As a minimum putting this info at the front of your code puts the reader on notice.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2015-09-10 14:57 -1000 |
| Message-ID | <6MGdnb9TNvuUum_InZ2dnUU7-TmdnZ2d@supernews.com> |
| In reply to | #41936 |
On 9/10/15 2:26 PM, jim.brakefield@ieee.org wrote: > On Thursday, September 10, 2015 at 5:20:25 PM UTC-5, m...@iae.nl wrote: >> On Wednesday, September 9, 2015 at 5:48:11 AM UTC+2, jim.bra...@ieee.org wrote: >>> On Tuesday, September 8, 2015 at 9:48:59 PM UTC-5, Paul Rubin wrote: >>>> jim.brak...@ieee.org writes: >> [..] >>> Another favorite is to have a precedence parser to convert an >>> algebraic expression (starting from the character string >>> representation) to a word definition (that uses locals?), >>> and vice versa. >> >> Like this? >> >> NEEDS -xopg >> 0-VALUE GVAL a 0-VALUE GVAL b 0-VALUE GVAL c 0-VALUE GVAL disc >> : quadraticroot ( F: a b c -- y1 y2 ) >> TO c TO b TO a >> LET disc=SQRT(b*b-4*a*c): >> LET ((-b+disc)/(2*a),(-b-disc)/(2*a)): >> ; >> ( x*x-3*x+2=0 ) LET quadratic root (1,-3, 2) : >> CR .PRINT CR .PRINT >> 1.0000000000000000000000000000000000000000e+0000 >> 2.0000000000000000000000000000000000000000e+0000 ok >> >> ( goldenratio ) CR LET. MAX(quadraticroot (1,-1,-1)): >> 1.6180339887498948482045868343656381177203e+0000 ok >> >> >> \ Or Ferrari's quartic solver: >> >> 0-VALUE GVAL Alpha PRIVATE >> 0-VALUE GVAL Beta PRIVATE >> 0-VALUE GVAL Gamma PRIVATE >> 0-VALUE GVAL A PRIVATE >> 0-VALUE GVAL B PRIVATE >> 0-VALUE GVAL C PRIVATE >> 0-VALUE GVAL D PRIVATE >> 0-VALUE GVAL E PRIVATE >> >> 4 GARRAY qsol PRIVATE >> >> LET 1e-40 GVAL qeps >> >> : Beta=0? ( -- bool ) >> LET greater(ABS(Beta),REAL(qeps)): IF FALSE EXIT ENDIF >> LET -B/(4*A): GLOCAL a1 >> 0-VALUE GLOCAL a2p >> 0-VALUE GLOCAL a2m >> LET a2p = SQRT(( SQRT(Alpha^2 - 4*Gamma)-Alpha)/2): >> LET a2m = SQRT((-SQRT(Alpha^2 - 4*Gamma)-Alpha)/2): >> LET qsol[0]=a1+a2p: >> LET qsol[1]=a1-a2p: >> LET qsol[2]=a1+a2m: >> LET qsol[3]=a1-a2m: >> TRUE ; PRIVATE >> >> -- result in qsol >> : COMPUTE-QUARTIC ( ??: za zb zc zd ze -- ) >> TO E TO D TO C TO B TO A >> LET Alpha = C/A-0.375*(B/A)^2: >> LET Beta = (B/A)^3/8-(B*C)/(2*A*A)+D/A: >> LET Gamma = E/A - 3*(B/A)^4/256 + (B*B*C)/(16*A^3) - (B*D)/(4*A*A): >> Beta=0? ?EXIT >> >> LET -Alpha^2/12 - Gamma: GLOCAL P >> LET -Alpha^3/108 + Alpha*Gamma/3 - Beta^2/8: GLOCAL Q >> LET CBRT(-Q/2 + SQRT(Q^2/4+P^3/27)): GLOCAL pU >> >> LET smaller(ABS(pU),REAL(qeps)): >> IF LET -5*Alpha/6 - CBRT(Q): >> ELSE LET -5*Alpha/6 + pU - P/3/pU: >> ENDIF GLOCAL y >> >> LET SQRT(Alpha+2*y): GLOCAL W >> LET 3*Alpha+2*y: GLOCAL term1 >> LET 2*Beta/W: GLOCAL term2 >> LET -B/(4*A): GLOCAL a1 >> LET W/2: GLOCAL a2 >> LET SQRT(-term1-term2)/2: GLOCAL a3p >> LET SQRT(-term1+term2)/2: GLOCAL a3m >> >> LET qsol[0]=a1+a2+a3p: \ the sign distribution is tricky >> LET qsol[1]=a1+a2-a3p: >> LET qsol[2]=a1-a2-a3m: >> LET qsol[3]=a1-a2+a3m: ; PRIVATE >> >> : .QUARTIC ( ??: za zb zc zd -- ) >> COMPUTE-QUARTIC >> 4 0 ?DO CR ." x" I 1+ 0 .R ." = " LET. qsol[i]: LOOP ; >> >> -marcel > > Yes > (preferred syntax may vary, but that's just a vocabulary renaming issue: here would prefer LET be lower case and have a non-alphabetic lead in character) > > As one wanders the Forth websites am finding most of these ideas have been implemented in one way or another (functional programming, locals, optimization, Unicode, data interchange, etc.). Starting to look at libraries to see if something resembling Python's huge library collection is possible? > > One issue that is not unique to Forth is data bit size requirements: What does it take to have code run correctly on any word size processor. One approach is to state the datum bit size as an enumeration: for Forth the user gets to specify a numeric range for "cell" and "character" and accuracy and exponent range for floats. The compiler either punts or "does the right thing", e.g., cobbles enough addressable units together to form an adequate representation. As a minimum putting this info at the front of your code puts the reader on notice. > The current practice is that programs make no assumptions about cell or char size, but use the portability words (e.g. CELLS, CELL+, CHARS, etc.) in user code. System providers are supposed to specify the sizes of these things, and there's a way to find out (environmental constants). 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 | julian.fondren@endurance.com |
|---|---|
| Date | 2015-09-10 20:47 -0700 |
| Message-ID | <21670bdd-0abc-4649-b8b2-bb323aa6e7e4@googlegroups.com> |
| In reply to | #41936 |
On Thursday, September 10, 2015 at 7:26:19 PM UTC-5, jim.bra...@ieee.org wrote: > As one wanders the Forth websites am finding most of these ideas have been implemented in one way or another (functional programming, locals, optimization, Unicode, data interchange, etc.). Starting to look at libraries to see if something resembling Python's huge library collection is possible? Sure, it's possible. http://irdvo.github.io/ffl/ http://soton.mpeforth.com/flag/fsl/index.html On Thursday, September 10, 2015 at 7:10:59 PM UTC-5, hughag...@gmail.com wrote: > I've never seen this done in C --- pointers to functions in C are complicated and almost never used They're not so bad: http://www.newty.de/fpt/index.html And they are still quite rarely used in Perl and such languages, where they're easier to use. So I think they're not used in C because C people have gone the way of providing tools that callers can work into their own loops. And because function pointers require C people to write functions :-) > The only higher-order function that I've ever seen in C was QSORT, and it is written in assembly-language not C because it is part of the standard library. + is often implemented in assembly. Conclusion: Forth cannot into basic arithmetic. -- Julian
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Date | 2015-09-11 10:49 +0200 |
| Message-ID | <18869392948432@frunobulax.edu> |
| In reply to | #41936 |
jim.brakefield@ieee.org write Re: Could Forth be getting a bit of traction?
> On Thursday, September 10, 2015 at 5:20:25 PM UTC-5, m...@iae.nl wrote:
>> On Wednesday, September 9, 2015 at 5:48:11 AM UTC+2, jim.bra...@ieee.org wrote:
>> > On Tuesday, September 8, 2015 at 9:48:59 PM UTC-5, Paul Rubin wrote:
>> > > jim.brak...@ieee.org writes:
[..]
>> > Another favorite is to have a precedence parser to convert an
>> > algebraic expression (starting from the character string
>> > representation) to a word definition (that uses locals?),
>> > and vice versa.
>> Like this?
> Yes
> (preferred syntax may vary, but that's just a vocabulary renaming issue: here
> would prefer LET be lower case and have a non-alphabetic lead in character)
Actually, the upper case is just a convention, current Forths are not
case-sensitive, although some implementations are written so that you
can still make use of case-sensitivity (e.g. by using a global
CASESENSITIVE variable). The non-alphabetic lead is already possible
because identifiers oby the same rules as Forth idenitifiers (i.e no rules).
It gets even better, instead of e.g. QuadraticRoot you can also write Quadratic
Root (i.e embedded spaces or ALGOL syntax).
> One issue that is not unique to Forth is data bit size requirements: What
> does it take to have code run correctly on any word size processor. One
> approach is to state the datum bit size as an enumeration: for Forth the user
> gets to specify a numeric range for "cell" and "character" and accuracy and
> exponent range for floats. The compiler either punts or "does the right
> thing", e.g., cobbles enough addressable units together to form an adequate
> representation. As a minimum putting this info at the front of your code
> puts the reader on notice.
XOPG does it approximately like that. There is a standard choice before
loading the library between CELLs (integers, in my case 64 bits),
single (32b), double (64b) and extended (80b) precision IEEE floats,
double precision (64b) complex and arbitrary precision floats and complex
numbers (MPFR library). Of course one can choose arbitrary floats everywhere
and then set up the number of digits in that format (default is 256 bits).
The 'problem' with using all these types is that the compiler must correctly
handle the conversions between them (in XOPG that is from 7 type to others
is 7 x 7 combinations already).
One other feature is to ask for the exquivalent Forth code to be shown:
FORTH> .INTEGER.P ok
FORTH> debug ON 0-VALUE GVAL a 0-VALUE GVAL b 0-VALUE GVAL c 0-VALUE GVAL disc ok
FORTH> : quadraticroot ( F: a b c -- y1 y2 )
<3>[FORTH>] TO c TO b TO a
<3>[FORTH>] LET disc=SQRT(b*b-4*a*c): b b * 4 a * c * - SQRT TO disc
<3>[FORTH>] LET ((-b+disc)/(2*a),(-b-disc)/(2*a)): b NEGATE disc +
2 a * / b NEGATE disc - 2 a * /
<3>[FORTH>] ; ok
Notice the Forth generated by LET .. : echoeing during compilation.
-marcel
[toc] | [prev] | [next] | [standalone]
| From | jim.brakefield@ieee.org |
|---|---|
| Date | 2015-09-11 10:16 -0700 |
| Message-ID | <17fcef87-176d-401d-8503-353cb6cc2861@googlegroups.com> |
| In reply to | #41951 |
On Friday, September 11, 2015 at 3:49:21 AM UTC-5, Marcel Hendrix wrote: > jim.bra...@ieee.org write Re: Could Forth be getting a bit of traction? > > > On Thursday, September 10, 2015 at 5:20:25 PM UTC-5, m...@iae.nl wrote: > >> On Wednesday, September 9, 2015 at 5:48:11 AM UTC+2, jim.bra...@ieee.org wrote: > >> > On Tuesday, September 8, 2015 at 9:48:59 PM UTC-5, Paul Rubin wrote: > >> > > jim.brak...@ieee.org writes: > [..] > >> > Another favorite is to have a precedence parser to convert an > >> > algebraic expression (starting from the character string > >> > representation) to a word definition (that uses locals?), > >> > and vice versa. > > >> Like this? > > > Yes > > (preferred syntax may vary, but that's just a vocabulary renaming issue: here > > would prefer LET be lower case and have a non-alphabetic lead in character) > > Actually, the upper case is just a convention, current Forths are not > case-sensitive, although some implementations are written so that you > can still make use of case-sensitivity (e.g. by using a global > CASESENSITIVE variable). The non-alphabetic lead is already possible > because identifiers oby the same rules as Forth idenitifiers (i.e no rules). > It gets even better, instead of e.g. QuadraticRoot you can also write Quadratic > Root (i.e embedded spaces or ALGOL syntax). > > > One issue that is not unique to Forth is data bit size requirements: What > > does it take to have code run correctly on any word size processor. One > > approach is to state the datum bit size as an enumeration: for Forth the user > > gets to specify a numeric range for "cell" and "character" and accuracy and > > exponent range for floats. The compiler either punts or "does the right > > thing", e.g., cobbles enough addressable units together to form an adequate > > representation. As a minimum putting this info at the front of your code > > puts the reader on notice. > > XOPG does it approximately like that. There is a standard choice before > loading the library between CELLs (integers, in my case 64 bits), > single (32b), double (64b) and extended (80b) precision IEEE floats, > double precision (64b) complex and arbitrary precision floats and complex > numbers (MPFR library). Of course one can choose arbitrary floats everywhere > and then set up the number of digits in that format (default is 256 bits). > > The 'problem' with using all these types is that the compiler must correctly > handle the conversions between them (in XOPG that is from 7 type to others > is 7 x 7 combinations already). > > One other feature is to ask for the exquivalent Forth code to be shown: > > FORTH> .INTEGER.P ok > FORTH> debug ON 0-VALUE GVAL a 0-VALUE GVAL b 0-VALUE GVAL c 0-VALUE GVAL disc ok > FORTH> : quadraticroot ( F: a b c -- y1 y2 ) > <3>[FORTH>] TO c TO b TO a > <3>[FORTH>] LET disc=SQRT(b*b-4*a*c): b b * 4 a * c * - SQRT TO disc > <3>[FORTH>] LET ((-b+disc)/(2*a),(-b-disc)/(2*a)): b NEGATE disc + > 2 a * / b NEGATE disc - 2 a * / > <3>[FORTH>] ; ok > > Notice the Forth generated by LET .. : echoeing during compilation. > > -marcel RE type conversions: Full generality inferred type coercion is NP complete, not something for a small Forth environment. Would hash the operator (word) with its operand types so the correct variant can be found quickly (at most 7 variants). Programmer responsible for all type changes and that would be a single word with at most 7 x 7 variations.
[toc] | [prev] | [next] | [standalone]
| From | Ron Aaron <rambamist@gmail.com> |
|---|---|
| Date | 2015-09-09 07:42 +0300 |
| Message-ID | <msod7m$6mb$1@dont-email.me> |
| In reply to | #41867 |
On 9/9/15 03:27, jim.brakefield@ieee.org wrote:
> On Tuesday, September 8, 2015 at 3:28:19 PM UTC-5, bor...@gmail.com wrote:
> However, the notation is archaic. ( ) [ ] { } are all taken and have idiosyncratic usage. Tick has the right meaning. Would prefer JSON be supported: [ ] { } and : would need to have dedicated meanings that would break most existing Forth code? Of course one can create a JSON vocabulary and overwrite existing usage for the duration of the JSON data (done already?).
I see you stumbled upon 8th, which does use JSON as a data description
format.
Best regards,
Ron
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-08 18:41 -0400 |
| Message-ID | <mso1k8$ept$1@dont-email.me> |
| In reply to | #41859 |
On 9/8/2015 4:28 PM, borota@gmail.com wrote: > On Tuesday, September 8, 2015 at 2:48:45 PM UTC-5, WJ wrote: >> hughaguilar96 wrote: >> >>> On Sunday, September 6, 2015 at 6:48:05 PM UTC-7, bor...@gmail.com wrote: >> >>>> Thanks Marcel, I am starting work on my first real Forth >>>> application, I will see if I can get by without s/u/r. But >> >> Why? >> >> Why would depriving yourself of structures make programming easier? >> >> Why would depriving yourself of structures make your programs >> more readable and maintainable? >> >> Do you really want to accept the advice of a simpleton as the >> word of God? >> >> Having no structs in Forth doesn't make things easier for the >> users of Forh. It may, however, make it easier for the lazy >> implementors of Forth. >> >> >>>> it's a little bit of a stretching of the mind for me, >>>> because these days anytime I approach a problem, one of the >>>> first things I do is identifying and designing the >>>> structures (classes). >>> >>> All of my programs rely heavily structs --- the novice >>> package's data-structures obviously require structs to hold >>> the data --- I don't think that anybody can write a "real >>> Forth application" without structs. >> >> "Ms." Rather's assertion that Forth doesn't need structures >> (records) because different programs use different data >> arranged in different ways is mindless. >> >> One could say that Forth doesn't need strings for the same >> reason. Some can't grasp that different programs use strings that >> are different in length and that contain different characters. >> >> Similarly, different programs use structures that have different >> fields. The data layout doesn't have to be the same. > > At this stage I am learning Forth just to expand my horizon. So to be real > honest, who cares? For mind "expansion", learning to program without > structures would be an interesting mind exercise indeed. I learn Forth > completely as a hobby, I don't really need to, my day work is in a much > different fold, a fold where almost everything is done opposite of how > things are advocated here. > > Also note that both Jeff Fox (when he was amongst us) and Chuck Moore are > of exactly the same mindset as Elizabeth as far as this topic is concerned. > So maybe the ala HA epithets don't quite apply? I haven't been around these > parts much, but I already begin to wonder if HA and WJ have something in > common, like being one and the same person? Not much chance of that I think. They both exhibit some odd personality traits, but not the same ones. With Hugh, ER is something of an obsession, or would that be a compulsion to write about her in his many demented ways. It's a shame really. Hugh could be a significant contributor if it weren't for his social neuroses. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | hughaguilar96@gmail.com |
|---|---|
| Date | 2015-09-08 19:24 -0700 |
| Message-ID | <a6f84d16-3e5b-4fa1-ba69-720abca1c1b9@googlegroups.com> |
| In reply to | #41859 |
On Tuesday, September 8, 2015 at 1:28:19 PM UTC-7, bor...@gmail.com wrote: > On Tuesday, September 8, 2015 at 2:48:45 PM UTC-5, WJ wrote: > > Having no structs in Forth doesn't make things easier for the > > users of Forh. It may, however, make it easier for the lazy > > implementors of Forth. > ... > Also note that both Jeff Fox (when he was amongst us) and Chuck Moore are > of exactly the same mindset as Elizabeth as far as this topic is concerned. > So maybe the ala HA epithets don't quite apply? I haven't been around these > parts much, but I already begin to wonder if HA and WJ have something in > common, like being one and the same person? WJ is conflating ANS-Forth and Forth --- I don't make that mistake as I know that they are completely different --- I love Forth but hate ANS-Forth. WJ loves Gauche Scheme and hates everything else, especially Common Lisp, so he is on comp.lang.forth and comp.lang.lisp (maybe other forums as well) posting Scheme programs inappropriately. I have nothing against languages such as Scheme, Lisp, Factor, OForth, etc. --- they aren't for me --- but, to each his own. My own experience with Jeff Fox is that he didn't hate structs or general-purpose data-structures --- afaik, he wrote programs that worked, and I really doubt that he relied on such a clumsy inefficient technique as using multiple arrays one for each field rather than just use a struct, because he would never have gotten past writing toy programs if this were true --- I have never actually examined any of his code though, and I doubt that anybody else here has either, so claiming to know how he programmed seems a bit arrogant. Note that I have never used a sock puppet on any of these forums.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2015-09-08 20:59 -1000 |
| Message-ID | <qPSdndT1rsRWRXLInZ2dnUU7-UmdnZ2d@supernews.com> |
| In reply to | #41859 |
On 9/8/15 10:28 AM, borota@gmail.com wrote: ... > At this stage I am learning Forth just to expand my horizon. So to be real > honest, who cares? For mind "expansion", learning to program without > structures would be an interesting mind exercise indeed. I learn Forth > completely as a hobby, I don't really need to, my day work is in a much > different fold, a fold where almost everything is done opposite of how > things are advocated here. "Mind expansion" is an excellent motivation for learning Forth, as it encourages very different problem-solving approaches. May I ask, what books or resources do you have available, and what Forth system are you using? 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 | Greg <borota@gmail.com> |
|---|---|
| Date | 2015-09-09 15:47 -0700 |
| Message-ID | <984cef21-0618-4fc4-ad93-c551609145d6@googlegroups.com> |
| In reply to | #41883 |
On Wednesday, September 9, 2015 at 1:59:25 AM UTC-5, Elizabeth D. Rather wrote: > On 9/8/15 10:28 AM, bor... wrote: > ... > > At this stage I am learning Forth just to expand my horizon. So to be real > > honest, who cares? For mind "expansion", learning to program without > > structures would be an interesting mind exercise indeed. I learn Forth > > completely as a hobby, I don't really need to, my day work is in a much > > different fold, a fold where almost everything is done opposite of how > > things are advocated here. > > "Mind expansion" is an excellent motivation for learning Forth, as it > encourages very different problem-solving approaches. May I ask, what > books or resources do you have available, and what Forth system are you > using? > > 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." > ================================================== Sure, I have read or just browsed through: 1) Starting Forth - read on-line 2) Forth Application Techniques - read but skipped multi-tasking stuff for now. While going through FAT, all the sudden I was like, why was I so scared of the stack, it is quite natural to work with it. It did feel like a light turned on. I mentioned it before, I find Forth Application Techniques to be the best introduction to Forth I could lay my hands on. If it weren't for some useless, contrary noise I run into on this forum, I would have started with it earlier. 3) Forth Programmer's Handbook - skipped assembler stuff for now, etc. 4) I started at some point with Stephen Pelc's "Programming Forth" but it felt like it wasn't quite the best for somebody who's never heard of Forth before. At times, the text makes use of constructs/concepts before they've been explained. Or at least so it seemed to me. I plan on coming back to it at some point. 5) Thinking Forth - I am reading it right now. I also spent some time on Jeff Fox's site, reading a bunch of articles there. If you have some recommendations, I'd gladly accept, thanks. Also I have iForth and downloaded SwiftForth/VFX and GForth. GForth seems to have more liberty to add new features faster, experimental features, etc. so I like to play with it too. Plus GForth installs on pads and stuff. Recommendations are welcomed.
[toc] | [prev] | [next] | [standalone]
| From | borota@gmail.com |
|---|---|
| Date | 2015-09-11 08:15 -0700 |
| Message-ID | <db513c70-6bb4-4f2b-b9ac-1c52891b9275@googlegroups.com> |
| In reply to | #41907 |
On Wednesday, September 9, 2015 at 5:47:59 PM UTC-5, Greg wrote: > On Wednesday, September 9, 2015 at 1:59:25 AM UTC-5, Elizabeth D. Rather wrote: > > On 9/8/15 10:28 AM, bor... wrote: > > ... > > > At this stage I am learning Forth just to expand my horizon. So to be real > > > honest, who cares? For mind "expansion", learning to program without > > > structures would be an interesting mind exercise indeed. I learn Forth > > > completely as a hobby, I don't really need to, my day work is in a much > > > different fold, a fold where almost everything is done opposite of how > > > things are advocated here. > > > > "Mind expansion" is an excellent motivation for learning Forth, as it > > encourages very different problem-solving approaches. May I ask, what > > books or resources do you have available, and what Forth system are you > > using? > > > > 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." > > ================================================== > > Sure, I have read or just browsed through: > > 1) Starting Forth - read on-line > > 2) Forth Application Techniques - read but skipped multi-tasking stuff for now. > While going through FAT, all the sudden I was like, why was I so scared of the > stack, it is quite natural to work with it. It did feel like a light turned on. > > I mentioned it before, I find Forth Application Techniques to be the best > introduction to Forth I could lay my hands on. If it weren't for some useless, > contrary noise I run into on this forum, I would have started with it earlier. > > 3) Forth Programmer's Handbook - skipped assembler stuff for now, etc. > > 4) I started at some point with Stephen Pelc's "Programming Forth" but it felt > like it wasn't quite the best for somebody who's never heard of Forth before. > At times, the text makes use of constructs/concepts before they've been > explained. Or at least so it seemed to me. I plan on coming back to it at some > point. > > 5) Thinking Forth - I am reading it right now. > > I also spent some time on Jeff Fox's site, reading a bunch of articles there. > If you have some recommendations, I'd gladly accept, thanks. > > Also I have iForth and downloaded SwiftForth/VFX and GForth. GForth seems to > have more liberty to add new features faster, experimental features, etc. so > I like to play with it too. Plus GForth installs on pads and stuff. > Recommendations are welcomed. Wow, Thinking Forth and other Forth literature I am reading changes the way I write software now. Quite surprised to see Leo's tips nagging at me in my mind. It's exciting, because I wasn't sure at first if I wasn't wasting time with my Forth adventure.
[toc] | [prev] | [next] | [standalone]
| From | visualforth@rocketmail.com |
|---|---|
| Date | 2015-10-04 19:59 -0700 |
| Message-ID | <1e23b851-b798-4c86-ac6d-608ac4bdc696@googlegroups.com> |
| In reply to | #41958 |
On Friday, September 11, 2015 at 11:15:18 AM UTC-4, bor...@gmail.com wrote: > On Wednesday, September 9, 2015 at 5:47:59 PM UTC-5, Greg wrote: > > On Wednesday, September 9, 2015 at 1:59:25 AM UTC-5, Elizabeth D. Rather wrote: > > > On 9/8/15 10:28 AM, bor... wrote: > > > ... > > > > At this stage I am learning Forth just to expand my horizon. So to be real > > > > honest, who cares? For mind "expansion", learning to program without > > > > structures would be an interesting mind exercise indeed. I learn Forth > > > > completely as a hobby, I don't really need to, my day work is in a much > > > > different fold, a fold where almost everything is done opposite of how > > > > things are advocated here. > > > > > > "Mind expansion" is an excellent motivation for learning Forth, as it > > > encourages very different problem-solving approaches. May I ask, what > > > books or resources do you have available, and what Forth system are you > > > using? > > > > > > 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." > > > ================================================== > > > > Sure, I have read or just browsed through: > > > > 1) Starting Forth - read on-line > > > > 2) Forth Application Techniques - read but skipped multi-tasking stuff for now. > > While going through FAT, all the sudden I was like, why was I so scared of the > > stack, it is quite natural to work with it. It did feel like a light turned on. > > > > I mentioned it before, I find Forth Application Techniques to be the best > > introduction to Forth I could lay my hands on. If it weren't for some useless, > > contrary noise I run into on this forum, I would have started with it earlier. > > > > 3) Forth Programmer's Handbook - skipped assembler stuff for now, etc. > > > > 4) I started at some point with Stephen Pelc's "Programming Forth" but it felt > > like it wasn't quite the best for somebody who's never heard of Forth before. > > At times, the text makes use of constructs/concepts before they've been > > explained. Or at least so it seemed to me. I plan on coming back to it at some > > point. > > > > 5) Thinking Forth - I am reading it right now. > > > > I also spent some time on Jeff Fox's site, reading a bunch of articles there. > > If you have some recommendations, I'd gladly accept, thanks. > > > > Also I have iForth and downloaded SwiftForth/VFX and GForth. GForth seems to > > have more liberty to add new features faster, experimental features, etc. so > > I like to play with it too. Plus GForth installs on pads and stuff. > > Recommendations are welcomed. > > Wow, Thinking Forth and other Forth literature I am reading changes the > way I write software now. Quite surprised to see Leo's tips nagging at me in > my mind. > > It's exciting, because I wasn't sure at first if I wasn't wasting time with > my Forth adventure. I started with RSC-Forth in 1984 and worked with Forth - making a living self employed - ever since. Back then it was easy to start with Forth. There only was FIG-Forth, and RSC-Forth had differences very well documented - mostly differences because it was a Forth especially for microcontrollers. For a newcomer nowadays it is not that easy to decide which Forth to start with, especially with microcontrollers. Using Forth commercially it would be a good advice to use a commercial Forth, but for using Forth in one's free time this is quite a bit expensive in most cases. It would be great if each Forth offered would offer a compatibility package to make running all Forth programs possible on it. Forth is extensible, so this is feasible. DB.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2015-10-04 17:48 -1000 |
| Message-ID | <qo-dnZnEX4pmb4zLnZ2dnUU7-Yv46u6z@supernews.com> |
| In reply to | #42362 |
On 10/4/15 4:59 PM, visualforth@rocketmail.com wrote: > On Friday, September 11, 2015 at 11:15:18 AM UTC-4, bor...@gmail.com wrote: >> On Wednesday, September 9, 2015 at 5:47:59 PM UTC-5, Greg wrote: >>> On Wednesday, September 9, 2015 at 1:59:25 AM UTC-5, Elizabeth D. Rather wrote: >>>> On 9/8/15 10:28 AM, bor... wrote: >>>> ... >>>>> At this stage I am learning Forth just to expand my horizon. So to be real >>>>> honest, who cares? For mind "expansion", learning to program without >>>>> structures would be an interesting mind exercise indeed. I learn Forth >>>>> completely as a hobby, I don't really need to, my day work is in a much >>>>> different fold, a fold where almost everything is done opposite of how >>>>> things are advocated here. >>>> >>>> "Mind expansion" is an excellent motivation for learning Forth, as it >>>> encourages very different problem-solving approaches. May I ask, what >>>> books or resources do you have available, and what Forth system are you >>>> using? >>>> >>>> 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." >>>> ================================================== >>> >>> Sure, I have read or just browsed through: >>> >>> 1) Starting Forth - read on-line >>> >>> 2) Forth Application Techniques - read but skipped multi-tasking stuff for now. >>> While going through FAT, all the sudden I was like, why was I so scared of the >>> stack, it is quite natural to work with it. It did feel like a light turned on. >>> >>> I mentioned it before, I find Forth Application Techniques to be the best >>> introduction to Forth I could lay my hands on. If it weren't for some useless, >>> contrary noise I run into on this forum, I would have started with it earlier. >>> >>> 3) Forth Programmer's Handbook - skipped assembler stuff for now, etc. >>> >>> 4) I started at some point with Stephen Pelc's "Programming Forth" but it felt >>> like it wasn't quite the best for somebody who's never heard of Forth before. >>> At times, the text makes use of constructs/concepts before they've been >>> explained. Or at least so it seemed to me. I plan on coming back to it at some >>> point. >>> >>> 5) Thinking Forth - I am reading it right now. >>> >>> I also spent some time on Jeff Fox's site, reading a bunch of articles there. >>> If you have some recommendations, I'd gladly accept, thanks. >>> >>> Also I have iForth and downloaded SwiftForth/VFX and GForth. GForth seems to >>> have more liberty to add new features faster, experimental features, etc. so >>> I like to play with it too. Plus GForth installs on pads and stuff. >>> Recommendations are welcomed. >> >> Wow, Thinking Forth and other Forth literature I am reading changes the >> way I write software now. Quite surprised to see Leo's tips nagging at me in >> my mind. >> >> It's exciting, because I wasn't sure at first if I wasn't wasting time with >> my Forth adventure. > > I started with RSC-Forth in 1984 and worked with Forth - making a living self employed - ever since. > > Back then it was easy to start with Forth. There only was FIG-Forth, and RSC-Forth had differences very well documented - mostly differences because it was a Forth especially for microcontrollers. > > For a newcomer nowadays it is not that easy to decide which Forth to start with, especially with microcontrollers. Using Forth commercially it would be a good advice to use a commercial Forth, but for using Forth in one's free time this is quite a bit expensive in most cases. For private exploration or hobby programming, the evaluation versions of the commercial packages are a great choice. They are well-engineered and extremely well documented. They are basically limited only in that you cannot make commercial apps for distribution. > It would be great if each Forth offered would offer a compatibility package to make running all Forth programs possible on it. Forth is extensible, so this is feasible. The standards all go to great lengths to point out where an application may have dependencies or restrictions, so you have good advice as to what to do or avoid if you intend your program to be portable. And every standard-conforming Forth documents the implementation decisions it has made. This information allows a person with a Forth application to know what is needed for portability based on differences from the other system(s) it was written for. There's a very large set of those possible alternative choices, so it's impossible for an implementer who knows the choices he or she has made to know the universe of possible other expectations a "compatibility package" would have to consider. 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 | 2015-10-04 21:10 -0700 |
| Message-ID | <87fv1q7y6c.fsf@jester.gateway.sonic.net> |
| In reply to | #42364 |
"Elizabeth D. Rather" <erather@forth.com> writes: >> For a newcomer nowadays it is not that easy to decide which Forth to >> start with, especially with microcontrollers. > For private exploration or hobby programming, the evaluation versions > of the commercial packages are a great choice. Are any of them available for microcontrollers? I thought they were just for Windows/Linux/Mac. Hmm actually there's MPE Lite: http://mpeforth.com/xc7lite.htm There are some code size limitations but it sounds usable, at least on certain devices. I don't see a comparable version of Swift? Maybe I'm not looking in the right place. Meanwhile, I see Forth Application Techniques is $500 a copy on Amazon! http://www.amazon.com/dp/0966215613 Might be time for a new edition or printing ;-)
[toc] | [prev] | [next] | [standalone]
| From | Roberto Waltman <usenet@rwaltman.com> |
|---|---|
| Date | 2015-10-05 00:53 -0400 |
| Message-ID | <ag041b9669lulmmrn349jvkqsqruka47pv@4ax.com> |
| In reply to | #42365 |
Paul Rubin wrote: > >Meanwhile, I see Forth Application Techniques is $500 a copy on Amazon! > > http://www.amazon.com/dp/0966215613 > >Might be time for a new edition or printing ;-) Done - Listed in the same page for $18.99 R.W.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-10-05 03:51 -0400 |
| Message-ID | <muta2j$lqm$2@dont-email.me> |
| In reply to | #42366 |
On 10/5/2015 12:53 AM, Roberto Waltman wrote: > Paul Rubin wrote: >> >> Meanwhile, I see Forth Application Techniques is $500 a copy on Amazon! >> >> http://www.amazon.com/dp/0966215613 >> >> Might be time for a new edition or printing ;-) > > Done - Listed in the same page for $18.99 I like the way the $500 ad says, "This Fourth Edition is the latest, updated in 2006." Just below it is a listing for the fifth edition, lol. -- Rick
[toc] | [prev] | [next] | [standalone]
Page 3 of 7 — ← Prev page 1 2 [3] 4 5 6 7 Next page →
Back to top | Article view | comp.lang.forth
csiph-web