Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #28713 > unrolled thread

ANN: 4tH version 3.62.2 has just been released!

Started byHans Bezemer <the.beez.speaks@gmail.com>
First post2014-02-23 16:16 +0100
Last post2014-02-24 16:22 +0100
Articles 7 — 2 participants

Back to article view | Back to comp.lang.forth


Contents

  ANN: 4tH version 3.62.2 has just been released! Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-23 16:16 +0100
    Re: ANN: 4tH version 3.62.2 has just been released! Paul Rubin <no.email@nospam.invalid> - 2014-02-23 18:35 -0800
      Re: ANN: 4tH version 3.62.2 has just been released! Paul Rubin <no.email@nospam.invalid> - 2014-02-23 19:05 -0800
      Re: ANN: 4tH version 3.62.2 has just been released! Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-24 10:57 +0100
        Re: ANN: 4tH version 3.62.2 has just been released! Paul Rubin <no.email@nospam.invalid> - 2014-02-24 02:26 -0800
          Re: ANN: 4tH version 3.62.2 has just been released! Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-24 15:29 +0100
          Re: ANN: 4tH version 3.62.2 has just been released! Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-24 16:22 +0100

#28713 — ANN: 4tH version 3.62.2 has just been released!

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-23 16:16 +0100
SubjectANN: 4tH version 3.62.2 has just been released!
Message-ID<530a10a7$0$2869$e4fe514c@news2.news.xs4all.nl>
You can download it at http://thebeez.home.xs4all.nl/4tH/download.html

Changes:
* Support for quotations was added.
* The library files now support coroutines, HTML generation,
  Adler32, MD5, SHA-1 and SHA-256 checksum routines and several 
  new randomizers.
* ANS Forth conversion and library specific support in the
  preprocessor were moved to external preprocessor libraries.
* The object orientation method definition syntax has been
  cleaned up.
* The closures syntax has been cleaned up.
* Most preprocessor libraries don't use any registers anymore.
* Symbol definition and verbose options were added to the
  preprocessor.
* The preprocessor now supports _#_, $#$, @dup, @over, @nip, @cr
  and the new @cell function.
* The preprocessor has been vastly enhanced, so you can now
  execute, save or generate a C source without calling 4th 
  separately.
* A tiny webserver was added to the examples.

Features:
* Comes with an extensive library, featuring hundreds
  of words covering ANS-Forth compatibility, user defined stacks,
  lists, XLS files, floating point, etc. etc.
* Almost 95% of the CORE wordset is supported.
* Comes with a nice, 550 page manual.
* Over 200 examples and 350 libraries.
* Native packages for MS-DOS, MS-Windows, Android, Coherent, Linux,
  including the Ben Nanonote and the Raspberry Pi.

Hans Bezemer

[toc] | [next] | [standalone]


#28725

FromPaul Rubin <no.email@nospam.invalid>
Date2014-02-23 18:35 -0800
Message-ID<7xfvn9fdb6.fsf@ruckus.brouhaha.com>
In reply to#28713
Hans Bezemer <the.beez.speaks@gmail.com> writes:
> You can download it at http://thebeez.home.xs4all.nl/4tH/download.html

Nice.  The distro also includes an interesting collection of Forth code
(applications, libraries, conversions of classic old Basic games, etc).
Compiling the C code took just a few seconds.  I played with it a few
minutes.  I had never used a traditional Forth screen editor before, so
that was fun.  I didn't figure out how to get an interactive prompt that
would let me define new functions.  I got one that allowed interpreting
stuff, but typing new colon definitions didn't work.

Compiled size of the program on 32-bit linux is around 65k, which seems
kind of large, but ok.  I wonder how well it would work on one of those
little ARM development boards (Freescale STM32 or so) or how much
porting would be needed.

[toc] | [prev] | [next] | [standalone]


#28726

FromPaul Rubin <no.email@nospam.invalid>
Date2014-02-23 19:05 -0800
Message-ID<7x38j9xlas.fsf@ruckus.brouhaha.com>
In reply to#28725
Paul Rubin <no.email@nospam.invalid> writes:
> Nice.  The distro also includes an interesting collection of Forth code

One other issue: the source distro has a 4tHmanual.txt file but the web
site has a nicely formatted pdf with tables and diagrams and stuff.  How
was the manual made, and is the source code (or some other editable
form) available?

[toc] | [prev] | [next] | [standalone]


#28734

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-24 10:57 +0100
Message-ID<530b1790$0$2972$e4fe514c@news2.news.xs4all.nl>
In reply to#28725
Paul Rubin wrote:

> Hans Bezemer <the.beez.speaks@gmail.com> writes:
> Nice.  The distro also includes an interesting collection of Forth code
> (applications, libraries, conversions of classic old Basic games, etc).
> Compiling the C code took just a few seconds.  I played with it a few
> minutes.  I had never used a traditional Forth screen editor before, so
> that was fun.  I didn't figure out how to get an interactive prompt that
> would let me define new functions.  I got one that allowed interpreting
> stuff, but typing new colon definitions didn't work.
That's what the FAQ is for ;-)
 
> Compiled size of the program on 32-bit linux is around 65k, which seems
> kind of large, but ok.  I wonder how well it would work on one of those
> little ARM development boards (Freescale STM32 or so) or how much
> porting would be needed.
Well, it's half the size of gforth (exe only, 32 bit) and the exe is the
only thing you need. You can strip it down significantly (if you want) so
you'll have only the compiler and the VM.

The manual is made in LyX - which translates to LaTeX (hence the nice
manual). The public version is at
http://thebeez.home.xs4all.nl/ForthPrimer/

The "sourcecode" of the ENTIRE manual isn't free, but everything is
negotiable. ;-)

Hans Bezemer

[toc] | [prev] | [next] | [standalone]


#28736

FromPaul Rubin <no.email@nospam.invalid>
Date2014-02-24 02:26 -0800
Message-ID<7x61o4x0vn.fsf@ruckus.brouhaha.com>
In reply to#28734
Hans Bezemer <the.beez.speaks@gmail.com> writes:
>> I didn't figure out how to get an interactive prompt
> That's what the FAQ is for ;-)

I didn't find the FAQ in either the web site or the source distro.  Is
there a url?  It might be nice if the docs were a bit better indexed.

>> Compiled size of the program on 32-bit linux is around 65k,
> Well, it's half the size of gforth (exe only, 32 bit)

Yes, gforth is a very complete implementation.  It's interesting that
many of these Forth systems have as much code as some fairly nice Lisps
that have appeared over the years.  Forth of courses uses far less
memory at runtime.  
 
> The manual is made in LyX ..
> http://thebeez.home.xs4all.nl/ForthPrimer/

Oh cool, I've been wanting to try out LyX too.  Thanks.

PS, it would be great if you could add gforth-style locals to 4th.

[toc] | [prev] | [next] | [standalone]


#28741

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-24 15:29 +0100
Message-ID<530b5739$0$2874$e4fe514c@news2.news.xs4all.nl>
In reply to#28736
Paul Rubin wrote:

> Hans Bezemer <the.beez.speaks@gmail.com> writes:
>>> I didn't figure out how to get an interactive prompt
>> That's what the FAQ is for ;-)
> 
> I didn't find the FAQ in either the web site or the source distro.  Is
> there a url?  It might be nice if the docs were a bit better indexed.
I suppose you got the 4tHmanual.txt:

habe@linux-471m:~/Lyx/4tHdocs> grep -i Frequently 4tHmanual.txt
    Chapter 5 Frequently asked questions
Frequently asked questions
frequently use. 4tH features a small peephole optimizer that
there are three variables that are used more frequently. They are
frequently used variables:
are accessed more frequently.

>>> Compiled size of the program on 32-bit linux is around 65k,
>> Well, it's half the size of gforth (exe only, 32 bit)
> 
> Yes, gforth is a very complete implementation.  It's interesting that
> many of these Forth systems have as much code as some fairly nice Lisps
> that have appeared over the years.  Forth of courses uses far less
> memory at runtime.
Mine will do quite happily on a 256K machine. ;-) That has to do with the
(if I say so myself) quite elaborate memory management.

Compilation:
- At startup, only the source is in memory. This will be reused for string
constants;
- A small controlstack of 64 entries is allocated;
* Now the source is analyzed
- After analysis the symbol table is allocated. Since symbols can (and
usually WILL be discarded) only the highest number of required entries is
allocated (so if a source needs 20, discards 10 and then again allocates
15, 25 is the number of entries).
- The object space (which is also estimated now) is allocated.
- During compilation the runtime requirements are calculated and stored in
the object.

Execution:
- Object is loaded;
- Memory is allocated (calculated at compilation time).

The whole thing is sandboxed, so you can have several in memory at the same
time (see: 4tsh).

Hans Bezemer

[toc] | [prev] | [next] | [standalone]


#28743

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-24 16:22 +0100
Message-ID<530b63af$0$2840$e4fe514c@news2.news.xs4all.nl>
In reply to#28736
Paul Rubin wrote:

> PS, it would be great if you could add gforth-style locals to 4th.
It's not gonna happen any time soon:
- It's a lot of VM overhead (you'll have to check and free locals at each
EXIT);
- It interferes with my peephole optimizer (which does tail recursion,
amongst other things);
- I don't particularly like locals.

I got some "fix" for locals in the library (locals.4th), but I only use it
only if I *really, really* have to (once, so far). It's butt ugly, but
(IMHO) so are locals.

Hans Bezemer

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web