Hacker Newsnew | past | comments | ask | show | jobs | submit | ruethewhirled's commentslogin

Can anyone explain what is meant by "managing IO" in the statement "I’m not even going to consider a system valid without managing IO in some way. So yes, all flavors of Lisp are off the table as well."? Is that like monads?


It means restricting to where you can perform IO actions, eg. printing to a log, writing to a shared area of memory, etc.

Haskell does this by representing IO actions as values, eg. "IO String" (something like "IO<String>", for people more familiar with that syntax), representing an IO action that, when later evaluated, will yield a string that you can use in subsequent actions.

Haskell's "main" (entry-point) function is a value of type "IO ()" (IO of a value representing nothing useful; you don't get anything out of it, so you just have a nothing placeholder). When a Haskell program is run, it ostensibly (hand-waving here) takes that IO value and interprets it, performing the action IO.

You have functions like putStrLn (print a line) that takes a String, and returns an "IO ()" . Accordingly, if you have

  main = putStrLn "Hello, World!"
... you have a value that lines up with the expected return value of main "IO ()". More complicated examples, like

  main =
    readLn >>= (\x -> putStrLn ("Hello, " ++ x))
... are doing the same thing (checking the types line up), just with more moving parts (the Monad thing you mentioned, which we're using to relate the "read line" function with the "print line" function).

The key bit is that it's just "IO Blah" values standing in for IO actions, and like jigsaw pieces, these IO-returning functions only fit together where the types line up, restricting how you can use them.

Monads are tangential to this; the type-checking of that jigsaw puzzle is what matters here.


Thanks, was wondering if it was on github!


I find this article a terrible sweeping generalization and opinionated based on the authors perception of success and what it takes to be successful.How about working smarter and not harder


I found it amusing that to view the 1 second video at the end I had to watch a 30 second advert first


Not to be a wet blanket, but isn't posting that copyright infringement?


There's a link at the bottom of the page: https://news.ycombinator.com/dmca.html

I wonder how much it actually gets used. I doubt HN is a serious competitor to sites like WSJ.com.


Hardly at all:

If you believe that content residing or accessible on or through the our website (“Services”) infringes a copyright, please send a written notice (by fax or regular mail) to the Designated Agent at the address below. You may not communicate the information specified below by email.


Ah this is going to kill my mobile usage of the site, which is the main way I use the Facebook, website version not the app. Theres no way I'm going to incur bandwidth and annoyance of the sound of ad's playing on my phone. Bandwidth would be the key factor since I have a limited mobile trafic cap. But any sites that make noise without me interacting with them annoys the hell outa me.

Other than mobile usage I check the site about 1-2 times a week on my laptop which doesn't have flash installed (I use Chrome for Youtube/flash content sites) so hopefully the ad's aren't html5.


Like most things in life, It doesn't matter when you start, more that you start at some point and spend time and effort in getting better.


There's actually alot of things they could fix to improve the user experience. Just signed up for an account and it wasn't overly pleasant. List of a few gripes:

  * No ajax on name availabilty

  * very limited secret question options ( min of 5 chars for answers)

  * Wasn't overly obvious which fields were required until you hit submit ( in the end I think they were all required)

  * Initially there was a smug looking guy on the login page(pretty nitty picky) he seems to be gone now but if goto www.outlook.com you get a broken image


I find that American style ad's have an underlining fakeness to them, its hard to put my finger on it. I'm assuming its just a cultural difference being from New Zealand but some ad's from the States just grate me the wrong way. These Apple ad's are particularly bad in this respect.


It's because they're actors with pearl-perfect teeth, perfectly styled hair, perfect professional makeup and they are in a Hollywood perfect world where everything is spotless and organized 'just so'.

It kind of makes things feel like a dream.

The reality of life in the US is a hilarious smack in the face compared to the Hollywood advertised US we see on TV/Movies


As an American I don't find this feeling foreign at all. I would be interested to find out whether this was more of a personality or a nationality thing (and whether it couldn't be controlled by using different accents with the same script, etc.)


That's how I feel when I see ads from other countries other than the US. These ads reminds me a little bit of them.


Anyone noticed increased CPU usage?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: