mame / quine-relay

An uroboros program with 100+ programming languages
13.88k stars 552 forks source link

Language request Q. Was: Q# (quantum programming language) or other representing letter Q, e.g. Arabic Qualb (قلب) #113

Open PallHaraldsson opened 3 years ago

PallHaraldsson commented 3 years ago

Hi, don't get me wrong, the Quine is already awesome, and I like the language count 128. I just noticed Q is the only Latin letter not represented.

A. The few I (you too?) know of are all problematic:

https://en.wikipedia.org/wiki/List_of_programming_languages#Q

Not surprisingly, three of the eight there are for quantum programming, and I'm just not sure how input/output works, even in a simulator. Any of those would be most awesome, but I assume you would get non-deterministic output...?

Qualb (Arabic, or any other left-to-right language) would also be cool, and may help that's it's on github having: "minimal Scheme-like parenthesized syntax".

https://www.theregister.com/2013/01/25/arabic_programming_language

The language is called قلب – roughly pronounced "alb," after the Arabic word for "heart" [..] "قلب, as far as I know, is the first programming language that is a conceptual art piece," Nasser said [..] What makes قلب unique, however, is that it allows Nasser to write programs that are not only functional, but also visually pleasing. By varying the lengths of the lines that connect the Arabic letters that make up the language's commands, Nasser can reshape the appearance of his code without altering its function, producing programs that are both practical and artistic.

".QL is an object-oriented variant of a logical query language called Datalog." We can probably leave .QL out for same reason as Datalog, non-Turing complete (unlike SQL, in later standards).

That leaves QtScript (seemingly not a cool language, only JavaScript with exceptions), Q and QuakeC, would be cool to have, but I'm not sure about its I/O.

You do not have APL, Q would represent such as language (but is proprietary), while you do have A+ already and I believe it does too.

B. Do you have a favorite language(s), e.g. here most difficult to implement? I like that you have e.g. Piet and Subleq. It seems almost any type of language is represented.

mame commented 3 years ago

I just noticed Q is the only Latin letter not represented.

Yeah, it is a shame. However, I couldn't find any applicable "Q*" language that meets this criteria.

In short, I'm picking only official packages of the latest Ubuntu and famous esoteric languages. In addition, as you noticed, the language implementation must be able to work on CUI and to print to stdout an arbitrary long string without banner or prompt. When I investigated one of quantum programming language (I can't remember but may be QPL), I found it theoretically applicable, but a prompt was hard-coded so I couldn't disable it. Qalb is very interesting, but I believe it is not an esoteric language, and looks like there is only an implementation that works on browser, not on CUI. I'm unsure about QtScript, but does it work without GUI?

PallHaraldsson commented 3 years ago

I found another candidate (with "POSIX: I/O"):

http://q-lang.sourceforge.net/

Q - Equational Programming Language Q is no longer supported, see Pure instead [..] Q is an interpreted, dynamically typed functional programming language based on term rewriting which allows you to define functions using symbolic equations.

It's reasonably interesting, and esoteric? Not too famous, neither is its successor Pure, while I at least knew of it, and it has some publicity. I didn't look carefully to see if they are compatible, then you would write "Q (Pure)", killing two birds with one stone. I was also thinking with Perl 6 renamed to Raku you should rename to "Perl 6 (Raku)", since you can't just rename/more to Raku... Also "Octave (MATLAB)".

The distribution includes a fairly comprehensive (280+ pages) language manual

The language(s) does not look that intimidating, while the term, well concept, term-rewriting, scared me a bit at the time, thinking Pure more unusual than it actually is. It seems you could avoid that part, to claim the name Q/Pure only, while using its unusual features would also be a bonus. See also FAQ for Pure.

https://github.com/agraef/pure-lang/wiki/FAQ

While Pure may look a lot like other modern FPLs such as Haskell and ML on the surface, under the hood it's much different:

  • Pure is based on term rewriting rather than the lambda calculus.[..]
  • Pure is conceptually much simpler than Haskell et al.

Since Albert Gräf is at, "Dept. of Computer Music, Johannes Gutenberg University of Mainz (Germany)" doing something audio-related would also be way cool. Do any of the programs do anything extra, like an easter egg...?

http://q-lang.sourceforge.net/lac05/q-lac05-slides.pdf

Turned out quite different from both ML and Haskell. Simpler. Interpreted. Dynamic typing. => “functional scripting language”

If you add a language you have 129... unless you drop one, have you ever done that? Do you have a candidate language? And was any one or more language especially hard to add, or do you try to only learn/program only their I/O, only learn what gets you by? I'm curious what you found most to be the most unusual and/or hardest language to program.

I like that you have Prolog (and other lesser known languages), but this has to be one of the most obscure [Prolog [constraint]] languages I've seen: https://en.wikipedia.org/wiki/BNR_Prolog

BNR Prolog, also known as CLP(BNR) is a declarative constraint logic programming language based on relational interval arithmetic

There's also (such as Janus): https://en.wikipedia.org/wiki/Concurrent_constraint_logic_programming

Have you considered assembly language too? Or WebAssembly or AssemblyScript in case you're worried about portability (still not sure about those and I/O).

oshaboy commented 2 years ago

QB64 springs to mind but it's not in the Ubuntu repos.