FFI support for disjoint types

2010-11-11 Thread Ludovic Courtès
Hello! I’ve used the macro below in a couple of projects. It allows the creation of disjoint Scheme types for disjoint C pointer types, and takes care of preserving eq?-ness for equal C pointers. Example: --8<---cut here---start->8--- ;; Create a wrapped poin

Re: The progress of hacking guile and prolog

2010-11-11 Thread Ludovic Courtès
Hi, Noah Lavine writes: > On a completely different note, I'm now looking at writing a compiler > for a subset of C, which could eventually become a JIT compiler. If we > could attach your GLIL->C compiler to that, it could produce a full > Scheme->machine code compiler in Guile. Interesting.

Re: The progress of hacking guile and prolog

2010-11-11 Thread Noah Lavine
Hello, > I think that we have similar synaptical fireworks here. The actual > implementation and syntax should be a result of understanding the line of > reasoning in these theorem povers and checkers. So let my try to explain what > I'm heading. I will try to write a little about where I am in a

Re: The progress of hacking guile and prolog

2010-11-11 Thread Noah Lavine
Yes, that's right. I was unclear. I am intending to come up with a language that I can compile to C, to implement VM instructions. I meant I would compile something to C, not from it to machine code. Just to clarify, it probably won't be a subset of Scheme (although one could compile a subset of S

Re: The progress of hacking guile and prolog

2010-11-11 Thread Noah Lavine
> Interesting.  I thought you were going rather to compile a subset of > Scheme to C, which could be used to implement VM instructions, no? Yes, that was my plan, sorry. I want to compile things to C, not from C to machine code. Also, to clarify, I am looking at compiling not a subset of C, but s