Re: [Haskell-cafe] Re: capture of idioms and patterns
G'day all. Quoting Johannes Waldmann waldm...@imn.htwk-leipzig.de: you got this backwards: what some folks call idioms and (design) patterns actually *is* FP, because it is just this: higher order functions. And it's been there some decades (lambda calculus). That also explains the absence of any Design Patterns/Gang-of-Four kind of book for Haskell - it's just not needed. Err... no. The phrase design patterns is a shorthand for vocabulary of engineering experience. Zippers, continuation passing style, Church encoding... these are not what FP is, but they are specific techniques that engineers working in Haskell need to know to use the language effectively. You can think of design patterns as techniques that you need to overcome shortcomings in the language. That's why you need special techniques for, say, iterators in C++ or Java where in Haskell that comes more or less for free. But then, you need special techniques for mutable global state in Haskell, where in C++ or Java you get that for free. Or, to put it another way, nothing is ever free. There is no GoF-like book for Haskell because it's not an idea that needs promoting in printed form. We just point people to the wiki. Cheers, Andrew Bromage ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] packaging a cgi binary using cabal
Hi, Am Mittwoch, den 22.09.2010, 15:53 +0100 schrieb Pedro Baltazar Vasconcelos: I wrote a simple interactive tableaux theorem prover as a cgi in Haskell (http://www.ncc.up.pt/~pbv/cgi/tableaux.cgi) and would like to submit to hackage but need some advice on how to package it using cabal. In particular, the binary, CSS and bitmap files need to be installed under the web server directory (public_html or alike) rather than system or user directories. Any thoughts on how to do this? In case of such research programs, where ease of installability is usually more important than performance, I just include the data files into the program. For example, in http://darcs.nomeata.de/sem_syn/ the JQuery library and the file BUtils.hs are turned into Haskell string literals using http://github.com/jgm/hsb2hs This way, the resulting binary is really stand-alone and can be just moved to the appropriate place on the web server. Greetings, Joachim -- Joachim nomeata Breitner mail: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nome...@debian.org signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: alex-meta-0.1.1 and happy-meta-0.1.1
2010/9/22 Jonas Almström Duregård jonas.dureg...@chalmers.se: I'm pleased to announce alex-meta and happy-meta! These libraries provide quasi-quoter frontends and Template Haskell backends to the Alex lexer generator and the Happy parser generator respectively. Awesome! /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: network-2.2.1.8 (GHC 7.0 compatibility release)
Hi all, network-2.2.1.8 is now out. This release makes network compatible with GHC 7.0. There are no API changes. Cheers, Johan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] packaging a cgi binary using cabal
Hi, Am Donnerstag, den 23.09.2010, 11:19 +0100 schrieb Pedro Baltazar Vasconcelos: On Thu, 23 Sep 2010 10:44:17 +0200 Joachim Breitner m...@joachim-breitner.de wrote: In case of such research programs, where ease of installability is usually more important than performance, I just include the data files into the program. For example, in http://darcs.nomeata.de/sem_syn/ the JQuery library and the file BUtils.hs are turned into Haskell string literals using http://github.com/jgm/hsb2hs This way, the resulting binary is really stand-alone and can be just moved to the appropriate place on the web server. OK, thanks for the suggestion. For my needs I think this will be very straightforward to do manually --- the CSS and image files a pretty short anyway. for CSS, this is what I’m doing as well... but for binary image data? Greetings, Joachim -- Joachim nomeata Breitner mail: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nome...@debian.org signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: Utrecht Haskell Compiler (UHC), version 1.1.0
On 22 Sep, 2010, at 22:37 , Jason Dagit wrote: Congrats on the release! On Wed, Sep 22, 2010 at 7:30 AM, Atze Dijkstra a...@cs.uu.nl wrote: * For the default backend libraries are provided until including package haskell98. I'm having trouble parsing/understanding what you mean. Could you please elaborate? The haskell98 package is included + the packages/libraries/modules on which the haskell98 pakage depends. However this currently is only provided for the default (interpreter based) backend. hope this clarifies, cheers, Thanks, Jason - Atze - Atze Dijkstra, Department of Information and Computing Sciences. /|\ Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands. / | \ Tel.: +31-30-2534118/1454 | WWW : http://www.cs.uu.nl/~atze . /--| \ Fax : +31-30-2513971 | Email: a...@cs.uu.nl / |___\ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] packaging a cgi binary using cabal
Well, if you want you might use images inline as well: http://en.wikipedia.org/wiki/Data_URI_scheme#Advantages From my experience, this is supported by all major browser, including IE. Regards, ~dsouza On Thu, Sep 23, 2010 at 9:03 AM, Joachim Breitner m...@joachim-breitner.dewrote: Hi, Am Donnerstag, den 23.09.2010, 11:19 +0100 schrieb Pedro Baltazar Vasconcelos: On Thu, 23 Sep 2010 10:44:17 +0200 Joachim Breitner m...@joachim-breitner.de wrote: In case of such research programs, where ease of installability is usually more important than performance, I just include the data files into the program. For example, in http://darcs.nomeata.de/sem_syn/ the JQuery library and the file BUtils.hs are turned into Haskell string literals using http://github.com/jgm/hsb2hs This way, the resulting binary is really stand-alone and can be just moved to the appropriate place on the web server. OK, thanks for the suggestion. For my needs I think this will be very straightforward to do manually --- the CSS and image files a pretty short anyway. for CSS, this is what I’m doing as well... but for binary image data? Greetings, Joachim -- Joachim nomeata Breitner mail: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nome...@debian.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: [Haskell-beginners] Current status of GUM
On Thu, Sep 23, 2010 at 9:09 AM, Luca Ciciriello luca_cicirie...@hotmail.com wrote: Hi Monica. This one is a good question. I'm based on this site: http://www.macs.hw.ac.uk/~dsg/gph/papers/abstracts/gum.html but it is a quite old site. Of the same year is the article Accidents always come in threes: A case Study of data-intensive programs in parallel Haskell. Here GUM is used. Now I'm using GHC 6.12.3 on a multicore system using +RTS -N4 command for my parallel programs. The performance aren't too bad. Have I to still use GUM? Bye. Luca. Date: Thu, 23 Sep 2010 10:02:17 -0300 From: monicasp...@gmail.com To: beginn...@haskell.org Subject: [Haskell-beginners] Current status of GUM Hello, I would like to know about the current status of GUM: - What is the latest version available? - Does it run on distributed memory multiprocessors - clusters? What type of architectures? thanks. Monica The question may be better answered on the haskell-cafe mailing list, where more folks might know about specific Haskell implementations/extensions/libraries. Antoine ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] packaging a cgi binary using cabal
Hello list, Thanks for all suggestions. If you're interested, I've uploaded a first version of the theorem prover to hackagedb (tableaux-0.1). Best regards, Pedro ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: http-enumerator 0.0.1
Hi all, After I made the 0.0.0 release of http-enumerator, Vincent Hanquez informed me of his wonderful tls package[1]. I've just release version 0.0.1 of the http-enumerator package which will use the tls package by default for establishing SSL connections. If you still want to use the OpenSSL package, just give cabal the build flag openssl, ie: cabal install -fopenssl http-enumerator The only other change to happen in this release is a modification to the chunked encoding parser to allow whitespace after the size of chunks. I think the HTTP spec does not mention that whitespace, but yahoo.com uses it. As before, consider this experimental, please try it and give me feedback. Cheers, Michael [1] http://hackage.haskell.org/package/tls ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] capture of idioms and patterns
On 22/09/2010 09:14 AM, Luc TAESCH wrote: in real life I am doing architecture (appication and system) and I tend to see things differently with my haskell background. when reading what system XYZ does, I see folds, maps, lazy sort, memoisation , monads, etc...ie my mind apply idioms learned at code design level to architecture level It's interesting to hear you say that. I've heard more than one person assert that Haskell will never be popular, because people don't think functionally. Or, more precisely, people don't think recursively. It is asserted as fact that people think imperatively. If you think that sounds silly, ask some random person (not a computer programmer, just some random human) how find the sum of a list of numbers. I can practically guarantee that most humans will reply do X, then do Y, and then do Z. Almost nobody will reply with the sum of an empty list is defined as zero, and the sum of a non-empty list is defined as the addition of the first element and the sum of the remaining elements. To a normal human, that almost sounds like a riddle rather than an explanation. Then again, who said that programmers had to be normal humans, or that programming had to be easy? Nobody seriously expects everyone to be able to dance or play pipe organ, so why should it be trivial for everybody to be able to program computers? (Of course, software giants make more money out of the we make computers EASY! slogan...) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: capture of idioms and patterns
On 22/09/2010 10:20 AM, Johannes Waldmann wrote: - are there any prior art in documenting idioms and patterns in FP [...] you got this backwards: what some folks call idioms and (design) patterns actually *is* FP, because it is just this: higher order functions. And it's been there some decades (lambda calculus). That also explains the absence of any Design Patterns/Gang-of-Four kind of book for Haskell - it's just not needed. (as you say, map and fold are your patterns.) Or rather, in Haskell your design patterns are things like accumulating parameters, difference lists, finally tagless, combinator libraries and the like. Sadly, in Haskell at least, most of these things are a kind of oral tradition which isn't actually written down anywhere. (Which means that basically the only way to learn Haskell is to hang around and ask lots of dumb questions and gradually learn by osmosis...) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: capture of idioms and patterns
On Wed, Sep 22, 2010 at 11:24 PM, a...@spamcop.net wrote: There is no GoF-like book for Haskell because it's not an idea that needs promoting in printed form. We just point people to the wiki. I think a book would/could still be beneficial even with the wiki. There are some learners who benefit more from having a big dead-tree tome to stare at than they do from a web of read-write articles. Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] capture of idioms and patterns
On Thu, Sep 23, 2010 at 1:57 PM, Andrew Coppin andrewcop...@btinternet.com wrote: If you think that sounds silly, ask some random person (not a computer programmer, just some random human) how find the sum of a list of numbers. I can practically guarantee that most humans will reply do X, then do Y, and then do Z. Almost nobody will reply with the sum of an empty list is defined as zero, and the sum of a non-empty list is defined as the addition of the first element and the sum of the remaining elements. To a normal human, that almost sounds like a riddle rather than an explanation. I don't think it's unusual for a random person to give a recursive answer. It's just that a normal human tends to avoid anything that isn't tail recursion. For example, I can easily imagine someone saying to sum a list, add the current element to the running total, and now carry on summing from the next element. I doubt most people would consider that to be a riddle. The problem is that humans don't have deep stacks, so they find it harder to talk in terms of methods that require deep stacks. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: capture of idioms and patterns
On Wed, Sep 22, 2010 at 5:20 AM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: - are there any prior art in documenting idioms and patterns in FP [...] you got this backwards: what some folks call idioms and (design) patterns actually *is* FP, because it is just this: higher order functions. And it's been there some decades (lambda calculus). That also explains the absence of any Design Patterns/Gang-of-Four kind of book for Haskell - it's just not needed. (as you say, map and fold are your patterns.) Best - J.W. Most developers misunderstand the Gang of Four design patterns, including the authors. For example, the GoF State Pattern is described synchronously, but anyone who has thought about this is in deep detail, e.g. actor theory, knows that asynchronous transitions are possible and that the target state can be decoupled from the source state. In mathematics, the most basic way to understand this is through finite state automata, since an automaton is only dependent on its current state and input to determine the next transition. GoF confuses the issue by insistenting on synchronous communication between classes that represent states. GoF has subpar explanations, but please separate the intellectual wheat from the chaff. I have also heard some argue that GoF patterns all have the same structure. This is not true. I've heard confused programmers say that the Proxy pattern and the Decorator pattern look the same. Decorators provide structural support of nesting and Proxies do not, but the key difference between the two is that a Decorator is about adding or removing properties *dynamically*, whereas a Proxy is about accessing existing properties through a known static structure. How does higher order (recursive) functions make such patterns obsolete? Some existing design patterns are applicable regardless of paradigm, and will continuosly get re-invented until people learn better and start to realize how general the patterns are. Example: Deterministic systems are easier to debug than non-deterministic systems, due to the fact non-deterministic systems cannot generalize the Kahn Principle (this is known as the Brock-Ackerman Anomaly). Ergo, one of the best things you can do as a programmer is isolate nondeterminism. Patterns for doing so have been known for decades in the embedded systems community, and go by names such as Processor-Actuator, Watchdog, etc. I've suggested to some interested in FRP research that they'd be wise to look at those patterns, not as competitors but as complementary material to enhance every student's ability to inhale the FRP approach. Otherwise you end up with an engineering discussion that is more focused on the cute details on FRP and not how to design good systems! Currently the functional programming research community seems very aware of GoF design patterns but completely unaware and/or uninterested by real-time design patterns. I predict this will change within the next 5 years. Luc Taesch, Probably my favorite book on the subject is Thomas Kuehne's Ph.D. thesis which went out of print within the last year, but is freely available from the author's page: http://c2.com/cgi/wiki?FunctionalPatternSystemForObjectOrientedDesign One of the patterns Kuehne discusses, Transfold, is something every computer scientist should understand. Unfortunately, the book uses the Eiffel language and not a functional language. However, the author brings up good points that transcend what language is being used for implementation. Also, since it is a book, it is more coherent than reading many papers on object-functional patterns. If you don't use Haskell in your day job (like me), then you might use a more conventional language like C#. If that is the case, then papers by Jeremy Gibbons will likely also be right up your alley (they will likely help you better communicate ideas to your coworkers). He has written a number of very readable papers about datatype generic programming. http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/ +1 to the idea of a book on patterns in a functional language. Cheers, Z-Bo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] problems using macports?
Hi! On Thu, Sep 9, 2010 at 5:38 PM, S. Doaitse Swierstra doai...@swierstra.net wrote: I am in my yearly fightto get a working combination of operating system (Snow Leopard), compiler version (6.12) , wxWidgets and wxHaskell on my Mac . I had same problem just know and it seems to be (as described also elsewhere) that Haskell Platform GHC is linked against system's iconv and by using (or having) MacPorts or Fink with their own version you have a conflict. One solution is to get MacPorts a new version of GHC so there will be no need for Haskell Platform GHC installation if you want to use MacPorts: https://trac.macports.org/ticket/25558 (Or you could just change PATH so that it uses MacPorts version.) The other way is that you (for session in which you compile) hide MacPorts or Fink installation. I had this problem with Fink and I fixed this simply by undeclaring environment variables: export -n LD_LIBRARY_PATH export -n LIBRARY_PATH Of course then you cannot use Haskell libraries which require additional libraries not installed on the system (and this is why you install them with MacPorts or Fink). So one way would be to have Haskell Platform versions which link against MacPorts and Fink iconv (or their library paths in general). The other would be probably to implement/document configuration (extra-lib-dir?) that Cabal (or GHC in general) first searches system's library path (those against which GHC was compiled in Haskell Platform) and if lib is not there goes for MacPorts or Fink's library paths? Mitar ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe