🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

91 total messages Page 2 of 2 Started by fir Sun, 01 Nov 2026 13:32
Page 2 of 2 • 91 total messages
Re: p = {1,0,0}
#1392
Author: fir
Date: Sun, 08 Nov 2026 11:56
28 lines
2413 bytes
fir pisze:
>>
> 
> C ad A arestructures and functions  at once
> 
> C() {2}  (Or
> C{2} is the same as you may skip () in definiton if they are empty)


note normally it could be defined

int C() {C=2}


so now when you write

printf("%d", C*C);

then C may be not set it rather printf 0 or random stack value

but the

C{2}

is a nice shortcut also

those are all discovered ideas and some details i mat yet all change
as those dicoveries open some space for some decisions
Re: p = {1,0,0}
#1382
Author: fir
Date: Sun, 08 Nov 2026 12:12
66 lines
3442 bytes
fir pisze:
> fir pisze:
>>>
>>
>> C ad A arestructures and functions  at once
>>
>> C() {2}  (Or
>> C{2} is the same as you may skip () in definiton if they are empty)
> 
> 
> note normally it could be defined
> 
> int C() {C=2}
> 
> 
> so now when you write
> 
> printf("%d", C*C);
> 
> then C may be not set it rather printf 0 or random stack value
> 
> but the
> 
> C{2}
> 
> is a nice shortcut also
> 
> those are all discovered ideas and some details i mat yet all change
> as those dicoveries open some space for some decisions


I could say its not concise becuse say you got such

int C {clib_rand()}

now C() calls clib_rand() but discards a value
and C as value has unset int value even after C() call
(and its possibly somewhat good)

so

C{2} whan called C() should do nothing (ass calling 2; do nothing)
but as read should not have a value (not 2) but C{2} seem nice to have 
as 2 so maybe it needs to have some additional rules to define or change
the above

putting the rule that

C{} should have value of what inside has as value is not quite good 
becouse say

C(int i) {i++; i++; i++; i++; -1,0,-4}

would have 'volatile' value  like {2,3,4,5, -1,0,4}  which seem kinda 
nonsence (in some way)

i dont know maybe just code lines could be skipped so in the above
C has a value of {-1,0,4}

(and in those all things i wrote before it was kinda ssumed in facy 
(though in fact i was not considered constants there)




Re: p = {1,0,0}
#1383
Author: fir
Date: Sun, 08 Nov 2026 15:12
106 lines
4144 bytes
fir pisze:
> fir pisze:
>> fir pisze:
>>>>
>>>
>>> C ad A arestructures and functions  at once
>>>
>>> C() {2}  (Or
>>> C{2} is the same as you may skip () in definiton if they are empty)
>>
>>
>> note normally it could be defined
>>
>> int C() {C=2}
>>
>>
>> so now when you write
>>
>> printf("%d", C*C);
>>
>> then C may be not set it rather printf 0 or random stack value
>>
>> but the
>>
>> C{2}
>>
>> is a nice shortcut also
>>
>> those are all discovered ideas and some details i mat yet all change
>> as those dicoveries open some space for some decisions
> 
> 
> I could say its not concise becuse say you got such
> 
> int C {clib_rand()}
> 
> now C() calls clib_rand() but discards a value
> and C as value has unset int value even after C() call
> (and its possibly somewhat good)
> 
one coud say that if

int a (int b)
{
    a = b;
}


is liek

"int a"(int b)

ile float f(int b)
is like "float f"(int b)

then

C(int a)

is like void C(int a)

thus C{2} is void C{2} then C shouul yeild to void
and thise are kinda rgiht arguments

but c is not only variable its alos a structure

C(int x)
{
   int a;
  int b;
  int c;
}


is like struct C {int a,b,c} so in this view c{2} is more like one 
element structure that contains 2 so probably c{2} is standable but this 
arguments above is to reember maybe

> so
> 
> C{2} whan called C() should do nothing (ass calling 2; do nothing)
> but as read should not have a value (not 2) but C{2} seem nice to have 
> as 2 so maybe it needs to have some additional rules to define or change
> the above
> 
> putting the rule that
> 
> C{} should have value of what inside has as value is not quite good 
> becouse say
> 
> C(int i) {i++; i++; i++; i++; -1,0,-4}
> 
> would have 'volatile' value  like {2,3,4,5, -1,0,4}  which seem kinda 
> nonsence (in some way)
> 
> i dont know maybe just code lines could be skipped so in the above
> C has a value of {-1,0,4}
> 
> (and in those all things i wrote before it was kinda ssumed in facy 
> (though in fact i was not considered constants there)
> 
> 
> 
> 
> 
Re: p = {1,0,0}
#1384
Author: fir
Date: Sun, 08 Nov 2026 15:20
99 lines
3456 bytes
fir pisze:
> fir pisze:
>> fir pisze:
>>>
>>> No, try it like this first:
>>>
>>>     int A() {B = C()}
>>
>> no this should be
>>
>>    int A() {A = C()}
>>
>> now its ok
>>
>> if
>>
>> C(){2}  //in clasic c its colose to int C() {return 2}
>>
>>
>> then
>>
>> A()
>>
>> calls C() and assigns 2 to A so A is 2 now
>>
>> or take it
>>
>>   int A(int B) {A = C()*B}
>>
>> A(3) assigns 6 to a so
>>
>>
>> main:
>>
>>
>> C{2} //modue with value 2
>>
>> int A(int B) {A = C()*B}  //module A definition
>>
>> A(10)  //asigns  20 to A
>>
>> int X = A*A;  //assigns 400 to X
>>
>>
> 
> if you dont understand it its like
> 
>     sinf(); ///calls sinf() function but the result is not 'returned' 
> but its a float named sinf
> 
> 
> sou you can
>     sinf(1.22);
> 
> float a = sinf*20;
> 
> 
> and in sinf definition you use this syntax
> 
> float sinf(float a)
> {
>      //do calculations here
> 
>      sinf = //..... result
> }
> 
> so
> 
> int rand { rand = clib_rand()}
> 
> then rand() //cals rand
> 
> a = rand*rand  //uses value (witthout calling
>>

here above you could

 > a = rand()*rand

calls rand and squares it //like 22*22


a = rand()*rand()

calls rand twice //like 348*982

a = rand*rand() //uses previous rand and calls rand //like 982 *1342

all this sintax is much more capacious so you could write more heavy 
(condensed) code


>> in fact tha call C() is ignored as there is no code to execute in C  
>> but C value is taken
>>
>>
>>
> 
Re: p = {1,0,0}
#1385
Author: bartc
Date: Sun, 08 Nov 2026 17:18
124 lines
4131 bytes
On 08/11/2026 15:20, fir wrote:
> fir pisze:
>> fir pisze:
>>> fir pisze:
>>>>
>>>> No, try it like this first:
>>>>
>>>>     int A() {B = C()}
>>>
>>> no this should be
>>>
>>>    int A() {A = C()}
>>>
>>> now its ok
>>>
>>> if
>>>
>>> C(){2}  //in clasic c its colose to int C() {return 2}
>>>
>>>
>>> then
>>>
>>> A()
>>>
>>> calls C() and assigns 2 to A so A is 2 now
>>>
>>> or take it
>>>
>>>   int A(int B) {A = C()*B}
>>>
>>> A(3) assigns 6 to a so
>>>
>>>
>>> main:
>>>
>>>
>>> C{2} //modue with value 2
>>>
>>> int A(int B) {A = C()*B}  //module A definition
>>>
>>> A(10)  //asigns  20 to A
>>>
>>> int X = A*A;  //assigns 400 to X
>>>
>>>
>>
>> if you dont understand it its like
>>
>>     sinf(); ///calls sinf() function but the result is not 'returned' 
>> but its a float named sinf
>>
>>
>> sou you can
>>     sinf(1.22);
>>
>> float a = sinf*20;
>>
>>
>> and in sinf definition you use this syntax
>>
>> float sinf(float a)
>> {
>>      //do calculations here
>>
>>      sinf = //..... result
>> }
>>
>> so
>>
>> int rand { rand = clib_rand()}
>>
>> then rand() //cals rand
>>
>> a = rand*rand  //uses value (witthout calling

    int randv;

    int randf() {
        randv = rand();   // from stdlib.h
    }

    randf();              // calls rand and store in randv

    a = randv*randv;      // uses value without calling

So this is nothing that can't be done now and much more clearly.

>>>
> 
> here above you could
> 
>  > a = rand()*rand
> 
> calls rand and squares it //like 22*22

OK, so:

    a = rand()**2;

C doesn't have '**' now, but this is much more useful and general 
purpose extension. Or you can emulate it:

    int sqrint(int a) { return a * a;}

    a = sqrint(rand());

Again, this can be done right now.

> 
> a = rand()*rand()
> 
> calls rand twice //like 348*982
> 
> a = rand*rand() //uses previous rand and calls rand //like 982 *1342
> 
> all this sintax is much more capacious so you could write more heavy 
> (condensed) code

Is that supposed to be good, or bad?

If less syntax is used it should be because of true simplicity not 
because due to an incomprehensible set of language rules.

Re: p = {1,0,0}
#1386
Author: fir
Date: Sun, 08 Nov 2026 18:17
144 lines
5118 bytes
bartc pisze:
> On 08/11/2026 15:20, fir wrote:
>> fir pisze:
>>> fir pisze:
>>>> fir pisze:
>>>>>
>>>>> No, try it like this first:
>>>>>
>>>>>     int A() {B = C()}
>>>>
>>>> no this should be
>>>>
>>>>    int A() {A = C()}
>>>>
>>>> now its ok
>>>>
>>>> if
>>>>
>>>> C(){2}  //in clasic c its colose to int C() {return 2}
>>>>
>>>>
>>>> then
>>>>
>>>> A()
>>>>
>>>> calls C() and assigns 2 to A so A is 2 now
>>>>
>>>> or take it
>>>>
>>>>   int A(int B) {A = C()*B}
>>>>
>>>> A(3) assigns 6 to a so
>>>>
>>>>
>>>> main:
>>>>
>>>>
>>>> C{2} //modue with value 2
>>>>
>>>> int A(int B) {A = C()*B}  //module A definition
>>>>
>>>> A(10)  //asigns  20 to A
>>>>
>>>> int X = A*A;  //assigns 400 to X
>>>>
>>>>
>>>
>>> if you dont understand it its like
>>>
>>>     sinf(); ///calls sinf() function but the result is not 'returned' 
>>> but its a float named sinf
>>>
>>>
>>> sou you can
>>>     sinf(1.22);
>>>
>>> float a = sinf*20;
>>>
>>>
>>> and in sinf definition you use this syntax
>>>
>>> float sinf(float a)
>>> {
>>>      //do calculations here
>>>
>>>      sinf = //..... result
>>> }
>>>
>>> so
>>>
>>> int rand { rand = clib_rand()}
>>>
>>> then rand() //cals rand
>>>
>>> a = rand*rand  //uses value (witthout calling
> 
>     int randv;
> 
>     int randf() {
>         randv = rand();   // from stdlib.h
>     }
> 
>     randf();              // calls rand and store in randv
> 
>     a = randv*randv;      // uses value without calling
> 
> So this is nothing that can't be done now and much more clearly.
> 
>>>>
>>
>> here above you could
>>
>>  > a = rand()*rand
>>
>> calls rand and squares it //like 22*22
> 
> OK, so:
> 
>     a = rand()**2;
> 
> C doesn't have '**' now, but this is much more useful and general 
> purpose extension. Or you can emulate it:
> 
>     int sqrint(int a) { return a * a;}
> 
>     a = sqrint(rand());
> 
> Again, this can be done right now.
> 
>>
>> a = rand()*rand()
>>
>> calls rand twice //like 348*982
>>
>> a = rand*rand() //uses previous rand and calls rand //like 982 *1342
>>
>> all this sintax is much more capacious so you could write more heavy 
>> (condensed) code
> 
> Is that supposed to be good, or bad?
> 
> If less syntax is used it should be because of true simplicity not 
> because due to an incomprehensible set of language rules.
> 

you could say the same when you learned c first time

in fact learning this above is like learning c first time, you should be 
happy

it also shows that oryginal c and those upbildings are close, its close 
feeling of having more c in c

ofc the fact you can write more heavy C is considereg good -
it is considered very good

i probbaly could find more examles of this heavier c be heavier
(thus shorted) than oryginal c but i would probbaly be in mood to think up
examples...you may also try yourself

(i will tray to give such examples but in some future yet not
know when i will be in proper mood .. right now im feeling a bit tired 
ans sleepy ;c)
Re: p = {1,0,0}
#1387
Author: fir
Date: Sun, 08 Nov 2026 18:36
201 lines
6566 bytes
fir pisze:
> bartc pisze:
>> On 08/11/2026 15:20, fir wrote:
>>> fir pisze:
>>>> fir pisze:
>>>>> fir pisze:
>>>>>>
>>>>>> No, try it like this first:
>>>>>>
>>>>>>     int A() {B = C()}
>>>>>
>>>>> no this should be
>>>>>
>>>>>    int A() {A = C()}
>>>>>
>>>>> now its ok
>>>>>
>>>>> if
>>>>>
>>>>> C(){2}  //in clasic c its colose to int C() {return 2}
>>>>>
>>>>>
>>>>> then
>>>>>
>>>>> A()
>>>>>
>>>>> calls C() and assigns 2 to A so A is 2 now
>>>>>
>>>>> or take it
>>>>>
>>>>>   int A(int B) {A = C()*B}
>>>>>
>>>>> A(3) assigns 6 to a so
>>>>>
>>>>>
>>>>> main:
>>>>>
>>>>>
>>>>> C{2} //modue with value 2
>>>>>
>>>>> int A(int B) {A = C()*B}  //module A definition
>>>>>
>>>>> A(10)  //asigns  20 to A
>>>>>
>>>>> int X = A*A;  //assigns 400 to X
>>>>>
>>>>>
>>>>
>>>> if you dont understand it its like
>>>>
>>>>     sinf(); ///calls sinf() function but the result is not 
>>>> 'returned' but its a float named sinf
>>>>
>>>>
>>>> sou you can
>>>>     sinf(1.22);
>>>>
>>>> float a = sinf*20;
>>>>
>>>>
>>>> and in sinf definition you use this syntax
>>>>
>>>> float sinf(float a)
>>>> {
>>>>      //do calculations here
>>>>
>>>>      sinf = //..... result
>>>> }
>>>>
>>>> so
>>>>
>>>> int rand { rand = clib_rand()}
>>>>
>>>> then rand() //cals rand
>>>>
>>>> a = rand*rand  //uses value (witthout calling
>>
>>     int randv;
>>
>>     int randf() {
>>         randv = rand();   // from stdlib.h
>>     }
>>
>>     randf();              // calls rand and store in randv
>>
>>     a = randv*randv;      // uses value without calling
>>
>> So this is nothing that can't be done now and much more clearly.
>>
>>>>>
>>>
>>> here above you could
>>>
>>>  > a = rand()*rand
>>>
>>> calls rand and squares it //like 22*22
>>
>> OK, so:
>>
>>     a = rand()**2;
>>
>> C doesn't have '**' now, but this is much more useful and general 
>> purpose extension. Or you can emulate it:
>>
>>     int sqrint(int a) { return a * a;}
>>
>>     a = sqrint(rand());
>>
>> Again, this can be done right now.
>>
>>>
>>> a = rand()*rand()
>>>
>>> calls rand twice //like 348*982
>>>
>>> a = rand*rand() //uses previous rand and calls rand //like 982 *1342
>>>
>>> all this sintax is much more capacious so you could write more heavy 
>>> (condensed) code
>>
>> Is that supposed to be good, or bad?
>>
>> If less syntax is used it should be because of true simplicity not 
>> because due to an incomprehensible set of language rules.
>>
> 
> you could say the same when you learned c first time
> 
> in fact learning this above is like learning c first time, you should be 
> happy
> 
> it also shows that oryginal c and those upbildings are close, its close 
> feeling of having more c in c
> 
> ofc the fact you can write more heavy C is considereg good -
> it is considered very good
> 
> i probbaly could find more examles of this heavier c be heavier
> (thus shorted) than oryginal c but i would probbaly be in mood to think up
> examples...you may also try yourself
> 
> (i will tray to give such examples but in some future yet not
> know when i will be in proper mood .. right now im feeling a bit tired 
> ans sleepy ;c)
> 

(side note)

besides im happy with all that yet becouse other reasons ,

it SHOWS interesting things, and it RESOLVES some things

for example as you maybe noticed if rear wat was written that

if some have

foo(){

}

it SHOWS that in definition those () could be ommited


foo{
  printf("dsadsad");
}

when you call you still need foo(), but not in definition


its true - and i not saing that - that was a 'result'
it also byt resolves a thing what such foo {} should be (which was a 
HARD HARD questions back then)

i like such cases when things answers themselves... its also some form 
of acknovledgment things are done good here when things answers themselves


(end of side note)


some can also be said on word declaration becouse now that word
like has o sense probebly you got definition and you got something like 
"first appearance" or maybe "include" ? instead of declaration

also such form is generally nice

foo{
   aaa{
     bb{}
    }
   zoo{}
booo{}
}


what is this? functions containing functions and at onece 
modules/structures containing structures depending if you put data 
inside or code inside

its answered itself so it can be said its answered (what it is)
Re: p = {1,0,0}
#1388
Author: fir
Date: Sun, 08 Nov 2026 18:41
21 lines
2421 bytes
fir pisze:

> also such form is generally nice
> 
> foo{
>    aaa{
>      bb{}
>     }
>    zoo{}
> booo{}
> }
> 

and what it is in 'normal' c? i dont even know
> 
> what is this? functions containing functions and at onece 
> modules/structures containing structures depending if you put data 
> inside or code inside
> 
> its answered itself so it can be said its answered (what it is)
Re: p = {1,0,0}
#1397
Author: fir
Date: Mon, 09 Nov 2026 22:47
84 lines
4184 bytes
yet maybe some thoughts on for loop syntax potential improvements






im really annoyed by long c loops
like for(int i=0; i<100; i++) {}

back hen i miraculously mabe found some good alternative but it needs
unicode

100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"

it needs unicode becouse you will need tu use varable here
and if you use variable then normal i would be part of name of the variable

width𝐢 {} //bold or cursive (italics) for indexes

eventualy some culd use greek letters etc

Aψ tab[ψ]=9

(eventually though amybe less likely Aψ: tab[ψ]=9  )

lookin good but may have some drawbacks like its quite strong decision


overally i thinked what WOULD look the natural form of loop in c

in my mind appeared today some:


if f() is a function call then

f();f();f();f();f();f();f();f();

resembles loop thus

f()^10 may be understand as a kinda "natural" form of loop

so

int i =0; {a[i++]==0? break} ^ strlen(a);

might be seen as kinda natural
(probably thought here strlen would be called many tiles so maybe

int LEN = strlen(a);
int i =0; {a[i++]==0? break} ^ LEN;

its not bad still its a bit long, has no shorter form and also
there is a problem power has no leftsde form like 2^10 has not a form
"10th power of 2" though maybe some could vrite ^10 {2}

so some shortcut form i could consider

i^100 {tab[i]=0}

its not quite as natural as  {tab[i++]=0}^100 but maybe its standable as 
its based on idea of power and adds some to it

i even noticed this sole sign "^" could be read as "for"

i^100 would mean power given block  100 times and i treat as a number of 
this powering

i^10..99 { tab[i] = 0; }

( or { tab[i] = 0; } i^10..99 )



would then mean for i from 10 to 99 (inclusively)

im not sure if this is enough good but those  two syntaxes
(one using this unicode indexes in minimal form) and this based on
ascii is what i'm about currently

some could be worried that now this i as index is not an "int i"
only enigmatic i - but im not sure if such special thing as index of the 
loop (which is kinda low level thing should be necessary a clasical int 
i..maybe it shouldnt?
Re: p = {1,0,0}
#1398
Author: fir
Date: Mon, 09 Nov 2026 22:56
95 lines
4806 bytes
fir pisze:
> yet maybe some thoughts on for loop syntax potential improvements
> 
> 
> 
> 
> 
> 
> im really annoyed by long c loops
> like for(int i=0; i<100; i++) {}
> 
> back hen i miraculously mabe found some good alternative but it needs
> unicode
> 
> 100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"
> 
> it needs unicode becouse you will need tu use varable here
> and if you use variable then normal i would be part of name of the variable
> 
> width𝐢 {} //bold or cursive (italics) for indexes
> 
> eventualy some culd use greek letters etc
> 
> Aψ tab[ψ]=9
> 
> (eventually though amybe less likely Aψ: tab[ψ]=9  )
> 
> lookin good but may have some drawbacks like its quite strong decision
> 
> 
> overally i thinked what WOULD look the natural form of loop in c
> 
> in my mind appeared today some:
> 
> 
> if f() is a function call then
> 
> f();f();f();f();f();f();f();f();
> 
> resembles loop thus
> 
> f()^10 may be understand as a kinda "natural" form of loop
> 
> so
> 
> int i =0; {a[i++]==0? break} ^ strlen(a);
> 
> might be seen as kinda natural
> (probably thought here strlen would be called many tiles so maybe
> 
> int LEN = strlen(a);
> int i =0; {a[i++]==0? break} ^ LEN;
> 
> its not bad still its a bit long, has no shorter form and also
> there is a problem power has no leftsde form like 2^10 has not a form
> "10th power of 2" though maybe some could vrite ^10 {2}
> 
> so some shortcut form i could consider
> 
> i^100 {tab[i]=0}
> 

sorry i wrote i ^ 100 here my reader puts superscript here
if i would sue superscript then i would probably superscriopt whole 
"100i"  like {}"100i" not saying its a good idea ..though sometimes it 
seems interesting like tab[i++]^100 = 0 or matbe tab[i++]^100 = 
tab2[k--]^100 (it would be copying with reversing

overally this analogy using power as analogy fo r loop seems interesting

> its not quite as natural as  {tab[i++]=0}^100 but maybe its standable as 
> its based on idea of power and adds some to it
> 
> i even noticed this sole sign "^" could be read as "for"
> 
> i^100 would mean power given block  100 times and i treat as a number of 
> this powering
> 
> i^10..99 { tab[i] = 0; }
> 
> ( or { tab[i] = 0; } i^10..99 )
> 
> 
> 
> would then mean for i from 10 to 99 (inclusively)
> 
> im not sure if this is enough good but those  two syntaxes
> (one using this unicode indexes in minimal form) and this based on
> ascii is what i'm about currently
> 
> some could be worried that now this i as index is not an "int i"
> only enigmatic i - but im not sure if such special thing as index of the 
> loop (which is kinda low level thing should be necessary a clasical int 
> i..maybe it shouldnt?
Re: p = {1,0,0}
#1401
Author: bartc
Date: Tue, 10 Nov 2026 01:11
110 lines
4912 bytes
On 09/11/2026 22:47, fir wrote:
> yet maybe some thoughts on for loop syntax potential improvements
> 
> 
> 
> 
> 
> 
> im really annoyed by long c loops
> like for(int i=0; i<100; i++) {}

So am I.

> back hen i miraculously mabe found some good alternative but it needs
> unicode

But there are a million ways to have a shorter syntax without needing to 
resort to Unicode.

Have you looked at /any/ other at languages at all? Take some ideas from 
those.

> 100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"

   for i<100 {}

might do it too. But I'd prefer 'for i=0,100 {}'.

> if f() is a function call then
> 
> f();f();f();f();f();f();f();f();
> 
> resembles loop thus
> 
> f()^10 may be understand as a kinda "natural" form of loop
> 

So a repeat-N-times loop. Try ntimes 10 {}

> so
> 
> int i =0; {a[i++]==0? break} ^ strlen(a);
> 
> might be seen as kinda natural
> (probably thought here strlen would be called many tiles so maybe
> 
> int LEN = strlen(a);
> int i =0; {a[i++]==0? break} ^ LEN;

How you have a loop that iterates over 0 to LEN-1, and yet you still 
have a repeat-N-times loop and need to manually initialise and step the 
index?

Try the idea from above (upper limit is exclusive):

   for i=0,strlen(a) {a[i]==0 ? break}

(I won't comment on that ? construct.)


> its not bad still its a bit long, has no shorter form and also
> there is a problem power has no leftsde form like 2^10 has not a form
> "10th power of 2" though maybe some could vrite ^10 {2}
> 
> so some shortcut form i could consider
> 
> i^100 {tab[i]=0}

   for i=1,100 {tab[i]=0}


> its not quite as natural as  {tab[i++]=0}^100 but maybe its standable as 

What's natural about ^ meaning iteration? In C it means bitwise 
exclusive or. In other languages it might mean pow() or pointer deref.

(Remember your example above was f();f();f() not f()*f()*f().)

> its based on idea of power and adds some to it
> 
> i even noticed this sole sign "^" could be read as "for"
> 
> i^100 would mean power given block  100 times and i treat as a number of 
> this powering
> 
> i^10..99 { tab[i] = 0; }
> 
> ( or { tab[i] = 0; } i^10..99 )

  for i=10,100 {tab[i] = 0}

Everyone can see it is a for loop.


> 
> im not sure if this is enough good but those  two syntaxes
> (one using this unicode indexes in minimal form) and this based on
> ascii is what i'm about currently
> 
> some could be worried that now this i as index is not an "int i"
> only enigmatic i - but im not sure if such special thing as index of the 
> loop (which is kinda low level thing should be necessary a clasical int 
> i..maybe it shouldnt?

A loop index is definitely a thing, just not in C because it is so 
backward. Even Fortran had it in the 1950s:

    do x i=1,100                 # inclusive range

(x is a label for the end of the loop as it didn't have block syntax yet.)
Re: p = {1,0,0}
#1406
Author: David Brown
Date: Tue, 10 Nov 2026 08:24
112 lines
5588 bytes
On 10/11/2026 02:11, bartc wrote:
> On 09/11/2026 22:47, fir wrote:
>> yet maybe some thoughts on for loop syntax potential improvements
>>
>>
>>
>>
>>
>>
>> im really annoyed by long c loops
>> like for(int i=0; i<100; i++) {}
> 
> So am I.
> 
>> back hen i miraculously mabe found some good alternative but it needs
>> unicode
> 
> But there are a million ways to have a shorter syntax without needing to 
> resort to Unicode.
> 
> Have you looked at /any/ other at languages at all? Take some ideas from 
> those.

Or look at C.  It is not exactly a challenge to have :

#define For(_var, _limit) for (int _var = 0; _var < _limit; _var++)

and then you can write :

	For(i, 100)

With a little more effort, you can even make a single macro that could 
handle :

	For(100)	// Automatic anonymous variable

and

	For(i, 1, 100)	// If you don't want to start at 0

It is ludicrous to get annoyed about the "lack" of a feature in a 
language when the language has all you need in order to provide that 
feature.  (It is fine to say you would /prefer/ if this feature were 
available out-of-the-box in C - that's just personal preference.)

(And before you say it, this is not a "workaround".  Macros are part of 
the language - they are there to be used if the programmer thinks the 
resulting code is better.  I personally don't think such a "For" macro 
would give better code, but my preferences are different from yours.)

> 
>> 100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"
> 
>    for i<100 {}
> 
> might do it too. But I'd prefer 'for i=0,100 {}'.
> 
>> if f() is a function call then
>>
>> f();f();f();f();f();f();f();f();
>>
>> resembles loop thus
>>
>> f()^10 may be understand as a kinda "natural" form of loop

Symbols are fine for things that are used a lot.  For rarely used 
features, they are hard to remember when either reading or writing the 
code.  And this would never be used.

>>
> 
> So a repeat-N-times loop. Try ntimes 10 {}

#define NTimes(_n) for (int _nnn = 0; _nnn < _n; _nnn++)

> 
>> so
>>
>> int i =0; {a[i++]==0? break} ^ strlen(a);
>>
>> might be seen as kinda natural
>> (probably thought here strlen would be called many tiles so maybe
>>
>> int LEN = strlen(a);
>> int i =0; {a[i++]==0? break} ^ LEN;
> 
> How you have a loop that iterates over 0 to LEN-1, and yet you still 
> have a repeat-N-times loop and need to manually initialise and step the 
> index?
> 
> Try the idea from above (upper limit is exclusive):
> 
>    for i=0,strlen(a) {a[i]==0 ? break}
> 
> (I won't comment on that ? construct.)
> 

The big trouble with playing syntax games like Fir is doing (and you are 
doing, to a lesser extent) is that it is very easy to write code 
snippets as examples, but very difficult to make a complete set of 
syntax and grammar rules that are not ambiguous or in conflict with each 
other.  Fir does not need to consider that at all in his ramblings - he 
just lets his cat wander across his keyboard.  For a real language for 
widespread use, it is far more difficult as you have to consider all 
conceivable corner cases or strange usage.  (For your languages, Bart, 
you have a middle ground - since you are the only user, you can easily 
ensure that all users stay away from awkward corner cases.  That's 
entirely fine for your own use - but it is one of the reasons your 
language design does not scale or compare to mainstream languages. 
Still, I would far rather work with your choices than Fir's here!)

Re: p = {1,0,0}
#1409
Author: bartc
Date: Tue, 10 Nov 2026 12:08
80 lines
4902 bytes
On 10/11/2026 08:24, David Brown wrote:
> On 10/11/2026 02:11, bartc wrote:

>> Have you looked at /any/ other at languages at all? Take some ideas 
>> from those.
> 
> Or look at C.  It is not exactly a challenge to have :
> 
> #define For(_var, _limit) for (int _var = 0; _var < _limit; _var++)
> 
> and then you can write :
> 
>      For(i, 100)
> 
> With a little more effort, you can even make a single macro that could 
> handle :
> 
>      For(100)    // Automatic anonymous variable
> 
> and
> 
>      For(i, 1, 100)    // If you don't want to start at 0

This is stuff I used to do. Then I realised then using a private macro 
library to refine the language doesn't work (when posting code on forums 
for example).

>> Try the idea from above (upper limit is exclusive):
>>
>>    for i=0,strlen(a) {a[i]==0 ? break}
>>
>> (I won't comment on that ? construct.)
>>
> 
> The big trouble with playing syntax games like Fir is doing (and you are 
> doing, to a lesser extent) is that it is very easy to write code 
> snippets as examples, but very difficult to make a complete set of 
> syntax and grammar rules that are not ambiguous or in conflict with each 
> other.  Fir does not need to consider that at all in his ramblings - he 
> just lets his cat wander across his keyboard.  For a real language for 
> widespread use,

The examples I gave here were just starting points: saner ideas 
(compared to /needing/ Unicode for identifiers for example). But they 
are based on real features used elsewhere.

They are vaguely C-like, but whatever fir is planning is a long way from 
C anyway. He's not interested in workarounds using actual C.

> it is far more difficult as you have to consider all 
> conceivable corner cases or strange usage.  (For your languages, Bart, 
> you have a middle ground - since you are the only user, you can easily 
> ensure that all users stay away from awkward corner cases.

A language only needs to be real, not widespread, for the syntax choices 
to be valid. There is nothing wrong or ambiguous about the grammar used 
for my loop constructs.

This kind of feature is one of the simplest to get right in a language, 
especially when it is 1-based.

0-based languages make ranges a little more ambiguous. (I believe Zig 
held back on having an iterative for-statement because of this, since 
the upper bounds usually needs to be exclusive.)

Or do you mean that what I have is not as flexible as a C-style 
for-loop? That would be true. The nearest thing I have to:

    for (A; B; C) {

is:

     A
     while B, C do

(This had been a suggested replacement for C's for-loop, which I 
implemented as a proof-of-concept. I decided to keep the feature and use 
it for linked-list traversal, the primary use-case when people explain 
why C for-loops are better.)
Re: p = {1,0,0}
#1410
Author: Keith Thompson
Date: Tue, 10 Nov 2026 12:29
39 lines
3174 bytes
David Brown <david.brown@hesbynett.no> writes:
[...]
> Or look at C.  It is not exactly a challenge to have :
>
> #define For(_var, _limit) for (int _var = 0; _var < _limit; _var++)
>
> and then you can write :
>
> 	For(i, 100)
>
> With a little more effort, you can even make a single macro that could
> handle :
>
> 	For(100)	// Automatic anonymous variable
>
> and
>
> 	For(i, 1, 100)	// If you don't want to start at 0
>
> It is ludicrous to get annoyed about the "lack" of a feature in a
> language when the language has all you need in order to provide that
> feature.  (It is fine to say you would /prefer/ if this feature were
> available out-of-the-box in C - that's just personal preference.)

I don't entirely agree.  Yes, you can create macros that make C
look like something else (I've done it myself).  But any such
macro almost creates a new language that anyone reading the code
has to be familiar with.

If I see `For(100)`, I have to find out how it's defined *and*
understand the `for(...;...;...)` code that it expands to.8

If I thought C would benefit significantly from a Pascal-style for
loop (I don't), I'd want it added as a language feature, not hacked
by multiple incompatible macro definitions, one per project.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Re: p = {1,0,0}
#1411
Author: David Brown
Date: Tue, 10 Nov 2026 12:50
75 lines
5373 bytes
On 10/11/2026 13:08, bartc wrote:
> On 10/11/2026 08:24, David Brown wrote:
>> On 10/11/2026 02:11, bartc wrote:
> 
>>> Have you looked at /any/ other at languages at all? Take some ideas 
>>> from those.
>>
>> Or look at C.  It is not exactly a challenge to have :
>>
>> #define For(_var, _limit) for (int _var = 0; _var < _limit; _var++)
>>
>> and then you can write :
>>
>>      For(i, 100)
>>
>> With a little more effort, you can even make a single macro that could 
>> handle :
>>
>>      For(100)    // Automatic anonymous variable
>>
>> and
>>
>>      For(i, 1, 100)    // If you don't want to start at 0
> 
> This is stuff I used to do. Then I realised then using a private macro 
> library to refine the language doesn't work (when posting code on forums 
> for example).

Well, it works perfectly well in that it does exactly what you are 
asking for here.  It is common to have small libraries with functions, 
headers, macros, typedefs, inline static functions, etc., that you 
re-use between projects.  And if you really want such a "For" feature, 
because you really don't like C's "for" loops, and its your code, then 
use it.  No one else gets to tell you how you write your own code.

But if the code is to be shared with others, then you have to consider 
what suits those other people.  And if you are sharing small bits of 
code on Usenet (or other discussion forum), it is a lot easier if the 
code is written in a fashion familiar to other people, without extra 
abstractions, and certainly without extra dependencies.  That's nothing 
special about C or macros - it's just basic communication skills.

> 
> They are vaguely C-like, but whatever fir is planning is a long way from 
> C anyway. He's not interested in workarounds using actual C.
> 

Agreed.  I have no idea what he is actually interested in, and don't 
bother replying to him.  (I might follow-up on a post he makes if I 
think it is interesting in the C context or could be of interest to 
someone else here, but I think trying to figure out what he wants or 
trying to help him directly is a lost cause.)

>> it is far more difficult as you have to consider all conceivable 
>> corner cases or strange usage.  (For your languages, Bart, you have a 
>> middle ground - since you are the only user, you can easily ensure 
>> that all users stay away from awkward corner cases.
> 
> A language only needs to be real, not widespread, for the syntax choices 
> to be valid. There is nothing wrong or ambiguous about the grammar used 
> for my loop constructs.
> 
> This kind of feature is one of the simplest to get right in a language, 
> especially when it is 1-based.

The very fact that you think this is something to "get right" shows 
where you go wrong in language design, language comparison, and language 
discussions.  It is one of the key reasons why you get in arguments with 
so many people here (the other being that your language has no relevance 
to comp.lang.c, or anyone other than yourself).  It is fine to /prefer/ 
one construct or syntax over another, or to think that one fits better 
in a given language.  It is quite a different matter to claim that your 
way is "right" and everyone else is "wrong".

Re: p = {1,0,0}
#1412
Author: fir
Date: Tue, 10 Nov 2026 12:51
157 lines
5320 bytes
bartc pisze:
> 
>    for i=1,100 {tab[i]=0}
> 
>

this on i dont like better woud be imo

  for i = 1 to 100 {tab[i]=0}

but still it feels too much basic

there are quite few subtle things here what given form gives what feelings

note in c that has no loop there is like no "natural" form of loop
(unles maybe just raw goto etc) at least i dont see it

this one wth power may be koncidered as somewhat natural

{  } ^ t

(note my rider turned some ^100 to superscripts when i posted post in 
text i meant ^ 100 not superscripts (unless the last ones (tab[i++] 
superscript 100)

i could made soem misteke coz when i consider

10 ^ t {}  //read like 10 times "power" {} indexed by t

against


t ^ 10 {} //same

then the first one seems more appropriate


also

1..29 ^ t  {}

a..b ^ i {}

imo this above is beter than

int i =a,b {}  //<-- in this you take very rouhg (and) syntactic 
decision imo (lk egeneralli a,b in c is considered like {a,b} so
it noramlly woud be {int i=a, b} tuple of things ..if no such thing as
i = {a, b} is not defined and if it looks liek it would like be defined 
its definitely not like in for loop etc

the decisions behind

  a..b ^ i {}

are imo quitte different and less colliding

(i know ^ is for xor etc, though i dont like tose bitwise operators as 
thei are taken in c at allso, eventually some could substitute ^ with 
something other its secondary

  a..b @ i {}

(i slightly prefer here a..b ^ i {} right now but the exact symbol 
choices can be deferred)

//i also konsidered

a..b {tab[%1]=k}


//%1 being replcement for i - but i has good tradition in c
// but maybe it could be also present as an alternative solution

so right now from those considerations the ground im standing
as to loops would be that

1..29𝐭{tab[𝐭]=9}

1..29 ^ t  {tab[t]=9}

1..29 {tab[%1]=9}

// maybe 1..29 ^ {tab[%1]=9}
//maybe ^ t =1..29  {tab[%1]=9}
// alternatively {tab[%1]=9} ^ t= 1..76

//well in combination with power this assigment dont look bad here

maybe this also?
^ t=1..29 {tab[t]=9}
allows

^ t = {2,7,9,7,2,4,5} {f(t)}

//allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);

here this leftside form tooks weird more proper lik rightside


  { f(t)} ^ t = {2,7,9,7,2,4,5}




  { f(t)} ^ t = 2..50

overally not bad idea - power combined with those "value lists" either 
a..b or {a,b,c}
//i put space among "^ t" artifically to editor not turn it in 
superscript normally no space needed

maybe its even better than this unicode version

this may be also considered


T = {2,3,4,6} ;

   foo(T);

normally it would just pass a tuple so maybe some operator for "pass
sequentially in time" is maybe needed


T = {2,3,4,6} ;

   foo(::T);

   foo(^{2,3,4,6});

i dont know somethig could be taken

but if soe some could call few sets in parallel so tt fould need to be 
organized someway

   foo(^{2,3,4,6}, ^{0,0,3,4});


   foo(^{{2,0}{3,0}{4,3}{6,4}});

  its also ok it semms you can pass it to whole block

{ }  ^ t= {3,4,5}

as what it was started here

overally it gives both a loop syntax and new posibilities so its quite 
interesting path







Re: p = {1,0,0}
#1413
Author: David Brown
Date: Tue, 10 Nov 2026 12:57
52 lines
4057 bytes
On 10/11/2026 13:29, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
> [...]
>> Or look at C.  It is not exactly a challenge to have :
>>
>> #define For(_var, _limit) for (int _var = 0; _var < _limit; _var++)
>>
>> and then you can write :
>>
>> 	For(i, 100)
>>
>> With a little more effort, you can even make a single macro that could
>> handle :
>>
>> 	For(100)	// Automatic anonymous variable
>>
>> and
>>
>> 	For(i, 1, 100)	// If you don't want to start at 0
>>
>> It is ludicrous to get annoyed about the "lack" of a feature in a
>> language when the language has all you need in order to provide that
>> feature.  (It is fine to say you would /prefer/ if this feature were
>> available out-of-the-box in C - that's just personal preference.)
> 
> I don't entirely agree.  Yes, you can create macros that make C
> look like something else (I've done it myself).  But any such
> macro almost creates a new language that anyone reading the code
> has to be familiar with.
> 
> If I see `For(100)`, I have to find out how it's defined *and*
> understand the `for(...;...;...)` code that it expands to.8
> 
> If I thought C would benefit significantly from a Pascal-style for
> loop (I don't), I'd want it added as a language feature, not hacked
> by multiple incompatible macro definitions, one per project.
> 

For a feature that really is useful, and where the change really does 
make a big difference to the language, then I agree.  A key indicator of 
that is when people /do/ make multiple incompatible definitions to 
provide the feature.  (Booleans is a prime example for C.)  When it is a 
minor matter that few people even think about, such as the way "for" 
loops are written in C, then it is entirely unrealistic to imagine it 
being added to the language.  Given that, I think it would be better for 
bart to make and use a "For" macro in his own C programming (if he does 
any now), rather than getting annoyed about how "for" works.  It would 
be even better for him to simply use C's "for" /without/ getting 
annoyed, if that is an option.


Re: p = {1,0,0}
#1414
Author: fir
Date: Tue, 10 Nov 2026 13:08
191 lines
6617 bytes
fir pisze:
> bartc pisze:
>>
>>    for i=1,100 {tab[i]=0}
>>
>>
> 
> this on i dont like better woud be imo
> 
>   for i = 1 to 100 {tab[i]=0}
> 
> but still it feels too much basic
> 
> there are quite few subtle things here what given form gives what feelings
> 
> note in c that has no loop there is like no "natural" form of loop
> (unles maybe just raw goto etc) at least i dont see it
> 
> this one wth power may be koncidered as somewhat natural
> 
> {  } ^ t
> 
> (note my rider turned some ^100 to superscripts when i posted post in 
> text i meant ^ 100 not superscripts (unless the last ones (tab[i++] 
> superscript 100)
> 
> i could made soem misteke coz when i consider
> 
> 10 ^ t {}  //read like 10 times "power" {} indexed by t
> 
> against
> 
> 
> t ^ 10 {} //same
> 
> then the first one seems more appropriate
> 
> 
> also
> 
> 1..29 ^ t  {}
> 
> a..b ^ i {}
> 
> imo this above is beter than
> 
> int i =a,b {}  //<-- in this you take very rouhg (and) syntactic 
> decision imo (lk egeneralli a,b in c is considered like {a,b} so
> it noramlly woud be {int i=a, b} tuple of things ..if no such thing as
> i = {a, b} is not defined and if it looks liek it would like be defined 
> its definitely not like in for loop etc
> 
> the decisions behind
> 
>   a..b ^ i {}
> 
> are imo quitte different and less colliding
> 
> (i know ^ is for xor etc, though i dont like tose bitwise operators as 
> thei are taken in c at allso, eventually some could substitute ^ with 
> something other its secondary
> 
>   a..b @ i {}
> 
> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
> choices can be deferred)
> 
> //i also konsidered
> 
> a..b {tab[%1]=k}
> 
> 
> //%1 being replcement for i - but i has good tradition in c
> // but maybe it could be also present as an alternative solution
> 
> so right now from those considerations the ground im standing
> as to loops would be that
> 
> 1..29𝐭{tab[𝐭]=9}
> 
> 1..29 ^ t  {tab[t]=9}
> 
> 1..29 {tab[%1]=9}
> 
> // maybe 1..29 ^ {tab[%1]=9}
> //maybe ^ t =1..29  {tab[%1]=9}
> // alternatively {tab[%1]=9} ^ t= 1..76
> 
> //well in combination with power this assigment dont look bad here
> 
> maybe this also?
> ^ t=1..29 {tab[t]=9}
> allows
> 
> ^ t = {2,7,9,7,2,4,5} {f(t)}
> 
> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
> 
> here this leftside form tooks weird more proper lik rightside
> 
> 
>   { f(t)} ^ t = {2,7,9,7,2,4,5}
> 
> 
> 
> 
>   { f(t)} ^ t = 2..50
> 
> overally not bad idea - power combined with those "value lists" either 
> a..b or {a,b,c}
> //i put space among "^ t" artifically to editor not turn it in 
> superscript normally no space needed
> 
> maybe its even better than this unicode version
> 
> this may be also considered
> 
> 
> T = {2,3,4,6} ;
> 
>    foo(T);
> 
> normally it would just pass a tuple so maybe some operator for "pass
> sequentially in time" is maybe needed
> 
> 
> T = {2,3,4,6} ;
> 
>    foo(::T);
> 
>    foo(^{2,3,4,6});
> 
> i dont know somethig could be taken
> 
> but if soe some could call few sets in parallel so tt fould need to be 
> organized someway
> 
>    foo(^{2,3,4,6}, ^{0,0,3,4});
> 
> 
>    foo(^{{2,0}{3,0}{4,3}{6,4}});
> 
>   its also ok it semms you can pass it to whole block
> 
> { }  ^ t= {3,4,5}
> 
> as what it was started here
> 
> overally it gives both a loop syntax and new posibilities so its quite 
> interesting path
> 
> 

ok so after those above considerations
  (becouse i know not many can go thru them)

{} ^ t=2..99;  //call {} 98 times

is good

and

{} ^ t ={2,3,1,2,3,88}; //call {} six times


it also probbaly need leftside form (normally power has no leftside form)

and it also need those form where you put this "powerings" inside

tab[^T] = ^S

where

int T = {2,8,9,100}; char* S = {"ahbahj","sds","Sdsd","sss"};


maybe - or somethig like that (as to those inner forms im not yet sure)

i must give kudos to bartc


this one

{} ^ t=2..99;

a bit resembles for int i = 2,30 though there are notable
differences - this for is wrong (becouse on abstract level this above is 
not looping its more like powering so its 'abstract' looping
(and really that gives difference becouse if you  go on some abstract 
train of thjoughts the rails are different here)..also thi basic burden 
and all that classical syntax dont fit its another vision
Re: p = {1,0,0}
#1415
Author: fir
Date: Tue, 10 Nov 2026 13:17
216 lines
7200 bytes
fir pisze:
> fir pisze:
>> bartc pisze:
>>>
>>>    for i=1,100 {tab[i]=0}
>>>
>>>
>>
>> this on i dont like better woud be imo
>>
>>   for i = 1 to 100 {tab[i]=0}
>>
>> but still it feels too much basic
>>
>> there are quite few subtle things here what given form gives what 
>> feelings
>>
>> note in c that has no loop there is like no "natural" form of loop
>> (unles maybe just raw goto etc) at least i dont see it
>>
>> this one wth power may be koncidered as somewhat natural
>>
>> {  } ^ t
>>
>> (note my rider turned some ^100 to superscripts when i posted post in 
>> text i meant ^ 100 not superscripts (unless the last ones (tab[i++] 
>> superscript 100)
>>
>> i could made soem misteke coz when i consider
>>
>> 10 ^ t {}  //read like 10 times "power" {} indexed by t
>>
>> against
>>
>>
>> t ^ 10 {} //same
>>
>> then the first one seems more appropriate
>>
>>
>> also
>>
>> 1..29 ^ t  {}
>>
>> a..b ^ i {}
>>
>> imo this above is beter than
>>
>> int i =a,b {}  //<-- in this you take very rouhg (and) syntactic 
>> decision imo (lk egeneralli a,b in c is considered like {a,b} so
>> it noramlly woud be {int i=a, b} tuple of things ..if no such thing as
>> i = {a, b} is not defined and if it looks liek it would like be 
>> defined its definitely not like in for loop etc
>>
>> the decisions behind
>>
>>   a..b ^ i {}
>>
>> are imo quitte different and less colliding
>>
>> (i know ^ is for xor etc, though i dont like tose bitwise operators as 
>> thei are taken in c at allso, eventually some could substitute ^ with 
>> something other its secondary
>>
>>   a..b @ i {}
>>
>> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
>> choices can be deferred)
>>
>> //i also konsidered
>>
>> a..b {tab[%1]=k}
>>
>>
>> //%1 being replcement for i - but i has good tradition in c
>> // but maybe it could be also present as an alternative solution
>>
>> so right now from those considerations the ground im standing
>> as to loops would be that
>>
>> 1..29𝐭{tab[𝐭]=9}
>>
>> 1..29 ^ t  {tab[t]=9}
>>
>> 1..29 {tab[%1]=9}
>>
>> // maybe 1..29 ^ {tab[%1]=9}
>> //maybe ^ t =1..29  {tab[%1]=9}
>> // alternatively {tab[%1]=9} ^ t= 1..76
>>
>> //well in combination with power this assigment dont look bad here
>>
>> maybe this also?
>> ^ t=1..29 {tab[t]=9}
>> allows
>>
>> ^ t = {2,7,9,7,2,4,5} {f(t)}
>>
>> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
>>
>> here this leftside form tooks weird more proper lik rightside
>>
>>
>>   { f(t)} ^ t = {2,7,9,7,2,4,5}
>>
>>
>>
>>
>>   { f(t)} ^ t = 2..50
>>
>> overally not bad idea - power combined with those "value lists" either 
>> a..b or {a,b,c}
>> //i put space among "^ t" artifically to editor not turn it in 
>> superscript normally no space needed
>>
>> maybe its even better than this unicode version
>>
>> this may be also considered
>>
>>
>> T = {2,3,4,6} ;
>>
>>    foo(T);
>>
>> normally it would just pass a tuple so maybe some operator for "pass
>> sequentially in time" is maybe needed
>>
>>
>> T = {2,3,4,6} ;
>>
>>    foo(::T);
>>
>>    foo(^{2,3,4,6});
>>
>> i dont know somethig could be taken
>>
>> but if soe some could call few sets in parallel so tt fould need to be 
>> organized someway
>>
>>    foo(^{2,3,4,6}, ^{0,0,3,4});
>>
>>
>>    foo(^{{2,0}{3,0}{4,3}{6,4}});
>>
>>   its also ok it semms you can pass it to whole block
>>
>> { }  ^ t= {3,4,5}
>>
>> as what it was started here
>>
>> overally it gives both a loop syntax and new posibilities so its quite 
>> interesting path
>>
>>
> 
> ok so after those above considerations
>   (becouse i know not many can go thru them)
> 
> {} ^ t=2..99;  //call {} 98 times
> 
> is good
> 
> and
> 
> {} ^ t ={2,3,1,2,3,88}; //call {} six times
> 
> 
> it also probbaly need leftside form (normally power has no leftside form)
> 
> and it also need those form where you put this "powerings" inside
> 
> tab[^T] = ^S
> 
> where
> 
> int T = {2,8,9,100}; char* S = {"ahbahj","sds","Sdsd","sss"};
> 
> 
> maybe - or somethig like that (as to those inner forms im not yet sure)
> 
> i must give kudos to bartc
> 
> 
> this one
> 
> {} ^ t=2..99;
> 
> a bit resembles for int i = 2,30 though there are notable
> differences - this for is wrong (becouse on abstract level this above is 
> not looping its more like powering so its 'abstract' looping
> (and really that gives difference becouse if you  go on some abstract 
> train of thjoughts the rails are different here)..also thi basic burden 
> and all that classical syntax dont fit its another vision

though for exampla this sign ^ imo could and mabe should be reead "for"


^T foo(T*3);

depending what T is

like int T = 1..29; //T is scope/range

int T = {2,3,4,55,5,3,4}; //t is list/vector/structure

foo(^T*3); probably can be used as a shortcut and
funnt "^" is read as for

so this is "short for" discovery i could say






Re: p = {1,0,0}
#1416
Author: fir
Date: Tue, 10 Nov 2026 13:22
214 lines
7490 bytes
fir pisze:
> fir pisze:
>> fir pisze:
>>> bartc pisze:
>>>>
>>>>    for i=1,100 {tab[i]=0}
>>>>
>>>>
>>>
>>> this on i dont like better woud be imo
>>>
>>>   for i = 1 to 100 {tab[i]=0}
>>>
>>> but still it feels too much basic
>>>
>>> there are quite few subtle things here what given form gives what 
>>> feelings
>>>
>>> note in c that has no loop there is like no "natural" form of loop
>>> (unles maybe just raw goto etc) at least i dont see it
>>>
>>> this one wth power may be koncidered as somewhat natural
>>>
>>> {  } ^ t
>>>
>>> (note my rider turned some ^100 to superscripts when i posted post in 
>>> text i meant ^ 100 not superscripts (unless the last ones (tab[i++] 
>>> superscript 100)
>>>
>>> i could made soem misteke coz when i consider
>>>
>>> 10 ^ t {}  //read like 10 times "power" {} indexed by t
>>>
>>> against
>>>
>>>
>>> t ^ 10 {} //same
>>>
>>> then the first one seems more appropriate
>>>
>>>
>>> also
>>>
>>> 1..29 ^ t  {}
>>>
>>> a..b ^ i {}
>>>
>>> imo this above is beter than
>>>
>>> int i =a,b {}  //<-- in this you take very rouhg (and) syntactic 
>>> decision imo (lk egeneralli a,b in c is considered like {a,b} so
>>> it noramlly woud be {int i=a, b} tuple of things ..if no such thing as
>>> i = {a, b} is not defined and if it looks liek it would like be 
>>> defined its definitely not like in for loop etc
>>>
>>> the decisions behind
>>>
>>>   a..b ^ i {}
>>>
>>> are imo quitte different and less colliding
>>>
>>> (i know ^ is for xor etc, though i dont like tose bitwise operators 
>>> as thei are taken in c at allso, eventually some could substitute ^ 
>>> with something other its secondary
>>>
>>>   a..b @ i {}
>>>
>>> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
>>> choices can be deferred)
>>>
>>> //i also konsidered
>>>
>>> a..b {tab[%1]=k}
>>>
>>>
>>> //%1 being replcement for i - but i has good tradition in c
>>> // but maybe it could be also present as an alternative solution
>>>
>>> so right now from those considerations the ground im standing
>>> as to loops would be that
>>>
>>> 1..29𝐭{tab[𝐭]=9}
>>>
>>> 1..29 ^ t  {tab[t]=9}
>>>
>>> 1..29 {tab[%1]=9}
>>>
>>> // maybe 1..29 ^ {tab[%1]=9}
>>> //maybe ^ t =1..29  {tab[%1]=9}
>>> // alternatively {tab[%1]=9} ^ t= 1..76
>>>
>>> //well in combination with power this assigment dont look bad here
>>>
>>> maybe this also?
>>> ^ t=1..29 {tab[t]=9}
>>> allows
>>>
>>> ^ t = {2,7,9,7,2,4,5} {f(t)}
>>>
>>> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
>>>
>>> here this leftside form tooks weird more proper lik rightside
>>>
>>>
>>>   { f(t)} ^ t = {2,7,9,7,2,4,5}
>>>
>>>
>>>
>>>
>>>   { f(t)} ^ t = 2..50
>>>
>>> overally not bad idea - power combined with those "value lists" 
>>> either a..b or {a,b,c}
>>> //i put space among "^ t" artifically to editor not turn it in 
>>> superscript normally no space needed
>>>
>>> maybe its even better than this unicode version
>>>
>>> this may be also considered
>>>
>>>
>>> T = {2,3,4,6} ;
>>>
>>>    foo(T);
>>>
>>> normally it would just pass a tuple so maybe some operator for "pass
>>> sequentially in time" is maybe needed
>>>
>>>
>>> T = {2,3,4,6} ;
>>>
>>>    foo(::T);
>>>
>>>    foo(^{2,3,4,6});
>>>
>>> i dont know somethig could be taken
>>>
>>> but if soe some could call few sets in parallel so tt fould need to 
>>> be organized someway
>>>
>>>    foo(^{2,3,4,6}, ^{0,0,3,4});
>>>
>>>
>>>    foo(^{{2,0}{3,0}{4,3}{6,4}});
>>>
>>>   its also ok it semms you can pass it to whole block
>>>
>>> { }  ^ t= {3,4,5}
>>>
>>> as what it was started here
>>>
>>> overally it gives both a loop syntax and new posibilities so its 
>>> quite interesting path
>>>
>>>
>>
>> ok so after those above considerations
>>   (becouse i know not many can go thru them)
>>
>> {} ^ t=2..99;  //call {} 98 times
>>
>> is good
>>
>> and
>>
>> {} ^ t ={2,3,1,2,3,88}; //call {} six times
>>
>>
>> it also probbaly need leftside form (normally power has no leftside form)
>>
>> and it also need those form where you put this "powerings" inside
>>
>> tab[^T] = ^S
>>
>> where
>>
>> int T = {2,8,9,100}; char* S = {"ahbahj","sds","Sdsd","sss"};
>>
>>
>> maybe - or somethig like that (as to those inner forms im not yet sure)
>>
>> i must give kudos to bartc
>>
>>
>> this one
>>
>> {} ^ t=2..99;
>>
>> a bit resembles for int i = 2,30 though there are notable
>> differences - this for is wrong (becouse on abstract level this above 
>> is not looping its more like powering so its 'abstract' looping
>> (and really that gives difference becouse if you  go on some abstract 
>> train of thjoughts the rails are different here)..also thi basic 
>> burden and all that classical syntax dont fit its another vision
> 
> though for exampla this sign ^ imo could and mabe should be reead "for"
> 
> 
> ^T foo(T*3);
> 
> depending what T is
> 
> like int T = 1..29; //T is scope/range
> 
> int T = {2,3,4,55,5,3,4}; //t is list/vector/structure
> 
> foo(^T*3); probably can be used as a shortcut and
> funnt "^" is read as for
> 
> so this is "short for" discovery i could say
> 
> 
> 
allright, so a lot has cleared here
Re: p = {1,0,0}
#1419
Author: bartc
Date: Tue, 10 Nov 2026 13:53
50 lines
3839 bytes
On 10/11/2026 12:50, David Brown wrote:
> On 10/11/2026 13:08, bartc wrote:

>> A language only needs to be real, not widespread, for the syntax 
>> choices to be valid. There is nothing wrong or ambiguous about the 
>> grammar used for my loop constructs.
>>
>> This kind of feature is one of the simplest to get right in a 
>> language, especially when it is 1-based.
> 
> The very fact that you think this is something to "get right" shows 
> where you go wrong in language design, language comparison, and language 
> discussions.

Then I don't understand your point here:

"it is far more difficult as you have to consider all conceivable corner 
cases or strange usage."

I directly support these kinds of loops:

    endless
    N-times
    while/repeat-until
    iterate over ranges or values
    (a fifth category not relevant here)

Given those, then the semantics and implementations can be 
straightforward. I can't see the corner cases you mentioned (except when 
operating at extreme integer values), therefore there is little to get 
wrong.

BTW, C only directly supports that third category as while/do-while.

Plus some construction it calls 'for', which is a kind of DIY toolkit 
for constructing any manner of weird and wonderful loops, that cannot be 
verified for correctness.

So did C 'get it right' here? Since there are so many ways for /users/ 
to inadvertently get it wrong while still ending up with valid syntax 
('for(i=0; j<=n; ++k)').

(I suggested you'd meant the lack of a statement like this in my 
projects. Well, I did have it for a year or two, but having /never/ used 
it, it got dropped.

Anyway, how does C get away with having 'while' both starting a loop 
statement, and ending one?!)

Re: p = {1,0,0}
#1421
Author: fir
Date: Tue, 10 Nov 2026 14:09
19 lines
2810 bytes
bartc pisze:
> What's natural about ^ meaning iteration? In C it means bitwise 
> exclusive or. In other languages it might mean pow() or pointer deref.
> 
> (Remember your example above was f();f();f() not f()*f()*f().)

depend how you will define a power of function call

i just defined if as f()^N is "f();f(); f();...." N times

hell kno wif i should see this as multiply ..i dont know..it just makes 
different analogy and this analogy with power seem gave me a good 
results (there was no deep consideration if its some real "powering"
and why powering not "multiplicying")

got some feel that multiplication dont quite go here as multiplication 
is like normal thing more (multiplycation is N additions and when you see

"aaaaaaaaa" its a^9 not a*9
Re: p = {1,0,0}
#1422
Author: fir
Date: Tue, 10 Nov 2026 14:13
11 lines
2400 bytes
bartc pisze:
>> int LEN = strlen(a);
>> int i =0; {a[i++]==0? break} ^ LEN;
> 
> How you have a loop that iterates over 0 to LEN-1, and yet you still 
> have a repeat-N-times loop and need to manually initialise and step the 
> index?

i dont have to, i acn...and this pieco of code above is especially 
neat(its in fact the answer)
Re: p = {1,0,0}
#1423
Author: fir
Date: Tue, 10 Nov 2026 14:17
33 lines
2896 bytes
fir pisze:
> bartc pisze:
>>> int LEN = strlen(a);
>>> int i =0; {a[i++]==0? break} ^ LEN;
>>
>> How you have a loop that iterates over 0 to LEN-1, and yet you still 
>> have a repeat-N-times loop and need to manually initialise and step 
>> the index?
> 
> i dont have to, i acn...and this pieco of code above is especially 
> neat(its in fact the answer)
> 

its in fact this so called "manual" c - and maybe this makes it so
good - everybody loves manual c

note this syntax you proposed

for int i = 1,80 {}

is already not manual

even for(int =0; i<80; i++) isl ike less "manual" tha this

  int LEN = strlen(a);
  int i =0; {a[i++]==0? break} ^ LEN;

imo its more manual becouse it has not this "what loop iteration is" topic

powering here (as reapating {}{}{}{}) is much more manual


Re: p = {1,0,0}
#1424
Author: fir
Date: Tue, 10 Nov 2026 14:24
54 lines
3357 bytes
fir pisze:
> fir pisze:
>> bartc pisze:
>>>> int LEN = strlen(a);
>>>> int i =0; {a[i++]==0? break} ^ LEN;
>>>
>>> How you have a loop that iterates over 0 to LEN-1, and yet you still 
>>> have a repeat-N-times loop and need to manually initialise and step 
>>> the index?
>>
>> i dont have to, i acn...and this pieco of code above is especially 
>> neat(its in fact the answer)
>>
> 
> its in fact this so called "manual" c - and maybe this makes it so
> good - everybody loves manual c
> 
> note this syntax you proposed
> 
> for int i = 1,80 {}
> 
> is already not manual
> 
> even for(int =0; i<80; i++) isl ike less "manual" tha this
> 
>   int LEN = strlen(a);
>   int i =0; {a[i++]==0? break} ^ LEN;
> 
> imo its more manual becouse it has not this "what loop iteration is" topic
> 
> powering here (as reapating {}{}{}{}) is much more manual
> 
> 

and here if people searchs 'automatic'

tab[**height][*width] = 9

(((i replaced ^ for * just here just tow atch how its look  like)

{{}*width}*height

eventually it could be taken but the pover eventually better  )))

tab[^^height][^width] = 9

then there is some "layer" and automatic maybe makes feel plastic, and 
manual is a manual





Re: p = {1,0,0}
#1425
Author: bartc
Date: Tue, 10 Nov 2026 14:27
116 lines
4917 bytes
On 10/11/2026 12:51, fir wrote:
> bartc pisze:
>>
>>    for i=1,100 {tab[i]=0}
>>
>>
> 
> this on i dont like better woud be imo
> 
>   for i = 1 to 100 {tab[i]=0}
> 
> but still it feels too much basic

I'd considered using 1..100 and 1 to 100 but your aim seemed to be 
conciseness. "1,100" is used in Lua.


> there are quite few subtle things here what given form gives what feelings
> 
> note in c that has no loop there is like no "natural" form of loop
> (unles maybe just raw goto etc) at least i dont see it
> 
> this one wth power may be koncidered as somewhat natural
> 
> {  } ^ t

I once used this:

   (n || s)

for repeat-N-times. I decided that was too quaint.

(If a loop were to return a value, as happens in some languages, then 
such a compact form can be desirable to use within expressions.)

>   a..b @ i {}
> 
> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
> choices can be deferred)
Have you considered what the construct 'x .. y', if it was part of the 
syntax, could have lots of different uses. For example:

    if x in a..b       # test a within a range
    A[i..j]            # slicing

So it would not be obvious that a..b introduces a loop. I assume that 
'a..b @ i {}' means this in my own syntax:

   for i in a..b do end

Which one do you think is clearer? Further, it is possible to do

   for i in x do end

where 'x' might be a range defined elsewhere, or some collection. Now 
that '..' cue is missing since you'd have to write 'x @ i {}'. But in 
your next example ...


> //i also konsidered
> 
> a..b {tab[%1]=k}

the @i is also missing so you basically have:

   x {}

Wasn't this the syntax for your composite struct/function definition?

> 
> //%1 being replcement for i - but i has good tradition in c
> // but maybe it could be also present as an alternative solution
> 
> so right now from those considerations the ground im standing
> as to loops would be that
> 
> 1..29𝐭{tab[𝐭]=9}
> 
> 1..29 ^ t  {tab[t]=9}
> 
> 1..29 {tab[%1]=9}
> 
> // maybe 1..29 ^ {tab[%1]=9}
> //maybe ^ t =1..29  {tab[%1]=9}
> // alternatively {tab[%1]=9} ^ t= 1..76

In practice you don't have many fixed ranges like this; the upper limit 
is usually tied to the bounds of 'tab', so how would that look? Maybe:

    for &x in tab {x = 9}

where the '&x' means that x is a writeable reference to the element. 
(C++ might have this.)

> //well in combination with power this assigment dont look bad here
> 
> maybe this also?
> ^ t=1..29 {tab[t]=9}
> allows
> 
> ^ t = {2,7,9,7,2,4,5} {f(t)}
> 
> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);

This is still just a form of:

    for x in tab {}

For example:

    for x in (2,7,9,7,2,4,5) {f(x)}

But this is more high-level. Just look at some other languages; it's all 
been done!

Re: p = {1,0,0}
#1426
Author: fir
Date: Tue, 10 Nov 2026 14:32
36 lines
2973 bytes
bartc pisze:
> On 10/11/2026 12:51, fir wrote:
>> bartc pisze:
>>>
>>>    for i=1,100 {tab[i]=0}
>>>
>>>
>>
>> this on i dont like better woud be imo
>>
>>   for i = 1 to 100 {tab[i]=0}
>>
>> but still it feels too much basic
> 
> I'd considered using 1..100 and 1 to 100 but your aim seemed to be 
> conciseness. "1,100" is used in Lua.

ye i know, ebverybody would consider it i guess

but that showed not the point it showed power idea beats the "what loop 
turn is" (at least in my mind)..but it also showed that this "t=2..23"
in fact stays (but combined with power)


so imo

for i=1..100 {tab[i]=0}

this is wrong becouse its classical basic seeing of the loop

but

  {tab[i]=0} ^ i=1..100

kinda wins the bank here (imo) (though still i could say im not sure if 
this "=" here is not a bit problematic (maybe not but maybe}
Re: p = {1,0,0}
#1427
Author: fir
Date: Tue, 10 Nov 2026 14:44
38 lines
3014 bytes
bartc pisze:
> 
> the @i is also missing so you basically have:
> 
>    x {}
> 
> Wasn't this the syntax for your composite struct/function definition?

well if x is range than not

in some cases you strictly need this for sign but in more narrow you dont

its interesting if some would do

int i = 100;

i {tab[i]=0}

eventually also could go,a d its minimalistic
(and i considered thse mininal forms long ago but
if they are like "600 800 tab[%2][%1]=9 " they cant use this
classic i j k - unles as above, which i here consider first time
after a context of "pow")

but its maybe too exaggeration

like

a {b++}

normally is a definition of module a that calls code b++,
it it showed above a is an int then definition would turn into loop 
execution

hovever knowing the context of ^ as pow now even that can be considered

but such code i may be afraid becomes too heavy
Re: p = {1,0,0}
#1428
Author: fir
Date: Tue, 10 Nov 2026 14:51
148 lines
5759 bytes
bartc pisze:
> On 10/11/2026 12:51, fir wrote:
>> bartc pisze:
>>>
>>>    for i=1,100 {tab[i]=0}
>>>
>>>
>>
>> this on i dont like better woud be imo
>>
>>   for i = 1 to 100 {tab[i]=0}
>>
>> but still it feels too much basic
> 
> I'd considered using 1..100 and 1 to 100 but your aim seemed to be 
> conciseness. "1,100" is used in Lua.
> 
> 
>> there are quite few subtle things here what given form gives what 
>> feelings
>>
>> note in c that has no loop there is like no "natural" form of loop
>> (unles maybe just raw goto etc) at least i dont see it
>>
>> this one wth power may be koncidered as somewhat natural
>>
>> {  } ^ t
> 
> I once used this:
> 
>    (n || s)
> 
> for repeat-N-times. I decided that was too quaint.
> 
> (If a loop were to return a value, as happens in some languages, then 
> such a compact form can be desirable to use within expressions.)
> 
>>   a..b @ i {}
>>
>> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
>> choices can be deferred)
> Have you considered what the construct 'x .. y', if it was part of the 
> syntax, could have lots of different uses. For example:
> 
>     if x in a..b       # test a within a range
>     A[i..j]            # slicing
> 
> So it would not be obvious that a..b introduces a loop. I assume that 
> 'a..b @ i {}' means this in my own syntax:
> 
>    for i in a..b do end
> 
> Which one do you think is clearer? Further, it is possible to do
> 
>    for i in x do end
> 
> where 'x' might be a range defined elsewhere, or some collection. Now 
> that '..' cue is missing since you'd have to write 'x @ i {}'. But in 
> your next example ...
> 
> 
>> //i also konsidered
>>
>> a..b {tab[%1]=k}
> 
> the @i is also missing so you basically have:
> 
>    x {}
> 
> Wasn't this the syntax for your composite struct/function definition?
> 
>>
>> //%1 being replcement for i - but i has good tradition in c
>> // but maybe it could be also present as an alternative solution
>>
>> so right now from those considerations the ground im standing
>> as to loops would be that
>>
>> 1..29𝐭{tab[𝐭]=9}
>>
>> 1..29 ^ t  {tab[t]=9}
>>
>> 1..29 {tab[%1]=9}
>>
>> // maybe 1..29 ^ {tab[%1]=9}
>> //maybe ^ t =1..29  {tab[%1]=9}
>> // alternatively {tab[%1]=9} ^ t= 1..76
> 
> In practice you don't have many fixed ranges like this; the upper limit 
> is usually tied to the bounds of 'tab', so how would that look? Maybe:
> 
>     for &x in tab {x = 9}
> 
> where the '&x' means that x is a writeable reference to the element. 
> (C++ might have this.)
> 
>> //well in combination with power this assigment dont look bad here
>>
>> maybe this also?
>> ^ t=1..29 {tab[t]=9}
>> allows
>>
>> ^ t = {2,7,9,7,2,4,5} {f(t)}
>>
>> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
> 
> This is still just a form of:
> 
>     for x in tab {}
> 
> For example:
> 
>     for x in (2,7,9,7,2,4,5) {f(x)}
> 
> But this is more high-level. Just look at some other languages; it's all 
> been done!
> 
> 

its obviously not becouse you dont put those for in loops in places

tab[^{1,3,7,9}] = 'corner';

did they do

tab[for x in {1,3,7,9}] = 'corner';

thet would looks weird..there are abstract differencies in some cyntax 
idea which are not the same as shallow syntax comparisons

in fact it shows shortcut may be eventually used also


tab[1,3,7,9] = 'corner';

but thats static case


t[] = {1,7,9,3}

tab[t] = 'corner'

could also be used

so in fact indeed some ^ seem not mandatory


Re: p = {1,0,0}
#1430
Author: fir
Date: Tue, 10 Nov 2026 15:10
214 lines
7816 bytes
fir pisze:
> bartc pisze:
>> On 10/11/2026 12:51, fir wrote:
>>> bartc pisze:
>>>>
>>>>    for i=1,100 {tab[i]=0}
>>>>
>>>>
>>>
>>> this on i dont like better woud be imo
>>>
>>>   for i = 1 to 100 {tab[i]=0}
>>>
>>> but still it feels too much basic
>>
>> I'd considered using 1..100 and 1 to 100 but your aim seemed to be 
>> conciseness. "1,100" is used in Lua.
>>
>>
>>> there are quite few subtle things here what given form gives what 
>>> feelings
>>>
>>> note in c that has no loop there is like no "natural" form of loop
>>> (unles maybe just raw goto etc) at least i dont see it
>>>
>>> this one wth power may be koncidered as somewhat natural
>>>
>>> {  } ^ t
>>
>> I once used this:
>>
>>    (n || s)
>>
>> for repeat-N-times. I decided that was too quaint.
>>
>> (If a loop were to return a value, as happens in some languages, then 
>> such a compact form can be desirable to use within expressions.)
>>
>>>   a..b @ i {}
>>>
>>> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
>>> choices can be deferred)
>> Have you considered what the construct 'x .. y', if it was part of the 
>> syntax, could have lots of different uses. For example:
>>
>>     if x in a..b       # test a within a range
>>     A[i..j]            # slicing
>>
>> So it would not be obvious that a..b introduces a loop. I assume that 
>> 'a..b @ i {}' means this in my own syntax:
>>
>>    for i in a..b do end
>>
>> Which one do you think is clearer? Further, it is possible to do
>>
>>    for i in x do end
>>
>> where 'x' might be a range defined elsewhere, or some collection. Now 
>> that '..' cue is missing since you'd have to write 'x @ i {}'. But in 
>> your next example ...
>>
>>
>>> //i also konsidered
>>>
>>> a..b {tab[%1]=k}
>>
>> the @i is also missing so you basically have:
>>
>>    x {}
>>
>> Wasn't this the syntax for your composite struct/function definition?
>>
>>>
>>> //%1 being replcement for i - but i has good tradition in c
>>> // but maybe it could be also present as an alternative solution
>>>
>>> so right now from those considerations the ground im standing
>>> as to loops would be that
>>>
>>> 1..29𝐭{tab[𝐭]=9}
>>>
>>> 1..29 ^ t  {tab[t]=9}
>>>
>>> 1..29 {tab[%1]=9}
>>>
>>> // maybe 1..29 ^ {tab[%1]=9}
>>> //maybe ^ t =1..29  {tab[%1]=9}
>>> // alternatively {tab[%1]=9} ^ t= 1..76
>>
>> In practice you don't have many fixed ranges like this; the upper 
>> limit is usually tied to the bounds of 'tab', so how would that look? 
>> Maybe:
>>
>>     for &x in tab {x = 9}
>>
>> where the '&x' means that x is a writeable reference to the element. 
>> (C++ might have this.)
>>
>>> //well in combination with power this assigment dont look bad here
>>>
>>> maybe this also?
>>> ^ t=1..29 {tab[t]=9}
>>> allows
>>>
>>> ^ t = {2,7,9,7,2,4,5} {f(t)}
>>>
>>> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
>>
>> This is still just a form of:
>>
>>     for x in tab {}
>>
>> For example:
>>
>>     for x in (2,7,9,7,2,4,5) {f(x)}
>>
>> But this is more high-level. Just look at some other languages; it's 
>> all been done!
>>
>>
> 
> its obviously not becouse you dont put those for in loops in places
> 
> tab[^{1,3,7,9}] = 'corner';
> 
> did they do
> 
> tab[for x in {1,3,7,9}] = 'corner';
> 
> thet would looks weird..there are abstract differencies in some cyntax 
> idea which are not the same as shallow syntax comparisons
> 
> in fact it shows shortcut may be eventually used also
> 
> 
> tab[1,3,7,9] = 'corner';
> 
> but thats static case
> 
> 
> t[] = {1,7,9,3}
> 
> tab[t] = 'corner'
> 
> could also be used
> 
> so in fact indeed some ^ seem not mandatory
> 
> 
note becouse this is important to realize:

is some has some deeper "behind a syntax" observations
then aspects of those abservations may open som enew pathes in code 
thinking tha just shallowly comparing syntaxes (and not realizing the
"behind" side dfferences which are kinda invisible (untill youre very 
good in all that, bein able to catch and compare this invisible "behind" 
side ideas)

you may say X looks like other X (ehere X is piece of some syntax) - it 
looks very close or it even may just look the same

if thhere are other ideas on "behind" sides of one X and other X
they are not he same - especially if one X with its behind ideas opens 
some new syntax gates/corridors/pathes for things


right now after those combinations/considerations it seems:


to get a loop in c you must

"multiply or power" given block of code with "range or list"

(as i said its rather power but is kinda abstract power so i some way 
one could also say its abstract operation of multiply, and in common 
language if some has

"block" X "range"
"block" X "list"

some can say imo multiply some can say "power to" depending what is more 
convenient (i the context of those sentence multiply fits, normally imo 
power more fits, but both somewhat fits)


so

tab[2..88] this is a loop (as tab is multipied by range or powered by range)

tab[t] -if t is array - is also a loop (of size of length of t)

tab[2,36,7,3,2,4,5] - is aloso a loop (t turns)

tab[i] would be loop if i is scope/range, if i is sole value its not a loop

so ine can evenylually say that if i is value say 100 some can use ^ to 
turn it into scope/range

int i = 0..100;
tab[i]=0; //loop (101 turns)

int i=100;
tab[i] = 0;// not loop

tab[^i] ; //loop (100 turns)

all that abstract powering ideas lead to that






Re: p = {1,0,0}
#1431
Author: fir
Date: Tue, 10 Nov 2026 15:24
261 lines
8987 bytes
fir pisze:
> fir pisze:
>> bartc pisze:
>>> On 10/11/2026 12:51, fir wrote:
>>>> bartc pisze:
>>>>>
>>>>>    for i=1,100 {tab[i]=0}
>>>>>
>>>>>
>>>>
>>>> this on i dont like better woud be imo
>>>>
>>>>   for i = 1 to 100 {tab[i]=0}
>>>>
>>>> but still it feels too much basic
>>>
>>> I'd considered using 1..100 and 1 to 100 but your aim seemed to be 
>>> conciseness. "1,100" is used in Lua.
>>>
>>>
>>>> there are quite few subtle things here what given form gives what 
>>>> feelings
>>>>
>>>> note in c that has no loop there is like no "natural" form of loop
>>>> (unles maybe just raw goto etc) at least i dont see it
>>>>
>>>> this one wth power may be koncidered as somewhat natural
>>>>
>>>> {  } ^ t
>>>
>>> I once used this:
>>>
>>>    (n || s)
>>>
>>> for repeat-N-times. I decided that was too quaint.
>>>
>>> (If a loop were to return a value, as happens in some languages, then 
>>> such a compact form can be desirable to use within expressions.)
>>>
>>>>   a..b @ i {}
>>>>
>>>> (i slightly prefer here a..b ^ i {} right now but the exact symbol 
>>>> choices can be deferred)
>>> Have you considered what the construct 'x .. y', if it was part of 
>>> the syntax, could have lots of different uses. For example:
>>>
>>>     if x in a..b       # test a within a range
>>>     A[i..j]            # slicing
>>>
>>> So it would not be obvious that a..b introduces a loop. I assume that 
>>> 'a..b @ i {}' means this in my own syntax:
>>>
>>>    for i in a..b do end
>>>
>>> Which one do you think is clearer? Further, it is possible to do
>>>
>>>    for i in x do end
>>>
>>> where 'x' might be a range defined elsewhere, or some collection. Now 
>>> that '..' cue is missing since you'd have to write 'x @ i {}'. But in 
>>> your next example ...
>>>
>>>
>>>> //i also konsidered
>>>>
>>>> a..b {tab[%1]=k}
>>>
>>> the @i is also missing so you basically have:
>>>
>>>    x {}
>>>
>>> Wasn't this the syntax for your composite struct/function definition?
>>>
>>>>
>>>> //%1 being replcement for i - but i has good tradition in c
>>>> // but maybe it could be also present as an alternative solution
>>>>
>>>> so right now from those considerations the ground im standing
>>>> as to loops would be that
>>>>
>>>> 1..29𝐭{tab[𝐭]=9}
>>>>
>>>> 1..29 ^ t  {tab[t]=9}
>>>>
>>>> 1..29 {tab[%1]=9}
>>>>
>>>> // maybe 1..29 ^ {tab[%1]=9}
>>>> //maybe ^ t =1..29  {tab[%1]=9}
>>>> // alternatively {tab[%1]=9} ^ t= 1..76
>>>
>>> In practice you don't have many fixed ranges like this; the upper 
>>> limit is usually tied to the bounds of 'tab', so how would that look? 
>>> Maybe:
>>>
>>>     for &x in tab {x = 9}
>>>
>>> where the '&x' means that x is a writeable reference to the element. 
>>> (C++ might have this.)
>>>
>>>> //well in combination with power this assigment dont look bad here
>>>>
>>>> maybe this also?
>>>> ^ t=1..29 {tab[t]=9}
>>>> allows
>>>>
>>>> ^ t = {2,7,9,7,2,4,5} {f(t)}
>>>>
>>>> //allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
>>>
>>> This is still just a form of:
>>>
>>>     for x in tab {}
>>>
>>> For example:
>>>
>>>     for x in (2,7,9,7,2,4,5) {f(x)}
>>>
>>> But this is more high-level. Just look at some other languages; it's 
>>> all been done!
>>>
>>>
>>
>> its obviously not becouse you dont put those for in loops in places
>>
>> tab[^{1,3,7,9}] = 'corner';
>>
>> did they do
>>
>> tab[for x in {1,3,7,9}] = 'corner';
>>
>> thet would looks weird..there are abstract differencies in some cyntax 
>> idea which are not the same as shallow syntax comparisons
>>
>> in fact it shows shortcut may be eventually used also
>>
>>
>> tab[1,3,7,9] = 'corner';
>>
>> but thats static case
>>
>>
>> t[] = {1,7,9,3}
>>
>> tab[t] = 'corner'
>>
>> could also be used
>>
>> so in fact indeed some ^ seem not mandatory
>>
>>
> note becouse this is important to realize:
> 
> is some has some deeper "behind a syntax" observations
> then aspects of those abservations may open som enew pathes in code 
> thinking tha just shallowly comparing syntaxes (and not realizing the
> "behind" side dfferences which are kinda invisible (untill youre very 
> good in all that, bein able to catch and compare this invisible "behind" 
> side ideas)
> 
> you may say X looks like other X (ehere X is piece of some syntax) - it 
> looks very close or it even may just look the same
> 
> if thhere are other ideas on "behind" sides of one X and other X
> they are not he same - especially if one X with its behind ideas opens 
> some new syntax gates/corridors/pathes for things
> 
> 
> right now after those combinations/considerations it seems:
> 
> 
> to get a loop in c you must
> 
> "multiply or power" given block of code with "range or list"
> 
> (as i said its rather power but is kinda abstract power so i some way 
> one could also say its abstract operation of multiply, and in common 
> language if some has
> 
> "block" X "range"
> "block" X "list"
> 
> some can say imo multiply some can say "power to" depending what is more 
> convenient (i the context of those sentence multiply fits, normally imo 
> power more fits, but both somewhat fits)
> 
> 
> so
> 
> tab[2..88] this is a loop (as tab is multipied by range or powered by 
> range)
> 
> tab[t] -if t is array - is also a loop (of size of length of t)
> 
> tab[2,36,7,3,2,4,5] - is aloso a loop (t turns)
> 
> tab[i] would be loop if i is scope/range, if i is sole value its not a loop
> 
> so ine can evenylually say that if i is value say 100 some can use ^ to 
> turn it into scope/range
> 
> int i = 0..100;
> tab[i]=0; //loop (101 turns)
> 
> int i=100;
> tab[i] = 0;// not loop
> 
> tab[^i] ; //loop (100 turns)
> 
> all that abstract powering ideas lead to that
> 
> 
so it by incident maybe lead also to this conlusion


int A = 10;

A {printf("*");} //not a loop.. dont know what it is but not a loop


int t={2,4,5};

t {printf("%d", t);} //eventually a loop (no ^ needed though it may be 
handy imo)

though this above is not needed if

printf("%d", t); //may be a loop if t is list

if so there is also a need to mke difference where printf takes a 
"spacial" ram list and when it takes "temporal" cascade

printf("%d", ^t);

this can be used for temporal cascade but strictly it may not always be
needed..other form of distinguish here may play


so in fuct such

any expresion containing t - if t is this temporal cascade (scope or 
list ) may be a loop

char* a = "ssdd";
char* b= "SDDSDSD"

a=b;

may be a loop
only need to say a or b is temporal cascade (more on this later)











Re: p = {1,0,0}
#1432
Author: fir
Date: Tue, 10 Nov 2026 15:38
47 lines
3597 bytes
yet to sey its cklearrer (as i know my "chain of reasoning" may be hard 
to folow)..some pieces i can explain with no context so its easy to gat

say

int a[] = {2,4,5,6,5,33,223,445,5};

it is "spatial" array (i mean sequence of ints in ram?


or it is "temporal cascade"

it MAY be both so it probbaly has not much sence to denote this

spatial int a[] = {2,4,5,6,5,33,223,445,5};
temporal int a[] = {2,4,5,6,5,33,223,445,5};


becouse compilar anyway cant probably hold this temporal list other way 
than in ram (sometimes it may eventually discard it but im not sure if 
noting it as a temporal is veru sefull)


so

int a[] = {2,4,5,6,5,33,223,445,5};

is both "spacial ram array" and "temporal cascde"

the using it as spacial array would just pass a pointer to it
like passing to foo(a) where foo waits for int*

passing it to tab[a] = something just calls a temporal cascade
of calls (which is loop)

the question is where with context you may know its spatial and when you
know when its temporat and if some contextes it can be both make some 
syntax to point put shich one it may be

scopes/ranges ike 5..10 also may be used for temporal cascases
(though they also may be used for spacial arrays)

IN fact it shows (this chain of reasoning shows) in C you may realize 
for loops just by throwing temporal cascades in code (various ways)


Re: p = {1,0,0}
#1434
Author: fir
Date: Tue, 10 Nov 2026 15:54
105 lines
4807 bytes
fir pisze:
> yet to sey its cklearrer (as i know my "chain of reasoning" may be hard 
> to folow)..some pieces i can explain with no context so its easy to gat
> 
> say
> 
> int a[] = {2,4,5,6,5,33,223,445,5};
> 
> it is "spatial" array (i mean sequence of ints in ram?
> 
> 
> or it is "temporal cascade"
> 
> it MAY be both so it probbaly has not much sence to denote this
> 
> spatial int a[] = {2,4,5,6,5,33,223,445,5};
> temporal int a[] = {2,4,5,6,5,33,223,445,5};
> 
> 
> becouse compilar anyway cant probably hold this temporal list other way 
> than in ram (sometimes it may eventually discard it but im not sure if 
> noting it as a temporal is veru sefull)
> 
> 
> so
> 
> int a[] = {2,4,5,6,5,33,223,445,5};
> 
> is both "spacial ram array" and "temporal cascde"
> 
> the using it as spacial array would just pass a pointer to it
> like passing to foo(a) where foo waits for int*
> 
> passing it to tab[a] = something just calls a temporal cascade
> of calls (which is loop)
> 
> the question is where with context you may know its spatial and when you
> know when its temporat and if some contextes it can be both make some 
> syntax to point put shich one it may be
> 
> scopes/ranges ike 5..10 also may be used for temporal cascases
> (though they also may be used for spacial arrays)
> 
> IN fact it shows (this chain of reasoning shows) in C you may realize 
> for loops just by throwing temporal cascades in code (various ways)
> 
> 
co the question how to realize strcopy by the use of temporal cascades idea


char tab[200];
char tabb[150];

if one of this is temporal cascade it would be unwind as loop of calls 
in time

tab[0..100] = tabb[0..100];

would be loop


tab[0..199] = tabb[0..199];

alos would be loop but it reads after the legal ram


if(!tab[0..149]=tabb[0..149])  break;

thet could break the loop but assuming what the loop spans
and im not sure if its obvious

maybe it should be


{ if(!tab[0..149]=tabb[0..149])  break; }

or

{ int i = 0..149;
  if(!tab[i]=tabb[i])  break; }


it all seem long becouse it just seem you can just throw tab or tabb as 
a temporal cascades just stright

   {^tab=^tabb?:break} //break on 0

  depending how to note "throw array as an temporal cascade"

maybe simple name of tab without [] could be a throwing as temporal 
cascade so in that case

   {tab=tabb?:break}     would be temporal strcopy by self

(i said temporal strcopy coz there is alos imaginable spacial strcopy 
but pc's today have onl temporal afair)








Re: p = {1,0,0}
#1435
Author: fir
Date: Tue, 10 Nov 2026 16:09
55 lines
3317 bytes
fir pisze:
> 
>    {^tab=^tabb?:break} //break on 0


there is hovever a question

t[0..20]=s[0..10];


what now? t wants to be unwind 21 times where s wants to be
  unwind only 11

in such case seem natural to unwind 11 and break whole loop

and here would be good so

^s=^t

or t=s or t[]=s[] work right away but im not sure if its general case

{if(!t[]=s[]) break; } //that would be copy until 0-termination


also good notice ranges may be named more meaningful names than sole 
elements
which is good


int row = 0..799;
int rows= 0..599;

tab[rows][row] = 0;

hovever in this case its wrong becouse columns and row are or 
"parrallel" sync cascades by those different rank ones

so something must be added i not yet know what exactly


tab[^rows][row] = 0;

added ^ here but here its not exactly that becouse before like
^100 was a sign for promotion value to range, now row and rows are 
ranges so something other is needed just to denote "unsynctd" second 
temporal cascade (but as i dont know what it should be and im tired i 
not put it yet)







Re: p = {1,0,0}
#1436
Author: fir
Date: Tue, 10 Nov 2026 16:16
65 lines
3808 bytes
fir pisze:
> fir pisze:
>>
>>    {^tab=^tabb?:break} //break on 0
> 
> 
> there is hovever a question
> 
> t[0..20]=s[0..10];
> 
> 
> what now? t wants to be unwind 21 times where s wants to be
>   unwind only 11
> 
> in such case seem natural to unwind 11 and break whole loop
> 
> and here would be good so
> 
> ^s=^t
> 
> or t=s or t[]=s[] work right away but im not sure if its general case
> 
> {if(!t[]=s[]) break; } //that would be copy until 0-termination
> 
> 
> also good notice ranges may be named more meaningful names than sole 
> elements
> which is good
> 
> 
> int row = 0..799;
> int rows= 0..599;
> 
> tab[rows][row] = 0;
> 
> hovever in this case its wrong becouse columns and row are or 
> "parrallel" sync cascades by those different rank ones
> 
> so something must be added i not yet know what exactly
> 
> 
> tab[^rows][row] = 0;
> 
> added ^ here but here its not exactly that becouse before like
> ^100 was a sign for promotion value to range, now row and rows are 
> ranges so something other is needed just to denote "unsynctd" second 
> temporal cascade (but as i dont know what it should be and im tired i 
> not put it yet)
> 
> 
> if some not worries of adding more syntax than probably needed could go with


  int row = 0..799;
  int rows= 0..599;

  tab[^^rows][^row] = 0;

where ^row is to read "for row" and ^^rows is to read "second rank for 
for rows" then its at least very clear (almost like seing this 
traditional for headers)

how to fire or leash thoce temoral cascades need a bit of practice

Re: p = {1,0,0}
#1437
Author: fir
Date: Tue, 10 Nov 2026 16:20
70 lines
4019 bytes
fir pisze:
> fir pisze:
>> fir pisze:
>>>
>>>    {^tab=^tabb?:break} //break on 0
>>
>>
>> there is hovever a question
>>
>> t[0..20]=s[0..10];
>>
>>
>> what now? t wants to be unwind 21 times where s wants to be
>>   unwind only 11
>>
>> in such case seem natural to unwind 11 and break whole loop
>>
>> and here would be good so
>>
>> ^s=^t
>>
>> or t=s or t[]=s[] work right away but im not sure if its general case
>>
>> {if(!t[]=s[]) break; } //that would be copy until 0-termination
>>
>>
>> also good notice ranges may be named more meaningful names than sole 
>> elements
>> which is good
>>
>>
>> int row = 0..799;
>> int rows= 0..599;
>>
>> tab[rows][row] = 0;
>>
>> hovever in this case its wrong becouse columns and row are or 
>> "parrallel" sync cascades by those different rank ones
>>
>> so something must be added i not yet know what exactly
>>
>>
>> tab[^rows][row] = 0;
>>
>> added ^ here but here its not exactly that becouse before like
>> ^100 was a sign for promotion value to range, now row and rows are 
>> ranges so something other is needed just to denote "unsynctd" second 
>> temporal cascade (but as i dont know what it should be and im tired i 
>> not put it yet)
>>
>>
>> if some not worries of adding more syntax than probably needed could 
>> go with
> 
> 
>   int row = 0..799;
>   int rows= 0..599;
> 
>   tab[^^rows][^row] = 0;
> 
> where ^row is to read "for row" and ^^rows is to read "second rank for 
> for rows" then its at least very clear (almost like seing this 
> traditional for headers)
> 
> how to fire or leash thoce temoral cascades need a bit of practice
> 
> 

sorry for a bit of chaotic chain of observations.. i need to rest,
sme conclusions are taken so it will be more clear next time
Re: p = {1,0,0}
#1439
Author: Tim Rentsch
Date: Tue, 10 Nov 2026 16:57
8 lines
2149 bytes
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> If I thought C would benefit significantly from a Pascal-style for
> loop (I don't), I'd want it added as a language feature, [...]

Your statement is clear about what you want.  Do you have any
reasons to offer why anyone else should want it, or is it merely
a statement of personal opinion?
while() and do/while()
#1441
Author: Tim Rentsch
Date: Tue, 10 Nov 2026 19:47
7 lines
2030 bytes
bartc <bc@freeuk.com> writes:

> Anyway, how does C get away with having 'while' both starting a
> loop statement, and ending one?!)

What is it that you think C is getting away with by having both 
while() and do/while() loop forms?
Re: while() and do/while()
#1445
Author: bartc
Date: Tue, 10 Nov 2026 20:33
44 lines
3387 bytes
On 10/11/2026 19:47, Tim Rentsch wrote:
> bartc <bc@freeuk.com> writes:
> 
>> Anyway, how does C get away with having 'while' both starting a
>> loop statement, and ending one?!)
> 
> What is it that you think C is getting away with by having both
> while() and do/while() loop forms?


Mine was a light-hearted remark. Still, it /does/ get away with using 
the same keyword for two different purposes.

So you, or a compiler, encounters 'while': is that starting a new 
while-loop, or terminating a do-while loop? A fragment like this:

  ...
  while (*s++ = *t++);

could be either unless you know what '...' is.

You need to delve into the grammar to see how it works:

    do stmt while();         // 'while' terminates 'do'

    do while() ...           // 'while' is a while-loop inside do-while

    ... while()              // independent while-loop provided this is
                             // not that first case

So the 'while' on the first line will get consumed when parsing 'do stmt 
while' before it can be interpreted as a stand-alone statement.

The cost is needing to always have exactly 1 statement for the body of 
do-while. 2 or more need a compound statement, and 0 statements is not 
allowed.

(I can't have repeat-while in my own projects because it would be 
ambiguous. But there I can have 0, 1 or more statements within the body, 
and any can legally be nested while-statements.

I have to use repeat-until which has the opposite logic.)

Re: while() and do/while()
#2002
Author: Tim Rentsch
Date: Mon, 30 Nov 2026 06:54
20 lines
2435 bytes
bartc <bc@freeuk.com> writes:

> On 10/11/2026 19:47, Tim Rentsch wrote:
>
>> bartc <bc@freeuk.com> writes:
>>
>>> Anyway, how does C get away with having 'while' both starting a
>>> loop statement, and ending one?!)
>>
>> What is it that you think C is getting away with by having both
>> while() and do/while() loop forms?
>
> Mine was a light-hearted remark.  Still, it /does/ get away with
> using the same keyword for two different purposes.
>
> So you, or a compiler, encounters 'while': is that starting a new
> while-loop, or terminating a do-while loop?  [...]

Easily handled with standard parsing techniques.  And not even
very fancy ones.
Page 2 of 2 • 91 total messages
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads