<div dir="ltr"><div>What do you mean why? If you want to write ffi code, you need to drop down to straight gambit code, and that's what being-foreign does.</div><div>begin-ffi is a macro on top, you can look at its definition in :std/foreign.</div><div><br></div><div>-- vyzo<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 22, 2019 at 6:29 PM Adam <<a href="mailto:adam.mlmb@gmail.com">adam.mlmb@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Ah there's also |begin-foreign| and |begin-ffi|, why?<br></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Tue, 22 Oct 2019 at 23:23, Adam <<a href="mailto:adam.mlmb@gmail.com" target="_blank">adam.mlmb@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Vyzo,</div><div><br></div><div>Browsing Gerbil modules for instance hereĀ <a href="https://github.com/vyzo/gerbil/tree/master/src/std/db" target="_blank">https://github.com/vyzo/gerbil/tree/master/src/std/db</a> I see that FFI modules tend to have a non-standard format, instead of just being a file whateverclibmodule.scm (or .ss in the Gerbil convention, though .scm is supported since last week right) which contains normal Scheme and Scheme FFI code interspersed e.g. (define-c-lambda funame ...) implies (export funame)</div><div><br>, you have a .scm file and a .ssi file, where the .ssi contains (extern funame).</div><div><br></div><div>Why is this?</div><div><br></div><div>Thanks,</div><div>Adam</div></div></div></div>
</blockquote></div>
</blockquote></div>