Re: a foreign struct: a shameless request

2017-06-18 Thread Amirouche



Le 18/06/2017 à 08:22, Catonano a écrit :

Taylan,

2017-06-16 21:02 GMT+02:00 Taylan Ulrich Bayırlı/Kammer <
taylanbayi...@gmail.com>:



If you decide to use bytestructures, feel free to e-mail me privately or
use the GitHub issues system for questions.  I don't actively monitor
the Guile ML these days so I may miss your questions and feedback here.

[0] https://github.com/TaylanUB/scheme-bytestructures/



Than you for your offer !

I am impressed that Bytestructures works on so many different scheme
implementations

I am a bit concerned that it as no proper packaging so it'd be hard to port
it in Guix. That's an issue for me

It's packaged in guix under the name guile-bytestructures




on using 8cc in reproducible bootstrap process

2017-06-18 Thread Jan Nieuwenhuizen
Hi!

I am working to create a full source bootstrap path for GuixSD[0].  I
have written Mes[1] a mutual self-hosting Scheme interpreter prototype
in C and a C compiler (Mescc) in Scheme.

The prototype Scheme interpreter in C will be redone in stage0's hex2[2]
at an opportune moment which will give us a real simple C compiler
(Mescc) that does not depend on any binary.

The next leap forward is to compile gcc.  I have been looking at
compiling Tinycc[3].  A couple of weeks ago, rain1 has been working with
the tcc developers to succeed in compiling gcc using tcc[4].

However, tcc uses many esoteric language features which makes
bootstrapping using tcc pretty [unnecessarily?] difficult.

That is why I was happily surprised to read about 8cc's advertised
bootstrappability

8cc is a compiler for the C programming language. It's intended to
support all C11 language features while keeping the code as small
and simple as possible.

However, I'm currently stuck on 8cc's use of anonymous unions and 8cc's
anonymous structs in unions.  To me, as a fresh C compiler writer, those
are pretty esoteric language features too.  The idea of having to
implement those discourages me a bit.

Do you think 8cc should be used in my efforts to create a full source
bootstrap path (rather than tinycc, or as a stepping stone to tcc)?

If so, I can think of two strategies

  1) a. implement anonymous unions in Mescc
 b. implement anonymous structs (inside anonymous unions) in Mescc
  2) remove anonymous unions and structs from 8cc

which one would you advise, or do you have a better alternative?  Should
I 1) learn about anonymous structs and make Mescc richer, or would you
like to (help and) take patches for 2)?

Greetings,
janneke

[0] https://gnu.org/s/guix
[1] https://gitlab.com/janneke/mes
[2] https://github.com/oriansj/stage0
[3] https://bellard.org/tcc/
[4] http://lists.nongnu.org/archive/html/tinycc-devel/2017-05/msg00103.html

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



Re: a foreign struct: a shameless request

2017-06-18 Thread Catonano
2017-06-18 14:28 GMT+02:00 Amirouche :

>
>
> Le 18/06/2017 à 08:22, Catonano a écrit :
>
>> Taylan,
>>
>> 2017-06-16 21:02 GMT+02:00 Taylan Ulrich Bayırlı/Kammer <
>> taylanbayi...@gmail.com>:
>>
>>
>>> If you decide to use bytestructures, feel free to e-mail me privately or
>>> use the GitHub issues system for questions.  I don't actively monitor
>>> the Guile ML these days so I may miss your questions and feedback here.
>>>
>>> [0] https://github.com/TaylanUB/scheme-bytestructures/
>>>
>>>
>>> Than you for your offer !
>>
>> I am impressed that Bytestructures works on so many different scheme
>> implementations
>>
>> I am a bit concerned that it as no proper packaging so it'd be hard to
>> port
>> it in Guix. That's an issue for me
>>
> It's packaged in guix under the name guile-bytestructure


oh wow !

Then I'll surely take a look !

Thank you Amirrouche !


Re: on using 8cc in reproducible bootstrap process

2017-06-18 Thread Mike Gran
On Sun, Jun 18, 2017 at 03:52:23PM +0200, Jan Nieuwenhuizen wrote:
> Hi!
> 
> The next leap forward is to compile gcc.  I have been looking at
> compiling Tinycc[3].  A couple of weeks ago, rain1 has been working with
> the tcc developers to succeed in compiling gcc using tcc[4].

> which one would you advise, or do you have a better alternative?  Should
> I 1) learn about anonymous structs and make Mescc richer, or would you
> like to (help and) take patches for 2)?

For what it is worth, the hacker ragge and the OpenBSD community spent
some time a couple of years ago getting the old PCC Porable C Compiler
back up and running.  Because it is based on a much older program, it
may not have these new features with which you are struggling.

http://pcc.ludd.ltu.se/

-Mike Gran



[ANN] nyacc 0.80.3 released

2017-06-18 Thread Matt Wette
NYACC V0.80.3 is released.

This release has work on the ffi-helper and numerous bug fixes:
1) use 0 for undefined identifiers in CPP conditional expressions
2) fixed lex routine make-ident-like-p to check for zero-length strings
3) fixed bug in c99/util2.smc that added comments in struct cleanup
4) changed c99/util2.scm:c99-trans-unit->udict to use fold-right


NYACC, for Not Yet Another Compiler Compiler!, is set of guile modules for
generating parsers and lexical analyzers.  It also provides sample parsers
and pretty-printers using SXML trees as an intermediate representation.

NYACC maturity is beta level.

NYACC is free software; the full source distribution is available through

tarball repository:
https://download.savannah.gnu.org/releases/nyacc/

git repository:
git://git.savannah.nongnu.org/nyacc.git

home page, project page, user's guide:
http://www.nongnu.org/nyacc
https://savannah.nongnu.org/projects/nyacc
http://www.nongnu.org/nyacc/nyacc-ug.html

For support see:
https://savannah.nongnu.org/support/?group=nyacc




Standard way of getting a record's class?

2017-06-18 Thread Vítor De Araújo
Hello,

In Guile 2.0, when you defined a record type foo, and you had (oop
goops) loaded, a class  was automatically created. That doesn't
seem to be the case anymore in Guile 2.2.

Is there a standard way in Guile to get a record type's associated
class? So far the solution I found is to construct an instance of the
record and call 'class-of' on it, but I wonder if there is a cleaner way
to do it.

Thanks!

-- 
Vítor De Araújo
https://elmord.org/



Re: on using 8cc in reproducible bootstrap process

2017-06-18 Thread Rui Ueyama
Hi Jan,

Thank you for your interest in 8cc. 8cc is indeed a C compiler that
supports most C11 features. However, I don't think it is being used
seriously by anyone, so honestly I'd doubt it is a good choice to be used
as part of your bootstrapping process. tcc have been much more tested.

The most interesting use of 8cc is to write a C++11 constexpr compile-time
C compiler  which is built on top
of ELVM , but that is still a toy program.

On Sun, Jun 18, 2017 at 6:52 AM, Jan Nieuwenhuizen  wrote:

> Hi!
>
> I am working to create a full source bootstrap path for GuixSD[0].  I
> have written Mes[1] a mutual self-hosting Scheme interpreter prototype
> in C and a C compiler (Mescc) in Scheme.
>
> The prototype Scheme interpreter in C will be redone in stage0's hex2[2]
> at an opportune moment which will give us a real simple C compiler
> (Mescc) that does not depend on any binary.
>
> The next leap forward is to compile gcc.  I have been looking at
> compiling Tinycc[3].  A couple of weeks ago, rain1 has been working with
> the tcc developers to succeed in compiling gcc using tcc[4].
>
> However, tcc uses many esoteric language features which makes
> bootstrapping using tcc pretty [unnecessarily?] difficult.
>
> That is why I was happily surprised to read about 8cc's advertised
> bootstrappability
>
> 8cc is a compiler for the C programming language. It's intended to
> support all C11 language features while keeping the code as small
> and simple as possible.
>
> However, I'm currently stuck on 8cc's use of anonymous unions and 8cc's
> anonymous structs in unions.  To me, as a fresh C compiler writer, those
> are pretty esoteric language features too.  The idea of having to
> implement those discourages me a bit.
>
> Do you think 8cc should be used in my efforts to create a full source
> bootstrap path (rather than tinycc, or as a stepping stone to tcc)?
>
> If so, I can think of two strategies
>
>   1) a. implement anonymous unions in Mescc
>  b. implement anonymous structs (inside anonymous unions) in Mescc
>   2) remove anonymous unions and structs from 8cc
>

That said, I don't think anonymous structs/unions are not that tricky. It
shouldn't be hard to support the feature. If it is the only missing feature
in your compiler, you might want to add that.


>
> which one would you advise, or do you have a better alternative?  Should
> I 1) learn about anonymous structs and make Mescc richer, or would you
> like to (help and) take patches for 2)?
>
> Greetings,
> janneke
>
> [0] https://gnu.org/s/guix
> [1] https://gitlab.com/janneke/mes
> [2] https://github.com/oriansj/stage0
> [3] https://bellard.org/tcc/
> [4] http://lists.nongnu.org/archive/html/tinycc-devel/
> 2017-05/msg00103.html
>
> --
> Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
>