On Sat, Jan 11, 2003 at 06:34:56PM +0530, Gopal V wrote: > If memory serves me right, Nicholas Clark wrote: > > fussy. I presume Rhys is thinking about compiling C code to parrot, and then > > linking through to native C code (such as the native standard C library) via > > parrot. > > Nope ... At least for our .NET platorm stuff ,we are planning to compile > glibc into IL so that the "native ABI" is accessed only via the engine.
Oh right. As you commented on IRC, I am very wrong. > Rhys has also been really cool about the data stored via C ... So legacy > code which used fixed size files (otherwise called "records") will be useful. > This allows us to declare 8bit characters and strings of those and all the > stuff we're used to with C like unions ... (C# has 16bit chars, and strings > are UTF8 encoded , IIRC) ... That doesn't sound right. But if it is right, then it sounds very wrong. (Translation: Are you sure about your terms, because what you describe sounds wonky. Hence if they are using UTF8 but with 16 bit chars, that feels like a silly design decision to me. Perl 5 performance is not enjoying a variable length encoding, but using an 8 bit encoding in 8 bit chars at least makes it small in memory.) > So even with all the type-safety of IL we can run the following code ... > > float a=3.14; > int b=*((int*)(&(a))); Ooh. So what happens if I try to run: char *a = 0; *a++; :-) Does the VM just "segfault" the failing thread, rather than all threads in a process? > What Rhys is using right now is a custom stdlib which is called pnetC and > was just released ... People *really* curious about what Rhys is doing > (and what those half-a-million lines are doing in DotGNU) should try the > Portable.net C compiler (http://dotgnu.org/downloads/pnet/) .. We have > mirrors on each gnu mirror as /projects/dotgnu ... (since we're likely to > be slashdotted to death soon....) > I'm really working only to get C# compiled to Parrot .... other language > frontends in development like Java or C or JScript can wait a looong time. Hmm. So if DotGNU has a C to Parrot compiler, then we just compile the perl5 source code down to Parrot bytecode, et voilá, we have a perl implementation. I do hope no-one wanted it to go fast. :-) [then again, I wonder how the parrot JIT would cope] So Rhys is mad: > The difference between insanity and genius is measured by success I hope he falls on the right side of the divide. Nicholas Clark