Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > bug raport - about way of linking in c

Reply
Thread Tools

bug raport - about way of linking in c

 
 
Ian Collins
Guest
Posts: n/a
 
      10-03-2012
On 10/04/12 11:05, fir wrote:
>
> I wrote on this before many times in this messages tree
>
> 1. local linking i see as a fix to the present c - it will break no line
>
> 2. other improvements makes a distinct language I work on almost 10 years (maybe not such many but I forgot when it had begun) I used to call it C2 as a 'codename'
>
> I Said here on about 4 improvements, some
> other I am thinking on are also:
>
> 1) realloc keyword
>
> int tab[1000];
>
> realloc tab[2000];
>
> - it will make a new dynamic memory paradigm
> (or almost) other than both GC and no
> malloc/free - like management - labels/handlers
> ale never disjoined with ram content here


This doesn't make a great deal of sense..

> 2) larger structures are passed (in and out) by
> hideen adress, return value is always on upper
> scope so there are no waste on passing
>
> struct float3 {float x,y,z};
>
> (float3) cross(float3 x, float3 y) //by adr not value
> {
> return { x.y * y.z - x.z * y.y,
> x.z * y.x - x.x * y.z,
> x.x * y.y - x.y * y.x} //thru addr fill to ram on upper scope
>
> //...
> }
>
> (important - this one is efficient
> and handy one, fills holes in present c)


What you are describing there is pass by reference and return value
optimisation (RVO), both present in C++.

> 3) couple of other ideas
>
> ex 'build in' types
> float3 or float4 float8 int4 etc related to sse/avx types, accelerated by sse operations on such
> types


This could probably be implemented in current C++. Maybe you are
working in the wrong language?

--
Ian Collins
 
Reply With Quote
 
 
 
 
Kaz Kylheku
Guest
Posts: n/a
 
      10-03-2012
On 2012-10-03, fir <> wrote:
> I wrote on this before many times in this messages tree
>
> 1. local linking i see as a fix to the present c - it will break no line


Well, not as far you're able to see.

Anyway, you should join the ISO C committee; you'd be in excellent company.

> 2. other improvements makes a distinct language I work on almost 10 years
> (maybe not such many but I forgot when it had begun) I used to call it C2 as
> a 'codename'


URL to code repository, or it didn't happen.
 
Reply With Quote
 
 
 
 
fir
Guest
Posts: n/a
 
      10-03-2012
W dniu czwartek, 4 października 2012 00:35:29 UTC+2 użytkownik Kaz Kylheku napisał:
> On 2012-10-03, fir <> wrote:
>
> > I wrote on this before many times in this messages tree

>
> >

>
> > 1. local linking i see as a fix to the present c - it will break no line

>
>
>
> Well, not as far you're able to see.
>
>
>
> Anyway, you should join the ISO C committee; you'd be in excellent company.
>
>
>
> > 2. other improvements makes a distinct language I work on almost 10 years

>
> > (maybe not such many but I forgot when it had begun) I used to call it C2 as

>
> > a 'codename'

>
>
>
> URL to code repository, or it didn't happen.


Will make a compiler (codename 'fury'),
but makin such compiler is much easier than
workin out such improvements - I guarantee,

Compiler is a piece of cake compared to
thoutghts needed to find out such things


 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      10-03-2012
fir <> writes:
> W dniu środa, 3 października 2012 23:07:47 UTC+2 użytkownik Keith Thompson napisał:
>> fir <> writes:
>> [...]
>> > The main benefit here is trashing out header files which i
>> > dislike.. (not to much will change but there should be a way to
>> > contain type definitions in .obj files etc)

>>
>> If you eliminate header files, you're making a radical change to the
>> C language, big enough that I wouldn't even call the new language
>> "C". It would break every non-trivial C program that's ever been
>> written. Even C++ didn't do that.
>>
>> If you add your "modules" feature to the language without eliminating
>> header files, than you have two separate mechanisms with overlapping
>> functionality, which will make learning the language that much
>> more difficult.
>>
>> You probably have some good ideas, but I don't think they can fit
>> into C. If you want to proceed with this, I suggest you invent
>> a new language. You can base it on C as much as you like, but I
>> advise against calling your new language "C". (The name "D" is
>> already taken; see <http://dlang.org/>. In fact, D may have some
>> of the features you like; for example, it uses `import std.stdio;`
>> rather than `#include <stdio.h>`.)
>>
>> I also advise you to gain a very strong understanding of C as it's
>> currently defined if you want to base a new language on it.
>>
>> [...]
>>
>> > void main()

>>
>> And in your own language, you can use "void main()" as much as you like.
>> In C, it's wrong. (That's not *quite* accurate, but it's close enough.)


Please take the time to clean up the extra blank lines that
Google Groups inserts so the rest of us don't have to. You can
copy-and-paste your article from the web form into a text editor, fix
it up, then copy-and-paste it back into the web form. (Or consider
using an interface other than the horribly broken Google Groups.)

I blame Google for this, but there are things Google user can do
to alleviate the damage.

> I wrote on this before many times in this messages tree
>
> 1. local linking i see as a fix to the present c - it will break no line
>
> 2. other improvements makes a distinct language I work on almost 10
> years (maybe not such many but I forgot when it had begun) I used to
> call it C2 as a 'codename'


Whatever you may have written many times before, I was responding
to one specific message, which proposed incompatible changes to C.

If you want to create a new language with such features, go ahead
(many others have done similar things). But comp.lang.c exists to
discuss C, not your new language.

> I Said here on about 4 improvements, some
> other I am thinking on are also:

[big snip]

None of which I was commenting on.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      10-03-2012
fir <> writes:
> W dniu środa, 3 października 2012 23:07:47 UTC+2 użytkownik Keith Thompson napisał:
>> advise against calling your new language "C". (The name "D" is
>> already taken; see <http://dlang.org/>. In fact, D may have some
>> of the features you like; for example, it uses `import std.stdio;`
>> rather than `#include <stdio.h>`.)

>
> in my version : as I said
>
> module main;
> reaches stdio;
>
> char* main(char* in)
> //(or close couse sizes and maybe other info should be sent too)
> {
>
> }


That's nice, but it's not C. There's a comp.lang.misc newsgroup
that might be a more appropriate place to discuss your new language.
(I don't know how active it is these days.)

>> I also advise you to gain a very strong understanding of C as it's
>> currently defined if you want to base a new language on it.
>>

> got deep understanding of the thing I call "Spirit Of C"


I don't doubt that you understand what *you call* the Spirit of C.
That doesn't mean you have a deep understanding of the C language
itself.

It's a minor point, but your insistence on writing "void main()", and
your lack of acknowledgement of my explanation of the reasons it's a bad
idea, does not imply a deep understanding of the currently defined C
language.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Stephen Sprunk
Guest
Posts: n/a
 
      10-03-2012
On 03-Oct-12 17:42, fir wrote:
> W dniu czwartek, 4 października 2012 00:35:29 UTC+2 użytkownik Kaz
> Kylheku napisał:
>> On 2012-10-03, fir <> wrote:
>>> 2. other improvements makes a distinct language I work on almost
>>> 10 years (maybe not such many but I forgot when it had begun) I
>>> used to call it C2 as a 'codename'

>>
>> URL to code repository, or it didn't happen.

>
> Will make a compiler (codename 'fury'), but makin such compiler is
> much easier than workin out such improvements - I guarantee,
>
> Compiler is a piece of cake compared to thoutghts needed to find out
> such things


If you think so, that is only because you've never actually written a
compiler, which makes me wonder what you've been _doing_ for the last
ten years, especially since you don't even realize that you've
reinvented namespaces--a concept that is a lot more than ten years old.

A compiler for C, which has been tweaked for ~40 years and now well
understood, is hard enough. A compiler for a language with the features
you propose (which is _not_ C, and is therefore off-topic here) will be
even harder.

S

--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
 
Reply With Quote
 
Stephen Sprunk
Guest
Posts: n/a
 
      10-03-2012
On 03-Oct-12 11:10, BartC wrote:
> "Kaz Kylheku" <> wrote in message
> news:...
>> On 2012-10-02, Stephen Sprunk <> wrote:
>>> Aside from a minor difference in syntax, they're the exact same
>>> thing.
>>>
>>> Since you refuse to recognize that you've reinvented namespaces,
>>> though, you've done a poor job of it.

>>
>> Refusing to recognize that prefixes on names are de-facto
>> namespaces is a sign of low intelligence (and therefore, needless
>> to say, unsuitability for working in language design).

>
> Building-in a permanent prefix into a name is not the same as having
> namespaces. Otherwise no-one would have bothered inventing them.


Having namespaces as a native language feature allows some syntactic
sugar, such as being able to leave the prefix off in some cases, but
that's about it.

If you look at how C++ namespaces are implemented in common ABIs,
they're just translated to prefixes by the name-mangling system--which
you can do just fine in C without needing a special language feature,
though in some cases a slight bit more typing is required.

> There is a considerable advantage to having a full 'name' made up of
> two or more parts. We all benefit from 'namespaces' as used in
> hierarchical file systems, and from having forenames and surnames!


Yet there are still collisions even with multi-part names, so it's not a
perfect solution.

S

--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
 
Reply With Quote
 
Stephen Sprunk
Guest
Posts: n/a
 
      10-03-2012
On 03-Oct-12 13:12, fir wrote:
> W dniu wtorek, 2 października 2012 15:05:17 UTC+2 użytkownik Stephen
> Sprunk napisał:
>> On 29-Sep-12 01:46, fir wrote:
>>>> You're reinventing namespaces, but poorly.
>>>
>>> This is no matter of namespace. ... (One should not cure this by
>>> adding namespaces, this is no c spirit in such things, it would
>>> be bad)

>>
>> ... but reinventing namespaces is exactly what you've done.
>>
>> Here is your proposed syntax (from another post):
>>
>>> ...

>>
>> Here is the same thing done with C++ namespaces:
>>
>> ...
>>
>> Aside from a minor difference in syntax, they're the exact same
>> thing.
>>
>> Since you refuse to recognize that you've reinvented namespaces,
>> though, you've done a poor job of it. In particular, the C++
>> solution (and the C prefix convention that does roughly the same
>> thing, which I provided an example of in another reply) does not
>> require any change to linkers or break billions of lines of
>> existing code, whereas your proposal does.

>
> The difference is huge -
>
> If you have namespaces and modules you have two 'beings' (modules and
> namespaces) In my proposal you have only modules - and you dont need
> namespaces - its much simpler


You are still missing the point. Your modules _are_ namespaces. There
are not two "beings"; there is one thing with two names: "modules" (what
you call it) and "namespaces" (what everyone else calls it).

S

--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      10-04-2012
On 2012-10-03, fir <> wrote:
> W dniu czwartek, 4 października 2012 00:35:29 UTC+2 użytkownik Kaz Kylheku napisał:
>> > 2. other improvements makes a distinct language I work on almost 10 years

>>
>> > (maybe not such many but I forgot when it had begun) I used to call it C2 as

>>
>> > a 'codename'

>>
>>
>>
>> URL to code repository, or it didn't happen.

>
> Will make a compiler (codename 'fury'),
> but makin such compiler is much easier than
> workin out such improvements - I guarantee,
>
> Compiler is a piece of cake compared to
> thoutghts needed to find out such things


URL to piece-of-cake compiler, or it didn't happen.
 
Reply With Quote
 
fir
Guest
Posts: n/a
 
      10-04-2012
W dniu czwartek, 4 października 2012 01:57:22 UTC+2 użytkownik Stephen Sprunk napisał:
> On 03-Oct-12 13:12, fir wrote:
>
> > If you have namespaces and modules you have two 'beings' (modules and
> > namespaces) In my proposal you have only modules - and you dont need
> > namespaces - its much simpler

>
>
>
> You are still missing the point. Your modules _are_ namespaces. There
> are not two "beings"; there is one thing with two names: "modules" (what
> you call it) and "namespaces" (what everyone else calls it).
>


this above is wrong - by module I mean as
I said .obj file and its corresponding
source file (or files if you would tear
it up on many files - but If one would
like to divide module code on pieces I
would reccomend to divide it on binary
level)

If the concept I mean would be namespace
thet namespuce then would be divided its
containing constents on binary level into
distinct binary modules, namespace is not
about it - module is module (related to
binary level code divisions0, namespace
is namespace (manage names in a way) -
this what I was talking was about modules

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
Generating raport Luke Ruby 1 09-14-2006 06:51 AM
Getting linking error: not found in vtable (Trying to understand whats wrong the way I did my classes?) g35rider@gmail.com C++ 1 08-17-2006 05:10 PM
way way way OT: MCNGP Announcement Neil MCSE 174 04-17-2006 05:55 PM
AMD Opteron: 1-way, 2-way, ... Up to 8-way. John John Windows 64bit 12 12-27-2005 08:17 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57