Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #36123 > unrolled thread
| Started by | Gerry Jackson <gerry@jackson9000.fsnet.co.uk> |
|---|---|
| First post | 2015-01-29 20:27 +0000 |
| Last post | 2015-01-31 06:29 -0800 |
| Articles | 12 — 8 participants |
Back to article view | Back to comp.lang.forth
Attila Forth compiler Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-01-29 20:27 +0000
Re: Attila Forth compiler "WJ" <w_a_x_man@yahoo.com> - 2015-01-29 22:54 +0000
Re: Attila Forth compiler "Alex McDonald" <blog@rivadpm.com> - 2015-01-30 15:36 +0000
Re: Attila Forth compiler "Alex McDonald" <blog@rivadpm.com> - 2015-01-30 15:40 +0000
Re: Attila Forth compiler anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-30 15:56 +0000
Re: Attila Forth compiler Richard Owlett <rowlett@cloud85.net> - 2015-01-30 11:09 -0600
Re: Attila Forth compiler "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-31 02:58 -0500
Re: Attila Forth compiler anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-31 11:48 +0000
Re: Attila Forth compiler visualforth@rocketmail.com - 2015-01-30 08:42 -0800
Re: Attila Forth compiler "Alex McDonald" <blog@rivadpm.com> - 2015-01-30 17:16 +0000
Re: Attila Forth compiler Richard Owlett <rowlett@cloud85.net> - 2015-01-30 11:19 -0600
Re: Attila Forth compiler Christopher Douglas <christopherdouglas35@gmail.com> - 2015-01-31 06:29 -0800
| From | Gerry Jackson <gerry@jackson9000.fsnet.co.uk> |
|---|---|
| Date | 2015-01-29 20:27 +0000 |
| Subject | Attila Forth compiler |
| Message-ID | <mae51a$5hb$1@dont-email.me> |
I stumbled across the web-site below. Searching comp.lang.forth on Google Groups for Attila found nothing so people may not be aware of this system and may find it of interest. http://www.threaded-interpreter.org/manual/book/attila.html -- Gerry
[toc] | [next] | [standalone]
| From | "WJ" <w_a_x_man@yahoo.com> |
|---|---|
| Date | 2015-01-29 22:54 +0000 |
| Message-ID | <maedn9$8rs$1@dont-email.me> |
| In reply to | #36123 |
Gerry Jackson wrote: > I stumbled across the web-site below. > Searching comp.lang.forth on Google Groups > for Attila found nothing so people may not > be aware of this system and may find it of > interest. > > > http://www.threaded-interpreter.org/manual/book/attila.html I broke your lines for you. When you post to a newsgroup, you must limit the length of your lines. Attila Forth seems much more powerful than ANS Forth. MAP( xt elem -- ) Destructively map the word xt over the elements of the list from elem, replacing each element with the result of executing xt with the previous value on the top of the stack. FOLDR( xt acc elem -- fac )"fold are" Fold the word xt over the elements of the list from right to left. Theword being folded is expected to have a stack picture ( accbefore v -- accafter ) and is passed the accumulated value (initially ac) and each element's value. FOLDL( xt acc elem -- fac )"fold el" Fold the word xt over the elements of the list from left to right. Theword being folded is expected to have a stack picture ( accbefore v -- accafter ) and is passed the accumulated value (initially ac) and each element's value.
[toc] | [prev] | [next] | [standalone]
| From | "Alex McDonald" <blog@rivadpm.com> |
|---|---|
| Date | 2015-01-30 15:36 +0000 |
| Message-ID | <mag8d2$hmp$1@dont-email.me> |
| In reply to | #36128 |
on 29/01/2015 22:54:37, "WJ" wrote:
> Gerry Jackson wrote:
>
>
>> I stumbled across the web-site below.
>> Searching comp.lang.forth on Google Groups
>> for Attila found nothing so people may not
>> be aware of this system and may find it of
>> interest.
>>
>>
>> http://www.threaded-interpreter.org/manual/book/attila.html
>
>
>
> Attila Forth seems much more powerful than ANS Forth.
What makes you think that? Did you read the document? It states "It
adheres closely to the Forth language standard promulgated by ANSI."
>
>
> MAP( xt elem -- )
>
> Destructively map the word xt over the elements of the list
> from elem, replacing each element with the result of executing
> xt with the previous value on the top of the stack.
>
These are just words the author of Attila has provided to operate on
doubly-linked lists. They are not inherent to the language.
http://www.threaded-interpreter.org/manual/book/sec_words_lists.html
Here's an ANS Forth version of a list iteration:
: iterate ( i*x node iterator -- i*x' )
\ iterate over a linked list of nodes
>r
begin ?dup
while
r@ over @
>r execute r>
repeat r> drop ;
ITERATE is more generic and more useful than MAP, in that it allows a
wider range of results than just replacing each element as in MAPs case.
ITERATE can be used to build Attila's FOLDR and FOLDL and a wide range of
other "higher order list operations".
(As an aside, I'd argue that the author has got the operands MAP ( xt
elem -- ) the wrong way round; you're more likely to be operating with
elem on the top of the stack before wanting a MAP, so requiring a SWAP to
get the XT in the right place.)
[toc] | [prev] | [next] | [standalone]
| From | "Alex McDonald" <blog@rivadpm.com> |
|---|---|
| Date | 2015-01-30 15:40 +0000 |
| Message-ID | <mag8ji$inc$1@dont-email.me> |
| In reply to | #36153 |
on 30/01/2015 15:36:34, "Alex McDonald" wrote: > on 29/01/2015 22:54:37, "WJ" wrote: >> Gerry Jackson wrote: >> >> >>> I stumbled across the web-site below. >>> Searching comp.lang.forth on Google Groups >>> for Attila found nothing so people may not >>> be aware of this system and may find it of >>> interest. >>> >>> >>> http://www.threaded-interpreter.org/manual/book/attila.html >> >> >> >> Attila Forth seems much more powerful than ANS Forth. > > What makes you think that? Did you read the document? It states "It > adheres closely to the Forth language standard promulgated by ANSI." > >> >> >> MAP( xt elem -- ) >> >> Destructively map the word xt over the elements of the list >> from elem, replacing each element with the result of executing >> xt with the previous value on the top of the stack. >> > > These are just words the author of Attila has provided to operate on > doubly-linked lists. They are not inherent to the language. > http://www.threaded-interpreter.org/manual/book/sec_words_lists.html > > Here's an ANS Forth version of a list iteration: > >: iterate ( i*x node iterator -- i*x' ) > \ iterate over a linked list of nodes I managed to trim the comment, sorry. \ applying the xt 'iterator' to each node in turn > >r > begin ?dup > while > r@ over @ > >r execute r> > repeat r> drop ; > > ITERATE is more generic and more useful than MAP, in that it allows a > wider range of results than just replacing each element as in MAPs > case. ITERATE can be used to build Attila's FOLDR and FOLDL and a wide > range of other "higher order list operations". > > (As an aside, I'd argue that the author has got the operands MAP ( xt > elem -- ) the wrong way round; you're more likely to be operating with > elem on the top of the stack before wanting a MAP, so requiring a SWAP > to get the XT in the right place.) >
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-01-30 15:56 +0000 |
| Message-ID | <2015Jan30.165641@mips.complang.tuwien.ac.at> |
| In reply to | #36123 |
Gerry Jackson <gerry@jackson9000.fsnet.co.uk> writes:
>I stumbled across the web-site below. Searching comp.lang.forth on
>Google Groups for Attila found nothing so people may not be aware of
>this system and may find it of interest.
>
>http://www.threaded-interpreter.org/manual/book/attila.html
That's an interesting system that employs some of the implementation
ideas of Gforth, but does a new implementation with less focus on
speed and convenience, and apparently more focus on small size.
It's startup time of more than 2s on my laptop is startling, however.
Looking at the accessed files, it loads lots of stuff from source
files on startup.
And otherwise it's also not particularly fast:
[b8:/tmp:6473] time attila /usr/share/gforth/0.7.0/siev.fs main.fs
15.672u 0.099s 15.777r 99.96%
[b8:/tmp:6474] time gforth-fast /usr/share/gforth/0.7.0/siev.fs main.fs
0.244u 0.004s 0.252r 98.50%
Let's see how the size turns out:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
anton 20095 11.9 0.0 10380 372 pts/25 S+ 17:06 0:09 attila
anton 20207 0.0 0.0 20544 1384 pts/26 S+ 17:06 0:00 gforth-fast
So it's RSS (resident set size in KB, an approximation of the physical
memory used) is indeed quite a bit smaller than for gforth-fast. The
amount of CPU used when waiting for user input at the outer
interpreter is worrying, though.
- 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 2014: http://www.euroforth.org/ef14/
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2015-01-30 11:09 -0600 |
| Message-ID | <GpudnWMV0d9KJ1bJnZ2dnUU7-R-dnZ2d@supernews.com> |
| In reply to | #36157 |
Anton Ertl wrote: > Gerry Jackson <gerry@jackson9000.fsnet.co.uk> writes: >> I stumbled across the web-site below. Searching comp.lang.forth on >> Google Groups for Attila found nothing so people may not be aware of >> this system and may find it of interest. >> >> http://www.threaded-interpreter.org/manual/book/attila.html > > That's an interesting system that employs some of the implementation > ideas of Gforth, but does a new implementation with less focus on > speed and convenience, and apparently more focus on small size. > > It's startup time of more than 2s on my laptop is startling, however. > Looking at the accessed files, it loads lots of stuff from source > files on startup. My reading of "Starting Attila" is that was an intentional trade off. "...The core Attila system is really minimal: all the "real" language features are loaded and compiled from source code when the system starts, hence the delay. The advantage of this is that you can customise exactly what gets loaded. ..." > > And otherwise it's also not particularly fast: > I quickly browsed http://www.threaded-interpreter.org and didn't see any indication the execution speed &/or efficiency was a goal.
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <buzz@notnotnontnooatno.cmm> |
|---|---|
| Date | 2015-01-31 02:58 -0500 |
| Message-ID | <op.xtbhskvhv6dtjm@localhost> |
| In reply to | #36157 |
On Fri, 30 Jan 2015 10:56:41 -0500, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote: > And otherwise it's also not particularly fast: > > [b8:/tmp:6473] time attila /usr/share/gforth/0.7.0/siev.fs main.fs > 15.672u 0.099s 15.777r 99.96% > [b8:/tmp:6474] time gforth-fast /usr/share/gforth/0.7.0/siev.fs main.fs > 0.244u 0.004s 0.252r 98.50% > gforth-fast? Shouldn't you compare it to gforth-itc? Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-01-31 11:48 +0000 |
| Message-ID | <2015Jan31.124840@mips.complang.tuwien.ac.at> |
| In reply to | #36181 |
"Rod Pemberton" <buzz@notnotnontnooatno.cmm> writes:
>On Fri, 30 Jan 2015 10:56:41 -0500, Anton Ertl
><anton@mips.complang.tuwien.ac.at> wrote:
>
>> And otherwise it's also not particularly fast:
>>
>> [b8:/tmp:6473] time attila /usr/share/gforth/0.7.0/siev.fs main.fs
>> 15.672u 0.099s 15.777r 99.96%
>> [b8:/tmp:6474] time gforth-fast /usr/share/gforth/0.7.0/siev.fs main.fs
>> 0.244u 0.004s 0.252r 98.50%
>>
>
>gforth-fast? Shouldn't you compare it to gforth-itc?
Why? siev.fs, like most other Forth programs, does not have any
dependency on ITC and works nicely on gforth-fast. So why would one
use gforth-itc when one wants to run siev.fs on a fast Forth system?
But in case you have an ITC-dependent program and think that its
performance characteristics are similar to siev.fs, here's a measurement on the same machine:
[b8:/tmp:6472] time gforth-itc /usr/share/gforth/0.7.0/siev.fs main.fs
0.447u 0.000s 0.450r 99.31%
- 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 2014: http://www.euroforth.org/ef14/
[toc] | [prev] | [next] | [standalone]
| From | visualforth@rocketmail.com |
|---|---|
| Date | 2015-01-30 08:42 -0800 |
| Message-ID | <44946733-46dd-42ad-a641-2afbb8dffeb9@googlegroups.com> |
| In reply to | #36123 |
On Thursday, January 29, 2015 at 3:26:53 PM UTC-5, Gerry wrote: > I stumbled across the web-site below. Searching comp.lang.forth on > Google Groups for Attila found nothing so people may not be aware of > this system and may find it of interest. > > http://www.threaded-interpreter.org/manual/book/attila.html > > -- > Gerry I am wondering why it says "Don't try to install Attila into a directory that has a space in its path: it won't work, and will fail as soon as the build system tries to create any of the generated files. If your username contains a space, then so typically will the path to your home directory. Unfortunately the only solution is to build Attila under a directory somewhere else, with a more friendly pathname." If it is FORTH, it should be possible to use names with space included: simply put the name between quotation marks. Win32Forth does this. Works great. May be Attila has problems with strings. Dirk.
[toc] | [prev] | [next] | [standalone]
| From | "Alex McDonald" <blog@rivadpm.com> |
|---|---|
| Date | 2015-01-30 17:16 +0000 |
| Message-ID | <mage84$cb5$1@dont-email.me> |
| In reply to | #36162 |
on 30/01/2015 16:42:40, wrote: > On Thursday, January 29, 2015 at 3:26:53 PM UTC-5, Gerry wrote: >> I stumbled across the web-site below. Searching comp.lang.forth on >> Google Groups for Attila found nothing so people may not be aware of >> this system and may find it of interest. >> >> http://www.threaded-interpreter.org/manual/book/attila.html> >> -- >> Gerry > > I am wondering why it says > "Don't try to install Attila into a directory that has a space in its > path: it won't work, and will fail as soon as the build system tries > to create a ny of the generated files. If your username contains a > space, then so typic ally will the path to your home directory. > Unfortunately the only solution is to build Attila under a directory > somewhere else, with a more friendly p athname." > > If it is FORTH, it should be possible to use names with space > included: sim ply put the name between quotation marks. Win32Forth > does this. Works great . > May be Attila has problems with strings. > > Dirk. > Oracle WebLogic Server isn't cheap, and it has the same issue. It's not unusual for Windows software to have this issue, especially where scripts are used to do the build.
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2015-01-30 11:19 -0600 |
| Message-ID | <2NadnRMqGa6EIFbJnZ2dnUU7-bWdnZ2d@supernews.com> |
| In reply to | #36162 |
visualforth@rocketmail.com wrote: > On Thursday, January 29, 2015 at 3:26:53 PM UTC-5, Gerry wrote: >> I stumbled across the web-site below. Searching comp.lang.forth on >> Google Groups for Attila found nothing so people may not be aware of >> this system and may find it of interest. >> >> http://www.threaded-interpreter.org/manual/book/attila.html >> >> -- >> Gerry > > I am wondering why it says > "Don't try to install Attila into a directory that has a space in its path: it won't work, and will fail as soon as the build system tries to create any of the generated files. If your username contains a space, then so typically will the path to your home directory. Unfortunately the only solution is to build Attila under a directory somewhere else, with a more friendly pathname." > > If it is FORTH, it should be possible to use names with space included: simply put the name between quotation marks. Win32Forth does this. Works great. > May be Attila has problems with strings. > > Dirk. > The answer is in the previous sentences: "Another wrinkle with Windows (which can affect OS X users too) concerns pathnames. Unix tools aren't friendly with pathnames containing spaces; Forth is even less so, and so Attila isn't set-up to cope well with them." IOW, it made the author's life simpler :)
[toc] | [prev] | [next] | [standalone]
| From | Christopher Douglas <christopherdouglas35@gmail.com> |
|---|---|
| Date | 2015-01-31 06:29 -0800 |
| Message-ID | <5434cc87-d3da-49fc-a720-835244745fad@googlegroups.com> |
| In reply to | #36123 |
I am a learner & even need an input buffer
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.forth
csiph-web