So now I am getting sidetracked again, from TGE to making a language that is ā€˜orthogonal’ but which requires no ā€˜two-level grammar’ yadda yadda yadda nor a report Wirth, Dijkstra, and Hoare could not read and about which Hoare would end up writing a paper roughly entitled ā€˜Algol 68 Sucks’.

Indeed, my notion is to not write any formal grammar at all, and to use only A PRATT PARSER.

Which, admittedly, is a thing that did not exist yet for Algol 68, but that hardly matters.

Incidentally, Wirth developed a language called ā€˜Algol 68 Sucks’ (actually it is called Pascal) and the United Stated Department of Defense funded development of another language called ā€˜Algol 68 Sucks’ (actually it is called Ada).

Neither of these languages sucks.

Pascal as originally developed is a whole program only language, mind you. Not a separate compiler. You must understand that to understand the language. Everything is nested within ā€˜program’.

@chemoelectric I don't have the quote handy but Wirth's opinion of committees for language design sure seems valid :)

@troi He did like for everything to be understood by one individual.

A GNU/Linux system could be understood by one individual but that person would go insane.

Eric Raymond probably is not that person but was already insane, anyway.

@troi Ada is small enough you could understand it, if you were versed in the semantic details of it. But these do exist and I have no grasp of them. I simply assume they are thought out. Wirth might not have been able to fathom them, either.

I believe Hoare said of early Ada it was MOSTLY okay.

I have real problems with Wirth’s later languages. The Modula 2 libraries are a mess except for the ISO one. And CARDINAL is no name for ordinal numbers!

Oberon is definitely better. None of the ^ crap

@troi But there is no good Oberon compiler for GNU/Linux systems. There are compilers, but they are awful.

@troi I’m in the middle of incorporating Boehm GC as part of hiha, as a replacement malloc/calloc/realloc. You can’t just use the system Boehm GC for that, it has to be compiled special, I think. So I have committed the Boehm GC 8.2.12 sources to my local hiha repo already.

I’m just tired of dealing with free without having ATS2 to tell me when to call the free.

A viable alternative would be to start again in ATS2 and use linear types to tell me when to call free. This is less code.

@troi Being an old hand at writing Icon code, I am used to using characters themselves as the tokens for a parser. This is fine for recursive descent parsing, which is the usual method in Icon coding, but not so good for Pratt parsing. I could not think of a really good way to do that in Pratt parsing without at least pushing back tokens and backtracking and other unholy stuff.

So I thought, what about just do passes? And I thought, how about you just do it until it reaches a fixed point?

@troi In other words, until the output is the same as the input. There are no more changes in token stream.

Now you can feed it to the parser proper that generates a parse tree.

@troi A Pratt parser does two things: it reads a token and treats it as a prefix operator or a literal, or it reads a token and treats it as a postfix or infix operator of some given numeric precedence. This should be adequate for a lexical scanner, if you do not demand too much of it and let it work in multiple passes.
@troi The language is ā€œorthogonalā€ because the whole dang thing will do whatever the fƘKK you want and yet it will be made from almost nothing but this fricking Pratt parser.

@troi Yes, Wirth could understand his entire OS, including the compiler.

I could probably put something of the sort together, were I not disabled. OTOH then I would be employed and so not have the time or thoughtfulness. I would be a fricking idiot like most people are. Thank goodness I am a basket case.

@troi But of course I am also not a CS professor. :)

I am just a generalist hobbyist with an electrical engineering education. I had things come in a parcel today. They were small pieces of hardwood. Half of it was sappy black walnut. Half of it was pieces of light colored woods, perhaps some of it maple. I like maple, but I am not sure what they all are. Maybe some are birch, say.

My shoulder is getting better, so I have ordered small pieces of wood. I even have a strip of purpleheart or two.

@troi BTW I burnt my bridges when I got my EE education. The people in the department had had enough of the guy with bad OCD.

@troi To this day I have no idea how PAM works. I have not even bothered to try to understand how PAM works, mind you.

I understand that PAM can do something useful. I also understand that PAM does nothing useful that cannot be done without PAM.

When I was still working at CrossWorks Inc. (formerly Pioneer Blah Blah Blah) over 20 years ago, we had a Red Hat type trying to tell me how to set up my interface to something or another. He simply could not comprehend that my Slackware had no init.d.

@troi I kept saying, ā€˜You are telling me nonsense. Would you just let me write the necessary shell code?’ Because it was Slackware. It had BSD structure. It could be understood very simply. To get to multiuser mode, there was one script. Just one script. Not bunch of scripts with different priority levels, like an init.d. Just one script, in rc.d. And it had to be edited.

I finally just went ahead and edited the script, and also the script for going to shutdown and the one for going to reboot.

@troi It’s a clumsy system, actually, but at least it could be understood.

I prefer OpenRC, the Gentoo system that is used by a few other distros. An increasing number, as distros jettison systemd because it sucks. But OpenRC is a simple init.d whereas systemd is a complicated variant.

@troi Of course the latest Slackwares might have systemd. I don’t tell Patrick Volkerding what to do. He lives clear across Minnesota from me, and the state is enormous! :) (I’m from New Jersey, after all, and even New Jersey seemed big to me, given I was from the narrow part of it. That old man’s neck. 20 miles to New Hope, Pa., by Route 518, 20 miles to Staten Island if you could fly.)