3 ms·
Hello world in PHP: <? print("hello world") Hello world in Haskell: main = print "hello world" You don't even need the "main = " if you're using a R
by chriswarbo 10y ago
Hello world in PHP:
<? print("hello world")
Hello world in Haskell:
main = print "hello world"
You don't even need the "main = " if you're using a REPL :)
- noonespecial 10y ago"Php was already on my system. I cut and pasted a index.php from google and it worked! Now I have a website! ... What the #$^@ is cabal?"
- kazinator 10y agoApples and oranges. What is hello-world in Haskell such that it is embedded into a page that you load out of Apache?
- dllthomas 10y ago> What is hello-world in Haskell such that it is embedded into a page that you load out of Apache? With apache configured to run the program as a CGI script? Still the same thing. That's not a great way to run Haskell on the web, but it's not too far from what's going on with historically common out-of-the-box PHP setups (and I understand that modern PHP setups take a little more code).
- deleted 10y ago[deleted]