Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

The autodecrement is not magical. -- Larry Wall in the perl man page


devel / comp.compilers / Re: Compilers :)

SubjectAuthor
* Compilers :)Hans-Peter Diettrich
`* Compilers :)Tristan B. Velloza Kildaire
 `* C and Java, was Compilers :)gah4
  `- C and Java, was Compilers :)gah4

1
Re: Compilers :)

<23-01-007@comp.compilers>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1493&group=comp.compilers#1493

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: DrDiettrich1@netscape.net (Hans-Peter Diettrich)
Newsgroups: comp.compilers
Subject: Re: Compilers :)
Date: Thu, 5 Jan 2023 01:12:46 +0100
Organization: Compilers Central
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-01-007@comp.compilers>
References: <23-01-001@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="48022"; mail-complaints-to="abuse@iecc.com"
Keywords: C, question, comment
Posted-Date: 04 Jan 2023 19:29:10 EST
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <23-01-001@comp.compilers>
Content-Language: de-DE
 by: Hans-Peter Diettrich - Thu, 5 Jan 2023 00:12 UTC

On 1/2/23 11:28 AM, Tristan B. Velloza Kildaire wrote:

> I am currently working on my own compiler for something like C

Define "like C".

DoDi
[Grouped with {} ? Comments with /* */ ? Designed by a guy who
worked for the phone company? -John]

Re: Compilers :)

<23-01-051@comp.compilers>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1536&group=comp.compilers#1536

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: deavmi@redxen.eu (Tristan B. Velloza Kildaire)
Newsgroups: comp.compilers
Subject: Re: Compilers :)
Date: Fri, 13 Jan 2023 14:17:56 +0200
Organization: Aioe.org NNTP Server
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-01-051@comp.compilers>
References: <23-01-001@comp.compilers> <23-01-007@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="81827"; mail-complaints-to="abuse@iecc.com"
Keywords: C, design
Posted-Date: 13 Jan 2023 13:00:09 EST
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
Content-Language: en-US
 by: Tristan B. Velloza K - Fri, 13 Jan 2023 12:17 UTC

On 2023/01/05 02:12, Hans-Peter Diettrich wrote:
> On 1/2/23 11:28 AM, Tristan B. Velloza Kildaire wrote:
>
>> I am currently working on my own compiler for something like C
>
> Define "like C".
>
> DoDi
> [Grouped with {} ?  Comments with /* */ ?  Designed by a guy who
> worked for the phone company? -John]

Think of C, but with object orientation similiar to C++ added, however
single inheritance, interface support (as per C++ as well). Really java
OOP's model but attached into C.

Kind of not too keen on generics as I think they blur source code
clarity somewhat. Still open to suggestions.

But stripped down C++ in the sense of avoiding many pitfalls such as
weird syntax for certain declarations.

There are other things I aim to fix, fixing the evaluation ordering of
function arguments (as that is unspecified) - this is done in the DGen
(C code emitter level). That's what I am going for.

I have a memory model for OOP planned out, the OOP features will come in at
a later stage, parsing and most of dependency tree initialization is
there but needs some tweaking. Currently working on getting modules
supported correctly.

Flow control is there from lex to emit, functions etc etc. Expressions
and all, I will keep everyone up to date and know when there is an alpha
out. I just want to polish the remaining needed features, the soirce
code itself (as I intend it to be readbale for others who want to
contribute).

Development has picked up quite a lot seeing that I now finished
university. STtarting work soon but intend to use free time to work on it.

When it is all polished I will open source it, clean up docs and also
work on the "book" section which aims to be a language manual and
implementation manual (explaining the inner workings).

Re: C and Java, was Compilers :)

<23-01-053@comp.compilers>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1538&group=comp.compilers#1538

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah4@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: C and Java, was Compilers :)
Date: Fri, 13 Jan 2023 10:32:16 -0800 (PST)
Organization: Compilers Central
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-01-053@comp.compilers>
References: <23-01-001@comp.compilers> <23-01-007@comp.compilers> <23-01-051@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="95904"; mail-complaints-to="abuse@iecc.com"
Keywords: C, Java, comment
Posted-Date: 13 Jan 2023 14:10:34 EST
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <23-01-051@comp.compilers>
 by: gah4 - Fri, 13 Jan 2023 18:32 UTC

On Friday, January 13, 2023 at 10:00:11 AM UTC-8, Tristan B. Velloza Kildaire wrote:

(snip)

> Think of C, but with object orientation similiar to C++ added, however
> single inheritance, interface support (as per C++ as well). Really java
> OOP's model but attached into C.

I always thought that Java was, intentionally, more like C than C++ is like C.

That was even before they added System.out.format(), which should make
C programmers even happier.

Some time ago, I was trying to figure out if you could make a C compiler
that generated JVM code. I would run much closer to the C standard
than much C code does, especially regarding casting of pointers.
[So what did you conclude? I'd think C type casts would be hard to
turn into Java unless you made all of storage an opaque block. -John]

Re: C and Java, was Compilers :)

<23-01-054@comp.compilers>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1539&group=comp.compilers#1539

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah4@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: C and Java, was Compilers :)
Date: Fri, 13 Jan 2023 12:39:41 -0800 (PST)
Organization: Compilers Central
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-01-054@comp.compilers>
References: <23-01-001@comp.compilers> <23-01-007@comp.compilers> <23-01-051@comp.compilers> <23-01-053@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="18371"; mail-complaints-to="abuse@iecc.com"
Keywords: C, Java
Posted-Date: 13 Jan 2023 16:19:24 EST
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <23-01-053@comp.compilers>
 by: gah4 - Fri, 13 Jan 2023 20:39 UTC

On Friday, January 13, 2023 at 11:10:37 AM UTC-8, gah4 wrote:

(snip)

> Some time ago, I was trying to figure out if you could make a C compiler
> that generated JVM code. I would run much closer to the C standard
> than much C code does, especially regarding casting of pointers.

> [So what did you conclude? I'd think C type casts would be hard to
> turn into Java unless you made all of storage an opaque block. -John]

Someone else might have thought about the "opaque block" method.
But that wouldn't work if you wanted to call between Java and C.

As well as I know it, C only requires assignment to work for
pointers cast to (unsigned char *). And once they are cast,
usually (though I suppose not always), it is done with memcpy(),
or compared with memcmp().

So, all the complication of figuring out what is actually being
done, can be done inside one of those.

C pointers, then, are an object with a reference to the actual
array, and current offset within the array, and bounds for
the array. Pointer arithmetic only changes the offset.

Scalar variables that can be pointed to, compile as arrays
dimensioned [1].

I didn't get as far as figuring out varargs functions, but someone
must have done that, as System.out.format() works.
You can call it with the usual different argument types,
and it figures out everything.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor