Re: [Haskell-cafe] Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Evan Laforge
On Mon, Feb 9, 2009 at 2:57 PM, Jared Updike wrote: > I would like to enumerate a subset of keys in a Map satisfying \ key >>= key1 && key <= key2 but in the expected, reasonable amount of time > (e.g. < O(log(n)) + O(m) for n total keys and m keys in the subset). > (Or key > key1 and/or key < key

Re: [Haskell-cafe] Re: Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Svein Ove Aas
On Mon, Feb 9, 2009 at 8:02 AM, Jared Updike wrote: > It looks like two "Map.split"s will do what I need except for allowing > more exact testing of <= vs. < (since == elements are left out of both > maps...?) > If your key is an instance of Enum, you can use succ/pred to work around that little p

Re: [Haskell-cafe] Re: Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Anish Muttreja
Maybe you want Data.Map.partition (\key -> key >= key1 && key <= key2) map HTH, Anish On Sun, 08 Feb 2009 23:02:37 -0800, Jared Updike wrote: It looks like two "Map.split"s will do what I need except for allowing more exact testing of <= vs. < (since == elements are left out of both maps...?

Re: [Haskell-cafe] Video phone application

2009-02-08 Thread Jamie
About the GUI, since I would like to run this video phone application on set-top box (Linux based) in the future (i.e. do video chatting via on big screen TV using set-top box via HDMI interface) so the interface/GUI would look like "appliance-like" interface rather than standard windowing inte

[Haskell-cafe] Re: Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Jared Updike
It looks like two "Map.split"s will do what I need except for allowing more exact testing of <= vs. < (since == elements are left out of both maps...?) Jared. On 2/8/09, Jared Updike wrote: > I would like to enumerate a subset of keys in a Map satisfying \ key > >= key1 && key <= key2 but in

[Haskell-cafe] Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Jared Updike
I would like to enumerate a subset of keys in a Map satisfying \ key >= key1 && key <= key2 but in the expected, reasonable amount of time (e.g. < O(log(n)) + O(m) for n total keys and m keys in the subset). (Or key > key1 and/or key < key2 or some such combination). Is there an appropriate idiom

[Haskell-cafe] Video phone application

2009-02-08 Thread Jamie
Hello! I like to create H.323 (primarly) & SIP based video phone application that will run on Linux, Windows & Mac platforms and of course, written in Haskell. (Writing similar application in Haskell is not "reinventing the wheel" :) I did look/try various current H.323/SIP based video phon

Re: [Haskell-cafe] GHC 6.11 missing time package?

2009-02-08 Thread Lyle Kopnicky
OK, I was able to get it to build. I just had to install MinGW and put its bin directory in my path. Thanks for the help! (Actually, I ended up building time-1.1.2.3 for 6.10.1.20090110.) On Sun, Feb 1, 2009 at 2:38 AM, Krzysztof Skrzętnicki wrote: > It looks that you need MSYS or Cygwin to compl

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Don Stewart
> >> Furthermore, since I assume we'll only be presenting reasonable logos, > >> there's not even some room for pranksters to stage a "write-in" of some > >> gag slogan. > > > > Right, only a subset of previously submitted ones. > > > > -- Don > > So does this mean no 'haskell YEEHH!'? Is

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Gwern Branwen
On Sun, Feb 8, 2009 at 7:44 PM, Don Stewart wrote: > s.clover: >> IP based limitations are a terrible idea. Multiple users can be and >> often are behind the same IP if they're in some sort of intranet, be it >> corporate, academic, or simply multiple home computers. Mail-based >> authentication c

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Don Stewart
s.clover: > IP based limitations are a terrible idea. Multiple users can be and > often are behind the same IP if they're in some sort of intranet, be it > corporate, academic, or simply multiple home computers. Mail-based > authentication can be screwed with, sure, but it's also very easy to

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Sterling Clover
IP based limitations are a terrible idea. Multiple users can be and often are behind the same IP if they're in some sort of intranet, be it corporate, academic, or simply multiple home computers. Mail-based authentication can be screwed with, sure, but it's also very easy to notice this (as

Re: [Haskell-cafe] Monad explanation

2009-02-08 Thread Richard O'Keefe
On 6 Feb 2009, at 5:08 am, Gregg Reynolds wrote: Not "programs", but "programs that do IO". The point of the idiom is that there's an external side effect involved. What sticks in my craw is that "a mathematical value with a non-mathematical side effect" is, well, non-mathematical and pos

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-08 Thread Duncan Coutts
On Sun, 2009-02-08 at 19:18 +0100, Andrea Vezzosi wrote: > I did work on this and i simplified the code a lot fixing > inconsistencies and making more explicit what how each component > contributes to the arguments to haddock. Much appreciated. > Aside from this, should we also do the unliting an

Re: [Haskell-cafe] evaluation semantics of bind

2009-02-08 Thread Richard O'Keefe
On 6 Feb 2009, at 4:20 am, Gregg Reynolds wrote: However, consider: getChar >>= \x -> getChar An optimizer can see that the result of the first getChar is discarded and replace the entire expression with one getChar without changing the formal semantics. But the result of the first

[Haskell-cafe] Re: ANNOUNCE: X Haskell Bindings 0.1

2009-02-08 Thread Antoine Latter
On Sun, Feb 8, 2009 at 2:46 PM, Antoine Latter wrote: > I'd like to announce a version bump for the X Haskell Bindings (XHB) > library, to 0.1.* from 0.0.*. > > The goal of XHB is to provide a Haskell implementation of the X11 wire > protocol, similar in spirit to the X protocol C-language Binding

Re: [Haskell-cafe] ANNOUNCE: X Haskell Bindings 0.1

2009-02-08 Thread Don Stewart
aslatter: > I'd like to announce a version bump for the X Haskell Bindings (XHB) > library, to 0.1.* from 0.0.*. > > The goal of XHB is to provide a Haskell implementation of the X11 wire > protocol, similar in spirit to the X protocol C-language Binding > (XCB). > > On Hackage: http://hackage.ha

[Haskell-cafe] ANNOUNCE: X Haskell Bindings 0.1

2009-02-08 Thread Antoine Latter
I'd like to announce a version bump for the X Haskell Bindings (XHB) library, to 0.1.* from 0.0.*. The goal of XHB is to provide a Haskell implementation of the X11 wire protocol, similar in spirit to the X protocol C-language Binding (XCB). On Hackage: http://hackage.haskell.org/cgi-bin/hackage-

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-08 Thread Andrea Vezzosi
I did work on this and i simplified the code a lot fixing inconsistencies and making more explicit what how each component contributes to the arguments to haddock. Aside from this, should we also do the unliting and cpp from Cabal on the sources passed to HsColour? On Fri, Feb 6, 2009 at 11:27 PM,

Re: [Haskell-cafe] how to link statically with a c lib ?

2009-02-08 Thread minh thu
2009/2/8 Don Stewart : > noteed: >> 2009/2/8 Don Stewart : >> > noteed: >> >> Hi, >> >> >> >> I'm writing bindings for the Tiny C Compiler. >> >> It seems that tcc provide a libtcc.a but no libtcc.so. >> >> >> >> In my cabal file, I have >> >> >> >> extra-libraries: dl, tcc >> >> >> >> but wh

Re: [Haskell-cafe] how to link statically with a c lib ?

2009-02-08 Thread Don Stewart
noteed: > 2009/2/8 Don Stewart : > > noteed: > >> Hi, > >> > >> I'm writing bindings for the Tiny C Compiler. > >> It seems that tcc provide a libtcc.a but no libtcc.so. > >> > >> In my cabal file, I have > >> > >> extra-libraries: dl, tcc > >> > >> but when using the generated haskell module

Re: [Haskell-cafe] how to link statically with a c lib ?

2009-02-08 Thread minh thu
2009/2/8 Don Stewart : > noteed: >> Hi, >> >> I'm writing bindings for the Tiny C Compiler. >> It seems that tcc provide a libtcc.a but no libtcc.so. >> >> In my cabal file, I have >> >> extra-libraries: dl, tcc >> >> but when using the generated haskell module, >> I have the following messag

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Gwern Branwen
On Sun, Feb 8, 2009 at 12:03 PM, Max Rabkin wrote: > On Sun, Feb 8, 2009 at 8:57 AM, Gwern Branwen wrote: >> We should limit voting, and limit based on IP. If we go via email, >> then anyone wishing extra votes merely needs to use mailinator.com >> (and its dozens of alternate domain names, to sa

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Max Rabkin
On Sun, Feb 8, 2009 at 8:57 AM, Gwern Branwen wrote: > We should limit voting, and limit based on IP. If we go via email, > then anyone wishing extra votes merely needs to use mailinator.com > (and its dozens of alternate domain names, to say nothing of > competitors providing similar services) to

Re: [Haskell-cafe] The Haskell re-branding exercise

2009-02-08 Thread Gwern Branwen
On Sat, Feb 7, 2009 at 4:40 PM, Don Stewart wrote: > bulat.ziganshin: >> Hello Don, >> >> Saturday, February 7, 2009, 8:20:23 PM, you wrote: >> >> > We need a voting site set up. There was some progress prior to the end >> > of the year. Updates welcome! >> >> i think that there are a lot of free

Re: [Haskell-cafe] how to link statically with a c lib ?

2009-02-08 Thread Don Stewart
noteed: > Hi, > > I'm writing bindings for the Tiny C Compiler. > It seems that tcc provide a libtcc.a but no libtcc.so. > > In my cabal file, I have > > extra-libraries: dl, tcc > > but when using the generated haskell module, > I have the following message : > > ⟨...@jones samples⟩ g

Re: [Haskell-cafe] any implementation of ACIO?

2009-02-08 Thread Don Stewart
jianzhou: > Hi, > > http://www.haskell.org/pipermail/haskell-cafe/2004-November/007715.html > mentioned an interesting (A)ffine and (C)entral IO. Are there any packages > or extensions to support ACIO in Haskell? Not that I know of. -- Don ___ Haskel

Re: [Haskell-cafe] [ANN] Working with HLint from Emacs

2009-02-08 Thread Alex Ott
Hello On Wed, Jan 28, 2009 at 12:30 PM, Colin Paul Adams wrote: >> "Alex" == Alex Ott writes: > >Alex> Hello For Emacs users it could be interesting - I wrote >Alex> small module for more comfortable work with HLint from >Alex> Emacs. It has same functionality as compilation-mode

Re: [Haskell-cafe] Just how unsafe is unsafe

2009-02-08 Thread Yitzchak Gale
Peter Verswyvelen wrote: >>> I do have asked myself the question whether >>> a "really random generating" >>> function could be regarded as "pure" somehow I wrote: >> Not really... Alberto G. Corona wrote: > What is pure randomness? .When the algorithmic complexity of the list of > random number

[Haskell-cafe] any implementation of ACIO?

2009-02-08 Thread Jianzhou Zhao
Hi, http://www.haskell.org/pipermail/haskell-cafe/2004-November/007715.html mentioned an interesting (A)ffine and (C)entral IO. Are there any packages or extensions to support ACIO in Haskell? Thanks JZ___ Haskell-Cafe mailing list Haskell-Cafe@haskell

[Haskell-cafe] how to link statically with a c lib ?

2009-02-08 Thread minh thu
Hi, I'm writing bindings for the Tiny C Compiler. It seems that tcc provide a libtcc.a but no libtcc.so. In my cabal file, I have extra-libraries: dl, tcc but when using the generated haskell module, I have the following message : ⟨...@jones samples⟩ ghc -e "main" Test.hs : : can't l