<div dir="ltr"><div dir="ltr"><div>What's the reason for the need to "drop to Gambit code" (as in enter a special non-Gerbil code mode) for FFI code?</div><div><br>Afterall FFI code is just a handful special forms that are straightforward [for Gerbil etc.] to process.</div><div><br></div><div>(Black Hole had total symmetry between normal Scheme and FFI code, though I remember Per complained about that the difference in load semantics between non-FFI and FFI code caused him just a bit of headache because they're not really symmetrical, in the respect that normal code can be |eval|:ed while FFI code cannot.)<br></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Tue, 22 Oct 2019 at 23:44, Dimitris Vyzovitis <<a href="mailto:vyzo@hackzen.org">vyzo@hackzen.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><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 class="gmail_attr" dir="ltr">On Tue, Oct 22, 2019 at 6:29 PM 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-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><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-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><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>
</blockquote></div></div></div>