[Haskell-cafe] Re: Fastest regex package?
2009/2/5 ChrisK hask...@list.mightyreason.com: Eugene Kirpichov wrote: All in all, my question remains: what is the fastest way to do this kind of parsing on a lazy bytestring? Your example regular expression works the same in both Posix and Perl-ish semantics. Do you know the difference? Posix libraries look for the longest match of all possible matches. Perl-ish is left-bias and looks at the left branch first and only looks at the right branch when the left fails and it has to backtrack. Thanks, I didn't know that about posix. So the ++ operator is a hack to try and control the backtracking of Perl regular expressions. Such a things has no meaning in Posix where the implementation details are totally different. That's precisely what I put it in for :) You might try this variant of the example pattern: /foo.xml.*fooid=([0-9]+)[^0-9].*barid=([0-9]+) The [^0-9] can be used when you know that there is at least one junk character before the barid, which I suspect will always occur in a URL. I expect regex-posix to be slower than regex-pcre. I have not used the new pcre-light. I wrote regex-tdfa — it is pure haskell and not a C library wrapper. There are patterns where regex-pcre will backtrack and take exponentially more time than regex-tdfa's automaton (which is not yet ideal and may get faster). You're right :) So what is the lazy bytestring with its multiple buffers doing for you when using PCRE, PCRE-light, or regex-posix? Absolutely nothing. To run against these C libraries the target text is converted to a single buffer, i.e. a CStringLen in Haskell. Thus it is morally converted into a strict bytestring. This may involve copying the logfile into a NEW strict bytestring EVERY TIME you run a match. Please Please Please convert to a strict bytestring and then run regex-pcre or pcre-light (or any of the others). I'm running the regex on lines of the logfile, not on the whole logfile itself; and I'm running it only once per line, so that doesn't matter much. Actually, that's what I did in the initial version of the program (strictify lines before matching), but then I experimentally got rid of the extra conversion function and performance didn't change at all (anyways, someone was converting that string exactly once, be it me or the package), so I left it that way. regex-tdfa does not convert it into a strict bytestring, but is otherwise much slower than pcre for your simple pattern. As for regex-pcre's interfaceyou should use the API in regex-base to get a pure interface. The RegexLike functions are the pure interface for this, and the RegexContext class offers a slew of instances with useful variants. Thanks, I didn't know that. But if you have been getting to the low level IO API in regex-pcre then you probably do not need or want the RegexContext transformations. Is that because of their performance? And BoyerMoore (which I think I helped optimize): this may be faster because it does not copy your whole Lazy bytestring into a Strict ByteString for each search. But you may wish to test it with a Strict ByteString as input anyway. -- Chris ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Switching from Mercurial to Darcs
* Henning Thielemann lemm...@henning-thielemann.de [2009-02-05 23:34:53 +0100]: Peter Verswyvelen schrieb: 3) hg addrem this adds new files and removes deleted files from local repos. forgetting to add files is a common problem, and is really tricky since no record is made of these files, so if after a couple of versions if a developer finds out a file was missing, the history is useless since you can't reconstruct the old content of that local file anymore, and often it's impossible to give the local file to the other developers since it might be changed. I actually would like to have an option that automatically adds/deletes files on each commit, as it is easier to delete a file after it is checked in, than it is to reconstruct an old version from a local file you forgot to add. I'm also not glad with darcs behaviour about non-added files. You can try darcs whatsnew --look-for-adds You can also pass --look-for-adds (-l) to darcs record; if you want this to be the default behaviour, you could add record look-for-adds to ~/.darcs/defaults or similar. 4) hg commit -m message this commits my changes locally. I always do this before pulling since then I'm sure my changes are saved in the case a merge goes wrong. In old darcs its precisely the other way round. Since it is so slow on merging ready patches, you better merge uncrecorded changes. This sounds like bad advice; merging changes with locally unrecorded changes shouldn't be any less expensive than merging them with a just-recorded patch (the algorithm is exactly the same, after all, unless there's something I've missed), and you have no way to roll things back if you don't record a patch before merging. Of course, you may want to unrecord your temporary patch after you've pulled, to keep your patch history neater. -- mithrandi, i Ainil en-Balandor, a faer Ambar signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Switching from Mercurial to Darcs
On 6 Feb 2009, at 10:12, Paolo Losi wrote: Henning Thielemann wrote: 4) hg commit -m message this commits my changes locally. I always do this before pulling since then I'm sure my changes are saved in the case a merge goes wrong. In old darcs its precisely the other way round. Since it is so slow on merging ready patches, you better merge uncrecorded changes. IMO pulling merging before commit is a good practise also for hg: it avoids a (very often useless) merge commit in the history. I don't understand this view. Isn't the point of a commit that you flag working points. In each branch, before you merge (hopefully) you have a working repository, so flag it as such, and commit. When you merge, you may or may not have a working repository, fix it until it is, and merge. I would never do a merge without the two branches I was merging having a commit just before the merge. Bob ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] 1,000 packages, so let's build a few!
2009/1/31 Andrew Coppin andrewcop...@btinternet.com: In celebration of Hackage reachin over 1,000 unique packages, I decided that I would re-visit the problem of attempting to build them on Windows. I began by removing all existing Haskellness from my PC. I now have a vanilla Windows XP (32-bit) system with Service Pack 3. So, let's see what we can do here... - Install GHC 6.10.1. As you'd expect, no issues here. - Now, let's install stream-fusion. First let me ch... woah! What the hell? OK, it seems that Google is temporarily broken. (All websites show up as this site may damange your computer.) Obviously this has nothing to do with Haskell, but it makes navigating Hackage moderately more tedious. Oh well, anyway, where was I? Ah yes, I already have the tarball for stream-fusion-0.1.1, but I see that the latest release is 0.1.2.1. (Unfortunately, there doesn't appear to be any way to determine what the difference is between the two versions...) - Right, I've got the tarball for stream-fusion. Now let's see if it will install... J:\Haskell\unpack runhaskell Setup configure J:\Haskell\unpack runhaskell Setup build J:\Haskell\unpack runhaskell Setup install J:\Haskell\unpack ghc-pkg list ...stream-fusion-0.1.2.1... OK, nothing much wrong with that then. :-D - Hmm, doesn't GHC 6.10.1 now come with Haddock included? I wonder if there's a way to ask Cabal to build the docs for me... [Grr! Google is still busted.] Ah, yes there is. OK, let's try this: J:\Haskell\unpack runhaskell Setup haddock ... Data\Stream.hs:292:33: parse error on input `!' haddock: Failed to check module: Data.Stream Uh... OK. So I guess I *won't* build the docs for that one then. :-/ Oh well, maybe it's a one-off failure? Let's try some more packages... The problem there is that stream-fusion is trying to put documentation on individual data constructor arguments which is not supported by Haddock. David ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haddock Markup
Am Freitag, 6. Februar 2009 21:17 schrieben Sie: It doesn't really matter if TeX is a good or bad idea for writing maths. For our users, they might do a formula if it's TeX, they won't if it's something else. Oh, what ignorant users! ;-) Well, if this discussion is about changing the real Haddock (not about making a fork) than the arguments about TeX not being good as a general math language should count, I’d say. Best wishes, Wolfgang ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haddock Markup
On Friday 06 February 2009 21:24:35 Andy Smith wrote: 2009/2/6 Wolfgang Jeltsch g9ks1...@acme.softbase.org: So using TeX as a general language for math is a very bad idea, in my opinion. The problem is that there is no good language which provides enough structural information for conversion into MathML and is at the same time simple to write and read. Maybe, both requirements contradict. ASCIIMathML [1] is designed to do this. It doesn't cover everything in Presentation MathML, and makes no attempt to handle Content MathML, but you can do quite a lot with it. The notation has a formally defined grammar and rules for conversion to MathML [2]. [1] http://www1.chapman.edu/~jipsen/asciimath.html [2] http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html TeX aim is presentation quality not structural information. And it's rather good at it. If one want really good looking formulae TeX is the answer. ASCIIMathML is nice but its produce not so good looking formulae. I've tried it some time ago and found it clearly inferior to TeX. It gives too little control over presentation. I wasn't able even to place integration indices exactly over and under integral sign. P.S. Maybe I just to used to TeX. -- Khudyakov Alexey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haddock Markup
On Friday 06 February 2009 13:31:34 George Pollard wrote: My comment isn't related to the wider implications of third-party hooks into Haddock, but just for the (La?)TeX stuff itself. I think that the TeX *language* is great for writing mathematics, but that we should be wary of blindly incorporating TeX *output* into Haddock. Most of Haddock's documentation is currently HTML-based, and if we add TeX mathematics in the usual way (i.e. embedding images) it is very ‘inaccessible content’ (no selection, scaling, and a myriad of other small niggles) compared to the rest of the HTML file. My thoughts would be to use the TeX engine itself for when generating high-quality PDF documentation, and have something else translate TeX to (e.g.) MathML for the HTML pages. There are various programs to do this (or it could be done in Haskell :D!) Thanks, - George I think MathML is much less accessible than images. Yes, there are problems with them but any browser is able to display them save for text based ones. MathML on contrary doesn't have much support. According to wikipedia only recent versions of gecko based browsers and opera =9.5 can do this. For IE special plugin is required (MathPlayer). I believe image are safest way at least for now. -- Khudyakov Alexey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Ready for testing: Unicode support for Handle I/O
On Tuesday 03 February 2009 19:42:44 Simon Marlow wrote: I've been working on adding proper Unicode support to Handle I/O in GHC, and I finally have something that's ready for testing. I've put a patchset here: http://www.haskell.org/~simonmar/base-unicode.tar.gz ... skipped ... Comments/discussion please! How do you plan to handle filenames? Currently FilePath is simply a string. Would it be decoded/encoded automatically? If so there is a nasty catch. Not all valid filenames have representation as strings. On linux (and I suspect all unices) file name is sequence of bytes. For example let consider file with name {0xff} on computer with UTF8 locale. It's valid and everything, but its name cannot be converted to string. 0xff byte cannot appear in UTF8 strings. -- Khudyakov Alexey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: [Haskell-cafe] Ready for testing: Unicode support for Handle I/O
Hello Khudyakov, Saturday, February 7, 2009, 4:01:57 PM, you wrote: How do you plan to handle filenames? Currently FilePath is simply a string. i think that this patch does nothing to unicode filenames support -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell-beginners] Just how unsafe is unsafe
As I didn't catch the whole thread, I hope I'm not just repeating everyone else: Roel van Dijk wrote: I guess what unsafe should mean is a matter of taste. Personally I find correctness more important that pureness. An unsafe function will crash your program if evaluated when its preconditions do not hold. Whether that is because of impurity (segmentation fault?), a partial pattern match or a direct error bla is not that important. It might be important when determining why your program crashed, but the result is still the same. Maybe for the purposes of naming functions it's sufficient to argument that a crash is a crash whatsoever, but as for terminology in general, I think it's good to distinguish (1) partial functions from (2) functions that break purity, may lead to segmentation faults etc. I suppose (2) is the »traditional« meaning of unsafe. The motivation for this distinction is that you can still reason to some extent about (1) if you consider _|_, and that there are many functions that, although useful and correct, aren't guaranteed to terminate on infinite input, thus are partial. On the other hand, functions from (2) should always be called unsafeFoo, and/or wrapped by safe functions. Kalman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Moggi :: CT - Hask
Hi, I had a monadic revelation at about 3 am. The answer to the question what is an IO value, really? is who cares? I just posted a blog entry discussing how CT found it's way from Moggi into Haskell at http://syntax.wikidot.com/blog (hence the title; Moggi as functor). It addresses the question of what such things are and why Moggi's insight is so brilliant. Feedback welcome, but please remember this is coming from a non-mathematician who likes to write. If you find anything there that outrages your inner Russell, please correct me, but be gentle. Thanks, gregg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Moggi :: CT - Hask
Correction: the correct response is: Nothing. On Sat, Feb 7, 2009 at 11:11 AM, Gregg Reynolds d...@mobileink.com wrote: Hi, I had a monadic revelation at about 3 am. The answer to the question what is an IO value, really? is who cares? I just posted a blog entry discussing how CT found it's way from Moggi into Haskell at http://syntax.wikidot.com/blog (hence the title; Moggi as functor). It addresses the question of what such things are and why Moggi's insight is so brilliant. Feedback welcome, but please remember this is coming from a non-mathematician who likes to write. If you find anything there that outrages your inner Russell, please correct me, but be gentle. Thanks, gregg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
Paul Johnson wrote: A call has gone out http://www.haskell.org/pipermail/haskell-cafe/2008-December/051836.html for a new logo for Haskell. Candidates (including a couple http://www.haskell.org/haskellwiki/Image:Haskell-logo-revolution.png of mine http://www.haskell.org/sitewiki/images/f/fd/Ouroborous-oval.png) are accumulating here http://www.haskell.org/haskellwiki/Haskell_logos/New_logo_ideas. There has also been a long thread on the Haskell Cafe mailing list. So what's happening about this? Paul. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
paul: Paul Johnson wrote: A call has gone out http://www.haskell.org/pipermail/haskell-cafe/2008-December/051836.html for a new logo for Haskell. Candidates (including a couple http://www.haskell.org/haskellwiki/Image:Haskell-logo-revolution.png of mine http://www.haskell.org/sitewiki/images/f/fd/Ouroborous-oval.png) are accumulating here http://www.haskell.org/haskellwiki/Haskell_logos/New_logo_ideas. There has also been a long thread on the Haskell Cafe mailing list. So what's happening about this? We need a voting site set up. There was some progress prior to the end of the year. Updates welcome! -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Moggi :: CT - Hask
On Saturday 07 February 2009 12:11:29 pm Gregg Reynolds wrote: I had a monadic revelation at about 3 am. The answer to the question what is an IO value, really? is who cares? I just posted a blog entry discussing how CT found it's way from Moggi into Haskell at http://syntax.wikidot.com/blog (hence the title; Moggi as functor). It addresses the question of what such things are and why Moggi's insight is so brilliant. Feedback welcome, but please remember this is coming from a non-mathematician who likes to write. If you find anything there that outrages your inner Russell, please correct me, but be gentle. As far as I know, Moggi didn't really have anything directly to do with Haskell. He pioneered the idea of monads being useful in denotational semantics. But it was Wadler that recognized that they'd be useful for actually writing functional programs (see his The Essence of Functional Programming). So one might say that it was his doing that brought monads to Haskell proper. -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
We need a voting site set up. There was some progress prior to the end of the year. Updates welcome! -- Don Can't we just use the haskell proposal reddit for this? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
wagner.andrew: We need a voting site set up. There was some progress prior to the end of the year. Updates welcome! -- Don Can't we just use the haskell proposal reddit for this? Hmm... not ideal. Would make a backup should all else fail. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
Um, ok. Glad we could discuss it On Sat, Feb 7, 2009 at 1:12 PM, Don Stewart d...@galois.com wrote: wagner.andrew: We need a voting site set up. There was some progress prior to the end of the year. Updates welcome! -- Don Can't we just use the haskell proposal reddit for this? Hmm... not ideal. Would make a backup should all else fail. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
Oh, we had a long discussion about the need for condorcet voting, not a system like the reddit which is prone to abuse. Also, it would be good to have the images inline. wagner.andrew: Um, ok. Glad we could discuss it On Sat, Feb 7, 2009 at 1:12 PM, Don Stewart d...@galois.com wrote: wagner.andrew: We need a voting site set up. There was some progress prior to the end of the year. Updates welcome! -- Don Can't we just use the haskell proposal reddit for this? Hmm... not ideal. Would make a backup should all else fail. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: [Haskell-cafe] The Haskell re-branding exercise
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 voting/survey services available. the last one i went through was LimeSurvey available for any SF project and on separate site too http://apps.sourceforge.net/trac/sitedocs/wiki/Hosted%20Apps https://www.limeservice.com/ -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Weekly News: Issue 104 - February 7, 2009
--- Haskell Weekly News http://sequence.complete.org/hwn/20090207 Issue 104 - February 07, 2009 --- Welcome to issue 104 of HWN, a newsletter covering developments in the [1]Haskell community. Community News Andre Pang (ozone) will be soon [2]moving to San Fransisco to begin work with [3]Pixar! Announcements Mutually recursive modules. Henning Thielemann [4]announced a [5]small writeup explaining how mutually recursive modules are currently supported, and how they can be avoided. Please add information about other compilers and more ideas on breaking cycles. UrlDisp, a friendly URL dispatching library. Artyom Shalkhakov [6]announced the first release of [7]UrlDisp, a small library for URL dispatching (aka routing). Right now it works with CGI, and should be compatible with FastCGI as well (not tested); Happstack compatibility is planned. [8]Documentation and usage examples are available. Purely functional LU decomposition. Rafael Gustavo da Cunha Pereira Pinto [9]released some code to perform purely functional LU decomposition. Ready for testing: Unicode support for Handle I/O. Simon Marlow [10]announced that proper Unicode support in Handle I/O is ready for testing in GHC. Just download the [11]set of patches, compile GHC with them, and test away! Comments and discussion welcome. HaskellWiki Accounts. Ashley Yakeley can [12]create a HaskellWiki account for anyone who wants one (account creation has been disabled as a spam-fighting measure). multiplicity 0.1.0 released. Dino Morelli [13]announced the release of [14]multiplicity 0.1.0, a configuration file driven wrapper around [15]duplicity. It allows you to easily define backup sets as config files and avoid long, repetitive command lines. Happstack 0.1 Released!. Matthew Elder [16]announced the [17]0.1 release of [18]Happstack, the successor for the HAppS project. #haskell-in-depth IRC channel. Philippa Cowderoy [19]announced the creation of a new IRC channel, #haskell-in-depth. The new channel is open to everyone, just like #haskell, but is intended for more in-depth conversations, to allow the #haskell channel to be a more newbie-friendly place. regex-posix-unittest-1.0 AND regex-posix-0.94.1 AND regex-tdfa-0.97.1. ChrisK [20]announced an update to the [21]regex-posix package which provides better semantics for multiple matches; an update to the [22]regex-tdfa package, which provides the same new multiple match semantics and fixes a bug; and finally, a new package, [23]regex-posix-unittest, along with an [24]accompanying wiki page; it runs a suite of unit tests which regex-tdfa passes, but reveals bugs in the standard glibc, OS X, FreeBSD, and NetBSD implementations! Jane Street Summer Project 2009. Yaron Minsky [25]announced the [26]Jane Street Summer Project for 2009, the goal of which is to make functional programming languages into better practical tools for programming in the real world. Students will be funded over the summer to work on open-source projects which aim at improving the practical utility of their favorite functional language. gitit 0.5.1. John MacFarlane [27]announced the release of [28]gitit 0.5.1, a wiki program that uses git or darcs as a filestore and HAppS as a server. Changes include major code reorganization, bug fixes, new debugging features, and more. regex-xmlschema. Uwe Schmidt [29]announced the [30]release of [31]regex-xmlschema, (yet another) package for processing text with regular expressions, containing a complete implementation of the W3C XML Schema specification language for regular expressions. diagrams 0.2. Brent Yorgey [32]announced version 0.2 of the [33]diagrams package, an embedded domain-specific language for creating simple graphics in a compositional style. New features include support for arbitrary paths, text, multiple output formats, and support for the [34]colour library. Discussion Haddock Markup. David Waern began a [35]discussion on Haddock markup syntax: should it support (La)TeX for embedded mathematics? Should it support other stuff? Elegant powerful replacement for CSS. Conal Elliott began a [36]discussion on an elegant replacement for CSS that is consistent, composable, orthogonal, functional, and based on an elegantly compelling semantic model---what might such a thing look like? type metaphysics. Gregg Reynolds began a long and interesting [37]discussion on the type system, denotational semantics, and related matters. Jobs Postdoc Positions at the CLIP group, Spain. CFP [38]announced the availability of [39]postdoctoral research positions within the [40]CLIP (Computational Logic, Implementation
[Haskell-cafe] HSGI: Haskell Server Gateway Interface
Lately I have started to think about how I would like to implement a web application framework in Haskell. To keep my thoughts well defined, I have decided to write some documents. My ideas are heavily based on my experience with Python WSGI, and a Python WSGI framework I'm implementing (wsgix). Note that there is already another attempt to define an Haskell Gateway interface, and it may also have the same name! However I'm not trying to write a formal specification. The core of my idea is in the Haskell Web Application Framework, I just need a gateway interface as a building block. I apologize for my not very good experience at writing in english and Haskell. Also note that the document is in a very rough state. I'm announcing it here, to receive feedback, just to make sure that what I would like to do is possible/convenient to do in Haskell. The documents (only the first one - HSGI - available at the moment) are available here: http://mperillo.ath.cx/haskell/ Thanks and regards Manlio Perillo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Semantic web
Anybody implementing rdf or owl stuff in haskell? Seems like a natural fit. G___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Semantic web
dev: Anybody implementing rdf or owl stuff in haskell? Seems like a natural fit. http://www.ninebynine.org/RDFNotes/Swish/Intro.html Needs moving to Hackage. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] The Haskell re-branding exercise
On Sat, Feb 7, 2009 at 1:34 PM, Don Stewart d...@galois.com wrote: Oh, we had a long discussion about the need for condorcet voting, not a system like the reddit which is prone to abuse. Also, it would be good to have the images inline. Perfect, please meet better. Better, perfect. Now get along you two! Since January 1st, we could've had hundreds or thousands of votes and easily compensated for any abuse. -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
gwern0: On Sat, Feb 7, 2009 at 1:34 PM, Don Stewart d...@galois.com wrote: Oh, we had a long discussion about the need for condorcet voting, not a system like the reddit which is prone to abuse. Also, it would be good to have the images inline. Perfect, please meet better. Better, perfect. Now get along you two! Since January 1st, we could've had hundreds or thousands of votes and easily compensated for any abuse. Unfortunately, reddit isn't a suitable voting site, as submissions decay over time, dissappearing off the page after a day or two. It does have up and down mods, but in no other way is a voting site. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
On Sat, Feb 7, 2009 at 3:04 PM, Don Stewart d...@galois.com wrote: gwern0: On Sat, Feb 7, 2009 at 1:34 PM, Don Stewart d...@galois.com wrote: Oh, we had a long discussion about the need for condorcet voting, not a system like the reddit which is prone to abuse. Also, it would be good to have the images inline. Perfect, please meet better. Better, perfect. Now get along you two! Since January 1st, we could've had hundreds or thousands of votes and easily compensated for any abuse. Unfortunately, reddit isn't a suitable voting site, as submissions decay over time, dissappearing off the page after a day or two. It does have up and down mods, but in no other way is a voting site. -- Don That's how the what's hot works, I understand. But it seems to me that Top works just fine for vote tallying purposes eg. http://www.reddit.com/r/haskell/top/ lists quite a few posts posted months ago (4 months seems to be the oldest). -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
gwern0: On Sat, Feb 7, 2009 at 3:04 PM, Don Stewart d...@galois.com wrote: gwern0: On Sat, Feb 7, 2009 at 1:34 PM, Don Stewart d...@galois.com wrote: Oh, we had a long discussion about the need for condorcet voting, not a system like the reddit which is prone to abuse. Also, it would be good to have the images inline. Perfect, please meet better. Better, perfect. Now get along you two! Since January 1st, we could've had hundreds or thousands of votes and easily compensated for any abuse. Unfortunately, reddit isn't a suitable voting site, as submissions decay over time, dissappearing off the page after a day or two. It does have up and down mods, but in no other way is a voting site. -- Don That's how the what's hot works, I understand. But it seems to me that Top works just fine for vote tallying purposes eg. http://www.reddit.com/r/haskell/top/ lists quite a few posts posted months ago (4 months seems to be the oldest). Quite so, biased by the fact that they dropped off the page. I'm not saying reddit is unsuitable for communal decision making -- I've thought hard about this -- just that isn't perfect, and this isn't really its purpose. It would make a good backup if we can't find a proper system. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HSGI: Haskell Server Gateway Interface
Hi Manlio, Have you looked at http://www.haskell.org/haskellwiki/WebApplicationInterface ? If you did is there something in that proposal that you think should be changed or is not clear? There is currently a lot of interest in writing web frameworks for Haskell and it would be great if the frameworks support a common interface like Python's WSGI and Ruby's Rack interface and all use the same frontends like Hyena and modules for Apache, Nginx etc. Felix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input
2009/2/6 Duncan Coutts duncan.cou...@worc.ox.ac.uk: Yes, against my better judgement the code in Cabal for haddock-2.x does not run cpp or unliting like it does for haddock-0.x. Instead it assumes that haddock-2.x will do all the cpp and unliting itself. Obviously this mean the special unliting mode that Cabal provides is not usable with haddock-2.x. The solution is to do the pre-processing the same for haddock-0.x and 2.x. Generally the haddock code in Cabal is a horrible inconsistent mess. I believe Andrea Vezzosi has been looking at rewriting it, which is good news. In Distribution.Simple.Haddock, in the haddock function we have: withLib pkg_descr () $ \lib - do let bi = libBuildInfo lib modules = PD.exposedModules lib ++ otherModules bi inFiles - getLibSourceFiles lbi lib unless isVersion2 $ mockAll bi inFiles So I guess the easiest thing to do right now is remove the unless isVersion2 $ . I'm testing this at the moment, so when I get it working (or not) I'll let you know, and maybe send a patch. Alistair ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
2009/2/7 Don Stewart d...@galois.com: Quite so, biased by the fact that they dropped off the page. I'm not saying reddit is unsuitable for communal decision making -- I've thought hard about this -- just that isn't perfect, and this isn't really its purpose. It would make a good backup if we can't find a proper system. -- Don And how long do we wait? Is a month long enough? 2 months? Do we just make a note on our calendars for February 2010 - 'get moving on that logo contest thing'? -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Bind as a sequencing operator (Was: evaluation semantics of bind)
On Thu, 2009-02-05 at 11:47 -0700, m...@justinbogner.com wrote: Jake McArthur j...@pikewerks.com writes: m...@justinbogner.com wrote: | Oops, sent this off list the first time, here it is again. | | Jake McArthur j...@pikewerks.com writes: | m...@justinbogner.com wrote: | | Bind is a sequencing operator rather than an application operator. | | In my opinion, this is a common misconception. I think that bind would | be nicer if its arguments were reversed. | | If this is a misconception, why does thinking of it this way work so | well? This idea is reinforced by the do notation syntactic sugar: bind | can be represented by going into imperative land and doing one thing | before another. An imperative-looking notation does not make something imperative. Thinking of bind as sequencing really *doesn't* work very well. What does bind have to do with sequencing at all in the list monad, for example? What about the reader monad? - Jake What doesn't bind have to do with sequencing in the list monad? Consider: [1..2] = return . (^2) This says generate the list [1..2] and then use it to generate a list of squares. It's more than just application, it's a description of a sequence of actions. The whole point of list comprehensions (which is the only reason to have a list monad, as far as I know) is to think of it this way rather than as an application of concatMap. As for Reader, I don't know enough about it to say anything. Jake is more or less right. The Monad interface does nothing to enforce any particular evaluation order. The interface is, however, too narrow for you to express do these two things in an indeterminate order so you are forced to choose a particular linearization. Commutative monads, such as Reader, could relax that constraint, not that it would really mean much in many of those cases. Now, if we wanted to give a semantics for a call-by-value programming language, which was exactly the sort of thing Moggi was thinking about when he was talking about monads, then application would indeed translate into exactly (flipped) (=). So the expression (f x) in, say, SML would be translated to (f = x) using some appropriate monad to model the side-effects that ML supports. Actually, a 'let' like notation is often preferred as it matches better with lists of statements more prettily than the equivalent of treating ; as const. This is the source of the name 'bind' as, e.g. the ML, (let a = M in let b = N in a+b) translates to (M = \a - N = \b - return (a+b)) and, of course, do-notation is just a syntactic variant of this 'let' notation. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] morphisms in IO
On Thu, 2009-02-05 at 20:52 -0600, Gregg Reynolds wrote: I'm working on a radically different way of looking at IO. Before I post it and make a fool of myself, I'd appreciate a reality check on the following points: a) Can IO be thought of as a category? I think the answer is yes. No. At least not in any reasonable way. b) If it is a category, what are its morphisms? I think the answer is: it has no morphisms. The morphisms available are natural transformations or functors, and thus not /in/ the category. Alternatively: we have no means of directly naming its values, so the only way we can operate on its values is to use morphisms from the outside (operating on construction expressions qua morphisms.) N/A c) All categories with no morphisms (bereft categories?) are isomorphic (to each other). I think yes. No. Discrete categories which you seem to be talking about are isomorphic to sets (namely their set of objects). Not all sets are isomorphic. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
gwern0: 2009/2/7 Don Stewart d...@galois.com: Quite so, biased by the fact that they dropped off the page. I'm not saying reddit is unsuitable for communal decision making -- I've thought hard about this -- just that isn't perfect, and this isn't really its purpose. It would make a good backup if we can't find a proper system. -- Don And how long do we wait? Is a month long enough? 2 months? Do we just make a note on our calendars for February 2010 - 'get moving on that logo contest thing'? Help identifying and implementing a voting process is very welcome. Snarky comments are not. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Haskell re-branding exercise
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 voting/survey services available. the last one i went through was LimeSurvey available for any SF project and on separate site too http://apps.sourceforge.net/trac/sitedocs/wiki/Hosted%20Apps https://www.limeservice.com/ Before the new year's break, the progress we made towards deciding on a voting process was, http://groups.google.com/group/fa.haskell/msg/5d0ad1a681b044c7 Eelco implemented a demo condorcet voting system in HAppS. He then asked for help with some decisions: * Limit voting, if so how? Email confirmation, IP based, vote once, once per day? * Maybe don't show the results until the contest is over? Eelco, can we do simple email-based confirm to encourage people to vote only once, and can we keep the results closed until the vote process is over? -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HSGI: Haskell Server Gateway Interface
Felix Martini ha scritto: Hi Manlio, Have you looked at http://www.haskell.org/haskellwiki/WebApplicationInterface ? If you remember, I posted a few messages in the thread where WAI was announced. There is a separate channel where we can discuss in detail? Or should I just use this thread? If you did is there something in that proposal that you think should be changed or is not clear? Here are the problems: 1) supported HTTP methods are fixed, since you use a custom data type 2) no support for other possible CGI variables (or simply custom variables: I use the environ dictionary to store application configuration, and I think it is a great thing). I think that we should simply have a dictionary Map ByteString ByteString 3) No support for optimized file serving, like with WSGI file_wrapper 4) No support for keeping complex state (like database connection) in the environ. I have read some examples with CGI package, where a custom monad transformer is used. I'm not sure if this solution is flexible and scalable. 5) I can't find documentation about the type of the response. It is rather clear that it is (ByteString, [(ByteString, ByteString)], Enumerator) but this should be documented somewhere. There are also few typos: * Chapter 2: A standardized interface is of no use of no... should be A standardized interface is of no use if no... * Chapter 4.2 However, if the the amount... should be However, if the amount... As a last note: I have some doubts about the name, since gateway is not in it ;-). Regards Manlio Perillo ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HSGI: Haskell Server Gateway Interface
There is a separate channel where we can discuss in detail? Or should I just use this thread? This is a good topic for the web-de...@haskell.org list. I'll post my reply there. Felix ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HSGI: Haskell Server Gateway Interface
Felix Martini ha scritto: Hi Manlio, Have you looked at http://www.haskell.org/haskellwiki/WebApplicationInterface ? If you did is there something in that proposal that you think should be changed or is not clear? There is currently a lot of interest in writing web frameworks for Haskell and it would be great if the frameworks support a common interface like Python's WSGI and Ruby's Rack interface and all use the same frontends like Hyena and modules for Apache, Nginx etc. Another typo at chapter 4.2 (the end): The consumed likely wants... should be The consumer likely wants... Another problem I have not discussed in previous reply is with the use of the custom Enumerator. There is nothing wrong in using it (it is the best choice, IMHO), however there is *little* support for enumerators in Haskell base packages, and little examples about how to use it. It is not a know pattern in the Haskell community. So, it may be the right choices, but it may be a bit premature, IMHO. Felix Manlio ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Function const (Binding)
Hello, I've a small question about the function const. I'm a bit of confused about how it binds. Let me take the following expression as example: const id 1 2 If I execute this expression, I will get as answer 2 with Helium. Now is my question, why doesn't it give me 1 as the answer? Because the type of id would be: a - a. So first it would execute id 1 in my opinion. That gives us 1. And after executing const 1 2 it should give us 1. Can somebody explain to me why it does not bind as I expect? (I know I can do: const (id 1) 2 to get what I want) Thank you for your answers. Greetz TKM___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Function const (Binding)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maybe it will help with parentheses: (const id 1) 2 (const id 1) ignores the second argument and yields the id function so then id 2 which is just 2. TKM wrote: Hello, I've a small question about the function const. I'm a bit of confused about how it binds. Let me take the following expression as example: const id 1 2 If I execute this expression, I will get as answer 2 with Helium. Now is my question, why doesn't it give me 1 as the answer? Because the type of id would be: a - a. So first it would execute id 1 in my opinion. That gives us 1. And after executing const 1 2 it should give us 1. Can somebody explain to me why it does not bind as I expect? (I know I can do: const (id 1) 2 to get what I want) Thank you for your answers. Greetz TKM -- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe - -- Tony Morris http://tmorris.net/ * Anteromedial Osseous Impingement * http://www.ajronline.org/cgi/content/full/178/3/601 can result in chronic ankle pain, especially in athletes and the younger population (15-40 years old) http://radiographics.rsnajnls.org/cgi/content/figsonly/22/6/1457 Soft-tissue and osseous impingement syndromes of the ankle can be an important cause of chronic pain, particularly in the professional athlete. 1. Take any person with soft tissue and osseous joint impingement from trauma 2. Surgically tighten the joint ligaments particularly those in the area of impingement. 3. When the patient complains of incredible and permanent pain, shrug your shoulders. Outcome You'll find the patient at the mental hospital bordering psychosis. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJjhkomnpgrYe6r60RAmvtAKDBQxNAlc2tfN283vcvs5gkzXUEjwCgpw7s CcGAha7L6AgHESzwLSoD2XU= =szrP -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Function const (Binding)
Am Sonntag, 8. Februar 2009 00:24 schrieb TKM: Hello, I've a small question about the function const. I'm a bit of confused about how it binds. Let me take the following expression as example: const id 1 2 If I execute this expression, I will get as answer 2 with Helium. Now is my question, why doesn't it give me 1 as the answer? Because the type of id would be: a - a. So first it would execute id 1 in my opinion. That gives us 1. And after executing const 1 2 it should give us 1. Can somebody explain to me why it does not bind as I expect? (I know I can do: const (id 1) 2 to get what I want) Thank you for your answers. Greetz TKM Function application associates to the left, so f a b c d is the same as (((f a) b) c) d and in your example const id 1 2 === ((const id) 1) 2, so first (const id) is evaluated, that is then applied to 1 and finally the result of const id 1 is applied to 2. Now (const x) === \y - x, so (const id) 1 is id and id 2 === 2. HTH, Daniel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: HLint 1.2
On Mon, 12 Jan 2009, Duncan Coutts wrote: On Mon, 2009-01-12 at 15:06 +0100, Henning Thielemann wrote: It has to be manually transformed into a version that is not recursive at the top level: map :: (a - b) - [a] - [b] map f = go where go [] = [] go (x:xs) = f x : go xs Then the map can be inlined at the call site and the 'f' inlined into the body of 'go'. Maybe HLint can make such suggestions ... I think HLint's philosophy prefers elegant code to performance hacks. I encountered just another instance of 'jumping into the wrong loop' when experimenting with a function using top-level recursion. Thus I summarized the stylistic reasons pro local recursion: http://www.haskell.org/haskellwiki/Top-level_vs._local_recursion ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN : happs-tutorial 0.7
Hello, I'm pleased to announce the release of happs-tutorial 0.7 on Hackage. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tutorial This is the first release of happs-tutorial built against the new Happstack project. Not much has changed in content since the last release except a few minor cleanups a little bit of reorganization. The 0.8 release will consist of more extensive additions, with the primary focus being a walk through of multimaster. I've taken over the development of the tutorial from Thomas Hartman, who has already put a rather massive effort into making HAppS/Happstack more accessible. Please feel free to e-mail me with any comments, errata, or threats of bodily harm. Cheers, Creighton Hogg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Just how unsafe is unsafe
Peter Verswyvelen wrote: I do have asked myself the question whether a really random generating function could be regarded as pure somehow Not really. Somewhere in your program you are likely to make the assumption that a value you obtained, however indirectly, from this function will be the same in two different places. But the sands will constantly be shifting. Furthermore, in real life physical RNGs also involve state, because they need to accumulate entropy. For example, in Unix (on many platforms), the physical RNG device /dev/random will block until there is enough entropy to provide a random number. The /dev/urandom device always returns a number immediately, but that is because it will return a pseudo-random number if there is not enough entropy available, again requiring state. -Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Moggi :: CT - Hask
Hi Dan, On Sat, Feb 7, 2009 at 12:00 PM, Dan Doel dan.d...@gmail.com wrote: On Saturday 07 February 2009 12:11:29 pm Gregg Reynolds wrote: As far as I know, Moggi didn't really have anything directly to do with Haskell. He pioneered the idea of monads being useful in denotational semantics. But it was Wadler that recognized that they'd be useful for actually writing functional programs (see his The Essence of Functional Programming). So one might say that it was his doing that brought monads to Haskell proper. From what I've read Wadler was clearly the guy who thought of using monads in Haskell, but he explicitly credits Moggi for coming up with the general idea. Moggi just as clearly knew he was on to something powerful and useful (e.g. something that could lead to the introduction of higher order modules in programming languages like ADA or ML). What I would be interested in knowing is whether it was Wadler or Moggi who first realized monads (and CT) could be encoded directly in a target language, not just in a semantic metalanguage. Plus there were other people working in the same area; I just don't know the detailed history. Might be a good subject for a blog post for somebody who does. FYI I made a few corrections to my original post. -gregg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe