Re: Blobs and GC
Thank you On Sat, Jul 10, 2021 at 5:28 PM Thomas Chust wrote: > Am Sa., 10. Juli 2021 um 15:15 Uhr schrieb Aydar Zarifullin < > aydar...@gmail.com>: > >> Hello everyone, I have a few questions: Is it safe to pass a blob >> created in scheme to C functions? Will the garbage collector move it in >> memory? Is there any guarantee that the garbage collector won't move it in >> the middle of a C function? Is the situation the same with bytevectors? >> > > Hello Aydar, > > the answer to each of these questions is "yes", I believe ☺ > > To pass the contents of a non-immediate Scheme object to to a C function > through the FFI, use the type [nonnull-]scheme-pointer. Unless it is a > SRFI-4 vector you want to pass, in that case you need to use a type > specific for the vector type in question. > > Since CHICKEN is essentially single-threaded, as far as the operating > system is concerned, once you pass control to a C function through the FFI, > no Scheme code or CHICKEN support code is running in the background, hence > a pointer to the inside of a scheme object stays stable during *one* > foreign function call, but not necessarily *across multiple* foreign > function calls. So the long answer to your first question is really that it > depends on what the C function is doing with the pointer: If the function > accesses something at the pointer address and then returns, all is well. If > the pointer is remembered somewhere and used later on during another > foreign function call, that is not safe. > > Ciao, > Thomas > > -- > When C++ is your hammer, every problem looks like your thumb. >
Blobs and GC
Hello everyone, I have a few questions: Is it safe to pass a blob created in scheme to C functions? Will the garbage collector move it in memory? Is there any guarantee that the garbage collector won't move it in the middle of a C function? Is the situation the same with bytevectors?
Re: New egg: Expect
I moved the documentation to https://wiki.call-cc.org/eggref/5/tcl-expect and now I can't figure out how to properly remove the old page вт, 25 мая 2021 г., 15:40 Aydar Zarifullin : > > Thanks. I was wondering if this egg should be called tcl-expect, just > in case someone comes up with a pure Scheme implementation of expect > (also to make clear that the current one is actually based on Tcl). > What do you think? > > It's a good idea. >
Re: New egg: Expect
> Thanks. I was wondering if this egg should be called tcl-expect, just in case someone comes up with a pure Scheme implementation of expect (also to make clear that the current one is actually based on Tcl). What do you think? It's a good idea.
Re: New egg: Expect
Thank you for your notes. - Would the body of `(unless interp ...)' in `tcl-create-interp` [0] ever be executed? - Tcl_CreateInterp may return a null pointer (#f) for example if it fails to allocate memory As for the rest, I'll try to fix it.
New egg: Expect
Hello all, I wrote a very basic binding to libexpect, I haven't tested it thoroughly but in simple cases, it works as it should I hope it will be useful to someone. Repository https://github.com/iZarif/ckn-expect Documentation https://wiki.call-cc.org/eggref/5/expect
Re: New egg: tgbot - very simple library for working with the Telegram bot API
Well, then there's no need to reinvent the wheel. I'll try to contribute to Telebot for example personally I don't like non-lispy function names like sendMessage. вт, 5 янв. 2021 г., 15:38 Christoph Lange : > It does. I ported it to Chicken 5 myself and use it for Chicken 5. > > On Tue, Jan 5, 2021 at 12:36 PM Aydar Zarifullin > wrote: > >> I have seen this library but it seemed to me that it is not very actively >> maintained and it does not have chicken 5 support. >> >> вт, 5 янв. 2021 г., 12:56 Christoph Lange : >> >>> Just as a side note. Have you seen this one?: >>> >>> https://github.com/KnairdA/Telebot >>> >>> /Christoph >>> >>> On Mon, Jan 4, 2021 at 7:08 PM Aydar Zarifullin >>> wrote: >>> >>>> Hello all, I made a simple library to work with the Telegram bot api >>>> and want it added to the official chicken scheme egg repository. >>>> >>>> Here's the link https://github.com/iZarif/ckn-tgbot >>>> >>> >>> >>> -- >>> Christoph Lange >>> Lotsarnas Väg 8 >>> 430 83 Vrångö >>> >> > > -- > Christoph Lange > Lotsarnas Väg 8 > 430 83 Vrångö >
Re: New egg: tgbot - very simple library for working with the Telegram bot API
I have seen this library but it seemed to me that it is not very actively maintained and it does not have chicken 5 support. вт, 5 янв. 2021 г., 12:56 Christoph Lange : > Just as a side note. Have you seen this one?: > > https://github.com/KnairdA/Telebot > > /Christoph > > On Mon, Jan 4, 2021 at 7:08 PM Aydar Zarifullin > wrote: > >> Hello all, I made a simple library to work with the Telegram bot api and >> want it added to the official chicken scheme egg repository. >> >> Here's the link https://github.com/iZarif/ckn-tgbot >> > > > -- > Christoph Lange > Lotsarnas Väg 8 > 430 83 Vrångö >
New egg: tgbot - very simple library for working with the Telegram bot API
Hello all, I made a simple library to work with the Telegram bot api and want it added to the official chicken scheme egg repository. Here's the link https://github.com/iZarif/ckn-tgbot
[Chicken-users] How to use CHICKEN_apply function? Is there an example?
___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users