Re: Bytestructures: a "type system" for bytevectors

2016-06-24 Thread Matt Wette
> On Jun 21, 2016, at 5:53 AM, Matt Wette wrote: > >> On Jun 21, 2016, at 12:50 AM, Taylan Ulrich Bayırlı/Kammer >> wrote: >> >> Matt Wette writes: >> >>> nyacc is an all-guile implementation of yacc and comes with a c99 >>> parser, available from www.nongnu.org. >>> The parser outputs pa

Re: Bytestructures: a "type system" for bytevectors

2016-06-24 Thread Matt Wette
> On Jun 21, 2016, at 5:53 AM, Matt Wette wrote: > >> On Jun 21, 2016, at 12:50 AM, Taylan Ulrich Bayırlı/Kammer >> wrote: >> >> Matt Wette writes: >> >>> nyacc is an all-guile implementation of yacc and comes with a c99 >>> parser, available from www.nongnu.org. >>> The parser outputs pa

Re: Bytestructures: a "type system" for bytevectors

2016-06-21 Thread Matt Wette
> On Jun 21, 2016, at 12:50 AM, Taylan Ulrich Bayırlı/Kammer > wrote: > > Matt Wette writes: > >> nyacc is an all-guile implementation of yacc and comes with a c99 >> parser, available from www.nongnu.org. >> The parser outputs parse trees in sxml format. It is beta-level code. >> >> Matt >

Re: Bytestructures: a "type system" for bytevectors

2016-06-21 Thread Taylan Ulrich Bayırlı/Kammer
Matt Wette writes: > nyacc is an all-guile implementation of yacc and comes with a c99 > parser, available from www.nongnu.org. > The parser outputs parse trees in sxml format. It is beta-level code. > > Matt Wow! That covers a big chunk of the task, if I implement it from scratch. In fact, g

Re: Bytestructures: a "type system" for bytevectors

2016-06-20 Thread Matt Wette
> On Jun 20, 2016, at 3:05 PM, Taylan Ulrich Bayırlı/Kammer > wrote: > [SNIP] > Would I have to write a C parser in Scheme, or can we cheat somehow? scheme@(guile-user)> (use-modules (nyacc lang c99 parser)) scheme@(guile-user)> (use-modules (ice-9 pretty-print)) scheme@(guile-user)> (pretty-

Re: Bytestructures: a "type system" for bytevectors

2016-06-20 Thread Taylan Ulrich Bayırlı/Kammer
Andy Wingo writes: > On Sun 30 Aug 2015 18:32, taylanbayi...@gmail.com (Taylan Ulrich > "Bayırlı/Kammer") writes: > >> https://github.com/taylanub/scheme-bytestructures >> >> (I don't endorse GitHub, but I gave in after Gitorious went down.) >> >> I had started working on this project around two

Re: Bytestructures: a "type system" for bytevectors

2016-06-20 Thread Andy Wingo
On Sun 30 Aug 2015 18:32, taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes: > https://github.com/taylanub/scheme-bytestructures > > (I don't endorse GitHub, but I gave in after Gitorious went down.) > > I had started working on this project around two years ago but it had a > prett

Re: Bytestructures: a "type system" for bytevectors

2015-09-08 Thread Taylan Ulrich Bayırlı/Kammer
n...@ossau.homelinux.net writes: > Sorry for not mentioning this before, but have you seen make-c-struct > and parse-c-struct at > https://www.gnu.org/software/guile/manual/html_node/Foreign-Structs.html > ? Yup. They're somewhat primitive, not supporting nested structs or arrays. Unions aren't

Re: Bytestructures: a "type system" for bytevectors

2015-09-07 Thread neil
@gnu.org Subject: Re: Bytestructures: a "type system" for bytevectors taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes: > That's all there is to it, and you could populate those bytes directly, > one by one: > > the_struct_t my_struct = { a, b, c, d,

Re: Bytestructures: a "type system" for bytevectors

2015-08-31 Thread Taylan Ulrich Bayırlı/Kammer
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes: > That's all there is to it, and you could populate those bytes directly, > one by one: > > the_struct_t my_struct = { a, b, c, d, e, f } > Whoops, C isn't as dumb as I had in memory. You'll need to memcpy it into a char[] to b

Bytestructures: a "type system" for bytevectors

2015-08-30 Thread Taylan Ulrich Bayırlı/Kammer
https://github.com/taylanub/scheme-bytestructures (I don't endorse GitHub, but I gave in after Gitorious went down.) I had started working on this project around two years ago but it had a pretty strange and complex API, an unreadable README, high overhead for something you might want to use in h