Re: [Haskell-cafe] Re: ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Conal Elliott
On Thu, Jun 11, 2009 at 11:55 AM, Jeff Heard wrote: > Oh, and I don't disagree with that at all. I just just have an > aesthetic preference for multiply qualified library names. Chalk it > up to the fact that my partner's a librarian, so I'm used to putting > things in categories, subcategories,

[Haskell-cafe] install problems ...

2009-06-11 Thread Vasili I. Galchin
Hello, As I have said before I a, "cabalizing" Swish (a semantic web toolkit). I have it built and have run most of the original author's tests by and they pass. There are numerous warnings which seem to be either lack of a function type signature or "unreferenced" symbols ... I will go through

[Haskell-cafe] Re: Semantic web RDF store

2009-06-11 Thread Vasili I. Galchin
P.S. I am open to sugestions on any RDF store API's! Vasili On Thu, Jun 11, 2009 at 11:02 PM, Vasili I. Galchin wrote: > Hello, > > Currently I am working on re-packaging Swish written by Graham Klyne > so that is cabalized... I am chugging along. I am also thinking about > writing a FFI f

[Haskell-cafe] Semantic web RDF store

2009-06-11 Thread Vasili I. Galchin
Hello, Currently I am working on re-packaging Swish written by Graham Klyne so that is cabalized... I am chugging along. I am also thinking about writing a FFI for some RDF store API like http://www.rdflib.net/store/ so that Swish could be hooked into a "reliable"persistent store where the s

Re: [Haskell-cafe] Debugging misbehaving multi-threaded programs

2009-06-11 Thread Evan Klitzke
On Thu, Jun 11, 2009 at 12:40 AM, Ketil Malde wrote: > Evan Klitzke writes: > >> [...] Unfortunately, this doesn't seem to work; whenever the >> program terminates due to running out of heap space, the generated >> .prof file is empty. > > Unless there's some specific problem with profiling in com

Re: [Haskell-cafe] When folding is there a way to pick out the last point being processed?

2009-06-11 Thread Claude Heiland-Allen
Casey Hawthorne wrote: When folding is there a way to pick out the last point being processed? I came up with these: safeHead = foldr (const . Just) Nothing safeLast = foldr (flip mplus . Just) Nothing Claude -- http://claudiusmaximus.goto10.org __

Re: [Haskell-cafe] When folding is there a way to pick out the last point being processed?

2009-06-11 Thread Thomas DuBuisson
Something like the belo 'foldL_last'? You could probably do it cleaner, but I don't think there is a library function that would help any more than foldl. foldL_last :: (a -> b -> a) -> a -> [b] -> (Maybe b, a) foldL_last f x xs = foldl (\(_,a) b -> (Just b, f a b)) (Nothing, x) xs Tom On Thu,

Re: [Haskell-cafe] When folding is there a way to pick out the last point being processed?

2009-06-11 Thread Tony Morris
By swapping from foldl to foldr? Care to provide more detail? Casey Hawthorne wrote: > When folding is there a way to pick out the last point being > processed? > > The first point can easily be picked out with (x:xs) but last xs > crawls down the list. > -- > Regards, > Casey > __

[Haskell-cafe] When folding is there a way to pick out the last point being processed?

2009-06-11 Thread Casey Hawthorne
When folding is there a way to pick out the last point being processed? The first point can easily be picked out with (x:xs) but last xs crawls down the list. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Building a tree?

2009-06-11 Thread wren ng thornton
michael rice wrote: Example understood. Thanks. Is there a module for binary trees? Not that I know of off hand. Trees are one of those data structures with so many different variants that people end up rolling their own based on whatever they need at the time. Hence Data.Tree, Data.Sequence

Re: [Haskell-cafe] Software Transactional Memory and LWN

2009-06-11 Thread Ryan Ingram
On Thu, Jun 11, 2009 at 4:38 AM, Ketil Malde wrote: > Ignoring the paper in the interest of laz...expedience, I guess the > crucial part is committing the transactions - you'd either need locks > or to single-thread the committing. It's possible to single-thread the commit without locking using lo

[Haskell-cafe] Re: ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Jeff Heard
And the one other thing is that it increases (to me) the at-a-glance comprehensibility of the module. If I'm reading over soemone else's code and I want to get a feel for where s/he put things, the fully qualified module structure and the fully qualified names in the import statements make it easy

[Haskell-cafe] Re: ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Jeff Heard
Oh, and I don't disagree with that at all. I just just have an aesthetic preference for multiply qualified library names. Chalk it up to the fact that my partner's a librarian, so I'm used to putting things in categories, subcategories, and sub-sub-categories :-) -- Jeff On Thu, Jun 11, 2009 at

[Haskell-cafe] Re: ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Henning Thielemann
On Thu, 11 Jun 2009, Jeff Heard wrote: case in point: Hieroglyph. What's it do? import Hieroglyph. Is there any clue by my function names which ones belong to a library called Hieroglyph? No. However, import Graphics.Rendering.Hieroglyph, and I see a function somewhere in the code called "

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Jeff Heard
nVidia and ATI drivers both support GL 3.0 on Linux, although you're right that open source drivers don't. I for one welcome this package with open arms, since I'm mostly trying to implement a layer over OpenGL anyway with Hieroglyph. This'll help with the next revision of that. As for the packa

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Felipe Lessa
On Thu, Jun 11, 2009 at 07:55:23PM +0200, Krzysztof Skrzętnicki wrote: > On my machine I get: > > $ glxinfo | grep -i version > server glx version string: 1.4 > client glx version string: 1.4 > GLX version: 1.3 > OpenGL version string: 3.0.0 NVIDIA 180.51 > OpenGL shading language version string: 1

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Krzysztof Skrzętnicki
On Thu, Jun 11, 2009 at 19:37, Felipe Lessa wrote: > On Thu, Jun 11, 2009 at 06:56:01PM +0200, Sven Panne wrote: >> Version 1.0.0.0 covers the OpenGL 3.1 core, all ARB extensions >> and all EXT extensions. > > What about OpenGL 2.1?  As I understand, Linux won't have OpenGL > 3.0 or 3.1 for at leas

[Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGLRaw 1.0.0.0

2009-06-11 Thread Felipe Lessa
On Thu, Jun 11, 2009 at 06:56:01PM +0200, Sven Panne wrote: > Version 1.0.0.0 covers the OpenGL 3.1 core, all ARB extensions > and all EXT extensions. What about OpenGL 2.1? As I understand, Linux won't have OpenGL 3.0 or 3.1 for at least some months, $ glxinfo | grep 'OpenGL version' OpenGL ver

[Haskell-cafe] List comprehensions and impredicative rank-N types

2009-06-11 Thread Vladimir Reshetnikov
Hi, Consider the following definitions: --- {-# LANGUAGE RankNTypes, ImpredicativeTypes #-} foo :: [forall a. [a] -> [a]] foo = [reverse] bar :: [a -> b] -> a -> b bar fs = head fs --

Re: [Haskell-cafe] who's up for a hackathon? (ICFP, late Aug, early Sept)

2009-06-11 Thread Brent Yorgey
On Wed, Jun 10, 2009 at 04:43:57PM +0100, Eric Kow wrote: > Dear Haskellers, > > ICFP 2009 takes place from Monday 31 August to Wednesday 2 September, > with the Haskell Symposium following it on 3 September. > > Would anybody be interested having a Haskell Hackathon during this? My > thinking i

Re: [Haskell-cafe] Building a tree?

2009-06-11 Thread michael rice
Example understood. Thanks. Is there a module for binary trees? Michael --- On Wed, 6/10/09, wren ng thornton wrote: From: wren ng thornton Subject: Re: [Haskell-cafe] Building a tree? To: haskell-cafe@haskell.org Date: Wednesday, June 10, 2009, 8:13 PM michael rice wrote: > Here's a functio

Re: [Haskell-cafe] Logo fun

2009-06-11 Thread Thomas ten Cate
I would like to have a go at it. Could you maybe upload the vector version somewhere? Thanks, Thomas On Thu, Jun 11, 2009 at 13:22, Eugene Kirpichov wrote: > The idea is pretty cool, but at first sight the batteries look like a > graphical glitch. Probably some antialiasing or smoothening is > n

Re: [Haskell-cafe] Software Transactional Memory and LWN

2009-06-11 Thread Neil Brown
Ketil Malde wrote: So the naïve attempt at doing this would be something like: thread = do -- grab "lock 1" t <- readTVar lock when t retry writeTVar lock True -- grab "lock 2" t2 <- readTVar lock2 when t2 retry writeTVar write

Re: [Haskell-cafe] Software Transactional Memory and LWN

2009-06-11 Thread Ketil Malde
Neil Brown writes: > I think there needs to be some differentiation here between the > implementation of STM, and the programmer's use of STM. > The implementation of STM does effectively use locks (from memory, > it's this paper that explains it: Ignoring the paper in the interest of laz...exp

Re: [Haskell-cafe] Logo fun

2009-06-11 Thread Eugene Kirpichov
The idea is pretty cool, but at first sight the batteries look like a graphical glitch. Probably some antialiasing or smoothening is needed.. 2009/6/11 Deniz Dogan : > 2009/6/11 Thomas Davie : >> We had a lot of "fun" deciding Haskell's new logo, and while I don't agree >> with the final result, i

Re: [Haskell-cafe] Logo fun

2009-06-11 Thread Deniz Dogan
2009/6/11 Thomas Davie : > We had a lot of "fun" deciding Haskell's new logo, and while I don't agree > with the final result, it would be nice if we could now start consistently > using it.  With that in mind, I realised that the Haskell Platform's logo is > totally different, and did a quick mock

Re: [Haskell-cafe] Re: a cool paper (.pdf) on Cabal?

2009-06-11 Thread Duncan Coutts
On Thu, 2009-06-11 at 13:57 +0900, Benjamin L.Russell wrote: > On Thu, 11 Jun 2009 13:48:27 +0900, Benjamin L.Russell > wrote: > > >On Wed, 10 Jun 2009 20:22:23 -0500, "Vasili I. Galchin" > > wrote: > > > >>Hello, > >> > >>Before I found a really cool paper on Cabal motivation and architectur

[Haskell-cafe] Logo fun

2009-06-11 Thread Thomas Davie
We had a lot of "fun" deciding Haskell's new logo, and while I don't agree with the final result, it would be nice if we could now start consistently using it. With that in mind, I realised that the Haskell Platform's logo is totally different, and did a quick mock up of a version reflecti

Re: [Haskell-cafe] Software Transactional Memory and LWN

2009-06-11 Thread Neil Brown
Ketil Malde wrote: Hi, Browsing LWN, I ran across this comment: http://lwn.net/Articles/336039/ The author makes a bunch of unsubstantiated claims about STM, namely that all implementations use locking under the hood, and that STM can live- and deadlock. I've seen a lot of similar sentiments

Re: [Haskell-cafe] Debugging misbehaving multi-threaded programs

2009-06-11 Thread Claus Reinke
I've written a multi-threaded Haskell program that I'm trying to debug. Basically what's happening is the program runs for a while, and then at some point one of the threads goes crazy and spins the CPU while allocating memory; this proceeds until the system runs out of available memory. I can't f

Re: [Haskell-cafe] Software Transactional Memory and LWN

2009-06-11 Thread Luke Palmer
On Thu, Jun 11, 2009 at 2:30 AM, Ketil Malde wrote: > > Hi, > > Browsing LWN, I ran across this comment: > > http://lwn.net/Articles/336039/ > > The author makes a bunch of unsubstantiated claims about STM, namely > that all implementations use locking under the hood, and that STM can > live- and

[Haskell-cafe] Software Transactional Memory and LWN

2009-06-11 Thread Ketil Malde
Hi, Browsing LWN, I ran across this comment: http://lwn.net/Articles/336039/ The author makes a bunch of unsubstantiated claims about STM, namely that all implementations use locking under the hood, and that STM can live- and deadlock. I've seen a lot of similar sentiments in other places as w

Re: [Haskell-cafe] Debugging misbehaving multi-threaded programs

2009-06-11 Thread Ketil Malde
Evan Klitzke writes: > [...] Unfortunately, this doesn't seem to work; whenever the > program terminates due to running out of heap space, the generated > .prof file is empty. Unless there's some specific problem with profiling in combination with threading, you can get heap profiling from a cra

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: testrunner-0.9

2009-06-11 Thread Max Bolingbroke
Hi Rodney, The [0], [1] is a demonstration of failing arguments to QuickCheck. Now, generally test-framework is very careful to avoid printing from anything other than the main thread. That being said there is a known problem with the QuickCheck-2 provider that will cause it to print the failing

[Haskell-cafe] ANNOUNCE: Galois is hiring functional programmers

2009-06-11 Thread Don Stewart
Galois is hiring. Bringing together mathematicians, researchers and technologists, Galois, based in Portland, Oregon, was founded in 1999 with the mission to apply functional languages and formal methods to solve real world problems. Today, over 30 members strong, we’re living the vision, designi

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: testrunner-0.9

2009-06-11 Thread minh thu
Hi, Have a look at http://projects.haskell.org/testrunner/using-testrunner.html, specifically the last paragraph. Also, http://batterseapower.github.com/test-framework/ says results are reported in deterministic order... Cheers, Thu 2009/6/11 Rodney Price : > When I run Example.lhs for test-fra

Re: [Haskell-cafe] Lightweight type-level dependent programming in Haskell

2009-06-11 Thread Matt Morrow
I like this one: - data N a where Z :: N () N :: N a -> N (N a) type family Nest n (f ::* -> *)a nest :: N n -> (forall a. a -> f a) -> a -> Nest n f a type instance Nest () f a = f a n