Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeder.erje.net!eu.feeder.erje.net!news.szaf.org!news.gnuher.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Bernd Paysan Newsgroups: comp.lang.forth Subject: Re: State and the standard ... Date: Sat, 09 Mar 2013 17:31:06 +0100 Organization: 1&1 Internet AG Lines: 50 Message-ID: References: <497045b3-642d-4cf9-b903-9306001c88d6@googlegroups.com> <28mdnefu641F26vMnZ2dnUVZ_qydnZ2d@supernews.com> <2013Mar8.181401@mips.complang.tuwien.ac.at> NNTP-Posting-Host: p5dcd618a.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: online.de 1362846667 16380 93.205.97.138 (9 Mar 2013 16:31:07 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sat, 9 Mar 2013 16:31:07 +0000 (UTC) User-Agent: KNode/4.10.1 Xref: csiph.com comp.lang.forth:20493 Elizabeth D. Rather wrote: >> There are also people writing that the standard is not about portable >> programs, but portable programmers, implying that features that allow >> porting programs are unnecessary. The whole concept of taking a >> program and running it unchanged on another system on another platform >> appears alien and not desirable to a significant part of the Forth >> community. > > What's a portable *program*? If it's a program of any significance, it > has a user interface that's dependent on an underlying host OS and the > language interface to it. Or it's an application that supports special > hardware, proprietary protocols, etc. Tell me about all the whole C > programs that run on any platform with any C compiler without change. Yes, but let's consider reality. If I write a C program for Linux, I have two free compilers to use, and two proprietary: clang or gcc for the free ones, Portland or Intel's C compiler for proprietary. They are pretty interchangeable, as they all support at least most GCC extensions (which is also somewhat true for GCC itself, it sometimes doesn't support all GCC extensions ;-). I tried compiling Gforth on clang a few months ago, and there were only some minor quirks, easy to fix. clang is still not as good as GCC, concerning code quality, and it's also a lot slower to compile the engine. Compare that to porting MINOS to VFX. Yes, we have the situation here that everybody writes his own kernel and adds own quirks (like MPE's source code tokenzier), and I'm definitely in Anton's camp here: I would rather advise to fix these quirks instead of working around them. If we have less quirky systems, our programs would be more portable. And when comparing Forth systems, VFX is certainly one of the least quirky ones, and certainly also not one of those which you can easily rewrite yourself in an afternoon - not with the analytical compiler. For sure, a common C interface syntax would do us all good, to write non- trivial portable programs on hosted systems. I've recently done work with stranger C libraries than I was used to, i.e not as neat and clean as OpenGL, but something like the JNI interface. A C++-style library written in C. Function pointers in structs, callbacks, structs passed as arguments (*not* pointers to structs, structs as such)... and you absolutely need to call Java if you have a serious Forth application on Android. The good point: After you have managed to access the JNI library, the calls to Java from Forth are actually easier than the calls to C from Forth. I use my current-object principle, so it feels like a Forth-OOP system. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/