Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Peter Knaggs" Newsgroups: comp.lang.forth Subject: Re: Forth on JVM (was: Epic Fail) Date: Thu, 01 May 2014 07:52:09 +0100 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: <2014Apr30.112412@mips.complang.tuwien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="8c7a470a0c16a8a8641affb1a9a6ce52"; logging-data="18424"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cSXV40D2NdSKhVS/Z5BuZ" User-Agent: Opera Mail/12.17 (Win32) Cancel-Lock: sha1:tm+CCPk/yS9gSrTJN511s9l2VaE= Xref: csiph.com comp.lang.forth:30027 On Wed, 30 Apr 2014 10:24:12 +0100, Anton Ertl wrote: > > I guess you could do an interactive Forth that uses reflection to > generate more JVM code dynamically, but it's another complication. That is exactly what my JavaForth system does. > The most problematic thing, though, is that the JVM does not have > addresses and address arithmetic and does not deal with uninterpreted > bytes and cells (machine words). One can think about emulating this > through an array of ints (with 1 cells=1 chars=1 au=1 long) or maybe > longs, or maybe an array of bytes (with 1 chars=1 au=1 byte, and maybe > 1 cells = 4 bytes), but these options are inefficient in many ways, > and certainly far from the spirit of Forth. I used an array of objects, 1 cell = 2 chars = 4 au. > What would be more like it would be a Forth/Factor-like language that > is designed for the JVM: It would use a stack with statically know > stack depth and statically known types for stack items (somewhat > strongForth-like), would not have addresses, but provide objects and > arrays and various other JVM features. That would essentially be a > layer of dictionary and interactivity on top of the JVM. There is a Holon Forth system that compiles directly to JVM in this way. -- Peter Knaggs