Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

i take propositions for a set of x = b <operator> d operators

113 views
Skip to first unread message

fir

unread,
May 3, 2022, 10:54:58 AM5/3/22
to
as i maybe said i think i will not use those chars |&%^ (and maybe soem alike )
as an operators for logical or and rest and xor becouse i think in practice
they are not so commonly used to allow them to block this characters for
other better use... i mean thay may be used but this usage is usually
if noit almost always covered in a shape of some function that you
later use so in source in fact you dont need to see tham a lot (at least i
think so)

instead i will ad operators like

x = a <or> b
x = a <and> b

or maybe this should be even longer name as this is logical bitwise or not common or
such form looks quite (if not very) good imo and allows me also to define
a whoel famili of them like say 40 for most common usage

the question is what i should include
(note it will probably be mostly if not only 2 argument ones in a form as above a<operator> b, becouse one argument ones in such form imo could look confusing.. in fact ic c maybe a good form for one argument one is like a traditional cast opeator x = (int) y ..so maybe one argument i also could add but in round parenthesis , though i not thinked on this yet at all and not sure it it wouldnt bring a confusion of other type)

Mark Bluemel

unread,
May 3, 2022, 11:01:59 AM5/3/22
to
On Tuesday, 3 May 2022 at 15:54:58 UTC+1, fir wrote:

If you're not implementing C (and you are clearly not, as you are not following the language specification), why are you posting here?

Jack Lemmon

unread,
May 3, 2022, 11:09:21 AM5/3/22
to
On 03/05/2022 16:01, Mark Bluemel wrote:
> On Tuesday, 3 May 2022 at 15:54:58 UTC+1, fir wrote:
>
> If you're not implementing C (and you are clearly not, as you are not following the language specification), why are you posting here?

Because he's a troll. From time to time we get all sorts here and you
just have to get used to them. Today I am seeing an Indian posting
websites that he found where he can find women for sex. He's not posting
any C codes here.



fir

unread,
May 3, 2022, 11:14:23 AM5/3/22
to
wtorek, 3 maja 2022 o 17:01:59 UTC+2 Mark Bluemel napisał(a):
> On Tuesday, 3 May 2022 at 15:54:58 UTC+1, fir wrote:
>
> If you're not implementing C (and you are clearly not, as you are not following the language specification), why are you posting here?

im implementing c extensions - some of it is general, some it is specific and possibly not c, but there is some part deeply rooted with c and says on c)
besides i dont said i not implement c- i rather implement not only c but also c... for the moment implementing c seems just more harder than implementing some pieces of proto-c and its extensions

fir

unread,
May 3, 2022, 11:21:55 AM5/3/22
to
this is btw stupid thinking for people see ma i compile for example foo x y z 10 instead foo(x,y,z,10);
as a big difference ..and teh second is talking on c and first its not ...this is on c but in a dose genaralised form...same with this topic on operators..its quite interesting problem on c, to think what you would like to get if you would have such option in language..and what i do is extremmy rooted in c

nota also all this smallbrains who call me troll and they post a weak crap on c or nothing when i produce a doses of good content here (too good to be discussed often, but its not my fault, its kinda lack of users)

fir

unread,
May 3, 2022, 11:25:12 AM5/3/22
to
wtorek, 3 maja 2022 o 17:21:55 UTC+2 fir napisał(a):
besides dont worry lat years i read/write here once a half a year or once a year and maybe less and
i will wanish soon again
i thought i get weary sooner but soon i will get weary and to this taime i need yet to upcode something, maybe such operators...

Jack Lemmon

unread,
May 3, 2022, 11:29:11 AM5/3/22
to
On 03/05/2022 16:21, fir wrote:
> this is btw stupid thinking for people see ma i compile for example foo x y z 10 instead foo(x,y,z,10);


Stupid or not but you should really be posting on " comp.compilers "
where this belongs. Here, on this newsgroup, people wants to see
standard C code which you are not using.




fir

unread,
May 3, 2022, 11:38:04 AM5/3/22
to
it depends...for me for example those over and over standard mangling is boring as hell..
i find it as a kinda content for standard talkers not c programmers and imo it could be group for
people who real program in c
and here my topics i found good, the problem is ratio..if i write a lot in short time (and i write a lot coz i got some thoughts) the ratio locally in time rises to 95% talking on what i wrote and this i agree is too much

but the problem is in this that other kind of topic is too much not quite what i write is to much..
increase you writing on other shades of c work or standards and ratio will improve

i dont plan for now too post less, as i dont want to loose time and material, if i got some material i post it..but as i said i will wanish soon when im get more tired - yet i will need to get back to other kind of work
but maybe will yet code few days, im not quite sure

fir

unread,
May 3, 2022, 11:59:42 AM5/3/22
to
wtorek, 3 maja 2022 o 17:38:04 UTC+2 fir napisał(a):
> wtorek, 3 maja 2022 o 17:29:11 UTC+2 Jack Lemmon napisał(a):
> > On 03/05/2022 16:21, fir wrote:
> > > this is btw stupid thinking for people see ma i compile for example foo x y z 10 instead foo(x,y,z,10);
> > Stupid or not but you should really be posting on " comp.compilers "
> > where this belongs. Here, on this newsgroup, people wants to see
> > standard C code which you are not using.
> it depends...for me for example those over and over standard mangling is boring as hell..
> i find it as a kinda content for standard talkers not c programmers and imo it could be group for
> people who real program in c
> and here my topics i found good, the problem is ratio..if i write a lot in short time (and i write a lot coz i got some thoughts) the ratio locally in time rises to 95% talking on what i wrote and this i agree is too much
>
> but the problem is in this that other kind of topic is too much not quite what i write is to much..

i meant the problem is that the other topics it to less and this afects ratio

also note what i write is sorta specialistic (though not fully) but it may be find in archive
and someone may use it later (right now i will not make furia open source but if i do
and someone would want to know its history and ideas may find notes on this here)

finally its not so uncommon when people write on what they write and for example i seen
such post and whan i see some i may say to myself "yah...boring" and go to my ways

this topic in fact i started to be more for regular c users as i find in fact the question
should be interesting generally

Kenny McCormack

unread,
May 3, 2022, 2:46:56 PM5/3/22
to
In article <a6350431-f41f-43c8...@googlegroups.com>,
For the same reason(s) that people often discuss (and post code in) various
other languages here, such as Python, C++, Perl, C#, and others.

Because they can't help themselves.

--
"There's no chance that the iPhone is going to get any significant market share. No chance." - Steve Ballmer

fir

unread,
May 3, 2022, 3:28:55 PM5/3/22
to
wtorek, 3 maja 2022 o 20:46:56 UTC+2 Kenny McCormack napisał(a):
> In article <a6350431-f41f-43c8...@googlegroups.com>,
> Mark Bluemel <mark.b...@gmail.com> wrote:
> >On Tuesday, 3 May 2022 at 15:54:58 UTC+1, fir wrote:
> >
> >If you're not implementing C (and you are clearly not, as you are not
> >following the language specification), why are you posting here?
> For the same reason(s) that people often discuss (and post code in) various
> other languages here, such as Python, C++, Perl, C#, and others.
>
> Because they can't help themselves.
>
i dont write code in pascal etc, i write c0like compiler code in c, and share soem thought on this..
some may moan and roar but i would like sse some better c content from them and i see
none...

Siri Cruise

unread,
May 3, 2022, 11:50:29 PM5/3/22
to
In article
<ad3f8cb3-e76c-452a...@googlegroups.com>,
fir <profes...@gmail.com> wrote:

> as i maybe said i think i will not use those chars |&%^ (and maybe soem alike
> )

I prefer basing it on a function call. We have implementations
with multiply-add operators that look like C functions and
translated directly into multiply-add instructions. Since their
semantics differ slightly from C * and +, it's visual reminder of
the difference.

--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
Discordia: not just a religion but also a parody. This post / \
I am an Andrea Doria sockpuppet. insults Islam. Mohammed

fir

unread,
May 4, 2022, 4:14:11 AM5/4/22
to
środa, 4 maja 2022 o 05:50:29 UTC+2 Siri Cruise napisał(a):
> In article
> <ad3f8cb3-e76c-452a...@googlegroups.com>,
> fir <profes...@gmail.com> wrote:
>
> > as i maybe said i think i will not use those chars |&%^ (and maybe soem alike
> > )
> I prefer basing it on a function call. We have implementations
> with multiply-add operators that look like C functions and
> translated directly into multiply-add instructions. Since their
> semantics differ slightly from C * and +, it's visual reminder of
> the difference.
>
what do you mean based on a function call?
if i use word inside <> it is sorta like function call but not quite, becouse it is differently
resolved (like has its ovn priority level)

x = a <min> b <min> c

i typed most of code for it yesterday (based on code i typoed before) and seems i only need
to type those operators in now (the name and emitted assembly)

my 'reducer' of expresions is slightly errorous hovever as it resolves like always in different
priority i mean 2*2*3/2*3 i may set to resolve * first or / first when c resolves in equal priority but i will mend it later
(i also got it for ints only)

the question is hovever what operators are good to have in a language..
im not limited so i may add unlimited amounts of them..hovever as i said
i think they should be probably all in 2 argument form a <op> b , i could
technically ad alo 1 argument ones prefixed and postfixed but
not sure if they wouldnt look confuzing.. i would then add them in round
parenthesis b = (neg) a though if so they then would partially 'block' a dose
of identifier names from use, so this is for later thinking

fir

unread,
May 4, 2022, 4:26:39 AM5/4/22
to
hovever this last may be somewhat resolved becouse operator is strict <neg> or (neg)
without spaces.. if i put one (neg) i may see this as a avariable name in parenthesis

hovever this still may be confusing if someone would like use a lot of parenthesis
then adding new oparators could break the code

fir

unread,
May 4, 2022, 4:35:48 AM5/4/22
to
środa, 4 maja 2022 o 10:14:11 UTC+2 fir napisał(a):
> środa, 4 maja 2022 o 05:50:29 UTC+2 Siri Cruise napisał(a):
> > In article
> > <ad3f8cb3-e76c-452a...@googlegroups.com>,
> > fir <profes...@gmail.com> wrote:
> >
> > > as i maybe said i think i will not use those chars |&%^ (and maybe soem alike
> > > )
> > I prefer basing it on a function call. We have implementations
> > with multiply-add operators that look like C functions and
> > translated directly into multiply-add instructions. Since their
> > semantics differ slightly from C * and +, it's visual reminder of
> > the difference.
> >
> what do you mean based on a function call?

if you mean strictly |&%^ i agree (as i said) i would also prefer x = xor(6,b); y= and(x, 0xf0) and so on

this unlocks precious punctuation marks, if to unlock them seems like all on teh uperline of keyboard on left side are free (except # for preprocessor, well & maybe is not free as its operator of giving adress) and also | is free

fir

unread,
May 4, 2022, 8:07:22 AM5/4/22
to
środa, 4 maja 2022 o 10:35:48 UTC+2 fir napisał(a):
overally ading this operatos is fairly easy
for example emiting xor

void Emit_xor(chunk right_operand)
{
if( unsigned(right_operand.beg) < max_temp_registers)
FlushOutAsm("\n xor eax (__t%d) ", unsigned(right_operand.beg) );
else {
if(CCI(right_operand)) FlushOutAsmChunkPE("\n xor eax ", right_operand, " " );
else {
int imp = FindImportInImportsTable(right_operand);
if(imp<0) FlushOutAsm("\n xor eax (%.*s) ", ChunkLength(right_operand), right_operand.beg );
else FlushOutAsm_MovImportVariableToEbx(imp),
FlushOutAsm("\n xor eax ebx "); }}
FlushOutAsm("\nmov (__t%d) eax ", temp_register);
}

it emits

//l.94 cc = 0x010103 <xor> 0x020202

mov eax 0x010103
xor eax 0x020202
mov (__t1) eax
mov eax (__t1)
mov (cc) eax

its unoptimised as i should not emit this __t1 lines but i will mend it later, adding floats and doubles to above i hope will not be so scary, though still i dont understand floats and partially understand doubles

i think at start i probably should add all operatos that are suporter by x86 assembly ant then see what i can build up as handy yet

may name this small project as floio(fir's library of inline operators)

the question is hovever what i sad: what to get there

fir

unread,
May 4, 2022, 10:34:30 AM5/4/22
to
środa, 4 maja 2022 o 14:07:22 UTC+2 fir napisał(a):
added some shifts that maps on x86 shifts commands
c1 = 0x011111<shl>1
c2 = 0x011111<shr>2
c3 = 0x011111<sal>3
c4 = 0x011111<sar>1
c5 = 0x011111<rcl>3
c6 = 0x011111<rcr>1
c7 = 0x011111<rol>1
c8 = 0x011111<ror>1
in machune code that map on
0xc1 0xcX (where X is 0 to f)
0xc1 0xdX
0xc1 0xeX
0xc1 0xfX
i use defuse.ca to check codes though im not sure if i dont found some error there
for example put c1 e0 11 and c1 f0 11 in hex window both give shl, eax 0x11 and if so
from thgis above i hot a hole coz none of them maps to 0xc1 0xf0-0xf8 tgough all other
from 0xc1 0xc0 - 0xff are filled

it goes rol (0xc0) ror (0xc8) rcl (0xd0) rcr (0xd8) shl (0xe0) shr (0xe8) sal (defuse ca gives 0xe0 ) sar (0xf8)

fir

unread,
May 4, 2022, 10:39:20 AM5/4/22
to
it also resembles me this great song of Busta

Niggaz quick to talk shit.. OOPS! Upside your head
Put your head to bed -- let me do my thing -- nuff said
Shit so hot make your chickenhead do the spread
Tell me what you said -- I said I never leave you misled
While you bullshit, I'd rather get the FURIA instead
Hah-huh-hah-hee-hah!

fir

unread,
May 4, 2022, 11:41:52 AM5/4/22
to

i think i could write <min> <max> <mid> <dist>
but the problem is i need to emit assembly for that
doeas maybe someone know what assembly would be effective for <min> or <dist> ?

x <dist> y would make abs(x-y) its not shorter but maybe is more informative (maybe i should name it <dis> potentiallyoften used operatoirs shorter

x<mid>y in turn worx like (x+y)/2 , same situation

fir

unread,
May 4, 2022, 2:27:11 PM5/4/22
to
well this overally work, the implementation of this library needs specific thinking so i may
do it later , but some i checked work - so i may go to something other

overally it is quite nice to code own compiler gives you nice freedom you can add what you want,
sometimes im feel sory i played lol half a year consecutive maybe more (same with adom but adom is at least better game) instead of coding it where i could be half a year further (hovever maybe its not clearly that simple)

fir

unread,
May 6, 2022, 5:36:15 PM5/6/22
to
btw i looked on this compiler group slightly and it seems they do that other way than I, use someones other theory than me, (i use my own theory if coulpe of thoughys may be named that ).. i dont looked there to much but as the frst glance i do not belong to them..so its probably not worth to post there
0 new messages