Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread wren ng thornton
On 2/2/11 11:25 PM, Maciej Wos wrote: I think the problem is that the iteratee you give to I.convStream always returns Just [something] while you should return Nothing on EOF. That makes sense for the hanging problem (which I only noticed during debugging). Though I still get the the same

Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread oleg
I agree with Maciej Wos' diagnosis and solution. I'd like to point out that the Tiff library has to do a similar processing: use an iteratee to read bytes from the outer stream and to produce elements for the inner stream (e.g., signed 32-bit integers). In your version of the Iteratee library,

Re: [Haskell-cafe] Another Question

2011-02-03 Thread Ketil Malde
Navin Rustagi navin_ku...@yahoo.com writes: It gives the error ERROR - Control stack overflow. I assume it is because of the lazy evaluation. Yes, you're just building a tower of additions, and when evaluating this, you blow up the stack. You need to make sure to evaluate the tuple element

Re: [Haskell-cafe] Status update on {code, trac, projects, planet, community}.haskell.org

2011-02-03 Thread Roman Cheplyaka
* Duncan Coutts duncan.cou...@googlemail.com [2011-02-02 01:33:22+] These are all hosted on the community server. The community server was hacked on the 26th January and we took it offline. The server was running an old version of debian that was no longer supported with security updates.

Re: [Haskell-cafe] Another Question

2011-02-03 Thread Roman Cheplyaka
Hi Navin, next time, could you please choose more informative subject for your emails to the mailing list? It is read by many people, and choosing a good subject will save them a lot of time. In this case, something like Stack overflow or How to make a function strict would do. Thanks. --

[Haskell-cafe] Haskell procedure

2011-02-03 Thread Houdini
One :Thank you Carsten Schultz,Daniel Fischer,Mihai and all the other for your help. Two:After my last post I wrote some function that should help me in the future,but I need some help with the followint as I'm tired and have to fit in a schedule.I know it is long so I'll try and explain it as

[Haskell-cafe] How to #include into .lhs files?

2011-02-03 Thread Conal Elliott
Does anyone have a working example of #include'ing Haskell code into a bird-tracks-style .lhs file with GHC? Every way I try leads to parsing errors. Is there documentation about how it's supposed to work? Help much appreciated. - Conal ___

[Haskell-cafe] problem with instance method

2011-02-03 Thread Patrick Browne
Hi, I am studying type classes using examples from the literature [1]. The attached code is a formalization of basic object oriented ideas. The particular approach seems to be built on the concepts of: thing, object, and identifier. I have no intension to implement anything or significantly change

Re: [Haskell-cafe] problem with instance method

2011-02-03 Thread Ivan Lazar Miljenovic
On 3 February 2011 21:09, Patrick Browne patrick.bro...@dit.ie wrote: Hi, I am studying type classes using examples from the literature [1]. The attached code is a formalization of basic object oriented ideas. The particular approach seems to be built on the concepts of: thing, object, and

Re: [Haskell-cafe] Inheritance and Wrappers

2011-02-03 Thread Ozgur Akgun
On 3 February 2011 02:35, Brandon Moore brandon_m_mo...@yahoo.com wrote: Here's one thing to consider: Can you write a function f :: (Data a) = a - String f x = termTag x It would seem the Data a = Term a instance justifies this function, and it will always use the default instance.

Re: [Haskell-cafe] problem with instance method

2011-02-03 Thread Tom Nielsen
No, obj is a method of the Objects class. you've already declared it in the instance of Objects Object your code works just fine here. adding: mycar = Car Blue o:: Object Car Integer o = obj mycar 4 ghci says... *Objects :t obj obj :: (Objects o t i) = t - i - o t i *Objects o Obj (Car

Re: [Haskell-cafe] How to #include into .lhs files?

2011-02-03 Thread Daniel Fischer
On Thursday 03 February 2011 10:33:23, Conal Elliott wrote: Does anyone have a working example of #include'ing Haskell code into a bird-tracks-style .lhs file with GHC? Every way I try leads to parsing errors. Is there documentation about how it's supposed to work? Help much appreciated. -

[Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread C K Kashyap
Hi, I've been working on a Haskell based platform independent graphics rendering using VNC. I'd like it very much if you could take a look at it and give me feedback. Using it is straight forward - git clone g...@github.com:ckkashyap/Chitra.git cd Chitra make ./Main 100 100 5900 Main starts off

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Krzysztof Skrzętnicki
One thing to notice: $ cabal install network-server is needed. Best regards, Krzysztof Skrzętnicki On Thu, Feb 3, 2011 at 12:15, C K Kashyap ckkash...@gmail.com wrote: Hi, I've been working on a Haskell based platform independent graphics rendering using VNC. I'd like it very much if you

Re: [Haskell-cafe] Status update on {code, trac, projects, planet, community}.haskell.org

2011-02-03 Thread Duncan Coutts
On Thu, 2011-02-03 at 10:37 +0200, Roman Cheplyaka wrote: * Duncan Coutts duncan.cou...@googlemail.com [2011-02-02 01:33:22+] These are all hosted on the community server. The community server was hacked on the 26th January and we took it offline. The server was running an old version

Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread John Lato
From: wren ng thornton w...@freegeek.org On 2/2/11 11:25 PM, Maciej Wos wrote: I think the problem is that the iteratee you give to I.convStream always returns Just [something] while you should return Nothing on EOF. That makes sense for the hanging problem (which I only noticed during

Re: [Haskell-cafe] Yesod and concurrency

2011-02-03 Thread Ertugrul Soeylemez
Michael Snoyman mich...@snoyman.com wrote: On Mon, Jan 31, 2011 at 1:09 PM, Ertugrul Soeylemez e...@ertes.de wrote: how well do WAI, Yesod and the 'persistent' package play with concurrency?  For example, I'd like to write a program, which concurrently provides two related sites as well

[Haskell-cafe] PhD Studentships in Functional Programming, Nottingham

2011-02-03 Thread Henrik Nilsson
Apologies for multiple copies. Best, /Henrik -- Henrik Nilsson School of Computer Science The University of Nottingham n...@cs.nott.ac.uk +--+ PhD Studentships in Functional Programming School of

Re: [Haskell-cafe] Yesod and concurrency

2011-02-03 Thread Michael Snoyman
On Thu, Feb 3, 2011 at 3:14 PM, Ertugrul Soeylemez e...@ertes.de wrote: Michael Snoyman mich...@snoyman.com wrote: On Mon, Jan 31, 2011 at 1:09 PM, Ertugrul Soeylemez e...@ertes.de wrote: how well do WAI, Yesod and the 'persistent' package play with concurrency?  For example, I'd like to

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Ryan Yates
Hi Kashyap, What a fun project! I was able to build and run on Windows (GHC 6.12.3 and TightVNC 1.4.4) with a few minor changes: Remove from Chitra\Canvas.hs import Network.Server import Network.Socket I think these are artifacts from a previous version and are not used. For whatever reason

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Christian Maeder
Am 03.02.2011 12:15, schrieb C K Kashyap: Hi, I've been working on a Haskell based platform independent graphics rendering using VNC. I'd like it very much if you could take a look at it and give me feedback. Using it is straight forward - git clone g...@github.com:ckkashyap/Chitra.git

[Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Max Cantor
I originally posted this on haskell-GHC-users, but was curious how the wider community felt. The last 32-bit, Intel Mac was the Mac Mini, discontinued in August 2007. The bulk of them were discontinued in 2006, along with PowerPC Macs. Does it make sense to relegate OSX x86_64 to community

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread C K Kashyap
maeder@leibniz:/local/maeder git clone g...@github.com: ckkashyap/Chitra.git Initialized empty Git repository in /local/maeder/Chitra/.git/ Permission denied (publickey). fatal: The remote end hung up unexpectedly maeder@leibniz:/local/maeder git --version git version 1.7.1 What

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Ryan Yates
I think you want: git clone git://github.com/ckkashyap/Chitra.git On Thu, Feb 3, 2011 at 10:50 AM, Christian Maeder christian.mae...@dfki.dewrote: Am 03.02.2011 12:15, schrieb C K Kashyap: Hi, I've been working on a Haskell based platform independent graphics rendering using VNC. I'd

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread C K Kashyap
Attached is the Cabal file I used to build (it wasn't clear what license things are under so those fields are commented out). Thanks a ton Rayan ... I am glad you liked it. I've checked in the cabal file - I am not familiar with it though ... how exactly can I use it to build the project?

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Christian Maeder
Am 03.02.2011 17:20, schrieb C K Kashyap: Oops, you can use git://github.com/ckkashyap/Chitra.git http://github.com/ckkashyap/Chitra.git - sorry about that. You can also visit https://github.com/ckkashyap/Chitra Thanks, I cannot get it to run with my vncviewer (TightVNC Viewer version 1.3.9)

[Haskell-cafe] ANNOUNCE: Database Supported Haskell (DSH)

2011-02-03 Thread George Giorgidze
I am pleased to announce that Database Supported Haskell (DSH) has been released on Hackage [1]. DSH is a Haskell library for database-supported program execution. Using this library a relational database management system (RDBMS) can be used as a coprocessor for the Haskell programming language,

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread C K Kashyap
Thanks, I cannot get it to run with my vncviewer (TightVNC Viewer version 1.3.9) How should I call vncviewer and your Main binary? ./Main 200 200 5900 after this, the program should start listening to port 5900 You can check if things are fine by telneting to localhost:5900, you should

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Christian Maeder
Am 03.02.2011 18:05, schrieb C K Kashyap: ck@ck-desktop:~/lab/Chitra$ telnet localhost 5900 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. RFB 003.003 After this, you can use vncviewer to connect to localhost (5900 is the default port for vnc) Right,

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread Christian Maeder
Maybe these messages are also important? Client Said :: RFB 003.003 Sharing enabled SET PIXEL FORMAT called bpp = 32 depth = 24 big endian = 0 trueColor = 1 RED MAX = 255 GREEN MAX = 255 blueMax = 255 red shift = 16 green shift = 8 blue shift = 0 SetEncodings Command 14 0

[Haskell-cafe] Haskell Functions

2011-02-03 Thread Manolache Andrei-Ionut
I need help with two functionsfirst this is the curent code :http://pastebin.com/UPATJ0r -Function 1)removeTautologies :: Formula-Formula If in a clause, a literal and its negation are found, it means that the clause will be true, regardless of the value finally assigned to that

[Haskell-cafe] hsmagick on OSX 10.6

2011-02-03 Thread Max Cantor
Just out of curiosity, has anyone gotten this to work? I'm getting bus errors whenever I call readImage. If anyone out there has gotten it working and would tell me which versions they're using of the relevant bits, that would be very much appreciated. Also, I'll post all my debug info if

Re: [Haskell-cafe] Haskell Functions

2011-02-03 Thread Ozgur Akgun
On 3 February 2011 18:33, Manolache Andrei-Ionut andressocrate...@yahoo.com wrote: first this is the curent code :http://pastebin.com/UPATJ0r There is no code on that page. (It has expired, probably?) -- Ozgur Akgun ___ Haskell-Cafe mailing list

[Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread michael rice
Given the first program, it seems that the unchanging first element of the tuple could be handled by a Reader monad, leading to the second program, where b becomes the state, but how do I get the constant a from the Reader monad? Michael == import Control.Monad.State type

Re: [Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread Thomas Davie
Is the idea here merely an exercise in using the state monad? This can be easily performed using pure code. Bob On 3 Feb 2011, at 19:18, michael rice wrote: Given the first program, it seems that the unchanging first element of the tuple could be handled by a Reader monad, leading to the

Re: [Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread Daniel Fischer
On Thursday 03 February 2011 20:18:43, michael rice wrote: Given the first program, it seems that the unchanging first element of the tuple could be handled by a Reader monad, leading to the second program, where b becomes the state, but how do I get the constant a from the Reader monad? You

Re: [Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread Ozgur Akgun
On 3 February 2011 19:18, michael rice nowg...@yahoo.com wrote: but how do I get the constant a from the Reader monad? http://hackage.haskell.org/packages/archive/transformers/latest/doc/html/Control-Monad-Trans-Reader.html#v:ask You also need to change the type to use ReaderT. -- Ozgur

Re: [Haskell-cafe] Haskell Functions

2011-02-03 Thread Ozgur Akgun
(CCing haskell-cafe again) Is this an homework question? On 3 February 2011 20:30, Manolache Andrei-Ionut andressocrate...@yahoo.com wrote: http://pastebin.com/GxQBh3hx http://pastebin.com/GxQBh3hx --- On *Thu, 2/3/11, Ozgur Akgun ozgurak...@gmail.com* wrote: From: Ozgur Akgun

Re: [Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread michael rice
Hi Daniel, Ok, but what I was looking for was ReaderT on top, State on the bottom. This is very confusing material, with no apparent conceptual commonality (ad hoc comes to mind) among the many examples I've looked at. Sometimes lift is used, other times a lift helper function, and in this

[Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Steffen Schuldenzucker
Dear cafe, does anyone have an explanation for this?: error (error foo) *** Exception: foo error $ error foo *** Exception: *** Exception: foo -- Steffen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell Functions

2011-02-03 Thread Houdini
A project...this are my last questions,I'm not proeficient in haskell...this explains why Im stuck... http://pastebin.com/GxQBh3hx -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-Functions-tp3369769p3369938.html Sent from the Haskell - Haskell-Cafe mailing list

[Haskell-cafe] Byte Histogram

2011-02-03 Thread Andrew Coppin
There now follows a small grab-bag of miscelaneous but related thoughts. (Which probably means that this post will spawn a 2000 message thread discussing one tiny side-issue, rather than the main thrust of the message...) First of all, benchmarking. We have The Great Language Shootout,

Re: [Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread Daniel Fischer
On Thursday 03 February 2011 21:40:13, michael rice wrote: Hi Daniel, Ok, but what I was looking for was ReaderT on top, State on the bottom. No problem, just change the definition of the Heron type synonym and swap the applcations of runReader[T] and evalState[T] in mySqrt, the monadic

Re: [Haskell-cafe] Another Question

2011-02-03 Thread Richard O'Keefe
On 3/02/2011, at 8:18 PM, Navin Rustagi wrote: hi , I am stuck in the following problem. I am maintaining a list of tuples of the form ([Char],Int,Int, Int,Int) . The purpose of maintaining the tuples is that the program reads from a file line by line , Matches the contents with

Re: [Haskell-cafe] Haskell Functions

2011-02-03 Thread Daniel Fischer
On Thursday 03 February 2011 21:37:45, Ozgur Akgun wrote: (CCing haskell-cafe again) Is this an homework question? I think so: http://stackoverflow.com/questions/4877486/haskell-procedure www.inf.ed.ac.uk/teaching/courses/inf2d/.../Inf2d-09-Assignment1.pdf

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Antoine Latter
On Thu, Feb 3, 2011 at 2:44 PM, Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de wrote: Dear cafe, does anyone have an explanation for this?: error (error foo) *** Exception: foo error $ error foo *** Exception: *** Exception: foo I don't know if this is relevant, but I thought that

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Daniel Peebles
This is indeed very strange. On my latest GHC 7 (built a couple of days ago) it does the right thing when compiled, but in GHCi it behaves as you describe. I have no idea, frankly. On Thu, Feb 3, 2011 at 8:44 PM, Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de wrote: Dear cafe, does

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Daniel Fischer
To illustrate your prediction about the side-issues: On Thursday 03 February 2011 22:10:51, Andrew Coppin wrote: Consider for a moment the original implementation with Data.Map. Adding a seq or two here will do no good at all; seq reduces to WHNF. What we are wanting is NF, and I can see no

Re: [Haskell-cafe] Reader monad wrapping State monad

2011-02-03 Thread michael rice
And swap the arguments. Thanks for going the extra mile. Michael --- On Thu, 2/3/11, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: From: Daniel Fischer daniel.is.fisc...@googlemail.com Subject: Re: [Haskell-cafe] Reader monad wrapping State monad To: michael rice

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Tim Chevalier
On Thu, Feb 3, 2011 at 12:44 PM, Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de wrote: Dear cafe, does anyone have an explanation for this?: error (error foo) *** Exception: foo error $ error foo *** Exception: *** Exception: foo Have you read the intermediate Core (using

Re: [Haskell-cafe] hsmagick on OSX 10.6

2011-02-03 Thread Tim Chevalier
On Thu, Feb 3, 2011 at 10:43 AM, Max Cantor mxcan...@gmail.com wrote: Just out of curiosity, has anyone gotten this to work?  I'm getting bus errors whenever I call readImage. If anyone out there has gotten it working and would tell me which versions they're using of the relevant bits, that

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Don Stewart
catamorphism: On Thu, Feb 3, 2011 at 12:44 PM, Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de wrote: Dear cafe, does anyone have an explanation for this?: error (error foo) *** Exception: foo error $ error foo *** Exception: *** Exception: foo Have you read the

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Luke Palmer
This is probably a result of strictness analysis. error is technically strict, so it is reasonable to optimize to: let e = error foo in e `seq` error e On Thu, Feb 3, 2011 at 1:44 PM, Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de wrote: Dear cafe, does anyone have an explanation

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Andrew Coppin
On 03/02/2011 09:37 PM, Daniel Fischer wrote: To illustrate your prediction about the side-issues: On Thursday 03 February 2011 22:10:51, Andrew Coppin wrote: Consider for a moment the original implementation with Data.Map. Adding a seq or two here will do no good at all; seq reduces to WHNF.

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Tim Chevalier
On Thu, Feb 3, 2011 at 2:03 PM, Luke Palmer lrpal...@gmail.com wrote: This is probably a result of strictness analysis.  error is technically strict, so it is reasonable to optimize to:    let e = error foo in e `seq` error e Yes, and you can see this in the Core code that Don posted: in

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Johan Tibell
Hi, Thanks for bringing up these issues. It's something we could be better at addressing as a community. First, we need to stop pretending that you can use Haskell effectively without first learning to reason about program evaluation order. Learning how is not terrible difficult, but there's

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Johan Tibell
On Thu, Feb 3, 2011 at 11:10 PM, Andrew Coppin andrewcop...@btinternet.com wrote: Wouldn't that still mean that the spine of the map is still lazy though? No, Data.Map and Data.Set are both spine strict (which should be documented!). Data.Map is key strict in addition. Both are value lazy.

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Johan Tibell
Hi, For what it's worth I saw the problems in your counting examples right away, without reading the explanatory text below. Hopefully that means that it's possibly to learn how to spot such things without resorting to e.g. running the program or reading Core *gasp*. Johan

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Daniel Fischer
On Thursday 03 February 2011 23:03:36, Luke Palmer wrote: This is probably a result of strictness analysis. error is technically strict, so it is reasonable to optimize to: let e = error foo in e `seq` error e I think so too. Unoptimised, module Errors where foo = error (error foo)

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Daniel Fischer
On Thursday 03 February 2011 23:19:31, Johan Tibell wrote: Hi, For what it's worth I saw the problems in your counting examples right away, without reading the explanatory text below. Yes, they were pretty obvious with enough experience. For beginners I expect it to be a rather insidious

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Richard O'Keefe
On 4/02/2011, at 10:10 AM, Andrew Coppin wrote: The important obsevation is this: One tiny, almost insignificant change can transform a program from taking 50 seconds and 400 MB of RAM into one that takes 0.02 seconds and 0.1 MB of RAM. And, at least in this case, the simpler version is

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Dan Doel
On Thursday 03 February 2011 5:12:54 PM Tim Chevalier wrote: On Thu, Feb 3, 2011 at 2:03 PM, Luke Palmer lrpal...@gmail.com wrote: This is probably a result of strictness analysis. error is technically strict, so it is reasonable to optimize to: let e = error foo in e `seq` error e

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread John Meacham
In general, errors are always interchangeable with another. An exception in haskell is a value, rather than an event. Haskell prescribes no evaluation order other than if the result is defined it must be equivalant to the one generated by a normal-order reduction strategy. Since error is not a

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Steffen Schuldenzucker
Thanks to all of you for making GHC's behaviour yet a bit clearer to me. On 02/03/2011 11:25 PM, Daniel Fischer wrote: On Thursday 03 February 2011 23:03:36, Luke Palmer wrote: This is probably a result of strictness analysis. error is technically strict, so it is reasonable to optimize

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Erik de Castro Lopo
Daniel Fischer wrote: On Thursday 03 February 2011 23:19:31, Johan Tibell wrote: Hi, For what it's worth I saw the problems in your counting examples right away, without reading the explanatory text below. Yes, they were pretty obvious with enough experience. For beginners I expect

Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/2/11 20:06 , wren ng thornton wrote: When I put this all together, the process is killed with: control message: Just (Err endOfInput) POSIX FIFOs and GHC's nonblocking file descriptors implementation don't play well together; you should

[Haskell-cafe] Haskell AES

2011-02-03 Thread tsuraan
I'd like to use AES in a haskell program that I'm writing. I've come across three libraries in hackage that do AES: the library named AES, the Crypto library, and the SimpleAES library. The library named AES says in its documentation for the crypt function that it is not thread-safe. What

Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/3/11 19:16 , Brandon S Allbery KF8NH wrote: POSIX FIFOs and GHC's nonblocking file descriptors implementation don't play well together; you should launch the writer end first and let it block More specifically, I think what's happening here is

Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread wren ng thornton
On 2/3/11 8:05 AM, John Lato wrote: I don't have too much to add to Maciej and Oleg's reply, except that I'd recommend looking at the Wave codec over the Tiff reader in those versions of iteratee. I don't think that's the only problem, though, because then you'd be getting a Divergent iteratee

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread wren ng thornton
On 2/3/11 10:48 AM, Max Cantor wrote: Does it make sense to relegate OSX x86_64 to community status while the 32-bit version is considered a supported platform? I'm not sure I can make sense of what you mean here. Given the preamble, I'd guess you're asking whether we should make x86_64 the

Re: [Haskell-cafe] Problems with iteratees

2011-02-03 Thread wren ng thornton
On 2/3/11 7:19 PM, Brandon S Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/3/11 19:16 , Brandon S Allbery KF8NH wrote: POSIX FIFOs and GHC's nonblocking file descriptors implementation don't play well together; you should launch the writer end first and let it block

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Richard O'Keefe
On 4/02/2011, at 2:14 PM, wren ng thornton wrote: On 2/3/11 10:48 AM, Max Cantor wrote: Does it make sense to relegate OSX x86_64 to community status while the 32-bit version is considered a supported platform? I'm not sure I can make sense of what you mean here. Given the preamble, I'd

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Max Cantor
I'm not sure I can make sense of what you mean here. Given the preamble, I'd guess you're asking whether we should make x86_64 the targeted architecture for OSX support, and reclassify 32-bit OSX to unsupported or hopefully it still works status. (But in that case, it's the 32-bit which

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread wren ng thornton
Max Cantor wrote: someone? wrote: I think the original poster is saying that the targeted architecture for OS X support should be the architecture that OS X assumes by default, and these days that's x86_64. That sounds reasonable to me. The big caveat is that OSX = 10.5.8 10.6 should

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Max Cantor
Doesn't 10.5.x have the ability to generate and run 64-bit binaries? mc On Feb 4, 2011, at 10:19 AM, wren ng thornton wrote: Max Cantor wrote: someone? wrote: I think the original poster is saying that the targeted architecture for OS X support should be the architecture that OS X assumes

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Steve Severance
Wholly support moving OSX to x64. x86 should be supported only on a best effort basis for legacy. Steve On Thu, Feb 3, 2011 at 6:28 PM, Max Cantor mxcan...@gmail.com wrote: Doesn't 10.5.x have the ability to generate and run 64-bit binaries? mc On Feb 4, 2011, at 10:19 AM, wren ng thornton

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread wren ng thornton
On 2/3/11 9:28 PM, Max Cantor wrote: Doesn't 10.5.x have the ability to generate and run 64-bit binaries? Yes, it does. But it defaults to 32-bit as I recall. Richard O'Keefe suggested a general practice of targeting the architecture considered default by the operating system. That's a good

Re: [Haskell-cafe] How to #include into .lhs files?

2011-02-03 Thread Conal Elliott
Thanks, Daniel. I'm still stumped. When I say #include B.hs in a .hs file, all works fine, but when in a .lhs file I get error: B.hs: No such file or directory. The file B.hs is in the same directory as the including file, which is the current directory for ghci. Same situation with ghc. If I

Re: [Haskell-cafe] How to #include into .lhs files?

2011-02-03 Thread Michael Snoyman
My guess (a complete guess) is that the deliterate step is creating a temporary .hs file elsewhere on your filesystem, which is why the CPP step can't find B.hs without a fully-qualified path. Michael On Fri, Feb 4, 2011 at 6:56 AM, Conal Elliott co...@conal.net wrote: Thanks, Daniel. I'm still

[Haskell-cafe] AES on 32-bit system

2011-02-03 Thread Michael Snoyman
Hi everyone, Does anyone else have trouble installing the AES package on a 32-bit system? My system at home installs it just fine, but my VPS chokes with the following error messages (plus a bunch of warnings): cbits/ctr_inc.c:11:0: error: 'uint_64t' undeclared (first use in this function)

Re: [Haskell-cafe] AES on 32-bit system

2011-02-03 Thread Daniel Peebles
Knowing nothing about the package or its code, it looks like a typo to me. The stdint.h naming of types would have it be uint64_t, not uint_64t. Could that be it? On Fri, Feb 4, 2011 at 6:00 AM, Michael Snoyman mich...@snoyman.com wrote: Hi everyone, Does anyone else have trouble installing

Re: [Haskell-cafe] AES on 32-bit system

2011-02-03 Thread Michael Snoyman
Wow, I thought I'd tried that before, I guess not. Yes, that compiles, and an initial test seems that it does not break at runtime either. I'll email the author and see if he can make that change. Michael On Fri, Feb 4, 2011 at 8:11 AM, Daniel Peebles pumpkin...@gmail.com wrote: Knowing nothing

Re: [Haskell-cafe] Review request for platform independent interactive graphics with VNC

2011-02-03 Thread C K Kashyap
FrameBufferUpdateRequest x=0, y=0 width =1, height=1 FrameBufferUpdateRequest x=1, y=0 width =99, height=1 FrameBufferUpdateRequest x=0, y=1 width =100, height=99 Main: socket: 7: hPutBuf: resource vanished (Connection reset by peer) I was not taking care of partial updates, I've taken care

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Mark Lentczner
On Feb 3, 2011, at 5:55 PM, Max Cantor wrote: Yes. I'm saying that I believe that OSX x86_64 should be the officially supported platform instead of 32-bit x86 with all the associated guarantees and assurances. I wanted to see how people felt about that. I don't think this is such a good

[Haskell-cafe] Problem cabal installing wxcore with ghc 7.0.1 on linux x86_64

2011-02-03 Thread Alexander McPhail
zen:~# cabal install wxcore --enable-documentation --global Resolving dependencies... [1 of 1] Compiling Main ( /tmp/wxcore-0.12.1.617977/wxcore-0.12.1.6/Setup.hs, /tmp/wxcore-0.12.1.617977/wxcore-0.12.1.6/dist/setup/Main.o ) Linking

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Johan Tibell
On Thu, Feb 3, 2011 at 11:40 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: Back in the days when systems other than Wintel and maybe sort of intel Linux were supported by Clean, I used to really love one of the features of the Clean compiler. One simple command line switch and the compiler

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Johan Tibell
On Fri, Feb 4, 2011 at 12:38 AM, Erik de Castro Lopo mle...@mega-nerd.com wrote: However, one of the Haskell projects I work on is Ben Lippmeier's DDC compiler. Thats about 5 lines of Haskell code and finding performance issues there is really difficult. Right. It can still be tricky. I

Re: [Haskell-cafe] Instancing Typeable for monad transformers?

2011-02-03 Thread Ryan Ingram
Can you just wrap it? Something like this: -- put your monad type here type M a = Iteratee ... a data W a = W (Iteratee ... a) deriving Typeable unW (W x) = x toDynW :: Typeable a = M a - Dynamic toDynW x = toDynamic (W x) castM :: (Typeable x, Typeable a) = x - Maybe (M a) castM = unW . cast