Talk:0587
		
		
		
		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 0a combinator, or a part of the syntax? What happens if0is not supplied with enough arguments? Is00a valid program? Assumed: Enough arguments must be supplied.
- Similarly, is 1a combinator, or a part of the syntax? Is01a valid program? Assumed: Enough arguments must be supplied.
- Do 2and3return 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 4expect? In the first example04(Hello World)it takes(Hello World), which makes sense, but in the second example01040291(Hello World)it takes1(Hello World), which is a function that returns(Hello World). Assumed: If it receives a function, it calls the function with9(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 6or7are called with a string, a null, or a function? Assumed: Error.
- What happens if 4is 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 8receives something that is not(0)? Assumed: Returns the received value itself.
- What if parentheses appear inside (n)? Is04(())a valid program? Assumed: Nested parentheses are allowed, but must be balanced.
- What exactly does 5do? 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 5is called, but input EOF is reached? Assumed: Returns null.