Re[2]: [Haskell-cafe] trees and pointers

2010-07-16 Thread Bulat Ziganshin
Hello Jake, Friday, July 16, 2010, 7:26:22 AM, you wrote: > Excluding DiffArray under certain usage patterns of course, but > DiffArray is slow for unknown reasons besides algorithmic complexity. unknown reason = MVar usage ArrayRef library contains parameterized DiffArray implementation that m

Re: [Haskell-cafe] A question about State Monad and Monad in general

2010-07-16 Thread Claude Heiland-Allen
Hi, On 16/07/10 07:35, C K Kashyap wrote: Haskell without using any standard library stuff? For example, if I wanted an image representation such as this [[(Int,Int.Int)]] - basically a list of lists of 3 tuples (rgb) and wanted to do in place replacement to set the pixel values, how could I

[Haskell-cafe] Re: Finding zipper for custom tree

2010-07-16 Thread Heinrich Apfelmus
Sergey Mironov wrote: Sorry for late answer. Luke, Heinrich - thank you very much for explanations. I feel that I need more reading to get familiar with differentiation of functors and chain rule. Could you suggest some books or papers? For differentiation of data types, there is for example

[Haskell-cafe] Re: Hot-Swap with Haskell

2010-07-16 Thread Andy Stewart
Martin Hilbig writes: > hi, > > if been thinking about an haskell interpreter to, because of erlang's otp. > its syntax is a mess, but > its scalability is win. > > since erlang runs in its vm ("interpreted") is there a need for a real > haskell interpreter, or can > there be a compiled haskell

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Thomas Schilling
What would be the semantics of hot-swapping? For, example, somewhere in memory you have a thunk of expression e. Now the user wants to upgrade e to e'. Would you require all thunks to be modified? A similar problem occurs with stack frames. You'd also have to make sure that e and e' have the s

Re: [Haskell-cafe] A question about State Monad and Monad in general

2010-07-16 Thread C K Kashyap
Hi Claude, Thanks a lot for the example. Btw, is this where you are trying in-place replacement? modifyAtIndex :: (a -> a) -> Nat -> List a -> List a modifyAtIndex f i as = let ias = zip nats as g (Tuple2 j a) = case i `eq` j of False -> a

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Andy Stewart
Thomas Schilling writes: > What would be the semantics of hot-swapping? For, example, somewhere > in memory you have a thunk of expression e. Now the user wants to > upgrade e to e'. Would you require all thunks to be modified? A > similar problem occurs with stack frames. > > You'd also have

Re: [Haskell-cafe] lambda calculus and equational logic

2010-07-16 Thread Patrick Browne
Patrick Browne wrote: > Hi, > In Haskell what roles are played by 1)lambda calculus and 2) equational > logic? Are these roles related? I think this thread is getting a bit too theoretical, so I moved it to http://lambda-the-ultimate.org/node/4014 Thanks for putting the time and effort into your

[Haskell-cafe] Haskell Platform dependency hell

2010-07-16 Thread Kevin Jardine
I have Haskell Platform 2010.1.0.0 installed under Windows and I often find that Haskell breaks if I try upgrading some of the current modules. For example, after using cabal to upgrade to the latest version of Network.CGI, I can no longer compile any code and instead get this message: cabal.ex

Re: [Haskell-cafe] trees and pointers

2010-07-16 Thread Jan-Willem Maessen
2010/7/16 wren ng thornton : > Jake McArthur wrote: >> >> On 07/15/2010 05:33 PM, Victor Gorokhov wrote: From the docs, lookup is O(min(n,W)) >>> >>> Actually worse than O(log n). >> >> Perhaps I am misunderstanding you, but O(min(n,W)) is either better than >> or the same as O(log n), de

Re: [Haskell-cafe] Haskell Platform dependency hell

2010-07-16 Thread Ivan Lazar Miljenovic
Kevin Jardine writes: > I have Haskell Platform 2010.1.0.0 installed under Windows and I often > find that Haskell breaks if I try upgrading some of the current > modules. > > For example, after using cabal to upgrade to the latest version of > Network.CGI, I can no longer compile any code and in

[Haskell-cafe] Hackage survey

2010-07-16 Thread Sylvain Le Gall
Hello dear haskellers, I am working on OASIS-DB, a tool similar to Hackage and would like to have more information on how Haskellers use Hackage. I have setup a small poll (10 questions only) with the help of John Goerzen and Don Stewart. I will be very thankful that you answer this poll: http://

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Bartek Ćwikłowski
Hello Andy, 2010/7/16 Andy Stewart : > There are some problems with re-compile solution: > > 1) You can't save *all* state with some FFI code, such as gtk2hs, you > can't save state of GTK+ widget. You will lost some state after > re-launch new entry. For my 2008 GSOC application I wrote a demo

Re: [Haskell-cafe] Hackage survey

2010-07-16 Thread Ivan Lazar Miljenovic
I'd like to request some clarification of some of the questions: 1. By "all projects", are you including one-use only scripts? How about university assessments (when it isn't Haskell-oriented, just have to write a program to do some simulation or something) and thus it isn't meant to be

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Andy Stewart
Bartek Ćwikłowski writes: > Hello Andy, > > 2010/7/16 Andy Stewart : > >> There are some problems with re-compile solution: >> >> 1) You can't save *all* state with some FFI code, such as gtk2hs, you >> can't save state of GTK+ widget. You will lost some state after >> re-launch new entry. > > Fo

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread austin seipp
Sorry Andy! CC'ing to the rest of -cafe in case anybody notices (I need to stop haskelling so early in the morning...) On Fri, Jul 16, 2010 at 8:59 AM, austin seipp wrote: > You also may like one project I wrote, an IRC bot that used hs-plugins > to do hot code reloading (only works on GHC 6.8.)

Re: [Haskell-cafe] trees and pointers

2010-07-16 Thread wren ng thornton
Jan-Willem Maessen wrote: As you observe, it's really down to constant factors. The reason IntMap (or any digital trie) is so interesting is that it is simple enough that the constant factors are quite good---in particular we don't waste a lot of time figuring out if we're going to need to rearr

[Haskell-cafe] Re: Hackage survey

2010-07-16 Thread Sylvain Le Gall
Hello, On 16-07-2010, Ivan Lazar Miljenovic wrote: > I'd like to request some clarification of some of the questions: > > 1. By "all projects", are you including one-use only scripts? How about >university assessments (when it isn't Haskell-oriented, just have to >write a program to do s

Re: [Haskell-cafe] lists of arbitrary depth

2010-07-16 Thread Shlomi Vaknin
Chaddaï and Richard, Both your reply's helped me alot! It is so much different then imperative programming, and i say it as a good thing. I still have lots to learn, but its just like math, it looks so obvious when you see the solution, but entirely different when you have to face it yourself, ano

Re: [Haskell-cafe] Docs on the current and future constraint solver?

2010-07-16 Thread Corey O'Connor
On Thu, Jul 15, 2010 at 12:57 AM, Simon Peyton-Jones wrote: > Corey > > | On 14 July 2010 18:39, Corey O'Connor wrote: > | > I believe I have run headlong into issue #3064 in ghc > | > (http://hackage.haskell.org/trac/ghc/ticket/3064). All I think I know > | > is this: > | > * this is a performan

Re: [Haskell-cafe] Docs on the current and future constraint solver?

2010-07-16 Thread Corey O'Connor
On Wed, Jul 14, 2010 at 4:42 PM, Thomas Schilling wrote: > This solver is currently being implemented in GHC (there's a branch on > darcs.h.o), but correctness comes first.  It'll probably take a while > until this new solver becomes efficient. Is this the URL of the branch? http://darcs.haskell.

Re: [Haskell-cafe] Hackage survey

2010-07-16 Thread Jason Dagit
On Fri, Jul 16, 2010 at 5:51 AM, Sylvain Le Gall wrote: > Hello dear haskellers, > > I am working on OASIS-DB, a tool similar to Hackage and would like to > have more information on how Haskellers use Hackage. I have setup a > small poll (10 questions only) with the help of John Goerzen and Don >

[Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
Hey all, As you might know, the next major release of the Haskell Platform is coming up next week. We've had the current download site design for a while now: http://haskell.org/platform/ However, I'm thinking it would be nice to have themed release designs. Examples: http://www.gnome.

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Don Stewart
Generally, in Erlang or Haskell, the semantics we use is to keep all the old code in memory, for the case of closures and thunks that point back into that code. You can imagine a fine-grained semantics where as each top level function is no longer referenced, the *code* for that is swapped. I be

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Christopher Done
Hi Don, What's the ETA on getting the site wiki upgraded and to what version will it be? If we're looking at another couple of weeks I'll come up with a new wiki template this weekend to replace the current one. Regarding the Haskell Platform, maybe a summer theme is in order? Sunrise, here's a w

[Haskell-cafe] Deprecated gtk2hs functions

2010-07-16 Thread Alex Rozenshteyn
I recently started playing around with gtk2hs. I noticed that `onClicked`, `afterClicked`, etc. functions have been deprecated, presumably in favor of the `on` and `after` functions in the Glib signals module, but I couldn't find a collection of the appropriate signals to replace the functionality.

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
chrisdone: > Hi Don, > > What's the ETA on getting the site wiki upgraded and to what version > will it be? If we're looking at another couple of weeks I'll come up > with a new wiki template this weekend to replace the current one. For haskell.org? Thomas Schilling and Ian Lynagh are working

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Evan Laforge
On Fri, Jul 16, 2010 at 11:21 AM, Don Stewart wrote: > Generally, in Erlang or Haskell, the semantics we use is to keep > all the old code in memory, for  the case of closures and thunks that > point back into that code. > > You can imagine a fine-grained semantics where as each top level > functi

Re: [Haskell-cafe] Deprecated gtk2hs functions

2010-07-16 Thread Thomas DuBuisson
You mean something like buttonPressEvent [1]? > on button buttonPressEvent You can define signals, the constructor is exposed. [1] http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-Abstract-Widget.html#v%3AexposeEvent On Fri, Jul 16, 2010 at 11:36 AM, Alex Rozenshteyn wrote: > I r

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Christopher Done
On 16 July 2010 20:37, Don Stewart wrote: > chrisdone: >> Regarding the Haskell Platform, maybe a summer theme is in order? >> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc. > >    That's a great idea! :-) Maybe you could work on a theme like this. Probably OTT. http://img

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
chrisdone: > On 16 July 2010 20:37, Don Stewart wrote: > > chrisdone: > >> Regarding the Haskell Platform, maybe a summer theme is in order? > >> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc. > > > >    That's a great idea! :-) > > Maybe you could work on a theme like this

Re: [Haskell-cafe] passing a polymorphic function as a parameter vs using it directly in a function definition

2010-07-16 Thread Pasqualino "Titto" Assini
Thanks you all, now it makes sense. titto On 15 July 2010 17:52, Brent Yorgey wrote: > On Thu, Jul 15, 2010 at 01:20:11PM +0100, Pasqualino Titto Assini wrote: >> Many thanks for the explanation. >> >> But I thought that GHC always derives the most generic type, why does >> it fix my 'a' t

[Haskell-cafe] Re: Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Simon Michael
Wow. I would instantly download anything that page cared to offer. :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Paulo Tanimoto
On Fri, Jul 16, 2010 at 3:00 PM, Christopher Done wrote: > > Maybe you could work on a theme like this. Probably OTT. > > http://imgur.com/NjiVh > > Just an idea. My Inkscape-fu is weak. > That looks great to me! I like blue, but I'd be in favor of a different color, like what you did, because b

Re: [Haskell-cafe] Deprecated gtk2hs functions

2010-07-16 Thread Alex Rozenshteyn
More like buttonActivated [1]. Has it been decided that button-specific events are going to be deprecated in favor of their general widget equivalents, with buttonActivated being an (IMO) awkward title for buttonClicked? [1] http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-Buttons-Butto

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Thomas Schilling
It would be great if the new design were compatible with the new wiki design ( http://lambda-haskell.galois.com/haskellwiki/ ). It doesn't have to be *that* similar, just compatible. On 16 July 2010 19:37, Don Stewart wrote: > chrisdone: >> Hi Don, >> >> What's the ETA on getting the site wiki u

[Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Paul L
Does anybody know why the type families only supports equality test like a ~ b, but not its negation? -- Regards, Paul Liu Yale Haskell Group http://www.haskell.org/yale ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mail

Re: [Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Ryan Ingram
I was wondering this. I was recently able to write some code for negation of type equality, using the encoding "Not p" == "p -> forall a. a" But it doesn't generalize; you need to create a witness of inequality for every pair of types you care about. {-# LANGUAGE RankNTypes, TypeFamillies, Exist

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Don Stewart
chrisdone: > On 16 July 2010 20:37, Don Stewart wrote: > > chrisdone: > >> Regarding the Haskell Platform, maybe a summer theme is in order? > >> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc. > > > >    That's a great idea! :-) > > Maybe you could work on a theme like this

Re: [Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Ivan Lazar Miljenovic
Paul L writes: > Does anybody know why the type families only supports equality test > like a ~ b, but not its negation? At a guess, solely because no-one has implemented such functionality. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___

Re: [Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Steffen Schuldenzucker
On 07/17/2010 01:08 AM, Paul L wrote: > Does anybody know why the type families only supports equality test > like a ~ b, but not its negation? > This has annoyed me, too. However, HList provides something quite similar, namely the TypeEq[1] fundep-ed class which will answer type-equality with a

Re: [Haskell-cafe] Re: Hot-Swap with Haskell

2010-07-16 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/16/10 05:21 , Andy Stewart wrote: > IMO, "haskell interpreter" is perfect solution for samll script job. But > i'm afraid "haskell interpreter" is slow for *large code*, i don't know, > i haven't try this way... Hugs? - -- brandon s. allbery

Re: [Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Paul L
HList certainly provides an alternative. But given the use of UndecidableInstances and OverlappingInstances, I was hoping that type families could come a little cleaner. Or does it not matter? On Fri, Jul 16, 2010 at 8:32 PM, Steffen Schuldenzucker wrote: > On 07/17/2010 01:08 AM, Paul L wrote: >

Re: [Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Gábor Lehel
Does "TypeEq a c HFalse" imply proof of inequality, or unprovability of equality? On Sat, Jul 17, 2010 at 2:32 AM, Steffen Schuldenzucker wrote: > On 07/17/2010 01:08 AM, Paul L wrote: >> Does anybody know why the type families only supports equality test >> like a ~ b, but not its negation? >> >

[Haskell-cafe] is this a bug ?

2010-07-16 Thread gate03
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27631 The comments in the code explain the problem. If ".Lazy" be removed from the code (occurs three times), i.e., the code is changed to strict byte strings, it works as expected. Michael Mounteney. ___ H

Re: [Haskell-cafe] in-equality type constraint?

2010-07-16 Thread Christopher Lane Hinson
On Fri, 16 Jul 2010, Paul L wrote: Does anybody know why the type families only supports equality test like a ~ b, but not its negation? I would suggest that type equality is actually used for type inference, whereas proof of type inequality would have no consequence (that I can think of) for

Re: [Haskell-cafe] Hot-Swap with Haskell

2010-07-16 Thread Edward Kmett
lazycat, You may find the following link useful, as it talks about much the same approach. http://nathanwiegand.com/wp/2010/02/hot-swapping-binaries/ Sadly, any hot-swap mechanism is going to suffer from the potential loss of state where that state is not controlled by your code. When that loss

[Haskell-cafe] unusual behavior from cabal

2010-07-16 Thread Michael Litchard
Not sure what the correct list is for this observation. I was trying to install gitit, and here is what happened. mich...@michael:~/haskell/blog-example$ cabal install gitit Resolving dependencies... cabal: dependencies conflict: happstack-server-0.5.1 requires time ==1.1.4 however time-1.1.4 was

Re: [Haskell-cafe] Re: lambda calculus and equational logic

2010-07-16 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/15/10 23:31 , wren ng thornton wrote: > Issues of inconsistency also show up in reasoning about language-based > security systems where sometimes we may wish to allow inconsistent states > during computation so long as there is a formal guarantee

Re: [Haskell-cafe] is this a bug ?

2010-07-16 Thread gate03
On Sat 17/07/10 04:17 , Alexander Solla a...@2piix.com sent: > Why are you performing unsafe IO actions? They don't play nice > with laziness. OK, fair cop, but without the unsafe IO action, it still misbehaves. http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27650 Michael. __

Re: [Haskell-cafe] is this a bug ?

2010-07-16 Thread Felipe Lessa
You should probably CC the maintainer of the regex package. Cheers, -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] unusual behavior from cabal

2010-07-16 Thread Ivan Lazar Miljenovic
Michael Litchard writes: > Not sure what the correct list is for this observation. > I was trying to install gitit, and here is what happened. > > mich...@michael:~/haskell/blog-example$ cabal install gitit > Resolving dependencies... > cabal: dependencies conflict: happstack-server-0.5.1 require

[Haskell-cafe] ANNOUNCE: smt-lib-0.0.1

2010-07-16 Thread Tom Hawkins
smt-lib [1] is a library for reading and writing SMT-LIB [2] files via Haskell. SMT-LIB is a common language and benchmark suite used by most SMT solvers. Currently the library supports the full SMT-LIB version 2 syntax. However at this time, only command scripts -- not responses -- can be parsed

[Haskell-cafe] ANNOUNCE: feldspar 0.3

2010-07-16 Thread Emil Axelsson
On behalf of the Feldspar team, I'm happy to announce a new release of the embedded language Feldspar and its C code generator: http://hackage.haskell.org/package/feldspar-language http://hackage.haskell.org/package/feldspar-compiler The main changes in 0.3 are: * Signed/unsigned integer

Re: [Haskell-cafe] Design for 2010.2.x series Haskell Platform site

2010-07-16 Thread Johan Tibell
On Fri, Jul 16, 2010 at 10:00 PM, Christopher Done wrote: > On 16 July 2010 20:37, Don Stewart wrote: > > chrisdone: > >> Regarding the Haskell Platform, maybe a summer theme is in order? > >> Sunrise, here's a whole platform upgrade. Get it while it's hot, etc. > > > >That's a great idea! :