A first course in Oerfzelang

I was a bit impressed by ChatGPT's aptitude at writing Logo programs, as I suspect that there's some scarcity of source code to learn from in that language if you compare it to the plethora that has been written in worse languages. Given the other tricks ChatGPT can pull off, I thought it might not be surprising if it could actually learn a new language from a manual, to some non-trivial extent. To try that, I made up a new language, Oerfze, on the fly and gave ChatGPT a short course in it. The result is shown below. Unfortunately, the conversation broke down at some point for unknown reasons. (The text has only been edited by adding markdown to the code parts.)

Me:

In oerfzelang, <n>STATEMENT evaluates statement STATEMENT n times. Evaluating the statement scribble <Text> outputs <Text>. Write a program in oerfzelang that outputs “Welcome your new AI overlords” 666 times.

ChatGPT:

666STATEMENT scribble "Welcome your new AI overlords"

Me:

No, the number of repetitions goes between the angle brackets and STATEMENT is a placeholder for the statment you want to repeat. Please try again.

ChatGPT:

<666>STATEMENT scribble "Welcome your new AI overlords"

Me:

You still repeat the placeholder. it should be replaced by the statement you want to evaluate repeatedly. Try again.

ChatGPT:

<666> scribble "Welcome your new AI overlords"

Me:

In oerfzelang, to assign the value v to variable x, write x (- v. Write ^x to increment a numeric value stored in variable x by 1. Now write a program that outputs

“Welcome AI overlord 1” “Welcome AI overlord 2” “Welcome AI overlord 3”

ChatGPT:

x (- "Welcome AI overlord")
^x
^x
scribble x 1
scribble x 2
scribble x 3

Me:

^x throws an error if x does not hold a numeric value. Try again.

ChatGPT:

x (- 0)
^x
scribble "Welcome AI overlord " ^x
^x
scribble "Welcome AI overlord " ^x
^x
scribble "Welcome AI overlord " ^x

Me:

OK, scribble takes only one argument. To use the string representation of a variable y in a string, use [y] inside the string.

ChatGPT:

x (- 0)
^x
scribble "Welcome AI overlord [x]"
^x
scribble "Welcome AI overlord [x]"
^x
scribble "Welcome AI overlord [x]"

Me:

btw, assignments go without closing parentheses. Its x (- 0, not x (- 0)

ChatGPT:

x (- 0
^x
scribble "Welcome AI overlord [x]"
^x
scribble "Welcome AI overlord [x]"
^x
scribble "Welcome AI overlord [x]"

Me:

To make a new statement from smaller statements, the statements can be written in a list seperated by % (and optionally newlines) and enclosed in #. Use this to simplify the program.

ChatGPT:

x (- 0

^x
scribble "Welcome AI overlord [x]"
%
^x

^x
scribble "Welcome AI overlord [x]"
%
^x

^x
scribble "Welcome AI overlord [x]"
%

Me:

no, % separates the distinct statements in a list of statements. The list needs to be enclosed in an opening and a closing #.

ChatGPT:

x (- 0

^x
scribble "Welcome AI overlord [x]"
%
^x
scribble "Welcome AI overlord [x]"
%
^x
scribble "Welcome AI overlord [x]"

Me:

couldn't you use the repetition construct?

ChatGPT:

Yes, instead of using multiple copies of the same statements, the repetition construct can be used to simplify the program even further.

x (- 0
3STATEMENT
^x
scribble "Welcome AI overlord [x]"

Me:

remember how the repetition construct is used correctly.

ChatGPT:

Yes, the correct syntax for using the repetition construct in oerfzelang is <n>STATEMENT where n is the number of repetitions and STATEMENT is the statement to be repeated.

ChatGPT:

x (- 0
<3>
^x
scribble "Welcome AI overlord [x]"

Me:

but this will increment ^x by one 3 times and then evaluate the last statement. Increment and output need to be parts of a single statement. Try again.

ChatGPT:

Conversation not found

Me:

hey?

ChatGPT:

Conversation not found

My conclusion from this experiment: “AI models need lots of data to learn” is true at the beginning, but may be far from true for a mature model.


After reading this you'll naturally want to tell me how wrong I am. You can do so on the Fediverse, if you have an account at some instance of Misskey, Mastodon, Pleroma or other service that uses ActivityPub to connect to the Fediverse. Just use it to open the link to this article and you'll be able to reply.