Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: Andrew Haley <andrew29@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 May 2012 18:38:15 -0500
Bernd Paysan <bernd.paysan@xxxxxx> wrote:
Andrew Haley wrote:
over + swap ?do dup c@ i c! 1+ loop drop
A bit simpler, use all idioms you have:
: move ( src dest len -- )
bounds ?do count i c! loop drop ;
Looks perfect, just 7 words.
I'm a great believer in what Brodie called "cliches". OVER + SWAP is
one such: I just know what it does, I don't see it as three words with
a stack action. As for the abuse of COUNT... :-)
Andrew.
.
- References:
- I beleive that forth could supplant ruby and perl and python if it wanted to
- From: quiet_lad
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: BruceMcF
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: Jason Damisch
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: Rod Pemberton
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: Elizabeth D. Rather
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: vandys
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: Andrew Haley
- Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- From: Bernd Paysan
- I beleive that forth could supplant ruby and perl and python if it wanted to
- Prev by Date: Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- Next by Date: Forth discussion, much appreciated
- Previous by thread: Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- Next by thread: Re: I beleive that forth could supplant ruby and perl and python if it wanted to
- Index(es):
Relevant Pages
|