Re: [Haskell-cafe] Re: A few ideas about FRP and arbitrary access in time

2010-03-03 Thread Conal Elliott
> > Even if the implementation is discrete (as all digital hardware), it may be > more natural to treat things such as a temperature sensor, mouse position, > and perhaps even video as functions of continuous time, values that vary > continuously. So behaviors are not a workaround at all, in this s

Re: [Haskell-cafe] vector stream fusion, inlining and compilation time

2010-03-09 Thread Conal Elliott
I think Jake is referring to my vector-space package. He did the work of writing 171 INLINE pragmas, covering lots of methods and standalone function defs. I'm simultaneously grateful for the effort and repelled by the added syntactic noise. Also concerned about the impact of all these directive

Re: [Haskell-cafe] vector stream fusion, inlining and compilation time

2010-03-10 Thread Conal Elliott
Hi Max. Thanks much for passing on this info. Very encouraging news! - Conal On Wed, Mar 10, 2010 at 8:41 AM, Max Bolingbroke wrote: > This is my understanding: > > Old story (GHC 6.12.1 (?) and below): > 1) Function bodies are only optimised if they are not marked INLINE. > The assumption is

Re: [Haskell-cafe] Strange error with type classes + associated types

2010-04-16 Thread Conal Elliott
Hi Brent, I'm sorry to hear that the non-injectivity issue bit you. It's bitten me also at times, leading me to choose associated data types (injective) instead of associated synonyms (potentially non-injective). And sometimes, the data types route is problematic, as the new types aren't instanc

Re: [Haskell-cafe] Strange error with type classes + associated types

2010-04-17 Thread Conal Elliott
d. On Sat, Apr 17, 2010 at 3:46 AM, Roman Leshchinskiy wrote: > On 17/04/2010, at 11:00, Conal Elliott wrote: > > > I'm unsure now, but I think I tried making Basis a data type (not syn) > and ran into the problem I mentioned above. The Basis *synonyms* also have > HasT

Re: [Haskell-cafe] Strange error with type classes + associated types

2010-04-19 Thread Conal Elliott
y a "proper type"? I didn't know what Roman meant either, though I guessed he meant a newtype or data type. > I see you just uploaded a new version of vector-space; what's new in > 0.6.2? > The dependency on the Boolean package now specifies >= 0.0.1. > -Brent &g

Re: [Haskell-cafe] the problem of design by negation

2009-05-21 Thread Conal Elliott
Hi Michael, I'm going to hazard a guess. Please let me know how accurate it is. When asked to justify his design, the lead software architect explains > everything that *wouldn't* work. "We couldn't have a unique key for every > entry because blah blah blah. We couldn't use a garbage collector b

Re: [Haskell-cafe] the problem of design by negation

2009-05-21 Thread Conal Elliott
you take away their certainty, they demand an immediate replacement! These folks will suck the creativity out of a room if they can, because creativity requires curiosity, and curiosity requires willingness not to know. - Conal On Thu, May 21, 2009 at 10:53 PM, Conal Elliott wrote: > Hi Micha

Re: [Haskell-cafe] the problem of design by negation

2009-05-21 Thread Conal Elliott
nding something better than either yes or no to the original request, in that both/all parties' needs can be addressed, not just one. - Conal On Thu, May 21, 2009 at 11:04 PM, Jason Dagit wrote: > On Thu, May 21, 2009 at 10:53 PM, Conal Elliott wrote: > > > > > One thing y

Re: [Haskell-cafe] the problem of design by negation

2009-05-24 Thread Conal Elliott
The main objection I have to the negative process (can't be done) is that is so often bogus. "Proof by lack of imagination". I guess it works for Richard, though not for Michael's architect, because Richard is able to catch his bogus reasoning *and he is willing*** to do so, which requires humili

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-26 Thread Conal Elliott
Hi Tom, I've been working on another code-generating graphics compiler, generating GPU code. As always, I run into the problem of efficient common subexpression elimination. In Pan, Vertigo & Pajama, I used lazy memoization, using stable pointers and weak references, to avoid the worst-case-expo

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Conal Elliott
ormed a mental picture that matches yours. - Conal On Tue, May 26, 2009 at 5:23 PM, wren ng thornton wrote: > Conal Elliott wrote: > >> Hi Tom, >> >> I've been working on another code-generating graphics compiler, generating >> GPU code. As always, I run into

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Conal Elliott
nds to blow up because it is hosted in Haskell. In other words, the tree size blows up, and hosting in pure Haskell doesn't allow us to examine the compact dag. Are we on the same track now? - Conal On Wed, May 27, 2009 at 3:15 AM, Sebastiaan Visser wrote: > On May 27, 2009, at 1:49 A

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Conal Elliott
eseer.ist.psu.edu/peytonjones99stretching.html> *? Lacking a more elegant alternative, that's what I'll probably do again, as in Pan, Vertigo, and Pajama. - Conal On Wed, May 27, 2009 at 3:51 AM, Sittampalam, Ganesh < ganesh.sittampa...@credit-suisse.com> wrote: > Sebastiaan Visser wrote: > &g

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Conal Elliott
Some form of observable sharing is often a > critical capability for allowing so-called deep DSLs to be compiled and > processed. In this paper, we describe and explore uses of an IO function for > reification which allows direct observation of sharing. On Tue, May 26, 2009 at 4:49 PM

Re: [Haskell-cafe] the problem of design by negation

2009-05-27 Thread Conal Elliott
Thanks for bringing in this angle, David. My preference is for honest and humble practice and documentation of negative design. Instead of saying that something "won't work", "can't work", "is impossible" etc (or rephrased via "must", "only", etc), I'd like honest admissions like "I couldn't figu

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,

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Conal Elliott
You can make numeric class instances from arbitrary Applicatives [1]. I imagine a lot of them (e.g. Stream) would want at least some non-strictness. We might provide strict alternatives for sum and product. I wonder what else. [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/applic

[Haskell-cafe] Haskell-based iPhone development

2009-06-17 Thread Conal Elliott
If you are working with Haskell and making iPhone apps, or if you intend to soon, please say so at http://haskell.org/haskellwiki/IPhone. By helping each other out, I hope we can work more productively and have more fun in the process. At this point, I'd like to find out what you'd like to share,

Re: [Haskell-cafe] Tree Semantics and efficiency

2009-06-20 Thread Conal Elliott
Moreover, copying is not even meaningful in a functional setting. A data structure is indistinguishable from a copy of the data structure. In languages that allow mutation of data, one has to carefully copy data to avoid accidental mutation by other computations. Disallow data mutation, and the

[Haskell-cafe] ANN: package Boolean: Generalized booleans

2009-06-29 Thread Conal Elliott
I just uploaded a new package [1] for generalized booleans, which provides type classes with generalizations of boolean values & operations, if-then-else, Eq and Ord. These values & types come up for me with every new deep DSEL, and I think they do for others as well. The design space has some tr

Re: [Haskell-cafe] ANN: package Boolean: Generalized booleans

2009-06-30 Thread Conal Elliott
r fundep choice. For instance, class Bool f r | f -> r where bool :: r -> r -> f -> r false :: f true :: f Do you *really* mean that the boolean type f determines the value type r? Regards, - Conal On Tue, Jun 30, 2009 at 1:34 AM, Sebastiaan Visser wrote: > > On Jun 30

Re: [Haskell-cafe] ANN: package Boolean: Generalized booleans

2009-06-30 Thread Conal Elliott
Does this code compile? I'd expect that instance Bool (Js JsBool) (Js r) where violates the fundep, since it applies for *all* values of r, not just to one. - Conal On Tue, Jun 30, 2009 at 8:53 AM, Sebastiaan Visser wrote: > On Jun 30, 2009, at 5:24 PM, Conal Elliott wrote:

[Haskell-cafe] Read & Show instance generation for GADTs?

2009-07-05 Thread Conal Elliott
Are there any tools for generating Show & Read instances for GADTs? - Conal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Fails during configuration: bash-3.2$ cabal install lhs2tex Resolving dependencies... [1 of 1] Compiling Main ( /tmp/lhs2tex-1.1423397/lhs2tex-1.14/Setup.hs, /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/Main.o ) Linking /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/setup

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
> > Via cabal: > >--constraint='base<4' > > or replace Control.Exception with Control.OldException > > or add 'base < 4' to the depends in the .cabal file. > Thanks, Don. Trying your first suggestion, I get the same result for the first and third method, and a ghc panic on cat_evals for the

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Yo ho! I just installed ghc-6.10.4 over my 6.10.3. Now 'cabal install lhs2tex' works. Phew! On Mon, Jul 27, 2009 at 11:44 AM, Conal Elliott wrote: > Via cabal: >> >>--constraint='base<4' >> >> or replace Control.Exception with Control.Ol

Re: [Haskell-cafe] Fast number parsing with strict bytestrings [Was: Re: Seemingly subtle change causes large performance variation]

2007-06-08 Thread Conal Elliott
Lovely! Perhaps a stylistic shift would encourage writing this sort of elegant, fusion-friendly code. -- Generalized version of "interact". Encapsulates data getter & putter. genInteract :: IO i -> (o -> IO ()) -> ((i -> o) -> IO ()) genInteract get put = \ f -> get >>= put . f The in

Re: [Haskell-cafe] problem implementing an EDSL in Haskell

2007-06-24 Thread Conal Elliott
Hi Daniil, By "embedded" DSL, we usually mean identifying meta-language (Haskell) expressions with object language (DSL) expressions, rather than having an "Exp" data type. Then you just use meta-language variables as object-language variables. The new data types you introduce are then domain-o

Re: [Haskell-cafe] problem implementing an EDSL in Haskell

2007-07-31 Thread Conal Elliott
Hi Daniil, oops -- i just noticed this response from you from weeks ago. i'm guessing your question is all resolved for you by now. if not, please say so. cheers, - Conal On 6/25/07, Daniil Elovkov <[EMAIL PROTECTED]> wrote: > > Hi Conal > > 2007/6/24, Conal El

Re: [Haskell-cafe] creating graphics the functional way

2007-08-07 Thread Conal Elliott
On 8/5/07, Frank Buss <[EMAIL PROTECTED]> wrote: > Nearly anything works without thinking too much about the types, but I > don't like the use of fromInteger in the average and main functions. Is it > possible that the integers are automaticly converted to floats? I recommend using Float or Double

Re: [Haskell-cafe] creating graphics the functional way

2007-08-07 Thread Conal Elliott
I agree with Jon. And hardware acceleration is in tension with the generality of the extreme generality of formulating images as general (computable) functions on space (and hence arbitrary non-linear transformations, etc). *Unless*, you abandon the traditional acceleration of a fixed set of 2D (

Re: [Haskell-cafe] creating graphics the functional way

2007-08-07 Thread Conal Elliott
Hi Frank, Pan has been bit-rotten for a while now. Besides the unfortunate dependency on Visual C++, it used a now long-obsolete GUI library. That's one reason I started working on Pajama (http://conal.net/Pajama). There's no reason not to create modern, cross-platform successors to Pan/Pajama

Re: Re[2]: [Haskell-cafe] Pure functional GUI (was "a regressive view of support for imperativeprogramming in Haskell")

2007-08-10 Thread Conal Elliott
> On 8/8/07, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > Hello Peter, > Wednesday, August 8, 2007, 11:14:37 PM, you wrote: > > [...] So could you please tell me more about the problem with pure > > functional GUIs > seems that such program will have no effects :) Not necessarily. Just design t

[Haskell-cafe] "Cofunctor" as a name

2007-09-08 Thread Conal Elliott
I've heard contravariant functors referred to as "cofunctors", and I've also heard objections to that term. As I'm preparing to release some libraries using contravariant functors, I'd appreciate hearing preferences and/or reasons. For instance, another name would be "Contrafunctor". -- | Contra

Re: [Haskell-cafe] WinAmp plugin?

2007-10-12 Thread Conal Elliott
sounds like great fun to me. i'll contribute some functional graphics expertise. dons & others have learned how to get good performance out of elegant code. does anyone have WinAmp plugin know-how? - Conal On 10/12/07, Andrew Coppin <[EMAIL PROTECTED]> wrote: > > Does anybody here know WinAmp?

Re: [Haskell-cafe] Re: On the verge of ... giving up!

2007-10-14 Thread Conal Elliott
More neatly, we can fully separate IO from computation: h n = interact $ show . sum . map read . take n . reverse . lines Better yet go a small step further and make *composable* combinations of IO & pure computation, as in TV (http://haskell.org/haskellwiki/TV). Cheers, - Conal On 10/14/0

Re: [Haskell-cafe] Why doesn't Hackage link to Haddock documentation anymore?

2007-10-19 Thread Conal Elliott
Will hackage docs use haddock 2.0 any time soon, for libraries that use language extensions not supported by the older haddock? On 10/19/07, Ross Paterson <[EMAIL PROTECTED]> wrote: > > On Fri, Oct 19, 2007 at 11:31:06AM +0200, Johan Tibell wrote: > > Maybe I'm seeing things but from what I rememb

Re: [Haskell-cafe] Why doesn't Hackage link to Haddock documentation anymore?

2007-10-20 Thread Conal Elliott
good news indeed! On 10/20/07, Duncan Coutts <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-10-19 at 09:41 -0700, Conal Elliott wrote: > > Will hackage docs use haddock 2.0 any time soon, for libraries that > > use language extensions not supported by the older haddock? >

Re: [Haskell-cafe] Tetris

2007-11-20 Thread Conal Elliott
Moreover, functional programming makes it easy to have much more state than imperative programming, namely state over *continuous* time. The temporally discrete time imposed by the imperative model is pretty puny in comparison. Continuous (or "resolution-independent") time has the same advantages

Re: [Haskell-cafe] Tetris

2007-11-21 Thread Conal Elliott
I've just started using OpenGL with wxHaskell, which is my favorite of the Haskell GUI toolkits. (I like elegant interfaces.) So far, so good. If anyone else is using that combination, I'd love to hear about it. On Nov 21, 2007 8:04 AM, Peter Verswyvelen <[EMAIL PROTECTED]> wrote: > Well in t

Re: [Haskell-cafe] wxHaskell [was Tetris]

2007-11-21 Thread Conal Elliott
l On Nov 21, 2007 11:40 AM, Andrew Coppin <[EMAIL PROTECTED]> wrote: > Radosław Grzanka wrote: > > 2007/11/21, Conal Elliott <[EMAIL PROTECTED]>: > > > >> I've just started using OpenGL with wxHaskell, which is my favorite of > the > >> Haskell GUI

Re: [Haskell-cafe] Tetris

2007-11-21 Thread Conal Elliott
On Nov 21, 2007 3:49 AM, Laurent Deniau <[EMAIL PROTECTED]> wrote: > Peter Verswyvelen wrote: > > Conal Elliott wrote: > >> Moreover, functional programming makes it easy to have much more state > >> than imperative programming, namely state over *continuous* ti

Re: [Haskell-cafe] Tetris

2007-11-21 Thread Conal Elliott
Hi Peter, > First of all Conal, I find all of your work amazingly cool. Do you have fan list? ;-) :) > Conal Elliott wrote: > > Moreover, functional programming makes it easy to have much more state than imperative programming, namely state over *continuous* time. Th

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-24 Thread Conal Elliott
why care about trailing whitespace? On Nov 16, 2007 8:14 AM, Valery V. Vorotyntsev <[EMAIL PROTECTED]> wrote: > Add the following lines to your ~/.emacs: > > --- BEGIN OF ELISP CODE --- > ;(global-set-key (kbd " s") 'delete-trailing-whitespace) > > (defun delete-trailing-whitespace-if-con

Re: [Haskell-cafe] Looking for smallest power of 2 >= Integer

2007-12-04 Thread Conal Elliott
Whatever the answer is, I expect it's relevant to Data.IntSet, which uses big-endian patricia trees. - Conal On Dec 3, 2007 8:36 PM, Dan Piponi <[EMAIL PROTECTED] > wrote: > Is there anything in any of the interfaces to Integer that will allow > me to quickly find the highest bit set in an Integ

Re: [Haskell-cafe] Re: [Haskell] IVar

2007-12-04 Thread Conal Elliott
> main = do > --irrelevant x <- newIVar > let y = last [1..] > print "test" --was irrelevant writeIVar x 3 > print y Exactly. The termination concern doesn't seem to have to do with readIVar. On Dec 4, 2007 11:56 AM, Isaac Dupree <[EMAIL PROTECTED]> wrote: > > >> A pure readI

Re: [Haskell-cafe] IO is a bad example for Monads [was: do]

2007-12-09 Thread Conal Elliott
> IO is important because you can't write any real program without using it. Ouch! I get awfully discouraged when I read statements like this one. The more people who believe it, the more true it becomes. If you want to do functional programming, instead of imperative programming in a functiona

[Haskell-cafe] Re: [Haskell] IVars

2007-12-09 Thread Conal Elliott
t; return x :: IO String > > readIVar should only return the 'reference'(internal pointer) to the read > object without evaluating it. in other words: > readIVar should wait to receive but not look into the received "box"; it > may contain a nasty undead w

[Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Conal Elliott
V (a) is currently less flexible than imperative/IO programming, and (b) has the composability, guaranteed safety, and amenability to reasoning of pure functional programming. Cheers, - Conal Am Sonntag, 9. Dezember 2007 18:31 schrieb Conal Elliott: > > > IO is important because you can&#

Re: [Haskell-cafe] Re: [Haskell] IVars

2007-12-09 Thread Conal Elliott
Thanks, Luke. I'd been unconsciously assuming that the IVar would get written to (if ever) by a thread other than the one doing the reading. (Even then, there could be a deadlock.) - Conal On Dec 9, 2007 9:37 AM, Luke Palmer <[EMAIL PROTECTED]> wrote: > On Dec 9, 2007 5:09 PM,

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Conal Elliott
erely hope someone will, but the only way we have right now is the > ugly IO monad. > > -- Lennart > > On Dec 9, 2007 7:26 PM, Conal Elliott <[EMAIL PROTECTED]> wrote: > > > On Dec 9, 2007 10:07 AM, Daniel Fischer <[EMAIL PROTECTED]> > > wrote: > > &

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Conal Elliott
rds, - Conal On Dec 9, 2007 12:54 PM, Daniel Fischer <[EMAIL PROTECTED]> wrote: > Am Sonntag, 9. Dezember 2007 21:29 schrieb Conal Elliott: > > I think your real point is that some things we still haven't figured out > > how to express functionally. Right? > > Tha

Re: [Haskell-cafe] IO is a bad example for Monads [was: do]

2007-12-09 Thread Conal Elliott
f the things that are easy in other > languages. > > It's also important to teach people to stay away from IO whenever > possible, but it's simply not always possible. > > -- Lennart > > > On Dec 9, 2007 5:31 PM, Conal Elliott <[EMAIL PROTECTED]> wrote: >

Re: [Haskell-cafe] IO is a bad example for Monads [was: do]

2007-12-09 Thread Conal Elliott
, was included in Haskell > because I insisted on it.) > It's just from my experience. No matter how pure your program is, here > and there it will be interacting with the rest of the world. > > -- Lennart > > > On Dec 9, 2007 10:16 PM, Conal Elliott <[EMAIL P

Re: [Haskell-cafe] Re: [Haskell] IVars

2007-12-09 Thread Conal Elliott
inistic in the IO monad. Doing so comes at a terrible price > though, because you can no longer reason about your program. > > -- Lennart > > > On Dec 9, 2007 7:48 PM, Conal Elliott <[EMAIL PROTECTED]> wrote: > > > Thanks, Luke. I'd been unconsciously as

Re: [Haskell-cafe] Re: [Haskell] IVars

2007-12-09 Thread Conal Elliott
Thanks. I don't know for what uses of IVars the difference in expressiveness is helpful, but now I get that the difference is there. Cheers, - Conal On Dec 9, 2007 2:08 PM, Benja Fallenstein <[EMAIL PROTECTED]> wrote: > Hi Conal, > > On Dec 9, 2007 6:09 PM, Conal Ellio

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-11 Thread Conal Elliott
> This is at odds with the notion, popular on this list and other haskell forums, that pure functional programming is the future. Perhaps a nit-pick, but I don't think we're talking about *pure* functional programming. I think we're talking about a mixture of functional and imperative programming

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-11 Thread Conal Elliott
> I'm not sure there are many of us left pursuing that vision. P.S. I'd love to learn otherwise. On Dec 11, 2007 10:02 AM, Conal Elliott <[EMAIL PROTECTED]> wrote: > > > This is at odds with the notion, popular on this list and other haskell > forums, that pur

Re: [Haskell-cafe] IO is a bad example for Monads

2007-12-11 Thread Conal Elliott
It may be helpful to distinguish teaching/preaching (a) programming in Haskell from (b) *functional* programming (in Haskell or otherwise). Each focus is present in the conversation. Perhaps IO helps the former and hinders the latter.- Conal ___ Has

Re: [Haskell-cafe] Software Tools in Haskell

2007-12-12 Thread Conal Elliott
Here's a version with cleaner separation between pure & IO: main = interact $ show . length . words - Conal On Dec 12, 2007 11:12 AM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > Hi > > Having got to the word counting example on the website: > > wordcount :: IO () > wordcount = do >

Re: [Haskell-cafe] GUI

2007-12-12 Thread Conal Elliott
I prefer the elegant high-level style of wxhaskell over the current state of gtk2hs. duncan has said he's interested in making a gtk2hs more elegant, and daan has said he'll start supporting wxhaskell again. i don't know which will happen first. - Conal On Dec 12, 2007 11:47 AM, Neil Mitchell <

Re: [Haskell-cafe] Re: Software Tools in Haskell

2007-12-12 Thread Conal Elliott
Since there are many useful per-line functions, do a little refactoring, placing the following into a library: perLine :: (String -> String) -> (String -> String) perLine f = unlines . map f . lines On Dec 12, 2007 12:43 PM, apfelmus <[EMAIL PROTECTED]> wrote: > Tommy M McGuire wrote: > > (

Re: [Haskell-cafe] Comments on reading two ints off Bytestring

2007-12-24 Thread Conal Elliott
To clean up even more, use StateT B.ByteString Maybe. Then the ByteString threading will be invisible, leading to just "liftM2 (,) readI readI", for suitably defined readI. On Dec 23, 2007 6:45 AM, Bryan O'Sullivan <[EMAIL PROTECTED]> wrote: > Paulo J. Matos wrote: > > > I guess the latter is th

Re: [Haskell-cafe] All equations must have the same arity - why?

2008-01-13 Thread Conal Elliott
That eta-expansion desugaring would lose sharing. Offhand, I don't know of a desugaring that would do the trick and preserve sharing. Any ideas? - Conal On Jan 13, 2008 3:12 PM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > Hi, > > It's nice to write functions in point free style: > > f = sort .

Re: [Haskell-cafe] Haskell and GUI

2008-01-15 Thread Conal Elliott
If you can get wxHaskell installed & working, you could try Phooey and/or TV. Both are described on the Haskell wiki and available via darcs and Hackage. On Jan 14, 2008 2:09 PM, Torsten Otto <[EMAIL PROTECTED]> wrote: > Seeing my woes with FranTk - what else is out there that people use if > a

Re: [Haskell-cafe] First go at reactive programming

2008-01-15 Thread Conal Elliott
Hi Levi, Delightful! I'd been hoping for a networking-related use of Reactive. I made a few tweaks to clean up the code: * Factored the fmap out of handleConnection, handleToRequest, runRequestHandler r, and responseSend, to simplify their interfaces/semantics (no more events). * Used (second.f

Re: [Haskell-cafe] First go at reactive programming

2008-01-18 Thread Conal Elliott
Hi Steve, Thanks for letting me know about the LANGUAGE problem. Yes, I used 6.8-friendly (6.6-unfriendly) LANGUAGE pragmas. In retrospect, probably not such a great idea, since there seem to be many folks still on 6.6. I just changed the sources (commenting out the LANGUAGE pragmas and inserti

Re: [Haskell-cafe] First go at reactive programming

2008-01-19 Thread Conal Elliott
orever' > > Forever is in the latest library, but not in my GHC 6.6. I am not sure > how to get this fixed. Any suggestion? > > > http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html > > > Steve > > > On Jan 19, 2008 1:31 AM, Cona

Re: [Haskell-cafe] Draft chapters of "Real World Haskell" now publicly available

2008-01-24 Thread Conal Elliott
Afaik, you're right about Yampa not being event-driven. I've been working on alternatives for a while that are event-driven while still genuinely functional (non-IO). See http://haskell.org/haskellwiki/Reactive and http://haskell.org/haskellwiki/TV . I have some blog posts in the works about the

Re: [Haskell-cafe] Re: Why functional programming matters

2008-01-24 Thread Conal Elliott
On Jan 24, 2008 1:45 AM, Peter Hercek <[EMAIL PROTECTED]> wrote: > [...] > On the other side there are downsides like what to do instead of > reactive GUIs? GUI is a big part for a lot of applications. [...] GUIs can be expressed in a *much* more direct and modular way in functional programming

[Haskell-cafe] haddock as a markdown preprocessor

2008-02-20 Thread Conal Elliott
There was a chat today on #haskell (15:08 to 16:10) about evolving haddock. I'd like to get comments. The goal is to get the full functionality of a general purpose, programmer-friendly markup language like markdown. One example is image embedding.

Re: [Haskell-cafe] haddock as a markdown preprocessor

2008-02-21 Thread Conal Elliott
I guess there was some confusion about the haddock-as-preprocessor idea. Here's another try: Pare the Haddock markup language down to very few markup directives, say just 'foo' and "Foo.Bar". (Of course, Haddock continues to read and process type signatures and module import & export specs.) Com

Re: [Haskell-cafe] haddock as a markdown preprocessor

2008-02-21 Thread Conal Elliott
On Thu, Feb 21, 2008 at 5:37 PM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > So the advantage of passing the rest through uninterpreted is that > markdown then interprets it and we get lots of cool markup for free, the > disadvantage is that we get lots more markup that I don't > understand! :-) T

Re: [Haskell-cafe] haddock as a markdown preprocessor

2008-02-22 Thread Conal Elliott
he process. As for producing machine-readable API metadata, I hadn't been thinking along those lines, and I enthusiastically agree with you. Further factor haddock into a metadata extractor and a documentation generator. Cheers, - Conal On Fri, Feb 22, 2008 at 3:25 AM, Yitzchak Gale <[EMA

Re: [Haskell-cafe] haddock as a markdown preprocessor

2008-02-22 Thread Conal Elliott
On Fri, Feb 22, 2008 at 10:57 AM, Reinier Lamers <[EMAIL PROTECTED]> wrote: > [...] > Of course, the source code includes comments that specify what > functions do, and so provide a bit of API documentation. But such > comments should contain as little formatting as possible to keep them > readabl

Re: [Haskell-cafe] Re: philosophy of Haskell

2010-08-13 Thread Conal Elliott
> > There are various models. One (the state monad model) of them would > desugar this to: > > \world0 -> > let (x, world1) = getLine world0 > world2 = print (x+1) world1 > world3 = print (x+2) world2 > in world3 > Hi Ertugrul, This state monad model does not really work for IO, sin

Re: [Haskell-cafe] Re: philosophy of Haskell

2010-08-13 Thread Conal Elliott
On Sat, Aug 14, 2010 at 9:27 AM, Ertugrul Soeylemez wrote: > Conal Elliott wrote: > > > > There are various models. One (the state monad model) of them would > > > desugar this to: > > > > > > \world0 -> > > > let (x, world1) =

Re: [Haskell-cafe] Re: philosophy of Haskell

2010-08-15 Thread Conal Elliott
On Sat, Aug 14, 2010 at 10:11 PM, Bill Atkins wrote: > On Saturday Aug 14, 2010, at 12:50 AM, Conal Elliott wrote: > > > And the IO monad is what Jerzy asked about. I'm pointing out that the > state monad does not capture concurrency, and the "EDSL model" does n

[Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-22 Thread Conal Elliott
ut perhaps I'm covering old ground. > - Conal -- Forwarded message -- From: Conal Elliott Date: Sun, Aug 22, 2010 at 11:02 PM Subject: Re: Semantics of iteratees, enumerators, enumeratees? To: John Lato Hi John, I just remembered: Luke Palmer wrote an accessible &am

Re: [Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-23 Thread Conal Elliott
- Conal On Mon, Aug 23, 2010 at 4:06 PM, Heinrich Apfelmus < apfel...@quantentunnel.de> wrote: > Conal Elliott wrote: > >> For anyone interested in iteratees (etc) and not yet on the iteratees >> mailing list. >> >> I'm asking about what iteratees *mean* (d

Re: [Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-23 Thread Conal Elliott
eak here, i.e., many ways to write down enumerators that type-check but are not meaningful within the model. Can this leak be fixed? Comments? - Conal On Mon, Aug 23, 2010 at 8:13 PM, Luke Palmer wrote: > On Mon, Aug 23, 2010 at 1:06 AM, Heinrich Apfelmus > wrote: > > Conal Ell

Re: [Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-23 Thread Conal Elliott
gt; > I'm not a semanticist, so I apologize right now if I say something > >> > stupid or > >> > incorrect. > >> > > >> > On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott > wrote: > >> >>> > >> >>> So perhaps

Re: [Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread Conal Elliott
all, only single elements. This discussion has prompted me to consider > the implications of such an implementation, as it would be much simpler. I > have one idea that I think will at least maintain performance for many > operations, although there will be performance hits too. If the dr

[Haskell-cafe] Haddock comments for GADT constructors?

2010-09-10 Thread Conal Elliott
I'm updating a library (TV) and getting haddock parse errors for the doc strings attached to GADT constructors. Is there a way to haddock-document GADT constructors? I've tried both "-- | ..." before and "-- ^ ... " after. Both give parse errors. Thanks, - Conal ___

Re: [Haskell-cafe] Haddock comments for GADT constructors?

2010-09-10 Thread Conal Elliott
Thanks David. Glad to know. I'll kludge around the missing feature for now. I've added myself to the CC list for the ticket. Regards, - Conal On Fri, Sep 10, 2010 at 10:47 AM, David Waern wrote: > 2010/9/10 Conal Elliott : > > I'm updating a library (TV) and gett

Re: [Haskell-cafe] Memoization/call-by-need

2010-09-15 Thread Conal Elliott
Hi Alex, In Haskell, data structures cache, while functions do not. "Memoization" is conversion of functions into data structures (and then trivially re-wrapping as functions) so as to exploit the caching property of data structures to get caching functions. - Conal On Wed, Sep 15, 2010 at 11

Re: [Haskell-cafe] Re: I still cannot seem to get a GUI working under Windows.

2010-10-02 Thread Conal Elliott
For another model of GUIs, see Tangible Values ( http://www.haskell.org/haskellwiki/TV), which is composable MVC. And amen to targeting GPUs. In addition to getting clunky, imperative GUI frameworks like wx & gtk working robustly and easily in Haskell across platforms, I'd love to see more powerf

Re: [Haskell-cafe] Lambda-case / lambda-if

2010-10-03 Thread Conal Elliott
I like it! Are the other sections available as well, e.g., (if False then else "Cafe") "Haskell" --> "Cafe" - Conal On Sat, Oct 2, 2010 at 11:23 AM, Max Bolingbroke wrote: > Hi Cafe, > > I implemented the proposed Haskell' feature lambda-case/lambda-if [1] > during the Haskell Implementor

Re: [Haskell-cafe] vector-space and standard API for vectors

2010-11-02 Thread Conal Elliott
On 10/22/10 8:46 AM, Alexey Khudyakov wrote: > >> Hello everyone! > >> > >> It's well known that Num & Co type classes are not adequate for vectors > >> (I don't mean arrays). I have an idea how to address this problem. > >> > >> Co

[Haskell-cafe] mailing list choices?

2008-09-08 Thread Conal Elliott
I want to set up some kind of mailing list for reactive (which I plan to release soon). The most obvious thing is to set up a mailman-based list on haskell.org, but I wonder -- do people really want to keep using mailman technology? Or something more modern like Yahoo or Google groups. I use my

Re: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Conal Elliott
gmane is indeed a nifty complement to mailman, making mailman more appealing to me. I especially like the variety of interfaces. Thanks, Alexey. - Conal On Mon, Sep 8, 2008 at 12:42 PM, Alexey Beshenov <[EMAIL PROTECTED]> wrote: > On Monday 08 September 2008 14:33:47 Conal Elliott wro

Re: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Conal Elliott
In what ways? 2008/9/8 Sittampalam, Ganesh <[EMAIL PROTECTED]> > I would call Yahoo and Google groups a major step backwards from mailman. > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] packages and QuickCheck

2008-09-09 Thread Conal Elliott
How do folks like to package up QuickCheck tests for their libraries? In the main library? As a separate repo & package? Same repo & separate package? Keeping tests with the tested code allows testing of non-exported functionality, but can add quite a lot of clutter. My current leaning is to s

Re: [Haskell-cafe] packages and QuickCheck

2008-09-09 Thread Conal Elliott
Thanks, Sean. On Tue, Sep 9, 2008 at 3:46 PM, Sean Leather <[EMAIL PROTECTED]> wrote: > > How do folks like to package up QuickCheck tests for their libraries? In >> the main library? As a separate repo & package? Same repo & separate >> package? Keeping tests with the tested code allows test

Re: [Haskell-cafe] packages and QuickCheck

2008-09-09 Thread Conal Elliott
Hi Sean. Thanks a bunch for these tips. I haven't used the flags feature of cabal before, and i don't seem to be able to get it right. I have: Flag test Description: Enable testing Default: False And I get "Warning: unamb.cabal: Unknown section type: flag ignoring...". If I indent, I i

Re: [Haskell-cafe] packages and QuickCheck

2008-09-10 Thread Conal Elliott
AIL PROTECTED]> wrote: > Am Dienstag, 9. September 2008 16:05 schrieb Conal Elliott: > > […] > > > > > My current leaning is to split a package "foo" into packages "foo" > > > > and "foo-test" > > > > > > What

Re: [Haskell-cafe] mailing list choices?

2008-09-12 Thread Conal Elliott
I think I'll go the route of @haskell.org and gmane. Does anyone have advice about spam protection or other helpful matters? - Conal On Mon, Sep 8, 2008 at 12:42 PM, Alexey Beshenov <[EMAIL PROTECTED]> wrote: > On Monday 08 September 2008 14:33:47 Conal Elliott wrote: > > I

Re: [Haskell-cafe] Semantic Domain, Function, and denotational model.....

2008-09-16 Thread Conal Elliott
Hi Ryan, Thanks very much for these explanations. Clear and right on! Best regards, - Conal P.S. I'll be at ICFP and am looking forward to seeing folks there. 2008/9/16 Ryan Ingram <[EMAIL PROTECTED]> > The key insight is that Behavior a is not necessarily a time function; > it's abstract.

Re: [Haskell-cafe] Semantic Domain, Function, and denotational model.....

2008-09-16 Thread Conal Elliott
gt;: > > I can sort of see what is happening in "time = O (pure (Fun id))". > > But I am not sure I understand this: > > > >time :: Behavior Time > >at time = id > > > > as I understand it "at" is a function that take Behaviour and returns &g

  1   2   3   >