Talk:0587

From Esolang
Jump to navigation Jump to search

Implementation?

Is there any implementation of this language at the moment? -- Chibiningen (talk) 22:57, 25 January 2021 (UTC)

Added an interpreter. But the language specification seems very unclear. Here are some questions (for the author of the language) and for each question there is an assumption that is currently implemented in the interpreter:

  • Is 0 a combinator, or a part of the syntax? What happens if 0 is not supplied with enough arguments? Is 00 a valid program? Assumed: Enough arguments must be supplied.
  • Similarly, is 1 a combinator, or a part of the syntax? Is 01 a valid program? Assumed: Enough arguments must be supplied.
  • Do 2 and 3 return the function/argument of the currently executing function, or the one in which they are instantiated? Assumed: The one in which they are instantiated.
  • What type of value does 4 expect? In the first example 04(Hello World) it takes (Hello World), which makes sense, but in the second example 01040291(Hello World) it takes 1(Hello World), which is a function that returns (Hello World). Assumed: If it receives a function, it calls the function with 9 (null) until it receives a literal value that can be printed.
  • What types does this language have? Assumed: Function, integer, string and null.
  • What happens if 6 or 7 are called with a string, a null, or a function? Assumed: Error.
  • What happens if 4 is called with a null? Assumed: Error.
  • How to distinguish between integers and strings? Is (0) a string, or an integer? Can it be incremented/decremented? Assumed: If it can be parsed as in integer, it is an integer, otherwise it is a string.
  • What if 8 receives something that is not (0)? Assumed: Returns the received value itself.
  • What if parentheses appear inside (n)? Is 04(()) a valid program? Assumed: Nested parentheses are allowed, but must be balanced.
  • What exactly does 5 do? Does it read the entire input as a string, does it read a single char, or does it read a number? Assumed: Reads a char and if the char is a digit returns its integer value, otherwise returns a string representing that character.
  • What happens if 5 is called, but input EOF is reached? Assumed: Returns null.
--Hakerh400 (talk) 08:35, 27 January 2021 (UTC)