Re: [Haskell-cafe] class Bytestringable or ToBytestring

2012-11-23 Thread Silvio Frischknecht
i recently found the convertible package http://hackage.haskell.org/packages/archive/convertible/1.0.11.1/doc/html/Data- Convertible-Base.html convert :: Convertible a b = a - b I've only used it once but it looks good to me. sure the type checker does not guartantee that you get a ByteString

Re: [Haskell-cafe] Cabal failures...

2012-11-23 Thread kudah
Personally, I successfully use Wine to build, ship and test for Windows. There are some pitfalls related to -optl-mwindows and encodings, but, if you launch your program with $LANG set to proper windows encoding like cp1251 and the std handles closed with 0- 1- 2-, it should crash on related

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-23 Thread Jacques Carette
On 22/11/2012 11:52 AM, Brandon Allbery wrote: On Thu, Nov 22, 2012 at 7:56 AM, Jacques Carette care...@mcmaster.ca mailto:care...@mcmaster.ca wrote: On 20/11/2012 6:08 PM, Richard O'Keefe wrote: On 21/11/2012, at 4:49 AM, c...@lavabit.com mailto:c...@lavabit.com wrote:

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-23 Thread Jacques Carette
On 22/11/2012 7:37 PM, Richard O'Keefe wrote: On 23/11/2012, at 1:56 AM, Jacques Carette wrote: Actually, here I disagree. It might be much 'easier' for the programmers to do it for a small core language, but it may turn out to be much, much less effective. I 'discovered' this when

[Haskell-cafe] Portability of Safe Haskell packages

2012-11-23 Thread Roman Cheplyaka
It has been pointed out before that in order for Safe Haskell to be useful, libraries (especially core libraries) should be annotated properly with Safe Haskell LANGUAGE pragmas. However, that would make these libraries unusable with alternative Haskell implementations, even if otherwise they

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-23 Thread Mike Meyer
Jacques Carette care...@mcmaster.ca wrote: On 22/11/2012 11:52 AM, Brandon Allbery wrote: On Thu, Nov 22, 2012 at 7:56 AM, Jacques Carette care...@mcmaster.ca mailto:care...@mcmaster.ca wrote: On 20/11/2012 6:08 PM, Richard O'Keefe wrote: On 21/11/2012, at 4:49 AM,

[Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-23 Thread Janek S.
I am using Criterion library to benchmark C code called via FFI bindings and I've ran into a problem that looks like a bug. The first benchmark that uses FFI runs correctly, but subsequent benchmarks run much longer. I created demo code (about 50 lines, available at github:

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-23 Thread Jacques Carette
On 23/11/2012 9:59 AM, Mike Meyer wrote: [...] I have to ask if your core language for Maple was larger than Maple? Yes. Maple 10 had 62 cases in its AST, we had 75 (p.13 of [1]) Jacques [1] http://www.cas.mcmaster.ca/~carette/publications/scp_MaplePE.pdf

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-23 Thread Edward Z. Yang
Hello Janek, What happens if you do the benchmark without unsafePerformIO involved? Edward Excerpts from Janek S.'s message of Fri Nov 23 10:44:15 -0500 2012: I am using Criterion library to benchmark C code called via FFI bindings and I've ran into a problem that looks like a bug. The

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-23 Thread Janek S.
What happens if you do the benchmark without unsafePerformIO involved? I removed unsafePerformIO, changed copy to have type Vector Double - IO (Vector Double) and modified benchmarks like this: bench C binding $ whnfIO (copy signal) I see no difference - one benchmark runs fast, remaining

Re: [Haskell-cafe] Portability of Safe Haskell packages

2012-11-23 Thread Bas van Dijk
On 23 November 2012 15:47, Roman Cheplyaka r...@ro-che.info wrote: Should it be advised to surround safe annotations with CPP #ifs? Or does anyone see a better way out of this contradiction? I think that would be good advice. Note that even if you're only using GHC then you still want to use

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-23 Thread Edward Z. Yang
Running the sample code on GHC 7.4.2, I don't see the one fast, rest slow behavior. What version of GHC are you running? Edward Excerpts from Janek S.'s message of Fri Nov 23 13:42:03 -0500 2012: What happens if you do the benchmark without unsafePerformIO involved? I removed

Re: [Haskell-cafe] Portability of Safe Haskell packages

2012-11-23 Thread Roman Cheplyaka
* Herbert Valerio Riedel h...@gnu.org [2012-11-24 00:06:44+0100] Roman Cheplyaka r...@ro-che.info writes: It has been pointed out before that in order for Safe Haskell to be useful, libraries (especially core libraries) should be annotated properly with Safe Haskell LANGUAGE pragmas.

[Haskell-cafe] ANNOUNCE: rethinkdb 0.1.0

2012-11-23 Thread Etienne Laurin
Greetings, I am pleased to announce a Haskell client library for RethinkDB[1]. RethinkDB[2] is a newly released, open source, distributed database. Its simple yet powerful API seemed well suited to be accessed from a language like Haskell. This haskell library is modelled upon the existing

Re: [Haskell-cafe] ANNOUNCE: rethinkdb 0.1.0

2012-11-23 Thread Brandon Allbery
On Fri, Nov 23, 2012 at 7:03 PM, Etienne Laurin etie...@atnnn.com wrote: What is the advantage of RethinkDB? [4] [4] http://www.quora.com/RethinkDB/What-is-the-advantage-of-RethinkDB-over-MongoDB How about a URL for those who prefer not to be sold by Facebook? -- brandon s allbery kf8nh

Re: [Haskell-cafe] ANNOUNCE: rethinkdb 0.1.0

2012-11-23 Thread Etienne Laurin
http://www.quora.com/RethinkDB/What-is-the-advantage-of-RethinkDB-over-MongoDB How about a URL for those who prefer not to be sold by Facebook? Sorry I did not realise there was an intrusive login dialog on that page. You can click on the close link in the login dialog to view the content of

Re: [Haskell-cafe] Cabal failures...

2012-11-23 Thread Erik de Castro Lopo
kudah wrote: Personally, I successfully use Wine to build, ship and test for Windows. There are some pitfalls related to -optl-mwindows and encodings, but, if you launch your program with $LANG set to proper windows encoding like cp1251 and the std handles closed with 0- 1- 2-, it should

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-23 Thread wren ng thornton
On 11/20/12 6:54 AM, c...@lavabit.com wrote: Hello, I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it impossible (very hard) to directly translate high-level

Re: [Haskell-cafe] isLetter vs. isAlpha

2012-11-23 Thread wren ng thornton
On 11/21/12 4:59 PM, Artyom Kazak wrote: I saw a question on StackOverflow about the difference between isAlpha and isLetter today. One of the answers stated that the two functions are interchangeable, even though they are implemented differently. I decided to find out whether the difference in

Re: [Haskell-cafe] Cabal failures...

2012-11-23 Thread kudah
On Sat, 24 Nov 2012 13:46:37 +1100 Erik de Castro Lopo mle...@mega-nerd.com wrote: kudah wrote: Personally, I successfully use Wine to build, ship and test for Windows. There are some pitfalls related to -optl-mwindows and encodings, but, if you launch your program with $LANG set to

[Haskell-cafe] Quasiquotation page on HaskellWiki needs updating

2012-11-23 Thread Erik de Castro Lopo
Hi all, It seems the Quasiquotation page on HaskellWiki http://www.haskell.org/haskellwiki/Quasiquotation has fallen behind the actually Quasiquotation implementation that is in ghc-7.4.2 and later. Specifically, the QuasiQuoter constructor that the Wiki takes two parameters: data

[Haskell-cafe] Is there a tool like ri from ruby?

2012-11-23 Thread Magicloud Magiclouds
RI is a very easy using tool that search and show the documents of ruby modules/functions, etc. Using RI, I could get help when programming with a few commands. Quick and simple. And with RI backend (libs), I could also simply integrate ri to my IDE (like one hotkey to show function summary). So

[Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?

2012-11-23 Thread Dan
Because I see there are many preferences on what IDE to use for Haskell I've created a quick survey on this topic. Please click here and select your choices from the lists. http://kwiksurveys.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. (if any is missing, etc)

Re: [Haskell-cafe] Is there a tool like ri from ruby?

2012-11-23 Thread Tikhon Jelvis
Have you tried Hoogle? I know you can install it locally and use it from GHCi or Emacs. I'm not familiar with ri, but from your description I think a local Hoogle would serve the same purpose with the added benefit of being able to search by types. Here's the wiki page about it:

Re: [Haskell-cafe] Survey: What are the more common Haskell IDEs in use ?

2012-11-23 Thread Erik de Castro Lopo
Dan wrote: Because I see there are many preferences on what IDE to use for Haskell I've created a quick survey on this topic. Please click here and select your choices from the lists. http://kwiksurveys.com/s.asp?sid=oqr42h4jc8h0nbc53652 Any comments/suggestions are welcome. I use