<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi">
    <title>gmane.lisp.scheme.chibi</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/562"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/561"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/560"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/559"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/558"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/557"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/556"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/555"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/554"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/553"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/552"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/551"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/550"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/549"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/548"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/547"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/546"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/545"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/544"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.scheme.chibi/543"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/562">
    <title>chibi repl failure</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/562</link>
    <description>&lt;pre&gt;Hello,

it seems chibi.repl has some problem:

$ chibi-scheme -mchibi.repl -e'(repl)'
ERROR in child thread: #&amp;lt;Context&amp;gt;
ERROR in point-depth on line 583 of file /usr/share/chibi/init-7.scm: 
vector-ref: not a vector: (#f)
ERROR in point-depth on line 583 of file /usr/share/chibi/init-7.scm: 
vector-ref: not a vector: (#f)


Not sure when it started, as I've not been updating from hg since last 
February,
but is seems might be related to revision 4505057ebc97: "Using non-mutating 
tree of dynamic-wind state for thread safety."

Lorenzo

&lt;/pre&gt;</description>
    <dc:creator>Lorenzo Campedelli</dc:creator>
    <dc:date>2013-05-25T06:04:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/561">
    <title>Re: GC-management of foreign function sexp arguments</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/561</link>
    <description>&lt;pre&gt;


No.  As I said before, you should assume all passed
parameters are preserved.

&lt;/pre&gt;</description>
    <dc:creator>Alex Shinn</dc:creator>
    <dc:date>2013-05-23T00:33:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/560">
    <title>Re: GC-management of foreign function sexp arguments</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/560</link>
    <description>&lt;pre&gt;That is, are there any steps needed to properly manage garbage collection.

On Wednesday, May 22, 2013 2:40:14 PM UTC-4, cino...-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-22T19:36:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/559">
    <title>GC-management of foreign function sexp arguments</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/559</link>
    <description>&lt;pre&gt;sexp_define_foreign can define functions that take sexp arguments.

...
sexp_define_foreign(ctx, env, "foo", 1, foo);
...
sexp foo(sexp ctx, sexp self, sexp n, sexp arg){
  ...
}

Are there any steps needed to manipulate the argument?

sexp foo(sexp ctx, sexp self, sexp n, sexp arg){
  arg = sexp_make_integer(ctx, 42);
  return arg;
}

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-22T18:40:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/558">
    <title>Re: Creating a bytevector in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/558</link>
    <description>&lt;pre&gt;


Correct.



&lt;/pre&gt;</description>
    <dc:creator>Alex Shinn</dc:creator>
    <dc:date>2013-05-22T03:54:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/557">
    <title>Re: Creating a bytevector in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/557</link>
    <description>&lt;pre&gt;Oh whoops. I neglected the last clause there; I assume it being invalidated 
means it doesn't need to be GC-managed.

On Tuesday, May 21, 2013 11:12:17 PM UTC-4, cino...-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-22T03:13:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/556">
    <title>Re: Creating a bytevector in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/556</link>
    <description>&lt;pre&gt;Thanks. In this case, would the the result from sexp_c_string need to be 
GC-managed?

On Tuesday, May 21, 2013 10:42:06 PM UTC-4, Alex Shinn wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-22T03:12:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/555">
    <title>Re: Creating a bytevector in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/555</link>
    <description>&lt;pre&gt;


Yes, the Chibi C API was written before the R7RS name "bytevector" was
finalized.

Additionally, there is the procedure sexp_make_bytes which I believe is the

You can use

  sexp_string_to_bytes(ctx, sexp_c_string(ctx, some_char_ptr, -1))

Note sexp_string_to_bytes is a macro, and the string is
invalidated after it's called.

&lt;/pre&gt;</description>
    <dc:creator>Alex Shinn</dc:creator>
    <dc:date>2013-05-22T02:42:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/554">
    <title>Re: Creating a bytevector in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/554</link>
    <description>&lt;pre&gt;After prodding around the source for a bit, the source appears to call it 
bytes rather than bytevector.

Additionally, there is the procedure sexp_make_bytes which I believe is the 
Scheme equivalent of make-vector, however a procedure to create a 
bytevector from an arbitrary data buffer would be convenient.

On Tuesday, May 21, 2013 4:50:47 PM UTC-4, cino...-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-22T02:37:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/553">
    <title>Re: Passing around GC managed sexpr's</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/553</link>
    <description>&lt;pre&gt;Makes sense, thank you.

On Tuesday, May 21, 2013 8:54:23 PM UTC-4, Alex Shinn wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-22T02:34:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/552">
    <title>Re: Passing around GC managed sexpr's</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/552</link>
    <description>&lt;pre&gt;

The same way.  The assumption is that everything passed to
a function (and presumably addresses if you want to use them)
is already preserved, so a function is only responsible for the
allocations it makes, directly or indirectly.

More specifically, the results of any computation in your function
must be preserved, excluding the last.  Thus in the simple case
that you only allocate a single object you don't need to preserve
anything:

sexp bar(sexp ctx) {
  return sexp_make_integer(ctx, 42);
}

If you do potentially perform additional allocations you need to
preserve:

/* WRONG! */
sexp add_forty_two(sexp ctx, sexp x) {
  return sexp_add(ctx, x, sexp_make_integer(ctx, 42));
}

/* Correct */
sexp add_forty_two(sexp ctx, sexp x) {
  sexp res;
  sexp_gc_var1(tmp);
  sexp_gc_preserve1(ctx, tmp);
  tmp = sexp_make_integer(ctx, 42);
  res = sexp_add(ctx, x, tmp);        // final allocation, so
  sexp_gc_release1(ctx);              // no need to preserve res
  return res;
}

Of course, here sexp_make_integer(ctx&lt;/pre&gt;</description>
    <dc:creator>Alex Shinn</dc:creator>
    <dc:date>2013-05-22T00:54:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/551">
    <title>Re: Multi-lined comments treated as one line</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/551</link>
    <description>&lt;pre&gt;

Thanks!  I'll fix this shortly, but I just moved and have no internet at
home this week.

&lt;/pre&gt;</description>
    <dc:creator>Alex Shinn</dc:creator>
    <dc:date>2013-05-22T00:36:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/550">
    <title>Re: Passing around GC managed sexpr's</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/550</link>
    <description>&lt;pre&gt;The second bar function should return baz.

On Tuesday, May 21, 2013 6:56:44 PM UTC-4, cino...-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T23:03:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/549">
    <title>Multi-lined comments treated as one line</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/549</link>
    <description>&lt;pre&gt;$ cat a
(+ 1 1)
$ chibi-scheme a
ERROR on line 1 of file a: undefined variable: +
$ cat b
#| This is a
multi-lined comment |#
(+ 1 1)
$ chibi-scheme b
ERROR on line 2 of file b: undefined variable: +
$

The second error should display line 3 instead of line 2.

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T23:02:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/548">
    <title>Passing around GC managed sexpr's</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/548</link>
    <description>&lt;pre&gt;I know that this is the general way of handling GC managed sexpr's:

void foo(void){
  sexpr_gc_var1(tmp);
  sexpr_gc_preserve1(ctx, tmp);

  sexpr_gc_release1(ctx);
}

But what would be the best way to pass around GC managed sexpr's?:

void bar(sexpr *baz){
  *baz = sexp_make_integer(ctx, 42);
}

void foo(void){
  sexpr_gc_var1(tmp);
  sexpr_gc_preserve1(ctx, tmp);
  bar(&amp;amp;tmp);
  sexpr_gc_release1(ctx);
}

or

sexpr bar(void){
  sexpr_gc_var1(tmp);
  sexpr_gc_preserve1(ctx, baz);
  baz = sexp_make_integer(ctx, 42);
  sexpr_gc_release1(ctx);
}

void foo(void){
  sexpr_gc_var1(tmp);
  sexpr_gc_preserve1(ctx, tmp);
  tmp = bar();
  sexpr_gc_release1(ctx);
}

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T22:56:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/547">
    <title>Creating a bytevector in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/547</link>
    <description>&lt;pre&gt;In Scheme, a string literal would be "foo" and a bytevector literal would 
be #u8(1 2 3).

The C interface provides sexp_c_string; is there an analogue for 
bytevectors? I grepped the includes for bytevector but came up with nothing.

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T20:50:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/546">
    <title>Re: Creating a list in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/546</link>
    <description>&lt;pre&gt;Thanks, works perfectly.

On Tuesday, May 14, 2013 7:47:53 PM UTC-4, Alex Shinn wrote:

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-15T00:08:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/545">
    <title>Re: Creating a list in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/545</link>
    <description>&lt;pre&gt;

You forgot all the GC steps :)

Both sexp_cons and sexp_c_string allocate memory, so
you'll need to declare ret and a tmp as GC managed vars:

sexp_gc_var2(ret, tmp);
sexp_gc_preserve2(ctx, ret, tmp);
...
tmp = sexp_c_string(ctx, ent-&amp;gt;d_name, -1);
ret = sexp_cons(tmp, ret);
...
sexp_gc_release2(ctx);
return ret;

&lt;/pre&gt;</description>
    <dc:creator>Alex Shinn</dc:creator>
    <dc:date>2013-05-14T23:47:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/544">
    <title>Creating a list in C interface</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/544</link>
    <description>&lt;pre&gt;sexp om_enum_files(sexp ctx, sexp self, sexp n){
  sexp ret = SEXP_NULL;

  DIR *dir = opendir("./");
  struct dirent *ent;
  while(ent = readdir(dir)){
    if(ent-&amp;gt;d_type == DT_REG){
      ret = sexp_cons(ctx, sexp_c_string(ctx, ent-&amp;gt;d_name, -1), ret);
    }
  }
  closedir(dir);

  return ret;
}

This code seems to work for a directory with let's say, 26 files, but it 
seems to break on a directory with around 17k files and some with non-ASCII 
characters (don't know if that's relevant?). Is there something 
fundamentally wrong with the iteration, perhaps I forgot some GC steps?

&lt;/pre&gt;</description>
    <dc:creator>cinolt.yk-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-14T20:25:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/543">
    <title>Re: cross compiling chibi</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/543</link>
    <description>&lt;pre&gt;Hey, Attila!

What's that state on this project?

I'd like to see Chibi on OpenWRT / Mips. Someone done this?

Dirk

Am Donnerstag, 2. Februar 2012 16:10:29 UTC+1 schrieb Alex Shinn:

&lt;/pre&gt;</description>
    <dc:creator>Dirk Theisen</dc:creator>
    <dc:date>2013-05-13T11:49:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.scheme.chibi/542">
    <title>R7RS-small voting deadline extended through May 20</title>
    <link>http://permalink.gmane.org/gmane.lisp.scheme.chibi/542</link>
    <description>&lt;pre&gt;For various reasons, the deadline for voting on R7RS-small draft 9 has
been extended through May 20.  That is, votes will be accepted until
May 20 has passed into history everywhere on Earth, which is the same
as saying until noon UTC on May 21.

For voting instructions, see
&amp;lt;http://lists.scheme-reports.org/pipermail/scheme-reports/2013-April/003299.html&amp;gt;.

&lt;/pre&gt;</description>
    <dc:creator>John Cowan</dc:creator>
    <dc:date>2013-05-10T16:02:33</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.lisp.scheme.chibi">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.scheme.chibi</link>
  </textinput>
</rdf:RDF>
