gar

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future. gar
gar
Designed by User:masalt
Appeared in 2022
Memory system stack-based
Computational class Unknown
Reference implementation gar
File extension(s) .gar

Gar is an esoteric programming language invented by User:masalt.

Examples

Hello, world!

>>>>>>>>>>
>>>>>>>
*
>>
+
>>>>>>>>>>
:
*
:
>
+
&
:
>>>>>>>>
+
&
:
>>>>>>>>
+
&
:
>>>>>>>>>>>
+
&
>>>>>>>>>>
>>>>
*
>>>>
+
&
>>>>>>>>>>
>>>
*
>>
+
&
:
>>>>>>>>>>>>>>>>>>>
+
&
:
>>>>>>>>>>>
+
&
:
>>>>>>>>>>>>>>
+
&
:
>>>>>>>>
+
&
>>>>>>>>>>>
>>>
*
,,

Infinite Loop

(
)

Quine

If the file name is ".gar"

>>>>
>>>>>>>>>>
*
>>>>>>
+
>>>>>>>>>>
:
*
:
>>>
+
&
:
<<<
+
&
>>>>>>>>>>>>>>
+
t
,,

Disan Count

>
>
-
:
?
[
:
<
+
]
~
)
[[
!
(
~
]]

Fibonacci Sequence

>
:
!
!
>
>
{
&
::
+
:
!
}

Truth Machine

?
]
)
[
:
!
]
(
!

Cat

(
???
,,
~~
)

Factorial

Works only with numbers greater than 2.

>
>
-
:
?
[
:
<
+
]
~
~
[[
*
&
]]
~
!

Read a File

???
t
,,

99 Bottles of Beer

99 Bottles of Beer in gar can be found here.

Deadfish

>
<
+
^
{
??
>>>>>>>>>>
:
*
|
+
]
~
)
[
<<<<<
+
]]
~
))
[[
<<<<<<
+
]]]
~
)))
[[[
<<<<
+
]]]]
~
))))
[[[[
~~
)))))
(
~~
^^
<
+
^
~~
)))))
((
~~
^^
>
+
^
~~
)))))
(((
~~
^^
!
}
((((
~~
^^
:
*
^
~
(((((
~~
>
^^
+
]]]]]
>
<
+
^
[[[[[
~~
>>>>
:
:
:
*
*
*
|
^^
+
]]]]]]
>
<
+
^
[[[[[[
~~
}

Implementations

The official gar interpreter.