so I will write fictional nonsensical Haskell code with nice Unicode
— Computes the anus of y
x :: Num a ⇒ a → a
x = λy·y×(y÷2)
— Charlie Brown
foo :: String → String
foo x = case lookup “x” x of
Just y → y
Nothing → x
Name:
Anonymous2008-07-03 18:21
>>7
Not at all. There are two versions of the ABC programming language:
ABC is an esoteric programming language created by Orange. The language is very simple and easy to implement. This language has nothing to do with the real programming language ABC.
Instructions
a - Increment the accumulator
b - Decrement the accumulator
c - Output the accumulator
d - Invert accumulator
r - Set accumulator to a random number between 0 and accumulator
n - Set accumulator to 0
$ - Toggle ASCII output mode. When on, the C instruction prints the accumulator as an ascii character.
l - Loop back to the beginning of the program.
; - Debug. Prints out accumulator as a number and ascii character.
Examples
Print out 1337: acaaccaaaac
Simulate a dice throw: aaaaarac
Random phone number generator: ac
naaaaaaaaradc
naaaaaaaaarc
naaaaaaaaarc
Count to infinity(or until out of memory. What ever comes first) acl
Constantly Beep using ASCII code 7(bell) aaaaaaa$cnl
------------
ABC is an imperative general-purpose programming language and programming environment developed at CWI, Netherlands by Leo Geurts, Lambert Meertens, and Steven Pemberton. It is interactive, structured, high-level, and easy to learn and use, intended to be used instead of BASIC, Pascal, or even AWK. It is not a systems-programming language but is good for teaching or prototyping.
ABC has only five basic datatypes. It does not require variable declarations. It has explicit support for top-down programming. Statement nesting is indicated by indentation. It provides infinite precision arithmetic, unlimited sized lists and strings, and other features supporting orthogonality and ease of use by novices. Its designers claim that ABC programs are typically around a quarter the size of the equivalent Pascal or C programs, and more readable.
ABC was originally a monolithic implementation, leading to an inability to adapt to new requirements, such as creating a Graphical User Interface. ABC could not directly access the underlying file system and operating system.
ABC includes a programming environment with syntax-directed editing, suggestions, persistent variables, and multiple workspaces.
ABC is available as an interpreter/compiler, currently at version 1.05.02. ABC has been ported to Unix, DOS, Atari, and Apple Macintosh.
ABC also had a major influence on the design of the Python programming language; Guido van Rossum, who developed Python, previously worked for several years on the ABC system in the early 1980s.
An example function words to collect the set of all words in document: HOW TO RETURN words document:
PUT {} IN collection
FOR line IN document:
FOR word IN split line:
IF word not.in collection:
INSERT word IN collection
RETURN collection