[Haskell-cafe] ANNOUNCE: hslibsvm-2.88.0.1 - A FFI binding to LibSVM

2009-02-16 Thread S . Günther
The result of the fact that I needed to use a support vector machine and didn't want to leave haskell land. LibSVM is a support vector machine library written in C++ with an exposed C interface. More information about LibSVM can be found at: http://www.csie.ntu.edu.tw/~cjlin/libsvm/ This is my

Re: [Haskell-cafe] Updating doubly linked lists

2009-01-03 Thread S. Günther
G'Day, and phew... quite a lot of code to grok. Thanks for the answers, they're much appreciated. On Sun, Jan 4, 2009 at 1:43 AM, Niklas Broberg niklas.brob...@gmail.com wrote: What you need is for the nodes to keep track of the length of the list. Here's a different solution from that oleg

Re: [Haskell-cafe] Re: Updating doubly linked lists

2009-01-02 Thread S. Günther
There goes my promise like a new years resolution... ;) What kind of structure do you need exactly? What I really need is a structure which represents a two dimensional grid, i.e. it consists of nodes having a value and a list of neighbours attached to it. Point is that if node 1 has node 2 as a

Re: [Haskell-cafe] Re: Updating doubly linked lists

2009-01-01 Thread S. Günther
Whether circular or not, sharing values by using a back pointer is problematic for any update. Why not use a zipper instead? I looked into zippers before and the problem I had was that they never really matched the structure which I needed and which led me to think about this whole knot tying

Re: [Haskell-cafe] Updating doubly linked lists

2008-12-31 Thread S. Günther
...@van.steenbergen.nl wrote: Hi Stephan, S. Günther wrote: Is it possible to change a particular node of the doubly linked list? That is to say, that would like to have a function: update :: DList a - a - DList a where update node newValue returns a list where only the value at the node which

[Haskell-cafe] Updating doubly linked lists

2008-12-30 Thread S. Günther
Hello, I was trying to wrap my head around the stuff at http://haskell.org/haskellwiki/Tying_the_Knot (again) and along the way came a question: Is it possible to change a particular node of the doubly linked list? That is to say, that would like to have a function: update :: DList a - a - DList

[Haskell-cafe] Problem with System.Random.randoms

2008-12-07 Thread S. Günther
- getStdGen print $ length $ take n $ ((randoms g)::[Int]) On the other hand using take n $ [1..] it runs in constant space. Am I doing something wrong? Or should I just abandon randoms and use the more primitive functions in System.Random? Thanks in advance S. Günther