Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #74654 > unrolled thread
| Started by | Chad <cdalten@gmail.com> |
|---|---|
| First post | 2015-11-02 08:05 -0800 |
| Last post | 2015-11-10 16:31 +0000 |
| Articles | 20 on this page of 111 — 25 participants |
Back to article view | Back to comp.lang.c
What's the purpose of CAlive? Chad <cdalten@gmail.com> - 2015-11-02 08:05 -0800
Re: What's the purpose of CAlive? Richard Heathfield <rjh@cpax.org.uk> - 2015-11-02 16:08 +0000
Re: What's the purpose of CAlive? Jay Braun <lyngwyst@gmail.com> - 2015-11-02 08:18 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-02 09:00 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-02 08:50 -0800
Re: What's the purpose of CAlive? Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-11-05 14:36 +0100
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 05:55 -0800
Re: What's the purpose of CAlive? Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-11-06 11:57 +0100
Re: What's the purpose of CAlive? Richard Heathfield <rjh@cpax.org.uk> - 2015-11-06 11:20 +0000
Re: What's the purpose of CAlive? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-06 11:45 +0000
Re: What's the purpose of CAlive? Richard Heathfield <rjh@cpax.org.uk> - 2015-11-06 12:03 +0000
Re: What's the purpose of CAlive? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-06 13:34 +0000
Re: What's the purpose of CAlive? Richard Heathfield <rjh@cpax.org.uk> - 2015-11-06 14:35 +0000
Re: What's the purpose of CAlive? Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-11-06 15:43 +0100
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 07:05 -0800
Re: What's the purpose of CAlive? Richard Heathfield <rjh@cpax.org.uk> - 2015-11-06 15:15 +0000
Re: What's the purpose of CAlive? Keith Thompson <kst-u@mib.org> - 2015-11-06 08:34 -0800
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 00:24 -0800
Re: What's the purpose of CAlive? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2015-11-05 21:33 -0700
Re: What's the purpose of CAlive? Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-11-06 11:54 +0100
Re: What's the purpose of CAlive? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-11-06 12:01 +0000
Re: What's the purpose of CAlive? Noob <root@127.0.0.1> - 2015-11-06 14:11 +0100
Re: What's the purpose of CAlive? raltbos@xs4all.nl (Richard Bos) - 2015-11-10 16:17 +0000
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-10 08:24 -0800
Re: What's the purpose of CAlive? John Bode <jfbode1029@gmail.com> - 2015-11-17 14:51 -0800
Re: What's the purpose of CAlive? gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-18 01:18 +0000
Re: What's the purpose of CAlive? Chad <cdalten@gmail.com> - 2015-11-17 21:06 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-18 02:34 -0800
Re: What's the purpose of CAlive? mark.bluemel@gmail.com - 2015-11-18 03:36 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-18 04:02 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-18 06:14 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-18 06:18 -0800
Re: What's the purpose of CAlive? Gareth Owen <gwowen@gmail.com> - 2015-11-18 19:07 +0000
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-18 11:14 -0800
Re: What's the purpose of CAlive? John Bode <jfbode1029@gmail.com> - 2015-11-19 11:27 -0800
Re: What's the purpose of CAlive? August Karlstrom <fusionfile@gmail.com> - 2015-11-05 21:57 +0100
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 13:06 -0800
Re: What's the purpose of CAlive? David Brown <david.brown@hesbynett.no> - 2015-11-05 22:12 +0100
Re: What's the purpose of CAlive? Keith Thompson <kst-u@mib.org> - 2015-11-05 13:24 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 13:27 -0800
Re: What's the purpose of CAlive? David Brown <david.brown@hesbynett.no> - 2015-11-06 13:51 +0100
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 13:25 -0800
Re: What's the purpose of CAlive? David Brown <david.brown@hesbynett.no> - 2015-11-06 14:00 +0100
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 05:14 -0800
Re: What's the purpose of CAlive? gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-06 13:33 +0000
Re: What's the purpose of CAlive? Bartc <bc@freeuk.com> - 2015-11-06 14:14 +0000
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 06:28 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 06:52 -0800
Re: What's the purpose of CAlive? Keith Thompson <kst-u@mib.org> - 2015-11-06 08:45 -0800
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-05 15:43 -0800
Re: What's the purpose of CAlive? Chad <cdalten@gmail.com> - 2015-11-05 15:59 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 16:11 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 16:35 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 16:12 -0800
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-05 20:28 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 20:40 -0800
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-05 21:02 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-05 21:53 -0800
Re: What's the purpose of CAlive? Chad <cdalten@gmail.com> - 2015-11-05 23:43 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 03:27 -0800
Re: What's the purpose of CAlive? Ian Collins <ian-news@hotmail.com> - 2015-11-07 10:51 +1300
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 14:04 -0800
Re: What's the purpose of CAlive? Philip Lantz <prl@canterey.us> - 2015-11-07 13:33 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 14:00 -0800
Re: What's the purpose of CAlive? Ian Collins <ian-news@hotmail.com> - 2015-11-08 11:26 +1300
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 14:33 -0800
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 14:45 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 14:58 -0800
[way OT] Re: What's the purpose of CAlive? Ian Collins <ian-news@hotmail.com> - 2015-11-08 14:05 +1300
Re: [way OT] Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-08 00:05 -0800
Re: [way OT] Re: What's the purpose of CAlive? Ian Collins <ian-news@hotmail.com> - 2015-11-08 21:44 +1300
Re: [way OT] Re: What's the purpose of CAlive? raltbos@xs4all.nl (Richard Bos) - 2015-11-10 16:22 +0000
Re: [way OT] Re: What's the purpose of CAlive? "Osmium" <r124c4u102@comcast.net> - 2015-11-08 07:06 -0600
Re: [way OT] Re: What's the purpose of CAlive? asetofsymbols@gmail.com - 2015-11-08 06:02 -0800
Re: [way OT] Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-08 07:45 -0800
Re: [way OT] Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-08 09:40 -0800
Re: [way OT] Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-08 11:32 -0800
Re: [way OT] Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-08 11:43 -0800
Re: [way OT] Re: What's the purpose of CAlive? David Brown <david.brown@hesbynett.no> - 2015-11-08 21:14 +0100
Re: What's the purpose of CAlive? Keith Thompson <kst-u@mib.org> - 2015-11-07 15:07 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 15:14 -0800
Re: What's the purpose of CAlive? raltbos@xs4all.nl (Richard Bos) - 2015-11-10 16:27 +0000
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-10 08:35 -0800
Re: What's the purpose of CAlive? Keith Thompson <kst-u@mib.org> - 2015-11-10 09:05 -0800
Re: What's the purpose of CAlive? gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-07 23:18 +0000
Re: What's the purpose of CAlive? raltbos@xs4all.nl (Richard Bos) - 2015-11-10 16:20 +0000
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-10 08:28 -0800
Re: What's the purpose of CAlive? gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-07 23:20 +0000
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 15:41 -0800
Re: What's the purpose of CAlive? Philip Lantz <prl@canterey.us> - 2015-11-07 16:13 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 16:20 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 16:27 -0800
Bartenders? (Was: What's the purpose of CAlive?) gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-08 01:25 +0000
Re: Bartenders? (Was: What's the purpose of CAlive?) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 17:54 -0800
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 16:01 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-07 16:05 -0800
Re: What's the purpose of CAlive? Philip Lantz <prl@canterey.us> - 2015-11-07 16:08 -0800
Re: What's the purpose of CAlive? Reinhardt Behm <rbehm@hushmail.com> - 2015-11-08 09:59 +0800
Re: What's the purpose of CAlive? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-06 10:50 +0000
Re: What's the purpose of CAlive? gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-06 10:54 +0000
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 00:37 -0800
Re: What's the purpose of CAlive? gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-07 10:00 +0000
Re: What's the purpose of CAlive? bartekltg <bartekltg@gmail.com> - 2015-11-06 15:01 +0100
Re: What's the purpose of CAlive? "Osmium" <r124c4u102@comcast.net> - 2015-11-06 08:12 -0600
Re: What's the purpose of CAlive? bartekltg <bartekltg@gmail.com> - 2015-11-06 19:29 +0100
Re: What's the purpose of CAlive? August Karlstrom <fusionfile@gmail.com> - 2015-11-07 09:33 +0100
Re: What's the purpose of CAlive? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 01:47 -0800
Re: What's the purpose of CAlive? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-06 06:20 -0800
Re: What's the purpose of CAlive? raltbos@xs4all.nl (Richard Bos) - 2015-11-06 16:24 +0000
Re: What's the purpose of CAlive? bartekltg <bartekltg@gmail.com> - 2015-11-06 19:41 +0100
Re: What's the purpose of CAlive? raltbos@xs4all.nl (Richard Bos) - 2015-11-10 16:31 +0000
Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6 Next page →
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-11-06 13:51 +0100 |
| Message-ID | <n1i7km$fvo$1@dont-email.me> |
| In reply to | #75022 |
On 05/11/15 22:24, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
> [...]
>> Consider allowing const expressions to be used in more places. C++
>> allows a "const int" (effectively a "static const int" by C++ rules)
>> value to be used as the size of an array, for example, offering several
>> advantages over the #define names typically used in C.
>
> What C++ does is expand the set of expressions that are constant
> expressions. Specifically, if an integer object is defined with "const"
> *and* its initializer is a constant expression, then the name of that
> object is a constant expression. (The words "const" and "constant"
> despite their similarity, are quite different things; there's no such
> thing as a "const expression".)
That is more accurate - I was merely giving a rough description, with
"const expression" being an informal way to describe "an integer object
defined with const and initialised to a constant expression".
>
> You can do a limited form of what C++ does in C by using an enum:
>
> const int answer = 42;
> /* `answer` is a constant expression in C++, but not in C. */
>
> enum { answer = 42 };
> /* `answer` is a constant expression of type int in C;
> in C++ it's a constant expression of an anonymous enum type */
>
Yes, enums are an alternative to #define's for constant expressions in
C, and sometimes they are appropriate. I think "const int" or "static
const int" (initialised to a constant expression) is often neater -
especially in C++ with namespaces and/or structs/classes to limit the scope.
However Rick wants to handle the details and terminology, I think they
would be worth considering for him.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-05 13:25 -0800 |
| Message-ID | <7437f3f1-d928-4eeb-9ac7-0e3368d9106d@googlegroups.com> |
| In reply to | #75021 |
On Thursday, November 5, 2015 at 4:12:43 PM UTC-5, David Brown wrote:
> On 05/11/15 22:06, Rick C. Hodgin wrote:
> > On Thursday, November 5, 2015 at 3:57:51 PM UTC-5, August Karlstrom wrote:
> >> On 2015-11-02 17:50, Rick C. Hodgin wrote:
> >>> On Monday, November 2, 2015 at 11:06:12 AM UTC-5, Chad wrote:
> >>>> Is it supposed to fix the shortcomings in C?
> >>>
> >>> CAlive is my C-like language offering unto Jesus Christ, part of my vision
> >>> for the Liberty Software Foundation, and Village Freedom Project. It aims
> >>> to be a largely C-compatible language, but with some of the new features
> >>> the Lord has given me insight to, and one built atop faith in Jesus Christ.
> >>
> >> Hopefully it will not turn into a flying spaghetti monster like C++.
> >
> > Amen to that! :-)
> >
> > -----
> > CAlive will add support for the basic class, exceptions, and some of
> > the relaxed syntax requirements, though it will keep C's weaker
> > pointer type checking (producing only warnings, not errors).
> >
> > Those are my starting points. If someone can make a great argument
> > as to why other C++ features should be added, I will consider it.
> >
>
> Namespaces would be an obvious choice - they are pretty close to zero
> cost, and should not cause much confusion or complications for either
> the compiler writer or the compiler user.
That would be doable.
> Consider allowing const expressions to be used in more places. C++
> allows a "const int" (effectively a "static const int" by C++ rules)
> value to be used as the size of an array, for example, offering several
> advantages over the #define names typically used in C.
I'm surprised to hear this, so maybe I'm not understanding what you're
saying properly.
I have used const int values for sizes since 2011 (mostly because they
show up in the debuggers as viewable values). I learned that trick
from Shiv Shankar Dayal when I was taking care of my mother before she
died. He was writing his C book at that time, and we were on chat most
everyday.
Is this what you mean by const int? Around line 1514, or search for
'gnProps_masterSize':
https://github.com/RickCHodgin/libsf/blob/master/source/vjr/source/objects/accessors.h
> Have a look at Jacob's llc-win, and the extensions he has made to C.
Jacob Navia?
> Some of them are closely related to C++ features, but like you he has
> tried to avoid the complexity of C++. There may be ideas you can
> "borrow" from there.
>
> Can I assume you don't want to include templates?
I've had about two occasions in my life where I really could've
used templates. Can you make a "great argument" for why they
should be included as a general feature?
Best regards,
Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-11-06 14:00 +0100 |
| Message-ID | <n1i84k$hru$1@dont-email.me> |
| In reply to | #75023 |
On 05/11/15 22:25, Rick C. Hodgin wrote: > On Thursday, November 5, 2015 at 4:12:43 PM UTC-5, David Brown wrote: >> On 05/11/15 22:06, Rick C. Hodgin wrote: >>> On Thursday, November 5, 2015 at 3:57:51 PM UTC-5, August Karlstrom wrote: >>>> On 2015-11-02 17:50, Rick C. Hodgin wrote: >>>>> On Monday, November 2, 2015 at 11:06:12 AM UTC-5, Chad wrote: >>>>>> Is it supposed to fix the shortcomings in C? >>>>> >>>>> CAlive is my C-like language offering unto Jesus Christ, part of my vision >>>>> for the Liberty Software Foundation, and Village Freedom Project. It aims >>>>> to be a largely C-compatible language, but with some of the new features >>>>> the Lord has given me insight to, and one built atop faith in Jesus Christ. >>>> >>>> Hopefully it will not turn into a flying spaghetti monster like C++. >>> >>> Amen to that! :-) >>> >>> ----- >>> CAlive will add support for the basic class, exceptions, and some of >>> the relaxed syntax requirements, though it will keep C's weaker >>> pointer type checking (producing only warnings, not errors). >>> >>> Those are my starting points. If someone can make a great argument >>> as to why other C++ features should be added, I will consider it. >>> >> >> Namespaces would be an obvious choice - they are pretty close to zero >> cost, and should not cause much confusion or complications for either >> the compiler writer or the compiler user. > > That would be doable. > >> Consider allowing const expressions to be used in more places. C++ >> allows a "const int" (effectively a "static const int" by C++ rules) >> value to be used as the size of an array, for example, offering several >> advantages over the #define names typically used in C. > > I'm surprised to hear this, so maybe I'm not understanding what you're > saying properly. > > I have used const int values for sizes since 2011 (mostly because they > show up in the debuggers as viewable values). I learned that trick > from Shiv Shankar Dayal when I was taking care of my mother before she > died. He was writing his C book at that time, and we were on chat most > everyday. > > Is this what you mean by const int? Around line 1514, or search for > 'gnProps_masterSize': > > https://github.com/RickCHodgin/libsf/blob/master/source/vjr/source/objects/accessors.h > "const int" is part of standard C. The difference between C and C++ here is that this is legal C++, but not legal C: const int size = 20 * 4; int array[size]; Also, such file-scope or namespace-scope const objects are effectively "static" in C++ unless explicitly declared "extern". I recommend you make the such objects constant expressions in CAlive, like they are in C++ (Keith's post gave the correct terms), especially if you also include namespaces to help scoping and avoiding global namespace pollution. >> Have a look at Jacob's llc-win, and the extensions he has made to C. > > Jacob Navia? Yes. > >> Some of them are closely related to C++ features, but like you he has >> tried to avoid the complexity of C++. There may be ideas you can >> "borrow" from there. >> >> Can I assume you don't want to include templates? > > I've had about two occasions in my life where I really could've > used templates. Can you make a "great argument" for why they > should be included as a general feature? > How about, they are so useful in C++ that newer versions of the C++ standards put significant focus on making them better? No, I am not going to argue why /you/ should put templates in CAlive. They are not a simple feature, such as the others I have suggested here. It is very much up to /you/ if you want the power, flexibility - but complexity and effort - of templates.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-06 05:14 -0800 |
| Message-ID | <e53c3e86-c943-407a-aca0-c12caf14e213@googlegroups.com> |
| In reply to | #75088 |
On Friday, November 6, 2015 at 8:00:24 AM UTC-5, David Brown wrote: > On 05/11/15 22:25, Rick C. Hodgin wrote: > > On Thursday, November 5, 2015 at 4:12:43 PM UTC-5, David Brown wrote: > >> On 05/11/15 22:06, Rick C. Hodgin wrote: > >>> On Thursday, November 5, 2015 at 3:57:51 PM UTC-5, August Karlstrom wrote: > >>>> On 2015-11-02 17:50, Rick C. Hodgin wrote: > >>>>> On Monday, November 2, 2015 at 11:06:12 AM UTC-5, Chad wrote: > >>>>>> Is it supposed to fix the shortcomings in C? > >>>>> > >>>>> CAlive is my C-like language offering unto Jesus Christ, part of my vision > >>>>> for the Liberty Software Foundation, and Village Freedom Project. It aims > >>>>> to be a largely C-compatible language, but with some of the new features > >>>>> the Lord has given me insight to, and one built atop faith in Jesus Christ. > >>>> > >>>> Hopefully it will not turn into a flying spaghetti monster like C++. > >>> > >>> Amen to that! :-) > >>> > >>> ----- > >>> CAlive will add support for the basic class, exceptions, and some of > >>> the relaxed syntax requirements, though it will keep C's weaker > >>> pointer type checking (producing only warnings, not errors). > >>> > >>> Those are my starting points. If someone can make a great argument > >>> as to why other C++ features should be added, I will consider it. > >>> > >> > >> Namespaces would be an obvious choice - they are pretty close to zero > >> cost, and should not cause much confusion or complications for either > >> the compiler writer or the compiler user. > > > > That would be doable. > > > >> Consider allowing const expressions to be used in more places. C++ > >> allows a "const int" (effectively a "static const int" by C++ rules) > >> value to be used as the size of an array, for example, offering several > >> advantages over the #define names typically used in C. > > > > I'm surprised to hear this, so maybe I'm not understanding what you're > > saying properly. > > > > I have used const int values for sizes since 2011 (mostly because they > > show up in the debuggers as viewable values). I learned that trick > > from Shiv Shankar Dayal when I was taking care of my mother before she > > died. He was writing his C book at that time, and we were on chat most > > everyday. > > > > Is this what you mean by const int? Around line 1514, or search for > > 'gnProps_masterSize': > > > > https://github.com/RickCHodgin/libsf/blob/master/source/vjr/source/objects/accessors.h > > > > "const int" is part of standard C. The difference between C and C++ > here is that this is legal C++, but not legal C: > > const int size = 20 * 4; > int array[size]; > > Also, such file-scope or namespace-scope const objects are effectively > "static" in C++ unless explicitly declared "extern". > > I recommend you make the such objects constant expressions in CAlive, > like they are in C++ (Keith's post gave the correct terms), especially > if you also include namespaces to help scoping and avoiding global > namespace pollution. That is the only way I've known it to work, and the only way I would've coded it. It's one of the advantages?? of using a C++ compiler to write mostly C code. :-) > >> Have a look at Jacob's llc-win, and the extensions he has made to C. > > > > Jacob Navia? > > Yes. > > > > >> Some of them are closely related to C++ features, but like you he has > >> tried to avoid the complexity of C++. There may be ideas you can > >> "borrow" from there. > >> > >> Can I assume you don't want to include templates? > > > > I've had about two occasions in my life where I really could've > > used templates. Can you make a "great argument" for why they > > should be included as a general feature? > > > > How about, they are so useful in C++ that newer versions of the C++ > standards put significant focus on making them better? Nope. :-) > No, I am not going to argue why /you/ should put templates in CAlive. > They are not a simple feature, such as the others I have suggested here. > It is very much up to /you/ if you want the power, flexibility - but > complexity and effort - of templates. Some of this functionality I'd like to migrate into the GUI editor so it can auto-generate code as needed based on a few setup features. It makes the compiler simpler, and the GUI editor far more robust, which are two features I'm explicitly targeting. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2015-11-06 13:33 +0000 |
| Message-ID | <n1ia7l$d4c$1@news.xmission.com> |
| In reply to | #75091 |
In article <e53c3e86-c943-407a-aca0-c12caf14e213@googlegroups.com>,
Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote:
...
>> >> Have a look at Jacob's llc-win, and the extensions he has made to C.
>> >
>> > Jacob Navia?
See .sig for why anything involving Jacob is anathema (both literally and
figuratively) to Ricky.
--
To my knowledge, Jacob Navia is not a Christian.
- Rick C Hodgin -
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-11-06 14:14 +0000 |
| Message-ID | <n1icgl$3gk$1@dont-email.me> |
| In reply to | #75088 |
On 06/11/2015 13:00, David Brown wrote: > On 05/11/15 22:25, Rick C. Hodgin wrote: > How about, they are so useful in C++ that newer versions of the C++ > standards put significant focus on making them better? > > No, I am not going to argue why /you/ should put templates in CAlive. > They are not a simple feature, such as the others I have suggested here. > It is very much up to /you/ if you want the power, flexibility - but > complexity and effort - of templates. How about listing the things that you would leave out from C++? That might be a shorter list! The problem is that C++ is a very complicated language and it's even more complicated writing a compiler for it, running into many man-years if starting from scratch. C++ is also the result of some 30 years of development. (I was going to say 'refinement', but 'refined' is not how I would describe the language!) So for what is likely to be a one-person effort for a new language (and I believe by someone of limited experience, even aided by this mysterious "lord"), you really want to leave out as much as possible. -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-06 06:28 -0800 |
| Message-ID | <bdce3cd0-5001-4088-aabe-a291262d82c8@googlegroups.com> |
| In reply to | #75099 |
On Friday, November 6, 2015 at 9:14:59 AM UTC-5, Bart wrote: > So for what is likely to be a one-person effort for a new language (and > I believe by someone of limited experience, even aided by this > mysterious "lord"), you really want to leave out as much as possible. There is no specific limitation that I am operating within. The tasks I have carved out for this project are huge. I am well aware of that. But they are the fundamental forms I feel comfortable operating at when I turn to the Lord in prayer. When I am operating at these levels, I do not feel like I'm "taking shortcuts" or "cutting corners," but rather I feel in all points when I self-examine the effort that what I am in pursuit of is a true, fundamental offering, something that I am please with, and have no conviction over. It's also why I'm coding everything myself from scratch. I am making sure that everything I code has that same fundamental non-conviction origination, so that it is a securely built offering unto the Lord, and not one which was just thrown together, but rather is one that is wrought over much time, much prayer, much consideration, much love, and much devotion to the One who has saved me from damnation, and given me the most amazing gift imaginable: eternal life in the paradise of God. In short: I am offering the Lord my best, and doing so at all points where I feel pleased and comfortable with my offering unto Him, for He is worthy of all I could ever give Him. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-06 06:52 -0800 |
| Message-ID | <b8a3004b-4956-46db-8548-845d8c2e4e51@googlegroups.com> |
| In reply to | #75099 |
On Friday, November 6, 2015 at 9:14:59 AM UTC-5, Bart wrote: > On 06/11/2015 13:00, David Brown wrote: > > On 05/11/15 22:25, Rick C. Hodgin wrote: > > > How about, they are so useful in C++ that newer versions of the C++ > > standards put significant focus on making them better? > > > > No, I am not going to argue why /you/ should put templates in CAlive. > > They are not a simple feature, such as the others I have suggested here. > > It is very much up to /you/ if you want the power, flexibility - but > > complexity and effort - of templates. > > How about listing the things that you would leave out from C++? That > might be a shorter list! > > The problem is that C++ is a very complicated language and it's even > more complicated writing a compiler for it, running into many man-years > if starting from scratch. > > C++ is also the result of some 30 years of development. (I was going to > say 'refinement', but 'refined' is not how I would describe the language!) > > So for what is likely to be a one-person effort for a new language (and > I believe by someone of limited experience, even aided by this > mysterious "lord"), you really want to leave out as much as possible. One other point: I am not limiting my offering based on "what's technically unfeasible or difficult to implement." Instead, I look to what I want to offer people in terms of a language. I believe C needs the basic class. It has needed it all along since the concept was invented. It's one of those fundamental things which relates the mechanics of the machine to human thought in a much more natural way. And when I consider the potential additional difficulties I will have on my side in writing the compiler, I recognize that I am someone with a particular skillset capable of creating a tool that does these things, and that it only has to be done once. Once it is done, then long-term maintenance is relatively easy compared to origination. And by that more difficult offering I incur upon myself, I make the code that others will use that much cleaner, capable, more robust, etc. It's a tradeoff I am happy to make, and one I have a history of making for my customers ... a little more coding on my part allows the features they have at their disposal to make their job to be a little easier for them. A one-time effort given for me, for a many-use gain by others. To me, it's the only natural course. And, in just thinking about this, it's in the same manner as what the Lord did for us at the cross: A one- time effort given by Him, for a many-saved offering by others. Wow. That's interesting. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-11-06 08:45 -0800 |
| Message-ID | <lnegg33wme.fsf@kst-u.example.com> |
| In reply to | #75088 |
David Brown <david.brown@hesbynett.no> writes:
[...]
> "const int" is part of standard C. The difference between C and C++
> here is that this is legal C++, but not legal C:
>
> const int size = 20 * 4;
> int array[size];
It's legal in C at block scope (in C99, and in C11 for an implementation
that supports VLAs), but for different reasons than in C++.
In C, `size` can't be used in a case label, for example.
[...]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-11-05 15:43 -0800 |
| Message-ID | <2fcd5efc-978e-4e68-b114-63d182f3580b@googlegroups.com> |
| In reply to | #75021 |
On Thursday, November 5, 2015 at 9:12:43 PM UTC, David Brown wrote: > On 05/11/15 22:06, Rick C. Hodgin wrote: > > Have a look at Jacob's llc-win, and the extensions he has made to C. > Some of them are closely related to C++ features, but like you he has > tried to avoid the complexity of C++. There may be ideas you can > "borrow" from there. > llc-win also has the merit of being actually implemented. It's a released compiler that you can use for serious development.
[toc] | [prev] | [next] | [standalone]
| From | Chad <cdalten@gmail.com> |
|---|---|
| Date | 2015-11-05 15:59 -0800 |
| Message-ID | <ff01ceb5-3a06-48f9-89b8-a2cfeb189aec@googlegroups.com> |
| In reply to | #75030 |
I still haven't seen an actual link where I can download and install CAlive.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-05 16:11 -0800 |
| Message-ID | <21f75504-d3f4-4c12-8d71-6861a66e47a5@googlegroups.com> |
| In reply to | #75032 |
On Thursday, November 5, 2015 at 7:00:04 PM UTC-5, Chad wrote:
> I still haven't seen an actual link where I can download and install CAlive.
CAlive is under development. It is not a downloadable product yet. You
can track my development progress at:
Parent directory:
https://github.com/RickCHodgin/libsf/tree/master/exodus/tools
Rapid Development Compiler framework:
https://github.com/RickCHodgin/libsf/tree/master/exodus/tools/rdc
CAlive compiler (LibSF CAlive Compiler):
https://github.com/RickCHodgin/libsf/tree/master/exodus/tools/lcc
Best regards,
Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-05 16:35 -0800 |
| Message-ID | <4cbe89a9-03be-43b3-870a-f232910cd0ec@googlegroups.com> |
| In reply to | #75033 |
On Thursday, November 5, 2015 at 7:11:55 PM UTC-5, Rick C. Hodgin wrote:
> On Thursday, November 5, 2015 at 7:00:04 PM UTC-5, Chad wrote:
> > I still haven't seen an actual link where I can download and install CAlive.
>
> CAlive is under development. It is not a downloadable product yet. You
> can track my development progress at:
>
> Parent directory:
> https://github.com/RickCHodgin/libsf/tree/master/exodus/tools
>
> Rapid Development Compiler framework:
> https://github.com/RickCHodgin/libsf/tree/master/exodus/tools/rdc
>
> CAlive compiler (LibSF CAlive Compiler):
> https://github.com/RickCHodgin/libsf/tree/master/exodus/tools/lcc
Also the book I'm writing on CAlive here:
https://github.com/RickCHodgin/libsf/blob/master/books/rdc/rdc.odt
Best regards,
Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-05 16:12 -0800 |
| Message-ID | <9af6c45e-1f7f-4bd3-90c9-afe4adcd1ac3@googlegroups.com> |
| In reply to | #75030 |
On Thursday, November 5, 2015 at 6:43:51 PM UTC-5, Malcolm McLean wrote: > On Thursday, November 5, 2015 at 9:12:43 PM UTC, David Brown wrote: > > On 05/11/15 22:06, Rick C. Hodgin wrote: > > > > Have a look at Jacob's llc-win, and the extensions he has made to C. > > Some of them are closely related to C++ features, but like you he has > > tried to avoid the complexity of C++. There may be ideas you can > > "borrow" from there. > > llc-win also has the merit of being actually implemented. It's a > released compiler that you can use for serious development. Excellent. Thank you, Malcom. I appreciate the assistance. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-11-05 20:28 -0800 |
| Message-ID | <5469fbb2-5c71-4277-a3bf-d6209d343412@googlegroups.com> |
| In reply to | #75034 |
On Friday, November 6, 2015 at 12:14:01 AM UTC, Rick C. Hodgin wrote: > On Thursday, November 5, 2015 at 6:43:51 PM UTC-5, Malcolm McLean wrote: > > > llc-win also has the merit of being actually implemented. It's a > > released compiler that you can use for serious development. > > Excellent. Thank you, Malcom. I appreciate the assistance. > It's got garbage collection. So you can have garbage collection in C Alive for free, if you use llc-win. That might help you get something up and running. Ultimately you'll want to compile to standard C, and then straight to machine code. But take one step at a time.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-05 20:40 -0800 |
| Message-ID | <21e407fb-6d93-4bd7-9e56-1a0b4c10fa91@googlegroups.com> |
| In reply to | #75045 |
On Thursday, November 5, 2015 at 11:28:38 PM UTC-5, Malcolm McLean wrote: > On Friday, November 6, 2015 at 12:14:01 AM UTC, Rick C. Hodgin wrote: > > On Thursday, November 5, 2015 at 6:43:51 PM UTC-5, Malcolm McLean wrote: > > > > > llc-win also has the merit of being actually implemented. It's a > > > released compiler that you can use for serious development. > > > > Excellent. Thank you, Malcom. I appreciate the assistance. > > > It's got garbage collection. > So you can have garbage collection in C Alive for free, if you use llc-win. > That might help you get something up and running. My goals are to create an offering for the Lord, one which is founded upon Him and the skills and talents He first gave me, as an offering given back to Him, and then also to mankind. To my knowledge, Jacob Navia is not a Christian. As such, I could not use any of his work to build the product I'm in pursuit of because the thing I'm building is not just a tool. There are lots of tools in the world which already work. ----- What I'm building is that offering unto the Lord, one that is from the ground-up founded on a pursuit of Him in my life, and, prayerfully, in the lives of those others who would come and help me with development. > Ultimately you'll want to compile to standard C, and then straight to > machine code. But take one step at a time. I'm building a full compiler framework, and then the compiler within that framework. Theoretically, once I get RDC and CAlive completed, I'll have a product constructed that is robust enough I'll be able to then turn around and write a Java syntax compiler using the same framework, simply by creating a new compiler database. And then repeat the process for one which supports C# syntax, and so on. Such is my pursuit. And, Lord willing, it will come to pass in time. I have quite a fire in my belly to get it completed. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-11-05 21:02 -0800 |
| Message-ID | <964fd9f3-543d-417a-87a2-7ca6f8aba42e@googlegroups.com> |
| In reply to | #75047 |
On Friday, November 6, 2015 at 4:40:19 AM UTC, Rick C. Hodgin wrote: > > To my knowledge, Jacob Navia is not a Christian. As such, I could > not use any of his work to build the product I'm in pursuit of because > the thing I'm building is not just a tool. There are lots of tools in > the world which already work. > Our Christian community doesn't reject the secular work of non-Christians. We attach a high but not excessive value to work, and we beleive that every able-bodied man has the right to support himself and his family by his work, except in unusual cases he also has the duty to do so.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-05 21:53 -0800 |
| Message-ID | <1f0d5961-da7e-47d1-8cf2-1b6d63dea283@googlegroups.com> |
| In reply to | #75048 |
Malcolm McLean wrote: > Rick C. Hodgin wrote: > > To my knowledge, Jacob Navia is not a Christian. As such, I could > > not use any of his work to build the product I'm in pursuit of because > > the thing I'm building is not just a tool. There are lots of tools in > > the world which already work. > > Our Christian community doesn't reject the > secular work of non-Christians. We attach a > high but not excessive value to work, and we > beleive that every able-bodied man has the > right to support himself and his family by his > work, except in unusual cases he also has the > duty to do so. Which Christian community is that? There is a spirit at work in non-believers, and also in many believers who are not actively pursuing holiness in their life. It is in contrast to that spirit that I stand up and make my offering unto the Lord with a purposeful noise. It is the foundation I am building, a ground-up "explicitly for the Lord" offering. Every algorithm, every line of code, all of it original work from inside of us, given expressly for Him. God is central in the universe. He upholds all things continuously by the word of His power. When John was called up to Heaven in Revelation by Jesus, the first thing he saw was God's throne. Not streets of God, or beautiful angels, but His throne. God is central in our lives. His Son's blood atonement is crucial for us to have eternal life. These are not like other things, but rather they are the real foundation. They are the solid assurance. Yet so many live their lives without holding God in His proper place as Lord, and Master. I am building an offering for the Lord using the skills and talents He gave me. I am in pursuit of holiness in my life, and my offering, and I do this because of His call to be holy, for He is holy, is a call upon my life. Others are welcome to come, but there is a standard I am upholding in this offering. It is not just a work. Not just a tool. It is an expression of love and devotion to my Lord and Savior, because without Him reaching into my sinful life, I would be a wretched man only on his way to Hell. But because of what He's done I will shine like the stars forever with all the saints. Such an end is worthy of such an offering with my life, for it is His life, and He lives inside of me. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Chad <cdalten@gmail.com> |
|---|---|
| Date | 2015-11-05 23:43 -0800 |
| Message-ID | <8849f985-b2f4-4e63-b462-c3c872730318@googlegroups.com> |
| In reply to | #75050 |
So I looked at the links. You haven't even started the lexer nor the abstract syntax tree yet? Or is this going to be an interpreted language?
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-11-06 03:27 -0800 |
| Message-ID | <aac58769-56f9-4c06-acfd-2d8328dc3059@googlegroups.com> |
| In reply to | #75052 |
Chad wrote:
> So I looked at the links. You haven't even
> started the lexer nor the abstract syntax tree
> yet?
I have no formal training in language design. The
closest I've come are some YouTube videos by Alex
Aiken from Stanford:
https://www.youtube.com/watch?v=sm0QQO-WZlM
So, apart from a few fundamental ideas, I'm simply
thinking my way through the whole process.
I am using Visual FreePro, Jr's parsing engine to
to tokenize everything, and am building some
fundamental expression parsing algorithms. I am
using and a custom-built tool, called SourceLight,
to identify the various patterns and relationships
between sub-expressions, thereby invoking the correct
sub-expression handler.
It may or may not work. So far it is encouraging.
> Or is this going to be an interpreted language?
Compiled into a binary using a new ABI called
LiveCode, which is fully edit-and-continue.
Best regards,
Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6 Next page →
Back to top | Article view | comp.lang.c
csiph-web