2,176 reputation
817
bio website
location
age 21
visits member for 2 years, 9 months
seen 1 hour ago

Aug
1
comment Haskell syntax for type definitions: why the equality sign?
GADTs aren't that recent an extension; I would honestly be pretty surprised if any bugs existed in them at this point. :)
Jul
24
comment How do you handle specific networking exceptions in Haskell?
It's from C. :D
Jul
24
comment How do you handle specific networking exceptions in Haskell?
I don't remember hearing anything like that. :/
Jul
24
comment How do you handle specific networking exceptions in Haskell?
Okay; I'll try to formulate an answer, if I can find the necessary data myself. :)
Jul
24
comment How do you handle specific networking exceptions in Haskell?
Where is the try function from? I'm not familiar with it.
Jul
20
comment Why do Haskell functors only have derived types in their target category?
This question is related.
Jul
17
comment Is it safe in Haskell to save a data structure to a file using “show”, and retrieve it using “read”?
Yes, it is actually stored directly as a byrestring. :)
Jul
17
comment Is it safe in Haskell to save a data structure to a file using “show”, and retrieve it using “read”?
@Carcigenicate What do you mean by "base"? Remember that, to the computer, the text is also binary, so using text is just using binary but less efficiently, by definition.
May
10
comment Object-Oriented Object Transformations
This answer is great!
May
10
comment Object-Oriented Object Transformations
I'm going to go ahead and say that the Object Orientation is almost certainly not the best choice here. Functional processing pipelines work far better in this kind of scenario. All that considered, Gregor's answer is excellent, and basically in line with what I just said.
Mar
10
comment How does persistence fit into a purely functional language?
The Query and Update monads are pretty far removed from IO, actually. I'll try to give a simple example in an answer.
Mar
1
comment How does persistence fit into a purely functional language?
Perhaps it would be helpful to look at the design of various persistence libraries in Haskell; in particular, acid-state seems to be close to what you are describing.
Feb
11
comment An alternative to an array of functions?
I think it's worth noting that you're basically creating a so-called "structural object" here, so any existing work on doing structural OO in PHP should be of help to you.
Jan
25
comment Why doesn't Haskell have a 'format' function for string interpolation?
You can also use shakespeare-text, which may be of interest to you.
Nov
1
comment Non-trivial functions that operate on any monad
Just to note, your bindFold is normally called sequence, and can be made generic over all Applicatives, not just Monads. The same goes for the more general version traverse.
Oct
5
comment Functional programming and stateful algorithms
@bigstones Perhaps this library will be helpful to you?
Oct
5
comment Functional programming and stateful algorithms
@Philipp I disagree. An automaton or state machine is sometimes the most natural and accurate way to represent a problem, and functional automata are well studied.
Oct
4
comment Functional programming and stateful algorithms
I, for one, would love to see the code that you've been trying to work with. In the absence of that, my best advice is that Haskell's laziness can often be exploited to not compute things more than once. Look into so-called "tying the knot" and lazy value recursion, although your problem is likely simple enough that the more advanced techniques that take advantage of infinite values and similar things would be overkill, and would probably just confuse you right now.
Sep
30
comment What can Haskell's type system do that Java's can't and vice versa?
@AndresF. I wouldn't call it a syntactic difference, but it's not a type system difference, more of a standard library difference. Java could easily (well, "easily") have chosen to use some kind of effect-tracking system, since it's type system is already powerful enough to handle it.
Sep
30
comment What can Haskell's type system do that Java's can't and vice versa?
@DarkOtter I'm aware of Typeable, but Haskell 2010 does not have it (maybe Haskell 2014 will?).