4 ms·
A very (very) simple Hello World program in Haskell. {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHas
by yakshaving_jgt 4y ago
A very (very) simple Hello World program in Haskell.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Foreign.C.Types
import qualified Language.C.Inline as C
C.include "<stdio.h>"
C.include "<stdlib.h>"
main :: IO ()
main = [C.block| void {
system("python -c 'print \"Hello, World!\"'");
} |]
- tpoacher 4y agolol, oh you!
- kretaceous 4y agoCan anyone explain how is this related to the post? I genuinely don't get it. I see C and Python/some kind of FFI.
- yakkomajuri 4y agoThe point here is that OP's "simple" Bash server just offloads everything to netcat. Just as the program above does with Python. EDIT: Just explaining the criticism, not necessarily subscribing to it - I don't think OP's point was to write something in "pure" Bash
- kretaceous 4y agoI see, thanks!
- M4tze 4y agoBetter tell him/her what you are thinking instead of making fun of him/her.
- dqft 4y agoBetter to just laugh at the good joke.
- Brian_K_White 4y agoThey did. And in a perfectly valid way. Better to not announce to the world "Hey everyone! Whaddya think?" If you can only tolerate approving answers. No one made them post a bad version of a one-liner that could already be googled up from 20 other examples already out there and better engineered. This sort of send-up is actually perfectly on target, and frankly actaully light hearted. Everyone posting critiques like this and like my own, knows full well that they have their own excrable works of art out there. We've all been figurative 7 year olds and made terrible crayon drawing programs, and even been ignorantly and adorably proud of them at the time.
- tedmiston 4y agoUsername checks out.