Re: [Haskell-cafe] ordNub

2013-07-15 Thread Clark Gaebel
Apologies. I was being lazy. Here's a stable version: import qualified Data.HashSet as S hashNub :: (Ord a) = [a] - [a] hashNub l = go S.empty l where go _ [] = [] go s (x:xs) = if x `S.member` s then go s xs else x : go (S.insert x

[Haskell-cafe] What have happened to haskell.org?

2013-07-15 Thread Kirill Zaborsky
On URL http://haskell.org/ I get starting Apache page and 404 on http://haskell.org/hoogle/ URL with starting www - http://www.haskell.org/ seems to be working but http://www.haskell.org/hoogle/ responds with some ELF file. Kind regards, Kirill Zaborsky

[Haskell-cafe] Compiling haskell-platform-2013.2.0.0 fails

2013-07-15 Thread Roger Mason
Hello, I'm attempting to compile haskell-platform on an Arch Linux system. It fails very soon after invoking 'make': Configuring HUnit-1.2.5.2... Setup: Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible with Cabal. Use the flag --package-db to specify a package database (it

Re: [Haskell-cafe] What have happened to haskell.org?

2013-07-15 Thread Tom Ellis
On Mon, Jul 15, 2013 at 07:19:12AM -0700, Kirill Zaborsky wrote: http://www.haskell.org/hoogle/ responds with some ELF file. After running strings on it, it does seem to be (at least part of) the hoogle binary. ___ Haskell-Cafe mailing list

[Haskell-cafe] Hoogle website not working?

2013-07-15 Thread Ivan Perez
Hi cafe, I'm seeing a binary executable file every time I try to access haskell.org/hoogle. I don't know if the maintainers are aware of this. Cheers. Ivan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] OpenGL extensions survey results

2013-07-15 Thread Brian Lewis
Hi, here are the results of the recent OpenGL extensions survey: https://github.com/bsl/opengl-extensions-survey If I did anything dumb, please send me mail or a pull request. Thanks to everyone who contributed! ___ Haskell-Cafe mailing list

[Haskell-cafe] Hoogle problems?

2013-07-15 Thread Andrew Butterfield
I've just tried using Hoogle, but either get a 404 not found (http://haskell.org/hoogle/) or else I find I get a ELF 64-bit LSB executable being downloaded If I search using Google and click on the first link (shown as www.haskell.org/hoogle/ I get the following (spaces deliberately added to

[Haskell-cafe] Database conectivity in Haskell. HDBC-3 or something.

2013-07-15 Thread Alexey Uimanov
Hello, haskellers. I has made some rework of HDBC, if you are interested follow the link http://s9gf4ult.github.io/hdbc/Database-HDBC.html So, why did I made this ? Because I did not found good enough (inside and outside) common interface for database connectivity. What I mean is flexible and

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Niklas Hambüchen
Hey Jason, would you mind giving a short idea of what the point of Bird's implementation is / from what properties it is derived? Also, running the QuickCheck tests you added, it doesn't give the same output (order) as nub. On 15/07/13 13:26, Jason Dagit wrote: Richard Bird has a book, Pearls

[Haskell-cafe] Workshop on Termination (deadline: July 22)

2013-07-15 Thread Johannes Waldmann
Dear all. Still one week to go: submit your results and questions on all things related to termination and bounded resource consumption (of user programs, of type checkers, etc.) to the Workshop on Termination. We are specifically encouraging contributions from the Haskell (and Agda, and Idris)

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Brandon Allbery
On Sun, Jul 14, 2013 at 7:54 AM, Clark Gaebel cgae...@uwaterloo.ca wrote: Oops sorry I guess my point wasn't clear. Why ord based when hashable is faster? Then there's no reason this has to be in base, it can just be a Did the point about stable fly overhead? -- brandon s allbery kf8nh

Re: [Haskell-cafe] Hoogle problems?

2013-07-15 Thread Richard Evans
Yes, I get the same error as you do. It was working the last time I looked at it, a couple of weeks ago. On Mon, Jul 15, 2013 at 2:35 PM, Andrew Butterfield andrew.butterfi...@scss.tcd.ie wrote: I've just tried using Hoogle, but either get a 404 not found (http://haskell.org/hoogle/) or

Re: [Haskell-cafe] What have happened to haskell.org?

2013-07-15 Thread Daniel F
The web site is migrating. IRC says: Topic for #haskell: haskell.org in the middle of migration; expect turbulence; use www.haskell.org On Mon, Jul 15, 2013 at 6:19 PM, Kirill Zaborsky qri...@gmail.com wrote: On URL http://haskell.org/ I get starting Apache page and 404 on

Re: [Haskell-cafe] Hoogle problems?

2013-07-15 Thread Daniel F
The web site is migrating. IRC says: Topic for #haskell: haskell.org in the middle of migration; expect turbulence; use www.haskell.org On Mon, Jul 15, 2013 at 5:35 PM, Andrew Butterfield andrew.butterfi...@scss.tcd.ie wrote: I've just tried using Hoogle, but either get a 404 not found

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Jason Dagit
On Sun, Jul 14, 2013 at 4:20 AM, Niklas Hambüchen m...@nh2.me wrote: tldr: nub is abnormally slow, we shouldn't use it, but we do. As you might know, Data.List.nub is O(n²). (*) As you might not know, almost *all* practical Haskell projects use it, and that in places where an Ord instance

Re: [Haskell-cafe] Hoogle problems?

2013-07-15 Thread Niklas Hambüchen
OK, but why does it need to go down for migration? On Mon 15 Jul 2013 23:52:02 SGT, Daniel F wrote: The web site is migrating. IRC says: Topic for #haskell: haskell.org in the middle of migration; expect turbulence; use www.haskell.org ___

Re: [Haskell-cafe] Non-recursive let [Was: GHC bug? Let with guards loops]

2013-07-15 Thread J. Stutterheim
The IDE still works for Windows, but it isn't actively developed anymore (though bugs and minor annoyances are still being fixed). For Mac and Linux we now have a command line tool that uses the IDE's codebase. Personally, I just use vim (of course you can use any editor you prefer; vim comes with

[Haskell-cafe] Homotopy Type Theory IRC Channel

2013-07-15 Thread Darin Morrison
Hello, I know there are many haskellers interested in dependent type theory so I wanted to mention that there is now an IRC channel on freenode for discussing Homotopy Type Theory (HoTT), e.g., the recent book, possible implementations, dependent type theory in general, etc. The channel is

[Haskell-cafe] [GSoC] Interactive-diagrams GSoC progress report

2013-07-15 Thread Daniel F
Hello everyone, I am participating in Haskell.org's Google Summer of Code, working on the interactive-diagrams [1] project. The mid-term evaluations are approaching and I am doing some writeup on the work I did so far:

[Haskell-cafe] partially indeterminate?

2013-07-15 Thread Christopher Howard
Hi. For learning, I was doing the phone words problem, where a function translates the digits of a phone number into all possible words. I am trying to connect this idea to the idea of list comprehensions / list monads (sort of the same thing, yes?) I know it is easy to do this: w = do two - ABC

Re: [Haskell-cafe] ordNub

2013-07-15 Thread John Lato
In my tests, using unordered-containers was slightly slower than using Ord, although as the number of repeated elements grows unordered-containers appears to have an advantage. I'm sure the relative costs of comparison vs hashing would affect this also. But both are dramatically better than the

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Ivan Lazar Miljenovic
On 16 July 2013 11:46, John Lato jwl...@gmail.com wrote: In my tests, using unordered-containers was slightly slower than using Ord, although as the number of repeated elements grows unordered-containers appears to have an advantage. I'm sure the relative costs of comparison vs hashing would

Re: [Haskell-cafe] ordNub

2013-07-15 Thread John Lato
On Tue, Jul 16, 2013 at 10:31 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 July 2013 11:46, John Lato jwl...@gmail.com wrote: In my tests, using unordered-containers was slightly slower than using Ord, although as the number of repeated elements grows

Re: [Haskell-cafe] Non-recursive let [Was: GHC bug? Let with guards loops]

2013-07-15 Thread Richard A. O'Keefe
On 15/07/2013, at 8:23 PM, J. Stutterheim wrote: The OS dependency for dynamics stems from the fact that the Clean dynamics are quite a bit more powerful than Haskell's. For example, using dynamics, it is possible to send arbitrary functions to another Clean application, which can then

Re: [Haskell-cafe] partially indeterminate?

2013-07-15 Thread Karl Voelker
I will suggest an analogy to a similar (but simpler) situation. Suppose you are adding up some numbers. foo = let { x = 3; y = 4; z = 5 } in x + y + z That pattern only works if you know in advance how many numbers you are going to add. Otherwise, you need a function that works on a whole list

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Clark Gaebel
I'm procrastinating something else, so I wrote the patch to unordered-containers. Feel free to comment on the github link: https://github.com/tibbe/unordered-containers/pull/67 I'm still against having an Ord version, since my intuition tells me that hash-based data structures are faster than

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Brandon Allbery
On Mon, Jul 15, 2013 at 10:31 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: If I understand correctly, this function is proposed to be added to Data.List which lives in base... but the proposals here are about using either Sets from containers or HashSet from

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Richard A. O'Keefe
On 16/07/2013, at 3:21 PM, Clark Gaebel wrote: I'm still against having an Ord version, since my intuition tells me that hash-based data structures are faster than ordered ones. There are at least four different things that an Ord version might mean: - first sort a list, then eliminate

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Clark Gaebel
nubBy is a very good suggestion. Added! Regarding good hash functions: if your data structure is algebraic, you can derive generic and Hashable will give you a pretty good hash function: data ADT a = C0 Int String | C1 [a] deriving Generic instance Hashable a = Hashable (ADT a) It's

Re: [Haskell-cafe] ordNub

2013-07-15 Thread Conrad Parker
On 16 July 2013 10:31, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 July 2013 11:46, John Lato jwl...@gmail.com wrote: In my tests, using unordered-containers was slightly slower than using Ord, although as the number of repeated elements grows unordered-containers appears to