EternalGolf

From Esolang
Jump to navigation Jump to search

EternalGolf is an esoteric programming language designed by PrySigneToFry to code-golfing. You're free to expand this programming language, just like Infinite Shidinn Letter.

Rules

  1. Your edit can't destroy other's work, but fixing is allowed.
  2. Your edit must be computable. EternalGolf needs computable without uncomputable command area.
  3. Your edit must be suit for golfing or adding new feature to EternalGolf.
  4. Your edit must be operational on most operating systems.
  5. Your edit mustn't on protected area(Basic area, Supplement area, Compact area).
  6. New commands in your edits must specify the username. If it is not specified, then treat it as uploaded by PrySigneToFry. Format: This command is added by xxxxxx.
  7. Your edit musn't be a joke, e. g. "⊿ - Bluescreen the user's device" is not welcomed.

If an edit doesn't follow the rules, it will be reverted. Reverting edits that don't follow the rules are welcomed.

Specifications

Both base-10 and base-100 are accepted. Here is the base-100 character set:

0123456789
ΑΒΓΔΕΖΗΘΙΚ
ΛΜΝΞΟΠΡΣΤΥ
ΦΧΨΩϜϞαβγδ
εζηθικλμνξ
οπρστυφχψω
ϝϟÆÐÞßæðþə
ŒœƑƒ⁅⁆↊↋ↀↂ
ↈ⑀⑁⑂⑃⑄⑅⑆⑇⑈
⑉⑊⓵⓶⓷⓸⓹⓺⓻⓼

Thus, you can't to add the command in this char-set because they're already used as numbers. All alphabets are from Greek, with Digamma and Qoppa. Base-100 has 0h prefix, and with point for decimal point. To seperate two decimal numbers, use first row and second row.

This Esolang has a 1-dimensional tape, five accumulators, five stacks, ten registers(reguno, regdos, regtre, regqdr, regqnt, regsex, regspt, regoct, regnon, regdec), and a buffer.

Basic area

f: Move the pointer to right.
b: Move the pointer to left.
i: Increase current cell by 1.
d: Decrease current cell by 1.
w: Output current cell as character.
r: Input character and store its code point to the current cell.
[: If the current cell data is 0, jump past the corresponding closing bracket. If the brackets don't match, an "Unmatched [" is output.
]: If the current cell data isn't 0, jump to the corresponding opening bracket. If the brackets don't match, an "Unmatched ]" is output.
{: Start of a code block.
}: End of a code block.
"": A string literal. All escaping are same as Python.
s: Output current cell as integer.
l: Input an integer(arbitary length, end with blank characters) and store it to the current cell.
O: 1-argument function. Output the argument directly and with newline.
Ø: Like O, but with no newline.
I: Input an arbitary-length string. Ends with EOL.
Ï: Input an arbitary-length document. Ends with EOF. On Windows, you use Ctrl+Z then Enter; on Linux, you use Ctrl+D.
F: Input a float number and return it directly, and if the input is invalid then return 0.
M: Output current cell as float number.
N: Input an integer and return it directly, and if the input is invalid then return 0.
;: Command Seperator.
,: Comma expression.
¥n,t,v: Define a variable named with n, type t, and value v.
դ: Null type.
ñ: Integer.
Б: Boolean. ֍ for true and ֎ for false.
Ч: Character. Use single quote as character literal.
ф: Float number.
щ: String.
Pv: Push v to stack. € for current cell and ↇ for accumulator.
pv: Pop the stack top and store it to v. If v is not specified then discard it.
б: Increase the accumulator by 1.
м: Decrease the accumulator by 1.
п: Square the accumulator.
в: Output accumulator as number.
р: Output accumulator as character.
$x,y: Swap x and y. st for stack top and ſt for second-to-top stack element.
^: Duplicate stack top.
⇵: Flip whole of the stack.
हैx: Change all accumulator-based operation to the x-th accumulator.
Jx: Join x to the tail of buffer.
Tx,y: Take x-th element of buffer and store it into y. Buffer index is wrapped to head if the buffer index is tail + 1.
cond?{code}:{code2}: Same as AlgodooScript, if cond is true then do code, otherwise code2. You may also construct elif statement by :cond2?{code2}.
cond|{code}: If cond is true then repeatly do code.
{code}žcond: Do-while statement in C++.
《》: An array.
\: String escaper.
⍼: String seperator. \⍼ means character ⍼.
"""gyiasgdysgio""": Document string, with no escape needed.
【】: Comment block.
x²: Get the square of x.
丢x: Reset x to initialized value.
@: Break whole loop, and end program if it is not in any loop.
∎: Jump to next round of loop, and do NOP if it is not in any loop.
∂: NOP.
⁇x: Logical YES. Return 0 if x is 0, otherwise 1.
‼x: Logical NOT. Return 0 if x is NOT 0, otherwise 1.
#n,v: Assign v to n.
Ÿn,t: Change the type of n to t.
µn,t: Change the type of n to t forever.

Supplement area

This area is reserved for the future and will be placed in a supplemental area when the base area is insufficient. Supplemental areas cannot be posted, altered, or deleted.

Compact area

This area is intended to be compatible with Anygolf, XENBLN, Jelly, etc., and cannot be posted, altered, or deleted.

Built-in constants

This area is dedicated to storing built-in constants that must be added, modified, or deleted by a member of the development team.

⍞: STDIN.
⎕: STDOUT.
⍔: STDERR.
⍢: Buffer.
⍥: Current filename and absolute path.
⍝: Current time by UNIX stamp.
û: Undefined behaviour. Try to string-ize it will get 与君九十九杯酒.
ñ: NULL. Try to string-ize it will get "".
ÿ: Invalid type: Try to string-ize it will get "".
Type-conversion is same as 高尔夫 and XENBLN.

Extension area

From this area onwards, all commands are allowed to be posted, added, modified, deleted (and even ironed, r*ped, shot, looted, put into supplementary areas, et cetera).

Examples

You can add by yourself.

Hello, world!

O"Hello, world!"

A+B Problem

lfl[bifd]bs

Alternated

PNPNP(st+ſt)Ostp p p

Alternated 2

O(N+N)

Truth Machine

PNP(⁇N){Ost}ž(st≠0)

Categories and References