News for hackers. Stuff that matters.
Re:Go enjoy Python3 by edofic on Thursday August 27, 2015 @11:59AM (#10130191)
A mandatory smart-ass Haskell response

    import System.Environment (getArgs)
    main = do
      [str] <- getArgs
      putStrLn $ take 12 str
Re:Go enjoy Python3 by nicolast on Thursday August 27, 2015 @12:22PM (#10130343)
Now with more operators!

    import System.Environment (getArgs)
    main = putStrLn =<< take 12 . head <$> getArgs
;-)
Re:Go enjoy Python3 by joeyh on Thursday August 27, 2015 @12:37PM (#10130468)
The actual smart-ass haskell response is simply "take 12". The spec didn't specify this needed to be a impure shell command, so a pure function is obviously better.
Re:Go enjoy Python3 by coldtea on Thursday August 27, 2015 @12:26PM (#10130368)
Well, for smart-ass (and I know you meant it as a joke) is not very impressive. Don't do anything more than the others, and the syntax is not so great either.
Re:Go enjoy Python3 by Veedrac on Thursday August 27, 2015 @07:33PM (#10132812)
On the contrary, his is the only one that crashes when more arguments than expected are passed. Hooray progress!