5,860 reputation
12240
bio website github.com/DanielWaterworth
location United Kingdom
age 23
visits member for 3 years, 11 months
seen Nov 21 at 18:09

Jan
4
revised How do I figure out the minimum number of swaps to sort a list in-place?
added 327 characters in body
Jan
4
comment How do I figure out the minimum number of swaps to sort a list in-place?
There's 2 subgraphs [e, d, a, b] and [c]. so it's three. I'll update my answer to try to explain the 'enclosed subgraphs' better.
Jan
4
answered How do I figure out the minimum number of swaps to sort a list in-place?
Jan
3
comment Which self balancing binary tree would you recommend?
@Steve314, I know, trees can be fiendishly complicated in imperative language, but surprisingly, implementing them in Haskell has been a breeze. I've written a regular AVL tree and also a 1D spatial variant over the weekend and they're both only about 60 lines.
Jan
3
revised Is Haskell's type system an obstacle to understanding functional programming?
grammar correction
Jan
2
comment Is it possible to write an anti-virus like thing using C# or Python?
@Rook, I know, mine was a joke too. I said there's no known way to decrypt perl.
Jan
2
answered Is Haskell's type system an obstacle to understanding functional programming?
Jan
2
comment Is it possible to write an anti-virus like thing using C# or Python?
@Rook, They're not strict encrypted, as there's no known way to decrypted them. I think it's more likely they're the output of a hash function =P
Jan
2
comment Is it possible to write an anti-virus like thing using C# or Python?
It's impossible to say conclusively whether a file is encrypted or not.
Jan
2
answered Is it possible to write an anti-virus like thing using C# or Python?
Jan
1
comment Which self balancing binary tree would you recommend?
Thanks, I'm working on an AVL tree now.
Jan
1
accepted Which self balancing binary tree would you recommend?
Jan
1
comment What are the common revenue models for free-software companies?
ok, I'll delete my comments
Jan
1
comment Which self balancing binary tree would you recommend?
@Fanatic23, a Skip List isn't an ADT. The ADT is either a set or an associative array.
Jan
1
comment Which self balancing binary tree would you recommend?
Also, people often use skiplists for concurrent data structures. It may be better, instead of forcing immutability, to use haskell's concurrency primitives (like MVar or TVar). Although, this won't teach me a lot about writing functional code.
Jan
1
comment Which self balancing binary tree would you recommend?
@Steve314, red-black trees are easier, but you haven't been able to make an implementation that works? What are AVL trees like then?
Jan
1
comment Which self balancing binary tree would you recommend?
I really enjoy skip lists and I've implemented them before, though not in a functional language. I think I'll attempt them after this, but right now I'm on self-balancing trees.
Jan
1
asked Which self balancing binary tree would you recommend?
Jan
1
comment Should I know more than one implementation of version control?
but: Git + Linux = FTW
Dec
31
comment Is Haskell worth learning?
The trouble with both F# and OCaml is that they aren't purely functional (which defeats part of the object of being functional IMO). In regards to side-effects in haskell: haskell allows the composition of impure functions, but not the execution of impure functions (with the exceptions of the performUnsafeIO and the execution of main). Without impure functions, haskell wouldn't even "make the cpu hot" because no expressions would be evaluated.