Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-12 Thread Erik Hesselink
tl;dr: Breakages without upper bounds are annoying and hard to solve for package consumers. With upper bounds, and especially with sandboxes, breakage is almost non-existent. I don't see how things break with upper bounds, at least in the presence of sandboxes. If all packages involved follow the

Re: [Haskell-cafe] Hard drive thrashing with modern controllers

2012-11-12 Thread Ketil Malde
timothyho...@seznam.cz writes: import Control.Monad foo = do forever $ writeFile filename.foo Hello world! I could be wrong, but I suspect this is unlikely to result in (hardly) any disk operations at all, as long as there is _any_ write caching in the system. will that destroy those

Re: [Haskell-cafe] GHC for mobile devices?

2012-11-12 Thread Ivan Perez
I found [1] a few months ago. It outputs Java bytecode, so it should work on android. Given that Android development in java is very well supported in eclipse, you might want to use haskell/frege only for the internals of your program and keep coding your interface in Java. [1]

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-12 Thread Francesco Mazzoli
At Mon, 12 Nov 2012 11:21:42 +0800, John Lato wrote: Speaking as the ListLike maintainer, I'd like this too. But it's difficult to do so without sacrificing performance. In some cases, sacrificing *a lot* of performance. So they have to be class members. However, there's no reason

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-12 Thread Francesco Mazzoli
At Mon, 12 Nov 2012 10:26:01 +, Francesco Mazzoli wrote: Interesting. Are we sure that we can't convince GHC to inline the functions with enough pragmas? Inline and SPECIALIZE :). Francesco. ___ Haskell-Cafe mailing list

[Haskell-cafe] how to inject another source into conduit

2012-11-12 Thread Alexander V Vershilov
Hello. I have problems with writing next code (using network-conduit) slightly simplified version: app ad = appSource ad $$ sink where cMap = M.fromList [ (upload, cmdUpload), (download, cmdDownload) ] sink = takeLine = \c - case c of Just run - run ; Nothing - return ()

Re: [Haskell-cafe] GHC for mobile devices?

2012-11-12 Thread Luke Iannini
Hi All, https://github.com/ghc-ios/ghc/wiki explains how to get Stephen Blackheath's GHC fork for iOS running — it's a bumpy road (cleanups are underway) but I've got Cloud Haskell, ObjectiveHaskell, LevelDB and my own libraries running wonderfully on my iPad. I just updated the wiki with a few

Re: [Haskell-cafe] ANN: fixed-vector

2012-11-12 Thread Aleksey Khudyakov
I have a lot of one-off code where I've defined these myself. Is it possible to e.g. define vectors in R^2 and R^3, and write the p-norm functions only once? Yes. it's possible. {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} import

Re: [Haskell-cafe] JavaScript (SpiderMonkey, V8, etc) embedded in GHC?

2012-11-12 Thread Bob Hutchison
On 2012-11-10, at 2:39 PM, Simon Hengel s...@typeful.net wrote: Hi, I've looked around with no success… this surprises me actually. Has anyone embedded SpiderMonkey, V8, or any other relatively decent JavaScript interpreters in GHC (using the FFI)? I just started something [1].

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-12 Thread Alex Stangl
On Mon, Nov 12, 2012 at 08:36:49AM +0100, Bas van Dijk wrote: On 12 November 2012 04:50, Alex Stangl a...@stangl.us wrote: I'm stymied trying to figure out why the program below blows up with loop when I use f 0 If you replace the a!0 in f by its value 0, f is equivalent to: f

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-12 Thread Daniel Fischer
On Montag, 12. November 2012, 08:36:49, Bas van Dijk wrote: On 12 November 2012 04:50, Alex Stangl a...@stangl.us wrote: I'm stymied trying to figure out why the program below blows up with loop when I use f 0 If you replace the a!0 in f by its value 0, f is equivalent to: f

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-12 Thread Bas van Dijk
On 12 November 2012 14:52, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: I see no loop in that, and ghci doesn't either: Oops you're right of course. Bas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-12 Thread Johan Tibell
On Mon, Nov 12, 2012 at 1:06 AM, Erik Hesselink hessel...@gmail.com wrote: tl;dr: Breakages without upper bounds are annoying and hard to solve for package consumers. With upper bounds, and especially with sandboxes, breakage is almost non-existent. I don't see how things break with upper

Re: [Haskell-cafe] how to inject another source into conduit

2012-11-12 Thread Michael Snoyman
I don't think there's enough information in the snippet you've given to determine what the problem is. And in general, it's a good idea to include the actual error message from the compiler. On Mon, Nov 12, 2012 at 5:02 AM, Alexander V Vershilov alexander.vershi...@gmail.com wrote: Hello. I

[Haskell-cafe] Quickcheck

2012-11-12 Thread graham
Hi, Trying to find some good docs on QuickCheck, if anyone has one ? Been scanning what I can find, but a question. What would be the best way to generate two different/distinct integers ? Use arbitrary ( if so do you have an example ) or a conditional on the property. Though I read the

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-12 Thread Erik Hesselink
On Mon, Nov 12, 2012 at 5:13 PM, Johan Tibell johan.tib...@gmail.comwrote: On Mon, Nov 12, 2012 at 1:06 AM, Erik Hesselink hessel...@gmail.comwrote: tl;dr: Breakages without upper bounds are annoying and hard to solve for package consumers. With upper bounds, and especially with sandboxes,

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-12 Thread Alex Stangl
On Mon, Nov 12, 2012 at 02:52:28PM +0100, Daniel Fischer wrote: The problem, Alex, is that f k = if k 0 then f (a!0) else 0 : f 1 is strict, it needs to know the value of (a!0) to decide which branch to take. But the construction of the array a needs to know how long

Re: [Haskell-cafe] Hard drive thrashing with modern controllers

2012-11-12 Thread Brandon Allbery
On Mon, Nov 12, 2012 at 4:21 AM, Ketil Malde ke...@malde.org wrote: timothyho...@seznam.cz writes: import Control.Monad foo = do forever $ writeFile filename.foo Hello world! I could be wrong, but I suspect this is unlikely to result in (hardly) any disk operations at all, as long as

Re: [Haskell-cafe] Quickcheck

2012-11-12 Thread Simon Hengel
On Mon, Nov 12, 2012 at 07:21:06PM +, gra...@fatlazycat.com wrote: Hi, Trying to find some good docs on QuickCheck, if anyone has one ? Been scanning what I can find, but a question. What would be the best way to generate two different/distinct integers ? I would use Quickcheck's

Re: [Haskell-cafe] curl package broken in Windows

2012-11-12 Thread Iavor Diatchki
Hi, the curl binding certainly needs some love---if anyone has the time to fix it up and maintain it, help would be most appreciated. There is a repo for it over here: https://github.com/GaloisInc/curl which is the most up-to date version I know of, but since the last commit there seems to be

Re: [Haskell-cafe] curl package broken in Windows

2012-11-12 Thread Iustin Pop
On Mon, Nov 12, 2012 at 01:48:23PM -0800, Iavor Diatchki wrote: Hi, the curl binding certainly needs some love---if anyone has the time to fix it up and maintain it, help would be most appreciated. There is a repo for it over here: https://github.com/GaloisInc/curl which is the most up-to

Re: [Haskell-cafe] Quickcheck

2012-11-12 Thread Iustin Pop
On Mon, Nov 12, 2012 at 10:14:30PM +0100, Simon Hengel wrote: On Mon, Nov 12, 2012 at 07:21:06PM +, gra...@fatlazycat.com wrote: Hi, Trying to find some good docs on QuickCheck, if anyone has one ? Been scanning what I can find, but a question. What would be the best way to

Re: [Haskell-cafe] curl package broken in Windows

2012-11-12 Thread Iustin Pop
On Mon, Nov 12, 2012 at 10:57:25PM +0100, Iustin Pop wrote: On Mon, Nov 12, 2012 at 01:48:23PM -0800, Iavor Diatchki wrote: Hi, the curl binding certainly needs some love---if anyone has the time to fix it up and maintain it, help would be most appreciated. There is a repo for it over

[Haskell-cafe] Reminder and Forward: Wednesday 14 November 2012 NYHUG Inaugural Meetup: Ozgun Ataman on Practical Data Processing and Gershom Bazerman on Putting Cloud Haskell to Work

2012-11-12 Thread Jay Sulzberger
Below is a version of the announcement sent to the haskell-cafe and the haskell mailing lists by Gershom Bazerman on 9 October 2012. oo--JS. blockquote what=official New York Haskell Users Group announcement rsvp=Yes, see below.

Re: [Haskell-cafe] curl package broken in Windows

2012-11-12 Thread Iavor Diatchki
Hi, Ok, there were only minor differences between the repo and the version on hackage so I imported the changes into the repo, which should now be the same as version 1.3.7 on hackage. Please feel free to submit merge requestsall the folks I know who worked on this originally are busy with

Re: [Haskell-cafe] How to determine correct dependency versions for a library?

2012-11-12 Thread eyal.lo...@gmail.com
Especially in the case of base, not sure how upper bounds help at all: If incompatible, you break with or without upper bounds. Actually getting errors related to Num instances is more informative IMO. If compatible, you just get false negatives and errors. In either case cabal can't install

Re: [Haskell-cafe] curl package broken in Windows

2012-11-12 Thread Michael Orlitzky
On 11/12/12 17:43, Iavor Diatchki wrote: Hi, Ok, there were only minor differences between the repo and the version on hackage so I imported the changes into the repo, which should now be the same as version 1.3.7 on hackage. Please feel free to submit merge requestsall the folks I know

Re: [Haskell-cafe] ANN: fixed-vector

2012-11-12 Thread Michael Orlitzky
On 11/12/12 01:57, Carter Schonwald wrote: Michael, I think that calls for a type-class! (though I imagine theres a slicker way of writing it) I'm already using typeclasses, but there's still a bit of boilerplate. I could probably think of something more clever myself, but like I said, these

Re: [Haskell-cafe] ANN: fixed-vector

2012-11-12 Thread Michael Orlitzky
On 11/12/12 07:05, Aleksey Khudyakov wrote: I have a lot of one-off code where I've defined these myself. Is it possible to e.g. define vectors in R^2 and R^3, and write the p-norm functions only once? Yes. it's possible. {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-}

Re: [Haskell-cafe] JavaScript (SpiderMonkey, V8, etc) embedded in GHC?

2012-11-12 Thread Simon Hengel
Out of curiosity: wouldn't it make more sense to focus on the other direction (calling Haskell from V8)? Roughly like: I guess it really depends what you are after. If you want to cabalize existing JS libs, then I think bindings to V8 make perfect sense ;) Cheers, Simon