Search found 11 matches

by hilbertastronaut
Mon Jul 14, 2008 10:08 am
Forum: Common Lisp
Topic: C FILE* -> Lisp stream?
Replies: 10
Views: 13204

Re: C FILE* -> Lisp stream?

I'd just modify ECL itself and post a patch to the ECL mailing list. Only that one little portion of your code (the patch) would be under LGPL. If you get into including header files into your other programs, then you start dancing around the line of derivative works and things get messy. Just crea...
by hilbertastronaut
Thu Jul 10, 2008 4:24 pm
Forum: Common Lisp
Topic: C FILE* -> Lisp stream?
Replies: 10
Views: 13204

Re: C FILE* -> Lisp stream?

I think an implementation may be allowed to fill its buffer during the open call if you open the file for reading. I would bet most don't bother. But, I doubt there is a reason they can't. Yeah, I think I'll just use a Gray stream, or maybe figure out if I can mess with ECL's internals without need...
by hilbertastronaut
Thu Jul 10, 2008 11:55 am
Forum: Common Lisp
Topic: C FILE* -> Lisp stream?
Replies: 10
Views: 13204

Re: C FILE* -> Lisp stream?

The FILE* buffers in user-space (your program). Any buffering that happens with the file descriptor (from fileno()) is in kernel-space (your operating system). You will run into trouble if your C code writes to the FILE* before you Lisp code is invoked without calling fflush() because there will be...
by hilbertastronaut
Thu Jul 10, 2008 11:24 am
Forum: Common Lisp
Topic: C FILE* -> Lisp stream?
Replies: 10
Views: 13204

Re: C FILE* -> Lisp stream?

If I remember right, there is an internal ECL function for converting between these two. Hmmm... or maybe that was between a raw Unix file descriptor and a stream, not a C FILE*. Look in the source files for ECL (not that large, actually), and you can probably find it. It's in the C section of the ...
by hilbertastronaut
Thu Jul 10, 2008 10:50 am
Forum: Common Lisp
Topic: C FILE* -> Lisp stream?
Replies: 10
Views: 13204

Re: C FILE* -> Lisp stream?

I think I've figured out how to do it in an ECL-specific way: the public ECL API has a function to convert a POSIX file descriptor (an int) to a Lisp stream, and the POSIX function fileno() returns the file descriptor of a FILE*. It still would be nice, though, if someone had a Gray stream wrapper f...
by hilbertastronaut
Wed Jul 09, 2008 4:12 pm
Forum: Common Lisp
Topic: C FILE* -> Lisp stream?
Replies: 10
Views: 13204

C FILE* -> Lisp stream?

I've got a C FILE pointer to an open file, and I want to access it as a Lisp stream -- any suggestions? I'm calling into an embedded Lisp (specifically, ECL) from the C world. It's my C program and I have full control of the FILE*, so I don't have to worry about other threads messing with it without...
by hilbertastronaut
Wed Jul 09, 2008 4:04 pm
Forum: The Lounge
Topic: Need suggestions for most popular Scheme implementations
Replies: 7
Views: 10979

Re: Need suggestions for most popular Scheme implementations

Anybody used tinyscheme? I was thinking about using it as an embedded language but have been following ECL instead and am pleased with that. How is ECL working out for you? I had been thinking about using that for one of my projects. It seems to have one of the lowest footprints of all the CL imple...
by hilbertastronaut
Mon Jun 30, 2008 7:55 pm
Forum: The Lounge
Topic: Need suggestions for most popular Scheme implementations
Replies: 7
Views: 10979

Re: Need suggestions for most popular Scheme implementations

Anybody used tinyscheme? I was thinking about using it as an embedded language but have been following ECL instead and am pleased with that.
by hilbertastronaut
Mon Jun 30, 2008 7:51 pm
Forum: Common Lisp
Topic: Lisp primitives?
Replies: 9
Views: 17350

Re: Lisp primitives?

I'm thinking of doing a Lisp of my own, something small and neat for pedagogical purposes. I've often read there are 25 or so lisp primitives, so I'm wondering where to find a list of these? Some of them are fairly "obvious", such as if and lambda. Any thoughts or links? I'd say, if you're doing it...
by hilbertastronaut
Sun Jun 29, 2008 5:45 pm
Forum: The Lounge
Topic: Thank you.
Replies: 22
Views: 22087

Re: Thank you.

Forum looks good : - ) Easy on the eyes, except for the odd little smileys which old analog me will have to learn how to disable ;-P

I'll have to learn how to get RSS feeds out of a forum thread -- that would be most helpful.

Many thanks!
mfh