News: 11 March 2016 - Forum Rules

Author Topic: A general purpose language similar as this  (Read 749 times)

C_CliFF

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • General CoolNES Translations
A general purpose language similar as this
« on: October 22, 2021, 04:10:09 pm »
Somewhat odd question but I'm more curious about this one.

I have been programming on and off in C/C++/C#/Python/Ruby for years and although they are fine there was one scripting language call
RX Scripting Language (http://uxsoftware.com/pages/index.html) that I used for creating roulette systems a couple of years ago that I think (although different) was quite fun to program in.

As an example, the syntax is as follows:



As you can see it's not very clear what it does but what RX makes you do is adding words that the compiler will completely ignore:



Both are exactly the same but this way it's more clear what the code does. "has been, time, dollar on" is ignored by the compiler here.

The problem with RX is that the language is only for creating roulette systems so my question is if anyone is aware of a
general purpose language that allow you to do this.

I've made a couple of searches but I don't know how to make an accurate search for it so I thought it would be better to ask instead.

I tried searching for an english like language and I saw applescript but I don't know if it works the same way, if all the words are a must, that is.
Maybe someone that has been using it can confirm that.

Thanks.


FAST6191

  • Hero Member
  • *****
  • Posts: 3344
    • View Profile
Re: A general purpose language similar as this
« Reply #1 on: October 22, 2021, 05:32:24 pm »
Most would tell you to use comments* (some might allow mid line comments if end of line is not going to do it for you), or just deal with it; there probably will be human language programming at some point but it is a while out yet. Best you get there is stuff like that Arabic/Right to Left focused language such that people used to RTL scripts might be able to do something rather than go with more English language sensibilities.

The trouble will come in that roulette is a very simple game when all is said and done. Everything else will allow you to define new phrases/items/words (even assembly allows you to have function names), and even if not then roulette again being simple will mean it can be wholly encompassed by terms and made to ignore things where more general stuff will not.

*Some say if you have to comment your code you have failed to make it clear. I don't necessarily subscribe to the idea but it is compelling.

Curveball. Have you considered the visual programming languages? Scratch being the most notable of them but there are others.
For an example of the fun and games possible there
https://www.youtube.com/watch?v=bZDE6I5B9-E

C_CliFF

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • General CoolNES Translations
Re: A general purpose language similar as this
« Reply #2 on: October 22, 2021, 06:35:27 pm »
I do comment my code well enough in the projects I've had in all the languages I mentioned.

RX is a simple scripting language indeed even though it has the fundamentals like functions, arrays, arithmetic operations, conditions and variables, although everything is global, no variable scope, no nothing. The question was if anyone was aware of a GPL that as long as there are no keywords or anything that would conflict compilation you can type whatever you want. It was not about how to learn to program with a natural like programming language or a visual programming language if I understood your post.

I guess the reason I liked it was that it was more different than any other languages I've used.

I appreciate your input, thanks.
« Last Edit: October 22, 2021, 07:34:44 pm by C_CliFF »

[Unknown]

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
    • PPSSPP
Re: A general purpose language similar as this
« Reply #3 on: October 22, 2021, 10:34:50 pm »
I've seen people talk about interest in languages like this before, which ignores words to allow you to have natural sentences.

Personally, I think they are strictly worse.  Although non-prototype code is more often read than written, so understanding is important... it's also very important that it's written and read correctly.

In my mind, a language that silently ignores words is just dangerous and requires the author and reader to both be only *more* expert in the programming language to be sure they understand it correctly.

For example....

Code: [Select]
If Black isn't being hit each time
begin
    Put 1 less dollar on 1st Dozen
end

Now maybe the particular words I've picked there are in fact special and supported, but my guess is they're not.  If that's the case, you'll probably tell me "well, you wrote terrible code.  That code is just wrong."  I'm glad you know that.  But the compiler probably tells me it's good code.  If another person who doesn't know the detailed rules of the language reads it, they might find it awkward but assume it is okay code.

A language like this is actively harder for an amateur to learn to read and write, in my opinion.

Anyway, similar languages:
https://en.wikipedia.org/wiki/Shakespeare_Programming_Language
https://esolangs.org/wiki/Poetic

And, although there's markup:
http://inform7.com/book/WI_2_3.html

You can see more here:
https://en.wikipedia.org/wiki/Natural-language_programming

-[Unknown]

C_CliFF

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • General CoolNES Translations
Re: A general purpose language similar as this
« Reply #4 on: October 23, 2021, 07:02:23 am »
Quote
Personally, I think they are strictly worse.  Although non-prototype code is more often read than written, so understanding is important... it's also very important that it's written and read correctly.

If another person who doesn't know the detailed rules of the language reads it, they might find it awkward but assume it is okay code.

I agree, at first when I saw RX I couldn't understand much what was going in the code that others had written but when I created my own systems and put my own words in it, it was more clear. The aim is more to have fun with it alone. I don't plan having a bigger project with a language such as this.  ;)

Thanks for the links, I'll check them out.