From: Eric Hodel Date: 2004-10-11T04:54:14+09:00 Subject: Re: Ruby VM Projects --B9BE8dkJ1pIKavwa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable David Ross (dross@code-exec.net) wrote: > Eric Hodel wrote: >=20 > >>its not even being recreated in C. > > > >There are few compelling reasons to use C. There are few non-Japanese > >speaking Ruby interpreter hackers (I mean eval.c) because it is very > >difficult to get over the language barrier. I believe matz has said > >that eval.c contains "black magic". > > Use C for speed. There is no need to use C to be fast. Read the Squeak paper. In a matter of months (18?) the Squeak team had an implementation of Smalltalk written in Smalltalk that was reasonably comparable in speed to commercial Smaltalk implementations *before JIT*. This included things like a multimedia library that was capable of synthesizing multiple channels in real-time and a full GUI layer. The Squeakers used two key components to get this advantage. They used a Smalltalk subset that could be compiled to C, and they inlined everything they could. (The Squeakers had several advantages over Ruby, I'll have to write about them sometime.) I must note the story of a JIT on the HPPA architecture that was faster than the compiled version because the JIT was good enough to optimize for actual usage. A combination of these approaches allows you to be fast and easy to hack. I prefer writing Ruby over writing C, and if I have to use C at all, I'd rather have it generated for me so I don't have to think about it. > Yes, eval.c is not so great, and a syntax error which isnt very > specific as what is wrong is bad. Syntax errors are found during parsing, not interpreting. --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --B9BE8dkJ1pIKavwa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQFBaZNlMypVHHlsnwQRAgmlAKDQ6EuCH18Wnoa67TahIPkqtOzsJQCfRuM+ enuS8i1vJJCpT7BKXwvMaYY= =EeaT -----END PGP SIGNATURE----- --B9BE8dkJ1pIKavwa--