[Haskell] Announcing Haskell 2010 - 0 views
The Flying Frog Blog: Purely functional games (tetris clone in haskell) - 0 views
Typed type-level programming in Haskell, part I: functional dependencies « bl... - 0 views
Fatvat: Speeding up the Ants program - 0 views
ZeroMQ and Clojure, a brief introduction | opus artificem probat - 0 views
Applicative-what? Functor-who? « wxfz :: Blog - 0 views
-
Monads Are a kind of abstract data type used to represent computations (instead of data in the domain model).
Learning Clojure: Clojure is Fast - 0 views
Fatvat: Ants and Haskell - 0 views
Fatvat: Web Sockets and Haskell - 0 views
-
import Network import System.IO import Control.Concurrent import Char serverHandshake = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n\ \Upgrade: WebSocket\r\n\ \Connection: Upgrade\r\n\ \WebSocket-Origin: http://localhost\r\n\ \WebSocket-Location: ws://localhost:9876/\r\n\ \WebSocket-Protocol: sample\r\n\r\n\0" acceptLoop socket = forever $ do (h,_,_) IO () listenLoop h = do sendFrame h "hello from haskell" threadDelay (3 * 1000000) sendFrame h "it works!" return () sendFrame :: Handle -> String -> IO () sendFrame h s = do hPutChar h (chr 0) hPutStr h s hPutChar h (chr 255)
jaspervdj - Maybe, null, and boilerplate code - 0 views
-
A first goal they serve is as "unassigned variables". I will not cover that here, instead I will focus on another use: abnormal return values.
-
So, null is some sort of "Not found" error here. But wait - they could have used an Exception here!
-
We see a similar behavior here: when the object is found, we get a Just a, and when it is not found, we get Nothing - comparable to a null pointer.
- ...5 more annotations...
Fatvat: Bidirectional Web Sockets - 0 views
1 - 18 of 18
Showing 20▼ items per page