when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
#include <stdarg.h>
int Min(int count,...)
{
va_list args;
va_start(args,count);
```
int min=va_arg(args,int);
for(int i=1;i<count;i++)
{
int x=va_arg(args,int);
if(x<min) min=x;
}
va_end(args);
return min;
}
to use
int a=Min(4,10,3,7,-2); // -2
int b=Min(3,15,8,12); // 8
int c=Min(1,42); // 42
problem is imo this leading argument n, imo it should
just be called
min(34,34,2);
thus the variadic support probably need to change
imo it would be better if compiler would jut provide for user such
things as
*arg - (or *args?) (the ram block of arguments with size sizeof(*arg))
afg[0], arg[1], arg[2] - arguments vakues
arg - pointer to *arg
arg_n - how many
On 23/10/2026 07:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
Variadic functions have no way of counting their arguments, or
identifying their types. This can't be changed easily - it is built
into the way C functions are called (in pretty much every
implementation). The caller simply puts the arguments into registers or onto the stack according to the ABI for the target,
If I wanted to write such a variadic minimum function, I would do so
using a sentinel, with a macro to add the sentinel:
#define SENTINEL INT_MIN
#define min(x0, ...) min_func(x0 __VA_OPT__(,) __VA_ARGS__, SENTINEL)
int min_func(int x0, ...) {
va_list args;
va_start(args);
int m = x0;
while (true) {
int x = va_arg(args, int);
if (x == SENTINEL) return m;
if (x < m) m = x;
}
}
It is up to the user to ensure that the arguments to "min" are all ints,
and none of them match the sentinel value.
This code uses a C23 feature __VA_OPT__ which can be avoided using a gcc extension or some more complex macros. It also uses the C23 feature of va_start() without additional arguments. If you don't want C23, you can therefore use :
#define min(x0, ...) min_func(x0, ## __VA_ARGS__, SENTINEL)
va_start(args, x0);
But the C23 features make it slightly neater.
None of this means I think a variadic function here is a good idea.
On 23/10/2026 10:07, David Brown wrote:
On 23/10/2026 07:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
Variadic functions have no way of counting their arguments, or
identifying their types. This can't be changed easily - it is built
into the way C functions are called (in pretty much every
implementation). The caller simply puts the arguments into registers
or onto the stack according to the ABI for the target,
At last somebody who knows what ABI means.
If I wanted to write such a variadic minimum function, I would do so
using a sentinel, with a macro to add the sentinel:
#define SENTINEL INT_MIN
#define min(x0, ...) min_func(x0 __VA_OPT__(,) __VA_ARGS__, SENTINEL)
int min_func(int x0, ...) {
va_list args;
va_start(args);
int m = x0;
while (true) {
int x = va_arg(args, int);
if (x == SENTINEL) return m;
if (x < m) m = x;
}
}
It is up to the user to ensure that the arguments to "min" are all
ints, and none of them match the sentinel value.
This code uses a C23 feature __VA_OPT__ which can be avoided using a
gcc extension or some more complex macros. It also uses the C23
feature of va_start() without additional arguments. If you don't want
C23, you can therefore use :
#define min(x0, ...) min_func(x0, ## __VA_ARGS__, SENTINEL)
va_start(args, x0);
But the C23 features make it slightly neater.
None of this means I think a variadic function here is a good idea.
For this purpose, where all elements are expected to be the same type,
then passing a list is more appropriate, and more type-safe. Especially
when 'min_func' has a specific return type anyway.
Example:
#include <stdio.h>
#include <limits.h>
int min(int* list) {
enum {sentinel = 0};
int result = INT_MAX;
while (*list != sentinel) {
if (*list < result) result = *list;
++list;
}
return result;
}
int main(){
printf("%d\n", min((int[]){3,1,4,1,5,9,2,6,0}));
}
Although a tidier way of imparting the length is better. It depends on whether the common use-case is a small fixed number of elements, or an arbitrary array (where the length is likely in some variable.)
An even simpler way where the number of elements is small and is known,
is to just write dedicated functions such as min2(x, y) and min3(x, y,
z). The first will be by far the most common need IME.
Variadic functions have no way of counting their arguments, or
identifying their types.
On 23/10/2026 12:37, bartc wrote:
On 23/10/2026 10:07, David Brown wrote:
On 23/10/2026 07:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
Variadic functions have no way of counting their arguments, or
identifying their types. This can't be changed easily - it is built
into the way C functions are called (in pretty much every
implementation). The caller simply puts the arguments into registers
or onto the stack according to the ABI for the target,
At last somebody who knows what ABI means.
Note that an "ABI" encompasses many things - calling convention(s) are
just one (albeit important) part of it.
Although a tidier way of imparting the length is better. It depends on
whether the common use-case is a small fixed number of elements, or an
arbitrary array (where the length is likely in some variable.)
It could be combined with a macro :
int min_list(size_t n, const int * list) {
int m = list[0];
for (size_t i = 1; i < n; i++) {
if (list[i] < m) m = list[i];
}
return m;
}
#define min(...) min_list( \
sizeof((int []) { __VA_ARGS__ }) / sizeof(int), \
int []) { __VA_ARGS__ })
Then it can be called with just :
printf("%d\n", min(3, 1, 4, 1, 5, 9, 2, 6, 0));
Not a bad solution, when a single fixed type will do.
An even simpler way where the number of elements is small and is
known, is to just write dedicated functions such as min2(x, y) and
min3(x, y, z). The first will be by far the most common need IME.
You can take this a step further - here using macros so that it works
for any suitable type :
#define min2(a, b) (((a) < (b)) ? (a) : (b))
#define min3(a, b, c) min2(a, min2(b, c))
#define min4(a, b, c, d) min2(min2(a, b), min2(c, d))
#define min5(a, b, c, d, e) min2(min2(a, b), min3(c, d, e))
#define min_arg(a, b, c, d, e, ...) min5(a, b, c, d, e)
#define min(a, ...) min_arg(__VA_ARGS__ __VA_OPT__(,) a, a, a, a, a, a)
The first 5 are just "normal" fixed argument minX macros of different sizes. Then we make a variadic macro "min" that passes on the arguments
it is given, with extra copies of "a" so that min5 can always be called, along with an intermediary "min_arg" to absorb any unnecessary extra arguments.
(Again, I am not saying I recommend any of this, but it can be fun to
play around with.)
David Brown pisze:
Variadic functions have no way of counting their arguments, or
identifying their types.
this is silly becouse it cos t one register to use so its totally not a problem
David Brown pisze:
Variadic functions have no way of counting their arguments, or
identifying their types.
this is silly becouse it cos t one register to use so its totally not a problem
the case with various type arguments is much harder but the one with
"all ints" etc is quite easy
simpl as i said the user need the arg[] and arg_max avaliable
foo(int ...v)
{
for(int i=0; i<sizeof(v)/sizeof(int); i++)
{
}
}
i dont know maybe just same syntax can be used
foo(int[] v)
{
}
so you can put foo(tab) or foo(2,3,4,2,32,3,23,2) at will
thou this version would pass via pointer and is someone need to pass by stack probably would need to use f(int ...) version
On 23/10/2026 14:42, fir wrote:
David Brown pisze:It doesn't matter whether you think this is "silly" or not. It is a
Variadic functions have no way of counting their arguments, or
identifying their types.
this is silly becouse it cos t one register to use so its totally not
a problem
fact of the way variadic functions work in C, which goes back to the way
all functions have always worked in C. The called variadic function has
no way to determine the number of arguments - the information is lost by then.
On 23/10/2026 12:49, David Brown wrote:
On 23/10/2026 12:37, bartc wrote:
On 23/10/2026 10:07, David Brown wrote:
On 23/10/2026 07:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
Variadic functions have no way of counting their arguments, or
identifying their types. This can't be changed easily - it is built >>>> into the way C functions are called (in pretty much every
implementation). The caller simply puts the arguments into
registers or onto the stack according to the ABI for the target,
At last somebody who knows what ABI means.
Note that an "ABI" encompasses many things - calling convention(s) are
just one (albeit important) part of it.
But it is little to do with APIs other than those tend to get mixed up.
Although a tidier way of imparting the length is better. It depends
on whether the common use-case is a small fixed number of elements,
or an arbitrary array (where the length is likely in some variable.)
It could be combined with a macro :
int min_list(size_t n, const int * list) {
int m = list[0];
for (size_t i = 1; i < n; i++) {
if (list[i] < m) m = list[i];
}
return m;
}
#define min(...) min_list( \
sizeof((int []) { __VA_ARGS__ }) / sizeof(int), \
int []) { __VA_ARGS__ })
Then it can be called with just :
printf("%d\n", min(3, 1, 4, 1, 5, 9, 2, 6, 0));
(Is that 0 still a sentinel here? If so it would anyway be better as as INT_MAX or some nicer alias.)
Not a bad solution, when a single fixed type will do.
OK. I'm don't know how to do solutions with macros. It is a harder
language than C.
An even simpler way where the number of elements is small and is
known, is to just write dedicated functions such as min2(x, y) and
min3(x, y, z). The first will be by far the most common need IME.
You can take this a step further - here using macros so that it works
for any suitable type :
#define min2(a, b) (((a) < (b)) ? (a) : (b))
#define min3(a, b, c) min2(a, min2(b, c))
#define min4(a, b, c, d) min2(min2(a, b), min2(c, d))
#define min5(a, b, c, d, e) min2(min2(a, b), min3(c, d, e))
#define min_arg(a, b, c, d, e, ...) min5(a, b, c, d, e)
#define min(a, ...) min_arg(__VA_ARGS__ __VA_OPT__(,) a, a, a, a, a, a)
The first 5 are just "normal" fixed argument minX macros of different
sizes. Then we make a variadic macro "min" that passes on the
arguments it is given, with extra copies of "a" so that min5 can
always be called, along with an intermediary "min_arg" to absorb any
unnecessary extra arguments.
(Again, I am not saying I recommend any of this, but it can be fun to
play around with.)
The problem I have with this is use-cases.
I feel that a special solution for N-way min(), where N is a small compile-time value, is as useful as an N-way solution for 'add'.
It can happen, but in the case of 'add', you just write x + y + z, you
don't need +(x, y, z).
So for min, it would be min(x, min(y, z)) which is not too onerous.
(But if 'min' was an operator that can be used in-fix style as well as function-like [I do this], then this would also be x min y min z.
Of course, in a higher level language you can have a solution based on
using 'reduce(min, x)' where 'min' works on two operands, and x is a
list. But this would be a poor fit here.)
fir pisze:
David Brown pisze:
Variadic functions have no way of counting their arguments, or
identifying their types.
this is silly becouse it cos t one register to use so its totally not
a problem
the case with various type arguments is much harder but the one with
"all ints" etc is quite easy
simpl as i said the user need the arg[] and arg_max avaliable
foo(int ...v)
{
for(int i=0; i<sizeof(v)/sizeof(int); i++)
{
}
}
so as its show in this all one type case you dont need any varargs macros
foo (int n, ...) {}
in fact you dont need nothing may just acces via n[i] above all you need
it to pass in register the max_n value (or size of args block)
i dont know maybe just same syntax can be used
foo(int[] v)
{
}
so you can put foo(tab) or foo(2,3,4,2,32,3,23,2) at will
thou this version would pass via pointer and is someone need to pass
by stack probably would need to use f(int ...) version
On 23/10/2026 14:53, bartc wrote:
OK. I'm don't know how to do solutions with macros. It is a harder
language than C.
(I hope that in the future, you remember that I called your solution,
albeit with a macro for a slightly nicer interface, "not bad". And remember also that I am Scottish - "not bad" is as complimentary as we
get!)
On 23/10/2026 14:18, David Brown wrote:
On 23/10/2026 14:53, bartc wrote:
OK. I'm don't know how to do solutions with macros. It is a harder
language than C.
(I hope that in the future, you remember that I called your solution,
albeit with a macro for a slightly nicer interface, "not bad". And
remember also that I am Scottish - "not bad" is as complimentary as we
get!)
I had to read it again. I assumed you were talking only about your
version not mine!
David Brown pisze:
Variadic functions have no way of counting their arguments, or
identifying their types.
this is silly becouse it cos t one register to use so its totally not a problem
the case with various type arguments is much harder but the one with
"all ints" etc is quite easy
simpl as i said the user need the arg[] and arg_max avaliable
foo(int ...v)
{
for(int i=0; i<sizeof(v)/sizeof(int); i++)
{
}
If I wanted to write such a variadic minimum function, I would do so
using a sentinel, with a macro to add the sentinel:
#define SENTINEL INT_MIN
#define min(x0, ...) min_func(x0 __VA_OPT__(,) __VA_ARGS__, SENTINEL)
int min_func(int x0, ...) {
va_list args;
va_start(args);
int m = x0;
while (true) {
int x = va_arg(args, int);
if (x == SENTINEL) return m;
if (x < m) m = x;
}
}
It is up to the user to ensure that the arguments to "min" are all ints,
and none of them match the sentinel value.
On 2026-10-23, David Brown <[email protected]> wrote:
If I wanted to write such a variadic minimum function, I would do so
using a sentinel, with a macro to add the sentinel:
#define SENTINEL INT_MIN
#define min(x0, ...) min_func(x0 __VA_OPT__(,) __VA_ARGS__, SENTINEL)
int min_func(int x0, ...) {
va_list args;
va_start(args);
int m = x0;
while (true) {
int x = va_arg(args, int);
if (x == SENTINEL) return m;
if (x < m) m = x;
}
}
It is up to the user to ensure that the arguments to "min" are all ints,
and none of them match the sentinel value.
If the sentinel value were changed to INT_MAX the none-match requirement
can be dropped (since INT_MAX is the identity element of the min operation
it could safely appear in the argument list).
On 2026-10-23, David Brown <[email protected]> wrote:
If I wanted to write such a variadic minimum function, I would do so
using a sentinel, with a macro to add the sentinel:
#define SENTINEL INT_MIN
#define min(x0, ...) min_func(x0 __VA_OPT__(,) __VA_ARGS__, SENTINEL)
int min_func(int x0, ...) {
va_list args;
va_start(args);
int m = x0;
while (true) {
int x = va_arg(args, int);
if (x == SENTINEL) return m;
if (x < m) m = x;
}
}
It is up to the user to ensure that the arguments to "min" are all ints,
and none of them match the sentinel value.
If the sentinel value were changed to INT_MAX the none-match requirement
can be dropped (since INT_MAX is the identity element of the min operation
it could safely appear in the argument list).
problem is imo this leading argument n, imo it should
just be called
min(34,34,2);
thus the variadic support probably need to change
For this purpose, where all elements are expected to be the same type,
then passing a list is more appropriate, and more type-safe. Especially
when 'min_func' has a specific return type anyway.
On 2026-10-23, Ike Naar <[email protected]> wrote:
On 2026-10-23, David Brown <[email protected]> wrote:Sorry, I was not thinking things through. Please forget that post.
If I wanted to write such a variadic minimum function, I would do so
using a sentinel, with a macro to add the sentinel:
#define SENTINEL INT_MIN
#define min(x0, ...) min_func(x0 __VA_OPT__(,) __VA_ARGS__, SENTINEL)
int min_func(int x0, ...) {
va_list args;
va_start(args);
int m = x0;
while (true) {
int x = va_arg(args, int);
if (x == SENTINEL) return m;
if (x < m) m = x;
}
}
It is up to the user to ensure that the arguments to "min" are all ints, >>> and none of them match the sentinel value.
bartc wrote:
For this purpose, where all elements are expected to be the same type,
then passing a list is more appropriate, and more type-safe. Especially
when 'min_func' has a specific return type anyway.
In general the function argument types might not be known.
An actual
argument list might have 1 byte argument, a 17 byte argument, a 4 byte argument, 128 byte argument.
In languages and environments where the
type of each argument is declared, calls can pass arguments with
specialised protocols.
fir wrote:
problem is imo this leading argument n, imo it should
just be called
min(34,34,2);
thus the variadic support probably need to change
The compiler cannot be certain which function calls are variadic. Old
style function declarations are allowed which provide no information
about arguments. You cannot change this without breaking unknown amount
of dusty old code.
On 23/10/2026 16:29, bartc wrote:
On 23/10/2026 14:18, David Brown wrote:
On 23/10/2026 14:53, bartc wrote:
OK. I'm don't know how to do solutions with macros. It is a harder
language than C.
Complex macros can be hairy. When they are used for things
significantly more advanced than envisioned when the C pre-processor was conceived, and you don't often work with such macros, the results can be hard to write and hard to understand. But they can still be useful, and they can still be fun!
(I hope that in the future, you remember that I called your solution,
albeit with a macro for a slightly nicer interface, "not bad". And
remember also that I am Scottish - "not bad" is as complimentary as
we get!)
I had to read it again. I assumed you were talking only about your
version not mine!
It was your list version. I improved it by using a macro so that the calling syntax was nicer and the sentinel was not needed.
None of this - your code or mine - is revolutionary or innovative, and
there are endless examples of similar code online. But I preferred your use of a list to fir's use of va_args, with the compound initialiser
being the key to usability.
[...]
I never did an implementation, but the elements would be assembled
into a buffer, not pushed, and a pointer to that buffer passed as
well as the length. (My scheme would have been syntactic sugar
for slices, which carry a length.)
Of course this is only where all variadic elements are the same
type. Mixed types would need to use the existing less safe
variadic scheme.
bartc <[email protected]> writes:
[discussing how to implement min() and max() functions]
[...]
I never did an implementation, but the elements would be assembled
into a buffer, not pushed, and a pointer to that buffer passed as
well as the length. (My scheme would have been syntactic sugar
for slices, which carry a length.)
Of course this is only where all variadic elements are the same
type. Mixed types would need to use the existing less safe
variadic scheme.
First let's take a stab at stating the problem:
1. Define min() and max() variadic functions or macros ...
2. That accept any (reasonable) number of arguments ...
3. Which can be any combination of suitable types ...
4. Including standard integer types and real floating types ...
5. Evaluating each argument exactly once ...
6. Producing a result having a type suitable to the arguments ...
7. And does something sensible when arguments are of mixed types.
Sadly the discussion that followed consisted mostly of partial
ideas for how some simpler problem might be solved.
Most of the
comments that have been posted were just ego stroking.
David Brown pisze:
On 23/10/2026 16:29, bartc wrote:im not quite understand what you say here (wak english) but theis
On 23/10/2026 14:18, David Brown wrote:
On 23/10/2026 14:53, bartc wrote:
OK. I'm don't know how to do solutions with macros. It is a harder
language than C.
Complex macros can be hairy. When they are used for things
significantly more advanced than envisioned when the C pre-processor
was conceived, and you don't often work with such macros, the results
can be hard to write and hard to understand. But they can still be
useful, and they can still be fun!
(I hope that in the future, you remember that I called your
solution, albeit with a macro for a slightly nicer interface, "not
bad". And remember also that I am Scottish - "not bad" is as
complimentary as we get!)
I had to read it again. I assumed you were talking only about your
version not mine!
It was your list version. I improved it by using a macro so that the
calling syntax was nicer and the sentinel was not needed.
None of this - your code or mine - is revolutionary or innovative, and
there are endless examples of similar code online. But I preferred
your use of a list to fir's use of va_args, with the compound
initialiser being the key to usability.
"shallow varargs" with N passed via register could be quite usable
like for min max for example
min(a,b,c,d,e)
you just write a function min bodli like for min(int*t)
but you just have nice interface for all that tiny cases where you searh
min in short cases like 2,3,4,5,6,7,8,6 arguments
in comparsion to predefined versions for 2/3 arguments it would be a bit slower maybe but not so much,
overally i find it rather usefull
The compiler cannot be certain which function calls are variadic.
Old style function declarations are allowed which provide no
information about arguments.
The compiler cannot be certain which function calls are variadic. Old
style function declarations are allowed which provide no information
about arguments. You cannot change this without breaking unknown
amount of dusty old code.
Still talking about variadic functions? Then in C it's more[...]
restricted: variadic arguments will be, or be promoted to, one of:
* Integer (typically one of i32 u32 i64 u64)
* Float (typically f64)
* Pointer
* Struct
The last is more variable, but on modern ABIs, a struct that isn't one
of certain set of patterns will be passed by pointer. (I don't know
how _BitInt are handled.)
bartc <[email protected]> writes:
[...]
Still talking about variadic functions? Then in C it's more[...]
restricted: variadic arguments will be, or be promoted to, one of:
* Integer (typically one of i32 u32 i64 u64)
* Float (typically f64)
* Pointer
* Struct
The last is more variable, but on modern ABIs, a struct that isn't one
of certain set of patterns will be passed by pointer. (I don't know
how _BitInt are handled.)
That's an odd and incomplete way to state the rules (and you
missed unions).
A variadic argument of an integer type narrower than int is promoted
to int or unsigned int (int if int holds all possible values of the
source type, otherwise unsigned int). These "integer promotions"
do not apply to _BitInt types. A variadic argument of type float is
promoted to double. All other argument types are not promoted --
though the usual array-to-pointer and function-to-pointer conversions
are applied.
On 25/10/2026 00:34, Keith Thompson wrote:
bartc <[email protected]> writes:
[...]
Still talking about variadic functions? Then in C it's more[...]
restricted: variadic arguments will be, or be promoted to, one of:
* Integer (typically one of i32 u32 i64 u64)
* Float (typically f64)
* Pointer
* Struct
The last is more variable, but on modern ABIs, a struct that isn't one
of certain set of patterns will be passed by pointer. (I don't know
how _BitInt are handled.)
That's an odd and incomplete way to state the rules (and you
missed unions).
They will be grouped with structs.
A variadic argument of an integer type narrower than int is promoted
to int or unsigned int (int if int holds all possible values of the
source type, otherwise unsigned int). These "integer promotions"
do not apply to _BitInt types. A variadic argument of type float is
promoted to double. All other argument types are not promoted --
though the usual array-to-pointer and function-to-pointer conversions
are applied.
The list represented variadic argument types after promotions. It was anywhere summarising existing variadic functions as it wasn't clear to
which kinds Mr .bleu was referring to.
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
int a=Min(4,10,3,7,-2); // -2
On 23/10/2026 06:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
Just use a string of ints ...
int min(const int *n)
{
int m = INT_MAX;
while ( *n )
{
if ( *n < m ) m = *n;
n++;
}
return m;
}
int a=Min(4,10,3,7,-2); // -2
int a = min((int[]){10,3,7,-2}));
On 23/10/2026 06:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
Just use a string of ints ...
int min(const int *n)
{
int m = INT_MAX;
while ( *n )
{
if ( *n < m ) m = *n;
n++;
}
return m;
}
int a=Min(4,10,3,7,-2); // -2
int a = min((int[]){10,3,7,-2}));
bartc <[email protected]> writes:
On 25/10/2026 00:34, Keith Thompson wrote:
bartc <[email protected]> writes:
[...]
Still talking about variadic functions? Then in C it's more[...]
restricted: variadic arguments will be, or be promoted to, one of:
* Integer (typically one of i32 u32 i64 u64)
* Float (typically f64)
* Pointer
* Struct
The last is more variable, but on modern ABIs, a struct that isn't one >>>> of certain set of patterns will be passed by pointer. (I don't know
how _BitInt are handled.)
That's an odd and incomplete way to state the rules (and you
missed unions).
They will be grouped with structs.
Will they be? By whom? I don't know what that even means.
Perhaps you just forgot about unions -- which would be perfectly understandable.
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
Just use a string of ints ...
int min(const int *n)
{
int m = INT_MAX;
while ( *n )
{
if ( *n < m ) m = *n;
n++;
}
return m;
}
int a=Min(4,10,3,7,-2); // -2
int a = min((int[]){10,3,7,-2}));
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
Just use a string of ints ...
int min(const int *n)
{
int m = INT_MAX;
while ( *n )
{
if ( *n < m ) m = *n;
n++;
}
return m;
}
int a=Min(4,10,3,7,-2); // -2
int a = min((int[]){10,3,7,-2}));
such thig should be builtin nd automatic there are hovever some
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but;
only recently i noticed min or max would be good for variadic
;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
It's so easy to see where one argument ends and another begins! And this
is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
On 25/10/2026 04:24, Richard Harnden wrote:
On 23/10/2026 06:44, fir wrote:
when thinkong on variadic functions not much come to mind but
only recently i noticed min or max would be good for variadic
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
Just use a string of ints ...
int min(const int *n)
{
int m = INT_MAX;
while ( *n )
{
if ( *n < m ) m = *n;
n++;
}
return m;
}
int a=Min(4,10,3,7,-2); // -2
int a = min((int[]){10,3,7,-2}));
That has undefined behaviour - unfortunately, the kind that does what
I expected :(
You either need to pass the size ...
int min(const int *n, size_t z)
{
int m = INT_MAX;
for (size_t i=0; i<z; i++)
if ( n[i] < m ) m = n[i];
return m;
}
bartc pisze:
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but;
only recently i noticed min or max would be good for variadic
;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, but
for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and what is not)
It's so easy to see where one argument ends and another begins! And
this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but;
only recently i noticed min or max would be good for variadic
;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, but
for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and what
is not)
It's so easy to see where one argument ends and another begins! And
this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding more geometry the rasterizer get slowing down ofs..and i have no best cpu
though modern are maybe 2-3 times faster at most i guess
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but;
only recently i noticed min or max would be good for variadic
;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, but
for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your philosofy >>> you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and what
is not)
It's so easy to see where one argument ends and another begins! And
this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding more
geometry the rasterizer get slowing down ofs..and i have no best cpu
Too bad you need an AI to make it for you.
though modern are maybe 2-3 times faster at most i guess
If you want some free models to work with. check out SketchFab.
I just don't consider unions as a special type at all.
On Sun, 25 Oct 2026 14:44:15 -0700, Chris M. Thomasson wrote:
If you want some free models to work with. check out SketchFab.
Aren’t they more oriented towards 3D printing?
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but;
only recently i noticed min or max would be good for variadic
;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, but
for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your philosofy >>> you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and what
is not)
It's so easy to see where one argument ends and another begins! And
this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding more
geometry the rasterizer get slowing down ofs..and i have no best cpu
Too bad you need an AI to make it for you.
though modern are maybe 2-3 times faster at most i guess
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but;
only recently i noticed min or max would be good for variadic
;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, but
for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your philosofy >>> you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and what
is not)
It's so easy to see where one argument ends and another begins! And
this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding more
geometry the rasterizer get slowing down ofs..and i have no best cpu
Too bad you need an AI to make it for you.
though modern are maybe 2-3 times faster at most i guess
Chris M. Thomasson pisze:
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but >>>>>> >> only recently i noticed min or max would be good for variadic >>>>>> >>;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet,
but for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your
philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and
what is not)
It's so easy to see where one argument ends and another begins! And >>>>> this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding more
geometry the rasterizer get slowing down ofs..and i have no best cpu
Too bad you need an AI to make it for you.
you talk like medevial peasnt such your remarks here
you know for some people accustomed to higher social standards you may
be perceive you as a bit of a country bumpkin (sorry i dont understand
this phrase its form translation, i m not quite sure what bumpkin is - i meant more like peasent, medevial villager)
its not quite good to enforce you peasnty belifs on people...especially
as it seems you totally dont know what youre talkin about
i already told you so but it seems youre like dont get it
as to rasterizer its nice to shape the pixell matter..though i need much stronger cpu, i need like 100x stronger..and it doesnt seem i would get it..though GPU in fact maybe might be so
or meybe i should learn more multithreading and put it on 8 10 or 12
cores... im not sure but not being experienced in this it seems that rasterisation should be quite good for multithreading - simply run 1/10
of objects in the scene on 10 cores into 10 output buffers..then "add"
the buffers... this depth buffers seem ideal for adding
im not yet sure if it really works that way - but if it does its finally
a reason to buy a desktop pc iwth many cores
though modern are maybe 2-3 times faster at most i guess
On 10/25/2026 2:56 PM, Lawrence D’Oliveiro wrote:
On Sun, 25 Oct 2026 14:44:15 -0700, Chris M. Thomasson wrote:
If you want some free models to work with. check out SketchFab.
Aren’t they more oriented towards 3D printing?
Well, fir should know how to load a 3d model and light it.
Chris M. Thomasson pisze:
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever somewhen thinkong on variadic functions not much come to mind but >>>>>> >> only recently i noticed min or max would be good for variadic >>>>>> >>;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
decisions toconclude for example
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet,
but for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your
philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts?
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and
what is not)
It's so easy to see where one argument ends and another begins! And >>>>> this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding more
geometry the rasterizer get slowing down ofs..and i have no best cpu
Too bad you need an AI to make it for you.
you talk like medevial peasnt such your remarks here
you know for some people accustomed to higher social standards you may
be perceive you as a bit of a country bumpkin (sorry i dont understand
this phrase its form translation, i m not quite sure what bumpkin is - i meant more like peasent, medevial villager)
its not quite good to enforce you peasnty belifs on people...especially
as it seems you totally dont know what youre talkin about
i already told you so but it seems youre like dont get it
as to rasterizer its nice to shape the pixell matter..though i need much stronger cpu, i need like 100x stronger..and it doesnt seem i would get it..though GPU in fact maybe might be so
or meybe i should learn more multithreading and put it on 8 10 or 12
cores... im not sure but not being experienced in this it seems that rasterisation should be quite good for multithreading - simply run 1/10
of objects in the scene on 10 cores into 10 output buffers..then "add"
the buffers... this depth buffers seem ideal for adding
im not yet sure if it really works that way - but if it does its finally
a reason to buy a desktop pc iwth many cores
though modern are maybe 2-3 times faster at most i guess
On 10/25/2026 5:32 PM, fir wrote:
Chris M. Thomasson pisze:
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever some >>>>>>> decisions toconclude for examplewhen thinkong on variadic functions not much come to mind but >>>>>>> >> only recently i noticed min or max would be good for variadic >>>>>>> >>;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet,
but for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your
philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts? >>>>>
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and
what is not)
It's so easy to see where one argument ends and another begins!
And this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding
more geometry the rasterizer get slowing down ofs..and i have no
best cpu
Too bad you need an AI to make it for you.
you talk like medevial peasnt such your remarks here
you know for some people accustomed to higher social standards you may
be perceive you as a bit of a country bumpkin (sorry i dont understand
this phrase its form translation, i m not quite sure what bumpkin is -
i meant more like peasent, medevial villager)
its not quite good to enforce you peasnty belifs on
people...especially as it seems you totally dont know what youre
talkin about
i already told you so but it seems youre like dont get it
as to rasterizer its nice to shape the pixell matter..though i need much
stronger cpu, i need like 100x stronger..and it doesnt seem i would
get it..though GPU in fact maybe might be so
or meybe i should learn more multithreading and put it on 8 10 or 12
cores... im not sure but not being experienced in this it seems that
rasterisation should be quite good for multithreading - simply run 1/10
of objects in the scene on 10 cores into 10 output buffers..then "add"
the buffers... this depth buffers seem ideal for adding
im not yet sure if it really works that way - but if it does its
finally a reason to buy a desktop pc iwth many cores
though modern are maybe 2-3 times faster at most i guess
Not really, just buy something with a half way decent GPU, or even a
crappy one. NVIDIA has some cheap ones. The learn how to code for it.
Chris M. Thomasson pisze:
On 10/25/2026 5:32 PM, fir wrote:
Chris M. Thomasson pisze:
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever some >>>>>>>> decisions toconclude for examplewhen thinkong on variadic functions not much come to mind but >>>>>>>> >> only recently i noticed min or max would be good for variadic >>>>>>>> >>;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, >>>>>> but for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your
philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts? >>>>>>
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and
what is not)
It's so easy to see where one argument ends and another begins! >>>>>>> And this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding
more geometry the rasterizer get slowing down ofs..and i have no
best cpu
Too bad you need an AI to make it for you.
you talk like medevial peasnt such your remarks here
you know for some people accustomed to higher social standards you
may be perceive you as a bit of a country bumpkin (sorry i dont
understand this phrase its form translation, i m not quite sure what
bumpkin is - i meant more like peasent, medevial villager)
its not quite good to enforce you peasnty belifs on
people...especially as it seems you totally dont know what youre
talkin about
i already told you so but it seems youre like dont get it
as to rasterizer its nice to shape the pixell matter..though i need much >>> stronger cpu, i need like 100x stronger..and it doesnt seem i would
get it..though GPU in fact maybe might be so
or meybe i should learn more multithreading and put it on 8 10 or 12
cores... im not sure but not being experienced in this it seems that
rasterisation should be quite good for multithreading - simply run 1/10
of objects in the scene on 10 cores into 10 output buffers..then "add"
the buffers... this depth buffers seem ideal for adding
im not yet sure if it really works that way - but if it does its
finally a reason to buy a desktop pc iwth many cores
though modern are maybe 2-3 times faster at most i guess
Not really, just buy something with a half way decent GPU, or even a
crappy one. NVIDIA has some cheap ones. The learn how to code for it.
there is no chea nvidia GPU at stores right now.. i maybe should stil
wait if they get nootably cheaper and buy some
more important gpu koding is different kind of coding... this rasterizer
btw i coded in formal C now (as ported from old version c via c++)
though those linker errors when i
i call i function name which i it cant find annoys me i could say
(in c via c++ thre eas no such thing as i remember)
as to AI it so much grat i could probably name a list of 100
(or at least 30) big advantages of it where 2-3 could be suffice to use it
you noticed i criticize your 'peasenty' attitude but really learn what
you talkin about becouse stating things when you got no idea what youre talkin about is absolutely not usenet is for
usenet was always good people here focus on validating opinions and
what you say like that: i have no idea what im talking about yet i
will say opposite to truth is not standable here
take given point you learned if something is wrong in that point
criticize it in valid ay if you must ... or praise it if its good
becouse this seconnd attempt is arso quite valueable i such new topic
when people need to learn that
dont know how to do it - download chatgpt from windows store or
take given point you learned if something is wrong in that point
criticize it in valid ay if you must ... or praise it if its good
becouse this seconnd attempt is arso quite valueable i such new topic
when people need to learn that
(slightly worse imo) open t in web and ask the programming speific
questions you will be impressed 0 instead of talkin bulshit on
the net as many do
(ofc paying questions may be a problem but now yhe free versions go on
quite well - and i hope it will stay this way
so much public material made by anybody they should be obliged to return part of it as free decend versions im (it should be even regulated by
law maybe as some kind of payback to society... but for now its ok)
On 26/10/2026 11:30, fir wrote:
dont know how to do it - download chatgpt from windows store or
take given point you learned if something is wrong in that point
criticize it in valid ay if you must ... or praise it if its good
becouse this seconnd attempt is arso quite valueable i such new topic
when people need to learn that
(slightly worse imo) open t in web and ask the programming speific
questions you will be impressed 0 instead of talkin bulshit on
the net as many do
(ofc paying questions may be a problem but now yhe free versions go on
quite well - and i hope it will stay this way
It won't. Get everyone hooked first then start charging.
becouse if those firms use
so much public material made by anybody they should be obliged to
return part of it as free decend versions im (it should be even
regulated by law maybe as some kind of payback to society... but for
now its ok)
Take whatever application it is that AI is helping you create. Suppose
you found that somebody had already created a working application that worked exactly as you wanted (maybe using AI more effectively!), and it
was a free download.
What you stop your development and just use that product? Or is
development the interesting bit?
Take all these ideas about new language features that you have posted
about extensively. Did you know that AI can be used to help devise new languages and even implement them for you?
Would you do that too? (Since nobody here is going to develop your dream language for you. I've already done mine.)
But then, if AI is going to be writing the code anyway, what difference
does it make what language it generates? It might as well generate
machine code directly.
Also, is your product a game that you have to try and win? Would you
tell AI to play the game to win it for you? If not, why not?
Can you not see that taking AI's capabilities to the extremes makes it
all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's jobs as possible.
bartc pisze:
On 26/10/2026 11:30, fir wrote:
dont know how to do it - download chatgpt from windows store or
take given point you learned if something is wrong in that point
criticize it in valid ay if you must ... or praise it if its good
becouse this seconnd attempt is arso quite valueable i such new
topic when people need to learn that
(slightly worse imo) open t in web and ask the programming speific
questions you will be impressed 0 instead of talkin bulshit on
the net as many do
(ofc paying questions may be a problem but now yhe free versions go
on quite well - and i hope it will stay this way
It won't. Get everyone hooked first then start charging.
becouse if those firms use
so much public material made by anybody they should be obliged to
return part of it as free decend versions im (it should be even
regulated by law maybe as some kind of payback to society... but for
now its ok)
Take whatever application it is that AI is helping you create. Suppose
you found that somebody had already created a working application that
worked exactly as you wanted (maybe using AI more effectively!), and
it was a free download.
What you stop your development and just use that product? Or is
development the interesting bit?
Take all these ideas about new language features that you have posted
about extensively. Did you know that AI can be used to help devise new
languages and even implement them for you?
Would you do that too? (Since nobody here is going to develop your
dream language for you. I've already done mine.)
But then, if AI is going to be writing the code anyway, what
difference does it make what language it generates? It might as well
generate machine code directly.
Also, is your product a game that you have to try and win? Would you
tell AI to play the game to win it for you? If not, why not?
Can you not see that taking AI's capabilities to the extremes makes it
all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's jobs
as possible.
world needs to work to be done not to work to be done + eople suffer
sittin doin it too much ;c
ai just helps work be done so what is the problem here?
i generally dont see any problem
alos you you think i ame doing something and someone ele was doin it
aith ai... overally if you do things it is so called combinatoric
explosion or maybe more combinatoric hyperexplosion even ai cant fit
in exact the same what someone could be doing imo as if you only need to take 100 binary decisions then te chance is 1/2^100 and someone takes
even more decisions and they are non binary
ofsc ai eventaully could take some other better than yours but if so
it just sis other thing
overally people have absolutely crazy opinions here..its liek someone
gave you milion dollars and you will be screaming "its bad" its takin my
job (or other weird things)..it takes jobs ofc but as the job will be
done what is the problem - if someone really loves such kind of jibs
they may do it eventually for no money just as a kind of Historical reenactors group
i may understood its pitty no people ride in a horse-drawn carriage
but if someone get back to it i guess it would show its not so much
good
besides ai is an option liek many things in life, i just love my chat
gpt app
really you should try if you not used it its tptally amazing wspecially
in coding
fir pisze:
bartc pisze:
On 26/10/2026 11:30, fir wrote:
dont know how to do it - download chatgpt from windows store or
take given point you learned if something is wrong in that point
criticize it in valid ay if you must ... or praise it if its good
becouse this seconnd attempt is arso quite valueable i such new
topic when people need to learn that
(slightly worse imo) open t in web and ask the programming speific
questions you will be impressed 0 instead of talkin bulshit on
the net as many do
(ofc paying questions may be a problem but now yhe free versions go
on quite well - and i hope it will stay this way
It won't. Get everyone hooked first then start charging.
becouse if those firms use
so much public material made by anybody they should be obliged to
return part of it as free decend versions im (it should be even
regulated by law maybe as some kind of payback to society... but for
now its ok)
Take whatever application it is that AI is helping you create.
Suppose you found that somebody had already created a working
application that worked exactly as you wanted (maybe using AI more
effectively!), and it was a free download.
What you stop your development and just use that product? Or is
development the interesting bit?
Take all these ideas about new language features that you have posted
about extensively. Did you know that AI can be used to help devise
new languages and even implement them for you?
Would you do that too? (Since nobody here is going to develop your
dream language for you. I've already done mine.)
But then, if AI is going to be writing the code anyway, what
difference does it make what language it generates? It might as well
generate machine code directly.
Also, is your product a game that you have to try and win? Would you
tell AI to play the game to win it for you? If not, why not?
Can you not see that taking AI's capabilities to the extremes makes
it all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's jobs
as possible.
world needs to work to be done not to work to be done + eople suffer
sittin doin it too much ;c
ai just helps work be done so what is the problem here?
i generally dont see any problem
alos you you think i ame doing something and someone ele was doin it
aith ai... overally if you do things it is so called combinatoric
explosion or maybe more combinatoric hyperexplosion even ai cant fit
in exact the same what someone could be doing imo as if you only need
to take 100 binary decisions then te chance is 1/2^100 and someone takes
even more decisions and they are non binary
ofsc ai eventaully could take some other better than yours but if so
it just sis other thing
overally people have absolutely crazy opinions here..its liek someone
gave you milion dollars and you will be screaming "its bad" its takin
my job (or other weird things)..it takes jobs ofc but as the job will
be done what is the problem - if someone really loves such kind of
jibs they may do it eventually for no money just as a kind of
Historical reenactors group
i may understood its pitty no people ride in a horse-drawn carriage
but if someone get back to it i guess it would show its not so much
good
besides ai is an option liek many things in life, i just love my chat
gpt app
really you should try if you not used it its tptally amazing
wspecially in coding
nota also AI is not good in ALL things..i for example observed its good
when there is soeta wll defined problem but if you tell it to design solution for a bit vague problem its not necessary you get answer better than you would design it
like say design good "something" (i dont know d game/ or routine for npc behaviour..etc..such kinda not quite defined things)..those design it
takes are not necessary the best..whough thay may be good as start
its quite fresh thing this ai so im not sure if its weakneses and strong sides are alteady reckognized (also for example by me)..so mabe things
will show.. but as what i noticed its not like it gaves you best
solution for anything but what it gave in various topics is amazing/ amazingly helpfull
bartc pisze:
Can you not see that taking AI's capabilities to the extremes makes it
all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's jobs
as possible.
overally people have absolutely crazy opinions here..its liek someone
gave you milion dollars and you will be screaming "its bad"
On 26/10/2026 12:51, fir wrote:
bartc pisze:
Can you not see that taking AI's capabilities to the extremes makes
it all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's jobs
as possible.
overally people have absolutely crazy opinions here..its liek someone
gave you milion dollars and you will be screaming "its bad"
Actually yes. What would happen if /everybody/ was given a million
dollars? Think about it.
bartc pisze:
On 26/10/2026 12:51, fir wrote:this is a million dolars ov value not empty paper money, ai gives such
bartc pisze:
Can you not see that taking AI's capabilities to the extremes makes
it all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's jobs
as possible.
overally people have absolutely crazy opinions here..its liek someone
gave you milion dollars and you will be screaming "its bad"
Actually yes. What would happen if /everybody/ was given a million
dollars? Think about it.
value that 1 milion per capita is imo quite comparable
On 26/10/2026 14:15, fir wrote:
bartc pisze:
On 26/10/2026 12:51, fir wrote:this is a million dolars ov value not empty paper money, ai gives such
bartc pisze:
Can you not see that taking AI's capabilities to the extremes makes >>>>> it all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's
jobs as possible.
overally people have absolutely crazy opinions here..its liek
someone gave you milion dollars and you will be screaming "its bad"
Actually yes. What would happen if /everybody/ was given a million
dollars? Think about it.
value that 1 milion per capita is imo quite comparable
Well, $1m wouldn't have quite as much value if every individual on earth
was a millionaire.
But the first thing that would happen is that most people would not
bother going to work (because they're now rich!) and everything would
stop working.
Likely followed by hyperinflation.
Actually, if you type in: "suppose everybody everybody was given
$1000000" into google, your beloved AI gives the same sort of picture.
Namely (it goes into a lot more detail):
Instant Hyperinflation
Supply Chain and Labour Collapse
Destruction of Savings and Debt
Of course, if it was just me, I'd take it! And if I was the only person
on earth with access to AI, that would also be invaluable.
On Sun, 25 Oct 2026 15:58:58 -0700, Chris M. Thomasson wrote:
On 10/25/2026 2:56 PM, Lawrence D’Oliveiro wrote:
On Sun, 25 Oct 2026 14:44:15 -0700, Chris M. Thomasson wrote:
If you want some free models to work with. check out SketchFab.
Aren’t they more oriented towards 3D printing?
Well, fir should know how to load a 3d model and light it.
There are better sources of models for on-screen work.
Sci-fi fan? How about this <https://trekmeshes.eu/>.
bartc pisze:
On 26/10/2026 14:15, fir wrote:sadly you say nonsense here ...first some complain of losing jobs then switchung to state where there are jobs and people not take it..
bartc pisze:
On 26/10/2026 12:51, fir wrote:this is a million dolars ov value not empty paper money, ai gives
bartc pisze:
Can you not see that taking AI's capabilities to the extremes
makes it all pointless? At least, for recreational purposes.
Its other main purpose seems to be taking over as many people's
jobs as possible.
overally people have absolutely crazy opinions here..its liek
someone gave you milion dollars and you will be screaming "its bad"
Actually yes. What would happen if /everybody/ was given a million
dollars? Think about it.
such value that 1 milion per capita is imo quite comparable
Well, $1m wouldn't have quite as much value if every individual on
earth was a millionaire.
But the first thing that would happen is that most people would not
bother going to work (because they're now rich!) and everything would
stop working.
Likely followed by hyperinflation.
Actually, if you type in: "suppose everybody everybody was given
$1000000" into google, your beloved AI gives the same sort of picture.
Namely (it goes into a lot more detail):
Instant Hyperinflation
Supply Chain and Labour Collapse
Destruction of Savings and Debt
Of course, if it was just me, I'd take it! And if I was the only
person on earth with access to AI, that would also be invaluable.
also this is no case of hiperinflation
much cheeper things go cheaper
so many people dont get basics and talk crazy things
so many people dont get basics and talk crazy things
Chris M. Thomasson pisze:
On 10/25/2026 5:32 PM, fir wrote:
Chris M. Thomasson pisze:
On 10/25/2026 11:04 AM, fir wrote:
fir pisze:
bartc pisze:recent state of my rasterizer toying btw
On 25/10/2026 11:01, fir wrote:
ichard Harnden pisze:> On 23/10/2026 06:44, fir wrote:
such thig should be builtin nd automatic there are hovever some >>>>>>>> decisions toconclude for examplewhen thinkong on variadic functions not much come to mind but >>>>>>>> >> only recently i noticed min or max would be good for variadic >>>>>>>> >>;
the ai wrote me such variadic min
I don't think that I'd bother with stdarg at all.
;
Just use a string of ints ...
;
int min(const int *n)
{
; int m = INT_MAX;
;
; while ( *n )
; {
; if ( *n < m ) m = *n;
;
; n++;
; }
;
; return m;
}
;
int a=Min(4,10,3,7,-2); // -2;
int a = min((int[]){10,3,7,-2}));
;
;
;
foo(float3 x);
goo(float3* x);
foo({1,2,4.});
goo({2,3,4}) or goo(&{2,3,4})
or maybe allowing to drop {} at all
foo(1,2,4.);
So:
foo(float3 x, float3 y, int n);
can be called as:
foo(1, 2, 3, 4, 5, 6, 7);
well its a question what to put as a mandatory.. i dont know yet, >>>>>> but for sure thise automatic 'fitting' would be somewhat good
some can write
foo({1, 2, 3}, {4, 5, 6}, 7);
and you again present anti-c philosophy
c allows you write programs ale obfuscated c contests..in your
philosofy
you would forbide it all? forcing codes not have syttaktic shortcuts? >>>>>>
i totally not agree to such philosophy
(though its not always clear whay s good shortcut/hack c way and
what is not)
It's so easy to see where one argument ends and another begins! >>>>>>> And this is the simplest possible set of arguments.
Still, C has prior art here:
typedef struct {float x,y,z;} float3;
typedef struct {float3 a, b; int c;} T;
T x = {1, 2, 3, 4, 5, 6, 7};
So that would fit right in!
https://www.youtube.com/watch?v=xERLKVTV9s8
those pices of geometry was generated by ai ...sadly when adding
more geometry the rasterizer get slowing down ofs..and i have no
best cpu
Too bad you need an AI to make it for you.
you talk like medevial peasnt such your remarks here
you know for some people accustomed to higher social standards you
may be perceive you as a bit of a country bumpkin (sorry i dont
understand this phrase its form translation, i m not quite sure what
bumpkin is - i meant more like peasent, medevial villager)
its not quite good to enforce you peasnty belifs on
people...especially as it seems you totally dont know what youre
talkin about
i already told you so but it seems youre like dont get it
as to rasterizer its nice to shape the pixell matter..though i need much >>> stronger cpu, i need like 100x stronger..and it doesnt seem i would
get it..though GPU in fact maybe might be so
or meybe i should learn more multithreading and put it on 8 10 or 12
cores... im not sure but not being experienced in this it seems that
rasterisation should be quite good for multithreading - simply run 1/10
of objects in the scene on 10 cores into 10 output buffers..then "add"
the buffers... this depth buffers seem ideal for adding
im not yet sure if it really works that way - but if it does its
finally a reason to buy a desktop pc iwth many cores
though modern are maybe 2-3 times faster at most i guess
Not really, just buy something with a half way decent GPU, or even a
crappy one. NVIDIA has some cheap ones. The learn how to code for it.
there is no chea nvidia GPU at stores right now.. i maybe should stil
wait if they get nootably cheaper and buy some
more important gpu koding is different kind of coding... this rasterizer
btw i coded in formal C now (as ported from old version c via c++)
though those linker errors when i
i call i function name which i it cant find annoys me i could say
(in c via c++ thre eas no such thing as i remember)
as to AI it so much grat i could probably name a list of 100
(or at least 30) big advantages of it where 2-3 could be suffice to use it
you noticed i criticize your 'peasenty' attitude but really learn what
you talkin about becouse stating things when you got no idea what youre talkin about is absolutely not usenet is for
usenet was always good people here focus on validating opinions and
what you say like that: i have no idea what im talking about yet i
will say opposite to truth is not standable here
take given point you learned if something is wrong in that point
criticize it in valid ay if you must ... or praise it if its good
becouse this seconnd attempt is arso quite valueable i such new topic
when people need to learn that
Lawrence D’Oliveiro pisze:
On Sun, 25 Oct 2026 15:58:58 -0700, Chris M. Thomasson wrote:those are prioprietary more or less
On 10/25/2026 2:56 PM, Lawrence D’Oliveiro wrote:
On Sun, 25 Oct 2026 14:44:15 -0700, Chris M. Thomasson wrote:
If you want some free models to work with. check out SketchFab.
Aren’t they more oriented towards 3D printing?
Well, fir should know how to load a 3d model and light it.
There are better sources of models for on-screen work.
Sci-fi fan? How about this <https://trekmeshes.eu/>.
ai generates quite nice models imo
https://www.youtube.com/watch?v=PeTMNf4Z8q4
and whats great there are like i get the legal rights to them
at least in such extnt i can uise them - which is great
becouse even if tehre are free models in the net i dont like the
dependencies of such type
and here is liek i get rights to this stations and ships
possibly not agressive that someone can generate the same or close and
he has also rights to thuis and its also very good as i dont like
agresive copyrights
but startrek is ok and i could eventually even download and load thse
models just tos see how it look
In article <11bnvi2$oo6k$[email protected]>, "fir" wrote:
...
so many people dont get basics and talk crazy things
This is rich, coming from "fir"...
On 10/26/2026 10:47 AM, Kenny McCormack wrote:
In article <11bnvi2$oo6k$[email protected]>, "fir" wrote:
...
so many people dont get basics and talk crazy things
This is rich, coming from "fir"...
Yikes!
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,142 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 135:28:28 |
| Calls: | 14,707 |
| Calls today: | 1 |
| Files: | 186,498 |
| D/L today: |
1,117 files (343M bytes) |
| Messages: | 2,552,863 |