Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Why is GFor...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 26 of 30 Topic 4030 of 4160
Post > Topic >>

Re: Why is GForth-ITC fast?

by Albert van der Horst <albert@[EMAIL PROTECTED] > May 2, 2008 at 04:46 PM

In article <481b107e$0$5017$426a74cc@[EMAIL PROTECTED]
>,
Thomas ****in  <****in@[EMAIL PROTECTED]
> wrote:
>According to Robert Spykerman  <robert.spykerman@[EMAIL PROTECTED]
>:
<SNIP>
>
>> By the way, I've been warned by at least one person in the know at
>> Apple not to use int 0x80 syscalls on OS X, which apparently have been
>> left in for 'legacy code'. Nevertheless I got some pointers to where
>> in the source to look.
>>
>> Does this sort of taboo exist on other *nixes as well? (I ask because
>> I'm still very much a nix nub/scrub)
>
>In the Unix world, the libc API is standard, at least at the source
>level. If your code performs a call to the read() function, then ten
>years later it still compiles and still works. The kernel API, however,
>is not necessarily as stable as that. Details on system calls may change
>between system versions. The Linux kernel has a rather good record at
>backward binary compatibility, but this does not prevent some system
>calls from being deprecated over time, and new ones to be added.
>Application code which uses the libc API automatically adapts to the new
>kernel API, since only the libc is modified and the application code
>talks to the kernel only through the libc (with dynamic linking, this
>adaptation process operates without needing recompilation).
>
>Besides, distinct Unix systems have quite different sets of system
>calls, whereas they tend to stick to similar libc API (because of the
>POSIX / Single Unix standard).
>
>This is why cir***venting the libc and performing direct system calls is
>generally considered as a bad idea in the Unix world. In quite the same
>way than in the Windows world, you are supposed to use the Win32 API and
>not call the NT kernel which lies beneath. This does not prevent you
>from performing direct system calls, but it somewhat explains the lack
>of do***entation.
>
>
>Of course, using the libc has a cost, namely the very unforthish dynamic
>linking with a mastodonth libc. But all those systems have lived with
that
>concept for quite some time now, and it is usually considered that they
>are quite happy with it.

I'm pretty well aware of all this. Being in Rome, do as the Romans do.
The system implementation language of Unix is c.

But with c comes the c compiler, the c libraries etc. If you have to
call the c-compiler anyway, there is not much charm left in Forth.
The small incompatibilities between kernels is in practice a less
impediment than changes in the c stuff. See below.
It is a little like the decisions Chuck Moore takes, bypassing the
BIOS for screen I/O. ****ting colorforth is not pretty, but actually
it is easier than sup****ting a new graphics card with X-systems.
(This claim cannot be easily checked, because the battle for the
information is fought by the Penguinistas, Chuck happily uses
information from Linux drivers.)

It took me less than 14 days to get ciforth up and running on
two 64 bit systems each, Dec Alpha and AMD. Lately on the AMD64
I tried to statically link a c-program that did nothing more than a
write syscall with "hello world" , no printf,
in order to find out about syscalls in a 64 bit system.
Guess what? The assembler output of the c-compiler ran a whopping
0 kbyte. 1]  The linker output s****ted about the same.
This is two orders of magnitude above my Forth system, interpreter,
scripter and compiler.

It may be frowned upon, but adapting lina to new versions of
OS's is probably less effort than gforth keeping up with new
version of gcc.

>       --Thomas ****in

Groetjes Albert.

1] At the moment of writing it struck me as totally unbelievable.
So I logged in to my AMD 64 bit system. Indeed 568 Kbyte and
change.

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert@[EMAIL PROTECTED]
 &=n http://home.hccnet.nl/a.w.m.van.der.horst
 




 30 Posts in Topic:
Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-04-30 19:30:05 
Re: Why is GForth-ITC fast?
"winston19842005@[EM  2008-04-30 21:29:44 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 01:42:28 
Re: Why is GForth-ITC fast?
anton@[EMAIL PROTECTED]   2008-05-01 10:54:45 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-01 17:26:57 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 22:22:50 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 09:00:18 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 04:43:05 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-01 12:45:38 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 12:56:26 
Re: Why is GForth-ITC fast?
Andrew Haley <andrew29  2008-05-01 11:41:05 
Re: Why is GForth-ITC fast?
anton@[EMAIL PROTECTED]   2008-05-01 18:22:56 
Re: Why is GForth-ITC fast?
Bernd Paysan <bernd.pa  2008-05-01 22:01:54 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 22:45:04 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-01 23:44:26 
Re: Why is GForth-ITC fast?
Andrew Haley <andrew29  2008-05-02 04:27:59 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-01 12:31:12 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-01 16:33:12 
Re: Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-05-01 17:12:16 
Re: Why is GForth-ITC fast?
mhx@[EMAIL PROTECTED] (M  2008-05-02 02:53:47 
Re: Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-05-01 19:44:40 
Re: Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-05-01 17:16:42 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 20:17:47 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 21:06:05 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-02 13:00:46 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-02 16:46:32 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-02 18:11:41 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-02 06:12:42 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-02 17:40:35 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-03 10:12:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 18 20:43:50 CDT 2008.