On 10/09/2026 00:30, bart wrote:
On 09/09/2026 22:26, Janis Papanagnou wrote:[...]
[...][...]
Each type of import has its own advantages and disadvantages.
Type 1 would need micro-management if you want a lot of symbols from a module.-a But if you only need a small number, it can keep things neat -
you only see what you actually want to use.-a And if the imported module only really exports a single name (like "my_class.py" exporting
"My_Class"), it's a neat solution that avoids later code clutter from
having to specify the module name.
Type 2 lets you immediately use all the identifiers from the module, but causes a lot of problems if things change in the future.-a Maybe your own code has a function "fluff", and a later version of "foobar.py" also
adds a function "fluff".-a That is not going to be good.
Type 3 lets you conveniently import all the exported symbols from the module, but you need to specify the namespace when using them.
As I see it, Janis favours that kind of flexibility for modules (though
of course the details may differ for different languages).
You seem to be favouring just type 2 - or even a "from * import *" solution.-a That might be convenient for a personal language where you
are the only one ever writing the code - you know there are no
collisions, because you wrote everything.-a For anyone else, working
outside a bubble, it is unscalable.
On 2026-09-10 09:48, David Brown wrote:
On 10/09/2026 00:30, bart wrote:
On 09/09/2026 22:26, Janis Papanagnou wrote:[...]
[...][...]
Each type of import has its own advantages and disadvantages.
Type 1 would need micro-management if you want a lot of symbols from a
module.-a But if you only need a small number, it can keep things neat
- you only see what you actually want to use.-a And if the imported
module only really exports a single name (like "my_class.py" exporting
"My_Class"), it's a neat solution that avoids later code clutter from
having to specify the module name.
Type 2 lets you immediately use all the identifiers from the module,
but causes a lot of problems if things change in the future.-a Maybe
your own code has a function "fluff", and a later version of
"foobar.py" also adds a function "fluff".-a That is not going to be good.
Type 3 lets you conveniently import all the exported symbols from the
module, but you need to specify the namespace when using them.
As I see it, Janis favours that kind of flexibility for modules
(though of course the details may differ for different languages).
Since you mentioned me - and since I don't intend after my thorough explanation to spend yet more time with bart's posts about it - let
me confirm your interpretation, and give an example from practice.
Note also that none of the languages I'm currently using is supporting
that principle - there's no "best" language in that respect, although
some are closer to an ideal modularization than others. (Some recent languages [that I don't know] may do a better job here, I'd expect.)
Once I needed a function to produce Gaussian noise - and nothing else!
(Back then I used, I think, the Fortran IMSL library.) - In a modern modules-supporting environment I'd have liked to have something like
-a use imsl.math.rand.gauss
I don't want the whole library, nor the whole math package, nor all
the random functions. I want them neither pollute my namespace, nor
do I want that libraries, library components, or functions are even considered for inclusion, neither on the program text level, nor at
the binary module level, if they are not needed.
In case of name clashes that happen despite a pinpointed inclusion
there's still an optional qualification syntax necessary. - In case
of the above example the "structuring path" could be used for that,
say, for example, something like-a rand.gauss-a and-a matrix.gauss .
You seem to be favouring just type 2 - or even a "from * import *"
solution.-a That might be convenient for a personal language where you
are the only one ever writing the code - you know there are no
collisions, because you wrote everything.-a For anyone else, working
outside a bubble, it is unscalable.
What I find annoying with his posts is that from within his bubble he's
not even trying to look outside his horizon,
His inept exaggerations, the sloppiness,
On 09/09/2026 23:07, Janis Papanagnou wrote:[...]
But there need not be a problem using '=' for assignments and also
for comparisons if the respective languages could tell them apart by
context and with appropriate semantic rules.
Agreed.-a In my "dream language", assignment would be a statement, not an expression, which lets you use the same symbol.
Indeed, assignment
would be very rare - normally variables would be initialised once, and
never changed.
[...]
But also, the difference between you and me is that I devise my own solutions, and do not have to settle for someone else's decisions.
When you have to implement this stuff then you can't be
sloppy. Perhaps you're just jealous that my scheme isn't available in
your favourite language.
bart pisze:
On 10/09/2026 15:59, fir wrote:
fir pisze:
Try it with a real example, such as:
-a-a-a-a-a succeeded =-a tdefl_init pComp-a pPut_buf_func-a pPut_buf_user >>>> flags == TDEFL_STATUS_OKAY ;
-a-a-a-a-a succeeded = succeeded &&-a tdefl_compress_buffer pComp-a pBuf >>>> buf_len-a TDEFL_FINISH == TDEFL_STATUS_DONE
im not sure what you mean hera bove but with this e conventions im
talkin abouts its
succeeded =-a tdefl_init( pComp,-a pPut_buf_func,-a pPut_buf_user,
flags== TDEFL_STATUS_OKAY) ;
Not bad, but this is the original:
-a-a succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags)
== TDEFL_STATUS_OKAY);
thet would be
succeeded = (tdefl_init pComp-a pPut_buf_func-a pPut_buf_user-a flags ) == TDEFL_STATUS_OKAY
andAnd here's the original for this:
succeeded = succeeded &&-a tdefl_compress_buffer( pComp , pBuf,
buf_len, TDEFL_FINISH == TDEFL_STATUS_DONE);
-a-a-a-a succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf,
buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
I think the parentheses and commas do a good job in removing ambiguity.
Although the originals probably had one pair of superfluous
parentheses each, as '=='s precedence is already higher than both =
and &&.
But, what are you planning with general expressions: will you still
have operator precedences?
if the comma and parenthesis are not needed why use them
esp as a most amount of code is like
-avoid RunFrame advance
-a{
-a-a-a-a-a Initialise,
-a-a-a-a-a ClearFrameData 0x444444
-a-a-a-a-a DrawLine3d 100.0-a-a 100.0-a-a 0.0-a-a-a-a 100.0 -100.0 0.0-a-a-a 0xffffff
-a-a-a-a-a DrawLine3d 100.0-a -100.0-a-a 0.0-a-a-a -100.0 -100.0 0.0-a-a-a 0xffffff
-a-a-a-a-a DrawLine3d -100.0 -100.0-a-a 0.0-a-a-a -100.0-a 100.0 0.0-a-a-a 0xffffff
-a-a-a-a-a DrawLine3d -100.0-a 100.0-a-a 0.0-a-a-a-a 100.0-a 100.0 0.0-a-a-a 0xffffff
-a-a-a-a-a DrawDot3d 0.0 0.0 100.0-a-a 20.0-a 0x557788
-a-a-a-a-a DrawDot3d 0.0 0.0 150.0-a-a 30.0-a 0x557722
-a-a-a-a-a DrawDot3d 0.0 0.0 -100.0-a 10.0-a 0xaa7788
-a-a-a-a-a InitSomeJointsFigures
-a-a-a-a-a DrawCloud1, DrawCloud2,
-a-a-a-a DrawCloud11, DrawCloud12, UpdateDotsBag, DrawDotsBag
-aFillRectangle2 10 10 20 20 color
-a-a DrawSomeText2F 0xcccccc 0x666666 20 10 " %x \x00"-a-a 0xffffff
-a-a DrawSomeText2F 0xcccccc 0x666666 10 20 "hello, this is example
program compiled by fir's furia compiler \x00"
-a-a-a DeawLines
-a-a-a DrawTextByBalls "hello\x00" 0 0 0x999999
-a-a-a DrawCubesCubeGeo
-a-a BezierPatchTest
-a-a space_pressed? FireDotFromCameraCurrentColor 0.0 0.0 100000 20
-a-a a_pressed?!-a FireDotFromCameraCurrentColor 1.0 0.0 10000 20
-a-a f5_toggler? DrawManual
-a-a DrawFloor 20000 30 0x555555
-a-a DrawRawModel
-a}
i mean lot are "normal" simple calls and there is a lot of (,,,,);
to skip
as to operator precedence ofc its needed and as i said what i show
here is the part that is "resolved" but there are more complex
cases where it is not resolved yet
(for example for this many return values , operator form of functions
(as a would like to have "x foo y" where foo is a function and x y are arguments, and those float char types, some constructions like loops
and so on
On 10/09/2026 00:30, bart wrote:
On 09/09/2026 22:26, Janis Papanagnou wrote:Consider modules in Python, since that is a language with "real" modules
On 2026-09-09 20:12, bart wrote:Why? What is the advantage of so much micromanagement?
On 09/09/2026 02:59, Waldek Hebisch wrote:
[...]
Some even specify individual names to be imported from a module.
What a complete waste of time!
I fear you're just exposing your very limited perception and experience
here. (And en passant probably also the mindset of a technocratic paper
pusher than a software designer.)
Myself I'm favoring _to be able_ to import only what I need and not the
whole bunch of existing things of a module (with all potential implicit
and explicit consequences).
and with which many people are familiar.
# foobar.py
def foo() : return "foo"
def bar() : return "bar"
Another file user.py wants to use "foo" from "foobar.py".-a They can do
so in three main ways :
1. Specific inclusion
from foobar import foo
x = foo()
2. Global namespace inclusion
from foobar import *
x = foo()
3. Module namespace inclusion
import foobar
x = foobar.foo()
Each type of import has its own advantages and disadvantages.
Type 1 would need micro-management if you want a lot of symbols from a module.-a But if you only need a small number, it can keep things neat -
you only see what you actually want to use.
And if the imported module
only really exports a single name (like "my_class.py" exporting
"My_Class"), it's a neat solution that avoids later code clutter from
having to specify the module name.
Type 2 lets you immediately use all the identifiers from the module, but causes a lot of problems if things change in the future.-a Maybe your own code has a function "fluff", and a later version of "foobar.py" also
adds a function "fluff".-a That is not going to be good.
Type 3 lets you conveniently import all the exported symbols from the module, but you need to specify the namespace when using them.
As I see it, Janis favours that kind of flexibility for modules (though
of course the details may differ for different languages).
You seem to be favouring just type 2 - or even a "from * import *"
solution.
That might be convenient for a personal language where you
are the only one ever writing the code - you know there are no
collisions, because you wrote everything.-a For anyone else, working
outside a bubble, it is unscalable.
bart <bc@freeuk.com> writes:
[...]
But also, the difference between you and me is that I devise my own
solutions, and do not have to settle for someone else's decisions.
And you insist on discussing your solutions in comp.lang.c.
I see you've posted to comp.lang.misc. I encourage you to do so more
often.
[...]
When you have to implement this stuff then you can't be
sloppy. Perhaps you're just jealous that my scheme isn't available in
your favourite language.
When you're the only user, you can get away with being sloppy and
covering only the use cases that apply to you.
On 10/09/2026 23:52, Keith Thompson wrote:[...]
I see you've posted to comp.lang.misc. I encourage you to do so more
often.
Besides nobody bothers with topicality any more.
[...]When you have to implement this stuff then you can't be
sloppy. Perhaps you're just jealous that my scheme isn't available in
your favourite language.
When you're the only user, you can get away with being sloppy and
covering only the use cases that apply to you.
On 9/9/2026 5:43 AM, David Brown wrote:
[...]
Just defining the symbol is fine - for use as a pure header guard,________
where the check is with "#ifndef" or "#ifdef", defining it to a value
has no added value.-a Adding the "1" in that example was done without
thinking.
#ifndef __NUMBER_GENERATOR_H__
#define __NUMBER_GENERATOR_H__ 1
________
Is that __* non conformant? Does it breach the impl name prefix space?
David Brown pisze:
On 10/09/2026 18:21, fir wrote:
David Brown pisze:
Either this is just a waste of time (and the fact that most of your
posts are replies to your own posts suggest that this is the case), or
you are really interested in making a new language - and
comp.lang.misc would be a better place to discuss it.
how it suggest that? note thise are 'replies' maybe in some technical
sense of a usenet reader..but on thought /write level they are just continuation of thoughts/topic..its rather quite artificall to write ll
you got to say in one post and assume you have nothing to add ..i often
have things to add
On 10/09/2026 19:17, fir wrote:
David Brown pisze:
On 10/09/2026 18:21, fir wrote:
David Brown pisze:
Either this is just a waste of time (and the fact that most of your
posts are replies to your own posts suggest that this is the case),
or you are really interested in making a new language - and
comp.lang.misc would be a better place to discuss it.
how it suggest that? note thise are 'replies' maybe in some technical
sense of a usenet reader..but on thought /write level they are just
continuation of thoughts/topic..its rather quite artificall to write
ll you got to say in one post and assume you have nothing to add ..i
often have things to add
Public forums - like a Usenet group - are not like having a whiteboard
on your wall.-a If you ask questions that are topical to the group, or
make comments or replies that are topical to the group, that's great.
When you ramble with wild ideas, post after post, that's just wasting everyone's time.-a People don't give any feedback, and mostly skip them.
So please, write your ramblings on a bit of paper or a whiteboard.-a When you have something worth sharing with other people, and you want
feedback or help, post them to an appropriate group.-a If it is actually about C, that's comp.lang.c.-a If it is about a weird new language with
lots of Unicode signs and a very different syntax, comp.lang.misc is a better choice.
This is surely not difficult to understand.
David Brown pisze:
On 10/09/2026 19:17, fir wrote:
David Brown pisze:
On 10/09/2026 18:21, fir wrote:
David Brown pisze:
Either this is just a waste of time (and the fact that most of your
posts are replies to your own posts suggest that this is the case),
or you are really interested in making a new language - and
comp.lang.misc would be a better place to discuss it.
how it suggest that? note thise are 'replies' maybe in some technical
sense of a usenet reader..but on thought /write level they are just
continuation of thoughts/topic..its rather quite artificall to write
ll you got to say in one post and assume you have nothing to add ..i
often have things to add
Public forums - like a Usenet group - are not like having a whiteboard
on your wall.-a If you ask questions that are topical to the group, or
make comments or replies that are topical to the group, that's great.
When you ramble with wild ideas, post after post, that's just wasting
everyone's time.-a People don't give any feedback, and mostly skip them.
So please, write your ramblings on a bit of paper or a whiteboard.
When you have something worth sharing with other people, and you want
feedback or help, post them to an appropriate group.-a If it is
actually about C, that's comp.lang.c.-a If it is about a weird new
language with lots of Unicode signs and a very different syntax,
comp.lang.misc is a better choice.
This is surely not difficult to understand.
what you say is shallow looking on C so i cant agree... you try to
impose you shallow view (just some way like keith thompson want to
impose-a his rigid rukles here that this group is only for standard freaks)
i may partially agree that some investigation in possible c syntax/skin
are somewhat intermediate - but those are intermediate results kinda
needed to obtain final conclusions
i dont much can do something with fact that some post dont interest you
- belive many posts who many wrote here not interest me also (like
things keith writes, or trigraph topic and many more)
(regular c stuff is also not so much interesting, its ok, but some
deeper c ideas much more interesting)
speaking about this whiteboard or blackboard : also not this group has
some historical value and people may be interested how this great new language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name
On 11/09/2026 13:13, fir wrote:
speaking about this whiteboard or blackboard : also not this group has
some historical value and people may be interested how this great new
language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name
If you're looking for a name for your new language ...
... might I suggest EfA-
Richard Harnden pisze:
On 11/09/2026 13:13, fir wrote:assuming that im right and youre part of history - youre get known for
speaking about this whiteboard or blackboard : also not this group
has some historical value and people may be interested how this great
new language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name
If you're looking for a name for your new language ...
... might I suggest EfA-
this - and its not so much glorious legacy
Richard Harnden pisze:
On 11/09/2026 13:13, fir wrote:assuming that im right and youre part of history - youre get known for
speaking about this whiteboard or blackboard : also not this group
has some historical value and people may be interested how this great
new language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name
If you're looking for a name for your new language ...
... might I suggest EfA-
this - and its not so much glorious legacy
fir pisze:
David Brown pisze:
On 10/09/2026 19:17, fir wrote:
David Brown pisze:
On 10/09/2026 18:21, fir wrote:
David Brown pisze:
Either this is just a waste of time (and the fact that most of your >>>>> posts are replies to your own posts suggest that this is the case), >>>>> or you are really interested in making a new language - and
comp.lang.misc would be a better place to discuss it.
how it suggest that? note thise are 'replies' maybe in some
technical sense of a usenet reader..but on thought /write level they
are just continuation of thoughts/topic..its rather quite artificall
to write ll you got to say in one post and assume you have nothing
to add ..i often have things to add
Public forums - like a Usenet group - are not like having a
whiteboard on your wall.-a If you ask questions that are topical to
the group, or make comments or replies that are topical to the group,
that's great. When you ramble with wild ideas, post after post,
that's just wasting everyone's time.-a People don't give any feedback,
and mostly skip them.
So please, write your ramblings on a bit of paper or a whiteboard.
When you have something worth sharing with other people, and you want
feedback or help, post them to an appropriate group.-a If it is
actually about C, that's comp.lang.c.-a If it is about a weird new
language with lots of Unicode signs and a very different syntax,
comp.lang.misc is a better choice.
This is surely not difficult to understand.
what you say is shallow looking on C so i cant agree... you try to
impose you shallow view (just some way like keith thompson want to
impose-a his rigid rukles here that this group is only for standard
freaks)
i may partially agree that some investigation in possible c syntax/skin
are somewhat intermediate - but those are intermediate results kinda
needed to obtain final conclusions
i dont much can do something with fact that some post dont interest
you - belive many posts who many wrote here not interest me also (like
things keith writes, or trigraph topic and many more)
(regular c stuff is also not so much interesting, its ok, but some
deeper c ideas much more interesting)
speaking about this whiteboard or blackboard : also not this group has
some historical value and people may be interested how this great new language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name
if i took a way to use unicode maybe i should take unicode sign?
it will make all this printers to print unicode in papers so that would
be kinda new impact )
fir pisze:
fir pisze:
David Brown pisze:
On 10/09/2026 19:17, fir wrote:
David Brown pisze:
On 10/09/2026 18:21, fir wrote:
David Brown pisze:
Either this is just a waste of time (and the fact that most of
your posts are replies to your own posts suggest that this is the >>>>>> case), or you are really interested in making a new language - and >>>>>> comp.lang.misc would be a better place to discuss it.
how it suggest that? note thise are 'replies' maybe in some
technical sense of a usenet reader..but on thought /write level
they are just continuation of thoughts/topic..its rather quite
artificall to write ll you got to say in one post and assume you
have nothing to add ..i often have things to add
Public forums - like a Usenet group - are not like having a
whiteboard on your wall.-a If you ask questions that are topical to
the group, or make comments or replies that are topical to the
group, that's great. When you ramble with wild ideas, post after
post, that's just wasting everyone's time.-a People don't give any
feedback, and mostly skip them.
So please, write your ramblings on a bit of paper or a whiteboard.
When you have something worth sharing with other people, and you
want feedback or help, post them to an appropriate group.-a If it is
actually about C, that's comp.lang.c.-a If it is about a weird new
language with lots of Unicode signs and a very different syntax,
comp.lang.misc is a better choice.
This is surely not difficult to understand.
what you say is shallow looking on C so i cant agree... you try to
impose you shallow view (just some way like keith thompson want to
impose-a his rigid rukles here that this group is only for standard
freaks)
i may partially agree that some investigation in possible c syntax/skin
are somewhat intermediate - but those are intermediate results kinda
needed to obtain final conclusions
i dont much can do something with fact that some post dont interest
you - belive many posts who many wrote here not interest me also
(like things keith writes, or trigraph topic and many more)
(regular c stuff is also not so much interesting, its ok, but some
deeper c ideas much more interesting)
speaking about this whiteboard or blackboard : also not this group has
some historical value and people may be interested how this great new
language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name
there is also an option of raa to consider
if i took a way to use unicode maybe i should take unicode sign?
it will make all this printers to print unicode in papers so that
would be kinda new impact )
fir pisze:
fir pisze:
fir pisze:
David Brown pisze:
On 10/09/2026 19:17, fir wrote:
David Brown pisze:
On 10/09/2026 18:21, fir wrote:
David Brown pisze:
Either this is just a waste of time (and the fact that most of
your posts are replies to your own posts suggest that this is the >>>>>>> case), or you are really interested in making a new language -
and comp.lang.misc would be a better place to discuss it.
how it suggest that? note thise are 'replies' maybe in some
technical sense of a usenet reader..but on thought /write level
they are just continuation of thoughts/topic..its rather quite
artificall to write ll you got to say in one post and assume you
have nothing to add ..i often have things to add
Public forums - like a Usenet group - are not like having a
whiteboard on your wall.-a If you ask questions that are topical to >>>>> the group, or make comments or replies that are topical to the
group, that's great. When you ramble with wild ideas, post after
post, that's just wasting everyone's time.-a People don't give any
feedback, and mostly skip them.
So please, write your ramblings on a bit of paper or a whiteboard.
When you have something worth sharing with other people, and you
want feedback or help, post them to an appropriate group.-a If it is >>>>> actually about C, that's comp.lang.c.-a If it is about a weird new
language with lots of Unicode signs and a very different syntax,
comp.lang.misc is a better choice.
This is surely not difficult to understand.
what you say is shallow looking on C so i cant agree... you try to
impose you shallow view (just some way like keith thompson want to
impose-a his rigid rukles here that this group is only for standard
freaks)
i may partially agree that some investigation in possible c syntax/skin >>>> are somewhat intermediate - but those are intermediate results kinda
needed to obtain final conclusions
i dont much can do something with fact that some post dont interest
you - belive many posts who many wrote here not interest me also
(like things keith writes, or trigraph topic and many more)
(regular c stuff is also not so much interesting, its ok, but some
deeper c ideas much more interesting)
speaking about this whiteboard or blackboard : also not this group
has some historical value and people may be interested how this great
new language by fir was born (great new B or great new C or great new D
or even more like great new E-a or -e or -a still problems with tha name >>>
there is also an option of raa to consider
this one may be clever as you may treat C as a mooon shape it suggest
that C might enetered a new mooon (black moon) and after this is-a raa
phase - C rising again..assuming C and-a raa are both parts of O
it is some kind of pleasing, but enough to take it?
if i took a way to use unicode maybe i should take unicode sign?
it will make all this printers to print unicode in papers so that
would be kinda new impact )
bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
Perhaps you're just jealous
that my scheme isn't available in your favourite language.
bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
You demonstrated you can be extremely sloppy in your thinking and
in your argumentation! That doesn't mean that you wouldn't be able
to "write programs" ("this stuff"), for sure. - Another example of
sloppy thinking and argumentation.
Perhaps you're just jealous
Your mindset is so primitive, naive, and erroneous; unprecedentedly
given your stubbornness. Your persistent habit of making guesses,
completely missing the point, topics, and characters, had regularly
been shown to be widely erroneous. - I see you can't just stop your ineffective tries. It won't lead you anywhere.
that my scheme isn't available in your favourite language.
I have no "favourite language". (In a couple languages there's some
concepts that I'd like to be more widely spread. - Not sure you're
capable of understanding that and notice the blatant difference!)
And you should meanwhile know that meaningless home-brewed languages
are neither of general interest nor of mine; but you seem to have a persisting mental hindrance to understand what is easy understandable
by others. - Just to be clear; I don't know that "my scheme" you're
talking about is because I'm not interested in your posts about your
personal tools.
(I also suggest to become a bit more honest about your "achievement"
with creating your tool unless it gets some minimum general relevance
beyond your micro-ecosystem. - Why don't you advertise and offer your
tools at any more appropriate place if you think they're so important, innovative, or generally useful?!)
Janis
Janis Papanagnou pisze:
lol, i told keith's team are funny asses..it needs some funcy answer:bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
You demonstrated you can be extremely sloppy in your thinking and
in your argumentation! That doesn't mean that you wouldn't be able
to "write programs" ("this stuff"), for sure. - Another example of
sloppy thinking and argumentation.
Perhaps you're just jealous
Your mindset is so primitive, naive, and erroneous; unprecedentedly
given your stubbornness. Your persistent habit of making guesses,
completely missing the point, topics, and characters, had regularly
been shown to be widely erroneous. - I see you can't just stop your
ineffective tries. It won't lead you anywhere.
that my scheme isn't available in your favourite language.
I have no "favourite language". (In a couple languages there's some
concepts that I'd like to be more widely spread. - Not sure you're
capable of understanding that and notice the blatant difference!)
And you should meanwhile know that meaningless home-brewed languages
are neither of general interest nor of mine; but you seem to have a
persisting mental hindrance to understand what is easy understandable
by others. - Just to be clear; I don't know that "my scheme" you're
talking about is because I'm not interested in your posts about your
personal tools.
(I also suggest to become a bit more honest about your "achievement"
with creating your tool unless it gets some minimum general relevance
beyond your micro-ecosystem. - Why don't you advertise and offer your
tools at any more appropriate place if you think they're so important,
innovative, or generally useful?!)
Janis
you say 'usefull', i tell "your mum is doin new school"
https://www.youtube.com/watch?v=cumbkA5dGDI
fir pisze:
Janis Papanagnou pisze:sorry becouse my bad english i am rather unable to catch some more
lol, i told keith's team are funny asses..it needs some funcy answer:bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
You demonstrated you can be extremely sloppy in your thinking and
in your argumentation! That doesn't mean that you wouldn't be able
to "write programs" ("this stuff"), for sure. - Another example of
sloppy thinking and argumentation.
Perhaps you're just jealous
Your mindset is so primitive, naive, and erroneous; unprecedentedly
given your stubbornness. Your persistent habit of making guesses,
completely missing the point, topics, and characters, had regularly
been shown to be widely erroneous. - I see you can't just stop your
ineffective tries. It won't lead you anywhere.
that my scheme isn't available in your favourite language.
I have no "favourite language". (In a couple languages there's some
concepts that I'd like to be more widely spread. - Not sure you're
capable of understanding that and notice the blatant difference!)
And you should meanwhile know that meaningless home-brewed languages
are neither of general interest nor of mine; but you seem to have a
persisting mental hindrance to understand what is easy understandable
by others. - Just to be clear; I don't know that "my scheme" you're
talking about is because I'm not interested in your posts about your
personal tools.
(I also suggest to become a bit more honest about your "achievement"
with creating your tool unless it gets some minimum general relevance
beyond your micro-ecosystem. - Why don't you advertise and offer your
tools at any more appropriate place if you think they're so important,
innovative, or generally useful?!)
Janis
you say 'usefull', i tell "your mum is doin new school"
https://www.youtube.com/watch?v=cumbkA5dGDI
subtle things in this anglish so maybe it should be
you say 'usefull', i tell your mama is doin new school
maybe this would be more appropriate
(by crom.. i feel body pain again)
(fir)
fir pisze:
fir pisze:
Janis Papanagnou pisze:sorry becouse my bad english i am rather unable to catch some more
lol, i told keith's team are funny asses..it needs some funcy answer:bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
You demonstrated you can be extremely sloppy in your thinking and
in your argumentation! That doesn't mean that you wouldn't be able
to "write programs" ("this stuff"), for sure. - Another example of
sloppy thinking and argumentation.
Perhaps you're just jealous
Your mindset is so primitive, naive, and erroneous; unprecedentedly
given your stubbornness. Your persistent habit of making guesses,
completely missing the point, topics, and characters, had regularly
been shown to be widely erroneous. - I see you can't just stop your
ineffective tries. It won't lead you anywhere.
that my scheme isn't available in your favourite language.
I have no "favourite language". (In a couple languages there's some
concepts that I'd like to be more widely spread. - Not sure you're
capable of understanding that and notice the blatant difference!)
And you should meanwhile know that meaningless home-brewed languages
are neither of general interest nor of mine; but you seem to have a
persisting mental hindrance to understand what is easy understandable
by others. - Just to be clear; I don't know that "my scheme" you're
talking about is because I'm not interested in your posts about your
personal tools.
(I also suggest to become a bit more honest about your "achievement"
with creating your tool unless it gets some minimum general relevance
beyond your micro-ecosystem. - Why don't you advertise and offer your
tools at any more appropriate place if you think they're so important, >>>> innovative, or generally useful?!)
Janis
you say 'usefull', i tell "your mum is doin new school"
https://www.youtube.com/watch?v=cumbkA5dGDI
subtle things in this anglish so maybe it should be
you say 'usefull', i tell your mama is doin new school
maybe this would be more appropriate
(by crom.. i feel body pain again)
(fir)
this ilustrates this common topic:
if youre not holding any rules of behaviour you may and in a crowd of annoying spammers like quite popular here..bot on-a oposite side
you got a society of fellows who have so called sticks up their asses
yet worse they oftan talk bulshit as stck up their as not guarantees
talkin sense
but those spamers also seem to have brain small as some seed
so the normality lies somewehere in between imo
(coz really this stick up the ass crowd is imo nonstandable spamers are
also nonstandable)
sadly usenet is not much large today it seems (which is very bad ofc)
bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
You demonstrated you can be extremely sloppy in your thinking and
in your argumentation! That doesn't mean that you wouldn't be able
to "write programs" ("this stuff"), for sure. - Another example of
sloppy thinking and argumentation.
Perhaps you're just jealous
Your mindset is so primitive, naive, and erroneous; unprecedentedly
given your stubbornness. Your persistent habit of making guesses,
completely missing the point, topics, and characters, had regularly
been shown to be widely erroneous. - I see you can't just stop your ineffective tries. It won't lead you anywhere.
that my scheme isn't available in your favourite language.
I have no "favourite language". (In a couple languages there's some
concepts that I'd like to be more widely spread. - Not sure you're
capable of understanding that and notice the blatant difference!)
And you should meanwhile know that meaningless home-brewed languages
are neither of general interest nor of mine; but you seem to have a persisting mental hindrance to understand what is easy understandable
by others. - Just to be clear; I don't know that "my scheme" you're
talking about is because I'm not interested in your posts about your
personal tools.
(I also suggest to become a bit more honest about your "achievement"I might have done that 35 years ago or more.
with creating your tool unless it gets some minimum general relevance
beyond your micro-ecosystem. - Why don't you advertise and offer your
tools at any more appropriate place if you think they're so important, innovative, or generally useful?!)
* Mostly semicolon-free syntax (newline terminates statements
-a unless they clearly continue onto the next line)
bart pisze:
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ... i just like removed , and
turned :: into , (as it was fee and better lookin)
-a";" advanced to be a paragraph(block) end sign
also many () in function calls also not needed as i showed in previous examples
as for this " " "," ";" syntax i just described it is probably and of
the road here, cant do better/much beter robably (except maybe ; is not
best looking so this sign eventually can change but the schem is like cleanest possible imo
fir pisze:
bart pisze:there is also an option of making blocks of blocks that would need
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ... i just like removed , and
turned :: into , (as it was fee and better lookin)
-a-a";" advanced to be a paragraph(block) end sign
also many () in function calls also not needed as i showed in previous
examples
as for this " " "," ";" syntax i just described it is probably and of
the road here, cant do better/much beter robably (except maybe ; is
not best looking so this sign eventually can change but the schem is
like cleanest possible imo
more signs - or repeating one etc
foo()
-a a b c, d e f, g h;
-a i j, k, l m n, o, p; ;
-a v w, x;
-a q, r s, t u;-a ;
;
of course ;; not lokin good but something better here
so this is the same as
foo()
{
-a{{ {a b c, d e f, g h}
-a {i j, k, l m n, o, p}}
-a {{v w, x}
-a {q, r s, t u} }
}
thus the logial lines in functions can be indexed foo[1][0][0] would be
v x (v(x) call)
* Multiple function return values: (a, b) := f(x)
bart pisze:
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ...
i just like removed , and
turned :: into , (as it was fee and better lookin)
also many () in function calls also not needed as i showed in previous examples
On 12/09/2026 13:37, fir wrote:
bart pisze:
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ...
Removing intra-line commas is not really practical. Even if technically
some code can be parsed without it, humans have difficulty.
Some structure is needed. Take this parameter list with commas:
-a-a (a b c, d e)
'a' and 'd' are types; b, c, e are parameter names. Without the commas
it would just be:
-a-a (a b c d e)
(In my language, user-defined types are not resolved into types until
after parsing. The parser relies on structure to determine which names
are types.)
While a function call like F(a + b, -1, sin c) ('sin' is an operator),
would become:
-a-a F(a + b -1 sin c)
It all runs together, and here there is also an ambiguity between "b,
-1" and "b - 1".
However, I /have/ looked at interline commas: this is where you have a
long list of data initialisers, one per line. There it would be less of
a problem as newline acts as separator.
But I still found it troublesome as the parser needs to keep track of whether it's a semicolon- or comma-separated context.
(This is partly implemented, but as I can't remember in which language
or context, I find it easier to just write the commas.)
i just like removed , and
turned :: into , (as it was fee and better lookin)
Really? So C's 'std::cout' becomes 'std,cout'? That looks totally wrong.
also many () in function calls also not needed as i showed in previous
examples
Minimalist just doesn't work, sorry. It might in a language like Haskell which has special rules (and features like currying), but that is not
the kind of language I want to write.
On 12/09/2026 07:01, Janis Papanagnou wrote:
bart <bc@freeuk.com> writes:
When you have to implement this stuff then you can't be sloppy.
You demonstrated you can be extremely sloppy in your thinking and
in your argumentation! That doesn't mean that you wouldn't be able
to "write programs" ("this stuff"), for sure. - Another example of
sloppy thinking and argumentation.
Perhaps you're just jealous
Your mindset is so primitive, naive, and erroneous; unprecedentedly
given your stubbornness. Your persistent habit of making guesses,
completely missing the point, topics, and characters, had regularly
been shown to be widely erroneous. - I see you can't just stop your
ineffective tries. It won't lead you anywhere.
that my scheme isn't available in your favourite language.
I have no "favourite language". (In a couple languages there's some
concepts that I'd like to be more widely spread. - Not sure you're
capable of understanding that and notice the blatant difference!)
And you should meanwhile know that meaningless home-brewed languages
are neither of general interest nor of mine; but you seem to have a
persisting mental hindrance to understand what is easy understandable
by others. - Just to be clear; I don't know that "my scheme" you're
talking about is because I'm not interested in your posts about your
personal tools.
Then you are blinkered. You should be able to evaluate and appreciate
useful and innovate ideas by yourself, without relying on widespread adoption to tell you if they are good or bad.
If, tomorrow, a major mainstream language introduced a module scheme
just like mine, would you still hate it and think it useless, or would
you suddenly change your mind?!
Obviously not, because you are bigoted.
(I also suggest to become a bit more honest about your "achievement"I might have done that 35 years ago or more.
with creating your tool unless it gets some minimum general relevance
beyond your micro-ecosystem. - Why don't you advertise and offer your
tools at any more appropriate place if you think they're so important,
innovative, or generally useful?!)
For example, at one time my small company produced business computers.
We designed everything about them (my job was taking care of the motherboard). We did the PCB layout, manufactured the actual PCBs, and populated the PCBS by hand, all in the UK (my boss owned two other small companies that took care of that).
We even produced our own OS for it (via a 3rd associated company)!.
Today's landscape is utterly different. Can you imagine one company in
the UK producing dozens of computers per week compared with current mass-production in the far east that produces millions?
bart pisze:
On 12/09/2026 13:37, fir wrote:
bart pisze:
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ...
Removing intra-line commas is not really practical. Even if
technically some code can be parsed without it, humans have difficulty.
Some structure is needed. Take this parameter list with commas:
-a-a-a (a b c, d e)
'a' and 'd' are types; b, c, e are parameter names. Without the commas
it would just be:
-a-a-a (a b c d e)
its becouse you give examples with not know what it mean if it would be
int b c float e its more clear (fully clear imo
though im was not saying-a on this case - as i said , works in a place of
; (its a "logical line" seperator so it work like ";" in c where the c usages of "," are ust removed
i mean , removed
; replaced by ,
(In my language, user-defined types are not resolved into types until
after parsing. The parser relies on structure to determine which names
are types.)
While a function call like F(a + b, -1, sin c) ('sin' is an operator),
would become:
-a-a-a F(a + b -1 sin c)
F a+b -1 sin c
is clear imo-a 9though better is to use separate - sign for neg values
not subtraction)
in above i mean probably its good to take you baf write
foo arg arg arg foo arg arg
i mean "only one function acll in logical line so you would need
foo arg arg arg, foo arg arg
to satisfy this rule so if
you see this
F a+b -1 sin c
you know its one function call thus sin c is argument
It all runs together, and here there is also an ambiguity between "b,
-1" and "b - 1".
However, I /have/ looked at interline commas: this is where you have a
long list of data initialisers, one per line. There it would be less
of a problem as newline acts as separator.
But I still found it troublesome as the parser needs to keep track of
whether it's a semicolon- or comma-separated context.
(This is partly implemented, but as I can't remember in which language
or context, I find it easier to just write the commas.)
i just like removed , and
turned :: into , (as it was fee and better lookin)
sorry i meant ; not :: (shift didnt worked )
Really? So C's 'std::cout' becomes 'std,cout'? That looks totally wrong.
also many () in function calls also not needed as i showed in
previous examples
Minimalist just doesn't work, sorry. It might in a language like
Haskell which has special rules (and features like currying), but that
is not the kind of language I want to write.
there is alos to use ' optionally i mean some may use them in ()
like
print a b c
may use
(print a b c) //optionally
or
print (a b c)-a //optionally
or
print (a,b,c) //optionally
aventually
thet would probbaly not collide with general "bare naked" {s n j, s d f,
s d}
syntax
im not sure if allowing print(a b c) could not cause slight collisions
if so some slight changes there would need be here but in worst case
it would be disalowed but probably i would prefer in worst case
doing meaningful space it is not eventually allowing
print (a b c)
in that case (at worst ) but maybe its not needed, i would need to
check it
F a+b -1 sin c
fir pisze:
F a+b -1 sin c
this second minus is in fact needed so normally
this above is f a+b-2 sin(c)
unicode as usually instead of having something cruciallu usful provides
soem weirdos here
this above with -2 not subtraction would be-a f a+b -u2 sin(c)
but meybe somethin could be find
fir pisze:
F a+b -1 sin c
this second minus is in fact needed so normally
this above is f a+b-2 sin(c)
unicode as usually instead of having something cruciallu usful provides
soem weirdos here
this above with -2 not subtraction would be-a f a+b -u2 sin(c)
but meybe somethin could be find
bart pisze:
On 12/09/2026 13:37, fir wrote:
bart pisze:
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ...
Removing intra-line commas is not really practical. Even if
technically some code can be parsed without it, humans have difficulty.
Some structure is needed. Take this parameter list with commas:
-a-a-a (a b c, d e)
'a' and 'd' are types; b, c, e are parameter names. Without the commas
it would just be:
-a-a-a (a b c d e)
its becouse you give examples with not know what it mean if it would be
int b c float e its more clear (fully clear imo
though im was not saying-a on this case - as i said , works in a place
of ; (its a "logical line" seperator so it work like ";" in c where the
c usages of "," are ust removed
i mean , removed
; replaced by ,
(In my language, user-defined types are not resolved into types until
after parsing. The parser relies on structure to determine which names
are types.)
While a function call like F(a + b, -1, sin c) ('sin' is an operator),
would become:
-a-a-a F(a + b -1 sin c)
F a+b -1 sin c
is clear imo-a 9though better is to use separate - sign for neg values
not subtraction)
in above i mean probably its good to take you baf write
foo arg arg arg foo arg arg
i mean "only one function acll in logical line so you would need
foo arg arg arg, foo arg arg
to satisfy this rule so if
you see this
F a+b -1 sin c
you know its one function call thus sin c is argument
i just like removed , and
turned :: into , (as it was fee and better lookin)
sorry i meant ; not :: (shift didnt worked )
im not sure if allowing print(a b c) could not cause slight collisionsHow sure are you that two user identifiers can never be adjacent?
if so some slight changes there would need be here but in worst case
it would be disalowed but probably i would prefer in worst case
doing meaningful space it is not eventually allowing
print (a b c)
What exactly are trying to achieve here: saving a few seconds of typing
but then spending ten times as long trying to understand the code, or
1000 times as long trying to debug all the subtle bugs that have crept in?
On 12/09/2026 14:44, fir wrote:
bart pisze:
On 12/09/2026 13:37, fir wrote:
bart pisze:
* Mostly semicolon-free syntax (newline terminates statements
-a-a unless they clearly continue onto the next line)
make it also ,-free becouse most (if not strictly any) , is not
needed as space is a separtor ...
Removing intra-line commas is not really practical. Even if
technically some code can be parsed without it, humans have difficulty.
Some structure is needed. Take this parameter list with commas:
-a-a-a (a b c, d e)
'a' and 'd' are types; b, c, e are parameter names. Without the
commas it would just be:
-a-a-a (a b c d e)
its becouse you give examples with not know what it mean if it would be
int b c float e its more clear (fully clear imo
Sure, but what happens when someone /wants/ to have user-define types?
So in general it is ambiguous.
In C you can also have a parameter list which has only types, no
parameter names. If that is still a feature, then:
-a (a, b, c, d);
can be assumed (by the reader) to be all types. But this:
-a (a b c d)
is more ambiguous; how many parameters are there: is it 4 (abcd are all types); 3 (a is a type, bcd are names), or 2 (ac are types, bd are
names)? Other combinations may be possible.
though im was not saying-a on this case - as i said , works in a place
of ; (its a "logical line" seperator so it work like ";" in c where
the c usages of "," are ust removed
i mean , removed
; replaced by ,
(In my language, user-defined types are not resolved into types until
after parsing. The parser relies on structure to determine which
names are types.)
While a function call like F(a + b, -1, sin c) ('sin' is an
operator), would become:
-a-a-a F(a + b -1 sin c)
F a+b -1 sin c
Significant white space now? Come pm, what sort of crazy language is
this going to be?!
But since this is a fantasy language anyway that is never going to be implemented, then sure, leave out whatever you want. But it will be a terrible language to work with.
is clear imo-a 9though better is to use separate - sign for neg values
not subtraction)
in above i mean probably its good to take you baf write
foo arg arg arg foo arg arg
Users can make their own identifiers so it could be this:
-a arg foo foo foo arg foo foo
In general a compiler will see:
-a a b c d e f g
Seven consecutive identifiers.
i mean "only one function acll in logical line so you would need
foo arg arg arg, foo arg arg
to satisfy this rule so if
you see this
F a+b -1 sin c
you know its one function call thus sin c is argument
I'm sorry, but this stuff needs to be COMPLETELY AMBIGUOUS. Someone
should INSTANTLY be able to know what is intended, rather than waste
time trying to infer it. This is supposed to be the source code of some program, not a puzzle!
You can make it unambiguous by using commas and parentheses, and
EVERYONE will understand what is being expressed.
What exactly are trying to achieve here: saving a few seconds of typing
but then spending ten times as long trying to understand the code, or
1000 times as long trying to debug all the subtle bugs that have crept in?
I know this is a fantasy, but aren't you interested in practicalities at all?
i just like removed , and
turned :: into , (as it was fee and better lookin)
sorry i meant ; not :: (shift didnt worked )
std;cout isn't much better! Both "::" and "." are commonly used for this purpose.
im not sure if allowing print(a b c) could not cause slight collisionsHow sure are you that two user identifiers can never be adjacent?
if so some slight changes there would need be here but in worst case
it would be disalowed but probably i would prefer in worst case
doing meaningful space it is not eventually allowing
print (a b c)
What about operators that can be both unary and binary? A further example:
-a a b * c * d
Is this a(b * c * d), or a(b, *c * d), or (b, *c, *d) etc?
Please don't say that you have to work it out by hunting for the definitions; as I said this should not be a puzzle.
Sure, but what happens when someone /wants/ to have user-define types?
So in general it is ambiguous.
In C you can also have a parameter list which has only types, no
parameter names. If that is still a feature, then:
-a (a, b, c, d);
can be assumed (by the reader) to be all types. But this:
-a (a b c d)
is more ambiguous; how many parameters are there: is it 4 (abcd are all types); 3 (a is a type, bcd are names), or 2 (ac are types, bd are
names)? Other combinations may be possible.
bart pisze:
Sure, but what happens when someone /wants/ to have user-define types?
So in general it is ambiguous.
In C you can also have a parameter list which has only types, no
parameter names. If that is still a feature, then:
-a-a (a, b, c, d);
can be assumed (by the reader) to be all types. But this:
-a-a (a b c d)
is more ambiguous; how many parameters are there: is it 4 (abcd are
all types); 3 (a is a type, bcd are names), or 2 (ac are types, bd are
names)? Other combinations may be possible.
this one i dont understand whats difference id someone uses like
structure nameinstead of int?
no difference
and if ou see such thing as int int a b foo float
do i ask you how many type names are there? how many wariables and how
many function names?
note in code if it is not obfuscated names are meaningfull, type names
are not popular ther repeat and you know them generally function names
are usualy verbs (i write is mostly in big letter, variables i
personally always write low leter)
some functions i write low letter but those very qshort very quick usage
one like sin strcmp print - only few things like that
bart pisze:
In general a compiler will see:this is your very serious problem here that you assume 'unlearned' human should understand it, compiler must understand it...
-a-a a b c d e f g
you know what you talk also fits to c you also neeeded to learn what
given construction mean here its just the same jus construction have
less ,,, () stuf
kompiler knows what given symbols are..if it make sense it will compile
it if not he will not if you make some complex stuff with a net of
functions like
f1 a f2 f3 f4 a a f5 f6
compiler know which function takes how many arguments
and will resolve it to fit
im not sure if there is any disimbiguity here or none
if you know one tell me and i will tell a rule to resolve it
(as it may be resolved by some rule
if yu worry on humen radibilit y you just add parentheses and you
end up at worst in your initial form
do it much cleaner and many use will use the clean lightweight 'naked'
form (no gothic clothes)
when i see this its totally clear to me
no worry , definitions wouldnt help here
this above is obviously non possible-a you cant have unary and binary
here (as far as it seems, i may be maybe wrong)
a*b must be binary if *b would be unary then it mean you have
a *b so its ambiguity , so there some additional rule would need to be
used at least
rule can be
a*b-a // is binary
a(*b) //is unary
(a*)b //is unary
this touches some problem becouse it blocks a(b) syntax which eventually could be usefull, but it eventually may be seen not much usefull
as i see () more like separators not-a 'calling' operator
(it only be blocked for those types of ab though not necessary for
fiunction calls
there is also option to use this space as a seperator ..this kind of mmeaningfull spaces i use here all time for example in a b c d
apaces are meaningfull coz its not ab c d
so a *b wouldnt be considered good idea but a (*b) being different than a(*b) may be (but VERY eventually)
a(b(c, d))
Does that help?
a (b c d)
combination of 4 not meaningful names in programing is not usual i would
say
bart pisze:>
-a-a-a a(b(c, d))
Does that help?
not much honestly - if youre so much in hole you can find
definitions..as you say you are
two terrible mistakes you do
1) you somewhat assume that definitions are not pesent - all definitions
are present - if definitions are not present it would not compile
2) you talk about this human reader its not a problem
you may add those parenthesis optionally... and if someone not added it blame him
though as i said i would add the () different way
not-a-a a(b(c, d))
but
-a a (b c d)
you anyway should use meaningdull names in this examples becouse names
carry an information
DrawLine x y p q color
for basic function call IS TOO GOD TO NOT TAKE IT -
BTW here is a draw-line routine in my scripting language:
-a proc gxline(w, x, y, ?x2, ?y2) ...
It takes either one point or two. It is these optional args that would
make it hard to figure out a call like this:
-a-a gxline w a b c d
Is this gxline(w, a, b, c, d), or is it gxline(w, a, b(c, d))? In this dynamic language, b might be a variable containing a function reference.
A little contrived, but no matter because the same contrivance is here
in my systems language:
-a-a proc main =
-a-a-a-a-a-a for i to 10 do
-a-a-a-a-a-a-a-a-a-a println i, sqrt i
-a-a-a-a-a-a-a-a-a-a println "----------"
-a-a-a-a-a-a end
-a-a end
bart pisze:
A little contrived, but no matter because the same contrivance is here
in my systems language:
-a-a-a proc main =
-a-a-a-a-a-a-a for i to 10 do
-a-a-a-a-a-a-a-a-a-a-a println i, sqrt i
-a-a-a-a-a-a-a-a-a-a-a println "----------"
-a-a-a-a-a-a-a end
-a-a-a end
() and ; removed which is good but you alsoe need-a to remove keywords
and this one ' and it will be ok
fir pisze:
bart pisze:
A little contrived, but no matter because the same contrivance is
here in my systems language:
-a-a-a proc main =
-a-a-a-a-a-a-a for i to 10 do
-a-a-a-a-a-a-a-a-a-a-a println i, sqrt i
-a-a-a-a-a-a-a-a-a-a-a println "----------"
-a-a-a-a-a-a-a end
-a-a-a end
() and ; removed which is good but you alsoe need-a to remove keywords
and this one ' and it will be ok
something like - you need a billet to mark definitions ..next one may be used by another definition but may also put empty one
-arui main
-a-a-a EYAO10
-a-a-a-a-a-a println EYAO sqrt EYAO
-a-a-a-a-a-a println "----------"
-arui
* The function doesn't use an unspecified parameter list (this was a
feature of C but C23 may have deprecated that)
bart pisze:The same code runs as-is in my scripting language, but that also allows
A little contrived, but no matter because the same contrivance is here
in my systems language:
-a-a-a proc main =
-a-a-a-a-a-a-a for i to 10 do
-a-a-a-a-a-a-a-a-a-a-a println i, sqrt i
-a-a-a-a-a-a-a-a-a-a-a println "----------"
-a-a-a-a-a-a-a end
-a-a-a end
() and ; removed which is good but you alsoe need-a to remove keywords
and this one ' and it will be ok
On 13/09/2026 09:15, fir wrote:
bart pisze:The same code runs as-is in my scripting language, but that also allows
A little contrived, but no matter because the same contrivance is
here in my systems language:
-a-a-a proc main =
-a-a-a-a-a-a-a for i to 10 do
-a-a-a-a-a-a-a-a-a-a-a println i, sqrt i
-a-a-a-a-a-a-a-a-a-a-a println "----------"
-a-a-a-a-a-a-a end
-a-a-a end
() and ; removed which is good but you alsoe need-a to remove keywords
and this one ' and it will be ok
this version:
-a for i to 10 do
-a-a-a-a-a ? i, reUi
-a-a-a-a-a ? "-"*10
-a od
Any better? (The "-"*10 works above too but it was two extra tokens! The 'reU' is an alias for 'sqrt' and was added for fun.)
There used to be a compact form of loop too which may have looked like
this:
-a(i:10 || ?i, reUi; "-"*10)
That's great. But now imagine 1000 lines full of such gobbledygook.
It sounds like your ideal language would be APL, if is not 'clean' and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/ some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
bart pisze:
On 13/09/2026 09:15, fir wrote:
bart pisze:The same code runs as-is in my scripting language, but that also
A little contrived, but no matter because the same contrivance is
here in my systems language:
-a-a-a proc main =
-a-a-a-a-a-a-a for i to 10 do
-a-a-a-a-a-a-a-a-a-a-a println i, sqrt i
-a-a-a-a-a-a-a-a-a-a-a println "----------"
-a-a-a-a-a-a-a end
-a-a-a end
() and ; removed which is good but you alsoe need-a to remove keywords
and this one ' and it will be ok
allows this version:
-a-a for i to 10 do
-a-a-a-a-a-a ? i, reUi
-a-a-a-a-a-a ? "-"*10
-a-a od
Any better? (The "-"*10 works above too but it was two extra tokens!
The 'reU' is an alias for 'sqrt' and was added for fun.)
There used to be a compact form of loop too which may have looked like
this:
-a-a(i:10 || ?i, reUi; "-"*10)
That's great. But now imagine 1000 lines full of such gobbledygook.
It sounds like your ideal language would be APL, if is not 'clean' and
'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
fir pisze:
bart pisze:
consider for example french or polish language its totally cryptic untilIt sounds like your ideal language would be APL, if is not 'clean'
and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
you will learn it...
definitions
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
On 12/09/2026 19:58, bart wrote:
(Snipping lots of good points about language design - I don't want to discuss fir's hypothetical language, but I can still give you a little
more information on a C point.)
* The function doesn't use an unspecified parameter list (this was a
feature of C but C23 may have deprecated that)
The use of non-prototype function declarations (including implicit ones)
was marked as an "obsolescent" feature in C90.-a (That is, if I
understand correctly, it was not actually deprecated but was planned to
be deprecated in the near future).-a C23 skipped deprecation entirely and removed it from the language.-a (I think most C programmers see that as absurdly slow timing from the C standards committee and C compiler implementers.-a I only know of one C expert who thought non-prototype function declarations were useful to keep around, and I don't think he
ever gave a good reason for that.)
On 13/09/2026 10:53, fir wrote:
fir pisze:
bart pisze:
consider for example french or polish language its totally crypticIt sounds like your ideal language would be APL, if is not 'clean'
and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
until you will learn it...
That is not your aim. That appears to be to start with a language that
you know perfectly well, but remove all punctuation, capitalisation and structure, and half the words. But to what purpose; because you're too
lazy to type?
-anot to say you want to understand it without
definitions
So an APL (or J or K) program is never cryptic because all you have to
do is learn it? If only I'd thought of that!
The same applies to Assembly I guess. And machine code?
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
And you keep repeating the same nonsense. What is your endpoint: a
program that can be expressed in one byte?
bart pisze:
On 13/09/2026 10:53, fir wrote:
fir pisze:
bart pisze:
consider for example french or polish language its totally crypticIt sounds like your ideal language would be APL, if is not 'clean'
and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
until you will learn it...
That is not your aim. That appears to be to start with a language that
you know perfectly well, but remove all punctuation, capitalisation
and structure, and half the words. But to what purpose; because you're
too lazy to type?
-a-anot to say you want to understand it without
definitions
So an APL (or J or K) program is never cryptic because all you have to
do is learn it? If only I'd thought of that!
The same applies to Assembly I guess. And machine code?
apl i dont know but ofc it applies to assembly but x86 assembly is
terribly flawed
x86 assembly is like c++
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
And you keep repeating the same nonsense. What is your endpoint: a
program that can be expressed in one byte?
my goal is to make it cleanest possible
and also make thsi sintax more powerfull - it is "carrying" a lot more "weight" (semantic weight).. i men where short sentences may expres much meaning
Note that the code will still have braces. I suggest a better aim is to eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
fir pisze:
bart pisze:
On 13/09/2026 10:53, fir wrote:
fir pisze:
bart pisze:
consider for example french or polish language its totally crypticIt sounds like your ideal language would be APL, if is not 'clean' >>>>>> and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/ >>>>>> some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means >>>>>
until you will learn it...
That is not your aim. That appears to be to start with a language
that you know perfectly well, but remove all punctuation,
capitalisation and structure, and half the words. But to what
purpose; because you're too lazy to type?
-a-anot to say you want to understand it without
definitions
So an APL (or J or K) program is never cryptic because all you have
to do is learn it? If only I'd thought of that!
The same applies to Assembly I guess. And machine code?
apl i dont know but ofc it applies to assembly but x86 assembly is
terribly flawed
x86 assembly is like c++
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
And you keep repeating the same nonsense. What is your endpoint: a
program that can be expressed in one byte?
my goal is to make it cleanest possible
and also make thsi sintax more powerfull - it is "carrying" a lot more
"weight" (semantic weight).. i men where short sentences may expres
much meaning
this example is quite clean and weighty
-a rui main
-a-a-a-a EYAO10
-a-a-a-a-a-a-a println EYAO sqrt EYAO
-a-a-a-a-a-a-a println "----------"
-a rui
esp this EYAO10 is clean and weighty i got a lot of problems with this becouse x10 eventually worked but has terrible disadwantage xa is not standable (a is variable value say 100) but unicode resolves a lot of problems coz EYAOa work
NOTE this all now seem obvious but before discovering this what seems obvious LATER BEFORE this all conclusions was VERY FAR form obvious
im saying this becouse i thing that people will take some outcome and
not adress its orygination..all this conclusion i take are oryginal at
least in a sense it is not copied from someo other source (except the
most common typical knowledge base)
(not saying that some solutions i use by chance were already invented
but often in some different contextes and not fully)
even seint the fact some just should take unicode was not obvious not to mention many other things
esp this EYAO10 is clean and weighty i got a lot of problems with this becouse x10 eventually worked but has terrible disadwantage xa is not standable (a is variable value say 100) but unicode resolves a lot of problems coz EYAOa work
NOTE this all now seem obvious but before discovering this what seems obvious LATER BEFORE this all conclusions was VERY FAR form obvious
On 13/09/2026 10:53, fir wrote:
fir pisze:
bart pisze:
consider for example french or polish language its totally crypticIt sounds like your ideal language would be APL, if is not 'clean'
and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
until you will learn it...
That is not your aim. That appears to be to start with a language that
you know perfectly well, but remove all punctuation, capitalisation and structure, and half the words. But to what purpose; because you're too
lazy to type?
-anot to say you want to understand it without
definitions
So an APL (or J or K) program is never cryptic because all you have to
do is learn it? If only I'd thought of that!
The same applies to Assembly I guess. And machine code?
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
And you keep repeating the same nonsense. What is your endpoint: a
program that can be expressed in one byte?
bart wrote:
On 13/09/2026 10:53, fir wrote:He wants to compress the language, metaphor a plum, into a prune that
fir pisze:
bart pisze:
consider for example french or polish language its totally crypticIt sounds like your ideal language would be APL, if is not 'clean'
and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
until you will learn it...
That is not your aim. That appears to be to start with a language that
you know perfectly well, but remove all punctuation, capitalisation
and structure, and half the words. But to what purpose; because you're
too lazy to type?
-a-anot to say you want to understand it without
definitions
So an APL (or J or K) program is never cryptic because all you have to
do is learn it? If only I'd thought of that!
The same applies to Assembly I guess. And machine code?
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
And you keep repeating the same nonsense. What is your endpoint: a
program that can be expressed in one byte?
has much reduced.
It is the same way with a newsgroup when the warlord Lane W has
compressed all the shitheads, David Brown, Keith, bart, and the rest
except I guess the fellows who are in the mood, when they all conspire
by email to not respond to anything he writes. It is at such a time that
he declares victory. As I roll over yet another group in the 97 I have subjugated to my rule and made complacent, a tear drips from my eye. C,
such a beautiful language, yet what hypocrites such as David Brown
defending it. Really, nothing personal? I beg to differ. Under my boot,
a serpent crawls out of the skull of another victim.
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim is to
eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
if (0) { if (1) puts("foo"); else puts("bar"); }
if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim is to
eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else' can
act as block delimiters:
-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1 (fir doesn't not appreciate this point; he thinks it is fine for statements
and expressions to run together provided that there is a way to infer
where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim is to >>>> eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else'
can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1 (fir
doesn't not appreciate this point; he thinks it is fine for statements
and expressions to run together provided that there is a way to infer
where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a ray less_than_six
-a-a-a ray do_nothing
On 13/09/2026 14:21, fir wrote:
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim
is to
eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else'
can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1 (fir
doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a
way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
bart pisze:
On 13/09/2026 14:21, fir wrote:
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim >>>>>> is to
eliminate most braces. The should be no need to ever see '} else {' >>>>>> instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else'
can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1
(fir doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a
way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
why? its the same
5<x<10 raA
On 13/09/2026 14:21, fir wrote:
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim
is to
eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else'
can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1 (fir
doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a
way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
bart pisze:
On 13/09/2026 14:21, fir wrote:not btw that if you want make much more rigid and more descriptive
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim >>>>>> is to
eliminate most braces. The should be no need to ever see '} else {' >>>>>> instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else'
can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1
(fir doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a
way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
language youre obviously fukll right to implement this philosophy im not denying this
i waguely remember i sad to you something like "try" or "you my try"
giving some of my outcomes as to my philosophy as i assumed you
want to use something good ;c
im joking (imo ofc my philosophy here is better but you may use your own ofc)
for me your conventions are suboptimal (all those ones who not by chance
are mine own ;c )
fir pisze:
bart pisze:for me the ones im searching are optimal at least ofr last 'research
On 13/09/2026 14:21, fir wrote:not btw that if you want make much more rigid and more descriptive
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim >>>>>>> is to
eliminate most braces. The should be no need to ever see '} else {' >>>>>>> instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included): >>>>>>
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar". >>>>>
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else' >>>>> can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1
(fir doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a >>>>> way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is
doing. (He's never going to get there, but there's no harm in
humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
language youre obviously fukll right to implement this philosophy im
not denying this
i waguely remember i sad to you something like "try" or "you my try"
giving some of my outcomes as to my philosophy as i assumed you
want to use something good ;c
im joking (imo ofc my philosophy here is better but you may use your
own ofc)
for me your conventions are suboptimal (all those ones who not by
chance are mine own ;c )
state' though i got different worry (on whch i was saint more than one)
c indeed is on some very impressive track to me and im not quite sure
using my filosophy (which is at seen very fractal and syntax
minimalising) is in fact worse than this oryginal "railroad" track
in old c i by chance see something like 'coal' and 'rails'/railroad
feeling and in this mine i see its more like light and plastic 'style'
not so much nice eventually - it worries my but dont know what to do
with that..maybe its too much far form assembly/machine language but
today hard to work in machne language on raw steel and oil machines..
bart pisze:
On 13/09/2026 14:21, fir wrote:
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim >>>>>> is to
eliminate most braces. The should be no need to ever see '} else {' >>>>>> instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else'
can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1
(fir doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a
way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is doing.
(He's never going to get there, but there's no harm in humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
why? its the same
5<x<10 raA
On 09/09/2026 02:59, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
On 08/09/2026 01:02, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
On 07/09/2026 14:33, David Brown wrote:
On 07/09/2026 14:55, bart wrote:
A typical module scheme works like this:
* You have, say, a project of 100 modules
* Each module selectively exports some entities
* Each module selectively imports some subset of the other 99 modules >>>>>>>
OK so far.
The result is that each module starts with some rag-tag collection of >>>>>>> 'import' statements, each different from any other module, and needing >>>>>>> a lot of maintenance.
No.-a People who write /structured/ code do not do "rag-tag".
When a project is of a size where it is inconvenient to keep track of >>>>>> all the separate "import" (or "#include", or whatever) statements, you >>>>>> use a hierarchy.-a Instead of importing "dns", "udp", "http", etc., >>>>>> modules, you import "network".-a The common "network" module pulls in the
sub-modules.-a You probably also organise things in directories and sub- >>>>>> directories, matching the module layout.-a It is /structured/.
But it's a pattern I've seen a lot. In C also, as collections of
#includes; this example is from Lua, a project of only 35 modules, and >>>>> from one of its .c files:
#include "lprefix.h"
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include "lua.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lgc.h"
#include "llex.h"
#include "lmem.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lparser.h"
#include "lstring.h"
#include "ltable.h"
#include "lvm.h"
Every file has a different set. In all, there are 28K lines of C code >>>>> among the .c files, and there are 466 #include lines. That is similar to >>>>> the maintenance nightmare where each file imports a particular set of >>>>> modules.
The organization looks sensible to me.
Not to me. This project uses these 35 files:
lapi.c lauxlib.c lbaselib.c lcode.c lcorolib.c lctype.c ldblib.c
ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c
lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c loslib.c lparser.c
lstate.c lstring.c lstrlib.c ltable.c ltablib.c ltests.c ltm.c lua.c
lundump.c lutf8lib.c lvm.c lzio.c onelua.c
(A build will use 34 of them, depending whether it is EXE or DLL.)
With a module scheme, there should be no need for any additional info at >>> all. But my point was, with how such schemes typically work, you still
have lots of mixed sets of 'import' statements at the start of each file. >>>
Given that #include lines
are less than 2% of total and are likely to change very infrequently
I see no maintennce problem.
You can't quantify it like that. In any case, they will only change
infrequently once you've finished development!
If a program is "finished" it will not change at all. During
normal developement I need to add #include lines, but once
added they tend to stay. Sometimes I realize that given
include is not needed or I decide to rename a file. Normal
code is different, first version may have bugs which need
fixing, I may realize that different structure is better, so
there is lot of changes. Relatively to that I perceive changes
to #include lines to be very infrequent.
I found it annoying enough, and taking up enough time to devise a new
way of doing modules. And it is utter bliss.
I agree that maintaing info that you do not value may be annoying.
But if you are used to maintaing C code bases, than maintaining
#include lines does not take much time.
People around here always seems to be making excuses for C!
I find that adding include files, creating headers, maintaining forward declarations etc to be a complete PITA.
Still, modern languages tend to have a module scheme, suggesting theI used or at least looked at several languages with module systems
'flexible' C approach (I'd use the term 'prehistoric') wasn't quite enough. >>
or things intended to perform similar duty. You approach seem to
be unique, all other require explicit import or equivalent at least
in some (rather frequent) cases. Some languages do not support
re-export, in such case you can rightfully complain. The ones with
re-export allow forming common interface module do that number
of import statements is minimised. But this is developers choice
and apparently most prefer to import only needed things, even
though it requires more import statements.
Some even specify individual names to be imported from a module. What a complete waste of time!
It's bad enough listing the modules themselves, of which there may a
dozen or two, but there could be hundreds of imported functions.
A module scheme should mean less work not more.
Module system has other advantages over C. First, in C sane
developers use headers in consistent way, but language
does not enforce it. Typical module system enforces
consistency. Second, module interfaces can be parsed once,
avoiding problem of repeated re-parsing of C headers.
According to David Brown and Scott Lurndal, that is a non-problem!
And according to DB, reducing a large, complex mass of header files (of external library) into one compact file 95% smaller, would be a waste of time.
Third, modules resolve name clashes: the "same" name in
two different modules is disambiguated by its source module.
Fourth, given a main module compiler can track its imports
and build the program without need for separate Makefile.
I tried a scheme in C once. That is, a scheme where you submitted only
the main.c file to the compiler, then it discovered the rest.
It worked well, but required programs to be written in a certain way.
For example, each module file.c required a matching file.h header.
In the main module, you only included the .h files needed by this
module. It would then add those .c files, and applied the process recursively.
However all the projects I wanted to build weren't structured like this.
There are different styles. Ada, Modula 2 and Extended Pascal
use separate interface modules. In typical practice they are
stored in separate files so this looks similar to C practice
of having .c and .h files. Other languages like UCSD/Turbo
Pascal have modules with separate iterface and implementation
parts, but both parts are considered a single module. In
practice with such languages whole module is kept in a single
file, so number of separate files is smaller. But you still
have separate declarations in interface part and definitions
in implementation part. Wirth Oberon (or at least some variant
of it) uses different apprach, IIRC exported functions are
marked putting asterisk before function name. That means less
code to write, but to see what is exported you need a separate
tool.
With separate interface files, who writes the interface: is it the programmer who has to duplicate what is in the implementation? (In which case, what checks are made that it matches?)
Or is it automatic?
My first attempts at (modern) modules tried to do the latter, but it was hard. For example, compile module A.m and it generates A.exp which is
the interface that can be used elsewhere via 'import A'.
But suppose A and B import each other; which is compiled first?
This is an advantage of a manually written interface, in that cyclic
imports become easier, and you don't need a heirarchical structure.
IIUC modules with separate iterface and implementation were
advocated together with database-like storage of source code.
I now work with whole program compilers. There, a discrete interface
file doesn't make sense and is not needed between the modules of the
same program.
But they still exist at the boundaries of the program: when the program imports an external library, or my program is a library that exports functions. In that case, they are only partly automated.
On 13/09/2026 15:34, fir wrote:
bart pisze:
On 13/09/2026 14:21, fir wrote:why? its the same
bart pisze:
On 13/09/2026 11:53, Ike Naar wrote:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim >>>>>>> is to
eliminate most braces. The should be no need to ever see '} else {' >>>>>>> instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included): >>>>>>
-a-a-a-a if (0) { if (1) puts("foo");-a-a else-a-a puts("bar"); }
-a-a-a-a if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar". >>>>>
This illustrates my point; first some Pascal:
-a-a if cond then begin s1; s2 end else begin s3; s4 end
C is the same but uses braces, and semicolons are terminators:
-a-a if (cond) { s1; s2; } else { s3; s4; }
One has 'end else begin', the other has '} else {'.
However the Pascal version can be improved; since 'then' and 'else' >>>>> can act as block delimiters:
-a-a if cond then s1; s2 end else s3; s4 end
Only the final block in a chain (eg. if-else-if) needs the 'end'
terminator. And now 'else' is by itself.
Unfortunately this doesn't transfer well to C:
-a-a if (cond) s1; s2; else s3; s4; }
The () around 'cond' are needed as the ')' separates cond and s1
(fir doesn't not appreciate this point; he thinks it is fine for
statements and expressions to run together provided that there is a >>>>> way to infer where one logically ends and the other starts).
The trouble is that lone, unbalanced } at the end.
So it would need a bigger change. But then that's what fir is
doing. (He's never going to get there, but there's no harm in
humouring him.)
what you consider problems is so siple i dont even think on it
as to ifs syntax i am yet not sure
some like this may be considered but its not much good loking
though is sorta logical
x<10 raA x++>5
-a-a-a-a-a-a-a raA-a more_than_five
-a-a-a-a-a-a-a ray less_than_six
-a-a-a-a ray do_nothing
Try: if 5 < x < 10.
The same as ... what?
I don't know what your example was meant to do. But if testing whether x
was in some interval, and with my example 'x' is only written once.
Otherwise you might want to look at how lots of languages do more
general pattern-matching.>
5<x<10 raA
bart wrote:
On 13/09/2026 10:53, fir wrote:He wants to compress the language, metaphor a plum, into a prune that
fir pisze:
bart pisze:
consider for example french or polish language its totally crypticIt sounds like your ideal language would be APL, if is not 'clean'
and 'clear' that you're after, but 'minimal' and 'cryptic'.
The first version above is the best balance in my view. You /want/
some mixture of keywords and symbols.
In any case, in a typical program, only 1/3 of alphanumerics of
keywords; the rest will still be user-identifiers.
i gave you example - its only cryptic if you dont know what it means
until you will learn it...
That is not your aim. That appears to be to start with a language that
you know perfectly well, but remove all punctuation, capitalisation
and structure, and half the words. But to what purpose; because you're
too lazy to type?
-a-anot to say you want to understand it without
definitions
So an APL (or J or K) program is never cryptic because all you have to
do is learn it? If only I'd thought of that!
The same applies to Assembly I guess. And machine code?
overally this discussin ended i think at least as for few months,
cant continue becouse you repeat the same things
And you keep repeating the same nonsense. What is your endpoint: a
program that can be expressed in one byte?
has much reduced.
It is the same way with a newsgroup when the warlord Lane W has
compressed all the shitheads, David Brown, Keith, bart, and the rest
except I guess the fellows who are in the mood, when they all conspire
by email to not respond to anything he writes. It is at such a time that
he declares victory. As I roll over yet another group in the 97 I have subjugated to my rule and made complacent, a tear drips from my eye. C,
such a beautiful language, yet what hypocrites such as David Brown
defending it. Really, nothing personal? I beg to differ. Under my boot,
a serpent crawls out of the skull of another victim.
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim is to
eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
if (0) { if (1) puts("foo"); else puts("bar"); }
if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
bart <bc@freeuk.com> wrote:
On 09/09/2026 02:59, Waldek Hebisch wrote:
I find that adding include files, creating headers, maintaining forward
declarations etc to be a complete PITA.
Apparenty you ignored first part above. So, let me expand this.
I see value in specifying interfaces. For me it is important
design information. It takes some time to get it right. Not
time to code or type. It takes time to find good design.
Writing declarations is small part of it.
In my use typical import
statement imports several declarations so is even smaller issue.
I mentioned non-C project where I have about 1200 modules. There
are 1115 import statements. Note that some uses imply/are equivalent
to import, for example there is inheritance of interfaces (given
interface exports everything that its parents export plus usually some additional things), there is probably about 5 thousends of instances
of inheritance. Alternatives would involve duplicating some thousends
of declarations (probably around 10-15 thousends). The system
has about 150000 LOC (215000 wc lines).
Compared to total import
statements and inheritance specifications are small part. And they
are relatively trivial: cases where code compiled but import or
inheritance statements were wrong wre quite rare and they mainly
were cases of missing export or not needed import. Later re-design
may change interfaces, but I mean correctness with respect to design
at time where code was compiled. OTOH normal executable code may
compile fine but behaves completely wrong, so requires more work,
I do not think that C can do what this system is doing. But extrapolating, design in C of similar spirt would probably need say 5000 #include
lines, some hairy macros and 200000-300000 LOC. And executable part
would be much more tricky to get right.
So, I think that your problem is mostly psychological: you consider export/import info as unimportant and it is painful to you to do
work that you consider useless. I consider maintaining export/import
info as important and can do this with resonable efficiency.
Still, modern languages tend to have a module scheme, suggesting the
'flexible' C approach (I'd use the term 'prehistoric') wasn't quite enough.
I used or at least looked at several languages with module systems
or things intended to perform similar duty. You approach seem to
be unique, all other require explicit import or equivalent at least
in some (rather frequent) cases. Some languages do not support
re-export, in such case you can rightfully complain. The ones with
re-export allow forming common interface module do that number
of import statements is minimised. But this is developers choice
and apparently most prefer to import only needed things, even
though it requires more import statements.
Some even specify individual names to be imported from a module. What a
complete waste of time!
If I need 1 or 2 names from a module, then it makes sense to specify
them explicitely.
Mismatched
declarations may cause troubles like crashes or wrong output
that take work to fix. Compared to that mismatches in explicit
declarations are trivial to fix. So one adds some extra work
to write and maintain declarations for benefit of better error
detection and reduction of total work.
Type inference means
almost no reduction in ability to detect errors and some reduction
of work in maintaining declarations. At least in case of C and
C++ type inference optional: you can still give explicit types.
At least your description of of your module system suggest that
it is more like FORTRAN than modern type interface.
Module system has other advantages over C. First, in C sane
developers use headers in consistent way, but language
does not enforce it. Typical module system enforces
consistency. Second, module interfaces can be parsed once,
avoiding problem of repeated re-parsing of C headers.
According to David Brown and Scott Lurndal, that is a non-problem!
And according to DB, reducing a large, complex mass of header files (of
external library) into one compact file 95% smaller, would be a waste of
time.
If they want, they can write what they think about this issue.
Here I am stating my opinion in context of what you wrote.
One problem with C headers is that a single macro can choose
a differenet branch in a header, so you either need some sophisticated
system of dealing with conditionals or you need to re-parse
whenever any macro is defined differently than during previous
With separate interface files, who writes the interface: is it the
programmer who has to duplicate what is in the implementation? (In which
case, what checks are made that it matches?)
In system that I use it is the programmer. System checks that
declaration match.
My first attempts at (modern) modules tried to do the latter, but it was
hard. For example, compile module A.m and it generates A.exp which is
the interface that can be used elsewhere via 'import A'.
But suppose A and B import each other; which is compiled first?
This I resolve with what you would call "whole program compilation".
First pass tries to recognize types. Second pass collects info
about exported functions. I use this in context of explicit interface
parts, but in fact compiler parses everthing and extracts some
information from implementation part. So in principle I could
extract interace based on some markers. After the second pass there
is normal compilation where imports use info colleded in the second
pass. This in not particularly fast, for 150000 LOC I need 3.5s
to extract the interface info. Still, it is small part of the
whole compilation which needs about 300s CPU time (about 38s
real time when using 20 cores).
I now work with whole program compilers. There, a discrete interface
file doesn't make sense and is not needed between the modules of the
same program.
Well, I want well specified interfaces between parts of the program.
With this it is much easier to decide which module is wrong (does not
comply with its interface) and consequently to fix bugs.
Also
I have modules which can use use one of several other modules.
That is module M can use function from A, B, C, ... and it should
work correctly which each one. As long as A, B, C, ... have the
same interface I can test that M works with say A and the A, B, C, ...
in fact implement the same interface and after that expect that
M will also work with B or C. Without well specified interfaces
that would be much harder (or impossible).
In different context, one may have collection of modules such that
some subsets form programs. That is particularly relevant for microcontrollers, where target is too small to include all available
modules. Also, different microcontrollers may need different
(alternative) hardware specific modules. In such situation you
do not want to leak hardware specific details to general modules.
And in general, you want to limit what is pulled in only to stuff
that is actually needed.
On 13/09/2026 19:55, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
On 09/09/2026 02:59, Waldek Hebisch wrote:
I find that adding include files, creating headers, maintaining forward
declarations etc to be a complete PITA.
Apparenty you ignored first part above. So, let me expand this.
I see value in specifying interfaces. For me it is important
design information. It takes some time to get it right. Not
time to code or type. It takes time to find good design.
Writing declarations is small part of it.
Sure. But interfaces to what? To some sort of library?
And it isn't really much to do with modules. C libraries have
interfaces, usually as headers, but it doesn't have modules.
A more typical problem is organising the functions, variables, types,
enums and tables of an application into multiple modules: what goes
where; what needs to be shared.
Once you have your N modules, then that's the list the language's module scheme uses to build your app.
A formal interface would be used for external libraries, or for internal libraries where a group of modules form a private sub-program.
In my use typical import
statement imports several declarations so is even smaller issue.
I mentioned non-C project where I have about 1200 modules. There
are 1115 import statements. Note that some uses imply/are equivalent
to import, for example there is inheritance of interfaces (given
interface exports everything that its parents export plus usually some
additional things), there is probably about 5 thousends of instances
of inheritance. Alternatives would involve duplicating some thousends
of declarations (probably around 10-15 thousends). The system
has about 150000 LOC (215000 wc lines).
If you have 215Kloc and 1200 modules, then you have other challenges
than a module scheme. (That's some 0.18Kloc/module on average, while my stuff might be more like 1Kloc, and used to be nearer 2Kloc.)
But I'm surprised you only have about one import statement per file: is
it the same project-wide interface file, or is each much more specific?
Compared to total import
statements and inheritance specifications are small part. And they
are relatively trivial: cases where code compiled but import or
inheritance statements were wrong wre quite rare and they mainly
were cases of missing export or not needed import. Later re-design
may change interfaces, but I mean correctness with respect to design
at time where code was compiled. OTOH normal executable code may
compile fine but behaves completely wrong, so requires more work,
I do not think that C can do what this system is doing. But extrapolating, >> design in C of similar spirt would probably need say 5000 #include
lines, some hairy macros and 200000-300000 LOC. And executable part
would be much more tricky to get right.
I'm now curious as to what weird things you're doing. Is this other language/scheme one like C++, or something that you have devised?
So, I think that your problem is mostly psychological: you consider
export/import info as unimportant and it is painful to you to do
work that you consider useless. I consider maintaining export/import
info as important and can do this with resonable efficiency.
As I suggested above, perhaps 'import/export' are too-strong terms for talking about sharing between friendly modules of the same subprogram.
(A 'subprogram' is my language is one building block down from
'program', which equates to a single EXE or DLL binary. 'Module' is just below that and that corresponds to one source file.)
Meanwhile interfaces between programs (ie. between EXE/DLL files) is something that doesn't come up often for me; it is a different subject,
and something I would also apply automatic methods to as much as
possible. It is FFI more than modules.
Still, modern languages tend to have a module scheme, suggesting the >>>>> 'flexible' C approach (I'd use the term 'prehistoric') wasn't quite enough.
I used or at least looked at several languages with module systems
or things intended to perform similar duty. You approach seem to
be unique, all other require explicit import or equivalent at least
in some (rather frequent) cases. Some languages do not support
re-export, in such case you can rightfully complain. The ones with
re-export allow forming common interface module do that number
of import statements is minimised. But this is developers choice
and apparently most prefer to import only needed things, even
though it requires more import statements.
Some even specify individual names to be imported from a module. What a
complete waste of time!
If I need 1 or 2 names from a module, then it makes sense to specify
them explicitely.
I don't see why. Unless you mean it is more important to exclude the
names you haven't listed?
Support a library or module M exports functions A - F. You'd write:
import M
then later you can write M.A() to M.F() without doing anything else.
Suppose you only need function D. In that case you just call M.D();
nothing is forcing you to call M.E() too!
If this is about not having to include those functions in the binary,
then that would be something for the language to deal with: it knows
which functions have called, and knows those are the ones to import.
Mismatched
declarations may cause troubles like crashes or wrong output
that take work to fix. Compared to that mismatches in explicit
declarations are trivial to fix. So one adds some extra work
to write and maintain declarations for benefit of better error
detection and reduction of total work.
What benefits are these? All I can see are loads of annoying errors
because you've forgotten to declare entities.
Type inference means
almost no reduction in ability to detect errors and some reduction
of work in maintaining declarations. At least in case of C and
C++ type inference optional: you can still give explicit types.
At least your description of of your module system suggest that
it is more like FORTRAN than modern type interface.
Type inference and modules are different things. Modules manage
visibility named entities including types across source files.
With my whole-program scheme, there will never be type mismatches across
the sources files of a particular program. That can only happen when interface/API info and implementation or binary are separate.
(Type inference is minimal, nothing like H-M. In any case my Modules
work the same way across two languages, one fully typed and static, the other dynamically typed.)
Module system has other advantages over C. First, in C sane
developers use headers in consistent way, but language
does not enforce it. Typical module system enforces
consistency. Second, module interfaces can be parsed once,
avoiding problem of repeated re-parsing of C headers.
According to David Brown and Scott Lurndal, that is a non-problem!
And according to DB, reducing a large, complex mass of header files (of
external library) into one compact file 95% smaller, would be a waste of >>> time.
If they want, they can write what they think about this issue.
They're users who are proficient in their tools. Nothing ever seem to be
a problem - that superfast hardware and dozens of parallel cores can't
fix! I've learnt from experience that even a build time of minutes
(where the result might be a mere 1MB binary) doesn't faze them.
Oh, it's a 'one-off', or they are not curious as to why a simple task
isn't faster.
Basically they are not interested in any merits of my solutions.
Here I am stating my opinion in context of what you wrote.
One problem with C headers is that a single macro can choose
a differenet branch in a header, so you either need some sophisticated
system of dealing with conditionals or you need to re-parse
whenever any macro is defined differently than during previous
All the problems with C headers would be a big subject by itself!
With separate interface files, who writes the interface: is it the
programmer who has to duplicate what is in the implementation? (In which >>> case, what checks are made that it matches?)
In system that I use it is the programmer. System checks that
declaration match.
C uses the 'linkage' system for functions and variables. It uses text replication to share entities such as types, structs, enumerations and macros. How do other language's modules cope with the latter?
(I only know about Python. My languages of course handle all those too.)
My first attempts at (modern) modules tried to do the latter, but it was >>> hard. For example, compile module A.m and it generates A.exp which is
the interface that can be used elsewhere via 'import A'.
But suppose A and B import each other; which is compiled first?
This I resolve with what you would call "whole program compilation".
First pass tries to recognize types. Second pass collects info
about exported functions. I use this in context of explicit interface
parts, but in fact compiler parses everthing and extracts some
information from implementation part. So in principle I could
extract interace based on some markers. After the second pass there
is normal compilation where imports use info colleded in the second
pass. This in not particularly fast, for 150000 LOC I need 3.5s
to extract the interface info. Still, it is small part of the
whole compilation which needs about 300s CPU time (about 38s
real time when using 20 cores).
This is that 215Kloc project? 300s (approx time for single core) is
pretty slow for that. What is the problem here; the language being hard
to process?
(As you know my stuff works perhaps 3 magnitudes faster, assuming your machine is faster.
Although I am currently investigating why my C compiler takes 0.12
seconds to process some 0.5M lines of SDL3 headers when TCC takes only
0.05 seconds. I'm just curious.
An odd fact I discovered today: if SDL3 headers (86 files/82Kloc) are preprocessed, the result is only 4000 lines and 27K tokens, even though
550K lines are processed according to my compiler (but maybe that's why
it's slow).
This output is not enough to use as a new compact header; it will need #defines etc that have been stripped. But it shows the core of the API
is quite small. I will investigate further.)
I now work with whole program compilers. There, a discrete interface
file doesn't make sense and is not needed between the modules of the
same program.
Well, I want well specified interfaces between parts of the program.
With this it is much easier to decide which module is wrong (does not
comply with its interface) and consequently to fix bugs.
As I said, many of my modules are friendly. I don't care about formal interfaces. When I do, a module or several can form their own more
private group.
This makes coding much, much simpler.
Also
I have modules which can use use one of several other modules.
That is module M can use function from A, B, C, ... and it should
work correctly which each one. As long as A, B, C, ... have the
same interface I can test that M works with say A and the A, B, C, ...
in fact implement the same interface and after that expect that
M will also work with B or C. Without well specified interfaces
that would be much harder (or impossible).
When happens when A gets too big and you want to split it into A1 and
A2; will it need a new formal interface between them?
In different context, one may have collection of modules such that
some subsets form programs. That is particularly relevant for
microcontrollers, where target is too small to include all available
modules. Also, different microcontrollers may need different
(alternative) hardware specific modules. In such situation you
do not want to leak hardware specific details to general modules.
And in general, you want to limit what is pulled in only to stuff
that is actually needed.
I work with a 64-bit supercomputer with huge amounts of memory. (In
other words, the second-cheapest PC in the shop.)
Still, last year I adapted my systems language to work with an emulated
Z80 system, and the module scheme still worked!
Yes, the memory is more limited, you just have less stuff in the
modules. The scheme allows for some flexibility.
And it isn't really much to do with modules. C libraries have
interfaces, usually as headers, but it doesn't have modules.
bart pisze:
And it isn't really much to do with modules. C libraries have
interfaces, usually as headers, but it doesn't have modules.
out of contex as i not readed most of this branch but obviously C has modules
if you may compile some c files with no resolved 'linkage' to like .o
or .obj etc they are modules
bart <bc@freeuk.com> wrote:
A more typical problem is organising the functions, variables, types,
enums and tables of an application into multiple modules: what goes
where; what needs to be shared.
You may view interface as information about what needs to be shared,
but IMO there is more to this. In badly designed program a lot
must be shared. In well designed program and assuming that problem
domain is suitable for modularization sharing is quite limited.
And frequently is is possible to replace implementation part by
quite a different thing without affectiong correctness of the
program.
To make a concrete example, I needed simple varianat of regular
expressions. In principle I could call existing library via FFI, but
that had its own problems. Since the core algorithm is quite simple
I decided to roll my own. I ended with collection of 4 modules.
One module implements a single node of automation, second one
implements matching algorithm and build automation (that is graph
of nodes) from other data. Third module provides a higher level abstractions, representing patterns build from simpler automatons
via boolean operations. Fourth module contains a parser which
converts textual patterns to internal representation, using
operations provided by earlier modules. Together this is 452
wc lines. One may be tempted to do this a single module, but
I think that what I did have better structure: first module
essentially defines data struture (or maybe I should say data
type) and in principle this could be part of the second module.
But having module means that some things are hidden and some
are exported in nicer form. So I do not consider having this
as a separtate module as a big deal, but I think that overall
thanks to this code is a little nicer. Second module implements
core algorithm. IMO is is nice that this code is not mixed
with other parts and also it is potentially reusable in the
future. Third module implements feature that I needed, it
is something that AFAIK is not supported by standard libraries
so I would need it even if I decided to scrap the first two
modules and replace them by FFI calls to some standard library.
The actual syntax of supported patterns is confined to the
fourth module. If I needed different syntax (possibly with
different featurs set) I can provide an alternative parser
module. As you later write those are "friendly" modules
designed to work together. But each of them have reasonably
well specified responsibilities. And since responsiblity
of each module is rather narrow, each of them is simple,
almost trivial. Functionality provided by this collection
of 4 modules is not very impressive, but less trivial than
each of the involved modules.
To summarise using this example 4-module library:
-a (1) Add 4 'module' directives to my own app
-a (2) Put them into rex.m then add 'module rex' to my app
-a (3) Put them into rex.m, build as DLL, then add 'module rex/rex_lib'And that module contains 'importdll rex`, yet a further level in my
-a-a-a-a-a to my app
On 14/09/2026 08:49, fir wrote:
bart pisze:
And it isn't really much to do with modules. C libraries have
interfaces, usually as headers, but it doesn't have modules.
out of contex as i not readed most of this branch but obviously C has
modules
if you may compile some c files with no resolved 'linkage' to like .o
or .obj etc they are modules
No. We might informally use 'modules' to mean individual source files or translation units. A program may comprise multiple translation units. C allows independent compilation of such units and there needs to be a
linking process to combine them.
This is not the same as a language supporting a proper module scheme. Otherwise even Assembly has modules!
Without modules, building a program in C looks like this:
-a tcc prog.c a.c b.c c.c d.c e.c ...
With modules, it would be just:
-a tcc prog.c
Both produce prog.exe. This illustrates automatic discovery of the
source files, but real modules would have other benefits too.
bart pisze:
On 14/09/2026 08:49, fir wrote:No, C has modules those compilation units are modules (it that make
bart pisze:
And it isn't really much to do with modules. C libraries have
interfaces, usually as headers, but it doesn't have modules.
out of contex as i not readed most of this branch but obviously C has
modules
if you may compile some c files with no resolved 'linkage' to like .o
or .obj etc they are modules
No. We might informally use 'modules' to mean individual source files
or translation units. A program may comprise multiple translation
units. C allows independent compilation of such units and there needs
to be a linking process to combine them.
This is not the same as a language supporting a proper module scheme.
Otherwise even Assembly has modules!
Without modules, building a program in C looks like this:
-a-a tcc prog.c a.c b.c c.c d.c e.c ...
With modules, it would be just:
-a-a tcc prog.c
Both produce prog.exe. This illustrates automatic discovery of the
source files, but real modules would have other benefits too.
binary modules that you can then link)
ofc those modules are quite 'thin' or how to call it but for shure those
are modules.. what you cay with this example is specific functionality related to modules but not all need to have it
(also no need to enlight me on things i was talking quite clearly and
loudly many years ago (as far as i remember my first post oon this group
was on related things - i mean the problem that c cupports those modules
but dont support module names and it may simply make crash or clask of symbols
Ike Naar <ike@sdf.org> writes:
On 2026-09-12, bart <bc@freeuk.com> wrote:
Note that the code will still have braces. I suggest a better aim is to >>> eliminate most braces. The should be no need to ever see '} else {'
instead of just 'else'.
There can be a difference; for example (assume <stdio.h> included):
if (0) { if (1) puts("foo"); else puts("bar"); }
if (0) { if (1) puts("foo"); } else { puts("bar"); }
The first line will print nothing; the second one will print "bar".
I believe bart was suggesting a language change, not offering advice
on how to program in C.
In C, the syntax for an "if" statement is:
if ( expression ) statement
if ( expression ) statement else statement
(C23 tweaks this very slightly in ways that are not relevant to
the current discussion.) Since it's defined in terms of single
statements, if you want multiple statements in a branch you need to
create one by enclosing multiple statements in braces. This also
requires a rule about which "if" a given "else" is associated with.
Many other langauges allow multiple statements where C only allows
a single statement. They typically do so by requiring a closing
delimiter matching the "if", for example "endif", "end if", "end",
or "fi". They also typically add a single token combining "else"
and "if", typically "elseif", "elsif", or "elif".
(Pascal follows the C approach, but spells "{" and "}" as "begin"
and "end".)
It's not practical to follow bart's advice (always use "else" rather
than "} else {" unless you're using some language other than C.
bart's point, I think, is that he dislikes the way C does this.
Personally, I tend to prefer the non-C delimited approach, since
it's a bit less error-prone, but both approaches are perfectly
valid and can be used cleanly and correctly with a little care.
It's not a factor I consider when deciding which language to use.
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Personally, I tend to prefer the non-C delimited approach, since
it's a bit less error-prone, but both approaches are perfectly
valid and can be used cleanly and correctly with a little care.
It's not a factor I consider when deciding which language to use.
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use fewer braces.-a A compromise is to insist on always using braces if there is an "else" clause (in both the "if" and "else" parts), or at the very least,
to do so if there are nested "if" statements.
On 14/09/2026 17:01, Scott Lurndal wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Personally, I tend to prefer the non-C delimited approach, since
it's a bit less error-prone, but both approaches are perfectly
valid and can be used cleanly and correctly with a little care.
It's not a factor I consider when deciding which language to use.
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use fewer >braces. A compromise is to insist on always using braces if there is an >"else" clause (in both the "if" and "else" parts), or at the very least,
to do so if there are nested "if" statements.
Always using braces (combined with a consistent indent style) is the
choice with the lowest risk of mistakes or misinterpretation, and means
that changes such as adding or removing statements to the controlled
parts do not lead to additional changes. For anyone using version
control systems, the advantage of :
if (test) {
do_this();
}
over :
if (test)
do_this();
is obvious the first time they need to change the code to :
if (test) {
do_this();
do_that();
}
On 9/9/2026 5:43 AM, David Brown wrote:
[...]
Just defining the symbol is fine - for use as a pure header guard, where________
the check is with "#ifndef" or "#ifdef", defining it to a value has no
added value.-a Adding the "1" in that example was done without thinking.
#ifndef __NUMBER_GENERATOR_H__
#define __NUMBER_GENERATOR_H__ 1
________
Is that __* non conformant? Does it breach the impl name prefix space?
On 9/14/26 18:11, David Brown wrote:
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use
fewer braces.-a A compromise is to insist on always using braces if
there is an "else" clause (in both the "if" and "else" parts), or at
the very least, to do so if there are nested "if" statements.
-a-a About braces, I always use them except in one case :
-a-a when the code fragment is on the same line as the if.
-a-a if (retval) fprintf(stderr, "retval is %d\n", retval);
-a-a I think it's dangerous, but for some little things
-a-a like my sample, it make things clearer for me.
David Brown <david.brown@hesbynett.no> writes:
On 14/09/2026 17:01, Scott Lurndal wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Personally, I tend to prefer the non-C delimited approach, since
it's a bit less error-prone, but both approaches are perfectly
valid and can be used cleanly and correctly with a little care.
It's not a factor I consider when deciding which language to use.
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use fewer
braces. A compromise is to insist on always using braces if there is an
"else" clause (in both the "if" and "else" parts), or at the very least,
to do so if there are nested "if" statements.
Always using braces (combined with a consistent indent style) is the
choice with the lowest risk of mistakes or misinterpretation, and means
that changes such as adding or removing statements to the controlled
parts do not lead to additional changes. For anyone using version
control systems, the advantage of :
if (test) {
do_this();
}
over :
if (test)
do_this();
is obvious the first time they need to change the code to :
if (test) {
do_this();
do_that();
}
That's true for anyone still using 80-column punched cards
(or ancient line-oriented editors) as well.
:-)
On 14/09/2026 20:54, Scott Lurndal wrote:
David Brown <david.brown@hesbynett.no> writes:
On 14/09/2026 17:01, Scott Lurndal wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Personally, I tend to prefer the non-C delimited approach, since
it's a bit less error-prone, but both approaches are perfectly
valid and can be used cleanly and correctly with a little care.
It's not a factor I consider when deciding which language to use.
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use fewer
braces. A compromise is to insist on always using braces if there is an >>> "else" clause (in both the "if" and "else" parts), or at the very least, >>> to do so if there are nested "if" statements.
Always using braces (combined with a consistent indent style) is the
choice with the lowest risk of mistakes or misinterpretation, and means
that changes such as adding or removing statements to the controlled
parts do not lead to additional changes. For anyone using version
control systems, the advantage of :
if (test) {
do_this();
}
over :
if (test)
do_this();
is obvious the first time they need to change the code to :
if (test) {
do_this();
do_that();
}
That's true for anyone still using 80-column punched cards
(or ancient line-oriented editors) as well.
:-)
I don't quite follow you. (I use line lengths up to perhaps 120
characters, but not rigidly fixed.)
On 14/09/2026 20:21, tTh wrote:
On 9/14/26 18:11, David Brown wrote:
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use
fewer braces.-a A compromise is to insist on always using braces if
there is an "else" clause (in both the "if" and "else" parts), or at
the very least, to do so if there are nested "if" statements.
-a-a-a About braces, I always use them except in one case :
-a-a-a when the code fragment is on the same line as the if.
-a-a-a if (retval) fprintf(stderr, "retval is %d\n", retval);
-a-a-a I think it's dangerous, but for some little things
-a-a-a like my sample, it make things clearer for me.
I do the same, but restrict it to simpler statements.
"Simpler" is a matter of taste and subjective judgement here -
"return;", "break;", "continue;" are all "simple".-a A short assignment
is "simple".-a For a longer printf, I'd usually use braces.-a If the statement is too long to be comfortable on one line, or may reasonably become so in future modifications, then I'd have braces.
David Brown <david.brown@hesbynett.no> writes:
On 14/09/2026 17:01, Scott Lurndal wrote:
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
Personally, I tend to prefer the non-C delimited approach, since
it's a bit less error-prone, but both approaches are perfectly
valid and can be used cleanly and correctly with a little care.
It's not a factor I consider when deciding which language to use.
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use fewer
braces. A compromise is to insist on always using braces if there is an
"else" clause (in both the "if" and "else" parts), or at the very least,
to do so if there are nested "if" statements.
Always using braces (combined with a consistent indent style) is the
choice with the lowest risk of mistakes or misinterpretation, and means
that changes such as adding or removing statements to the controlled
parts do not lead to additional changes. For anyone using version
control systems, the advantage of :
if (test) {
do_this();
}
over :
if (test)
do_this();
is obvious the first time they need to change the code to :
if (test) {
do_this();
do_that();
}
That's true for anyone still using 80-column punched cards
(or ancient line-oriented editors) as well.
:-)
bart <bc@freeuk.com> wrote:....> As I wrote I can use equvalent of M.A() without import.
As I wrote, there is inheritance which is used much more frequently
than import. And import means that all functions from imported
module may be used without qualification. That is if module A
exports function f, than after importing A I can just write 'f()'
to call 'f' (assuming it needs no arguments).
In my case import means that functions are available without
qualification, so plain E() may call function from imported module.
And I have function overloading and partial type inference. In
effect, it is not entirely trivial to decide which function is
actually called when you write E(). Most functions either needs
arguments or produces values (or both), so calling wrong functions
almost surely is not a big problem, that is either overloading
machinery would choose the correct one, or call to wrong one will
result in type error. But still, I think that is better to limit
possible confusion and import as little as possible.
More generally, I also worked with dynamic languages where one
simply calls a function and types of arguments are only checked
on use. IME code in such languages needs a lot of testing, much
more than with type checking. That is without type checking
it is too easy to ship code which calls a function with argument
of wrong type. Clearly to check types compiler must know them.
And absent total type reconstrution (like in ML), one needs to
declare types of arguments and return type of functions.
So I hope that is part is clear.
You may doubt necessity of having duplicate declaration in the
module interface. In principle compiler could do all needed
checks having only single declaration. But compilers that I
use need declaration in interface part. And when reading code I
actually prefer to have both declarations. Namely, when looking
at interactions between modules I look at interface parts and
want to see relevant declarations there.
When working on inner
part of module I want relevant info there. For example, I disliked
standard Pascal rule that forward declaration contained all
info, but corresponding defintion contained just function name
skipping arguments types and names. For me extra effort during
reading, due to extral lookup for missing info meant more work
compared to cut-and-paste needed to duplicate function header.
Type inference means
almost no reduction in ability to detect errors and some reduction
of work in maintaining declarations. At least in case of C and
C++ type inference optional: you can still give explicit types.
At least your description of of your module system suggest that
it is more like FORTRAN than modern type interface.
Type inference and modules are different things. Modules manage
visibility named entities including types across source files.
Sure. I mentioned type inference to illustrate that approach may
change and if compiler can infer needed information, then languages
may depend on this saving programmer work. But gross rules like
firt letter rule of old FORTRAN (or implicit int from traditional
C) are unsatisfactory. And when talking about modules your
rule "all modules are visible" looks more like old gross rules and
unlike inference process.
C uses the 'linkage' system for functions and variables. It uses text
replication to share entities such as types, structs, enumerations and
macros. How do other language's modules cope with the latter?
Typical approach is to have compiled version of interface. That
requires some method to write such info to files. IIUC GNU C
precompiled headers use (or used) crude but simple method: they
just dumpled memory area containing intenal compiler representation
of the header. This is simple and fast, but any tiny mismatch could
lead to error, so this mechanizm has serious limitations and is
unsuitable for use with modules. GNU Pascal walked internal tree
of nodes, keeping visted nodes in a hash table to make sure that
needed node is stored exactly one. During storing each node was
assigned integer identifier and all pointers were repleaced by
identifiers (numbers) of taget node. Reading worked in reverse:
it re-build nodes in memory, replacing numeric indentifiers by
pointers.
The system I mentioned above writes interface information in textual
form, but it is easier to parse and more explicit than source code.
This is that 215Kloc project? 300s (approx time for single core) is
pretty slow for that. What is the problem here; the language being hard
to process?
In addition compiler uses linear search in symbol table.
Getting rid of recursion and implied by this multiple re-compilation
probably would give 3-5 times faster compilation (and hopefully
would eliminate really bad cases). If things could be simplified
so that hash table is enough, that probably would double speed.
Once that is handled other things would requre attention. But
it does not make much sense to fight for small speedups in other
places when biggest issues (that is recursive compilation and
linear search are unresolved). And that require substantial
rework. Even after rework compiler is unlikly to be as fast as
yours. Namely overloading and type inference
Also, compiler is using higher level data structures that
has its own costs. Parsing this 215K wc lines takes 1 second,
while it should be possible to do this in 0.1 second. But
again, before other issues are handled relative gain from
faster parser is too small to bother (I may speed up parser
if I need to reorganize it to implement some extra feature).
BTW: It is hard to compare compile speed in longer time because
machines got faster. But when I started my work build needed
something like 2.5 hours,
When I need to look at preprocessed files I frequently see a lot of
blank lines, so I am not surprised that headers get smaller. At first
glance 4000 lines after preprocessing looks too small, but maybe it
is real.
This output is not enough to use as a new compact header; it will need
#defines etc that have been stripped. But it shows the core of the API
is quite small. I will investigate further.)
At some time I did a little work on Mac OS API. There was about
220 tousends symbols, of which something like 200 tousends where
various magic constants. So, maybe bulk od SDL3 headers is due
to defiend constants?
On 14/09/2026 08:41, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
As I wrote, there is inheritance which is used much more frequently....> As I wrote I can use equvalent of M.A() without import.
than import. And import means that all functions from imported
module may be used without qualification. That is if module A
exports function f, than after importing A I can just write 'f()'
to call 'f' (assuming it needs no arguments).
Do you mean that you can call imported function A() without importing
its owner module M()?
Above (in the example that uses A.f() instead of M.A()) you suggest the module name must be explicitly exported.
Otherwise there must be some other approach for the compiler to know
what imports are to be done. (I think some schemes are file-based: eg.
all source files in the current directory are assumed to be project modules.)
In my case import means that functions are available without
qualification, so plain E() may call function from imported module.
And I have function overloading and partial type inference. In
effect, it is not entirely trivial to decide which function is
actually called when you write E(). Most functions either needs
arguments or produces values (or both), so calling wrong functions
almost surely is not a big problem, that is either overloading
machinery would choose the correct one, or call to wrong one will
result in type error. But still, I think that is better to limit
possible confusion and import as little as possible.
My language only allows one top-level name E in scope at any one
location. If two imported modules both export E, then the compiler will complain; they need to be disambiguated.
There is also shadowing, so here it is possible to mistakenly call a
local function that happens to have the same name and signature.
But such problems are well-known when you have nested scopes, and you
see them in other languages too.
More generally, I also worked with dynamic languages where one
simply calls a function and types of arguments are only checked
on use. IME code in such languages needs a lot of testing, much
more than with type checking. That is without type checking
it is too easy to ship code which calls a function with argument
of wrong type. Clearly to check types compiler must know them.
And absent total type reconstrution (like in ML), one needs to
declare types of arguments and return type of functions.
So I hope that is part is clear.
I have a lot of experience of dynamic languages that ran at customer
sites. Such language errors were extremely rare.
It's not that I did extensive testing, but with normal development over
a longish time-frame (eg. 1-2 years), you will uncover a lot of bugs!
You may doubt necessity of having duplicate declaration in the
module interface. In principle compiler could do all needed
checks having only single declaration. But compilers that I
use need declaration in interface part. And when reading code I
actually prefer to have both declarations. Namely, when looking
at interactions between modules I look at interface parts and
want to see relevant declarations there.
The duplicate declarations are necessary in some situations. For example
you don't have the implementation source code, but that info is
necessary to be able to use those exports in your program.
However, they could be automatically generated by whoever /does/ have
the source code, by a compiler option.
When working on inner
part of module I want relevant info there. For example, I disliked
standard Pascal rule that forward declaration contained all
info, but corresponding defintion contained just function name
skipping arguments types and names. For me extra effort during
reading, due to extral lookup for missing info meant more work
compared to cut-and-paste needed to duplicate function header.
I don't remember that in Pascal. However I remember similar schemes from
my own early languages. Functions were routinely declared in advance, whether necessary or not (I didn't want to worry about definition order).
But the declaration contained only the parameter types, and the
definition contained only the parameter names! I recently rediscovered
this fact and wondered how I tolerated it.
Type inference means
almost no reduction in ability to detect errors and some reduction
of work in maintaining declarations. At least in case of C and
C++ type inference optional: you can still give explicit types.
At least your description of of your module system suggest that
it is more like FORTRAN than modern type interface.
Type inference and modules are different things. Modules manage
visibility named entities including types across source files.
Sure. I mentioned type inference to illustrate that approach may
change and if compiler can infer needed information, then languages
may depend on this saving programmer work. But gross rules like
firt letter rule of old FORTRAN (or implicit int from traditional
C) are unsatisfactory. And when talking about modules your
rule "all modules are visible" looks more like old gross rules and
unlike inference process.
Well, all functions and other top-level names are visible everywhere
inside one module. That is not usually considered a problem.
Since you mentioned big modules, I will say that in my old stuff, one
module had 7K lines (an interpreter core), and another nearly 6K (a
one-pass bytecode compiler), although bloated by inline assembly.
This is basically taking such a module and splitting it up into N
chunks. Entities used in more than one chunk need to be shared.
C uses the 'linkage' system for functions and variables. It uses text
replication to share entities such as types, structs, enumerations and
macros. How do other language's modules cope with the latter?
Typical approach is to have compiled version of interface. That
requires some method to write such info to files. IIUC GNU C
precompiled headers use (or used) crude but simple method: they
just dumpled memory area containing intenal compiler representation
of the header. This is simple and fast, but any tiny mismatch could
lead to error, so this mechanizm has serious limitations and is
unsuitable for use with modules. GNU Pascal walked internal tree
of nodes, keeping visted nodes in a hash table to make sure that
needed node is stored exactly one. During storing each node was
assigned integer identifier and all pointers were repleaced by
identifiers (numbers) of taget node. Reading worked in reverse:
it re-build nodes in memory, replacing numeric indentifiers by
pointers.
The system I mentioned above writes interface information in textual
form, but it is easier to parse and more explicit than source code.
I was asking more about managing the names of variables, types etc
across modules. In C that is very crude, and it can be unintuitive.
As I do it, all of these named, top-level entities:
functions
variables
named constants
enumerations
user-defined types and records
macros
are handled in the same way: stick 'global' or 'export' in front of the definitions, and it makes the names visible outside the module.
I was asking if the same applied to other languages.
This is that 215Kloc project? 300s (approx time for single core) is
pretty slow for that. What is the problem here; the language being hard
to process?
In addition compiler uses linear search in symbol table.
Actually I use linear searching extensively too. Except in the global
symbol table which is a hash-table. So lexical lookups use that, but resolving a generic identifier into a special one uses linear methods.
Generally it is still very fast because the lists are short. But some programs could cause it trouble.
Getting rid of recursion and implied by this multiple re-compilation
probably would give 3-5 times faster compilation (and hopefully
would eliminate really bad cases). If things could be simplified
so that hash table is enough, that probably would double speed.
Once that is handled other things would requre attention. But
it does not make much sense to fight for small speedups in other
places when biggest issues (that is recursive compilation and
linear search are unresolved). And that require substantial
rework. Even after rework compiler is unlikly to be as fast as
yours. Namely overloading and type inference
So, is type inference (eg. Hindley-Milner) inherently slow?
Also, compiler is using higher level data structures that
has its own costs. Parsing this 215K wc lines takes 1 second,
while it should be possible to do this in 0.1 second. But
again, before other issues are handled relative gain from
faster parser is too small to bother (I may speed up parser
if I need to reorganize it to implement some extra feature).
BTW: It is hard to compare compile speed in longer time because
machines got faster. But when I started my work build needed
something like 2.5 hours,
I would never have tolerated that. I considered it part of my job to
make sure my tools stayed productive whatever the hardware.
When I need to look at preprocessed files I frequently see a lot of
blank lines, so I am not surprised that headers get smaller. At first
glance 4000 lines after preprocessing looks too small, but maybe it
is real.
I can tell you that 1/3 of my processing type is to do with comments.
(After stripping them it took 2/3 as long.) So I might look at how efficiently that is done, for a start. But there is a lot of mystery still.
This output is not enough to use as a new compact header; it will need
#defines etc that have been stripped. But it shows the core of the API
is quite small. I will investigate further.)
At some time I did a little work on Mac OS API. There was about
220 tousends symbols, of which something like 200 tousends where
various magic constants. So, maybe bulk od SDL3 headers is due
to defiend constants?
From the end result (via a tool to convert to my bindings), there are
about 500 #defines and 1100 enum names. But probably there are lots of duplicates in the headers, some may be in 'dead' blocks. And some
headers are processed more than once.
It's messy, but it seems a big downside of C's 'module' scheme!
And of course, all the work has to be repeated for each file that
includes SDK.h.
On 14/09/2026 08:41, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
A more typical problem is organising the functions, variables, types,
enums and tables of an application into multiple modules: what goes
where; what needs to be shared.
You may view interface as information about what needs to be shared,
but IMO there is more to this. In badly designed program a lot
must be shared. In well designed program and assuming that problem
domain is suitable for modularization sharing is quite limited.
And frequently is is possible to replace implementation part by
quite a different thing without affectiong correctness of the
program.
To make a concrete example, I needed simple varianat of regular
expressions. In principle I could call existing library via FFI, but
that had its own problems. Since the core algorithm is quite simple
I decided to roll my own. I ended with collection of 4 modules.
One module implements a single node of automation, second one
implements matching algorithm and build automation (that is graph
of nodes) from other data. Third module provides a higher level
abstractions, representing patterns build from simpler automatons
via boolean operations. Fourth module contains a parser which
converts textual patterns to internal representation, using
operations provided by earlier modules. Together this is 452
wc lines. One may be tempted to do this a single module, but
I think that what I did have better structure: first module
essentially defines data struture (or maybe I should say data
type) and in principle this could be part of the second module.
But having module means that some things are hidden and some
are exported in nicer form. So I do not consider having this
as a separtate module as a big deal, but I think that overall
thanks to this code is a little nicer. Second module implements
core algorithm. IMO is is nice that this code is not mixed
with other parts and also it is potentially reusable in the
future. Third module implements feature that I needed, it
is something that AFAIK is not supported by standard libraries
so I would need it even if I decided to scrap the first two
modules and replace them by FFI calls to some standard library.
The actual syntax of supported patterns is confined to the
fourth module. If I needed different syntax (possibly with
different featurs set) I can provide an alternative parser
module. As you later write those are "friendly" modules
designed to work together. But each of them have reasonably
well specified responsibilities. And since responsiblity
of each module is rather narrow, each of them is simple,
almost trivial. Functionality provided by this collection
of 4 modules is not very impressive, but less trivial than
each of the involved modules.
So let's say I implement this as four modules node.m, match.m,
patterns.m, parser.m.
Since they are really one unit, then anything that needs to be shared between them is marked 'global' to export, but see below.
How they are imported depends on how they are to be used. They could be casually added to the modules of my application. Then I add these lines
to its project info:
module node
module match
module patterns
module parser
I can access its exported names directly without a qualifier as F(), or
I can use mode.F(), parser.F() etc depending on where it lives.
This forms part of my app and will be compiled as part of the
whole-program build.
However this is too casual: there is no real connection between it my
and my own app. I can also see names shared across the four modules
which are meant to be private (and it can access names in /my/ app!).
So probably this would be made into its own subprogram. It will need its
own module info, either added to one designated module, or more usually
in a dedicated lead module, say called rex.m, which contains those same lines:
module node
module match
module patterns
module parser
A further change is that those 'global' attributes need to be changed to 'export' to make them visible outside.
Now, in my app, I add this one line to the project info:
import rex
I can now still call F(), or qualify it as rex.F(); I no longer need to
know where F exists. (However, exported names must be unique; I can't
use both node.F() and match.F().)
'rex' and its modules can no longer see my apps global names. Its source files however will still be compiled into my app.
So that's two approaches to such a library that my scheme allows for.
There is a third one: to put the library into its own DLL.
The start point is the second approach, with rex.m and the four modules.
But now I build it as a separate binary like this:
mm -dll rex # creates rex.dll
In my app, it now needs separate declarations which look like this:
importdll rex =
... FFI declarations for rex's exports
end
This is not project info and can located anywhere. The declarations can
be created in several ways:
* Manually, but then they must keep track of any changes in the library
* If rex was a C library, I can use a tool to do most of the work of creating this import block from a C header.
* If written in my language, then 'mm -dll rex' will also write a
suitable import module containing that 'importdll' block, either called rex_lib.m or rex.q depending on which of my two languages was
configured. Then in my app's project info I can write one of:
module rex_lib # (using rex.m would overwrite the rex.m original)
module rex
That exported function can still called as F(), or as rex_lib.F() or rex.F().
I still build my app as 'mm app'; it will automatically pull in rex.dll.
What it doesn't do at the minute is write docs: collate doc-info from
the exported module and write into a file to act as documentation.
I used to have support for such doc-strings but dropped it due to lack
of use.
To summarise using this example 4-module library:
(1) Add 4 'module' directives to my own app
(2) Put them into rex.m then add 'module rex' to my app
(3) Put them into rex.m, build as DLL, then add 'module rex/rex_lib'
to my app
This last will probably most appeal to you and corresponds most closely
to your discrete interfaces. However it is more chaotic since it needs a separate set of declarations from from the definitions in the 4 modules.
bart <bc@freeuk.com> wrote:[...]
I have a lot of experience of dynamic languages that ran at customer
sites. Such language errors were extremely rare.
It's not that I did extensive testing, but with normal development over
a longish time-frame (eg. 1-2 years), you will uncover a lot of bugs!
I would say that normally it is rare to discover such bugs. Simply
your program happily runs for 20 years and then you suddenly discover
that some strange but valid input causes a crash.
[...]
IIUC in commercial settings in the past there were tendency to
disregard such problem ("if customer can not see a problem, then
software is good enough").
[...]
At some stages I used multiple machines, when one machine was
doing build I was doing something else on other machine.
[...]
[...] But AFAICS in
commercial setting I could not justify time spend on speeding
up build: "present value" of differce between effort and
gain is negative.
On 2026-09-14 22:54, David Brown wrote:
On 14/09/2026 20:21, tTh wrote:
On 9/14/26 18:11, David Brown wrote:
I simply always use braces, regardless of whether or not
the clause contains a single statement or a compound statement.
That's always a safe choice, but some C programmers prefer to use
fewer braces.-a A compromise is to insist on always using braces if
there is an "else" clause (in both the "if" and "else" parts), or at
the very least, to do so if there are nested "if" statements.
-a-a-a About braces, I always use them except in one case :
-a-a-a when the code fragment is on the same line as the if.
-a-a-a if (retval) fprintf(stderr, "retval is %d\n", retval);
I have the habit to regularly use a line-break and indentation here.
-a-a-a if (retval)
-a-a-a-a-a-a-a fprintf(stderr, "retval is %d\n", retval);
-a-a-a I think it's dangerous, but for some little things
-a-a-a like my sample, it make things clearer for me.
I wouldn't exactly call it "dangerous". But I think one should apply
any means and habits that avoid the errors that one personally knows
to make.
For collaborative work we therefore had a rule to always use braces.
I do the same, but restrict it to simpler statements.
"Simpler" is a matter of taste and subjective judgement here -
"return;", "break;", "continue;" are all "simple".-a A short assignment
is "simple".-a For a longer printf, I'd usually use braces.-a If the
statement is too long to be comfortable on one line, or may reasonably
become so in future modifications, then I'd have braces.
For specific "simple statements" like early exits I usually even add
an empty line after it;
-a-a-a if (!precond)
-a-a-a-a-a-a-a return special;
-a-a-a regular_process;
For 'if'-cascades with "simple statements" I also omit the line-break, though. As you say it's also about any specific code being comfortably represented.
Being a personal preference one should use a style to minimize problems
in one's own style, or follow the company standards where collaborative
work is expected.
On 14/09/2026 23:56, Janis Papanagnou wrote:
[...]
I have the habit to regularly use a line-break and indentation here.
-a-a-a-a if (retval)
-a-a-a-a-a-a-a-a fprintf(stderr, "retval is %d\n", retval);
To my eyes (and I fully appreciate that this kind of thing is highly subjective), that is the worst you can do.
-aThat's how you end up with
mistakes like this, after lines are added, removed or changed during
code maintenance :
-a-a-a-aif (...)
-a-a-a-a-a-a-a goto fail;
-a-a-a-a-a-a-a goto fail;
[...]
For specific "simple statements" like early exits I usually even add
an empty line after it;
-a-a-a-a if (!precond)
-a-a-a-a-a-a-a-a return special;
-a-a-a-a regular_process;
The empty line here helps, I think, and reduces some risk of error.
On 2026-09-15 09:07, David Brown wrote:
On 14/09/2026 23:56, Janis Papanagnou wrote:
[...]
I have the habit to regularly use a line-break and indentation here.
-a-a-a-a if (retval)
-a-a-a-a-a-a-a-a fprintf(stderr, "retval is %d\n", retval);
To my eyes (and I fully appreciate that this kind of thing is highly
subjective), that is the worst you can do.
Yes, you said that before. (But your example below doesn't quite fit.)
-aThat's how you end up with mistakes like this, after lines are added,
removed or changed during code maintenance :
Erm, no. - First, I never need to use 'goto' with my programming style.
And second, a 'goto' I'd handle like a 'return' (as seen in my example below); any "severe disruption" of the linear processing I'd indicate
by an empty line.
-a-a-a-a-aif (...)
-a-a-a-a-a-a-a-a goto fail;
-a-a-a-a-a-a-a-a goto fail;
[...]
For specific "simple statements" like early exits I usually even add
an empty line after it;
-a-a-a-a if (!precond)
-a-a-a-a-a-a-a-a return special;
-a-a-a-a regular_process;
The empty line here helps, I think, and reduces some risk of error.
It indeed does. (And certainly works for me.)
Janis
On 15/09/2026 09:41, Janis Papanagnou wrote:
On 2026-09-15 09:07, David Brown wrote:
On 14/09/2026 23:56, Janis Papanagnou wrote:
[...]
I have the habit to regularly use a line-break and indentation here.
-a-a-a-a if (retval)
-a-a-a-a-a-a-a-a fprintf(stderr, "retval is %d\n", retval);
To my eyes (and I fully appreciate that this kind of thing is highly
subjective), that is the worst you can do.
Yes, you said that before. (But your example below doesn't quite fit.)
-aThat's how you end up with mistakes like this, after lines are
added, removed or changed during code maintenance :
Erm, no. - First, I never need to use 'goto' with my programming style.
And second, a 'goto' I'd handle like a 'return' (as seen in my example
below); any "severe disruption" of the linear processing I'd indicate
by an empty line.
The example was not about "goto" itself.
[...] This resulted in one of the biggest security failures seen.
[...]
Now, the mistake also required other failures - failure in code review, failure to test properly, failure to use static error checking (gcc's "- Wmisleading-indent" would have spotted it), and general failure of the
IT world to put enough effort and resources into supporting such a
critical piece of software.
It is always thus when something like this
happens - multiple safeguards must fail.-a A safe coding style - which
this is not - would have been an additional safeguard.-a You can, of
course, put different emphasis on different aspects of these safeguards
- maybe you don't need any static error checking if you have good enough testing, and you don't need a good coding style if code reviews are
careful enough.-a But I believe it always makes sense to make good use of the easy and cheap guards - basic static error checking and good coding style.
Safe coding styles do not in any sense eliminate bugs or guarantee
correct code, but they reduce the risk of certain classes of code bugs
and code misunderstandings.
Having a style where indentation sometimes
means blocks, and sometimes does not, is a /bad/ idea for code safety because it increases the cognitive load to interpret the code.
bart <bc@freeuk.com> wrote:
I have a lot of experience of dynamic languages that ran at customer
sites. Such language errors were extremely rare.
It's not that I did extensive testing, but with normal development over
a longish time-frame (eg. 1-2 years), you will uncover a lot of bugs!
I would say that normally it is rare to discover such bugs. Simply
your program happily runs for 20 years and then you suddenly discover
that some strange but valid input causes a crash.
Let me mention that one of speed improvements is quite recent.
I spent semething like 2-3 days to shorten real time of parallel
build from about 60s to 45s (that involves more than compilation,
so is longer than just compile time). Comparing the two things
it seems that I will need about 5000 builds to recover time
that I spent on speeding up the build. Given that I am doing
some hundreds of builds per year,
On 2026-09-15 10:22, David Brown wrote:
On 15/09/2026 09:41, Janis Papanagnou wrote:
On 2026-09-15 09:07, David Brown wrote:
On 14/09/2026 23:56, Janis Papanagnou wrote:
[...]
I have the habit to regularly use a line-break and indentation here. >>>>>
-a-a-a-a if (retval)
-a-a-a-a-a-a-a-a fprintf(stderr, "retval is %d\n", retval);
To my eyes (and I fully appreciate that this kind of thing is highly
subjective), that is the worst you can do.
Yes, you said that before. (But your example below doesn't quite fit.)
-aThat's how you end up with mistakes like this, after lines are
added, removed or changed during code maintenance :
Erm, no. - First, I never need to use 'goto' with my programming style.
And second, a 'goto' I'd handle like a 'return' (as seen in my example
below); any "severe disruption" of the linear processing I'd indicate
by an empty line.
The example was not about "goto" itself.
I'm well aware that your 'goto' example was badly chosen, and that
there are other examples that illustrate your point more accurately.
(But I was also aware what "problems" you actually have in mind; I
know the mindset, there was actually no need to be that verbose. :-)
[...] This resulted in one of the biggest security failures seen.
Obviously a failure in two ways; having insufficient QA measures,
and programmers that had problems with the necessary attention and experience.
(Adding after I read your text below: Or maybe subjective problems
with the "abstract picture" one has about the syntactic elements.)
[...]
Now, the mistake also required other failures - failure in code
review, failure to test properly, failure to use static error checking
(gcc's "- Wmisleading-indent" would have spotted it), and general
failure of the IT world to put enough effort and resources into
supporting such a critical piece of software.
Yes.
It is always thus when something like this happens - multiple
safeguards must fail.-a A safe coding style - which this is not - would
have been an additional safeguard.-a You can, of course, put different
emphasis on different aspects of these safeguards - maybe you don't
need any static error checking if you have good enough testing, and
you don't need a good coding style if code reviews are careful
enough.-a But I believe it always makes sense to make good use of the
easy and cheap guards - basic static error checking and good coding
style.
Right. - But don't forget that "spurious means" to tackle a topic is
as well a source of obfuscating information; I certainly won't judge
whether one or the other is in any (absolute or relative) way "better",
but it certainly reminds me the recurring "if(a=5) vs. if(5=a)" debate
to "ensure" "programming safety".
Safe coding styles do not in any sense eliminate bugs or guarantee
correct code, but they reduce the risk of certain classes of code bugs
and code misunderstandings.
Sure. - The point is; is there an objectively safe style here?
I think there's subjective styles that helps some and annoys others.
I don't think it makes sense to argue about that. (Especially given
that we both have many decades of experience in the area.)
Having a style where indentation sometimes means blocks, and sometimes
does not, is a /bad/ idea for code safety because it increases the
cognitive load to interpret the code.
I disagree. - Your statement makes assumptions about a subjective idea
of two different things. I can agree only insofar as accepting that you
have that picture in mind, and with that picture it seems inconsistent
(or something like that) to you. So I accept it's "cognitive load" for
you. (While spurious syntax elements is "cognitive load" for me.)
On 15/09/2026 02:48, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
I have a lot of experience of dynamic languages that ran at customer
sites. Such language errors were extremely rare.
It's not that I did extensive testing, but with normal development over
a longish time-frame (eg. 1-2 years), you will uncover a lot of bugs!
I would say that normally it is rare to discover such bugs. Simply
your program happily runs for 20 years and then you suddenly discover
that some strange but valid input causes a crash.
Errors in a dynamic program would be trapped and reported, rather than
cause a crash (unless it was a deeper within the implementation).
Then that dynamic module would terminate, but the app was still running
and the user could do something else.
More common were bugs in the main native code app, and with that in
mind, we had an auto-save feature to recover the user's data if those
caused a crash, but they may have lost some minutes' work.
(Funnily enough, one of my scripting language apps, which was a custom
POS system, ran daily for at least 23 years, in an environment with
frequent power cuts).)
Let me mention that one of speed improvements is quite recent.
I spent semething like 2-3 days to shorten real time of parallel
build from about 60s to 45s (that involves more than compilation,
so is longer than just compile time). Comparing the two things
it seems that I will need about 5000 builds to recover time
that I spent on speeding up the build. Given that I am doing
some hundreds of builds per year,
Per year? I could easily do hundreds of builds per day!
Essentially my builds are instant, certainly for my projects of up to
50Kloc where they finish within 0.1s. This is important for
whole-program compilation where you can't choose to compile just one modified module.
I think for me the costs of those language features - overloading
functions and type inference, and what sounds like some kind of
inheritance - would be just too high. I wouldn't have them, or would
make compromises, or see if I could devise my own solutions.
It sounds like you inherited your language.
bart <bc@freeuk.com> wrote:
Technically, with 45s per build I could do few hundreds build a
day.
In the past I was teaching programming in Turbo Pascal. I remember
student pressing "compile" key after typing a few characters.
This made some sense, compilation was essentially immediate and
gave feedback, that is presence or absence of syntax errors. But
I can enter somewhat bigger piece of code without making syntax
error (I make a lot of silly errors, but not so much as to compile
every few characters). And incremental compilation is reasonably
fast. Also syntax error are much faster than succesful compilation.
I think for me the costs of those language features - overloading
functions and type inference, and what sounds like some kind of
inheritance - would be just too high. I wouldn't have them, or would
make compromises, or see if I could devise my own solutions.
Faster compiler probably would speed up my work by few percent. Main
gain probably would be that I could use slower computer. OTOH
I would guesstimate that language features increase productivity
by 50% or more.
On 15/09/2026 15:54, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
But suppose, somehow, a full build of your whole application could be
done in zero time or near enough.
bart <bc@freeuk.com> writes:
On 15/09/2026 15:54, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
But suppose, somehow, a full build of your whole application could be
done in zero time or near enough.
Figure out how to build linux (a C application) in zero time and get back to us.
On 15/09/2026 15:54, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
Technically, with 45s per build I could do few hundreds build a
day.
It would take up half your day!
I think for me the costs of those language features - overloading
functions and type inference, and what sounds like some kind of
inheritance - would be just too high. I wouldn't have them, or would
make compromises, or see if I could devise my own solutions.
Faster compiler probably would speed up my work by few percent. Main
gain probably would be that I could use slower computer. OTOH
I would guesstimate that language features increase productivity
by 50% or more.
So you've adapted to what you have and learned how to work effectively
with it.
But suppose, somehow, a full build of your whole application could be
done in zero time or near enough.
You wouldn't need parallel processing. You wouldn't have to bother with incremental compilation. You wouldn't have to set up isolated tests in
order to have smaller, faster-to-build programs.
Your way of working would change.
This is pretty much how it works with dynamic languages that are run
from source. And some are using JIT methods on static languages
(although tricky language features could still affect the front-end compiler).
I think that is generally considered to be a productive approach.
So you've adapted to what you have and learned how to work effectively
with it.
On 15/09/2026 22:56, bart wrote:
So you've adapted to what you have and learned how to work effectively
with it.
You are forever trying to claim that this is somehow a bad thing.
Most of us regulars here in comp.lang.c are not omnipotent, nor do we
have unlimited time.-a We prefer to spend our time and effort on
particular focused tasks - usually the tasks we get paid to do, or alternatively the tasks we enjoy doing.
We cannot do /everything/ - there is not the time.-a I'm sure most of us, deep down, know that we could write a better C compiler than gcc or
clang, and design a better language than C.
But we don't have the time or inclination.-a We don't have the need.-a The tools that exist already do the job we need.-a We find convenient ways to make the whole process more efficient, and get on with the programming
we actually want to do.-a (And we don't have to look far to find these methods - millions of developers use build systems and decent editors.
We are not teenagers with a ZX Spectrum in our bedrooms, we are professionals who use professional tools.)
What do you really want people here to do?-a Should we intentionally make our lives difficult by doing serial clean rebuilds all the time, and use
MS Notepad as an editor, just so that we too can feel the pain and
suffering you feel?-a Should we stop all our work, give up our jobs, and write our own C compilers?-a Should we spend have our life whining and moaning in Usenet groups and other online forums about how terrible C is
and how bad compilers are, complaining to people who have no influence
over any of it and can work fine with the language and tools?
Or do you want us to bow down to you and exclaim our undying admiration
for your language and compilers?
I presume you are not interested in hearing that we too would be happyWhat I would like is for somebody to actually admit that there might be
if compilers were faster, or that we too think that C has quirks,
oddities, and aspects that we would prefer were different - if so, you'd have switched the broken record a couple of decades ago.
So what would actually make you /happy/ here, and would let you change
the subject?
On 16/09/2026 08:08, David Brown wrote:
On 15/09/2026 22:56, bart wrote:
So you've adapted to what you have and learned how to work
effectively with it.
You are forever trying to claim that this is somehow a bad thing.
Most of us regulars here in comp.lang.c are not omnipotent, nor do we
have unlimited time.-a We prefer to spend our time and effort on
particular focused tasks - usually the tasks we get paid to do, or
alternatively the tasks we enjoy doing.
We cannot do /everything/ - there is not the time.-a I'm sure most of
us, deep down, know that we could write a better C compiler than gcc
or clang, and design a better language than C.
But we don't have the time or inclination.-a We don't have the need.
The tools that exist already do the job we need.-a We find convenient
ways to make the whole process more efficient, and get on with the
programming we actually want to do.-a (And we don't have to look far to
find these methods - millions of developers use build systems and
decent editors. We are not teenagers with a ZX Spectrum in our
bedrooms, we are professionals who use professional tools.)
What do you really want people here to do?-a Should we intentionally
make our lives difficult by doing serial clean rebuilds all the time,
and use MS Notepad as an editor, just so that we too can feel the pain
and suffering you feel?-a Should we stop all our work, give up our
jobs, and write our own C compilers?-a Should we spend have our life
whining and moaning in Usenet groups and other online forums about how
terrible C is and how bad compilers are, complaining to people who
have no influence over any of it and can work fine with the language
and tools?
Or do you want us to bow down to you and exclaim our undying
admiration for your language and compilers?
No. But you don't need actively dislike them either or be so patronising about them.
My language is probably the nearest to C in this class and level of language, while also being very different in look and feel. It would be foolish to just dismiss it.
What I would like is for somebody to actually admit that there might be
I presume you are not interested in hearing that we too would be happy
if compilers were faster, or that we too think that C has quirks,
oddities, and aspects that we would prefer were different - if so,
you'd have switched the broken record a couple of decades ago.
So what would actually make you /happy/ here, and would let you change
the subject?
a problem instead of just brushing it under the carpet.
What I would like is to know that there is somebody out there who is
keeping on top of inefficiencies and checking that a simple task doesn't take an inordinate and disproportionate amount of resources to do.
I'm not saying that /you/ should do it or most who post here. You are
just the users who have to work with what's available, eg. by applying
more hardware resources and more ingenuity.
Even WH has said they have worked at improving the throughput of their
tools (although that was not for C).
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it,
those headers are grossly inefficient.
Maybe you don't think this is interesting or relevant or you think it is
a waste of time. But if someone decided to add this to your favourite compiler I bet you would use it!
In this case, it would reduce header code that needs to be processed /
per module/, by some 99%, not 95%.
Note that this is the same sort of principle as gcc's precompiled
headers. But that doesn't simplify the headers at all; just pre-
tokenises or something. The 3.6MB of SDL3 headers turn into one giant
30MB file. My approach would reduce them to one file of perhaps 0.2MB.
On 16/09/2026 08:08, David Brown wrote:
On 15/09/2026 22:56, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it,
those headers are grossly inefficient.
That is something that could be partly be tackled by the people who distribute the header files, but more could also be done by those who
create the tools.
For example:
* There are 86 files/82K lines of headers, counted statically, but
nearly 500 dynamic #includes are done, scanning or skipping over half a million lines of declarations
* Yet they contain only about 4000 lines of actual information necessary
to compile a program that uses that library. This is 1% of the lines
that are scanned.
* For a start, half the source is comments. Why are comments even needed
for a header meant to be consumed by machine? There are surely separate docs! If they are for the SDL3 developers, then somebody using the
library *is not the developer*!
* There are thousands of /static/ conditional blocks (and a lot more encountered dynamically) all testing the same invariants over and over again.
For example, once it is established that the compiler is not __MSCVER__,
you don't need to test that (and to skip over blocks only relevant to
that platform) 100 more times.
So this could be done by recognising that a compact, streamlined API, dedicated to a particular platform (and maybe compiler) would be far better.
But because that would mean many versions (more than the number of
DLLs/.sos for different targets for example), this sounds like a
compiler task.
Most compilers already have an -E option to generate preprocessed source code. What is needed is say a -H option which does not discard
information that a compiler still needs, if using an AOT-preprocessed header.
Mostly this will be #defines. So it would not be too difficult. (Just
tricky as SDL3 uses lots of #undefines too.)
Maybe you don't think this is interesting or relevant or you think it is
a waste of time. But if someone decided to add this to your favourite compiler I bet you would use it!
In this case, it would reduce header code that needs to be processed
/per module/, by some 99%, not 95%.
Note that this is the same sort of principle as gcc's precompiled
headers. But that doesn't simplify the headers at all; just
pre-tokenises or something. The 3.6MB of SDL3 headers turn into one
giant 30MB file. My approach would reduce them to one file of perhaps 0.2MB.
On 16/09/2026 12:21, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it,
those headers are grossly inefficient.
So what?
I did the timings there.-a The savings achievable from "instant" headers would be tiny fractions of a second.
You are utterly obsessed with something that is utterly irrelevant in
most cases (again, we are talking about C).
bart <bc@freeuk.com> wrote:
On 16/09/2026 08:08, David Brown wrote:
On 15/09/2026 22:56, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it,
those headers are grossly inefficient.
That is something that could be partly be tackled by the people who
distribute the header files, but more could also be done by those who
create the tools.
For example:
* There are 86 files/82K lines of headers, counted statically, but
nearly 500 dynamic #includes are done, scanning or skipping over half a
million lines of declarations
Do SDL3 use include guards? The expected convention is that header
looks like:
#ifndef XXXXXX
#define XXXXXX
...
#endif
with possibly some trivial variation. That first non-comment thing
in a header is a test and the whole body is inside a conditional.
Assuming that SDL3 is doing this (and if not you should complain to
them), then your compiler could recognize this pattern and skip
the header when it is included second time. For this you need to
recognize when two paths lead to the same file, recognize the test
and check that test is indeed false when doing second include.
Some headers may be intentionally included multiple times, but
with include guards you should be able to include most files just
once. IIUC both GCC and TCC handle this.
* Yet they contain only about 4000 lines of actual information necessary
to compile a program that uses that library. This is 1% of the lines
that are scanned.
* For a start, half the source is comments. Why are comments even needed
for a header meant to be consumed by machine? There are surely separate
docs! If they are for the SDL3 developers, then somebody using the
library *is not the developer*!
If you are developing an application you sometimes need to look
at content of the headers. Comments presumably make it easier to
understand the headers. Concerning documentation, this is derived
thing, which hopefully agrees with the sources, but actual source
is the ultimate truth and looking at source is more reliable (even if
harder) than looking at documentation.
* There are thousands of /static/ conditional blocks (and a lot more
encountered dynamically) all testing the same invariants over and over
again.
For example, once it is established that the compiler is not __MSCVER__,
you don't need to test that (and to skip over blocks only relevant to
that platform) 100 more times.
So this could be done by recognising that a compact, streamlined API,
dedicated to a particular platform (and maybe compiler) would be far better. >>
But because that would mean many versions (more than the number of
DLLs/.sos for different targets for example), this sounds like a
compiler task.
I guess that smart compiler could create streamlined version of headers.
That could be done when istalling the library. Or maybe the compiler
could have a cache of streamline versions and use cached result
when it is newer than library headers. As saying goes, this is
small matter of programming. So somebody needs to implement it.
And take into account that this should work without need of cooperation
of all involved parties. Namely, if one compiler implement needed
features, there is no warranty that other will do the same. And
without support in all compilers library authors normally would
write code for the lowest common denominator, that is assume no
special support (and the same for packagers). You can not expect
special action from users, most of them will just do what they
learned as "standard commands" and "let computer do the rest"
regardless how much CPU time it takes.
Most compilers already have an -E option to generate preprocessed source
code. What is needed is say a -H option which does not discard
information that a compiler still needs, if using an AOT-preprocessed
header.
Mostly this will be #defines. So it would not be too difficult. (Just
tricky as SDL3 uses lots of #undefines too.)
Combine '#undefine' with conditionals unknown at preprocessing time
and the problem becomes more interesting. IIUC developers of major
comilers gave up at this point.
Maybe you don't think this is interesting or relevant or you think it is
a waste of time. But if someone decided to add this to your favourite
compiler I bet you would use it!
In this case, it would reduce header code that needs to be processed
/per module/, by some 99%, not 95%.
Note that this is the same sort of principle as gcc's precompiled
headers. But that doesn't simplify the headers at all; just
pre-tokenises or something. The 3.6MB of SDL3 headers turn into one
giant 30MB file. My approach would reduce them to one file of perhaps 0.2MB.
IIUC GCC precompiled header is simplified quite a lot, for example
all preprocessor conditonals are removed and replaced by resulting
expansion. Size may be just consequence of how this works. IIUC
GCC just dump memory containing internal representation of content
if the header. Given that modern machines have high memory bandwidth, loading it is pretty efficient.
You mentioned 4000 nontivial lines, which probably means 4000 declarations. Internally GCC represents this as tree nodes and rather conservative
estimate is that GCC needs 3 nodes per declaration. GCC tree nodes
need probably about 100 bytes each (they contain several pointers),
so that alone would imply about 1MB.
GCC now prints rather detailed information about includes when printing
error messages, so there must be enough additional information
to track back result of expansion to the sources. And given that
GCC uses memory dump, it is likely to contain some unneded garbage.
At first glance 30 MB looks like a lot, but in advanced compiler
you need a lot of information. And there is always a compromise:
storing info means that it is "immediately" available, recomputing
means that you can avoid memory acceses (which are expensive if
you miss the cache). IIUC a lot of effort of GCC developers went
into recomputing what can be cheaply recomputed, using packed
representations and discarding not needed information. But
a lot needs to be stored to avoid making GCC slower than it is.
And the dump approach was chosen as the fastest one.
On 16/09/2026 12:47, David Brown wrote:
On 16/09/2026 12:21, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for
it, those headers are grossly inefficient.
So what?
I did the timings there.-a The savings achievable from "instant"
headers would be tiny fractions of a second.
I don't really trust your figures. I've today done a mock-up of a streamlined header for SDL3.
In this form it is a file of just over 6K lines (probably there's stuff
that doesn't need to be there, but it will suffice for this test).
So here are my figures for a single 'hello-world' test for SDL3:
-a-a-a-a-a-a-a-a sdl.h-a-a-a-a-a-a-a-a-a-a-a newsdl.h-a-a-a-a-a-a (normal vs compact)
gcc-a-a-a-a-a 0.88 seconds-a-a-a-a 0.34 seconds
gcc-a-a-a-a-a 0.24 seconds-a-a-a-a 0.22 seconds-a-a (using precompiled headers)
bcc-a-a-a-a-a 0.17 seconds-a-a-a-a 0.04 seconds
gcc-a-a-a-a-a 0.4-a seconds-a-a-a-a 0.08 seconds-a-a (Linux/real time)
And this is the test for 50 files each including one of those headers:
-a-a-a-a-a-a-a-a sdl.h-a-a-a-a-a-a-a-a-a-a newsdl.h-a-a-a-a-a-a-a (normal vs compact)
gcc-a-a-a-a-a 38 seconds-a-a-a-a-a 6-a-a seconds-a-a-a-a (gcc *.c) bcc-a-a-a-a-a-a 8 seconds-a-a-a-a-a 1.7 seconds-a-a-a-a (bcc needs 50 invocations)
That looks quite worthwhile to me.
Another advantage is that the header
is a single file that is easy to use, copy, bundle etc. You don't need -
I options.
You are utterly obsessed with something that is utterly irrelevant in
most cases (again, we are talking about C).
Let me ask you: how big, bloated and inefficient does such a header need
to be for you to think there is a problem? How much does it need to slow down the build process?
Or would you invest in a server farm first before you will admit there
is a problem? Or is that only before you will admit it to me?
On 16/09/2026 14:16, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
On 16/09/2026 08:08, David Brown wrote:
On 15/09/2026 22:56, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it,
those headers are grossly inefficient.
That is something that could be partly be tackled by the people who
distribute the header files, but more could also be done by those who
create the tools.
For example:
* There are 86 files/82K lines of headers, counted statically, but
nearly 500 dynamic #includes are done, scanning or skipping over half a
million lines of declarations
Do SDL3 use include guards? The expected convention is that header
looks like:
#ifndef XXXXXX
#define XXXXXX
...
#endif
with possibly some trivial variation. That first non-comment thing
in a header is a test and the whole body is inside a conditional.
Guards are used, but conditional must still be skipped, not that simple
as a closing '#endif' for example must match, or some could be inside comments.
--Assuming that SDL3 is doing this (and if not you should complain to
them), then your compiler could recognize this pattern and skip
the header when it is included second time. For this you need to
recognize when two paths lead to the same file, recognize the test
and check that test is indeed false when doing second include.
On 16/09/2026 12:47, David Brown wrote:
On 16/09/2026 12:21, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it,
those headers are grossly inefficient.
So what?
I did the timings there.-a The savings achievable from "instant" headers
would be tiny fractions of a second.
I don't really trust your figures. I've today done a mock-up of a >streamlined header for SDL3.
In this form it is a file of just over 6K lines (probably there's stuff
that doesn't need to be there, but it will suffice for this test).
So here are my figures for a single 'hello-world' test for SDL3:
sdl.h newsdl.h (normal vs compact)
gcc 0.88 seconds 0.34 seconds
bart <bc@freeuk.com> wrote:
On 16/09/2026 14:16, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
On 16/09/2026 08:08, David Brown wrote:
On 15/09/2026 22:56, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it, >>>> those headers are grossly inefficient.
That is something that could be partly be tackled by the people who
distribute the header files, but more could also be done by those who
create the tools.
For example:
* There are 86 files/82K lines of headers, counted statically, but
nearly 500 dynamic #includes are done, scanning or skipping over half a >>>> million lines of declarations
Do SDL3 use include guards? The expected convention is that header
looks like:
#ifndef XXXXXX
#define XXXXXX
...
#endif
with possibly some trivial variation. That first non-comment thing
in a header is a test and the whole body is inside a conditional.
Guards are used, but conditional must still be skipped, not that simple
as a closing '#endif' for example must match, or some could be inside
comments.
Of course you need to parse the file at least one time. But once
you parsed file once and checked that it has correct include guard
Assuming that SDL3 is doing this (and if not you should complain to
them), then your compiler could recognize this pattern and skip
the header when it is included second time. For this you need to
recognize when two paths lead to the same file, recognize the test
and check that test is indeed false when doing second include.
bart <bc@freeuk.com> writes:
On 16/09/2026 12:47, David Brown wrote:
On 16/09/2026 12:21, bart wrote:
The recent example of those SDL3 headers is a good one. Even without
needing to change the C language, or have super-fast compilers for it, >>>> those headers are grossly inefficient.
So what?
I did the timings there.-a The savings achievable from "instant" headers >>> would be tiny fractions of a second.
I don't really trust your figures. I've today done a mock-up of a
streamlined header for SDL3.
In this form it is a file of just over 6K lines (probably there's stuff
that doesn't need to be there, but it will suffice for this test).
So here are my figures for a single 'hello-world' test for SDL3:
sdl.h newsdl.h (normal vs compact)
gcc 0.88 seconds 0.34 seconds
That seems to be "tiny fractions of a second" to me. Pointless
optimization for no appreciable return, almost in the noise.
On 16/09/2026 16:58, Waldek Hebisch wrote:<snip>
bart <bc@freeuk.com> wrote:
Every one of those has a guard. So, does that mean that the body of >'SDL_stdinc.h' for example should only ever be encountered once?
On 16/09/2026 18:33, Scott Lurndal wrote:
bart <bc@freeuk.com> writes:
On 16/09/2026 12:47, David Brown wrote:
On 16/09/2026 12:21, bart wrote:
The recent example of those SDL3 headers is a good one. Even without >>>>> needing to change the C language, or have super-fast compilers for it, >>>>> those headers are grossly inefficient.
So what?
I did the timings there.-a The savings achievable from "instant" headers >>>> would be tiny fractions of a second.
I don't really trust your figures. I've today done a mock-up of a
streamlined header for SDL3.
In this form it is a file of just over 6K lines (probably there's stuff
that doesn't need to be there, but it will suffice for this test).
So here are my figures for a single 'hello-world' test for SDL3:
sdl.h newsdl.h (normal vs compact)
gcc 0.88 seconds 0.34 seconds
That seems to be "tiny fractions of a second" to me. Pointless
optimization for no appreciable return, almost in the noise.
This is for *one* C source file that contains little more than that
header. Typically there are multiple source files containing code of
their own that need compiling, and which might need there own header.
This is spending the best part of a second compiling 1300 function >signatures; this is 1980s machine speed.
You seem to be involved in developing new, higher performance
processors, and yet you're happy to all see all that power wasted
because people who write these bloated messes of code are so fucking lazy.
bart <bc@freeuk.com> writes:
On 16/09/2026 18:33, Scott Lurndal wrote:
bart <bc@freeuk.com> writes:
On 16/09/2026 12:47, David Brown wrote:
On 16/09/2026 12:21, bart wrote:
The recent example of those SDL3 headers is a good one. Even without >>>>>> needing to change the C language, or have super-fast compilers for it, >>>>>> those headers are grossly inefficient.
So what?
I did the timings there.-a The savings achievable from "instant" headers >>>>> would be tiny fractions of a second.
I don't really trust your figures. I've today done a mock-up of a
streamlined header for SDL3.
In this form it is a file of just over 6K lines (probably there's stuff >>>> that doesn't need to be there, but it will suffice for this test).
So here are my figures for a single 'hello-world' test for SDL3:
sdl.h newsdl.h (normal vs compact)
gcc 0.88 seconds 0.34 seconds
That seems to be "tiny fractions of a second" to me. Pointless
optimization for no appreciable return, almost in the noise.
This is for *one* C source file that contains little more than that
header. Typically there are multiple source files containing code of
their own that need compiling, and which might need there own header.
This is spending the best part of a second compiling 1300 function
signatures; this is 1980s machine speed.
Sure. Pull the other one. Early 80's compilers were often
limited by the speed of the input file (e.g. 300 lines-per-minute
compile speeds with a 300CPM card reader).
You seem to be involved in developing new, higher performance
processors, and yet you're happy to all see all that power wasted
because people who write these bloated messes of code are so fucking lazy.
Actually none of that power is wasted, because 99.999% of the available processor cycles are running compiled application code, not compiling code.
Compiling code is in the noise when considering modern workloads
on PCs or servers.
On 16/09/2026 16:58, Waldek Hebisch wrote:
In any case, my stats show that 400K lines are still part of normal processing, while 150K lines are skipped due to false conditional blocks.
Then I went back to one definition. This was fine, so the guards work.
In that case, what the hell is it spending 400000 lines processing?!
Some more investigation is needed via special tracking info added to my compiler. I will update this later.
On 16/09/2026 19:13, bart wrote:
On 16/09/2026 16:58, Waldek Hebisch wrote:
In any case, my stats show that 400K lines are still part of normal
processing, while 150K lines are skipped due to false conditional blocks.
Then I went back to one definition. This was fine, so the guards work.
In that case, what the hell is it spending 400000 lines processing?!
Some more investigation is needed via special tracking info added to
my compiler. I will update this later.
The problem was block- and line-comments. Their line-count was added to
the total for normal tokenising and not that for skipping over false
blocks, since both share the same comment routines.
And there are a lot of comments, including quite a few outside the
guards. I think 380K lines of comments are processed in all, including repeated passes through skipped blocks.
Anyway the guards work, although it may still be interesting to try your (WH's) suggestion to recognise a primary header guard and abort the file immediately.
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easy to
use, copy, bundle etc. You don't need - I options.
My test file contained a single line :
-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-agcc -c test.c
There are no -I options.
Single header files are not particularly exciting for a library like
this.
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easyMy test file contained a single line :
to use, copy, bundle etc. You don't need - I options.
-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using 'pkg-config'?
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
bart <bc@freeuk.com> writes:
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easyMy test file contained a single line :
to use, copy, bundle etc. You don't need - I options.
-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
On my system (Ubuntu 24.04), it's "/usr/include/SDL2". David's
system is probably similar.
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears
to work without invoking pkg-config. There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
For this test I wanted the simplest possible set up. If using it forMine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
Did you set that up manually? If you had two projects that use SDL,
would you have to create "./SDL3" folders in both of them?
On 17/09/2026 00:59, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 16/09/2026 16:53, David Brown wrote:On my system (Ubuntu 24.04), it's "/usr/include/SDL2". David's
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easyMy test file contained a single line :
to use, copy, bundle etc. You don't need - I options.
-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
system is probably similar.
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears
to work without invoking pkg-config. There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than
where it keeps its system headers, or how to set it up to look
permanently in certain places.
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
Did you set that up manually? If you had two projects that use SDL,
would you have to create "./SDL3" folders in both of them?
For this test I wanted the simplest possible set up. If using it for
real then I'd have to choose a centralised place to them, and impart
that info to the compiler.
This is where a single compact header can make things very easy:[snip]
On 16/09/2026 20:30, bart wrote:
On 16/09/2026 19:13, bart wrote:
On 16/09/2026 16:58, Waldek Hebisch wrote:
In any case, my stats show that 400K lines are still part of normal
processing, while 150K lines are skipped due to false conditional blocks. >>>
Then I went back to one definition. This was fine, so the guards work.
In that case, what the hell is it spending 400000 lines processing?!
Some more investigation is needed via special tracking info added to
my compiler. I will update this later.
The problem was block- and line-comments. Their line-count was added to
the total for normal tokenising and not that for skipping over false
blocks, since both share the same comment routines.
And there are a lot of comments, including quite a few outside the
guards. I think 380K lines of comments are processed in all, including
repeated passes through skipped blocks.
Anyway the guards work, although it may still be interesting to try your
(WH's) suggestion to recognise a primary header guard and abort the file
immediately.
I did try this via a bodge. It worked enough to eliminate most of the skipped comments. But it only made it (my C compiler) perhaps 20% faster
at processing the full SDL3 headers.
But skipping had already been tested to be not far off TCC, and so was comment scanning after some tweaks.
Using the compact header, made it 4 times as fast.
Conclusion: nothing really. C builds /could/ be made significantly
faster when using large libraries across lots of modules, without
needing to use workarounds, makefiles etc.
But not one person had anything positive to say about it, and two have
been hostile. A nice attitude.
And I've no idea where gcc would look for its headers, other than where
it keeps its system headers, or how to set it up to look permanently in certain places.
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than
where it keeps its system headers, or how to set it up to look
permanently in certain places.
-a-a You just have to read the fscking manual.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
-a-a But as everyone knows, learning new things isn't
-a-a part of your philosophy...
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easy to
use, copy, bundle etc. You don't need - I options.
My test file contained a single line :
-a-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using 'pkg-config'?
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
-a c:\sdl>wsl
-a root@DESKTOP-11:/mnt/c/sdl# cat s.c
-a #include <SDL3/SDL.h>
-a root@DESKTOP-11:/mnt/c/sdl# gcc -c s.c
-a s.c:1:10: fatal error: SDL3/SDL.h: No such file or directory
-a-a-a-a-a 1 | #include <SDL3/SDL.h>
-a-a-a-a-a-a-a |-a-a-a-a-a-a-a-a-a ^~~~~~~~~~~~
-a compilation terminated.
-a c:\sdl>gcc -c s.c
-a s.c:1:10: fatal error: SDL3/SDL.h: No such file or directory
-a-a-a-a-a 1 | #include <SDL3/SDL.h>
-a-a-a-a-a-a-a |-a-a-a-a-a-a-a-a-a ^~~~~~~~~~~~
-a compilation terminated.
Single header files are not particularly exciting for a library like
this.
Why not? stb_image works fine as a single header for example (which also contains the implementation). There are even sites that list single-
header libraries.
On 17/09/2026 00:59, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easyMy test file contained a single line :
to use, copy, bundle etc. You don't need - I options.
-a -a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a -a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
On my system (Ubuntu 24.04), it's "/usr/include/SDL2".-a David's
system is probably similar.
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears
to work without invoking pkg-config.-a There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than where
it keeps its system headers, or how to set it up to look permanently in certain places.
For this test I wanted the simplest possible set up. If using it for
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
Did you set that up manually?-a If you had two projects that use SDL,
would you have to create "./SDL3" folders in both of them?
real then I'd have to choose a centralised place to them, and impart
that info to the compiler.
This is where a single compact header can make things very easy:
-a c:\demo>dir
-a 16/09/2026-a 13:57-a-a-a-a-a-a-a-a-a-a 304,760 newsdl.h
-a 02/09/2026-a 17:24-a-a-a-a-a-a-a-a 5,380,925 SDL3.dll
-a 08/09/2026-a 19:25-a-a-a-a-a-a-a-a-a-a-a-a 2,196 test.c
test.c is my app; SDL3.dll is the library; and newsdl.h is the compacted interface. I could add one more file (bcc.exe) and I would have
everything needed to write some SDL programs.
I could copy them to a memory stick for example, whereas a gcc
installation is big and messy.
On 17/09/2026 01:36, bart wrote:
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easy
to use, copy, bundle etc. You don't need - I options.
My test file contained a single line :
-a-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
/usr/include/SDL2
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
"apt install libsdl2-dev", as I said.-a Linux distributions with other package managers will have a very similar method.
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
-a-a c:\sdl>wsl
-a-a root@DESKTOP-11:/mnt/c/sdl# cat s.c
-a-a #include <SDL3/SDL.h>
Do you not understand the difference between using <> and "" in #include directives?-a Roughly speaking (details are implementation-specific),
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears
to work without invoking pkg-config.-a There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than
where it keeps its system headers, or how to set it up to look
permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include paths.-a On
my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a/usr/local/include
-a/usr/include/x86_64-linux-gnu
-a/usr/include
End of search list.
For this test I wanted the simplest possible set up. If using it for
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
Did you set that up manually?-a If you had two projects that use SDL,
would you have to create "./SDL3" folders in both of them?
real then I'd have to choose a centralised place to them, and impart
that info to the compiler.
This is where a single compact header can make things very easy:
-a-a c:\demo>dir
-a-a 16/09/2026-a 13:57-a-a-a-a-a-a-a-a-a-a 304,760 newsdl.h
-a-a 02/09/2026-a 17:24-a-a-a-a-a-a-a-a 5,380,925 SDL3.dll
-a-a 08/09/2026-a 19:25-a-a-a-a-a-a-a-a-a-a-a-a 2,196 test.c
It is also where using a decent OS appropriate for the task is even easier.
test.c is my app; SDL3.dll is the library; and newsdl.h is the
compacted interface. I could add one more file (bcc.exe) and I would
have everything needed to write some SDL programs.
I could copy them to a memory stick for example, whereas a gcc
installation is big and messy.
I copy gcc setups between systems (albeit cross-compilation toolchains).
-aIt's easy with scp, sshfs, rsync, network shares, or a USB stick.-a The cheapest USB drives I can find from my usual IT supplier are 32 GB - the biggest toolchain I have is about 1.2 GB for everything.-a The same
applies to Linux and Windows.
On 17/09/2026 11:36, David Brown wrote:
On 17/09/2026 01:36, bart wrote:
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easy
to use, copy, bundle etc. You don't need - I options.
My test file contained a single line :
-a-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
/usr/include/SDL2
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
"apt install libsdl2-dev", as I said.-a Linux distributions with other
package managers will have a very similar method.
My gcc Windows installation (I went back to 14.2 as it includes clang), includes 3000 .h files. They can't all be for the standard library!
And 1200 .a archive files. So the approach there seems to be bundle
headers and binaries for every possible library. But apparently not big
ones like SDL.
So I guess, if I copied the SDL3 folder to the same location it keeps stdio.h, it would also work without "-I".
But only for this compiler, and not ideal when multiple headers are not tidily contained within their own folder.
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
-a-a c:\sdl>wsl
-a-a root@DESKTOP-11:/mnt/c/sdl# cat s.c
-a-a #include <SDL3/SDL.h>
Do you not understand the difference between using <> and "" in
#include directives?-a Roughly speaking (details are implementation-
specific),
Exactly, they are implementation-specific. Which can mean subtle
differences in locating a file when already deep inside a nested header.
My compiler actually treats <> and "" the same. That would normally be troublesome as a rogue "stdio.h" in the current path would override the system header.
But my compiler's system headers are embedded, and it will look there
first for /any/ input files. So that doesn't come up, unless I override that.
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using >>>>> 'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears
to work without invoking pkg-config.-a There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than
where it keeps its system headers, or how to set it up to look
permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include paths.
On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
On my C compiler I used to have an option -paths which listed all the include paths it would use.
I'm surprised that gcc, amongst it 1000s of options, doesn't have a dedicated one for this.
I think the approach you and others use now is to manage bloat and complexity, or somehow hide it away under additional layers, rather than
do anything about it.
On 17/09/2026 14:03, bart wrote:
My gcc Windows installation (I went back to 14.2 as it includes
clang), includes 3000 .h files. They can't all be for the standard
library!
As you well know, there is no such thing as a standard "gcc Windows" installation - there are multiple different packagings of gcc with
different choices of libraries and other tools.-a I am not sure it is
going to be very helpful if you say exactly which Windows gcc
installation you have, but there can be huge variations between them.
Do you not understand the difference between using <> and "" in
#include directives?-a Roughly speaking (details are implementation-
specific),
Exactly, they are implementation-specific. Which can mean subtle
differences in locating a file when already deep inside a nested header.
It's not /that/ difficult - I explained it in a single sentence.-a And
while it's "implementation-specific" according to the C standards, the
same simple, basic system is used by virtually all C compilers, and virtually all C code.-a Use "" for application-specific headers, and <>
for toolchain and system-installed headers.
On 17/09/2026 14:15, bart wrote:
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a place >>>>>> where gcc will look for it without being told? Does it involve using >>>>>> 'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears >>>>> to work without invoking pkg-config.-a There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than
where it keeps its system headers, or how to set it up to look
permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include paths.
On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
Yes.-a You might think it strange, but I only posted the relevant lines here.-a There were a total of 31 lines from that command - it was not difficult to spot the ones relevant to the include paths.
On my C compiler I used to have an option -paths which listed all the
include paths it would use.
I'm surprised that gcc, amongst it 1000s of options, doesn't have a
dedicated one for this.
I've never needed to see the list of paths before - they are all
entirely obvious and standard, and "just work".
-a Why would a compiler
need to add a specific option for something that is rarely required and where there is a simple and fairly obvious common option ("-v", or "-- verbose") to get the information?
On the other hand, slightly better code optimisation can mean longer
battery life, smaller and cheaper hardware, or more functionality in my program.
-a A bit more static error checking can mean bugs caught during
development and building, rather than during testing or after
deployment.
-a Better standards conformance can mean more portable code
and easier testing, support for newer standards and useful extensions
means more expressive, re-usable or maintainable source code, better optimisation, and more static error checking.
I do software development.
-a I don't spend my days copying compilers to
floppy disks or trying to run tools on systems from last century.-a I am
not interested in how quickly a compiler can compile an almost-empty
test file, 50 times sequentially.
-a I don't care if "bcc test.c" runs
faster than "gcc test.c" when "bcc test.c" is no more use to me than
"cat test.c > /dev/null".
On 17/09/2026 14:15, bart wrote:
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
Yes. You might think it strange, but I only posted the relevant lines
here. There were a total of 31 lines from that command - it was not difficult to spot the ones relevant to the include paths.
On my C compiler I used to have an option -paths which listed all the
include paths it would use.
I'm surprised that gcc, amongst it 1000s of options, doesn't have a
dedicated one for this.
I've never needed to see the list of paths before - they are all
entirely obvious and standard, and "just work". Why would a compiler
need to add a specific option for something that is rarely required and where there is a simple and fairly obvious common option ("-v", or "--verbose") to get the information?
On 17/09/2026 14:16, David Brown wrote:
On 17/09/2026 14:15, bart wrote:
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a place >>>>>>> where gcc will look for it without being told? Does it involve using >>>>>>> 'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears >>>>>> to work without invoking pkg-config.-a There may be more to it than >>>>>> that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than
where it keeps its system headers, or how to set it up to look
permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include paths.
On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
Yes.-a You might think it strange, but I only posted the relevant lines
here.-a There were a total of 31 lines from that command - it was not
difficult to spot the ones relevant to the include paths.
Always making excuses for gcc! I get 37 lines from it, but because many
are long and wrap, my screen shows over 85 lines, with 25 of them
scrolling off the top of the window. It looks a mess.
On my C compiler I used to have an option -paths which listed all the
include paths it would use.
I'm surprised that gcc, amongst it 1000s of options, doesn't have a
dedicated one for this.
I've never needed to see the list of paths before - they are all
entirely obvious and standard, and "just work".
Yeah, everything 'just works' for you. But if ever it reports it can't
find some header, you will want to know:
(1) The list of locations that it will be looking
(2) All the locations it's checked (this is not necessarily the
-a-a-a same list; see my last post)
-a Why would a compiler need to add a specific option for something
that is rarely required and where there is a simple and fairly obvious
common option ("-v", or "-- verbose") to get the information?
That option is next to useless because it buries what you need in a
mountain of junk.
On the other hand, slightly better code optimisation can mean longer
battery life, smaller and cheaper hardware, or more functionality in
my program.
Maybe you do get it after all. Using smaller, simpler, faster tools
gives all those advantages too.
It's a shame you don't see language tools in the same light as some of
your applications.
David Brown <david.brown@hesbynett.no> wrote:
On 17/09/2026 14:15, bart wrote:
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
Yes. You might think it strange, but I only posted the relevant lines
here. There were a total of 31 lines from that command - it was not
difficult to spot the ones relevant to the include paths.
On my C compiler I used to have an option -paths which listed all the
include paths it would use.
I'm surprised that gcc, amongst it 1000s of options, doesn't have a
dedicated one for this.
I've never needed to see the list of paths before - they are all
entirely obvious and standard, and "just work". Why would a compiler
need to add a specific option for something that is rarely required and
where there is a simple and fairly obvious common option ("-v", or
"--verbose") to get the information?
For the benefit of configure scripts?
And for symmetry?
I find
options like:
-print-search-dirs
-print-multiarch
...
-print-sysroot-headers-suffix
but the last one apparently does not work in normal install (even
for cross compilers), and the other seem to give no info about headers.
On 17/09/2026 16:25, bart wrote:
On 17/09/2026 14:16, David Brown wrote:
On 17/09/2026 14:15, bart wrote:
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a place >>>>>>>> where gcc will look for it without being told? Does it involve >>>>>>>> using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears >>>>>>> to work without invoking pkg-config.-a There may be more to it than >>>>>>> that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than >>>>>> where it keeps its system headers, or how to set it up to look
permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include
paths. On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
Yes.-a You might think it strange, but I only posted the relevant
lines here.-a There were a total of 31 lines from that command - it
was not difficult to spot the ones relevant to the include paths.
Always making excuses for gcc! I get 37 lines from it, but because
many are long and wrap, my screen shows over 85 lines, with 25 of them
scrolling off the top of the window. It looks a mess.
If gcc had a flag to show the include paths, and nothing but the include paths, you'd complain that you had to read through piles of
documentation to find it.-a It does not seem to matter what inane,
pointless task you and you alone think is vital, your life seems to
revolve around saying that gcc is bad in every way.-a So what's next? gcc
is a terrible tool because you find it harder to type "gcc" than "bcc" ?
Sometimes you have sane points about weaknesses in C, or things that
could be improved in gcc, clang, and other tools - or at least, they
were sane points the first time you raised them rather than the
hundredth time.
Oh, and does your fantastic OS not have scrollbars to see more lines of output?
-a Are you stuck with terminal windows limited to 80 characters
wide, just like we all used last century?-a Do you not know how to use
the "less" command? (Oh, wait, "less" is only 42 years old - we could
not expect Windows to have caught up with such basic tools in that time.
-aBut you can use "more".)
(1) The list of locations that it will be looking
(2) All the locations it's checked (this is not necessarily the
-a-a-a-a same list; see my last post)
Learn to use a computer for software development, and stop bleating when
you actually have to lift a finger!-a Of course I have occasionally had a compile fail because my code references a missing header.-a When it
happens I either find the header, or fix the typo in my code.-a We are
not doing brain surgery here.
If you can't program in C, and can't use normal C compilers, that's /
your/ problem.-a Millions of others manage to use gcc for C programming.
-aStart facing the reality that it is /you/ who is doing something
wrong, not the rest of the world.
-a Why would a compiler need to add a specific option for something
that is rarely required and where there is a simple and fairly
obvious common option ("-v", or "-- verbose") to get the information?
That option is next to useless because it buries what you need in a
mountain of junk.
Not that you are exaggerating at all.
On 17/09/2026 16:38, Waldek Hebisch wrote:
David Brown <david.brown@hesbynett.no> wrote:
On 17/09/2026 14:15, bart wrote:
I got a lot more output than that. Then I noticed you said 'amongst
other things'. So -v does not produce less output than --verbose!
Yes. You might think it strange, but I only posted the relevant lines
here. There were a total of 31 lines from that command - it was not
difficult to spot the ones relevant to the include paths.
On my C compiler I used to have an option -paths which listed all the
include paths it would use.
I'm surprised that gcc, amongst it 1000s of options, doesn't have a
dedicated one for this.
I've never needed to see the list of paths before - they are all
entirely obvious and standard, and "just work". Why would a compiler
need to add a specific option for something that is rarely required and
where there is a simple and fairly obvious common option ("-v", or
"--verbose") to get the information?
For the benefit of configure scripts?
Some people need to write configure scripts. I don't. I neither know
nor care what people might want in such configure scripts, but I feel confident that if this was actually something that people needed to do
on a regular basis, either such a flag would have been added to gcc, or someone would have published a simple recipe or script for getting the information out of gcc.
What I wrote was that /I/ have never needed such a list of include
paths. And /I/ do not find it difficult to spot them from the output of "gcc -v -E empty.c". Other people's experiences may vary. Bart
apparently regularly needs to get the include paths from his own
compiler, that he wrote, which seems strange to me.
And for symmetry?
Symmetry of what?
I find
options like:
-print-search-dirs
-print-multiarch
...
-print-sysroot-headers-suffix
but the last one apparently does not work in normal install (even
for cross compilers), and the other seem to give no info about headers.
<https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html>
These options are about the way the compiler was configured when it was built. The manual page is "primarily of interest to GCC developers".
It might look like these options are for showing include directory
paths, but they are not.
On 17/09/2026 16:05, David Brown wrote:
On 17/09/2026 16:25, bart wrote:
On 17/09/2026 14:16, David Brown wrote:
On 17/09/2026 14:15, bart wrote:
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a >>>>>>>>> place
where gcc will look for it without being told? Does it involve >>>>>>>>> using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things. >>>>>>>> That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>"
appears
to work without invoking pkg-config.-a There may be more to it than >>>>>>>> that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other than >>>>>>> where it keeps its system headers, or how to set it up to look
permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include
paths. On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said 'amongst >>>>> other things'. So -v does not produce less output than --verbose!
Yes.-a You might think it strange, but I only posted the relevant
lines here.-a There were a total of 31 lines from that command - it
was not difficult to spot the ones relevant to the include paths.
Always making excuses for gcc! I get 37 lines from it, but because
many are long and wrap, my screen shows over 85 lines, with 25 of
them scrolling off the top of the window. It looks a mess.
If gcc had a flag to show the include paths, and nothing but the
include paths, you'd complain that you had to read through piles of
documentation to find it.-a It does not seem to matter what inane,
pointless task you and you alone think is vital, your life seems to
revolve around saying that gcc is bad in every way.-a So what's next?
gcc is a terrible tool because you find it harder to type "gcc" than
"bcc" ?
Sometimes you have sane points about weaknesses in C, or things that
could be improved in gcc, clang, and other tools - or at least, they
were sane points the first time you raised them rather than the
hundredth time.
Because I get bitten for the hundredth time.
Oh, and does your fantastic OS not have scrollbars to see more lines
of output?
More mitigation. Do you ever stop giving excuses for poor software?
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
-a Are you stuck with terminal windows limited to 80 characters wide,
just like we all used last century?-a Do you not know how to use the
"less" command? (Oh, wait, "less" is only 42 years old - we could not
expect Windows to have caught up with such basic tools in that time.
-a-aBut you can use "more".)
I mentioned in another post about Clang choosing to write error
messages /in the same colour/ as my console background.
David Brown <david.brown@hesbynett.no> wrote:
<https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html>
These options are about the way the compiler was configured when it was
built. The manual page is "primarily of interest to GCC developers".
It might look like these options are for showing include directory
paths, but they are not.
That is my point.
On 17/09/2026 17:46, bart wrote:
On 17/09/2026 16:05, David Brown wrote:
On 17/09/2026 16:25, bart wrote:
On 17/09/2026 14:16, David Brown wrote:
On 17/09/2026 14:15, bart wrote:
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a >>>>>>>>>> place
where gcc will look for it without being told? Does it involve >>>>>>>>>> using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and >>>>>>>>> populated the /usr/include/SDL2 directory, among other things. >>>>>>>>> That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" >>>>>>>>> appears
to work without invoking pkg-config.-a There may be more to it than >>>>>>>>> that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other
than where it keeps its system headers, or how to set it up to >>>>>>>> look permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include
paths. On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said
'amongst other things'. So -v does not produce less output than -- >>>>>> verbose!
Yes.-a You might think it strange, but I only posted the relevant
lines here.-a There were a total of 31 lines from that command - it >>>>> was not difficult to spot the ones relevant to the include paths.
Always making excuses for gcc! I get 37 lines from it, but because
many are long and wrap, my screen shows over 85 lines, with 25 of
them scrolling off the top of the window. It looks a mess.
If gcc had a flag to show the include paths, and nothing but the
include paths, you'd complain that you had to read through piles of
documentation to find it.-a It does not seem to matter what inane,
pointless task you and you alone think is vital, your life seems to
revolve around saying that gcc is bad in every way.-a So what's next?
gcc is a terrible tool because you find it harder to type "gcc" than
"bcc" ?
Sometimes you have sane points about weaknesses in C, or things that
could be improved in gcc, clang, and other tools - or at least, they
were sane points the first time you raised them rather than the
hundredth time.
Because I get bitten for the hundredth time.
Oh, and does your fantastic OS not have scrollbars to see more lines
of output?
More mitigation. Do you ever stop giving excuses for poor software?
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
What ****ing problem?-a You are talking about something that virtually no
C programmer ever bothers doing, and anyone who needs to ask their
compiler about the include paths only ever needs to do so /once/.-a There were 31 lines - not a 1000
- and the relevant lines are blindingly
obvious in the output.-a If it took you more than a second or two to spot them, you should get a better screen or a better pair of glasses.
-a Are you stuck with terminal windows limited to 80 characters wide,
just like we all used last century?-a Do you not know how to use the
"less" command? (Oh, wait, "less" is only 42 years old - we could not
expect Windows to have caught up with such basic tools in that time.
-a-aBut you can use "more".)
I mentioned in another post about Clang choosing to write error
messages /in the same colour/ as my console background.
If only there were a simple way to change these for people who don't
like the defaults (which were probably picked to fit the extremely
common choice of black background in terminal windows).-a If only there
were a simple way to change the background colour of your console.-a If
only there were a simple website that could help you find out how to
change these colours by typing in a question, and copying out the
answers it gives you.-a But no, you don't want answers, or help - you
want to cry about how tools that are fine for countless other developers
are not fine-tuned exactly to your personal preferences.
And yes, I am being patronising - stop acting like a spoiled child, and
I will stop being patronising.
If only there were a simple way to change the background colour
want to cry about how tools that are fine for countless other developers
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
I mentioned in another post about Clang choosing to write error
messages /in the same colour/ as my console background.
On 9/17/26 17:46, bart wrote:
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
-a-a May be you can code a patch who fix the^Wyour problem, and
-a-a send it to the Gcc team ? Any positive contribution is
-a-a benefit to all of us.
And what's with the super-long lines that are guaranteed to wrap? The
two longest lines are 1700-1800 characters.
On 9/17/26 17:46, bart wrote:
I mentioned in another post about Clang choosing to write error
messages /in the same colour/ as my console background.
-a-a $ some_command_who_change_color | cat
-a-a-a-a-a-a-a-a-a-a-a-a-a problem solved.
bart <bc@freeuk.com> writes:
On 16/09/2026 16:53, David Brown wrote:
On 16/09/2026 16:20, bart wrote:
Another advantage is that the header is a single file that is easyMy test file contained a single line :
to use, copy, bundle etc. You don't need - I options.
-a-a-a-a#include <SDL2/SDL.h>
and compiled with
-a-a-a-agcc -c test.c
There are no -I options.
Where is your SDL2 folder located relative to the current directory?
On my system (Ubuntu 24.04), it's "/usr/include/SDL2". David's
system is probably similar.
Was there some installation process that put the headers in a place
where gcc will look for it without being told? Does it involve using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and
populated the /usr/include/SDL2 directory, among other things.
That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" appears
to work without invoking pkg-config. There may be more to it than
that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
Mine is in the current directory (that is, ./SDL3 is a folder that
contains the headers). gcc doesn't work without '-I.' on either OS:
Did you set that up manually? If you had two projects that use SDL,
would you have to create "./SDL3" folders in both of them?
[...]
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than-a-a You just have to read the fscking manual.
where it keeps its system headers, or how to set it up to look
permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
In any case, none of those
listed are set. So I still don't know how gcc even manages to find its
own system headers. But I don't care.
gcc on Windows is poor at this anyway: if I have two gcc versions
installed, then they clash, and gcc.exe doesn't appear to use paths
relative to itself to find its dependent binaries.
-a-a But as everyone knows, learning new things isn't
-a-a part of your philosophy...
I don't care about individual compilers, especially gcc which is a
PITA in working differently from other C compilers, apart from those
which slavishly copy all it behaviours. Examples:
So you can keep your stinkin' compiler.
On 17/09/2026 13:51, David Brown wrote:
On 17/09/2026 14:03, bart wrote:
My gcc Windows installation (I went back to 14.2 as it includesAs you well know, there is no such thing as a standard "gcc Windows"
clang), includes 3000 .h files. They can't all be for the standard
library!
installation - there are multiple different packagings of gcc with
different choices of libraries and other tools.-a I am not sure it is
going to be very helpful if you say exactly which Windows gcc
installation you have, but there can be huge variations between
them.
If interested it was from winlibs.com. (The site looks like something
from the 1990s but it has versions up 16.2.0.)
My gcc Windows installation (I went back to 14.2 as it includes
clang), includes 3000 .h files.
They can't all be for the standard
library!
And 1200 .a archive files. So the approach there seems to be bundle
headers and binaries for every possible library. But apparently not
big ones like SDL.
I'm not interested in gcc.
On 17/09/2026 19:22, David Brown wrote:
On 17/09/2026 17:46, bart wrote:
On 17/09/2026 16:05, David Brown wrote:
On 17/09/2026 16:25, bart wrote:
On 17/09/2026 14:16, David Brown wrote:
On 17/09/2026 14:15, bart wrote:
On 17/09/2026 11:52, David Brown wrote:
On 17/09/2026 02:49, bart wrote:
Was there some installation process that put the headers in a >>>>>>>>>>> place
where gcc will look for it without being told? Does it involve >>>>>>>>>>> using
'pkg-config'?
Yes, installing the Ubuntu package "libsdl2-dev" created and >>>>>>>>>> populated the /usr/include/SDL2 directory, among other things. >>>>>>>>>> That's a typical approach for Unix-like systems.
pkg-config does know about sdl2, but "#include <SDL2/SDL.h>" >>>>>>>>>> appears
to work without invoking pkg-config.-a There may be more to it than >>>>>>>>>> that, but I don't use SDL so I haven't looked into it.
I have no idea how you'd set it up on Windows, but ...
And I've no idea where gcc would look for its headers, other >>>>>>>>> than where it keeps its system headers, or how to set it up to >>>>>>>>> look permanently in certain places.
touch empty.c
gcc -E -v empty.c
That will show you, amongst other things, the default include >>>>>>>> paths. On my system, it shows :
#include "..." search starts here:
#include <...> search starts here:
-a-a/usr/lib/gcc/x86_64-linux-gnu/13/include
-a-a/usr/local/include
-a-a/usr/include/x86_64-linux-gnu
-a-a/usr/include
End of search list.
I got a lot more output than that. Then I noticed you said
'amongst other things'. So -v does not produce less output than -- >>>>>>> verbose!
Yes.-a You might think it strange, but I only posted the relevant >>>>>> lines here.-a There were a total of 31 lines from that command - it >>>>>> was not difficult to spot the ones relevant to the include paths.
Always making excuses for gcc! I get 37 lines from it, but because
many are long and wrap, my screen shows over 85 lines, with 25 of
them scrolling off the top of the window. It looks a mess.
If gcc had a flag to show the include paths, and nothing but the
include paths, you'd complain that you had to read through piles of
documentation to find it.-a It does not seem to matter what inane,
pointless task you and you alone think is vital, your life seems to
revolve around saying that gcc is bad in every way.-a So what's next? >>>> gcc is a terrible tool because you find it harder to type "gcc" than
"bcc" ?
Sometimes you have sane points about weaknesses in C, or things that
could be improved in gcc, clang, and other tools - or at least, they
were sane points the first time you raised them rather than the
hundredth time.
Because I get bitten for the hundredth time.
Oh, and does your fantastic OS not have scrollbars to see more lines
of output?
More mitigation. Do you ever stop giving excuses for poor software?
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
What ****ing problem?-a You are talking about something that virtually no >> C programmer ever bothers doing, and anyone who needs to ask their
compiler about the include paths only ever needs to do so /once/.-a There >> were 31 lines - not a 1000
There were 85 lines that scrolled up the screen.
But if it was 1000, then so what: your suggestion to use the scrollbar
would still work, yes?
On 17/09/2026 20:31, tTh wrote:
On 9/17/26 17:46, bart wrote:
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
-a-a May be you can code a patch who fix the^Wyour problem, and
-a-a send it to the Gcc team ? Any positive contribution is
-a-a benefit to all of us.
I'm not interested in gcc. I have my own solutions.
Most command-line compilers give you version and help info when no parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program
from the console!)
On Thu, 17 Sep 2026 20:54:35 +0100, bart wrote:
Most command-line compilers give you version and help info when no
parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program
from the console!)
Most people read (or at least skim) the documentation
that comes with the software they use.
% man as
If you give 'as' no file names it attempts to read one
input file from the 'as' standard input, which is normally
your terminal. You may have to type ctl-D to tell 'as'
there is no more program to assemble.
HTH
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
bart <bc@freeuk.com> writes:
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than-a-a You just have to read the fscking manual.
where it keeps its system headers, or how to set it up to look
permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
Obviously untrue.
gcc on Windows is poor at this anyway: if I have two gcc versions
installed, then they clash, and gcc.exe doesn't appear to use paths
relative to itself to find its dependent binaries.
I doubt that gcc is at fault for that, assuming it's true.
gcc on Windows is typically installed as part of a larger package
(since a compiler by itself can't generate executables).
It's the> responsibility of the gcc+FOO and gcc+BAR installers to arrange
for their respecive gcc's to avoid conflicting with each other.
Packaging gcc for Windows is more difficult than packaging gcc
for Unix-like systems.
-a-a But as everyone knows, learning new things isn't
-a-a part of your philosophy...
I don't care about individual compilers, especially gcc which is a
PITA in working differently from other C compilers, apart from those
which slavishly copy all it behaviours. Examples:
You say you don't care about gcc. I don't think that's what you mean,
given how much you talk about it.
So you can keep your stinkin' compiler.
OK. Are we done?
[116 lines deleted]
On 17/09/2026 23:06, Keith Thompson wrote:[...]
You say you don't care about gcc. I don't think that's what you
mean, given how much you talk about it.
I don't care about having to give special treatment to different compilers.
So, no comment on the fact that it can take three goes before gcc gets[...]
the DLL extension right?
Keith Thompson pisze:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
(Please, for the sake of the people that haven't killfiled you, use an
online-translator to create comprehensible texts! - In case that your
native language *is* English I suggest to translate your text to some
other language and then back to English; the translators are obviously
good enough to fix your language or writing problems in that process.)
The above was addressed to "fir".-a As I recall, his native language
is Polish.
"fir" has been posting here for a long time.-a Here's something our own
David Brown wrote about him in 2015.-a I can't directly vouch for its
accuracy, but it seems plausible.
-a-a-a-a He does not have dyslexia.-a English is a second language for him, >> -a-a-a-a but he is capable of writing much better than he does (I have seen >> -a-a-a-a him do so) - he /intentionally/ writes in this manner because he
-a-a-a-a considers himself too much of a grand thinker and philosopher to
-a-a-a-a lower himself to our mere "commoner" language.-a As far as I
-a-a-a-a understand it, he writes in a similar manner in his own language. >> -a-a-a-a Many of us have tried to suggest he changes his manner for his own >> -a-a-a-a good as well as ours - but to no avail.
Reference:
-a-a-a-a Subject: Re: Recursion or loop, design questions
-a-a-a-a Date: Wed, 05 Aug 2015 08:45:25 +0200
-a-a-a-a Message-ID: <mpsbb5$3s9$1@dont-email.me>
I suggest that one more attempt to get fir to write clearly is
unlikely to be effective.-a I've solved the problem for myself by
adding him to my killfile.
funny, honestly i dont know why i write such way as i write
i suspect its in big extent becouse if i think on c language ideas im
kina highly focused and 'turning' to think on all this letters is on
kinda different plane so it annoys me, its hard to be focused on
thinking on higher c topics and on editing sentences, translating text
in google or chat gpt..its robably possible but so wearing that the
oryginal thoughts would sufer too much
i may say hovver i got some friends on some irc i used for years and
they never complained for some reason..though i wrote in polish there
and on chat you look on text much more than when you write messages on usenet
Lane W <cactus_DAC@yahoo.com> writes:
fir wrote:[...]
in fact i was talking about quite other and more theoretical
problem,
not how rewrite tis pice of code (as to revrite i think the ones
-awith
-achar* a= "";-a if(d<0.3) a ="barely" ; if(d>.9) a= "hardly";
slog("siunsusn %s", a);
is best)
My concern here is that Keith Thompson is going to crucify you here
because you assigned a new value to 'a' after the previous one, which
offends his exceedingly gentle sensibilities. How will you continue to
write C if you are nailed to one of Keith Thompson's crosses?
Please refrain from mentioning my name in any future posts. I have
no interest in watching you embarrass yourself.
I intend to add you to my killfile (technically, my Gnus scorefile),
with the result that I will never see any of your posts here.
If your embarrassing behavior improves in the next few days,
I'll consider not doing so. To be clear, this is not a threat.
It's simply something I intend to do to make my own experience here
a little better, by giving me a view of comp.lang.c that does not
include you. Others will do as they wish.
On 18/09/2026 01:04, Steven G. Kargl wrote:
On Thu, 17 Sep 2026 20:54:35 +0100, bart wrote:
Most command-line compilers give you version and help info when no
parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program
from the console!)
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't.
They will try running such programs without
input, as often that gives usage info.
'as' is more peculiar than most assemblers:
* It takes input from stdin as default
* The output, even on Windows, is a file called a.out
* If given two or more input files, these are literally concatenated
into one ASM file. More typically there is one object file produced per file
% man as
'man' doesn't exist on Windows.
Using 'as --help' gives lots of
complicated options that will mean little to some who has not used this before and simply wants to turn file.s into file.o.
This is my assembler for example when I type its name:
c:\c>aa
AA7 Assembler 29-Aug-2026
Usage:
aa filename[.asm] # Assemble filename.asm to filename.exe
aa -help # Show other options
Simple, yes?
On Fri, 18 Sep 2026 01:34:12 +0100, bart wrote:
On 18/09/2026 01:04, Steven G. Kargl wrote:
On Thu, 17 Sep 2026 20:54:35 +0100, bart wrote:
Most command-line compilers give you version and help info when no
parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program >>>> from the console!)
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't.
Touche. As a gfortran contributor, I'm well-aware of
the fact that users lack reading abilities.
They will try running such programs without
input, as often that gives usage info.
Not on a Unix(-like) system. Many tools will fall-back to accepting
stdin for input. It's essentially how pipes on a command line
work. May Microsoft doesn't know how to use pipes?
'as' is more peculiar than most assemblers:
* It takes input from stdin as default
* The output, even on Windows, is a file called a.out
* If given two or more input files, these are literally concatenated
into one ASM file. More typically there is one object file produced per file >>
% man as
'man' doesn't exist on Windows.
Well, this is your problem. Why are you using Window? :-)
(and, no, linux is not the answer.)
If 'man' doesn't exist on windows, google 'GNU as manual'.
You might learn how to use the tool should work.
Using 'as --help' gives lots of
complicated options that will mean little to some who has not used this
before and simply wants to turn file.s into file.o.
This is my assembler for example when I type its name:
c:\c>aa
AA7 Assembler 29-Aug-2026
Usage:
aa filename[.asm] # Assemble filename.asm to filename.exe
aa -help # Show other options
Simple, yes?
I suppose it's simply if one doesn't want to enter
an assembly program at the command line.
% as
.text;
.p2align 4,0x90;
.globl sqrt;
.type sqrt,@function;
sqrt:;
.cfi_startproc
fldl 4(%esp)
fsqrt
ret
.size sqrt, . - sqrt; .cfi_endproc
.section .note.GNU-stack,"",%progbits
% nm a.out
0000000000000000 T sqrt
or one can do
% cat z.s
.text;
.p2align 4,0x90;
.globl sqrt;
.type sqrt,@function;
sqrt:;
.cfi_startproc
fldl 4(%esp)
fsqrt
ret
.size sqrt, . - sqrt; .cfi_endproc
.section .note.GNU-stack,"",%progbits
% cat z.s | as
% nm a.out
0000000000000000 T sqrt
bart <bc@freeuk.com> writes:
[...]
My gcc Windows installation (I went back to 14.2 as it includes
clang), includes 3000 .h files.
No it doesn't. As explained downthread, most of them are from
MinGW-w64, which is packaged along with gcc by WinLibs (winlibs.com).
They can't all be for the standard
library!
They aren't -- and gcc doesn't provide (most of) the standard library
anyway. The "gcc" package does provide some .h files, some for internal
use and some like stddef.h that are more closely tied to the compiler
than to the library implementation.
On 15/09/2026 11:51, Janis Papanagnou wrote:[...]
Right. - But don't forget that "spurious means" to tackle a topic is
as well a source of obfuscating information; I certainly won't judge
whether one or the other is in any (absolute or relative) way "better",
but it certainly reminds me the recurring "if(a=5) vs. if(5=a)" debate
to "ensure" "programming safety".
[...]
And we all know we should be writing "if (a == 5)", with decent spacing :-)
Far more effective than any one developer changing their coding style
would be having more warnings enabled by default in common compilers.
(clang warns about "if (a = 5)" by default, while gcc needs "-Wall".
Both warn about the misleading indentation only when warnings are enabled.)
Sure. - The point is; is there an objectively safe style here?
I think there's subjective styles that helps some and annoys others.
I have no statistics or reports to back up anything I say, so I can only
say that I would /expect/ to see a small but measurable reduction in
code errors if "indent without braces" conditionals are not allowed in
code, if one were to compare code samples that had not used appropriate static checks.-a That is, I /believe/ there is a objective difference here.-a But I certainly can't claim to /know/ that there is.-a And even if statistics bear me out here (maybe some PhD student has done the
research), that would still not contradict your statement.-a It is
entirely reasonable to suppose that the style choices here would reduce risks for some programmers while making no difference to others - and no
one likes being told to change their style without good reason.
I don't think it makes sense to argue about that. (Especially given
that we both have many decades of experience in the area.)
This also makes it difficult to judge.-a I am confident that any choice
of style here would make no difference to the risk of errors in either
your code or my code - we both know how to use "-Wall" and pay attention
to the warnings, so if we /did/ make a mistake, our tools would tell us.
[...]
On 9/10/2026 7:00 AM, fir wrote:
Keith Thompson pisze:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
(Please, for the sake of the people that haven't killfiled you, use an >>>> online-translator to create comprehensible texts! - In case that your
native language *is* English I suggest to translate your text to some
other language and then back to English; the translators are obviously >>>> good enough to fix your language or writing problems in that process.)
The above was addressed to "fir".-a As I recall, his native language
is Polish.
"fir" has been posting here for a long time.-a Here's something our own
David Brown wrote about him in 2015.-a I can't directly vouch for its
accuracy, but it seems plausible.
-a-a-a-a He does not have dyslexia.-a English is a second language for him, >>> -a-a-a-a but he is capable of writing much better than he does (I have seen >>> -a-a-a-a him do so) - he /intentionally/ writes in this manner because he >>> -a-a-a-a considers himself too much of a grand thinker and philosopher to >>> -a-a-a-a lower himself to our mere "commoner" language.-a As far as I
-a-a-a-a understand it, he writes in a similar manner in his own language. >>> -a-a-a-a Many of us have tried to suggest he changes his manner for his own >>> -a-a-a-a good as well as ours - but to no avail.
Reference:
-a-a-a-a Subject: Re: Recursion or loop, design questions
-a-a-a-a Date: Wed, 05 Aug 2015 08:45:25 +0200
-a-a-a-a Message-ID: <mpsbb5$3s9$1@dont-email.me>
I suggest that one more attempt to get fir to write clearly is
unlikely to be effective.-a I've solved the problem for myself by
adding him to my killfile.
funny, honestly i dont know why i write such way as i write
i suspect its in big extent becouse if i think on c language ideas im
kina highly focused and 'turning' to think on all this letters is on
kinda different plane so it annoys me, its hard to be focused on
thinking on higher c topics and on editing sentences, translating text
in google or chat gpt..its robably possible but so wearing that the
oryginal thoughts would sufer too much
i may say hovver i got some friends on some irc i used for years and
they never complained for some reason..though i wrote in polish there
and on chat you look on text much more than when you write messages on
usenet
I also find it funny, that when I write /clearly/ here in comp.lang.c,
I get accused of being an L.L.M.-a This is apparently special for comp. lang.c, because I've received no such accusation in other Usenet groups.
Also, I.R.C. users are probably more used to idiosyncratic text mess-
ages, and therefore have no reason to /killfile/ you, just because they
don't have enough reading comprehension to read what they decide is "bad English."
At least, I have no problem understanding you.
Best wishes, and happy forking C!
On 09/09/2026 8:37 PM, fir wrote:
fir pisze:
Johann 'Myrkraverk' Oskarsson pisze:besides he is partally right - he has a bit rigid definitions who
On 09/09/2026 4:18 PM, fir wrote:
Johann 'Myrkraverk' Oskarsson pisze:Yeah, I don't worry about Keith and trolls like him, and discuss what I >>>> want in comp.lang.c.-a Including meta discussions like this one, about >>>> what should and shouldn't be discussed in comp.lang.c.
On 08/09/2026 7:52 AM, Keith Thompson wrote:
Lane W <cactus_DAC@yahoo.com> writes:
[128 lines deleted]
One of the things I avoid in C# is a nasty makefile, and generally >>>>>>>> having to tool around in Unix. That is all taken care of by the C# >>>>>>>> compiler included in the suite I use to generate my programs.
OK, I think we've established that you like C# better than C
(or C++).
This is comp.lang.c.-a Complaints about C are topical here, even >>>>>>> though some of the ones that introduced this thread are silly.
But if you want to discuss C#, please do so elsewhere.
Oh, don't mind Keith.-a He likes to butt in on other people's
discussions
and behave like he's some owner of comp.lang.c.-a He's not.-a There >>>>>> isn't
even a comp.lang.csharp group to direct people towards.-a I guess >>>>>> Keith
will just have to start a discussion in news.groups.proposals
about it.
I've added microsoft.public.dotnet.csharp.general to this discussion, >>>>>> but I have no idea if Eternal September subscribes to it, which I be- >>>>>> lieve is what most techies use to access usenet.-a And the last on- >>>>>> topic
post in microsoft.public.dotnet.csharp.general seems to have been >>>>>> six-
teen years ago.
That's a long time for nobody to get comp.lang.csharp running.
So please feel free to complain in comp.lang.c -- and let the # be >>>>>> si-
lent -- until someone gets irritated enough to make a proposal that >>>>>> sticks!
Best wishes, and happy coding in C#!
this is probably not god taking on this ...the offtopics imo
depending on amount (yet quality)..if group has some focus it
should be focus on
c realted things with some offtopics possible not focus on c not
realted
offtopics with slight amount of c related...
so i find some sense in what keith t says though i personally cant
agree
with his inner idea this group is only for discussing
1) c standards
not
2) c ideas
or
3) c programming
Plus, it's fairly clear none of the usual trolls code anything in C, as >>>> I demonstrated when I gave you some book recommendations.
Best wishes, and happy C coding!
keith probably used to call me a troll (oz i not stick to his own
rigid rules)
so i could eventuall call him back a troll but as i once said if i
noticed
it is better to value regular users of this group becouse if not hem
the group culd not exist and i would have no place to talk at all
so i dont call him a troll, becouse he is okay user overally i just
disagree in some things
troll is - but this is kinda complex matter becouse depending on
definitions i may be a troll according to one, he may be atroll
according to another
and so on..and which definitions are good and for what reason is a
complex thing - not sure if this is resolvable...
generally i find whats good to improve some focus and knowledge here
as godo and whats the oposite makin brainless spam is bad etc
Indeed.-a And for that reason, I still hope you'll read /Patterns in C/
one of these days.-a Or if I -- or someone else -- comes across a better reference, to share it with you.
There is a lot of C knowledge out there, and the language standard isn't
the end game of being a C wizard.
On 18/09/2026 00:24, Keith Thompson wrote:[...]
They aren't -- and gcc doesn't provide (most of) the standard library
anyway. The "gcc" package does provide some .h files, some for
internal use and some like stddef.h that are more closely tied to the
compiler than to the library implementation.
While gcc does not provide a C standard library (as has been explained
to Bart endlessly), the gcc team /do/ provide a C++ standard
library. It is not part of the C compiler, but it is almost certainly
also included in the "winlibs" package. And while the user-facing
headers in the C++ standard library are mostly without extension, most
of the internal headers are ".h" files. Thus a not insignificant part
of those ".h" files he has were provided by gcc rather than third
parties, but are not part of the C standard library.
On Fri, 18 Sep 2026 01:34:12 +0100, bart wrote:
This is my assembler for example when I type its name:
c:\c>aa
AA7 Assembler 29-Aug-2026
Usage:
aa filename[.asm] # Assemble filename.asm to filename.exe
aa -help # Show other options
Simple, yes?
I suppose it's simply if one doesn't want to enter
an assembly program at the command line.
% as
.text;
.p2align 4,0x90;
.globl sqrt;
.type sqrt,@function;
sqrt:;
.cfi_startproc
fldl 4(%esp)
fsqrt
ret
.size sqrt, . - sqrt; .cfi_endproc
.section .note.GNU-stack,"",%progbits
On 17/09/2026 23:06, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than-a -a-a You just have to read the fscking manual.
where it keeps its system headers, or how to set it up to look
permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
Obviously untrue.
Let's say they're out of fashion.
gcc on Windows is poor at this anyway: if I have two gcc versions
installed, then they clash, and gcc.exe doesn't appear to use paths
relative to itself to find its dependent binaries.
I doubt that gcc is at fault for that, assuming it's true.
gcc on Windows is typically installed as part of a larger package
(since a compiler by itself can't generate executables).
I think the problem was that gcc runs support programs such as cc1.exe
by relying on Windows to search the default paths.
But if you have two versions A and B, and both their paths are listed in
the PATH variable, then when B's gcc tries to run cc1.exe, it will be
A's version, as A's path is listed first.
It's the> responsibility of the gcc+FOO and gcc+BAR installers toarrange
for their respecive gcc's to avoid conflicting with each other.
Packaging gcc for Windows is more difficult than packaging gcc
for Unix-like systems.
It's not hard; it should really have used a path relative to B's gcc.exe.
It would still pick A's gcc.exe if typing an unqualified 'gcc' by
itself, but how does Linux solve this problem when you have two gcc's to choose from?
On 2026-09-15 12:53, David Brown wrote:
On 15/09/2026 11:51, Janis Papanagnou wrote:[...]
Right. - But don't forget that "spurious means" to tackle a topic is
as well a source of obfuscating information; I certainly won't judge
whether one or the other is in any (absolute or relative) way "better",
but it certainly reminds me the recurring "if(a=5) vs. if(5=a)" debate
to "ensure" "programming safety".
[...]
And we all know we should be writing "if (a == 5)", with decent
spacing :-)
Sure. Above was just a deliberate terse form for inline reference.
Usually I'm using probably more spacing inline and between lines
and chapters than the average programmer would find tolerable. ;-)
Far more effective than any one developer changing their coding style
would be having more warnings enabled by default in common compilers.
(clang warns about "if (a = 5)" by default, while gcc needs "-Wall".
Both warn about the misleading indentation only when warnings are
enabled.)
Yes, things have gotten much better since the dates back then when
I did my professional programming in C/C++.
Sure. - The point is; is there an objectively safe style here?
I think there's subjective styles that helps some and annoys others.
I have no statistics or reports to back up anything I say, so I can
only say that I would /expect/ to see a small but measurable reduction
in code errors if "indent without braces" conditionals are not allowed
in code, if one were to compare code samples that had not used
appropriate static checks.-a That is, I /believe/ there is a objective
difference here.-a But I certainly can't claim to /know/ that there
is.-a And even if statistics bear me out here (maybe some PhD student
has done the research), that would still not contradict your
statement.-a It is entirely reasonable to suppose that the style
choices here would reduce risks for some programmers while making no
difference to others - and no one likes being told to change their
style without good reason.
Actually, we established coding standards, and not following these required(!) - by those same standards - any deviation to be explained.
(BTW, I authored, co-authored, and reviewed coding standard for three different programming languages; one of the rules - and contrary to my
own convenience - was to always use braces also in the cases discussed!
Just note that I haven't formulated it because one would be safer than
the other; but we had to choose one option, and the rule to "always use braces" is just simpler (more practicable and easier to memorize) than
an also sensible but very differentiated rule option - remember these
simple 'if' cascades.)
I don't think it makes sense to argue about that. (Especially given
that we both have many decades of experience in the area.)
This also makes it difficult to judge.-a I am confident that any choice
of style here would make no difference to the risk of errors in either
your code or my code - we both know how to use "-Wall" and pay
attention to the warnings, so if we /did/ make a mistake, our tools
would tell us.
You might be astonished but I don't recall to have needed any explicit warnings setting; our policy was a zero-warning approach (by the default warnings of our compilers), and where we identified any needs beyond we communicated with the build-management to make it the company default.
Having good programmers, providing trainings and courses, helped also.
Johann 'Myrkraverk' Oskarsson pisze:
On 09/09/2026 8:37 PM, fir wrote:
fir pisze:
Johann 'Myrkraverk' Oskarsson pisze:besides he is partally right - he has a bit rigid definitions who
On 09/09/2026 4:18 PM, fir wrote:
Johann 'Myrkraverk' Oskarsson pisze:Yeah, I don't worry about Keith and trolls like him, and discuss
On 08/09/2026 7:52 AM, Keith Thompson wrote:
Lane W <cactus_DAC@yahoo.com> writes:
[128 lines deleted]
One of the things I avoid in C# is a nasty makefile, and generally >>>>>>>>> having to tool around in Unix. That is all taken care of by the C# >>>>>>>>> compiler included in the suite I use to generate my programs. >>>>>>>>OK, I think we've established that you like C# better than C
(or C++).
This is comp.lang.c.-a Complaints about C are topical here, even >>>>>>>> though some of the ones that introduced this thread are silly. >>>>>>>> But if you want to discuss C#, please do so elsewhere.
Oh, don't mind Keith.-a He likes to butt in on other people's
discussions
and behave like he's some owner of comp.lang.c.-a He's not.-a There >>>>>>> isn't
even a comp.lang.csharp group to direct people towards.-a I guess >>>>>>> Keith
will just have to start a discussion in news.groups.proposals
about it.
I've added microsoft.public.dotnet.csharp.general to this
discussion,
but I have no idea if Eternal September subscribes to it, which I >>>>>>> be-
lieve is what most techies use to access usenet.-a And the last >>>>>>> on- topic
post in microsoft.public.dotnet.csharp.general seems to have been >>>>>>> six-
teen years ago.
That's a long time for nobody to get comp.lang.csharp running.
So please feel free to complain in comp.lang.c -- and let the # >>>>>>> be si-
lent -- until someone gets irritated enough to make a proposal that >>>>>>> sticks!
Best wishes, and happy coding in C#!
this is probably not god taking on this ...the offtopics imo
depending on amount (yet quality)..if group has some focus it
should be focus on
c realted things with some offtopics possible not focus on c not
realted
offtopics with slight amount of c related...
so i find some sense in what keith t says though i personally cant >>>>>> agree
with his inner idea this group is only for discussing
1) c standards
not
2) c ideas
or
3) c programming
what I
want in comp.lang.c.-a Including meta discussions like this one, about >>>>> what should and shouldn't be discussed in comp.lang.c.
Plus, it's fairly clear none of the usual trolls code anything in
C, as
I demonstrated when I gave you some book recommendations.
Best wishes, and happy C coding!
keith probably used to call me a troll (oz i not stick to his own
rigid rules)
so i could eventuall call him back a troll but as i once said if i
noticed
it is better to value regular users of this group becouse if not hem
the group culd not exist and i would have no place to talk at all
so i dont call him a troll, becouse he is okay user overally i just
disagree in some things
troll is - but this is kinda complex matter becouse depending on
definitions i may be a troll according to one, he may be atroll
according to another
and so on..and which definitions are good and for what reason is a
complex thing - not sure if this is resolvable...
generally i find whats good to improve some focus and knowledge here
as godo and whats the oposite makin brainless spam is bad etc
Indeed.-a And for that reason, I still hope you'll read /Patterns in C/
one of these days.-a Or if I -- or someone else -- comes across a better
reference, to share it with you.
There is a lot of C knowledge out there, and the language standard isn't
the end game of being a C wizard.
if those patterns are typical like by this insane oop crowd im not interesyed, im interested in more algebraical concise-a solutions only
David Brown <david.brown@hesbynett.no> writes:
I've said a number of times that "gcc" is a compiler, not a full C implementation. It's worth pointing out that the software package
called "gcc" (downloadable in source form from gcc.gnu.org) does
include some other software in addition to the compiler, including
a small part of the library implementation for C and a much larger
part of the library implementation for C++.
OS-specific installers can and often do break this up into multiple installable packages. For example, on Ubuntu and related systems,
the GNU compilers for various languages (C, C++, Fortran, Cobol,
Ada, et al) are in separate packages, as are the headers and code.
I have oversimplified this in the past.
Having said all that, it is absolutely not the case that the bulk
of the C standard library implementation is part of "gcc", however
much a certain poster here pretends to believe that it is.
But I /can/ tell you exactly how my own C implementation for Windows
works.
bart <bc@freeuk.com> writes:
[...]
But I /can/ tell you exactly how my own C implementation for Windows
works.
But I don't care.
On 18/09/2026 03:04, bart wrote:
But if you have two versions A and B, and both their paths are listed
in the PATH variable, then when B's gcc tries to run cc1.exe, it will
be A's version, as A's path is listed first.
It is conceivable that the folks behind this "winlib" packaging are idiots.-a But assuming they are not, then "cc1.exe" will not be in your path.-a The gcc driver program finds the additional parts in a path dependent on the way it was configured when built.
On 17/09/2026 20:31, tTh wrote:
On 9/17/26 17:46, bart wrote:
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
-a-a-a May be you can code a patch who fix the^Wyour problem, and
-a-a-a send it to the Gcc team ? Any positive contribution is
-a-a-a benefit to all of us.
I'm not interested in gcc. I have my own solutions.
This is just one more annoying thing about that program. The issue here
is that nobody is daring to criticise its crass behaviours, while trying
to deflect issues onto users.
Its crassness starts here:
-a c:\c>gcc
-a gcc: fatal error: no input files
-a compilation terminated.
Most command-line compilers give you version and help info when no parameters follow.
But at least it says something; try this:
-a c:\c\as
and it apparently hangs (it's waiting for you type an assembly program
from the console!)
How did programs which work like some student's crude first console app
ever make it into the wild?
On 18/09/2026 10:27, David Brown wrote:
On 18/09/2026 03:04, bart wrote:
But if you have two versions A and B, and both their paths are listed
in the PATH variable, then when B's gcc tries to run cc1.exe, it will
be A's version, as A's path is listed first.
It is conceivable that the folks behind this "winlib" packaging are
idiots.-a But assuming they are not, then "cc1.exe" will not be in your
path.-a The gcc driver program finds the additional parts in a path
dependent on the way it was configured when built.
I've just tried two WINLIBS gcc versions, and now they work fine, if you
use an explicit path to their respective gcc.exe files.
The issue may have been with TDM distributions that I used to use. But WINLIBS has newer gcc versions.
On 17/09/2026 23:06, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than-a-a You just have to read the fscking manual.
where it keeps its system headers, or how to set it up to look
permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
Obviously untrue.
Let's say they're out of fashion.
On 17/09/2026 21:54, bart wrote:
On 17/09/2026 20:31, tTh wrote:
On 9/17/26 17:46, bart wrote:
Somebody needs some a few lines of info from a program, but the tool
buries it in 1000 lines of output, and your suggestion is to just to
scroll up and down trying to find it?
Anything but fix the problem!
-a-a-a May be you can code a patch who fix the^Wyour problem, and
-a-a-a send it to the Gcc team ? Any positive contribution is
-a-a-a benefit to all of us.
I'm not interested in gcc. I have my own solutions.
This is just one more annoying thing about that program. The issue
here is that nobody is daring to criticise its crass behaviours, while
trying to deflect issues onto users.
Its crassness starts here:
-a-a c:\c>gcc
-a-a gcc: fatal error: no input files
-a-a compilation terminated.
Simple, clear, and to-the-point.
Most command-line compilers give you version and help info when no
parameters follow.
Some do, some do not.
Most command-line tools - gcc included - give you version information if
you write "gcc --version", and help if you give "gcc --help".
But at least it says something; try this:
-a-a c:\c\as
and it apparently hangs (it's waiting for you type an assembly program
from the console!)
Many programs can work as pipes.-a It is waiting for input from stdin,
not particularly from the console.-a Programs that often get their input directly from other programs work this way.
How did programs which work like some student's crude first console
app ever make it into the wild?
Perhaps it is because the developers know how to write programs designed
to do useful jobs in a way that is convenient and efficient for the
tasks they actually have to do?-a Maybe the developers of "as" expected users to have a clue about what they are doing?
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Your assumptions
about how you think it *should* behave have led you astray.
I suggest that it is your approach, not "as", that needs to change.
Quick summary: You are trying to use tools that were originally
designed to be used in a Unix-like environment, and expecting them
to behave like native Windows tools.
I'll explain further if you ask, but only if you convince me that
you're actually interested in learning.
In article <118i2mc$q9l1$1@dont-email.me>, bart <bc@freeuk.com>
wrote:
On 17/09/2026 23:06, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other-a-a You just have to read the fscking manual.
than where it keeps its system headers, or how to set it up to
look permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
Obviously untrue.
Let's say they're out of fashion.
Why would you say such a thing? While they may not be the most
elegant solution to a number of problems, they're very much in
use, and "in fashion", at least on Unix-derived systems.
- Dan C.
On 18/09/2026 12:11, David Brown wrote:
On 17/09/2026 21:54, bart wrote:
On 17/09/2026 20:31, tTh wrote:
On 9/17/26 17:46, bart wrote:
Somebody needs some a few lines of info from a program, but the
tool buries it in 1000 lines of output, and your suggestion is to
just to scroll up and down trying to find it?
Anything but fix the problem!
-a-a-a May be you can code a patch who fix the^Wyour problem, and
-a-a-a send it to the Gcc team ? Any positive contribution is
-a-a-a benefit to all of us.
I'm not interested in gcc. I have my own solutions.
This is just one more annoying thing about that program. The issue
here is that nobody is daring to criticise its crass behaviours,
while trying to deflect issues onto users.
Its crassness starts here:
-a-a c:\c>gcc
-a-a gcc: fatal error: no input files
-a-a compilation terminated.
Simple, clear, and to-the-point.
Most command-line compilers give you version and help info when no
parameters follow.
Some do, some do not.
Most command-line tools - gcc included - give you version information
if you write "gcc --version", and help if you give "gcc --help".
But at least it says something; try this:
-a-a c:\c\as
and it apparently hangs (it's waiting for you type an assembly
program from the console!)
Many programs can work as pipes.-a It is waiting for input from stdin,
not particularly from the console.-a Programs that often get their
input directly from other programs work this way.
How did programs which work like some student's crude first console
app ever make it into the wild?
Perhaps it is because the developers know how to write programs
designed to do useful jobs in a way that is convenient and efficient
for the tasks they actually have to do?-a Maybe the developers of "as"
expected users to have a clue about what they are doing?
Both are at odds with how similar command line tools work. gcc and as
are even at odds with each other:
- gcc complains about the missing input file (in a manner that treats it
-a as a compilation error)
- as defaults to reading content from stdin
- Given two files, gcc compiles them independently; as assembles them
-a after effectively combining them (imagine if gcc concatenated all the
-a .c files you give it; it would be ludicrous).
So I repeat that this is not how you would sensibly write such tools.
I
mean, is it unreasonable to expect '-shared' on Windows to result in a
file ending with .dll rather than .exe?
But gcc and as are given a pass because ... that's how the original
crude versions worked and for some reason it was never practical to
change it?
In that case say so, rather than pretending that those quirks are really desirable features.
I mean, you do 'gcc prog1.c', wait some time for it to produce 'a.exe'.
Now you do 'gcc prog2.c', and it promptly overwrites the 'a.exe' from
the last compile! That is quite laughable.
At the moment, compiling my bignum library on Windows looks like this:
-a gcc -shared -s bignum.c -o bignum.dll-a-a-a # .dll is 101KB
-a bcc -dll bignum-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a # .dll is 16KB
Yes, I know, you never use gcc directly; invocations are hidden within makefiles, IDEs, and shell scripts.
But I'm discussing their merits /as/ command-line tools that you use hands-on.
On 18/09/2026 01:04, Steven G. Kargl wrote:
On Thu, 17 Sep 2026 20:54:35 +0100, bart wrote:
Most command-line compilers give you version and help info when no
parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program
from the console!)
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs without >input, as often that gives usage info.
'man' doesn't exist on Windows.
On Thu, 17 Sep 2026 17:50:57 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Well, if you consider compatibility with weird notion of "user
interface" of its original creator as a valid reason, then yes.
Even I accept it as valid.
Which does not make it less bad in the absolute sense.
Desire to give to user an option to accept an input from standard
input by itself is not unreasonable, bit it should be an option rather
than default.
On 2026-09-10, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 9/9/2026 5:43 AM, David Brown wrote:
[...]
Just defining the symbol is fine - for use as a pure header guard,
where the check is with "#ifndef" or "#ifdef", defining it to a
value has no added value. Adding the "1" in that example was done
without thinking.
________
#ifndef __NUMBER_GENERATOR_H__
#define __NUMBER_GENERATOR_H__ 1
________
Is that __* non conformant? Does it breach the impl name prefix
space?
No matter what you name anything in C, you are playing roulette.
Vendor extensions and new standard features introduce identifiers
into namespaces that have not been hitherto reserved.
It's like a traffic code. If you intrude into a namespace, it's
like running a stop sign. Nothing bad might happen, but if it
does, it is on you.
However, C naming is like a residential neighborhood full of
unguarded intersections, with only a few stop signs.
There isn't anything reasonable you can do to 100% ensure you will
never have a clash with anything in your C programming. (By
"reasonable", I do not intend to introduce moving goalposts:
specifically, I mean, not subjecting yourself to some horribly
inconvenient naming scheme in every single namespace which makes
it vanishingly improbable of ever seeing a clash).
bart <bc@freeuk.com> writes:So how do they tell whether a program is hanging, or is waiting for input?
On 18/09/2026 01:04, Steven G. Kargl wrote:
On Thu, 17 Sep 2026 20:54:35 +0100, bart wrote:
Most command-line compilers give you version and help info when no
parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program >>>> from the console!)
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs without
input, as often that gives usage info.
Please try to speak for yourself.
Those familiar with unix would understand implicitly, as many
commands will read from stdin if no filename is specified.
Michael S <already5chosen@yahoo.com> writes:
On Thu, 17 Sep 2026 17:50:57 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Well, if you consider compatibility with weird notion of "user
interface" of its original creator as a valid reason, then yes.
Even I accept it as valid.
Which does not make it less bad in the absolute sense.
Desire to give to user an option to accept an input from standard
input by itself is not unreasonable, bit it should be an option
rather than default.
That's your opinion. That's not the unix philosophy. Many
unix commands default to stdin if no file name is specified
(specifically to support streaming the output of one command
to the input of another).
By convention a single dash character may be specified
in place of a filename to specify stdin.
On 17/09/2026 23:06, Keith Thompson wrote:
But if you have two versions A and B, and both their paths are listed in
the PATH variable, then when B's gcc tries to run cc1.exe, it will be
A's version, as A's path is listed first.
It's the> responsibility of the gcc+FOO and gcc+BAR installers to arrange
for their respecive gcc's to avoid conflicting with each other.
Packaging gcc for Windows is more difficult than packaging gcc
for Unix-like systems.
It's not hard; it should really have used a path relative to B's gcc.exe.
It would still pick A's gcc.exe if typing an unqualified 'gcc' by
itself, but how does Linux solve this problem when you have two gcc's to >choose from?
So, no comment on the fact that it can take three goes before gcc gets
the DLL extension right?
On 18/09/2026 03:04, bart wrote:
On 17/09/2026 23:06, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than-a -a-a You just have to read the fscking manual.
where it keeps its system headers, or how to set it up to look
permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
Obviously untrue.
Let's say they're out of fashion.
Let's not. Lots of people use them for various purposes.
On Fri, 18 Sep 2026 12:55:11 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <118i2mc$q9l1$1@dont-email.me>, bart <bc@freeuk.com>
wrote:
On 17/09/2026 23:06, Keith Thompson wrote: =20=20
bart <bc@freeuk.com> writes: =20
On 17/09/2026 08:24, tTh wrote: =20=20
On 9/17/26 02:49, bart wrote: =20
And I've no idea where gcc would look for its headers, other=C2=A0=C2=A0 You just have to read the fscking manual.
than where it keeps its system headers, or how to set it up to
look permanently in certain places. =20
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html =20
Nobody uses environment variables any more. =20
Obviously untrue. =20
Let's say they're out of fashion. =20
Why would you say such a thing? While they may not be the most
elegant solution to a number of problems, they're very much in
use, and "in fashion", at least on Unix-derived systems.
=20
- Dan C.
=20
Would you design a new program which behavior can be modified by
environment variables? I don't mean standard environment variables, like >locale (although that is also less than great) but environment
variables specific to your program?
On Fri, 18 Sep 2026 15:28:21 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 17 Sep 2026 17:50:57 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Well, if you consider compatibility with weird notion of "user
interface" of its original creator as a valid reason, then yes.
Even I accept it as valid.
Which does not make it less bad in the absolute sense.
Desire to give to user an option to accept an input from standard
input by itself is not unreasonable, bit it should be an option
rather than default.
That's your opinion. That's not the unix philosophy. Many
unix commands default to stdin if no file name is specified
(specifically to support streaming the output of one command
to the input of another).
There is big difference between utilities like grep or sort and
something like as. Blindly treating them as the same is wrong.
By convention a single dash character may be specified
in place of a filename to specify stdin.
The latter is reasonable. What as does is not.
[...]On 17/09/2026 21:54, bart wrote:
[...]I'm not interested in gcc. [...]
The program "gcc" is a driver program, written by the GCC folks, and
run directly by developers. "as" is an assembler, written by the
binutils folks, that is very rarely used directly by developers.
Were I writing a new assembler for Linux, I would probably not make it
work as a pipe by default - and require a dash or two, or another command-line option. Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error or perhaps with a "use --help for help" message. (Or perhaps with no
output at all, which I think would also be a reasonable choice.) So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least
somewhat better.
On 18/09/2026 16:24, Scott Lurndal wrote:[...]
Those familiar with unix would understand implicitly, as manySo how do they tell whether a program is hanging, or is waiting for input?
commands will read from stdin if no filename is specified.
FFS would it hurt to print a message showing what is expected?
It is exasperating that people defend such poor UIs.
bart <bc@freeuk.com> writes:[...]
On 17/09/2026 23:06, Keith Thompson wrote:
But if you have two versions A and B, and both their paths are listed in >>the PATH variable, then when B's gcc tries to run cc1.exe, it will be
A's version, as A's path is listed first.
It's the> responsibility of the gcc+FOO and gcc+BAR installers to arrange >>> for their respecive gcc's to avoid conflicting with each other.
Packaging gcc for Windows is more difficult than packaging gcc
for Unix-like systems.
It's not hard; it should really have used a path relative to B's gcc.exe.
It would still pick A's gcc.exe if typing an unqualified 'gcc' by
itself, but how does Linux solve this problem when you have two gcc's to >>choose from?
One can use modules:
$ module use --append /nfs/Software/module/my-common/modulefiles[...]
$ module load gcc/11.3
On 18/09/2026 15:03, bart wrote:
different ways, written by completely separate groups of people.-a The
fact that they have different defaults is hardly surprising - a compiler will rarely be used with piped input from outside, whereas for "as",
that is by far the most common mode of operation.
- Given two files, gcc compiles them independently; as assembles them
-a-a after effectively combining them (imagine if gcc concatenated all the >> -a-a .c files you give it; it would be ludicrous).
They are different kinds of programs, doing different things.-a Assembly files can reasonably be concatenated, C files cannot.
"gcc" is a driver
program, not a C compiler - it also deals with lots of different file
types.
-a (I did not know that "as" combines
multiple assembly files as you describe.-a But it is not a driver program
- it simply takes its input, and assembles it.)
to work.-a But we have already established that your opinions on such matters do not often match those of many others.
I mean, is it unreasonable to expect '-shared' on Windows to result in
a file ending with .dll rather than .exe?
As I understand it, the format for dll and exe files is the same on
Windows (as is the format for various other files), and both can contain directly executable code and resources that can be used by other
programs.
Still, it is unreasonable to expect people to specify the name they want
for a program or shared library?
-a It is normal for a program (or shared
library) to consist of multiple files - I think it would be highly
unusual to want to turn a single "x.c" file into a dll "x.dll".
I am sure that it makes sense that "gcc -shared x.c" could generate
"x.dll" on Windows.-a I am far from sure that failing to use "x.dll" as
the default name is a bother to anyone else.-a Other than a quick test of how gcc works, it's hard to imagine a use-case.
And of course, remember that gcc (and as) are native to an OS where the
type of a file is determined by the file, not by part of its name.
I mean, you do 'gcc prog1.c', wait some time for it to produce
'a.exe'. Now you do 'gcc prog2.c', and it promptly overwrites the
'a.exe' from the last compile! That is quite laughable.
So don't do that.
If you don't like the way gcc (or any other tools) work, and you feel
that your own tools are better for your uses, then use your own tools.
Or if you feel that you /have/ to use gcc, and that you can't cope with writing all these nasty, awkward switches and arguments, and think that build tools are just crutches for those that don't want to spend all day doing manual project management, then write a batch file:
gcc-dll.bat :
@echo off
gcc -shared -s %1.c -o %1.dll
gcc-exe.bat :
@echo off
gcc %1.c -o %1.exe
There.
After decades of gnashing your teeth and pulling out your hair,
I've given you the solution.-a I can't imagine you will use it, but there
it is.
bart <bc@freeuk.com> writes:
On 18/09/2026 16:24, Scott Lurndal wrote:[...]
Those familiar with unix would understand implicitly, as manySo how do they tell whether a program is hanging, or is waiting for input?
commands will read from stdin if no filename is specified.
By typing Control-D.
FFS would it hurt to print a message showing what is expected?
Yes, it would. I won't offer an explanation because you would not care
about it or admit that you understand it.
But if either seriously expect source code to be entered 'live', then
they should show a prompt; how hard would that be?
On 18/09/2026 19:29, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 16:24, Scott Lurndal wrote:[...]
Those familiar with unix would understand implicitly, as manySo how do they tell whether a program is hanging, or is waiting for input? >> By typing Control-D.
commands will read from stdin if no filename is specified.
How would they know without a message?
But suppose they did that, what happens, the program stops? What if it
was just busy; wouldn't Ctrl-D screw it up?
FFS would it hurt to print a message showing what is expected?Yes, it would. I won't offer an explanation because you would not
care about it or admit that you understand it.
Try me.
(In my last post I showed an example of my C compiler taking input
from stdin (requested, not as default!) and it displays a message. The
world is still turning.
On 2026-09-09 10:38, David Brown wrote:
On 09/09/2026 10:13, Janis Papanagnou wrote:
On 2026-09-08 13:47, bart wrote:
On 08/09/2026 01:02, Waldek Hebisch wrote:
[...]
[...]
Still, modern languages tend to have a module scheme, suggesting
the 'flexible' C approach (I'd use the term 'prehistoric') wasn't
quite enough.
A necessary consequence of the growing systems and software
architectures. But even some legacy languages had already
modularization concepts back then! So it's not an excuse to
provide only a primitive #include mechanism. But I wouldn't
be so critical given the time when "C" had been designed.
You should take into account C's design-principles and also
when it came out and sort them in, in comparison to other
language schools; compare (for example) the release dates
of Pascal -> Modula (and what these two provided here).
AFAIK, Pascal originally did not have any kind of "unit" system (its
module equivalent) - you used textual inclusion files. But you then
compiled everything as one big Pascal file rather than having
separate compilation. (This may have varied between Pascal
implementations.)
Yes, exactly. - Original Pascal didn't have anything, then came "C"
timely - providing something that Pascal didn't have! - and Wirth's
next language Modula then had a concept.
On Fri, 18 Sep 2026 15:28:21 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 17 Sep 2026 17:50:57 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Well, if you consider compatibility with weird notion of "user
interface" of its original creator as a valid reason, then yes.
Even I accept it as valid.
Which does not make it less bad in the absolute sense.
Desire to give to user an option to accept an input from standard
input by itself is not unreasonable, bit it should be an option
rather than default.
That's your opinion. That's not the unix philosophy. Many
unix commands default to stdin if no file name is specified
(specifically to support streaming the output of one command
to the input of another).
There is big difference between utilities like grep or sort and
something like as. Blindly treating them as the same is wrong.
David Brown <david.brown@hesbynett.no> writes:
[...]
Were I writing a new assembler for Linux, I would probably not make it
work as a pipe by default - and require a dash or two, or another
command-line option. Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error or
perhaps with a "use --help for help" message. (Or perhaps with no
output at all, which I think would also be a reasonable choice.) So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least
somewhat better.
If your new assembler were intended to be a drop-in replacement for
"as", are certain that this behavior would not break existing tools?
How sure are you that gcc, or clang, or some other tool, doesn't send
input to the assembler in a pipe? And why shouldn't they do so?
bart <bc@freeuk.com> writes:
[...]
But if either seriously expect source code to be entered 'live', then
they should show a prompt; how hard would that be?
There is no serious expectation that "as" will be read its input
from a keyboard.
You are complaining about things you clearly do
not understand and do not want to understand.
On 18/09/2026 19:29, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 16:24, Scott Lurndal wrote:[...]
By typing Control-D.Those familiar with unix would understand implicitly, as manySo how do they tell whether a program is hanging, or is waiting for input? >>
commands will read from stdin if no filename is specified.
How would they know without a message?
On Fri, 18 Sep 2026 20:14:29 +0100, bart wrote:In the case of 'as', that is 2,500 lines of text.
On 18/09/2026 19:29, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 16:24, Scott Lurndal wrote:[...]
By typing Control-D.Those familiar with unix would understand implicitly, as manySo how do they tell whether a program is hanging, or is waiting for input? >>>
commands will read from stdin if no filename is specified.
How would they know without a message?
<Rinse>
By reading the friendly documentation that comes with the tool.
Look, just admit these ancient applications have a shitty interface[...]
that no one has been able to improve or hasn't been allowed to.
Why pretend that how they work is actually desirable?
On 19/09/2026 01:19, Steven G. Kargl wrote:
On Fri, 18 Sep 2026 20:14:29 +0100, bart wrote:In the case of 'as', that is 2,500 lines of text.
On 18/09/2026 19:29, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 16:24, Scott Lurndal wrote:[...]
Those familiar with unix would understand implicitly, as manySo how do they tell whether a program is hanging, or is waiting for input?
commands will read from stdin if no filename is specified.
By typing Control-D.
How would they know without a message?
<Rinse>
By reading the friendly documentation that comes with the tool.
On 18/09/2026 09:10, Janis Papanagnou wrote:
On 2026-09-15 12:53, David Brown wrote:
On 15/09/2026 11:51, Janis Papanagnou wrote:[...]
And we all know we should be writing "if (a == 5)", with decent
spacing :-)
Sure. Above was just a deliberate terse form for inline reference.
Usually I'm using probably more spacing inline and between lines
and chapters than the average programmer would find tolerable. ;-)
I like space - it aids legibility.-a There's a reason the biggest key on
the keyboard is the spacebar, and the second biggest is the return key.
Yes, things have gotten much better since the dates back then when
I did my professional programming in C/C++.
Tools have certainly got better, but the default warnings in compilers progress much too slowly IMHO.-a (Of course I can enable all the warning flags I like for my own use - but I'd prefer if everyone else used them more!)
You might be astonished but I don't recall to have needed any explicit
warnings setting; our policy was a zero-warning approach (by the default
warnings of our compilers), and where we identified any needs beyond we
communicated with the build-management to make it the company default.
Having good programmers, providing trainings and courses, helped also.
If the default warnings for your compiler matched something like "-Wall"
in gcc, then that could be a good starting point.
I don't know what compiler(s) you used,
but for many IME the default warnings are pretty
feeble.-a But it can certainly be impractical to insist on a specific
list of different warning options, especially when a project includes third-party code that might have different conventions.
David Brown <david.brown@hesbynett.no> writes:
On 18/09/2026 03:04, bart wrote:
On 17/09/2026 23:06, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 17/09/2026 08:24, tTh wrote:
On 9/17/26 02:49, bart wrote:
And I've no idea where gcc would look for its headers, other than >>>>>>> where it keeps its system headers, or how to set it up to look-a -a-a You just have to read the fscking manual.
permanently in certain places.
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Nobody uses environment variables any more.
Obviously untrue.
Let's say they're out of fashion.
Let's not. Lots of people use them for various purposes.
Indeed, they're ubiquitous. Cf. $PATH, $HOME, $LANG (and $LC_*), $TERM
are used extensively.
On 18/09/2026 17:34, Michael S wrote:[...]
On Fri, 18 Sep 2026 15:28:21 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
[snip]
By convention a single dash character may be specified
in place of a filename to specify stdin.
The latter is reasonable. What as does is not.
From the manual page of "as" :
The primary use of "as" is for assembling the output of "gcc".-a I think
it would have been fine if "as" had required one or two dashes, or
another option, to indicated using stdin as the input - but I don't see
it as unreasonable that by default it works according to the stated
primary use of the program.
A common way to handle assembly files on Linux is to use "gcc file.s",
with whatever additional options you want, not "as file.s", just as it
is common to use "gcc" for linking rather than running "ld" directly.
Were I writing a new assembler for Linux, I would probably not make it
work as a pipe by default - and require a dash or two, or another command-line option.-a Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error or perhaps with a "use --help for help" message.-a (Or perhaps with no
output at all, which I think would also be a reasonable choice.)-a So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least somewhat better.
However, where is any of this actually likely to cause an issue in the
real world?-a No one would expect "as" to do anything useful without any input, or an option like "--version" or "--help".-a The only people
likely to be confused are those who have no idea what the program is,
and try to figure it out by typing "as".-a The flaw, IMHO, is not that
"as" works as a pipe by default, but its name is too short and generic. "gas" or "gasm" would have been better.
[...]
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:
On Thu, 17 Sep 2026 20:54:35 +0100, bart wrote:
Most command-line compilers give you version and help info when no
parameters follow. But at least it says something; try this:
c:\c\as
and it apparently hangs (it's waiting for you type an assembly program >>>> from the console!)
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs without
input, as often that gives usage info.
Please try to speak for yourself.
Those familiar with unix would understand implicitly, as many
commands will read from stdin if no filename is specified.
[...]
On Sat, 19 Sep 2026 02:06:09 +0100, bart wrote:
[...]
Again, why would you use a tool without actually learn how
the tool works?
On Sat, 19 Sep 2026 02:06:09 +0100, bart wrote:
By reading the friendly documentation that comes with the tool.In the case of 'as', that is 2,500 lines of text.
The info is in the 5th paragraph of the Description section.
This is the 20 and 21st lines of material that you has a user
should have at least skimmed. The first two sections are
simply an abbreviated enumeration of options and supported
targets.
Again, why would you use a tool without actually learn how
the tool works?
On 2026-09-19 05:26, Steven G. Kargl wrote:Regarding assemblers, usually that is the very least of the problems
On Sat, 19 Sep 2026 02:06:09 +0100, bart wrote:
[...]
Again, why would you use a tool without actually learn how
the tool works?
Inherent (and incurable) mental inabilities?
On 2026-09-18 11:37, David Brown wrote:
On 18/09/2026 09:10, Janis Papanagnou wrote:
On 2026-09-15 12:53, David Brown wrote:
On 15/09/2026 11:51, Janis Papanagnou wrote:[...]
And we all know we should be writing "if (a == 5)", with decent
spacing :-)
Sure. Above was just a deliberate terse form for inline reference.
Usually I'm using probably more spacing inline and between lines
and chapters than the average programmer would find tolerable. ;-)
I like space - it aids legibility.-a There's a reason the biggest key
on the keyboard is the spacebar, and the second biggest is the return
key.
And the third biggest the Backspace key to quickly erase all this
ugly code we wrote? ;-)
Yes, things have gotten much better since the dates back then when
I did my professional programming in C/C++.
Tools have certainly got better, but the default warnings in compilers
progress much too slowly IMHO.-a (Of course I can enable all the
warning flags I like for my own use - but I'd prefer if everyone else
used them more!)
Well, I cannot really tell about the more recent behaviors. All I
noticed was that I've got (or could enable) more diagnostics than
in earlier days, and that the information got better (in content
and in display representation) - it would certainly be bad if it
were otherwise.
David Brown <david.brown@hesbynett.no> writes:
[...]
Were I writing a new assembler for Linux, I would probably not make it
work as a pipe by default - and require a dash or two, or another
command-line option. Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error or
perhaps with a "use --help for help" message. (Or perhaps with no
output at all, which I think would also be a reasonable choice.) So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least
somewhat better.
If your new assembler were intended to be a drop-in replacement for
"as", are certain that this behavior would not break existing tools?
How sure are you that gcc, or clang, or some other tool, doesn't send
input to the assembler in a pipe? And why shouldn't they do so?
In any case, it's quite possible to invoke some of these inadvertently
by mistyping. Oh, I forgot, you are a perfect typist too!
On 18/09/2026 20:26, Keith Thompson wrote:
David Brown <david.brown@hesbynett.no> writes:
[...]
Were I writing a new assembler for Linux, I would probably not make it
work as a pipe by default - and require a dash or two, or another
command-line option.-a Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error or
perhaps with a "use --help for help" message.-a (Or perhaps with no
output at all, which I think would also be a reasonable choice.)-a So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least
somewhat better.
If your new assembler were intended to be a drop-in replacement for
"as", are certain that this behavior would not break existing tools?
No.-a I had not said my hypothetical new assembler would be a drop-in replacement for "as" - if it were, then obviously I'd follow the
behaviour of "as" here.-a It is unlikely that there is much to be gained
in replacing "as" directly - it does all that is needed for a companion
to a compiler.-a The only point, I would say, of writing a new assembler
for Linux would be for additional features or capabilities.-a (Or it
could be done for fun!)
How sure are you that gcc, or clang, or some other tool, doesn't send
input to the assembler in a pipe?-a And why shouldn't they do so?
gcc certainly sends its output to as using a pipe if you specify the "- pipe" option.-a Otherwise, it uses temporary files (on Linux, this is
pretty much the same efficiency as the temporary files are normally
never actually saved to the filesystem.-a Maybe Bart could tell us if
giving gcc the "-pipe" option affects the speed on his Windows gcc toolchain).
Are you really interested in learning something? Your history here does
not suggest that, but if you've changed your mind about that, I'm
willing to try to explain it. (Though I'm not sure I can explain
anything that hasn't already been explained in this thread.)
(In my last post I showed an example of my C compiler taking input
from stdin (requested, not as default!) and it displays a message. The
world is still turning.
Some programs read input from stdin if they don't receive any file name arguments. Others do not. Both approaches are valid. Apparently your
C compiler is an example of the latter.
One particular program, "as", can read its input from stdin. Have you somehow inferred from that that we all think your compiler should do the same?
in most cases i think it may be understood but sometimes if i read my
post some words i dont understand
this is becouse of unfortunate typos, but i write a big amounts of
posts and if iwould carefully read it all before osting i couldnt focus
(so its eventually better to write is as a stream of thought and then
post errata to it)
On 19/09/2026 01:19, Steven G. Kargl wrote:
On Fri, 18 Sep 2026 20:14:29 +0100, bart wrote:
On 18/09/2026 16:24, David Brown wrote:
On 18/09/2026 15:03, bart wrote:
-aSo "gcc" and "as" are wildly different tools that are used in wildly
different ways, written by completely separate groups of people.-a The
fact that they have different defaults is hardly surprising - a
compiler will rarely be used with piped input from outside, whereas
for "as", that is by far the most common mode of operation.
Actually, gcc on Windows seems to generate temporary .s files that are submitted to 'as'. Piping isn't used.
Both gcc and 'as' take inputs which are one or more files (sequences of bytes) and write outputs that are one or more files.
You probably can't get any simpler than that in a computer program.
Neither of them are really intended for interactive use either: that is, interaction while they run, beyond invoking them.
But if either seriously expect source code to be entered 'live', then
they should show a prompt; how hard would that be?
- Given two files, gcc compiles them independently; as assembles them
-a-a after effectively combining them (imagine if gcc concatenated all the >>> -a-a .c files you give it; it would be ludicrous).
They are different kinds of programs, doing different things.
Assembly files can reasonably be concatenated, C files cannot.
That is nonsense. ASM can contain local, non-exported symbols just like HLLs. For example two people might be writing two ASM files and they shouldn't need to ensure that their choices of labels do not clash.
"gcc" is a driver program, not a C compiler - it also deals with lots
of different file types.
So what's the name of the actual C compiler then, cc1.exe? That doesn't appear usable by itself:
So what's the name of the assembler proper? It seems everything comes
under the 'gcc' umbrella, out of necessity rather than convenience,
since the different components - cc1, as, ld - are pretty much unusable
by themselves.
to work.-a But we have already established that your opinions on such
matters do not often match those of many others.
OK. For some irrational reason, you are defending some behaviours
determined decades ago, which were clearly wrong, ludicrous, unsafe, or inconsistent.
You know, it would cost you nothing to say, Bart, you're right. But for historical and other reasons we're stuck with them and need to make the
best of a bad job.
I mean, is it unreasonable to expect '-shared' on Windows to result
in a file ending with .dll rather than .exe?
As I understand it, the format for dll and exe files is the same on
Windows (as is the format for various other files), and both can
contain directly executable code and resources that can be used by
other programs.
They have the same format, but files used as DLLs have extra stuff:
-a * Base relocation tables
-a * Must have relocatable code
-a * I think there is an extra segment
-a * An export table
-a * Different flags are set in the header
The .dll extension is normally used for these. Experiments trying to
load a DLL via LoadLibrary (ie. dlopen on Linux) suggest that an
extension other than .dll would be troublesome.
LoadLibrary Arg-a-a-a-a lib.dll-a-a-a-a-a lib.exe (actual name of DLL)
"lib"-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a Yes-a-a-a-a-a-a-a-a No "lib.dll"-a-a-a-a-a-a-a-a-a-a-a Yes-a-a-a-a-a-a-a-a No "lib.exe"-a-a-a-a-a-a-a-a-a-a-a No-a-a-a-a-a-a-a-a-a Yes
So it makes sense to use "lib" or "lib.dll" as the argument, and for
DLLs to use ".dll".
In any case, using .exe for DLLs would be confusing.
Still, it is unreasonable to expect people to specify the name they
want for a program or shared library?
I was mildly surprised that gcc on Windows allows "-o prog" and gcc will generate the file "prog.exe" without needing the extension.
This could reasonably lead people to think that with "-shared", it would write a .dll file. They would be wrong.
-a It is normal for a program (or shared library) to consist of
multiple files - I think it would be highly unusual to want to turn a
single "x.c" file into a dll "x.dll".
C compilers that don't follow gcc (clang follows gcc, and tcc follows it
on Linux only), tend to take the name of the first submitted C file as
the default name of the output, when there is one output.
(-c -S options generate multiple files.)
I am sure that it makes sense that "gcc -shared x.c" could generate
"x.dll" on Windows.-a I am far from sure that failing to use "x.dll" as
the default name is a bother to anyone else.-a Other than a quick test
of how gcc works, it's hard to imagine a use-case.
It's just wrong. A million people will use gcc and some of those will encounter some issue like this which at best wastes their time.
And of course, remember that gcc (and as) are native to an OS where
the type of a file is determined by the file, not by part of its name.
Fine. In that case don't bother with the extension if the extension is a lie.
But for DLLs, the extensions is important to make it visible, and there
will of course be further checks that are done.
I mean, you do 'gcc prog1.c', wait some time for it to produce
'a.exe'. Now you do 'gcc prog2.c', and it promptly overwrites the
'a.exe' from the last compile! That is quite laughable.
So don't do that.
Something else which is just plain wrong, and can waste a lot of time.
When you have to do twice the work of specifying an input, or you may
have to repeat a lengthy compile if you need to run an earlier, now overwritten, a.exe again.
If you don't like the way gcc (or any other tools) work, and you feel
that your own tools are better for your uses, then use your own tools.
That's exactly what I do. But gcc came up in this thread.
Or if you feel that you /have/ to use gcc, and that you can't cope
with writing all these nasty, awkward switches and arguments, and
think that build tools are just crutches for those that don't want to
spend all day doing manual project management, then write a batch file:
gcc-dll.bat :
@echo off
gcc -shared -s %1.c -o %1.dll
gcc-exe.bat :
@echo off
gcc %1.c -o %1.exe
There.
I do that too. It is a small C program called gc used like this:
-a gc prog
-a gc prog opt
It generates prog.exe and also adds the long-winded options needed for
my generated C code.
But it's not flexible enough for ad hoc needs. Then I have to use gcc
and it's a nuisance because of its quirks.
After decades of gnashing your teeth and pulling out your hair, I've
given you the solution.-a I can't imagine you will use it, but there it
is.
It's a workaround. gcc is what, 85,000 source files, but I still have to write scripts to make it usable?!
On 19/09/2026 12:10, David Brown wrote:
On 18/09/2026 20:26, Keith Thompson wrote:
David Brown <david.brown@hesbynett.no> writes:
[...]
Were I writing a new assembler for Linux, I would probably not make it >>>> work as a pipe by default - and require a dash or two, or another
command-line option.-a Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error or >>>> perhaps with a "use --help for help" message.-a (Or perhaps with no
output at all, which I think would also be a reasonable choice.)-a So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least
somewhat better.
If your new assembler were intended to be a drop-in replacement for
"as", are certain that this behavior would not break existing tools?
No.-a I had not said my hypothetical new assembler would be a drop-in
replacement for "as" - if it were, then obviously I'd follow the
behaviour of "as" here.-a It is unlikely that there is much to be
gained in replacing "as" directly - it does all that is needed for a
companion to a compiler.-a The only point, I would say, of writing a
new assembler for Linux would be for additional features or
capabilities.-a (Or it could be done for fun!)
How sure are you that gcc, or clang, or some other tool, doesn't send
input to the assembler in a pipe?-a And why shouldn't they do so?
gcc certainly sends its output to as using a pipe if you specify the
"- pipe" option.-a Otherwise, it uses temporary files (on Linux, this
is pretty much the same efficiency as the temporary files are normally
never actually saved to the filesystem.-a Maybe Bart could tell us if
giving gcc the "-pipe" option affects the speed on his Windows gcc
toolchain).
For building sql.c, then using -pipe consistently gave compile-times of around 7.25 seconds vs 7.5 or so without it. About 4% faster, but this
at -O0.
Using -O3, then it was 50.1 seconds vs 52.5 seconds (tested once only).
I expected the difference to be still around 0.25 seconds (the EXE sizes won't be that different), but then I also forgot to do -s.
On 18/09/2026 17:34, Michael S wrote:
On Fri, 18 Sep 2026 15:28:21 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 17 Sep 2026 17:50:57 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Well, if you consider compatibility with weird notion of "user
interface" of its original creator as a valid reason, then yes.
Even I accept it as valid.
Which does not make it less bad in the absolute sense.
Desire to give to user an option to accept an input from standard
input by itself is not unreasonable, bit it should be an option
rather than default.
That's your opinion. That's not the unix philosophy. Many
unix commands default to stdin if no file name is specified
(specifically to support streaming the output of one command
to the input of another).
There is big difference between utilities like grep or sort and
something like as. Blindly treating them as the same is wrong.
By convention a single dash character may be specified
in place of a filename to specify stdin.
The latter is reasonable. What as does is not.
From the manual page of "as" :
"""
as is primarily intended to assemble the output of the GNU C compiler
"gcc" for use by the linker "ld". Nevertheless, we've tried to make
as assemble correctly everything that other assemblers for the same
machine would assemble. Any exceptions are documented explicitly.
This doesn't mean as always uses the same syntax as another assembler
for the same architecture; for example, we know of several
incompatible versions of 680x0 assembly language syntax.
Each time you run as it assembles exactly one source program. The
source program is made up of one or more files. (The standard input
is also a file.)
You give as a command line that has zero or more input file names.
The input files are read (from left file name to right). A
command-line argument (in any position) that has no special meaning
is taken to be an input file name.
If you give as no file names it attempts to read one input file from
the as standard input, which is normally your terminal. You may have
to type ctl-D to tell as there is no more program to assemble.
Use -- if you need to explicitly name the standard input file in your command line.
"""
The primary use of "as" is for assembling the output of "gcc". I
think it would have been fine if "as" had required one or two dashes,
or another option, to indicated using stdin as the input - but I
don't see it as unreasonable that by default it works according to
the stated primary use of the program.
A common way to handle assembly files on Linux is to use "gcc
file.s", with whatever additional options you want, not "as file.s",
just as it is common to use "gcc" for linking rather than running
"ld" directly.
Were I writing a new assembler for Linux, I would probably not make
it work as a pipe by default - and require a dash or two, or another command-line option. Running "my-new-assembler" with no options or
files would exit immediately, perhaps with a "no input files" error
or perhaps with a "use --help for help" message. (Or perhaps with no
output at all, which I think would also be a reasonable choice.) So
while I think "act as a pipe" is a reasonable choice for "as" with no
input files, I think there are other choices that are at least
somewhat better.
However, where is any of this actually likely to cause an issue in
the real world? No one would expect "as" to do anything useful
without any input, or an option like "--version" or "--help". The
only people likely to be confused are those who have no idea what the
program is, and try to figure it out by typing "as".
The flaw, IMHO,
is not that "as" works as a pipe by default, but its name is too
short and generic. "gas" or "gasm" would have been better.
On the other hand, I have a number of times run a "grep" command and wondered why it was taking so long - because I'd forgotten to give it
the files to search! (That's my fault, not grep's.)
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 12:55:11 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <118i2mc$q9l1$1@dont-email.me>, bart <bc@freeuk.com>
wrote:
On 17/09/2026 23:06, Keith Thompson wrote: =20=20
bart <bc@freeuk.com> writes: =20
On 17/09/2026 08:24, tTh wrote: =20=20
On 9/17/26 02:49, bart wrote: =20
And I've no idea where gcc would look for its headers, other=C2=A0=C2=A0 You just have to read the fscking manual.
than where it keeps its system headers, or how to set it up
to look permanently in certain places. =20
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
=20
Nobody uses environment variables any more. =20
Obviously untrue. =20
Let's say they're out of fashion. =20
Why would you say such a thing? While they may not be the most
elegant solution to a number of problems, they're very much in
use, and "in fashion", at least on Unix-derived systems.
=20
- Dan C.
=20
Would you design a new program which behavior can be modified by >environment variables? I don't mean standard environment variables,
like locale (although that is also less than great) but environment >variables specific to your program?
Absolutely.
And they would be well documented in the manual page for the program.
LD_DEBUG, for example, is quite useful in certain usage cases and
effectively impossible to handle with a command line option flag.
On 2026-09-18, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
Are you really interested in learning something? Your history here does
not suggest that, but if you've changed your mind about that, I'm
willing to try to explain it. (Though I'm not sure I can explain
anything that hasn't already been explained in this thread.)
(In my last post I showed an example of my C compiler taking input
from stdin (requested, not as default!) and it displays a message. The
world is still turning.
Some programs read input from stdin if they don't receive any file name
arguments. Others do not. Both approaches are valid. Apparently your
C compiler is an example of the latter.
One particular program, "as", can read its input from stdin. Have you
somehow inferred from that that we all think your compiler should do the
same?
Some fish have spent their lives living in a very small pool and know it
very well, and then they go for a trip in the sea and it is very
frightening! It contains environments and objects that they have no comprehension off, and if the fish is old and set in his or her ways
the wider world will always be a mystery!
On the other hand, I have a number of times run a "grep" command and wondered why it was taking so long - because I'd forgotten to give it
the files to search! (That's my fault, not grep's.)
On 18/09/2026 21:07, bart wrote:
On 18/09/2026 16:24, David Brown wrote:
On 18/09/2026 15:03, bart wrote:
-a-aSo "gcc" and "as" are wildly different tools that are used in wildly
different ways, written by completely separate groups of people.-a The
fact that they have different defaults is hardly surprising - a
compiler will rarely be used with piped input from outside, whereas
for "as", that is by far the most common mode of operation.
Actually, gcc on Windows seems to generate temporary .s files that are
submitted to 'as'. Piping isn't used.
Piping is an option that is used on some systems, and not on others, and
it can be enabled with "gcc -pipe".-a Whether you are using a pipe or a temporary file, the prime use of "as" is not as a program run by a user,
but as a program run by "gcc".
Both gcc and 'as' take inputs which are one or more files (sequences
of bytes) and write outputs that are one or more files.
You probably can't get any simpler than that in a computer program.
So now gcc is a simple program?
But if either seriously expect source code to be entered 'live', then
they should show a prompt; how hard would that be?
That's a meaningless question, as the pre-condition is clearly false.
I accept that it is fine for a program to print a quick help message
when run with incomplete or incorrect arguments.-a But it is also fine
for it to give an error message.-a And for some programs, it can be appropriate to show nothing when given no arguments, or to wait for
input from stdin.-a All options are reasonable for some kinds of
programs.-a In some programs you wrote, you picked one method, in some programs other people have written, they picked a different solution.
Your personal opinions do not form the requirements for all the world's software.
So let me be more nuanced - /sometimes/ it is reasonable to concatenate assembly files, and assembly files may be written with that in mind.-a It
is almost never reasonable to concatenate C source files.
For an assembler designed with direct use as a primary aim, you could reasonably pick a different handling of multiple source files - maybe
they would be assembled independently to generate multiple object files,
or maybe they would be rejected as invalid use of the assembler (with a nice, friendly help message if you don't like error messages).
-a For an
assembler designed primarily to be called from a compiler driver
program,
None of us here wrote any of the tools under discussion.
There are reasonable uses of files as both executables and libraries.
Very often in my Python coding, I will have a Python file that is
intended for use as a "library" (i.e., to be imported from other
modules, scripts or Python shells) but which can also be run directly
for test purposes or as simple command-line programs.
-a For large enough
programs, it is normal to separate the dll's from the exe's, but
combining them in one file would surely suit your preference for minimum number of files.
This could reasonably lead people to think that with "-shared", it
would write a .dll file. They would be wrong.
So they have to learn how to use their tools.
C compilers that don't follow gcc (clang follows gcc, and tcc follows
it on Linux only), tend to take the name of the first submitted C file
as the default name of the output, when there is one output.
That seems reasonable for compilation - compiling "file.c" to "file.o".
gcc does that - "gcc -c file.c" produces "file.o".
Generating an exe file, or a shared library, is very likely to involveNaming it after the first or only file is a more reasonable default than a.out. Since this sequence:
more than one file.-a Naming the output after one file is therefore not helpful.-a Naming it "a.out" is not particularly helpful either, but
that's the tradition.
Something else which is just plain wrong, and can waste a lot of time.
When you have to do twice the work of specifying an input, or you may
have to repeat a lengthy compile if you need to run an earlier, now
overwritten, a.exe again.
Again, when you see this as an issue, it is because you are doing things wrong.
Remember, you are not doing software development here, or doing any programming.-a You are not writing code and producing executables or libraries.
Now, I realise that the way I use my tools and the setups I have is not necessarily typical of anyone else.-a But a quick check of the command
line used for each individual compile in my current project shows 111 arguments ( over about 2300 characters.-a That includes all the include directory flags (blame idiot microcontroller manufacturer SDKs for their necessity, not me or gcc),
optimisation flags, a dozen flags for details of the exact target
processor features, lots and lots of warning flags, and one argument specifying the output file name and directory.-a For the linking call to
gcc - the one you are most upset about - there are about 760 arguments
over 60,000 characters due to the 729 object file names and their directories.
-a (These are all automatically generated by my makefiles.)
That's a /real/ project for a /real/ program.
-a Do you honestly think
that having a better (IYHO) default choice of output filename would make
a difference?
bart <bc@freeuk.com> writes:
On 19/09/2026 01:19, Steven G. Kargl wrote:
On Fri, 18 Sep 2026 20:14:29 +0100, bart wrote:
<snip> a bunch of irrelevent text that boils down to a single acronym:
RTFM
On Fri, 18 Sep 2026 18:08:38 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 18/09/2026 17:34, Michael S wrote:
On Fri, 18 Sep 2026 15:28:21 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Thu, 17 Sep 2026 17:50:57 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
bart <bc@freeuk.com> writes:
On 18/09/2026 01:04, Steven G. Kargl wrote:[...]
Most people read (or at least skim) the documentation
that comes with the software they use.
Most people probably don't. They will try running such programs
without input, as often that gives usage info.
[...]
You've seen how that approach fails.
There are valid reasons for the way "as" behaves.
Well, if you consider compatibility with weird notion of "user
interface" of its original creator as a valid reason, then yes.
Even I accept it as valid.
Which does not make it less bad in the absolute sense.
Desire to give to user an option to accept an input from standard
input by itself is not unreasonable, bit it should be an option
rather than default.
That's your opinion. That's not the unix philosophy. Many
unix commands default to stdin if no file name is specified
(specifically to support streaming the output of one command
to the input of another).
There is big difference between utilities like grep or sort and
something like as. Blindly treating them as the same is wrong.
By convention a single dash character may be specified
in place of a filename to specify stdin.
The latter is reasonable. What as does is not.
From the manual page of "as" :
"""
as is primarily intended to assemble the output of the GNU C compiler
"gcc" for use by the linker "ld". Nevertheless, we've tried to make
as assemble correctly everything that other assemblers for the same
machine would assemble. Any exceptions are documented explicitly.
This doesn't mean as always uses the same syntax as another assembler
for the same architecture; for example, we know of several
incompatible versions of 680x0 assembly language syntax.
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar in capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to
process gcc output into objects.
On the other hand, I have a number of times run a "grep" command and
wondered why it was taking so long - because I'd forgotten to give it
the files to search! (That's my fault, not grep's.)
If grep required additional option for acception of input from stadard
input that would be [mildly] annoying.
On 19/09/2026 20:00, Michael S wrote:
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar in
capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to
process gcc output into objects.
I also have no idea when it was written, but nothing you wrote
contradicts it.-a As I understand it, "as" was originally intended to
work as the assembler for a compiler, but the developers also saw that
it could be made useful as a general-purpose stand-alone assembler.-a It
may even be the case that they put more effort into coding that aspect
of its use than handling compiler output.-a Nonetheless, handling
compiler output is their stated primary use-case.
(I've used a lot of different assemblers for microcontrollers
If grep required additional option for acception of input from stadard
input that would be [mildly] annoying.
Agreed.-a I'd rather occasionally be surprised when I forgot the filename than have to add an additional argument when I want to use it as a pipe.
On 19/09/2026 16:27, David Brown wrote:
On 18/09/2026 21:07, bart wrote:
On 18/09/2026 16:24, David Brown wrote:
On 18/09/2026 15:03, bart wrote:
-a-aSo "gcc" and "as" are wildly different tools that are used in wildly >>>> different ways, written by completely separate groups of people.
The fact that they have different defaults is hardly surprising - a
compiler will rarely be used with piped input from outside, whereas
for "as", that is by far the most common mode of operation.
Actually, gcc on Windows seems to generate temporary .s files that
are submitted to 'as'. Piping isn't used.
Piping is an option that is used on some systems, and not on others,
and it can be enabled with "gcc -pipe".-a Whether you are using a pipe
or a temporary file, the prime use of "as" is not as a program run by
a user, but as a program run by "gcc".
Both gcc and 'as' take inputs which are one or more files (sequences
of bytes) and write outputs that are one or more files.
You probably can't get any simpler than that in a computer program.
So now gcc is a simple program?
It's simple in that its job is to convert file A to file B for example.
But if either seriously expect source code to be entered 'live', then
they should show a prompt; how hard would that be?
That's a meaningless question, as the pre-condition is clearly false.
Steven GK's opening post contained just such an example. I guess as an example of how 'useful' the feature is.
I accept that it is fine for a program to print a quick help message
when run with incomplete or incorrect arguments.-a But it is also fine
for it to give an error message.-a And for some programs, it can be
appropriate to show nothing when given no arguments, or to wait for
input from stdin.-a All options are reasonable for some kinds of
programs.-a In some programs you wrote, you picked one method, in some
programs other people have written, they picked a different solution.
Your personal opinions do not form the requirements for all the
world's software.
My experience of my developing such tools plus 50 years' experience of
using tools from non-Unix-like systems.
-a For an assembler designed primarily to be called from a compiler
driver program,
If such programs cannot be easily used from a console, then why even
bother? Just have them as dynamic libraries with an API. The inputs and outputs can be strings instead of files, so you get the advantages of piping.
None of us here wrote any of the tools under discussion.
Well that is one big difference then because I also write CLI tools.
There are reasonable uses of files as both executables and libraries.
Very often in my Python coding, I will have a Python file that is
intended for use as a "library" (i.e., to be imported from other
modules, scripts or Python shells) but which can also be run directly
for test purposes or as simple command-line programs.
Scripting languages are different: eg. in mine each module can have a
'main' function that is run if this is the lead module, or ignored otherwise.
(Python will have some means to do that via __main__ etc.)
Actually I have a similar feature in my systems lang: a subprogram can contain its own main() routine which is ignored when it is imported into
the main app.
For example, I've given my 'bignum' library a main() routine. I can
compile and run it by itself:
-a c:\mx>mm -r bignum
-a Bignum Main-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a # it doesn't do much
But I can still use it like this within another app:
-a import bignum
The library is still compiled into the EXE (it's not a DLL). However, I can't now use:
-a-a module bignum
since the compiler reports two main() functions.
-a For large enough programs, it is normal to separate the dll's from
the exe's, but combining them in one file would surely suit your
preference for minimum number of files.
The largest DLL on my machine is chrome.dll at about 300MB. It exports
just 6 functions, to do with starting or restarting Chrome.
This could reasonably lead people to think that with "-shared", it
would write a .dll file. They would be wrong.
So they have to learn how to use their tools.
They have to learn this dangerous QUIRK. And the people responsible for
the compiler might think about fixing that quirk.
On 19/09/2026 21:09, bart wrote:
On 19/09/2026 16:27, David Brown wrote:
On 18/09/2026 21:07, bart wrote:
On 18/09/2026 16:24, David Brown wrote:
On 18/09/2026 15:03, bart wrote:
-a-aSo "gcc" and "as" are wildly different tools that are used in wildly >>>>> different ways, written by completely separate groups of people.
The fact that they have different defaults is hardly surprising - a >>>>> compiler will rarely be used with piped input from outside, whereas >>>>> for "as", that is by far the most common mode of operation.
Actually, gcc on Windows seems to generate temporary .s files that
are submitted to 'as'. Piping isn't used.
Piping is an option that is used on some systems, and not on others,
and it can be enabled with "gcc -pipe".-a Whether you are using a pipe
or a temporary file, the prime use of "as" is not as a program run by
a user, but as a program run by "gcc".
Both gcc and 'as' take inputs which are one or more files (sequences
of bytes) and write outputs that are one or more files.
You probably can't get any simpler than that in a computer program.
So now gcc is a simple program?
It's simple in that its job is to convert file A to file B for example.
OK.
But if either seriously expect source code to be entered 'live',
then they should show a prompt; how hard would that be?
That's a meaningless question, as the pre-condition is clearly false.
Steven GK's opening post contained just such an example. I guess as an
example of how 'useful' the feature is.
Don't pretend to be so na|>ve.-a You know fine that neither Steven nor anyone else actively types assembly files like that in real life.
I accept that it is fine for a program to print a quick help message
when run with incomplete or incorrect arguments.-a But it is also fine
for it to give an error message.-a And for some programs, it can be
appropriate to show nothing when given no arguments, or to wait for
input from stdin.-a All options are reasonable for some kinds of
programs.-a In some programs you wrote, you picked one method, in some
programs other people have written, they picked a different solution.
Your personal opinions do not form the requirements for all the
world's software.
My experience of my developing such tools plus 50 years' experience of
using tools from non-Unix-like systems.
You are still talking about your own personal opinions, and your
experience is in a small (indeed, mostly single-person) part of the
software world.-a As you reject and dismiss out of hand every tool, language, program or OS you come across that you have not written
yourself, you give up any expectations you have that people will take
your opinions and thoughts seriously.-a (You are, of course, fully
entitled to your preferences and opinions.)
-a For an assembler designed primarily to be called from a compiler
driver program,
If such programs cannot be easily used from a console, then why even
bother? Just have them as dynamic libraries with an API. The inputs
and outputs can be strings instead of files, so you get the advantages
of piping.
You have a /very/ weird idea about what is "easy" or "hard" to use.
Scripting languages are different: eg. in mine each module can have a
'main' function that is run if this is the lead module, or ignored
otherwise.
Python is not a scripting language - it is a programming language that
can also be used for scripts.-a But it is not a compiled language.
Actually I have a similar feature in my systems lang: a subprogram can
contain its own main() routine which is ignored when it is imported
into the main app.
For example, I've given my 'bignum' library a main() routine. I can
compile and run it by itself:
-a-a c:\mx>mm -r bignum
-a-a Bignum Main-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a # it doesn't do much
But I can still use it like this within another app:
-a-a import bignum
The library is still compiled into the EXE (it's not a DLL). However,
I can't now use:
-a-a-a module bignum
since the compiler reports two main() functions.
So you have partial support for this feature.-a Do you find it useful?
They have to learn this dangerous QUIRK. And the people responsible
for the compiler might think about fixing that quirk.
As with your ideas about what makes a program "hard" or "easy", you have
a very, very strange idea about what makes a program "dangerous".-a We
are still talking about adding "-o file.dll" as a command line argument.
Someone who doesn't know they need to give the output filename,
I suppose it would be out of the question to give it a different nameI forgot my C compiler has the feature too. So since this is a C forum:
for those two purposes? I thought Linux was great at the sort of thing.
I sometimes do that too, but I just use a copy:
-a c:\mx>copy mm.exe ms.exe
-a-a-a-a-a-a-a-a-a 1 file(s) copied.
-a c:\mx>mm hello
-a Compiling hello.m to hello.exe
-a c:\mx>ms hello
-a Hello, World
On 20/09/2026 11:31, David Brown wrote:
On 19/09/2026 21:09, bart wrote:
On 19/09/2026 16:27, David Brown wrote:
On 18/09/2026 21:07, bart wrote:
On 18/09/2026 16:24, David Brown wrote:
On 18/09/2026 15:03, bart wrote:
-a For an assembler designed primarily to be called from a compiler
driver program,
If such programs cannot be easily used from a console, then why even
bother? Just have them as dynamic libraries with an API. The inputs
and outputs can be strings instead of files, so you get the
advantages of piping.
You have a /very/ weird idea about what is "easy" or "hard" to use.
Unix has some weird idea of its own. It likes to use shells, scripts and text for its workings.
They have to learn this dangerous QUIRK. And the people responsible
for the compiler might think about fixing that quirk.
As with your ideas about what makes a program "hard" or "easy", you
have a very, very strange idea about what makes a program
"dangerous".-a We are still talking about adding "-o file.dll" as a
command line argument.
Yes, and it is someone using "-o file" expecting it to default to ".dll" instead of ".exe" that is the problem.
As for dangerous, think of it as UB in C; anything could happen. Maybe
they are replacing an existing file.dll that has a dangerous bug. They
do a fix, but it silently writes file.exe leaving the bad file.dll in
place.
You don't see that as an issue? OK. But it is purely because you think nobody should directly use such tools anyway.
Someone who doesn't know they need to give the output filename,
You say that as though HAVING to give an output file name is perfectly normal!
Imagine invoking an editor on file.txt but also having to do -o
file.text to stop it saving the result to a.txt!
All C compilers for Windows other than gcc and clang will compile file.c into file.exe without being told.
WHAT IS THE POSSIBLE ADVANTAGE OF THEM WRITING A.EXE INSTEAD?
So they can be a 'drop-in' for gcc? Then nothing would ever changes.
Besides, didn't you say all invocations of gcc ought to specify the
output file?
Then under what possible circumstance would writing 'a.exe' ever make
sense!
On 20/09/2026 13:42, bart wrote:
You don't see that as an issue? OK. But it is purely because you think
nobody should directly use such tools anyway.
Yet again - stop believing you know what other people think, or
inventing things you think they say.-a Try /reading/ posts instead, and
try to understand what they actually wrote.
So you don't have an answer and there is no advantage. It is justWHAT IS THE POSSIBLE ADVANTAGE OF THEM WRITING A.EXE INSTEAD?
Then under what possible circumstance would writing 'a.exe' ever make
sense!
Google for the answer.-a You won't listen if anyone tells you.
On 20/09/2026 14:08, David Brown wrote:
On 20/09/2026 13:42, bart wrote:
You don't see that as an issue? OK. But it is purely because you
think nobody should directly use such tools anyway.
Yet again - stop believing you know what other people think, or
inventing things you think they say.-a Try /reading/ posts instead, and
try to understand what they actually wrote.
I read this:
DB:
"You are not writing code and producing executables or libraries. People
who do that use the best tools they can get to make their job easier and give better results - they use proper editors or ides, and proper build tools.-a No sane developer wants to type in a compile command line for
every compilation, ..."
On 20/09/2026 14:08, David Brown wrote:
On 20/09/2026 13:42, bart wrote:
You don't see that as an issue? OK. But it is purely because you
think nobody should directly use such tools anyway.
Yet again - stop believing you know what other people think, or
inventing things you think they say.-a Try /reading/ posts instead, and
try to understand what they actually wrote.
I read this:
DB:
"You are not writing code and producing executables or libraries. People
who do that use the best tools they can get to make their job easier and give better results - they use proper editors or ides, and proper build tools.-a No sane developer wants to type in a compile command line for
every compilation, ..."
WHAT IS THE POSSIBLE ADVANTAGE OF THEM WRITING A.EXE INSTEAD?
Then under what possible circumstance would writing 'a.exe' ever make
sense!
Google for the answer.-a You won't listen if anyone tells you.So you don't have an answer and there is no advantage. It is just
pointless and annoying ancient baggage which makes the tools a pain to
use directly from the command line.
The sad thing is that newer tools strive to replicate that same behaviour.
On 18/09/2026 21:07, bart wrote:
So what's the name of the assembler proper? It seems everything comes
under the 'gcc' umbrella, out of necessity rather than convenience,
since the different components - cc1, as, ld - are pretty much unusable
by themselves.
"as" is the name of the assembler "proper". It is not part of gcc, and
nor is "ld". ("ld" and "as" are both part of the "binutils" project.)
And no one else has suggested that "as" is not usable by itself - merely >that this is not the /primary/ use-case. This is different for "cc1",
which is absolutely intended only as an internal program called from
"gcc", and there is not likely to be any reason to run it directly.
Note that failing to print a help message when you run "as" without >parameters does not make it "pretty much unusable".
Also note that in the *nix world, the behaviour of gcc, cc1, as, ld and >other related programs here are quite normal. They follow conventions
used by other toolchains found in the *nix world, and people can and do
mix and match to a certain extent. I think that's less common now that
the *nix world has pretty much settled on Linux and BSD, with the
commercial unix systems and their dedicated toolchains no longer as popular.
On 20/09/2026 14:08, David Brown wrote:
WHAT IS THE POSSIBLE ADVANTAGE OF THEM WRITING A.EXE INSTEAD?
Then under what possible circumstance would writing 'a.exe' ever make
sense!
Google for the answer.-a You won't listen if anyone tells you.So you don't have an answer and there is no advantage.
On Fri, 18 Sep 2026 18:08:38 +0200
David Brown <david.brown@hesbynett.no> wrote:
"""
as is primarily intended to assemble the output of the GNU C compiler
"gcc" for use by the linker "ld". Nevertheless, we've tried to make
as assemble correctly everything that other assemblers for the same
machine would assemble. Any exceptions are documented explicitly.
This doesn't mean as always uses the same syntax as another assembler
for the same architecture; for example, we know of several
incompatible versions of 680x0 assembly language syntax.
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar in >capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to
process gcc output into objects.
On Fri, 18 Sep 2026 15:47:01 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
LD_DEBUG, for example, is quite useful in certain usage cases and
effectively impossible to handle with a command line option flag.
Why impossible?
Because devs of gnu ld.so were inconsistent or for other reasons?
On 20/09/2026 14:22, bart wrote:
On 20/09/2026 14:08, David Brown wrote:
On 20/09/2026 13:42, bart wrote:
You don't see that as an issue? OK. But it is purely because you
think nobody should directly use such tools anyway.
Yet again - stop believing you know what other people think, or
inventing things you think they say.-a Try /reading/ posts instead,
and try to understand what they actually wrote.
I read this:
DB:
"You are not writing code and producing executables or libraries.
People who do that use the best tools they can get to make their job
easier and give better results - they use proper editors or ides, and
proper build tools.-a No sane developer wants to type in a compile
command line for every compilation, ..."
One thing puzzles me: if you are correct, then why is it that newer compilers such as for Go, Rust and Zig display a gorgeous set of usage instructions when invoked by their name?
Further, all of them will compile hello.go etc to hello.exe without
being told.
Why don't they write 'a.exe' by default and force users to have to
specify the output file every time? Because that's better, right?
The proper object file from a C compiler when no explicit
object file has been specified is a.out[*].
That Window implementations of GCC changes that to .exe is erroneous, as the output of the compile need not be an executable file; it may
be an intermediate object file or a shared object.
On 20/09/2026 15:22, bart wrote:[...]
Does this mean you want me to tell you where "a.out" and "a.exe" comes
from?
David Brown <david.brown@hesbynett.no> writes:
On 20/09/2026 15:22, bart wrote:[...]
Does this mean you want me to tell you where "a.out" and "a.exe" comes
from?
No, bart didn't ask you to tell him where "a.out" and "a.exe" come
from.
On 20/09/2026 23:19, Keith Thompson wrote:
David Brown <david.brown@hesbynett.no> writes:
On 20/09/2026 15:22, bart wrote:[...]
Does this mean you want me to tell you where "a.out" and "a.exe" comes
from?
No, bart didn't ask you to tell him where "a.out" and "a.exe" come
from.
I asked this:
"WHAT IS THE POSSIBLE ADVANTAGE OF THEM WRITING A.EXE INSTEAD?
On 20/09/2026 15:54, bart wrote:
On 20/09/2026 14:22, bart wrote:
On 20/09/2026 14:08, David Brown wrote:
On 20/09/2026 13:42, bart wrote:
One thing puzzles me: if you are correct, then why is it that newer
compilers such as for Go, Rust and Zig display a gorgeous set of usage
instructions when invoked by their name?
That is a non-sequitur.
David Brown <david.brown@hesbynett.no> writes:
On 20/09/2026 15:54, bart wrote:
On 20/09/2026 14:22, bart wrote:
On 20/09/2026 14:08, David Brown wrote:
On 20/09/2026 13:42, bart wrote:
One thing puzzles me: if you are correct, then why is it that newer
compilers such as for Go, Rust and Zig display a gorgeous set of usage
instructions when invoked by their name?
That is a non-sequitur.
Indeed.
I actually find such things annoying[*]. If I want usage instructions,
I'll read the corresponding manual pages.
A single line should
be sufficient, if they must be printed.
$ fred
usage: fred -lt -c <count> <filename>
[*] Such instructions just add useless cruft to the terminal scroll
buffer replacing useful history with useless verbiage.
David Brown <david.brown@hesbynett.no> writes:
On 20/09/2026 15:54, bart wrote:
One thing puzzles me: if you are correct, then why is it that newer
compilers such as for Go, Rust and Zig display a gorgeous set of usage
instructions when invoked by their name?
That is a non-sequitur.
Indeed.
I actually find such things annoying[*]. If I want usage instructions,
I'll read the corresponding manual pages. A single line should
be sufficient, if they must be printed.
$ fred
usage: fred -lt -c <count> <filename>
[*] Such instructions just add useless cruft to the terminal scroll
buffer replacing useful history with useless verbiage.
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 18:08:38 +0200
David Brown <david.brown@hesbynett.no> wrote:
"""
as is primarily intended to assemble the output of the GNU C
compiler "gcc" for use by the linker "ld". Nevertheless, we've
tried to make as assemble correctly everything that other
assemblers for the same machine would assemble. Any exceptions
are documented explicitly. This doesn't mean as always uses the
same syntax as another assembler for the same architecture; for
example, we know of several incompatible versions of 680x0
assembly language syntax.
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar
in capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to >process gcc output into objects.
While true, David's point stands. By far and away, usage of as(1)
is most common in a compiler pipeline.
It is extremly rare
(other than for operating system processor initialization code
on Intel moving from real mode to long mode and for processor
exception and interrupt handling) for anyone to write
direct assembler code in modern software development environments.
On Sun, 20 Sep 2026 15:55:18 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 18:08:38 +0200
David Brown <david.brown@hesbynett.no> wrote:
"""
as is primarily intended to assemble the output of the GNU C
compiler "gcc" for use by the linker "ld". Nevertheless, we've
tried to make as assemble correctly everything that other
assemblers for the same machine would assemble. Any exceptions
are documented explicitly. This doesn't mean as always uses the
same syntax as another assembler for the same architecture; for
example, we know of several incompatible versions of 680x0
assembly language syntax.
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar
in capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to
process gcc output into objects.
While true, David's point stands. By far and away, usage of as(1)
is most common in a compiler pipeline.
Where adding " -" to 'as' invocation string would be zero cost.
Also, my impression is that nowadays 'as' is rarely use via pipe.
Personally, I stopped using -pipe flag in gcc ~15 years ago.
YMMV.
It is extremly rare
(other than for operating system processor initialization code
on Intel moving from real mode to long mode and for processor
exception and interrupt handling) for anyone to write
direct assembler code in modern software development environments.
I did it rather regularly in last May to July.
Indeed, it was nor "a real work" but hobby project.
On 20/09/2026 15:54, bart wrote:
On 20/09/2026 14:22, bart wrote:
On 20/09/2026 14:08, David Brown wrote:
On 20/09/2026 13:42, bart wrote:
You don't see that as an issue? OK. But it is purely because you
think nobody should directly use such tools anyway.
Yet again - stop believing you know what other people think, or
inventing things you think they say.a Try /reading/ posts
instead, and try to understand what they actually wrote.
I read this:
DB:
"You are not writing code and producing executables or libraries.
People who do that use the best tools they can get to make their
job easier and give better results - they use proper editors or
ides, and proper build tools.a No sane developer wants to type in
a compile command line for every compilation, ..."
One thing puzzles me: if you are correct, then why is it that newer compilers such as for Go, Rust and Zig display a gorgeous set of
usage instructions when invoked by their name?
That is a non-sequitur. I said that people normally use build tools
or other conveniences when doing serious development, and avoid
repetitively typing long command lines with lots of options. That
does not mean they /never/ run the compiler command directly. They
might do so for quick tests, or to show version information, or
perhaps to show some hints about arguments. gcc shows usage
instructions if you use the obvious option, "--help". Other tools
may show such information with no arguments - that's their choice.
Further, all of them will compile hello.go etc to hello.exe without
being told.
Sure. They have no history or compatibility to consider.
Why don't they write 'a.exe' by default and force users to have to
specify the output file every time? Because that's better, right?
It is better if people expect it to be that way. Don't change things
that are fine the way they are, and that people might be relying on
(however strange that may be to you).
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 15:47:01 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
LD_DEBUG, for example, is quite useful in certain usage cases and
effectively impossible to handle with a command line option flag.
Why impossible?
Because devs of gnu ld.so were inconsistent or for other reasons?
Because to do so, you would need to modify and rebuild your
application.
Exporting LD_DEBUG before you start the application requires no
changes to the application - and given the RTLD isn't technically
part of the application and most developers don't build their
own RTLD, it doesn't make sense to include run-time loader debugging capabilities in applications.
On Sun, 20 Sep 2026 15:55:18 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 18:08:38 +0200
David Brown <david.brown@hesbynett.no> wrote:
"""
as is primarily intended to assemble the output of the GNU C
compiler "gcc" for use by the linker "ld". Nevertheless, we've
tried to make as assemble correctly everything that other
assemblers for the same machine would assemble. Any exceptions
are documented explicitly. This doesn't mean as always uses the
same syntax as another assembler for the same architecture; for
example, we know of several incompatible versions of 680x0
assembly language syntax.
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar
in capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to
process gcc output into objects.
While true, David's point stands. By far and away, usage of as(1)
is most common in a compiler pipeline.
Where adding " -" to 'as' invocation string would be zero cost.
Also, my impression is that nowadays 'as' is rarely use via pipe.
Personally, I stopped using -pipe flag in gcc ~15 years ago.
YMMV.
It is extremly rare
(other than for operating system processor initialization code
on Intel moving from real mode to long mode and for processor
exception and interrupt handling) for anyone to write
direct assembler code in modern software development environments.
I did it rather regularly in last May to July.
Indeed, it was nor "a real work" but hobby project.
On 21/09/2026 19:41, Michael S wrote:
On Sun, 20 Sep 2026 15:55:18 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 18:08:38 +0200
David Brown <david.brown@hesbynett.no> wrote:
"""
as is primarily intended to assemble the output of the GNU C
compiler "gcc" for use by the linker "ld".-a Nevertheless, we've
tried to make as assemble correctly everything that other
assemblers for the same machine would assemble.-a Any exceptions
are documented explicitly. This doesn't mean as always uses the
same syntax as another assembler for the same architecture; for
example, we know of several incompatible versions of 680x0
assembly language syntax.
I don't know when this paragraph was written.
Today's gnu as is pretty reasonable tool for assembler develpment.
Decent macro capabilities etc... Likely, not on par with
macro-assemblers of IBM mainframes or of VAX/VMS, but rather similar
in capabilities to Microsoft's Masm or with nasm.
Certainly it is far more complete tool than what would be neeaded to
process gcc output into objects.
While true, David's point stands.-a By far and away, usage of as(1)
is most common in a compiler pipeline.
Where adding " -" to 'as'-a invocation string would be zero cost.
Changing things always has a non-zero cost, especially for long-
established programs that are used by other programs or in scripts, makefiles, etc.-a Requiring " - " to use stdin would have been zero cost when development "as" was started (or perhaps when development of older assemblers were started, before "as" copied their functionality).-a But changing things later could break things for no appreciable gain.
I did it rather regularly in last May to July.
Indeed, it was nor "a real work" but hobby project.
Sure, people /do/ use "as" directly for assembly code.-a But in
comparison to its use in connection with a compiler, it is "extremely rare".-a You are just one of these rarities :-)
On 21/09/2026 19:41, Michael S wrote:[snip]
On Sun, 20 Sep 2026 15:55:18 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
While true, David's point stands. By far and away, usage of as(1)
is most common in a compiler pipeline.
Where adding " -" to 'as' invocation string would be zero cost.
Changing things always has a non-zero cost, especially for
long-established programs that are used by other programs or in scripts, makefiles, etc. Requiring " - " to use stdin would have been zero cost
when development "as" was started
On 22/09/2026 10:28, David Brown wrote:
Changing things always has a non-zero cost, especially for long-
established programs that are used by other programs or in scripts,
makefiles, etc.-a Requiring " - " to use stdin would have been zero cost
when development "as" was started (or perhaps when development of older
assemblers were started, before "as" copied their functionality).-a But
changing things later could break things for no appreciable gain.
I believe the original 'as' was from 1971, and the GNU version fro 1986.
You'd think that "-" as an option could have been added at some point,
and default stdin deprecated.
On Sun, 20 Sep 2026 23:24:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
Further, all of them will compile hello.go etc to hello.exe without=20=20
being told.
=20
Sure. They have no history or compatibility to consider.
=20
gcc is relatively new tool.
On Sun, 20 Sep 2026 15:58:27 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 15:47:01 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
LD_DEBUG, for example, is quite useful in certain usage cases and
effectively impossible to handle with a command line option flag.
Why impossible?
Because devs of gnu ld.so were inconsistent or for other reasons?
Because to do so, you would need to modify and rebuild your
application.
Exporting LD_DEBUG before you start the application requires no
changes to the application - and given the RTLD isn't technically
part of the application and most developers don't build their
own RTLD, it doesn't make sense to include run-time loader debugging
capabilities in applications.
The question was about possibilty to call your app via "ld.so myapp >-relevant-flags".
On Tue, 22 Sep 2026 11:28:03 +0200, David Brown wrote:
On 21/09/2026 19:41, Michael S wrote:[snip]
On Sun, 20 Sep 2026 15:55:18 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
While true, David's point stands. By far and away, usage of as(1)
is most common in a compiler pipeline.
Where adding " -" to 'as' invocation string would be zero cost.
Changing things always has a non-zero cost, especially for
long-established programs that are used by other programs or in scripts,
makefiles, etc. Requiring " - " to use stdin would have been zero cost
when development "as" was started
Given the Unix origins of "as", I would ascribe a trivial, but non-zero
cost to the inclusion of an " - " flag.
as(1), as originally developed, would have had stdin already open and ready for use at process startup.
However, the parsing of a flag, even as trivial--
as an " - " flag, costs some lines of code, and a few unnecessary CPU cycles on each run. Trivial, yes, but not "zero cost".
[snip]
On Tue, 22 Sep 2026 14:22:05 +0000, Lew Pitcher wrote:
On Tue, 22 Sep 2026 11:28:03 +0200, David Brown wrote:
On 21/09/2026 19:41, Michael S wrote:[snip]
On Sun, 20 Sep 2026 15:55:18 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
While true, David's point stands. By far and away, usage of as(1)
is most common in a compiler pipeline.
Where adding " -" to 'as' invocation string would be zero cost.
Changing things always has a non-zero cost, especially for
long-established programs that are used by other programs or in scripts, >>> makefiles, etc. Requiring " - " to use stdin would have been zero cost >>> when development "as" was started
Given the Unix origins of "as", I would ascribe a trivial, but non-zero
cost to the inclusion of an " - " flag.
as(1), as originally developed, would have had stdin already open and ready >> for use at process startup.
OK, I'm going to correct myself here. as(1), as originally developed, appeared >in Unix before the advent of pipes, so the original would /not/ have stdin >already open and usable. I'm not fluent in PDP-7 or PDP-11 assembly language >(the language as(1) was coded in up until Unix Version 8), so I won't speculate
on /what/ the original as(1) did instead.
Michael S <already5chosen@yahoo.com> writes:
On Sun, 20 Sep 2026 23:24:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
Further, all of them will compile hello.go etc to hello.exe=20
without=20 being told.
=20
Sure. They have no history or compatibility to consider.
=20
gcc is relatively new tool.
For some value of 'new' that includes 39 years?
Michael S <already5chosen@yahoo.com> writes:
On Sun, 20 Sep 2026 15:58:27 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
Michael S <already5chosen@yahoo.com> writes:
On Fri, 18 Sep 2026 15:47:01 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
LD_DEBUG, for example, is quite useful in certain usage cases
and effectively impossible to handle with a command line option
flag.
Why impossible?
Because devs of gnu ld.so were inconsistent or for other reasons?
Because to do so, you would need to modify and rebuild your
application.
Exporting LD_DEBUG before you start the application requires no
changes to the application - and given the RTLD isn't technically
part of the application and most developers don't build their
own RTLD, it doesn't make sense to include run-time loader
debugging capabilities in applications.
The question was about possibilty to call your app via "ld.so myapp >-relevant-flags".
Why? Leaving aside the difficulty of disambiguating flags for
the app from flags for ld.so before starting the app, LD_DEBUG
works great and there is no reason to change it.
C gives you choice: you can have detailed control of what is
imported at cost of writing a lot of '#include' lines or you can
have common header which includes "everthing".
Some even specify individual names to be imported from a module.
What a complete waste of time!
On Wed, 9 Sep 2026 19:12:44 +0100, bart wrote:
Some even specify individual names to be imported from a module.
What a complete waste of time!
On the contrary, I think thatrCOs great for managing complex code.
Python offers you a choice between, e.g.
from math import \
cos, sin
in which case you can happily use rCLcosrCY and rCLsinrCY unqualified in that module, versus
import math
In which case you have to write rCLmath.cosrCY, rCLmath.sinrCY etc.
Either way, it is easy enough to search through the code to find out
where a name comes from; in both cases, it goes back to the import
statement that names the module.
Think of import statements as a cross-reference mechanism built into
the language. When initially reading the program, you will naturally
skip over any long list of imports at the start; but you will start
going back and referring to them as you come across particular names
and try to understand that they mean.
On 23/09/2026 00:27, Lawrence DrCOOliveiro wrote:
Think of import statements as a cross-reference mechanism built
into the language. When initially reading the program, you will
naturally skip over any long list of imports at the start; but you
will start going back and referring to them as you come across
particular names and try to understand that they mean.
When I turn on my Casio calculator then sin, cos etc all Just Work.
Why do I need to faff around with import and from statements and
even individually enable specific maths functions?
On Wed, 23 Sep 2026 01:01:01 +0100, bart wrote:
On 23/09/2026 00:27, Lawrence DrCOOliveiro wrote:
Think of import statements as a cross-reference mechanism built
into the language. When initially reading the program, you will
naturally skip over any long list of imports at the start; but you
will start going back and referring to them as you come across
particular names and try to understand that they mean.
When I turn on my Casio calculator then sin, cos etc all Just Work.
Why do I need to faff around with import and from statements and
even individually enable specific maths functions?
ThatrCOs OK for a relatively small, fixed set of functions, not so
scalable when you have a potentially large, open-ended set of
libraries that can be installed and imported from.
My basic real-valued trig example may seem simple-minded to you, but remember, Python also offers complex maths <https://docs.python.org/3/library/cmath.html>. Note the functions
have the same names.
And thatrCOs just a very basic case. There are more advanced ones I
could mention.
On 24/09/2026 00:38, Lawrence DrCOOliveiro wrote:
On Wed, 23 Sep 2026 01:01:01 +0100, bart wrote:
On 23/09/2026 00:27, Lawrence DrCOOliveiro wrote:
Think of import statements as a cross-reference mechanism built
into the language. When initially reading the program, you will
naturally skip over any long list of imports at the start; but
you will start going back and referring to them as you come
across particular names and try to understand that they mean.
When I turn on my Casio calculator then sin, cos etc all Just
Work.
Why do I need to faff around with import and from statements and
even individually enable specific maths functions?
ThatrCOs OK for a relatively small, fixed set of functions, not so
scalable when you have a potentially large, open-ended set of
libraries that can be installed and imported from.
I don't see the problem.
My own projects share up up 2000 identifiers between modules.
I don't find to collate the names and list them at the top; that
would a waste of time. The next project will use other imports.
They will not clash with anything else, because they all start with
SDL_ ...
My basic real-valued trig example may seem simple-minded to you,
but remember, Python also offers complex maths
<https://docs.python.org/3/library/cmath.html>. Note the functions
have the same names.
And thatrCOs just a very basic case. There are more advanced ones I
could mention.
Python has some issues. Cmath using the same names as Math means you
can't use 'from'.
Also there is no filter: all sorts of local crap could be exported
from Cmath that should be private.
On Thu, 24 Sep 2026 02:00:46 +0100, bart wrote:[...]
Python has some issues. Cmath using the same names as Math means you
can't use 'from'.
Sure you can.
DonrCOt know much about Python, do you? Find out more before trying to criticize.
Perhaps we should also be able to individually enable 'if', 'for'
'while' etc as needed!
bart <bc@freeuk.com> wrote:
Perhaps we should also be able to individually enable 'if', 'for'
'while' etc as needed!
Sure. In Common Lisp symbols like 'IF' have their builtin meaning
only when they came from "COMMON-LISP" package. Other packages
can import them (it is usual to import all "COMMON-LISP" symbols).
But, if needed, one can also give them another meaning.
On Thu, 24 Sep 2026 02:00:46 +0100, bart wrote:
On 24/09/2026 00:38, Lawrence DrCOOliveiro wrote:
On Wed, 23 Sep 2026 01:01:01 +0100, bart wrote:
On 23/09/2026 00:27, Lawrence DrCOOliveiro wrote:
Think of import statements as a cross-reference mechanism built
into the language. When initially reading the program, you will
naturally skip over any long list of imports at the start; but
you will start going back and referring to them as you come
across particular names and try to understand that they mean.
When I turn on my Casio calculator then sin, cos etc all Just
Work.
Why do I need to faff around with import and from statements and
even individually enable specific maths functions?
ThatrCOs OK for a relatively small, fixed set of functions, not so
scalable when you have a potentially large, open-ended set of
libraries that can be installed and imported from.
I don't see the problem.
My own projects share up up 2000 identifiers between modules.
I suspect thererCOs more than that in the Python standard library alone.
<https://docs.python.org/3/genindex-all.html>
I don't find to collate the names and list them at the top; that
would a waste of time. The next project will use other imports.
They will not clash with anything else, because they all start with
SDL_ ...
ThatrCOs a very crummy way of doing it, not to put too fine a point on it.
<https://docs.python.org/3/library/cmath.html>. Note the functions
have the same names.
And thatrCOs just a very basic case. There are more advanced ones I
could mention.
Python has some issues. Cmath using the same names as Math means you
can't use 'from'.
DonrCOt know much about Python, do you? Find out more before trying to criticize.
Also there is no filter: all sorts of local crap could be exported
from Cmath that should be private.
As Guido Van Rossum said, rCLWerCOre all consenting adults hererCY. If a
name begins with an underscore, thatrCOs a hint that itrCOs something internal to the module or class, and perhaps you shouldnrCOt be messing around with it. But if you really want to, and are willing to accept
the consequences, you can.
If you want a strict visiblity-controlling nanny language, stick to
Java.
On 2026-09-24 10:50, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
Perhaps we should also be able to individually enable 'if', 'for'
'while' etc as needed!
What a stupid suggestion!
Sure.-a In Common Lisp symbols like 'IF' have their builtin meaning
only when they came from "COMMON-LISP" package.-a Other packages
can import them (it is usual to import all "COMMON-LISP" symbols).
But, if needed, one can also give them another meaning.
On 24/09/2026 03:41, Lawrence DrCOOliveiro wrote:
On Thu, 24 Sep 2026 02:00:46 +0100, bart wrote:
On 24/09/2026 00:38, Lawrence DrCOOliveiro wrote:
On Wed, 23 Sep 2026 01:01:01 +0100, bart wrote:
On 23/09/2026 00:27, Lawrence DrCOOliveiro wrote:
Think of import statements as a cross-reference mechanism built
into the language. When initially reading the program, you will
naturally skip over any long list of imports at the start; but
you will start going back and referring to them as you come
across particular names and try to understand that they mean.
When I turn on my Casio calculator then sin, cos etc all Just
Work.
Why do I need to faff around with import and from statements and
even individually enable specific maths functions?
ThatrCOs OK for a relatively small, fixed set of functions, not so
scalable when you have a potentially large, open-ended set of
libraries that can be installed and imported from.
I don't see the problem.
My own projects share up up 2000 identifiers between modules.
I suspect thererCOs more than that in the Python standard library alone.
<https://docs.python.org/3/genindex-all.html>
You're missing my point: I can use those 2000 names by simpler
listing their containing modules /at one place/ in the application.
I don't need to list random subsets of those 2000 names at the top
of each of the dozens of modules that comprise the project.
BTW the first Python example I found online started with this:
from sdl2 import *
<https://docs.python.org/3/library/cmath.html>. Note the
functions have the same names.
And thatrCOs just a very basic case. There are more advanced ones I
could mention.
Python has some issues. Cmath using the same names as Math means
you can't use 'from'.
Sure you can.
Didn't you say 'Note the functions have the same names'? So here:
from math import sin
from cmath import sin
DonrCOt know much about Python, do you? Find out more before trying
to criticize.
Also there is no filter: all sorts of local crap could be exported
from Cmath that should be private.
As Guido Van Rossum said, rCLWerCOre all consenting adults hererCY. If a
name begins with an underscore, thatrCOs a hint that itrCOs something
internal to the module or class, and perhaps you shouldnrCOt be
messing around with it. But if you really want to, and are willing
to accept the consequences, you can.
Funny that I can't remember ever seeing such leading underscores.
On Thu, 24 Sep 2026 11:27:21 +0100, bart wrote:
On 24/09/2026 03:41, Lawrence DrCOOliveiro wrote:
<https://docs.python.org/3/genindex-all.html>
You're missing my point: I can use those 2000 names by simpler
listing their containing modules /at one place/ in the application.
I don't need to list random subsets of those 2000 names at the top
of each of the dozens of modules that comprise the project.
YourCOre missing *my* point: your approach doesnrCOt scale.
I counted the number of lines on that page: thererCOs over 18,000
entries there.
BTW the first Python example I found online started with this:
from sdl2 import *
I know. That kind of thing is all too commonly done. Trying to undo it
is like dumping a can of worms on the ground, and then trying to pick
them all up and put them back in the can. Not fun.
Start here: <https://docs.python.org/3/reference/simple_stmts.html#the-import-statement>
On 25/09/2026 00:54, Lawrence DrCOOliveiro wrote:
I counted the number of lines on that page: thererCOs over 18,000
entries there.
What is the relevance of that 18,000? How does it make anyone's life
easier if you have to write and maintain hundreds of extra declarations
in every module that uses some of those 18,000?
On Thu, 24 Sep 2026 11:27:21 +0100, bart wrote:
BTW the first Python example I found online started with this:
from sdl2 import *
I know. That kind of thing is all too commonly done. Trying to undo it
is like dumping a can of worms on the ground, and then trying to pick
them all up and put them back in the can. Not fun.
So, how would /you/ do it? For example, how would you write this simple program instead:
from sdl2 import *
SDL_init()
Start here:
<https://docs.python.org/3/reference/simple_stmts.html#the-import-statement>
Yes, Python's import facilities are a lot complex than mine.
On 2026-09-18, fir <profesor.fir@gmail.com> wrote:
in most cases i think it may be understood but sometimes if i read my
post some words i dont understand
this is becouse of unfortunate typos, but i write a big amounts of
posts and if iwould carefully read it all before osting i couldnt focus
(so its eventually better to write is as a stream of thought and then
post errata to it)
Do you also program in this way? Sometimes it is worth taking time to
think before writing.
I mostly ignore your scribblings precisely because of your stream of consciousness style. I suspect a lot of others do too. But keep on if
you are happy!
On 25/09/2026 00:54, Lawrence DrCOOliveiro wrote:
On Thu, 24 Sep 2026 11:27:21 +0100, bart wrote:
On 24/09/2026 03:41, Lawrence DrCOOliveiro wrote:
<https://docs.python.org/3/genindex-all.html>
You're missing my point: I can use those 2000 names by simpler
listing their containing modules /at one place/ in the application.
I don't need to list random subsets of those 2000 names at the top
of each of the dozens of modules that comprise the project.
YourCOre missing *my* point: your approach doesnrCOt scale.
What doesn't scale: my application, the library, or both?
On Fri, 25 Sep 2026 01:23:30 +0100Clashes (eg. two libraries export the same name) are not a problem. In
bart <bc@freeuk.com> wrote:
On 25/09/2026 00:54, Lawrence DrCOOliveiro wrote:
On Thu, 24 Sep 2026 11:27:21 +0100, bart wrote:
On 24/09/2026 03:41, Lawrence DrCOOliveiro wrote:
<https://docs.python.org/3/genindex-all.html>
You're missing my point: I can use those 2000 names by simpler
listing their containing modules /at one place/ in the application.
I don't need to list random subsets of those 2000 names at the top
of each of the dozens of modules that comprise the project.
YourCOre missing *my* point: your approach doesnrCOt scale.
What doesn't scale: my application, the library, or both?
Avoidance of name clashes.
Esp. so in absence of "The World Librarian" authority. But probbly even
if it was presenst.
On Fri, 25 Sep 2026 01:23:30 +0100, bart wrote:
On 25/09/2026 00:54, Lawrence DrCOOliveiro wrote:
I counted the number of lines on that page: thererCOs over 18,000
entries there.
What is the relevance of that 18,000? How does it make anyone's life
easier if you have to write and maintain hundreds of extra declarations
in every module that uses some of those 18,000?
You donrCOt have to: thatrCOs the point of being to explicitly control
what is imported.
On Thu, 24 Sep 2026 11:27:21 +0100, bart wrote:
BTW the first Python example I found online started with this:
from sdl2 import *
I know. That kind of thing is all too commonly done. Trying to undo it
is like dumping a can of worms on the ground, and then trying to pick
them all up and put them back in the can. Not fun.
So, how would /you/ do it? For example, how would you write this simple
program instead:
from sdl2 import *
SDL_init()
import sdl2
sdl2.init()
Start here:
<https://docs.python.org/3/reference/simple_stmts.html#the-import-statement>
Yes, Python's import facilities are a lot complex than mine.
A lot more subtle than the understanding of them you have demonstrated
so far. Including dealing with the objection you tried to bring
against them.
i think this list should be done maybe
but i would need to compose it
so this post is not yet a list but to open
a topic
two most top annoyances at the moment of my
memory is
I
-aneed of predeclarations (this is that i need
to declare a symbol up its usage as it cant be seen down
in code)
ITS TERRIBLE ANNOYING AND USELESS
II
-ano adhoc enums (tags) type - i mean
such i dont need tod efine i just may use it
like
foo('red'); foo('quick');
where in foo
foo(ad_hoc_enum e)
{
-a-a if(e=='red) ....
}
no definitions just tags
some could say i could use structures
struct red {}
struct quick {}
its not bad idea but i need tod efine it and that is
a problem (besides type problems) i need adhoc
this is so usefull and needed its probably
SECOND TERRIBLE ANNOYANCE
III....
other candidates are
1) that i need to repeat type names foo(floay x, float y, float z)
instedad of foo(float x,y,x)
2) that i need end line with ";" (where newline sign should work
3) that "," operator dont work in many cases
4) & and | should also be used for logical imo
(i would need to rethink if t needs some changes in language and when it ffalls) now
5) *p.s works bad
and yet few things
(i was writing on all this already but i hjust think official list
should be written)
On 24/09/2026 10:31, Janis Papanagnou wrote:
On 2026-09-24 10:50, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
Perhaps we should also be able to individually enable 'if', 'for'
'while' etc as needed!
What a stupid suggestion!
Sure.-a In Common Lisp symbols like 'IF' have their builtin meaning
only when they came from "COMMON-LISP" package.-a Other packages
can import them (it is usual to import all "COMMON-LISP" symbols).
But, if needed, one can also give them another meaning.
So Common Lisp is stupid?
But you also seem to be missing my point.
* Having to identify and give special treatment to selected names
That wouldn't work unless you remove the SDL_ prefix from all the
names exported from 'sdl2'.
But that will cause problems because the functions exported from
SDL2.DLL will still have 'SDL_'. You'd need to alias 1000 functions.
A lot more subtle than the understanding of them you have
demonstrated so far. Including dealing with the objection you tried
to bring against them.
You're suggesting both complexity and subtle, unexpected behaviours
are good.
On Fri, 25 Sep 2026 11:38:20 +0100, bart wrote:
That wouldn't work unless you remove the SDL_ prefix from all the
names exported from 'sdl2'.
Why would you need such a prefix anyway?
But that will cause problems because the functions exported from
SDL2.DLL will still have 'SDL_'. You'd need to alias 1000 functions.
This is Python. ThatrCOs easy to do.
True story: if you read the official OpenGL spec, all the names of
functions and constants are defined *without* rCLglrCY or rCLGL_rCY prefixes (respectively).
simply because, it seems, they are all done in C, which is a sad
language without support for namespaces.
Even more sadly, the C-language names carry over into wrappers for higher-level languages that *do* support namespaces, like Python.
Which adds precisely the name clutter you describe.
this simple routine to create my own library wrapper modules:
Now I can write OpenGL calls like this (example from my rCLShaderrCY class which wraps around an OpenGL shader):> def bind(self) :
"actually allocates GL resources and compiles the shader, if not already done so."
if self.id == None :
clear_error()
self.id = gl.CreateShader(self.type)
if self.id == 0 :
self.id = None
raise GLError(None, "creating shader")
#end if
gl.ShaderSource(self.id, self.source)
check_error("setting shader %d source" % self.id)
gl.CompileShader(self.id)
check_error("compiling shader %d source" % self.id)
if not gl.GetShaderiv(self.id, GL.COMPILE_STATUS) :
sys.stderr.write("Shader failed to compile source: %s\n" % self.source)
# debug
raise RuntimeError("Error compiling shader: " + gl.GetShaderInfoLog(self.id).decode())
#end if
#end if
#end bind
def bind(self) :not already done so."
"actually allocates GL resources and compiles the shader, if
if self.id == None :%s\n" % self.source)
clear_error()
self.id = gl_CreateShader(self.type)
if self.id == 0 :
self.id = None
raise GLError(None, "creating shader"
#end if
gl_ShaderSource(self.id, self.source)
check_error("setting shader %d source" % self.id)
gl_CompileShader(self.id)
check_error("compiling shader %d source" % self.id)
if not gl_GetShaderiv(self.id, GL_COMPILE_STATUS) :
sys.stderr.write("Shader failed to compile source:
# debuggl_GetShaderInfoLog(self.id).decode())
raise RuntimeError("Error compiling shader: " +
#end if
#end if
#end bind
What kind of rCLsubtle, unexpected behavioursrCY do you get from the
import mechanism in Python? ItrCOs actually designed to avoid that.
bart <bc@freeuk.com> wrote:
On 24/09/2026 10:31, Janis Papanagnou wrote:
On 2026-09-24 10:50, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
Perhaps we should also be able to individually enable 'if', 'for'
'while' etc as needed!
What a stupid suggestion!
Sure.-a In Common Lisp symbols like 'IF' have their builtin meaning
only when they came from "COMMON-LISP" package.-a Other packages
can import them (it is usual to import all "COMMON-LISP" symbols).
But, if needed, one can also give them another meaning.
So Common Lisp is stupid?
But you also seem to be missing my point.
Common Lisp ability to control visibility of 'IF' comes from general principles of Lisp. _Not_ having it would require extra effort.
Ability to replace system 'IF' by user provided one has some uses.
Imagine that you want to collect same statistics about runtime
behaviour of your program. User defined 'IF' can update statistics
and after that do the same thing as system 'IF'. In other words
user can add essentially arbitrary instrumentation the program.
In C compiler like gcc you can ask compiler to add instrumentation,
which works for commonly needed things, but AFAICS things get
somewhere between hairy and impossible if you have nostandard
needs (IIUC gcc now supports plugins and they can do amazing
things, so if custom plugin can handle this, then it is just
hairy).
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
-aSo I came up with
this simple routine to create my own library wrapper modules:...
Would you really go to this much trouble in reality?
How much overhead are those attribute lookups going to add?
Would you really go to this much trouble in reality?
How much overhead are those attribute lookups going to add?
(BTW what happened to GLError?)
What kind of rCLsubtle, unexpected behavioursrCY do you get from the
import mechanism in Python? ItrCOs actually designed to avoid that.
I gave an example:
from math import sin
from cmath import sin
print(sin(30/57))
One 'sin' silently replaces the other.
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
True story: if you read the official OpenGL spec, all the names of
functions and constants are defined *without* rCLglrCY or rCLGL_rCY prefixes >> (respectively).
Link? Because here for example:
https://registry.khronos.org/OpenGL-Refpages/gl4/
the 'gl' is present. All exports from opengl.dll use 'gl' or 'wgl', and
from glu32.dll they have "glu". It would be confusing if several DLLs
all exported commonly named functions like "Start", "End", "Init", "Error".
People are used to "=" and "==", and I don't think there is an
actual problem to be solved.
I don't think anyone wants to go back to trigraphs.
You may view interface as information about what needs to be shared,
but IMO there is more to this. In badly designed program a lot must
be shared. In well designed program and assuming that problem domain
is suitable for modularization sharing is quite limited.
And frequently is is possible to replace implementation part by
quite a different thing without affectiong correctness of the
program.
On 25/09/2026 22:09, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
On 24/09/2026 10:31, Janis Papanagnou wrote:
On 2026-09-24 10:50, Waldek Hebisch wrote:
bart <bc@freeuk.com> wrote:
Perhaps we should also be able to individually enable 'if', 'for'
'while' etc as needed!
What a stupid suggestion!
Sure.-a In Common Lisp symbols like 'IF' have their builtin meaning
only when they came from "COMMON-LISP" package.-a Other packages
can import them (it is usual to import all "COMMON-LISP" symbols).
But, if needed, one can also give them another meaning.
So Common Lisp is stupid?
But you also seem to be missing my point.
Common Lisp ability to control visibility of 'IF' comes from general
principles of Lisp. _Not_ having it would require extra effort.
You mean, like having real syntax and proper reserved words?
This is 'extra' effort that even simple BASICs seems to manage!
Ability to replace system 'IF' by user provided one has some uses.
Imagine that you want to collect same statistics about runtime
behaviour of your program. User defined 'IF' can update statistics
and after that do the same thing as system 'IF'. In other words
user can add essentially arbitrary instrumentation the program.
In C compiler like gcc you can ask compiler to add instrumentation,
which works for commonly needed things, but AFAICS things get
somewhere between hairy and impossible if you have nostandard
needs (IIUC gcc now supports plugins and they can do amazing
things, so if custom plugin can handle this, then it is just
hairy).
If sounds like you are thinking up possible uses to fit around this
peculiar feature.
To me 'instrumentation' like this ('profiling'?) shouldn't impact on the language design, and should be more up to the implementation to provide.
So a compiler for example can apply it to its ordinary IF statements.
CLisp happens to work like that anyway, but you wouldn't compromise the design of a more conventional language to make it possible.
For example, implementing IF, FOR etc like user-functions would require advanced, inefficient features such as closures, and likely need special syntax.
Having reserved words is a drawback. Basically reserved words are
tolerated because good alternatives require effort and are little
known (PL/I is known to many folks, but it has its problems).
Lisp made a tradeof to make some things easy at the cost of syntax.
But alternative approaches are possible.
On Sat, 26 Sep 2026 11:44:53 +0100, bart wrote:
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
True story: if you read the official OpenGL spec, all the names of
functions and constants are defined *without* rCLglrCY or rCLGL_rCY prefixes
(respectively).
Link? Because here for example:
https://registry.khronos.org/OpenGL-Refpages/gl4/
the 'gl' is present. All exports from opengl.dll use 'gl' or 'wgl', and
from glu32.dll they have "glu". It would be confusing if several DLLs
all exported commonly named functions like "Start", "End", "Init", "Error".
<https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf>
bart <bc@freeuk.com> wrote:
Common Lisp ability to control visibility of 'IF' comes from general
principles of Lisp. _Not_ having it would require extra effort.
You mean, like having real syntax and proper reserved words?
This is 'extra' effort that even simple BASICs seems to manage!
Having reserved words is a drawback. Basically reserved words
are tolerated because good alternatives require effort and are
little known (PL/I is known to many folks, but it has its
problems).
Lisp made a tradeof to make some things easy at the cost of
syntax. But alternative approaches are possible. Dylan has
many of Lisp features, but traditional systax. Seed7 also
seem to have capabilities in this direction (but I did not
look deeper, so I may be wrong). Approach below is rather
different from Lisp and Dylan.
Ability to replace system 'IF' by user provided one has some uses.
Imagine that you want to collect same statistics about runtime
behaviour of your program. User defined 'IF' can update statistics
and after that do the same thing as system 'IF'. In other words
user can add essentially arbitrary instrumentation the program.
In C compiler like gcc you can ask compiler to add instrumentation,
which works for commonly needed things, but AFAICS things get
somewhere between hairy and impossible if you have nostandard
needs (IIUC gcc now supports plugins and they can do amazing
things, so if custom plugin can handle this, then it is just
hairy).
If sounds like you are thinking up possible uses to fit around this
peculiar feature.
To me 'instrumentation' like this ('profiling'?) shouldn't impact on the
language design, and should be more up to the implementation to provide.
So a compiler for example can apply it to its ordinary IF statements.
CLisp happens to work like that anyway, but you wouldn't compromise the
design of a more conventional language to make it possible.
For example, implementing IF, FOR etc like user-functions would require
advanced, inefficient features such as closures, and likely need special
syntax.
No. All you need are hooks into compiler. First, silly example
of 'if' (illustrating how builtin 'if' works):
if 1 < 2 then "OK" endif =>
** OK
That is the statement above is compiled and then executed. printing
OK.
Now we do:
vars save_if = valof("if");
syscancel("if");
After that builtin 'if' no longer works, it behaves as undefined
variable. So we provide new definition:
define syntax if;
printf('doing my if\n');
chain(save_if);
enddefine;
Now, we get:
if 1 < 2 then "OK" endif =>
doing my if
** OK
On 29/09/2026 01:56, Lawrence DrCOOliveiro wrote:
On Sat, 26 Sep 2026 11:44:53 +0100, bart wrote:
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
True story: if you read the official OpenGL spec, all the names
of functions and constants are defined *without* rCLglrCY or rCLGL_rCY >>>> prefixes (respectively).
Link? Because here for example:
https://registry.khronos.org/OpenGL-Refpages/gl4/
the 'gl' is present. All exports from opengl.dll use 'gl' or
'wgl', and from glu32.dll they have "glu". It would be confusing
if several DLLs all exported commonly named functions like
"Start", "End", "Init", "Error".
<https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf>
I can see why the gl (as I can now see that it is) and GL are not
shown: they reduce readability. But this is how everyone will be
using it.
OK, I'm going to correct myself here. as(1), as originally
developed, appeared in Unix before the advent of pipes, so the
original would /not/ have stdin already open and usable. I'm not
fluent in PDP-7 or PDP-11 assembly language (the language as(1) was
coded in up until Unix Version 8), so I won't speculate on /what/
the original as(1) did instead.
Do SDL3 use include guards? The expected convention is that header
looks like:
#ifndef XXXXXX
#define XXXXXX
...
#endif
with possibly some trivial variation. That first non-comment thing
in a header is a test and the whole body is inside a conditional.
Assuming that SDL3 is doing this (and if not you should complain to
them), then your compiler could recognize this pattern and skip the
header when it is included second time. For this you need to
recognize when two paths lead to the same file, recognize the test
and check that test is indeed false when doing second include.
Some headers may be intentionally included multiple times, but with
include guards you should be able to include most files just once.
IIUC both GCC and TCC handle this.
Some compilers support rCL#pragma oncerCY, which lets the compiler do the check just on the pathname of the include file, *before* actually
opening it. This would be faster.
Some headers may be intentionally included multiple times, but with
include guards you should be able to include most files just once.
IIUC both GCC and TCC handle this.
This is where rCL#pragma oncerCY falls down.
On Tue, 29 Sep 2026 14:27:37 +0100, bart wrote:
On 29/09/2026 01:56, Lawrence DrCOOliveiro wrote:
On Sat, 26 Sep 2026 11:44:53 +0100, bart wrote:
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
True story: if you read the official OpenGL spec, all the names
of functions and constants are defined *without* rCLglrCY or rCLGL_rCY >>>>> prefixes (respectively).
Link? Because here for example:
https://registry.khronos.org/OpenGL-Refpages/gl4/
the 'gl' is present. All exports from opengl.dll use 'gl' or
'wgl', and from glu32.dll they have "glu". It would be confusing
if several DLLs all exported commonly named functions like
"Start", "End", "Init", "Error".
<https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf>
I can see why the gl (as I can now see that it is) and GL are not
shown: they reduce readability. But this is how everyone will be
using it.
Only in languages that donrCOt support proper namespaces, as I pointed
out.
On 29/09/2026 05:06, Waldek Hebisch wrote:<snip>
bart <bc@freeuk.com> wrote:
<snip>Lisp made a tradeof to make some things easy at the cost of
syntax. But alternative approaches are possible. Dylan has
many of Lisp features, but traditional systax. Seed7 also
seem to have capabilities in this direction (but I did not
look deeper, so I may be wrong). Approach below is rather
different from Lisp and Dylan.
For example, implementing IF, FOR etc like user-functions would require
advanced, inefficient features such as closures, and likely need special >>> syntax.
No. All you need are hooks into compiler. First, silly example
of 'if' (illustrating how builtin 'if' works):
if 1 < 2 then "OK" endif =>
** OK
That is the statement above is compiled and then executed. printing
OK.
Now we do:
vars save_if = valof("if");
syscancel("if");
After that builtin 'if' no longer works, it behaves as undefined
variable. So we provide new definition:
define syntax if;
printf('doing my if\n');
chain(save_if);
enddefine;
Now, we get:
if 1 < 2 then "OK" endif =>
doing my if
** OK
Is this some sort of Forth?
And what is this last 'if 1 < 2 then "OK" endif' now equivalent to, is it:
printf('doing my if\n');
if 1 < 2 then "OK" endif # standard meaning of 'if'
or:
F() # does 'printf('doing my if\n'');
if 1 < 2 then "OK" endif # standard meaning of 'if'
(Probably the latter is better as then it is clear when the scope of
that printf line is.)
In either case, this looks more like that something that is the
compiler's job rather than language, with 'define', 'valof' and so on
being directives.
(I had something like this for functions, so that I could log each call.--
But it was program-wide and taken care of within the compiler, so source code of test programs was not affected. The logging code was also within
the compiler source.)
On 30/09/2026 03:02, Lawrence DrCOOliveiro wrote:
On Tue, 29 Sep 2026 14:27:37 +0100, bart wrote:
On 29/09/2026 01:56, Lawrence DrCOOliveiro wrote:
On Sat, 26 Sep 2026 11:44:53 +0100, bart wrote:
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
True story: if you read the official OpenGL spec, all the names
of functions and constants are defined *without* rCLglrCY or rCLGL_rCY >>>>>> prefixes (respectively).
Link? Because here for example:
https://registry.khronos.org/OpenGL-Refpages/gl4/
the 'gl' is present. All exports from opengl.dll use 'gl' or
'wgl', and from glu32.dll they have "glu". It would be confusing
if several DLLs all exported commonly named functions like
"Start", "End", "Init", "Error".
<https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf>
I can see why the gl (as I can now see that it is) and GL are not
shown: they reduce readability. But this is how everyone will be
using it.
Only in languages that donrCOt support proper namespaces, as I pointed
out.
You snipped this quote:
It boggles my mind that people still try to engage with him in
good faith, when he so rarely affords the same respect to
others.
On Wed, 30 Sep 2026 13:37:16 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
It boggles my mind that people still try to engage with him in
good faith, when he so rarely affords the same respect to
others.
Because while there is no doubt that Lawrence is troll, he is not a
useless troll.
On 30/09/2026 03:02, Lawrence DrCOOliveiro wrote:
On Tue, 29 Sep 2026 14:27:37 +0100, bart wrote:
On 29/09/2026 01:56, Lawrence DrCOOliveiro wrote:
On Sat, 26 Sep 2026 11:44:53 +0100, bart wrote:
On 26/09/2026 03:49, Lawrence DrCOOliveiro wrote:
True story: if you read the official OpenGL spec, all the names
of functions and constants are defined *without* rCLglrCY or rCLGL_rCY >>>>>> prefixes (respectively).
Link? Because here for example:
https://registry.khronos.org/OpenGL-Refpages/gl4/
the 'gl' is present. All exports from opengl.dll use 'gl' or
'wgl', and from glu32.dll they have "glu". It would be confusing
if several DLLs all exported commonly named functions like
"Start", "End", "Init", "Error".
<https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf>
I can see why the gl (as I can now see that it is) and GL are not
shown: they reduce readability. But this is how everyone will be
using it.
Only in languages that donrCOt support proper namespaces, as I pointed
out.
So it comes down to the fact that, in practice, you end up using some
sort of prefix anyway. Whether ".", "::", "_" or "" is used as a
separator is a minor detail.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 121:16:28 |
| Calls: | 1,194 |
| Files: | 1,352 |
| Messages: | 290,208 |