mikeplus48
Re:The Haskell Cheatsheet
on Sunday December 16, 2012 @12:16AM (#4927420)
Start with the spelling. :)
data GADT a where
Constructor0 :: Field a -> Field b -> GADT (a, b)
Constructor1 :: ...
...
Re:A vim interface for gmail: Vmail
on Friday December 14, 2012 @09:16PM (#4924374)
There's luakit, uzbl, surf and jumanji from the top of my head, but I don't think any of these have "full interoperability with the CLI". luakit is definitely my favourite as it has been much more reliable than uzbl and easier to configure/extend (in lua).
Re:Git-annex assistant: Like DropBox, but with your own cloud
on Wednesday August 15, 2012 @10:29AM (#4386092)
No, ghc produces statically linked binaries by default (-dynamic if you don't like that).
Re:Can a language be safe?
on Monday July 02, 2012 @11:38AM (#4189289)
You don't have to syntactically consume all of arguments of a function to write its body.
f :: a -> Int -> Int -> Int
f x = (+)
There really isn't anything meaningful to do with a function before it has consumed all it's arguments other than returning another function.> However, this "f" is quite different from a function that has the signature "x->(y->z)"
Yes, we have applied the argument of type 'x'. f 0 is no longer of type "x -> y -> z", or "x -> (y -> z)" (because of -> precedence, the two are equivalent), it is "y -> z".
Currying is explicit.
f x y = foobar
is just short hand for f = \x -> \y -> foobar
Re:Can a language be safe?
on Monday July 02, 2012 @06:11AM (#4188192)
I don't understand this point. If you have arguments x and y that you want to apply to this function, I don't see the problem in "using them directly".
Function application in Haskell is first class. If you have
f :: x -> y -> z
f x y = undefined
then use it like (f 0)
you have a new function: f 0 :: y -> z
then if you apply again, (f 0) 1
and this final expression, equivalent to f 0 1, gives you something of type 'z'
Re:Flexible Format Strings in Haskell
on Saturday May 26, 2012 @09:28PM (#4028905)
This gives me an idea for a scanf-like QuasiQuoter...
Re:Functional programming in sh
on Thursday May 24, 2012 @04:28AM (#4017410)
I'm the author of this post, it was a joke. I said "For those who have no idea what they're doing 90% of the time when they are in bash" very sarcastically, but obviously this wasn't conveyed very well, sorry.
edit: I know the defense "it was a joke" is very overplayed, but really, somewhere in between the graphs with rainbows and explosions, this post was intended to be humourous. :)