https://github.com/slott56/py-false
An implementation of the False programming language in Python.
https://github.com/slott56/py-false
Last synced: 7 months ago
JSON representation
An implementation of the False programming language in Python.
- Host: GitHub
- URL: https://github.com/slott56/py-false
- Owner: slott56
- Created: 2016-08-31T11:25:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T19:51:30.000Z (over 2 years ago)
- Last Synced: 2025-01-10T18:26:37.778Z (9 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
False
#####See http://strlen.com/false-language
See https://strlen.com/files/lang/false/false.txt
Here's a couple of example programs to give a taste of what False looks like:
Copy Files
::
{ copy.f: copy file. usage: copy < infile > outfile }
ß[^$1_=~][,]#
Factorial
::
{ factorial program in false! }
[$1=~[$1-f;!*]?]f: { fac() in false }
"calculate the factorial of [1..8]: "
ß^ß'0-$$0>~\8>|$
"result: "
~[\f;!.]?
["illegal input!"]?"
"Prime Numbers
::
{ writes all prime numbers between 0 and 100 }
99 9[1-$][\$@$@$@$@\/*=[1-$$[%\1-$@]?0=[\$.' ,\]?]?]#
The point is ... well ... the point is hard to articulate. But there it is.
False implemented in Python.In order to make things microscopically easier to read, I've supplemented
the original ASCII-based symbols with Unicode.::
{ writes all prime numbers between 0 and 100 }
99 9[1-↑][⌽↑⍉↑⍉↑⍉↑⍉⌽÷×=[1-↑↑[↓⌽1-↑@]?0=[⌽↑.' ,⌽]?]?]⍟
::
{factorial program in false!}
[↑1 = ~[↑1 - f→⍎ ×]?]f← {fac() in false}
"calculate the factorial of [1..8]: "
⌺ ⍇ ⌺
'0-↑↑0>~⌽8>|↑
"result: "
~[⌽f→⍎.]?
["illegal input!"]?"
"Yes. I borrowed a few APL operators because they seemed more meaningful than
the original ASCII.