Author Topic: The Imperium programming language - IPL  (Read 86970 times)

0 Members and 9 Guests are viewing this topic.

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: The Imperium programming language - IPL
« Reply #1025 on: January 25, 2023, 10:56:15 pm »
All those questions are trivial to answer and are not important at all. All of them can be changed once you have anything working at all. This the color of the bike shed discussion all over again.

Also, 2-byte strings for Unicode is a bad idea. Either use plain UTF-8 or UTF-32. There is no point in using 16-bit encodings, you  will instantly be running into the limitation of that when you want to use emojis.
Alex
 
The following users thanked this post: newbrain, MK14, JPortici, Nominal Animal, DiTBho

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1026 on: January 25, 2023, 11:05:05 pm »
I'm leaving this thread due to excessive trolling and spamming, should anyone want to contribute suggestions or questions about this work please do so using Github issues/discussions which I'll respond to regularly.

Promises.
 
The following users thanked this post: Siwastaja, MK14, JPortici, Nominal Animal, DiTBho

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1027 on: January 25, 2023, 11:06:53 pm »
Are you truly of the opinion that these questions cannot be discussed here and now?

All those questions can indeed be discussed. The discussions and answers are as interesting and important as which type of car should be in my driveway.

I can use any car, provided I know what the icons on the controls mean. Beyond that the differences are boring and irrelevant. But then my attitude is that there are only a few types of cars: sports, estates, people carriers, vans and lorries. I suppose I ought to update that with ICE, BEV, hybrids. In any case, there is  common factor: too many wheels and engines, too few wings.

Hint: the interesting discussion is about what a language/vehicle is most suited to accomplish, and how.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: MK14

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1028 on: January 25, 2023, 11:10:28 pm »
I'm leaving this thread due to excessive trolling and spamming, should anyone want to contribute suggestions or questions about this work please do so using Github issues/discussions which I'll respond to regularly.

Promises.

Car crash TV or border police TV programmes are addictive, aren't they :)

Was it you or someone else that was trying to find a way to ignore his thread ;)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: MK14, DiTBho

Offline Sherlock HolmesTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 570
  • Country: us
Re: The Imperium programming language - IPL
« Reply #1029 on: January 25, 2023, 11:21:57 pm »
All those questions are trivial to answer and are not important at all. All of them can be changed once you have anything working at all. This the color of the bike shed discussion all over again.

In which case so is the question of concurrency semantics then yes? trivial! just use the LLVM model which is even better than C11's model, there, done, move on - how's that sound?

Whether a decision be "trivial" or not is a matter of opinion and besides, the matter must be decided along with many others, in order to begin writing test source files.

A seemingly small syntax change can often break a grammar, it can introduce unexpected, undiagnosed inconsistencies, grammars are self referential you know.

Also, 2-byte strings for Unicode is a bad idea. Either use plain UTF-8 or UTF-32. There is no point in using 16-bit encodings, you  will instantly be running into the limitation of that when you want to use emojis.

You might be right about the Unicode. C# used 2 bytes initially and they still do but are now also using a "Rune" data type.

But note that UTF-8 etc are not how strings are stored in memory at runtime. UTF-8 is an encoding, a way of storing a Unicode string in a byte array or file. Some UTF-8 characters are two or three bytes long, but that is not how they are stored in memory in string variables.

So this could mean we want single byte strings (akin to C strings) as well as 2-byte and possibly 4 byte too. So do we have three string type names now "text" string" and "unicode" (say)?

Or might this suggest we consider a different way of describing these types?

Code: [Select]
dcl user_name string (32,1); // 2nd arg optional and must be 1,2 or 4
dcl user_name string (32,2);
dcl user_name string (32,4);

The matter is important because as you well know strings and aggregates of strings can eat memory for breakfast, so having that control is important in a resource constrained setting.

The 1-byte string is absolutely essential I think, many applications will not need anything beyond ASCII so let them keep memory use down. Some might need Unicode but not more than the most common 2-byte support, and then for those that want the whole shebang they can use 4-byte, but also if the language supports all three they can use a mix, a long table of error messages could be in an ascii, 1byte string whereas other stuff could be in Unicode.

These and other questions are things I really want to put to bed, I am keen to get into other phases like analyzing the ASY and so on, but any code doing that might need rework if the grammar is changed so I just want to get as much of it dine and dusted as I reasonably can.

Finally I want to tell you that you often speak of "get it coded" well the grammar IS CODE it is written in a language itself, I am and have been coding for two months!


« Last Edit: January 25, 2023, 11:25:51 pm by Sherlock Holmes »
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.” ~ Arthur Conan Doyle, The Case-Book of Sherlock Holmes
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1030 on: January 25, 2023, 11:24:45 pm »
I don't think anybody here has ever designed a grammar

Good lord, the arrogance. How the heck would you know?

I've designed everything from new machine code instructions (which have, incidentally, an internal grammar of the construction of their encoding, not to mention their assembly language form), to file and protocol formats, to yes extensions to programming languages. I haven't yet been arrogant enough to think I'm going to design a from-scratch programming language grammar that others will find preferable to something based on something they are already familiar with.

One thing I learned very long ago is that while a machine can readily parse LR(n) grammars it is very unwise to expect a human reader (especially one different to the writer) to do so, and it's best to stick to LL(1) grammars as much as possible.
 
The following users thanked this post: newbrain, MK14, JPortici, Nominal Animal, DiTBho

Offline gf

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: de
Re: The Imperium programming language - IPL
« Reply #1031 on: January 25, 2023, 11:26:33 pm »
Also, 2-byte strings for Unicode is a bad idea. Either use plain UTF-8 or UTF-32. There is no point in using 16-bit encodings, you  will instantly be running into the limitation of that when you want to use emojis.

Agreed, rather no point for UTF-16, except for interfacing with Windows API functions. Unfortunately, wchar_t is 16-bit on Windows.
 
The following users thanked this post: MK14, DiTBho

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1032 on: January 25, 2023, 11:29:25 pm »
I'm leaving this thread due to excessive trolling and spamming, should anyone want to contribute suggestions or questions about this work please do so using Github issues/discussions which I'll respond to regularly.

Promises.

Car crash TV or border police TV programmes are addictive, aren't they :)

Was it you or someone else that was trying to find a way to ignore his thread ;)

It was and I did.

However once the mechanism was discovered I am also using it to ignore uninteresting topics on my "Show unread posts since last visit" and the ignored topics list turns out to be limited to 100 topics. That limit had now been reached, after five days, and this topic rolled off the end of the list.

Most of the new topics naturally go quiescent within five days, and if I have to re-add this topic to the ignore list once every five days that is at least a considerable improvement.
 
The following users thanked this post: MK14, DiTBho

Offline gf

  • Super Contributor
  • ***
  • Posts: 1353
  • Country: de
Re: The Imperium programming language - IPL
« Reply #1033 on: January 25, 2023, 11:35:56 pm »
UTF-8 is an encoding, a way of storing a Unicode string in a byte array or file. Some UTF-8 characters are two or three bytes long, but that is not how they are stored in memory in string variables.

And the same applies to UTF-16. It still cannot represent every Unicode codepoint with a single 16-bit word, but some codepoints still require a sequence. Only UTF-32 has one 32-bit word per codepoint in the string.
 
The following users thanked this post: MK14, Sherlock Holmes

Offline Sherlock HolmesTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 570
  • Country: us
Re: The Imperium programming language - IPL
« Reply #1034 on: January 25, 2023, 11:36:48 pm »
I don't think anybody here has ever designed a grammar

Good lord, the arrogance. How the heck would you know?

The remarks about grammar being almost superficial to this undertaking is what led me to express that view, sure it sound arrogant but so does this, one of your earliest posts.

Quote
Sadly, it is becoming more and more apparent that you don't know the first thing about either CPU instruction sets or programming languages, and you won't listen to those who do, so I'm out of this conversation.

If only you'd kept that promise.

I've designed everything from new machine code instructions (which have, incidentally, an internal grammar of the construction of their encoding, not to mention their assembly language form), to file and protocol formats, to yes extensions to programming languages. I haven't yet been arrogant enough to think I'm going to design a from-scratch programming language grammar that others will find preferable to something based on something they are already familiar with.

Bruce, I no longer care, you showed your true colors early on, you're not useful in this discussion, please execute your HOULT instruction and give me some peace.

You regard this "to think I'm going to design a from-scratch programming language grammar that others will find preferable to something based on something they are already familiar with." as being "arrogant" so there we have it, you disapprove of the entire idea and did from the beginning. Designing a new programming language is an act of arrogance? wow, I read you like a book didn't I.

One thing I learned very long ago is that while a machine can readily parse LR(n) grammars it is very unwise to expect a human reader (especially one different to the writer) to do so, and it's best to stick to LL(1) grammars as much as possible.

Good lord, the arrogance (do you really think C and C++ are LL(1) the most revered languages in this thread ?? !!)
« Last Edit: January 25, 2023, 11:52:48 pm by Sherlock Holmes »
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.” ~ Arthur Conan Doyle, The Case-Book of Sherlock Holmes
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1035 on: January 25, 2023, 11:44:38 pm »
I'm leaving this thread due to excessive trolling and spamming, should anyone want to contribute suggestions or questions about this work please do so using Github issues/discussions which I'll respond to regularly.

Promises.

Car crash TV or border police TV programmes are addictive, aren't they :)

Was it you or someone else that was trying to find a way to ignore his thread ;)

It was and I did.

However once the mechanism was discovered I am also using it to ignore uninteresting topics on my "Show unread posts since last visit" and the ignored topics list turns out to be limited to 100 topics. That limit had now been reached, after five days, and this topic rolled off the end of the list.

Most of the new topics naturally go quiescent within five days, and if I have to re-add this topic to the ignore list once every five days that is at least a considerable improvement.

ISTR the 100 is a magic number required because the ignoring is expensive within the forum's database.

Fortunately I'm a speedreader, so the length of the unread posts list is something I can tolerate without mechanical assistance.

I'm not entirely sure why I'm still on his thread. Maybe I'm channelling St Jude, the patron saint of lost causes.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1036 on: January 25, 2023, 11:48:13 pm »
I don't think anybody here has ever designed a grammar

Good lord, the arrogance. How the heck would you know?

I've been the subject of the OP's arrogance, ignorance and willy waving too. I didn't let I go unchallenged and the OP has avoided challenging my response.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: MK14

Offline Sherlock HolmesTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 570
  • Country: us
Re: The Imperium programming language - IPL
« Reply #1037 on: January 25, 2023, 11:53:35 pm »
I don't think anybody here has ever designed a grammar

Good lord, the arrogance. How the heck would you know?

I've been the subject of the OP's arrogance, ignorance and willy waving too. I didn't let I go unchallenged and the OP has avoided challenging my response.

FYI - You've never said anything challenging.
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.” ~ Arthur Conan Doyle, The Case-Book of Sherlock Holmes
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1038 on: January 25, 2023, 11:57:12 pm »
One thing I learned very long ago is that while a machine can readily parse LR(n) grammars it is very unwise to expect a human reader (especially one different to the writer) to do so, and it's best to stick to LL(1) grammars as much as possible.

Good lord, the arrogance (did you really think C and C++ are LL(1) the most revered language in this thread ?? !!)

They are of course not, and to their detriment. Parts of their grammars are simply awful, especially declaration syntax, confusion between declarations and function-style casts, ambiguity of a sequence of +'s, and of course good old dangling else. C and C++ are prime examples of what I am advising against, but which survive and which other languages are based on because of people's preference for the seemingly familiar.

If you must use them (as almost all of us must) then at least stick as much as possible to the LL(1) parts of them by, for example, always using { }, typedefing things to simplify declarations etc.

The Wirthian languages are much better designed, especially after Pascal.
 
The following users thanked this post: MK14, cfbsoftware, DiTBho

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1039 on: January 26, 2023, 12:11:02 am »
ISTR the 100 is a magic number required because the ignoring is expensive within the forum's database.

That's not something I'd ask the database to do. I'd fetch the ignore list and put it in an in-memory hash table, then check each fetched or about-to-be-displayed topic against the hash table.

Quote
Fortunately I'm a speedreader, so the length of the unread posts list is something I can tolerate without mechanical assistance.

No matter how quickly you can read and ignore, it's going to be 10,000 times slower than PHP / Python / Perl / Ruby / Javascript doing the same.
 
The following users thanked this post: MK14, DiTBho

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1040 on: January 26, 2023, 12:27:21 am »
ISTR the 100 is a magic number required because the ignoring is expensive within the forum's database.

That's not something I'd ask the database to do. I'd fetch the ignore list and put it in an in-memory hash table, then check each fetched or about-to-be-displayed topic against the hash table.

Quote
Fortunately I'm a speedreader, so the length of the unread posts list is something I can tolerate without mechanical assistance.

No matter how quickly you can read and ignore, it's going to be 10,000 times slower than PHP / Python / Perl / Ruby / Javascript doing the same.

All agreed.

One advantage of not pruning the unread posts list is my favourite concept: serendipity. I also like the way the word rolls off the tongue. Maybe I'll get to visit the country too, Serendib.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: MK14, DiTBho

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1041 on: January 26, 2023, 12:53:03 am »
One advantage of not pruning the unread posts list is my favourite concept: serendipity. I also like the way the word rolls off the tongue. Maybe I'll get to visit the country too, Serendib.

I see every topic once when it is created.

I have more serendipity now because as a result of being able to mark topics to ignore I've now been able to stop ignoring entire forum sections (e.g. things such as "Metrology")
 
The following users thanked this post: DiTBho

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1042 on: January 26, 2023, 01:26:57 am »
Designing a new programming language is an act of arrogance? wow

I'm starting to wonder if it's a severe cognitive impairment in understanding what people are actually saying. Seems to read but also seems unable to understand properly  :-//

Some of it could be due to the topics being subtle and involved, thus not suitable for speedreading nor for quick posts on a forum. But other parts don't fit that.

I'm sure psychologists have several names for the observed behaviour; none of it is unique and we've all seen similar things before.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: MK14

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1043 on: January 26, 2023, 06:30:46 am »
Designing a new programming language is an act of arrogance? wow

I'm starting to wonder if it's a severe cognitive impairment in understanding what people are actually saying. Seems to read but also seems unable to understand properly  :-//

Some of it could be due to the topics being subtle and involved, thus not suitable for speedreading nor for quick posts on a forum. But other parts don't fit that.

I'm sure psychologists have several names for the observed behaviour; none of it is unique and we've all seen similar things before.

A short (probably incomplete) list of people who have aroused the ire of OP, leading to them being variously insulted, told they had nothing to contribute and to go away, are being ignored etc:

ataradov, Siwastaja, brucehoult, tggzzz, Nominal Animal, Mechatrommer, MIS42N, DiTBho, DC1MC, MK14

Looks like a roll of honour to me.

The list of contributors to this thread who are not in the above list would I think be shorter. Some of them have flown under the radar a little while "thank"ing posts critical of OP by people in the above list. And one or two seem to have escaped by virtue of, I suspect, comments that went "whoosh!". One comment implicitly comparing posts on this thread to ChatGPT output springs to mind, Mr SW :-)

I'm having similar issues on reddit at the moment with someone who was using a pseudonym (and account created specifically to pick a fight with me, it seems), and who turns out to be the leader of a well known and respected academic programming group. He's around 65 (not much older than me), but based on his apparent comprehension problems and his position, blog posts, and other information I strongly suspect he has done little or no technical work for many many years and is wholly occupied as a manager, fund/grant raiser (he's very proud of this area), and in general navigating public sector bureaucracies (I won't say which ones).
 
The following users thanked this post: MK14

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1044 on: January 26, 2023, 09:21:14 am »
...
The list of contributors to this thread who are not in the above list would I think be shorter. Some of them have flown under the radar a little while "thank"ing posts critical of OP by people in the above list. And one or two seem to have escaped by virtue of, I suspect, comments that went "whoosh!". One comment implicitly comparing posts on this thread to ChatGPT output springs to mind, Mr SW :-)

Yes about comments going "whoosh".

The "thanks" mechanism is terminally broken and should be ignored. Just think of how it is (ab)used by treez/ocset/faringdon :)

Quote
I'm having similar issues on reddit at the moment with someone who was using a pseudonym (and account created specifically to pick a fight with me, it seems), and who turns out to be the leader of a well known and respected academic programming group. He's around 65 (not much older than me), but based on his apparent comprehension problems and his position, blog posts, and other information I strongly suspect he has done little or no technical work for many many years and is wholly occupied as a manager, fund/grant raiser (he's very proud of this area), and in general navigating public sector bureaucracies (I won't say which ones).

There's nothing inherently wrong with "going back" to technical subjects after retirement; I'm doing it myself.

Not having humility about the extent of one's own competence is irritating at any stage of life. Even the very competent fall into the trap. There's a classic syndrome where, to employ all the  clichés, a consultant doctor starts flying and then buys a high performance aircraft (especially a glider), and after not too long crashes it. I'm sure there are other equivalent examples in different fields.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 520
  • Country: au
Re: The Imperium programming language - IPL
« Reply #1045 on: January 26, 2023, 09:47:29 am »
I don't think anybody here has ever designed a grammar yet the prattlers here glibly dismiss its significance.
On a lighter note, I did design a variant of FORTRAN and called it CASHTRAN, a play on my surname. It was quickly pointed out this was an anagram of TRASHCAN. And there it remained.
 
The following users thanked this post: MK14, DiTBho, karpouzi9

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: The Imperium programming language - IPL
« Reply #1046 on: January 26, 2023, 10:12:33 am »
There's a classic syndrome where, to employ all the  clichés, a consultant doctor starts flying and then buys a high performance aircraft (especially a glider), and after not too long crashes it.

A Bonanza is more traditional. Especially the V tailed ones (which were all there were when this cliche started).

If a glider then probably a Stemme, amirite? Or at least an 18m Ventus cM.

Very sad too when active 747 drivers die executing a botched circuit off a winch cable break.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20769
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: The Imperium programming language - IPL
« Reply #1047 on: January 26, 2023, 11:27:48 am »
There's a classic syndrome where, to employ all the  clichés, a consultant doctor starts flying and then buys a high performance aircraft (especially a glider), and after not too long crashes it.

A Bonanza is more traditional. Especially the V tailed ones (which were all there were when this cliche started).

If a glider then probably a Stemme, amirite? Or at least an 18m Ventus cM.

Very sad too when active 747 drivers die executing a botched circuit off a winch cable break.

Yes, indeed. The accident report uses interesting phrases. He had previously splashed down in the sea. His videos will be missed.

Then again, the top glider pilots have a surprisingly high mortality rate, because they habitually fly close to the edge of the envelope.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Sherlock HolmesTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 570
  • Country: us
Re: The Imperium programming language - IPL
« Reply #1048 on: January 26, 2023, 02:56:55 pm »
All those questions are trivial to answer and are not important at all. All of them can be changed once you have anything working at all. This the color of the bike shed discussion all over again.

Also, 2-byte strings for Unicode is a bad idea. Either use plain UTF-8 or UTF-32. There is no point in using 16-bit encodings, you  will instantly be running into the limitation of that when you want to use emojis.

I was wrong in my earlier reply, it turns out .Net does use UTF-16 for its strings, this was a compromise the team made twenty years ago in order to avoid having 4-byte chars.

They could have simply restricted their strings to be 16 bit Unicode values only (known as BMP) but they chose instead to adopt UTF-16. This does complicate how strings are worked with, like counting chars in a .Net string entails checking for 1 or 2 Char pairs etc.

Anyway this now suggest that the new language could support all three variants with a simple new attribute.

Code: [Select]
dcl user_name string(32) ansi;  // 1 byte chars, akin to a C char[]
dcl user_name string(32) bmp; // 2 byte chars any Unicode char in the range 0000–FFFF
dcl user_name string(32) ucs;  // 4 byte chars any unicode char whatsoever in the range 000000-10FFFF

These all have fixed length characters of 1, 2 and 4 bytes respectively, easy and fast to index through them to get at character 'I', compute lengths and so on.

But there might be scenarios where one wants to use UTF as the storage method for a string, so this at first sight suggest additional attributes of UTF-8 and UTF-16 in which case space is conserved but some characters might be 2 or 3 or 4 bytes and certain operations cost more as a result.

That would create three additional attributes in a string declaration utf-8, utf-16 and utf-32. But utf-32 is no different to UCS - fixed length chars and the entire range supported, so that makes 5 attributes.

Perhaps the default could then simply be UTF-16 line many languages and the user can specify another if they want that.

This gives a good coverage of string support with speed at one end and compactness at the other, this might even be a better way to express this:

Code: [Select]
dcl user_name string(32) raw(8); // fixed length chars of 1 byte.
dcl user_name string(32) utf(16); // encoded variable length chars of 1 or 2 bytes.

Giving five values:
Code: [Select]
raw(8), utf(8), raw(16), utf(16), utf(32) (being identical also raw(32) but we'd not bother to include that attribute).

So raw strings have every character represented by the same size unit, easy to index, iterate the strings and utf strings are encoded less wasted space but more costly to iterate and search. Simply assigning one to another would implicitly convert the string format too.
« Last Edit: January 26, 2023, 03:47:33 pm by Sherlock Holmes »
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.” ~ Arthur Conan Doyle, The Case-Book of Sherlock Holmes
 

Offline Sherlock HolmesTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 570
  • Country: us
Re: The Imperium programming language - IPL
« Reply #1049 on: January 26, 2023, 03:47:15 pm »
I don't think anybody here has ever designed a grammar

Good lord, the arrogance. How the heck would you know?

I've been the subject of the OP's arrogance, ignorance and willy waving too. I didn't let I go unchallenged and the OP has avoided challenging my response.

I think some hard facts are in order here.

I started this thread hoping that it would be an informal, friendly sharing of ideas, experienced engineering minded people who had ideas and enthusiasm for the concept of a new programming language that could deliver things that C is poor or weak at, a language that could be designed from the outset with MCU related needs in mind too.

Because a programming language and compiler are not for the beginner, because they are rather large projects, broad in scope and depth, I explained that I was no novice and had in fact designed and built a functioning compiler for a large language and I'd written that compiler in C, I pointed readers at Github where that codebase is available to anyone to look at.

From the outset, from the very first response to my opening post, there was discouragement, disdain and contempt at the mere suggestion of doing this.

After me making just two posts (this and this) this was what people were posting:

Quote
But in that case don't make polls, start doing it.

and

Quote
Right now this has a vibe of "making your own high performance oscilloscope" threads from 10 years ago. Those went for pages and pages with people daydreaming about it and not actually doing anything.

Note how discussing ideas, soliciting opinions, gathering potential requirements and considering features is regarded by him as "not actually doing anything"! The thread, the attempt to discuss IS DOING SOMETHING.

That frankly, set the tone for the thread, put downs, insults, dismissal and character assassination, I was made to feel unwelcome after making just two posts; go and read those posts and reflect on what I say. Some people here really seem to try and make themselves feel good by attacking others, by attacking someone you remove them and their ideas as a threat, it's called "bullying" and "mobbing" and there are several here, read:

Quote from: Wikipeadia
Mobbing, as a sociological term, means bullying of an individual by a group, in any context, such as a family, peer group, school, workplace, neighborhood, community, or online. When it occurs as physical and emotional abuse in the workplace, such as "ganging up" by co-workers, subordinates or superiors, to force someone out of the workplace through rumor, innuendo, intimidation, humiliation, discrediting, and isolation, it is also referred to as malicious, nonsexual, non-racial/racial, general harassment.

If I've insulted anyone, if I've posted bluntly sometimes then recognize it is a reaction to the rudeness and insults that started less than ONE HOUR after I started the thread.

If you think I'm wasting my time, if you think I'm an idiot, if you think there's no prospect of this ever going anywhere then fine, you have that right, but all I ask is you leave the thread, don't post insults and inflammatory comments and whine and complain, just go away, leave me in peace to discuss a subject I'm passionate about with the few people here who have been polite and considerate and helpful - please.
« Last Edit: January 26, 2023, 04:20:14 pm by Sherlock Holmes »
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.” ~ Arthur Conan Doyle, The Case-Book of Sherlock Holmes
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf