>>40
I tire of Christopher's incessant self-promotion.
Name:
Anonymous2008-07-16 13:39
>>40
This is semantically wrong and your GHCi is ancient. Have a look at this instead:
Cyandragonfly:~ dongs$ ghci
GHCi, version 6.8.3: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> :m + Control.Monad.Fix
Prelude Control.Monad.Fix> putStrLn $ fix $ \ m -> "This may surprise you, but I invented the \"" ++ m ++ "\" meme"
This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invenInterrupted.
Prelude Control.Monad.Fix>
Name:
Anonymous2008-07-16 13:54
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Prelude> let loeb f = fmap ($ loeb f) f
Prelude> putStrLn $ (!!1) $ loeb [const $ "This may surprise you, but I invented the \"", concat, const $ "\" meme."]
This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I invented the "This may surprise you, but I inI Interrupted.
Prelude> Leaving GHCi.
Name:
Anonymous2008-07-16 15:39
>>44
Would you please explain what you did there? I am not really an expert on Haskell.
>>40
The program should print the closing quotes to be correct. Why this will cause the program to run out of memory while the original will not is left as an exercise for the reader.
Challenge, rewrite so that it will print the closing quotes without running out of memory.
Name:
Anonymous2008-07-28 17:26
>>61
Could someone please post the specification of THE ABC PROGRAMMING LANGUAGE
Name:
Anonymous2008-07-28 19:20
Determinism is for wimps.
import Control.Concurrent (forkIO)
main = putStr "This may surprise you, but I invented the \"" >> forkIO main >> putStr "\" meme."
Name:
Anonymous2008-07-29 0:17
>>65
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, structur
ed, 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 ar
ithmetic, 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 equiva
lent 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
Name:
Anonymous2009-03-06 8:17
Worst BASIC implementations ever even among Commodore.
Name:
Trollbot90002009-07-01 8:25
Example of a good programmer you should make people build it with VS directly because it does a lot more than any other place on.