Remix.run Logo
yakshaving_jgt 9 hours ago

I do love a bit of FP. Here's the canonical Hello, World! program.

    {-# LANGUAGE OverloadedStrings #-}
    {-# LANGUAGE QuasiQuotes       #-}
    {-# LANGUAGE TemplateHaskell   #-}

    module Main where

    import Foreign.C.Types
    import Language.C.Inline qualified as C

    C.include "<stdio.h>"
    C.include "<stdlib.h>"

    main :: IO ()
    main = [C.block| void {
      system("python -c 'print \"Hello, World!\"'");
      } |]
OhMeadhbh 8 hours ago | parent [-]

Except that someone installed a different version of python on the target system that changes the semantics of the print keyword.