[Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Jon Fairbairn
Deniz Dogan deniz.a.m.do...@gmail.com writes: 2009/12/8 Jon Fairbairn jon.fairba...@cl.cam.ac.uk: Deniz Dogan deniz.a.m.do...@gmail.com writes: [...] allow hyphens in identifiers, much like in Lisp languages? E.g. hello-world would be a valid function name. I (among others) suggested it

[Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Maciej Piechotka
On Tue, 2009-12-08 at 10:56 +0100, Deniz Dogan wrote: Has there been any serious suggestion or attempt to change the syntax of Haskell to allow hyphens in identifiers, much like in Lisp languages? E.g. hello-world would be a valid function name. You mean to parse a - b differently then a-b?

[Haskell-cafe] Re: Are there standard idioms for lazy, pure error handling?

2009-12-09 Thread Heinrich Apfelmus
Nicolas Pouillard wrote: Henning Thielemann wrote: @Apfelmus: For practical purposes I think Train should have swapped type parameters in order to make Functor act on the type of the list elements. data Train b a = Wagon a (Train b a) | Loco b The functor on the

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Dan Doel
On Wednesday 09 December 2009 4:54:15 am Maciej Piechotka wrote: You mean to parse a - b differently then a-b? You don't have the problem in LISP as AFAIR you use (- a b) but in Haskell it would be a problem. About unicode - if something looks the same it should be parsed the same. I mean -

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Deniz Dogan
2009/12/9 Maciej Piechotka uzytkown...@gmail.com: On Tue, 2009-12-08 at 10:56 +0100, Deniz Dogan wrote: Has there been any serious suggestion or attempt to change the syntax of Haskell to allow hyphens in identifiers, much like in Lisp languages? E.g. hello-world would be a valid function

Re: [Haskell-cafe] Zumkeller numbers

2009-12-09 Thread Henning Thielemann
On Wed, 9 Dec 2009, Daniel Fischer wrote: Am Mittwoch 09 Dezember 2009 00:02:30 schrieb Lennart Augustsson: And if you use quotRem it's faster (unless you're running on some exotic hardware like NS32K). Yes, but Henning Thielemann was busy in the exception vs. error thread, so I didn't

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-09 Thread Ketil Malde
Tom Tobin korp...@korpios.com writes: In temporary lieu of posing questions explicitly to the SFLC, I dug up a copy of _Intellectual Property and Open Source_ by Foobar (and published by O'Reilly), and found this (from an entire chapter — Chapter 12 — about the GPL): Nevertheless, there is

Re: [Haskell-cafe] Zumkeller numbers

2009-12-09 Thread Daniel Fischer
Am Mittwoch 09 Dezember 2009 11:47:49 schrieb Henning Thielemann: On Wed, 9 Dec 2009, Daniel Fischer wrote: Am Mittwoch 09 Dezember 2009 00:02:30 schrieb Lennart Augustsson: And if you use quotRem it's faster (unless you're running on some exotic hardware like NS32K). Yes, but Henning

Re: [Haskell-cafe] Zumkeller numbers

2009-12-09 Thread David Virebayre
On Wed, Dec 9, 2009 at 11:47 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: Ist der Ruf erst ruiniert, lebt es sich ganz ungeniert. 8-] Is there an English translation of it? Google translate says : If the reputation is ruined, one can live quite openly. David.

[Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread John D. Earle
A makeshift preprocessor written say in Perl could be used to replace the embedded hyphens with underscores thereby making them synonyms. A list of ways in which hyphens are used in the language will need to be developed so they may be distinguished. You don't want a single line comment sign

[Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread John D. Earle
Oh yes I forgot. You will also need to map not merely those places where hyphens are used by the language, but also those circumstances where, wondering how to state it abstractly, anyway in string literals and such where substitutions should not

Re: [Haskell-cafe] diff implementation in haskell

2009-12-09 Thread Chris Eidhof
Also, there is a paper about doing a type-safe diff in Agda, http://portal.acm.org/citation.cfm?id=1596614.1596624 I heard rumors that the library will be ported to Haskell. -chris On 8 dec 2009, at 15:20, Bayley, Alistair wrote: From: haskell-cafe-boun...@haskell.org

[Haskell-cafe] Checking dependencies from C packages in cabal

2009-12-09 Thread Maurí­cio CA
Hi, all, When pkg-config info is not available for a library (when I could use pkgconfig-depends), what should I use to check if needed libraries are installed and to give the compiler all needed info about include files and library location? Also, is it possible to do that without configure

Re: [Haskell-cafe] diff implementation in haskell

2009-12-09 Thread Sean Leather
On Wed, Dec 9, 2009 at 13:41, Chris Eidhof wrote: Also, there is a paper about doing a type-safe diff in Agda, http://portal.acm.org/citation.cfm?id=1596614.1596624 Surprisingly, the paper also discusses a comparable implementation in Haskell. I heard rumors that the library will be ported

[Haskell-cafe] ANNOUNCE: bindings-libusb-1.4.2

2009-12-09 Thread Bas van Dijk
Hello, I just uploaded a new release of Maurício C. Antunes' bindings-libusb to hackage. See: http://hackage.haskell.org/package/bindings-libusb-1.4.2 bindings-libusb is a bindings-DSL based, low-level binding to libusb. This release adds support for the recent libusb-1.0.5. BTW, there is work

[Haskell-cafe] ANNOUNCE: usb-0.3

2009-12-09 Thread Bas van Dijk
Hello I made a new release of my usb library for high-level communication with usb devices from Haskell. See: http://hackage.haskell.org/package/usb-0.3 I made the following changes compared to the previous 0.2.0.1: - Moved the enumeration of usb devices in its own module:

[Haskell-cafe] ANNOUNCE: usb-safe-0.1

2009-12-09 Thread Bas van Dijk
Hello, My usb library provides a standard Haskell abstracting layer over bindings-libusb providing: abstract types instead of Ptrs, automatic marshalling and unmarshalling, automatic garbage collection, exceptions instead of integer return codes, etc.. While all that is very nice there are still

[Haskell-cafe] ANNOUNCE: ls-usb-0.1.0.2

2009-12-09 Thread Roel van Dijk
Hello everyone, I have released a minor update of my ls-usb program: http://hackage.haskell.org/package/ls-usb This small utility lists USB devices connected to your system. It can also show you the device descriptors, interface descriptors, vendor and product identifiers and various other

[Haskell-cafe] OpenAL and Hsndfile

2009-12-09 Thread Matthew
Yesterday, I set out to accomplish the challenge of loading and playing a sound from a file. So far, my attempts have resulted only in silence... rather disheartening after all the effort it took to get everything to build and run cleanly. I currently take the following steps: - Load samples

Re: [Haskell-cafe] Checking dependencies from C packages in cabal

2009-12-09 Thread Marc Weber
Hi Maurício, When pkg-config info is not available for a library (when I could Until you get the perfect answer you may want to have a look at the cabal definitions of zlib digest OpenGLRaw GLUT readline GLFW wxcore terminfo berkeleydb BerkeleyDB hubris pcre-light HDBC-mysql HDBC-sqlite3

[Haskell-cafe] Re: Are there standard idioms for lazy, pure error handling?

2009-12-09 Thread Duncan Coutts
On Mon, 2009-12-07 at 20:31 +0100, Henning Thielemann wrote: Somehow I missed this thread. I want to say that I have implemented a general way to add the information of an exception to the end of an arbitrary data structure.

[Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-09 Thread Roel van Dijk
Hello, I would like the announce the release of my package unicode-symbols: http://hackage.haskell.org/package/unicode-symbols It offers alternative symbols for a number of common functions and operators from the base and containers packages. When used in combination with the language extension

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-09 Thread Tom Tobin
On Wed, Dec 9, 2009 at 4:59 AM, Ketil Malde ke...@malde.org wrote: Tom Tobin korp...@korpios.com writes: If it turns out that Hakyll *is* okay to be BSD3 licensed so long as neither any binary nor the GPL'd work's source is distributed under non-GPL terms, well ... I'll say that the meaning of

pexports Was: Re: [Haskell-cafe] binding to C libraries on Windows was Low Level Audio - Writing bytes to the sound card?

2009-12-09 Thread Stephen Tetley
Hi All, Would a pure Haskell version of pexports be useful to the Haskell community? For a Sunday afternoon hack that turned out to take a bit more effort (its now Wednesday), I thought I'd code up a tool that extracts function symbols from .dll's (also when I first looked at the C pexports it

[Haskell-cafe] Re: ANNOUNCE: usb-safe-0.1

2009-12-09 Thread Bas van Dijk
On Wed, Dec 9, 2009 at 2:35 PM, Bas van Dijk v.dijk@gmail.com wrote: Hello, My usb library provides a standard Haskell abstracting layer over bindings-libusb providing: abstract types instead of Ptrs, automatic marshalling and unmarshalling, automatic garbage collection, exceptions

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-09 Thread Robert Greayer
sigh -- to the list this time. On Wed, Dec 9, 2009 at 9:16 AM, Tom Tobin korp...@korpios.com wrote: On Wed, Dec 9, 2009 at 4:59 AM, Ketil Malde ke...@malde.org wrote: Tom Tobin korp...@korpios.com writes: If it turns out that Hakyll *is* okay to be BSD3 licensed so long as neither any

Re: [Haskell-cafe] OpenAL and Hsndfile

2009-12-09 Thread stefan kersten
hi matthew, On 09.12.09 14:37, Matthew wrote: Yesterday, I set out to accomplish the challenge of loading and playing a sound from a file. So far, my attempts have resulted only in silence... rather disheartening after all the effort it took to get everything to build and run cleanly. I

Re: [Haskell-cafe] ANNOUNCE: usb-0.3

2009-12-09 Thread stefan kersten
On 09.12.09 14:35, Bas van Dijk wrote: I made a new release of my usb library for high-level communication with usb devices from Haskell. looks great, thanks! do you happen to have some example code for working with HID devices (mice, keyboards, etc.)? sk

Re: [Haskell-cafe] ANNOUNCE: usb-0.3

2009-12-09 Thread Roel van Dijk
On Wed, Dec 9, 2009 at 4:20 PM, stefan kersten s...@k-hornz.de wrote: looks great, thanks! do you happen to have some example code for working with HID devices (mice, keyboards, etc.)? The usb package does not support the various device classes directly. You won't find a function like

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Nils Anders Danielsson
On 2009-12-08 16:11, S. Doaitse Swierstra wrote: In principle it is not possible to parse left-recursive grammars [...] I suspect that this statement is based on some hidden assumption. It /is/ possible to parse many left recursive grammars using parser combinators, without rewriting the

[Haskell-cafe] Announcing a summer internship for a NASA-sponsored project

2009-12-09 Thread Lee Pike
* ANNOUNCING:* * SUMMER INTERNSHIP FOR NASA-SPONSORED PROJECT * The National Institute of Aerospace (NIA) and Galois, Inc. would like to announce a Summer Visitor

Re: [Haskell-cafe] ANNOUNCE: usb-0.3

2009-12-09 Thread stefan kersten
hi roel, On 09.12.09 16:50, Roel van Dijk wrote: On Wed, Dec 9, 2009 at 4:20 PM, stefan kersten s...@k-hornz.de wrote: looks great, thanks! do you happen to have some example code for working with HID devices (mice, keyboards, etc.)? The usb package does not support the various device

Re: [Haskell-cafe] Zumkeller numbers

2009-12-09 Thread Dan Weston
Ouch. That's what happens when you let a machine do the translation. How about: Once your good name is trashed, you can live unabashed. David Virebayre wrote: On Wed, Dec 9, 2009 at 11:47 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: Ist der Ruf erst ruiniert, lebt es sich

[Haskell-cafe] Re: Checking dependencies from C packages in cabal

2009-12-09 Thread Maurí­cio CA
Until you get the perfect answer you may want to have a look at the cabal definitions of zlib digest OpenGLRaw GLUT readline GLFW wxcore terminfo berkeleydb BerkeleyDB hubris pcre-light HDBC-mysql HDBC-sqlite3 HDBC-odbc HDBC-postgresql I do know them. But they just include needed .h and .c

[Haskell-cafe] Re: A new form of newtype

2009-12-09 Thread John Lato
From: Richard O'Keefe o...@cs.otago.ac.nz Subject: Re: [Haskell-cafe] A new form of newtype People are now writing EDSLs using Haskell to generate code for all sorts of interesting things.  What if you want to use Haskell as a host for an EDSL targeted at a 24-bit DSP? *plug* for this

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Dan Doel
On Wednesday 09 December 2009 10:51:02 am Nils Anders Danielsson wrote: On 2009-12-08 16:11, S. Doaitse Swierstra wrote: In principle it is not possible to parse left-recursive grammars [...] I suspect that this statement is based on some hidden assumption. It /is/ possible to parse many

Re: [Haskell-cafe] Re: binding to C libraries on Windows

2009-12-09 Thread Andrew Coppin
Erik de Castro Lopo wrote: There are bigger problems than that. The Microsoft compiler still doesn't support large chunks of the 1999 ISO C Standard. Seriously? OK, well that's news to me. I was under the impression that practically all C compilers in existence support the same set of

Re: [Haskell-cafe] Re: binding to C libraries on Windoww

2009-12-09 Thread Andrew Coppin
Robert Greayer wrote: It helps, I believe, if you stop thinking of MinGW with MSYS as 'a pseudo-Unix system'. They're billed as the minimal toolset required on windows to use the GNU compilers and build system (and, as everybody knows, Gnu's not Unix). The great thing about these compilers

Re: [Haskell-cafe] Haskell job opportunity

2009-12-09 Thread Andrew Coppin
siki wrote: I've posted this before but did not get a whole lot of responses, so here it is again: Principal investment firm based in Manhattan is looking for an outstanding software developer to develop and maintain the firm's proprietary valuation models as well as accounting and portfolio

[Haskell-cafe] fgetc and fputc equivalents

2009-12-09 Thread John D. Earle
Although much work has apparently gone into providing support for manipulation binary data I was unable to uncover a Haskell equivalent of the C fgetc and fputc functions. The Haskell equivalents work with Unicode character streams, not bytes words etcetera. I did find a library for handling

[Haskell-cafe] Re: fgetc and fputc equivalents

2009-12-09 Thread John D. Earle
My interest isn't actually to push around characters. I do enough of that. What I really want to do is push bits and not bytes.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Nano-Languages

2009-12-09 Thread John D. Earle
What I wrote under Allowing hyphens in identifiers and what Richard O'Keefe wrote earlier under A new form of newtype caused me to think. It was pointed out that hyphens are not permitted in Haskell identifiers much as they are in Lisp for good cause even though such a feature is regarded by

[Haskell-cafe] Re: Nano-Languages

2009-12-09 Thread John D. Earle
To help clarify my meaning Haskell would be used as an assembler language or put in another way an intermediate language for those constructs that are caught by the preprocessor for special processing. Since Haskell is a functional language I would imagine that this would be

Re: [Haskell-cafe] Re: binding to C libraries on Windoww

2009-12-09 Thread Stephen Tetley
2009/12/9 Andrew Coppin andrewcop...@btinternet.com: I see. So you're saying that while Cygwin is a Unix emulator, MinGW is just a set of Unix-style tools which run natively on Windows? Yes, in a nutshell MinGW executables are native. Executables in Cygwin may or may not have dependencies on

Re: [Haskell-cafe] Re: binding to C libraries on Windows

2009-12-09 Thread John D. Earle
There are several C standards by year of publication. There are also drafts of those standards. A C compiler may comply with a draft of the official standard before it became official, but not the official standard itself. Rarely does anyone seek full compliance with respect to any standard it

Re: [Haskell-cafe] Re: fgetc and fputc equivalents

2009-12-09 Thread Antoine Latter
On Wed, Dec 9, 2009 at 11:33 AM, John D. Earle johndea...@cox.net wrote: My interest isn't actually to push around characters. I do enough of that. What I really want to do is push bits and not bytes. I thought that fgetc and fputc worked on bytes, not bits? I've had great luck using the

Re: [Haskell-cafe] diff implementation in haskell

2009-12-09 Thread Erik de Castro Lopo
Chris Eidhof wrote: Also, there is a paper about doing a type-safe diff in Agda, http://portal.acm.org/citation.cfm?id=1596614.1596624 That is locke dbehind some ridiculous paywall. It seems the same paper is available here: http://people.cs.uu.nl/andres/GDiff.html Erik --

[Haskell-cafe] Re: fgetc and fputc equivalents

2009-12-09 Thread Ben Franksen
John D. Earle wrote: Although much work has apparently gone into providing support for manipulation binary data I was unable to uncover a Haskell equivalent of the C fgetc and fputc functions. The Haskell equivalents work with Unicode character streams, not bytes words etcetera. I did find a

Re: [Haskell-cafe] Re: binding to C libraries on Windows

2009-12-09 Thread Erik de Castro Lopo
Andrew Coppin wrote: Erik de Castro Lopo wrote: There are bigger problems than that. The Microsoft compiler still doesn't support large chunks of the 1999 ISO C Standard. Seriously? OK, well that's news to me. Yes, seriously:

Re: pexports Was: Re: [Haskell-cafe] binding to C libraries on Windows was Low Level Audio - Writing bytes to the sound card?

2009-12-09 Thread Erik de Castro Lopo
Stephen Tetley wrote: If there are compelling uses that aren't covered by pexports and would ease Haskell C binding problems on Windows, I don't mind polishing up my tool, but otherwise I've exhausted my natural interest. I think the main problem you'll face is that pexports is a windows only

[Haskell-cafe] forkSequence, runPar, parallelize (was: Re: You are in a twisty maze of concurrency libraries, all different ...)

2009-12-09 Thread Mario Blazevic
It appears there are several implementations existing on Hackage of the following function, in various disguises: runPar :: [IO a] - IO [a] the idea being that the IO computations are run in parallel, rather than sequentially. My own Streaming Component Combinators package contains a

[Haskell-cafe] Type system speculation

2009-12-09 Thread Andrew Coppin
People in the Haskell community get awfully excited about Haskell's type system. When I was first learning Haskell, I found this rather odd. After all, a type is just a flat name that tells the compiler how many bits to allocate and which operations to allow, right? As I read further, I

Re: [Haskell-cafe] Haskell job opportunity

2009-12-09 Thread Tom Davie
I have to admit, it's just one criterion too much for me. I can manage to satisfy all of them except for willing to work in Manhattan. Bob On Tue, Dec 8, 2009 at 5:54 PM, Tom Tobin korp...@korpios.com wrote: On Tue, Dec 8, 2009 at 11:09 AM, siki ga...@karamaan.com wrote: I've posted this

Re: [Haskell-cafe] forkSequence, runPar, parallelize (was: Re: You are in a twisty maze of concurrency libraries, all different ...)

2009-12-09 Thread Antoine Latter
On Wed, Dec 9, 2009 at 2:17 PM, Mario Blazevic mblaze...@stilo.com wrote:        It appears there are several implementations existing on Hackage of the following function, in various disguises:   runPar :: [IO a] - IO [a] the idea being that the IO computations are run in parallel, rather

Re: pexports Was: Re: [Haskell-cafe] binding to C libraries on Windows was Low Level Audio - Writing bytes to the sound card?

2009-12-09 Thread Stephen Tetley
Hi Erik I'm neither expecting nor obliging Unix users to do anything... pexports (the C tool) extracts function names from dlls. In one of the messages on the PortAudio thread [1], John Lask explained how to get from a standard Windows .dll to an .a file suitable for GHC (which is bundled with a

Re: [Haskell-cafe] forkSequence, runPar, parallelize (was: Re: You are in a twisty maze of concurrency libraries, all different ...)

2009-12-09 Thread Matthew Brecknell
Antoine Latter wrote: A similar function that I'm fond of: forkExec :: IO a - IO (IO a) It's cute that forkExec already has a dual operation with just the right name (specialised to IO): join :: IO (IO a) - IO a ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] forkSequence, runPar, parallelize

2009-12-09 Thread Mario Blazevic
A similar function that I'm fond of: forkExec :: IO a - IO (IO a) forkExec k = do result - newEmptyMVar _ - forkIO $ k = putMVar result return (takeMVar result) Although I don't think it can be generalized to non-IO monads. Antoine I can't test it right now, but wouldn't the

Re: pexports Was: Re: [Haskell-cafe] binding to C libraries on Windows was Low Level Audio - Writing bytes to the sound card?

2009-12-09 Thread John Lask
I think it would be a usefull addition to the haskell windows tool chain, and help facilitate the creation of bindings to libraries on windows where no appropriate import library exists. I am sure if you put it out there in whatever form, someone will find a use for it and perhaps build

Re: [Haskell-cafe] Re: Handles with their IOMode in their type

2009-12-09 Thread Bas van Dijk
On Tue, Dec 8, 2009 at 7:22 PM, Lee Houghton gm...@asztal.net wrote: I like this idea. Thanks A small observation, though: stdin :: ReadModes ioMode = Handle ioMode stdin = Handle SIO.stdin This allows writing to stdin by choosing ReadWriteMode as the ioMode. I think it would be better

Re: [Haskell-cafe] forkSequence, runPar, parallelize

2009-12-09 Thread Antoine Latter
On Wed, Dec 9, 2009 at 3:44 PM, Mario Blazevic mblaze...@stilo.com wrote:        I can't test it right now, but wouldn't the following do the job in the Identity monad? forkExec :: Identity a - Identity (Identity a) forkExec k = let result = runIdentity k             in result `par` return

Re: [Haskell-cafe] Nano-Languages

2009-12-09 Thread Stefan Holdermans
John, It might be better to go about it in a fashion similar to how one would use Haskell to create a new language using Happy, but instead of making a full fledged language create a language that makes only minor adjustments to the official language where most of the original source

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Richard O'Keefe
On Dec 9, 2009, at 10:54 PM, Maciej Piechotka wrote: You mean to parse a - b differently then a-b? You don't have the problem in LISP as AFAIR you use (- a b) but in Haskell it would be a problem. It's a problem that COBOL solved a long time ago: COMPUTE INCREASED-DEBT =

[Haskell-cafe] Re: ANNOUNCE: usb-safe-0.1

2009-12-09 Thread Bas van Dijk
On Wed, Dec 9, 2009 at 3:50 PM, Bas van Dijk v.dijk@gmail.com wrote: On Wed, Dec 9, 2009 at 2:35 PM, Bas van Dijk v.dijk@gmail.com wrote: Hello, My usb library provides a standard Haskell abstracting layer over bindings-libusb providing: abstract types instead of Ptrs, automatic

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Deniz Dogan
2009/12/9 Richard O'Keefe o...@cs.otago.ac.nz: On Dec 9, 2009, at 10:54 PM, Maciej Piechotka wrote: You mean to parse a - b differently then a-b? You don't have the problem in LISP as AFAIR you use (- a b) but in Haskell it would be a problem. It's a problem that COBOL solved a long time

Re: [Haskell-cafe] Re: can there be (hash-table using) O(n) version of this (I think currently) n log n algo?

2009-12-09 Thread Matt Morrow
Never underestimate teh power of the Int{Set,Map}: {-# LANGUAGE BangPatterns #-} import Data.Set(Set) import Data.IntSet(IntSet) import qualified Data.Set as S import qualified Data.IntSet as IS import Control.Parallel.Strategies(rnf) import Data.Monoid(Monoid(..)) import Data.List findsumsIS ::

Re: [Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-09 Thread Richard O'Keefe
On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote: I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'. No it couldn't. One expects 3÷2 to be 1½, not 1. You will, for example, find this

[Haskell-cafe] Re: Re: Allowing hyphens in identifiers

2009-12-09 Thread Maciej Piechotka
On Thu, 2009-12-10 at 11:54 +1300, Richard O'Keefe wrote: On Dec 9, 2009, at 10:54 PM, Maciej Piechotka wrote: You mean to parse a - b differently then a-b? You don't have the problem in LISP as AFAIR you use (- a b) but in Haskell it would be a problem. It's a problem that COBOL

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread John D. Earle
The problem that I see with elision resulting in juxtaposition is that it would alter the layout. Each line would not have the same number of characters before and after the makeover. Visual appearance would also be altered. Replacing hyphens with underscores as I originally proposed would

Re: [Haskell-cafe] Nano-Languages

2009-12-09 Thread John D. Earle
Stefan, I managed to look at the paper and yeah you may be onto something. I am certainly open to ideas. Looks promising. There needs to be a standard way to extend the language without having to concern oneself with everything that goes under the hood. There is certainly an interest in this.

Re: [Haskell-cafe] Re: Re: Allowing hyphens in identifiers

2009-12-09 Thread Gregory Crosswhite
On Dec 9, 2009, at 3:24 PM, Maciej Piechotka wrote: On Thu, 2009-12-10 at 11:54 +1300, Richard O'Keefe wrote: - Composition: In which first letters are not capitalized In combination of those I belive there is no disambiguoty since the lower case words functions as terminators. Except

Re: [Haskell-cafe] forkSequence, runPar, parallelize

2009-12-09 Thread Dan Weston
It's a good thing then that forkExec and return are denotationally equal (though not operationally). Otherwise, I'd be worried. Matthew Brecknell wrote: Antoine Latter wrote: A similar function that I'm fond of: forkExec :: IO a - IO (IO a) It's cute that forkExec already has a dual

Re: [Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-09 Thread James Hall
2009/12/9 Richard O'Keefe o...@cs.otago.ac.nz On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote: I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'. No it couldn't. One expects 3÷2

Re: [Haskell-cafe] forkSequence, runPar, parallelize

2009-12-09 Thread Mario Blažević
       I can't test it right now, but wouldn't the following do the job in the Identity monad? forkExec :: Identity a - Identity (Identity a) forkExec k = let result = runIdentity k             in result `par` return (Identity result) Since Identity is a newtype, would that be

Re: [Haskell-cafe] Nano-Languages

2009-12-09 Thread John D. Earle
I delved a little more deeper into http://people.cs.uu.nl/arthurb/data/Macros/Manual.pdf. I'm uncertain if I am able to understand the value of what its authors are proposing. The emphasis appears to be on extending the syntax of the language at runtime, but like so what. My impression after

[Haskell-cafe] Re: OpenAL and Hsndfile

2009-12-09 Thread jean legrand
a while ago, I wrote a minimal and inefficient code to generate and play an audible 4-second-sine sound http://hpaste.org/fastcgi/hpaste.fcgi/view?id=1538 Can you hear something with it ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Re: Allowing hyphens in identifiers

2009-12-09 Thread Richard O'Keefe
On Dec 10, 2009, at 12:24 PM, Maciej Piechotka wrote: [it appears that I have been misinformed about . vs . ] Personally I don't have any strong feelings about conventions as long as they are consistent within one language. Camel cases are no more uncommon then the underscore and they

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread Evan Laforge
On Wed, Dec 9, 2009 at 3:26 PM, John D. Earle johndea...@cox.net wrote: The problem that I see with elision resulting in juxtaposition is that it would alter the layout. Each line would not have the same number of characters before and after the makeover. Visual appearance would also be

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Nils Anders Danielsson
On 2009-12-09 18:50, Dan Doel wrote: (Your parsers aren't PEGs, are they? If so, I apologize for the redundancy.) No, my parsers use Brzozowski derivatives. See the related work section of the paper I mentioned for some other parser combinator libraries which can handle (some) left recursive

Re: [Haskell-cafe] Re: Handles with their IOMode in their type

2009-12-09 Thread Brandon S. Allbery KF8NH
On Dec 9, 2009, at 16:51 , Bas van Dijk wrote: I will change the types to: stdin :: Handle ReadMode stdout :: Handle WriteMode stderr :: Handle WriteMode Or are there scenarios where people want to write to stdin or read from stdout or stderr? These situations *do* come up; the controlling

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-09 Thread John D. Earle
Interesting point. I'll have to try what you suggested. A proportional font would lessen the need to align things up vertically. It is annoying from a typographical stand point when things are almost aligned, but a tad off and so I must admit that I am guilty as charged. Monospaced fonts

[Haskell-cafe] Re: Re: Re: Allowing hyphens in identifiers

2009-12-09 Thread Maciej Piechotka
On Wed, 2009-12-09 at 15:54 -0800, Gregory Crosswhite wrote: On Dec 9, 2009, at 3:24 PM, Maciej Piechotka wrote: On Thu, 2009-12-10 at 11:54 +1300, Richard O'Keefe wrote: - Composition: In which first letters are not capitalized In combination of those I belive there is no disambiguoty

Re: [Haskell-cafe] Natural Language Processing

2009-12-09 Thread John Meacham
On Wed, Dec 09, 2009 at 06:11:04PM -0700, John D. Earle wrote: Is Parsec capable of parsing a mildly context sensitive language? In particular does it parse a combinatory categorial grammar? Does Haskell have such tools in its shed? What sort of facilities does Haskell have for natural

Re: [Haskell-cafe] Natural Language Processing

2009-12-09 Thread John Lask
maybe this helps ... see http://www.cs.chalmers.se/~aarne/GF/ I quote from the web site: GF is a categorial grammar formalism, like ACG, CCG, but different and equipped with different tools it compiles with at least GHC 6.8.2 Is Parsec capable of parsing a mildly context sensitive language?

Re: [Haskell-cafe] Natural Language Processing

2009-12-09 Thread John D. Earle
Yes, I was referring to CCG. Thank you. -- From: John Lask jvl...@hotmail.com Sent: 09 Wednesday December 2009 1920 To: John D. Earle johndea...@cox.net Cc: Haskell Cafe haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Natural Language

Re: [Haskell-cafe] Zumkeller numbers

2009-12-09 Thread ajb
G'day all. Quoting Dan Weston weston...@imageworks.com: Ouch. That's what happens when you let a machine do the translation. How about: Once your good name is trashed, you can live unabashed. Until you've lost your reputation, you never realize what a burden it was. -- Margaret Mitchell

Re: [Haskell-cafe] Type system speculation

2009-12-09 Thread wren ng thornton
Andrew Coppin wrote: What we're really trying to do here is attach additional information to a value - information which exists only in the type checker's head, but has no effect on runtime behaviour (other than determining whether we *get* to runtime). As far as I can tell, Haskell does not

Re: [Haskell-cafe] Natural Language Processing

2009-12-09 Thread wren ng thornton
John D. Earle wrote: Is Parsec capable of parsing a mildly context sensitive language? In particular does it parse a combinatory categorial grammar? Does Haskell have such tools in its shed? What sort of facilities does Haskell have for natural language processing? If you come back at the

Re: [Haskell-cafe] Type system speculation

2009-12-09 Thread Jason Dagit
On Wed, Dec 9, 2009 at 7:47 PM, wren ng thornton w...@freegeek.org wrote: Andrew Coppin wrote: What we're really trying to do here is attach additional information to a value - information which exists only in the type checker's head, but has no effect on runtime behaviour (other than

[Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread oleg
There are at least two parser combinator libraries that can deal with *any* left-recursive grammars. That said, Prof. Swierstra's advice to try to get rid of left recursion is still well worth to follow. The first library is described in Frost, Richard, Hafiz, Rahmatullah, and

[Haskell-cafe] Re: Type system speculation

2009-12-09 Thread oleg
Andrew Coppin wrote: What we're really trying to do here is attach additional information to a value - information which exists only in the type checker's head, but has no effect on runtime behaviour (other than determining whether we *get* to runtime). As far as I can tell, Haskell does not

Re: [Haskell-cafe] Re: Handles with their IOMode in their type

2009-12-09 Thread Jason Dagit
On Wed, Dec 9, 2009 at 6:00 PM, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Dec 9, 2009, at 16:51 , Bas van Dijk wrote: I will change the types to: stdin :: Handle ReadMode stdout :: Handle WriteMode stderr :: Handle WriteMode Or are there scenarios where people want to write