Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-22 Thread oleg
At present we can easily express different flavors of conjunction, but expressing disjunction is hard. Disjunction is not particularly difficult. See, for example, http://okmij.org/ftp/Haskell/TTypeable/TTypeable.hs and search for ORELSE. The code demonstrates higher-order

Re: [Haskell-cafe] Un-memoization

2012-03-22 Thread L Corbijn
On Mar 22, 2012 2:56 AM, Victor Miller victorsmil...@gmail.com wrote: I was writing a Haskell program which builds a large labeled binary tree and then does some processing of it, which is fold-like. In the actual application that I have in mind the tree will be *huge*. If the whole tree is

[Haskell-cafe] Munich Haskell Meeting

2012-03-22 Thread Heinrich Hördegen
Dear all, once again, it's time for our monthly Haskell get-together in Munich. On Wed, 28 Feb 2012, at 19h30, we will meet at Cafe Puck (near the universities). Everybody is invited. If you plan to join, please go to: http://www.haskell-munich.de/dates and add yourself. This will help to

[Haskell-cafe] Regarding Haskell FFI for C/C++ (Passing of String)

2012-03-22 Thread rajendra prasad
Hi, I have just started learning Haskell FFI. I am trying to send a string from hastell to a C function. For this, I am required to convert the haskell string to byte string. I have two methods to achieve this task. Both are listed below: 1) import Foreign.C.String let arg1 = map

Re: [Haskell-cafe] Regarding Haskell FFI for C/C++ (Passing of String)

2012-03-22 Thread Yves Parès
This joins the question I asked two days ago here. (See http://haskell.1045720.n5.nabble.com/Quickest-way-to-pass-Text-to-C-code-td5582223.html ) Hope that helps. Le 22 mars 2012 15:10, rajendra prasad rajendradpra...@gmail.com a écrit : Hi, I have just started learning Haskell FFI. I am

Re: [Haskell-cafe] Regarding Haskell FFI for C/C++ (Passing of String)

2012-03-22 Thread Yves Parès
(Sorry for the double post) Forget about ByteString.Char8: it doesn't handle unicode as it truncates characters. Going from String to bytestring is easy thanks to the utf8-string ( http://hackage.haskell.org/packages/archive/utf8-string/0.3.7/doc/html/Codec-Binary-UTF8-String.html) package and

[Haskell-cafe] Puzzled about inlining and specialise inline under ghc -O2

2012-03-22 Thread Rafal Kolanski
Dear Haskell-Cafe, I'm computing a histogram of a bunch of symbols with up to 8 bits of information each, stored in a unboxed vector of Word8. The histogram is represented as an unboxed vector of Int with size 2^bits. I compute the histogram by folding an increment function. The problem:

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2012-03-22 Thread Heinrich Apfelmus
serialhex wrote: On Sat, Mar 17, 2012 at 11:01 AM, Heinrich Apfelmus apfel...@quantentunnel.de wrote: The task is to implement a small audio synthesizer in Haskell. seriously?!?! i'm not in his class, but i'm game! i learn better when i'm working on something interesting, and i want to make

[Haskell-cafe] haskell-platform vs macports

2012-03-22 Thread Warren Harris
I assume that many haskell users out there on macs who are also users of macports, and I bet they've hit this same issue that I've hit numerous times. The problem is that there are 2 incompatible versions of libiconv -- one that ships with the mac, and one that's built with macports and that

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2012-03-22 Thread Tom Murphy
If you want to do Haskell audio synthesis, you could also use hsc3 (good start here: http://slavepianos.org/rd/ut/hsc3-texts/). With hsc3 you can start on serious audio synthesis with only a few lines of Haskell. In my opinion it could use a much larger community. Tom On 3/22/12, Heinrich

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2012-03-22 Thread Tom Murphy
Sorry; make that http://slavepianos.org/rd/ut/hsc3-texts/hsc3-tutorial.html On 3/22/12, Tom Murphy amin...@gmail.com wrote: If you want to do Haskell audio synthesis, you could also use hsc3 (good start here: http://slavepianos.org/rd/ut/hsc3-texts/). With hsc3 you can start on serious

Re: [Haskell-cafe] Un-memoization

2012-03-22 Thread Stephen Tetley
Hi Victor There was a paper at one of the early PADL conferences describing out-out-core data structures in Ocaml. I've never seen anyone following up this work, possibly because RAM has got so cheap in the last decade. If you have such large trees you may find the paper interesting. Although

Re: [Haskell-cafe] good lightweight web-framework like sinatra?

2012-03-22 Thread Mark Wotton
Try Miku. https://github.com/nfjinjing/miku some oddnesses around redefining (-) (I guess Jinjing Wang doesn't like the way $ looks?) but you don't need to import the Air.Light stuff. Otherwise more or less a straight port of sinatra, and you can run it on heroku... mark On Wed, Mar 21, 2012

[Haskell-cafe] [ANNOUNCE] vector-conduit

2012-03-22 Thread Jared Hance
I've released a small (one-module) library [1] inspired by functions in Data.Conduit.List like sourceList, consumeList, and take. The most recent (by a few days) depends on conduit-0.3.*, but vector-conduit-0.2.1.0 depends on conduit-0.2.*. Notably, however, the two have different APIs (0.3 has

Re: [Haskell-cafe] [ANNOUNCE] vector-conduit

2012-03-22 Thread Felipe Almeida Lessa
Nice package! An idea for sourceVector is to use the streaming interface [1]. It would be nice if GHC could fuse the array with sourceVector, avoiding to produce the array in the first place, but I'm not going to hold my breath =). Cheers, [1]

Re: [Haskell-cafe] [ANNOUNCE] vector-conduit

2012-03-22 Thread Jared Hance
On Thu, Mar 22, 2012 at 06:16:39PM -0300, Felipe Almeida Lessa wrote: From: Felipe Almeida Lessa felipe.le...@gmail.com To: Jared Hance jaredha...@gmail.com Cc: haskell-cafe@haskell.org Date: Thu, 22 Mar 2012 18:16:39 -0300 Subject: Re: [Haskell-cafe] [ANNOUNCE] vector-conduit Nice

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2012-03-22 Thread erik flister
giving a real-time audio synthesizer in the style of functional reactive programming. you know about yampasynth right? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [ANNOUNCE] vector-conduit

2012-03-22 Thread Felipe Almeida Lessa
On Thu, Mar 22, 2012 at 8:03 PM, Jared Hance jaredha...@gmail.com wrote: I looked over it and decided to simply go with head/tail (not sure why I used the index thing... head/tail is so much more functional). That should still get some fusion benefit, right, since it all uses streams under the

Re: [Haskell-cafe] haskell-platform vs macports

2012-03-22 Thread Thomas Schilling
If you're not otherwise attached to MacPorts, you might want to check out Homebrew [1]. Its integration with the rest of OS X is generally more smoothly and I haven't come across any missing packages yet. [1]: http://mxcl.github.com/homebrew/ On 22 March 2012 16:34, Warren Harris

Re: [Haskell-cafe] haskell-platform vs macports

2012-03-22 Thread Warren Harris
Thomas, Thanks for the recommendation. I tried installing with homebrew, and it went fairly smoothly. Only 12 minutes to build haskell-platform, as opposed to the 11 hours to run port upgrade outdated yesterday! I did have to get help on one thing though. Although the mac ships with

Re: [Haskell-cafe] [ANNOUNCE] vector-conduit

2012-03-22 Thread Jared Hance
On Thu, Mar 22, 2012 at 07:31:18PM -0300, Felipe Almeida Lessa wrote: From: Felipe Almeida Lessa felipe.le...@gmail.com To: haskell-cafe@haskell.org Date: Thu, 22 Mar 2012 19:31:18 -0300 Subject: Re: [Haskell-cafe] [ANNOUNCE] vector-conduit On Thu, Mar 22, 2012 at 8:03 PM, Jared Hance

Re: [Haskell-cafe] good lightweight web-framework like sinatra?

2012-03-22 Thread Conrad Parker
On 23 March 2012 04:55, Mark Wotton mwot...@gmail.com wrote: Try Miku. https://github.com/nfjinjing/miku some oddnesses around redefining (-) (I guess Jinjing Wang doesn't like the way $ looks?) but you don't need to import the Air.Light stuff. Otherwise more or less a straight port of

[Haskell-cafe] Parallelism causes space leaks

2012-03-22 Thread Yavuz Yetim
Hi, For the code below, where it says HERE in comments, if I remove the part after `using` the code works fine. However, with this version it causes a Stack space overflow (if allowed uses GBs of memory). You just need to input a file with around 1M lines each having something like Int Value: 3