Support I open a file, then make a port with the file description (with
scm_fdopen), then I close the file description. When the port will be
garbage collected the GC will attempt to close the port->fdes, ignoring
the EBADF error, so everything is OK.
Now supose I do this in a loop. The next open
Hi awesome hackers,
i'm a noob. Which book is better for learning programming?
* SICP http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
* How to Design Programs http://htdp.org/2003-09-26/
* anything else
thank you very much
() Cedric Cellier
() Fri, 17 Sep 2010 11:30:46 +0200
Any idea someone ?
Perhaps you can make a port first; then use ‘port->fdes’
for file-descriptor based access; then close the port.
IOW, start w/ the higher abstraction (port) and let gc DTRT.
anog...@gmx.at writes:
> Hi awesome hackers,
>
> i'm a noob. Which book is better for learning programming?
>
> * SICP http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
> * How to Design Programs http://htdp.org/2003-09-26/
> * anything else
Read both, in this order:
1. How
> If you should read only one, then only SICP (and watch the videos).
Out of curiousity, what's interresting about the videos ?
-[ Fri, Sep 17, 2010 at 11:03:13PM +0200, Thien-Thi Nguyen ]
> Perhaps you can make a port first; then use ???port->fdes???
> for file-descriptor based access; then close the port.
Wait a minute, you can close a port ?
... check check check ...
Ooookay. I might be blind somehow : Althoug I