Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Thomas DuBuisson
On Thu, Sep 12, 2013 at 12:44 PM, Nicolas Trangez nico...@incubaid.com wrote: I did use that a couple of times (`xor`ing 2 ByteStrings together), and was surprised by the omission back then, but IIRC (can't validate now), there's a specialised zipWith (as proposed) in the module (with some

Re: [Haskell-cafe] ordNub

2013-07-14 Thread Thomas DuBuisson
Just so people are aware - five years ago the notion of nubOrd and nubWith was discussed and a consensus reached on including nubOrd. I think Bart got too busy, didn't submit a final patch, and no one with commit access actually commited any code.

[Haskell-cafe] [ANN] New releases of crypto-api, DRBG, commsec, commsec-keyexchange, and cipher-aes128

2013-04-23 Thread Thomas DuBuisson
All, I have recently released new versions of: - crypto-api[1]: An interface for cryptographic algorithms such as block ciphers, hashes, and secure random number generators. This version includes Klondike's cbcMac and SIV modes of operation - much thanks to his numerous patches. - DRBG[2]: A

Re: [Haskell-cafe] Bug in Network package

2013-04-10 Thread Thomas DuBuisson
Replying to all. Sorry for the duplicate, Florian. The fact that the constructor `PortNum` is exported has been argued to be a bug in past discussions. PortNumber is stored big endian, which leads to behaviors that people don't expect. I suggest you lean on the fact that PortNumber is an

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-11-28 Thread Thomas DuBuisson
As an alternative, If there existed a Haskell package to give you fast cryptographically secure random numbers or use the new Intel RDRAND instruction (when available) would that interest you? Also, what you are doing is identical to the entropy package on hackage, which probably suffers from the

Re: [Haskell-cafe] performance issues with popCount

2012-09-06 Thread Thomas DuBuisson
What _should_ be happening is we should be calling GMP's popcount function when using integer-gmp. As for your code I worry about it: * being too lazy, so add some bang patterns or seq * using boxed arrays, so use unboxed * indexing arrays by Integer comparison even when those are small integers

Re: [Haskell-cafe] Hackage is down?

2012-08-11 Thread Thomas DuBuisson
It will be down most of today - we are switching over to a new network connection. On Sat, Aug 11, 2012 at 11:31 AM, hanjoosten han.joos...@atos.net wrote: Hi, Hackage seems to be down. Is there anyone out here who knows how to get it online again? Thanks! -- View this message in

Re: [Haskell-cafe] foreign import and gmp

2012-08-08 Thread Thomas DuBuisson
You need to build GHC using the integer-simple library (instead of the 'integer-gmp' library). From the 6.12.1 release notes: It is now possible to build GHC with a simple, BSD-licensed Haskell implementation of Integer, instead of the implementation on top of GMP. To do so, set INTEGER_LIBRARY

Re: [Haskell-cafe] foreign import and gmp

2012-08-08 Thread Thomas DuBuisson
On Wed, Aug 8, 2012 at 3:24 PM, Lars Kuhtz hask...@kuhtz.eu wrote: On 8/8/12 2:55 PM, Thomas DuBuisson wrote: You need to build GHC using the integer-simple library (instead of the 'integer-gmp' library). From the 6.12.1 release notes: It is now possible to build GHC with a simple, BSD

Re: [Haskell-cafe] Community-wide RFP

2012-08-03 Thread Thomas DuBuisson
There is an ignored reddit for that (http://www.reddit.com/r/haskell_proposals), but somewhere good? I don't think so. Thomas On Fri, Aug 3, 2012 at 8:02 AM, Black Mephistopheles black.m...@gmail.com wrote: Is there a place - on the Haskell Wiki perhaps - with a list of desired

Re: [Haskell-cafe] vector, alignment and SIMD through FFI

2012-07-06 Thread Thomas DuBuisson
On Fri, Jul 6, 2012 at 1:06 PM, Nicolas Trangez nico...@incubaid.com wrote: -- This fails: -- Ambiguous type variable `a0' in the constraint: -- (Storable a0) arising from a use of `sizeOf' Here you can either tie a type knot using proxy types or you can use the scoped type

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Thomas DuBuisson
If it is simple then please paste it somewhere. Perhaps stackoverflow would be a better medium for this discussion. -Thomas On Thu, May 24, 2012 at 8:05 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi there, The code could not be simpler. Just ldapInit, ldapSimpleBind. I

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-21 Thread Thomas DuBuisson
On Mon, May 21, 2012 at 7:53 AM, Yves Parès yves.pa...@gmail.com wrote: Not necessarily.  For example the 'nub' function from Data.List could be much faster.  Unfortunately this would also change its type.  O(n²) complexity is really the best you can get with the Eq constraint. Why not in

Re: [Haskell-cafe] Annoyed at System.Random

2012-05-04 Thread Thomas DuBuisson
Vincent uses gcc header files to get the AES instructions: Header files of: #include wmmintrin.h #include tmmintrin.h And later calls of: x = _mm_aesenc_si128(m, K1); But currently you must know you have AESNI and use a flag: cabal install cryptocipher -faesni But if you

[Haskell-cafe] Annoyed at System.Random

2012-05-03 Thread Thomas DuBuisson
Ryan, I've grown annoyed at System.Random enough (specifically, StdGen). How much, if any, pushback would there be if I put together a FFI binding to a C AES-CTR based RNG. There are many advantages: 0) The API wouldn't have to change (though some parts should, and some change is already

Re: [Haskell-cafe] Annoyed at System.Random

2012-05-03 Thread Thomas DuBuisson
On Thu, May 3, 2012 at 5:26 PM, Ertugrul Söylemez e...@ertes.de wrote: Thomas DuBuisson thomas.dubuis...@gmail.com wrote: I've grown annoyed at System.Random enough (specifically, StdGen). How much, if any, pushback would there be if I put together a FFI binding to a C AES-CTR based RNG

Re: [Haskell-cafe] Annoyed at System.Random

2012-05-03 Thread Thomas DuBuisson
On May 3, 2012 5:49 PM, Ertugrul Söylemez e...@ertes.de wrote: Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Vincent has done great work for Haskell+Crypto so I think he knows I mean nothing personal when I say cprng-aes has the right idea done the wrong way. Why a new effort vs

Re: [Haskell-cafe] ANNOUNCE: planar-graph-1.0

2012-04-27 Thread Thomas DuBuisson
Good work, Ivan. Despite your numerous previous pointers, I still haven't look at this API. I'm glad to see this release, it's great motivation and I'll probably look through it this weekend. Thanks for all the graph library work you do, Thomas On Fri, Apr 27, 2012 at 4:07 PM, Ivan Lazar

[Haskell-cafe] Uploading a new hsc2hs

2012-04-25 Thread Thomas DuBuisson
Warning: I, not the maintainer of hsc2hs, will be uploading a trivial fix for hsc2hs to hackage (new build deps). Even after public attempts to contact anyone in charge of hsc2hs (last January) there still has been no word. Speak now or forever hold your peace. Cheers, Thomas P.S. I still

Re: [Haskell-cafe] Uploading a new hsc2hs

2012-04-25 Thread Thomas DuBuisson
On Wed, Apr 25, 2012 at 5:27 PM, Antoine Latter aslat...@gmail.com wrote: On Wed, Apr 25, 2012 at 4:59 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Warning: I, not the maintainer of hsc2hs, will be uploading a trivial fix for hsc2hs to hackage (new build deps).  Even after public

Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-08 Thread Thomas DuBuisson
On Sun, Apr 8, 2012 at 4:03 PM, Francesco Mazzoli f...@mazzo.li wrote: No, it is not possible to build GHC without GHC. Building GHC on ARM is going to be extremely tricky (I'm not sure anyone has ever done it). I used to use an unregistered build of GHC built by someone in the Debian community

Re: [Haskell-cafe] Generalizing (++) for monoids instead of using ()

2012-04-01 Thread Thomas DuBuisson
On Sun, Apr 1, 2012 at 1:58 PM, aditya bhargava bluemangrou...@gmail.com wrote: After asking this question: http://stackoverflow.com/questions/9963050/standard-way-of-joining-two-data-texts-without-mappend I found out that the new infix operator for `mappend` is (). I'm wondering why ghc 7.4

Re: [Haskell-cafe] Where to get kansas-lava version 2.5

2012-02-22 Thread Thomas DuBuisson
Have you tried just bumping the version number of the kansas-lava repo head? Or asking Andy about it? At any rate, it looks like you're over-eager for the bleeding edge. KU hasn't even released 0.2.5 to hackage, as you noted, and users aren't typically expected to pull the latest from the source

[Haskell-cafe] Disabling warning over ranges of source lines

2012-02-19 Thread Thomas DuBuisson
Using GHC, is there any way to disable warnings (entirely or selectively) during a section of source code? I ask because of some Template Haskell that periodically generates unused code and I'd rather not see the warnings or rework the macros (beyond emitting some sort of disable and re-enable

[Haskell-cafe] [ANN] Crypto-API 0.9 Release

2012-01-31 Thread Thomas DuBuisson
Crypto-API is a generic interface for cryptographic operations, defining classes for hashes, ciphers, and random number generation while also providing convenience functions such as block cipher modes and padding. Maintainers of hash and cipher implementations are encouraged to add instances for

Re: [Haskell-cafe] [ANN] Crypto-API 0.9 Release

2012-01-31 Thread Thomas DuBuisson
Oh, sorry for the omission! I've worked out of HEAD for long enough that I though that was in 0.8. On Tue, Jan 31, 2012 at 5:36 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: Also:  * MacKey has phantom types. This seems to be the only breaking change [1].

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-08 Thread Thomas DuBuisson
Aristid Breitkreuz arist...@googlemail.com wrote: To use the hash, I have to convert it to a ByteString, and then I suddenly have lost all this safety. I don't really see how there is any real safety gained. But that isn't true for all users. Sometimes a hash is computed long before it is

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Thomas DuBuisson
Why? I don't actually need the hash object for anything, usually. All I need is the ByteString, and then I need to learn how to use the cereal package to get it... What would you think if Crypto.Classes exported Data.Serialize.encode? Or how about if it exported Antoine's hash suggestion

[Haskell-cafe] FGL custom node identification (Label - Node lookup)

2011-11-24 Thread Thomas DuBuisson
All, The containers library has a somewhat primitive but certainly useful Data.Graph library. Building a graph with this library simultaneously results in the lookup functions: m1 :: Vertex - (node, key, [key]) m2 :: key - Maybe Vertex (where 'key' is like FGL's 'label' but is assumed to

Re: [Haskell-cafe] FGL custom node identification (Label - Node lookup)

2011-11-24 Thread Thomas DuBuisson
automatically instead of expecting the programmer to keep them paired correctly. Cheers, Thomas On Thu, Nov 24, 2011 at 1:42 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 24 November 2011 20:33, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: All, The containers library has

Re: [Haskell-cafe] Error when installing RSA (for yesod) with GHC 7.2.1

2011-10-24 Thread Thomas DuBuisson
Try to install with: cabal install RSA 'random == 1.0.1.0' I'm guessing the issue is your random library is less than 1.0.1 and also includes an instance of Word8 (in other words, the GHC release you use pulled an unofficial version from the repo). Cheers, Thomas On Mon, Oct 24, 2011 at 2:13

Re: [Haskell-cafe] ANNOUNCE: GA-1.0, a library for working with genetic algorithms

2011-09-29 Thread Thomas DuBuisson
This is neat - thanks for putting in the time and effort (and releasing the work to Hackage). A few questions: * What GA-nerdy things does this do under the hood (I haven't looked at the source)? It looks like it's a GA framework almost more than the actual algorithm itself. I see

[Haskell-cafe] [ANN] crypto-api-tests

2011-09-27 Thread Thomas DuBuisson
The crypto-api test modules have been split out into their own package, crypto-api-tests. Additionally, the tests now use the test-framework package. This should make it much easier for hash/cipher maintainers to integrate into their existing testing infrastructure. For example: $ cabal update

[Haskell-cafe] A Crypto-API-Tests package

2011-09-26 Thread Thomas DuBuisson
FYI, since I figure you three are the ones interested in this right now: I'll be releasing crypto-api-tests [1] to hackage someday (this weekend?). If you want to give it a spin or add KATS before the first release then feel free. OTOH, it's not like I'd stop accepting patches after release

Re: [Haskell-cafe] [ANNOUNCE] skein-0.1: Skein, a family of cryptographic hash functions. Includes Skein-MAC as well.

2011-09-21 Thread Thomas DuBuisson
 The skein package comes with the golden KATs sent by the Skein team to NIST Great! Care to add that to the crypto-api test code? Cheers, Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] efficient chop

2011-09-13 Thread Thomas DuBuisson
This was a recent question on StackOverflow: http://stackoverflow.com/questions/6270324/in-haskell-how-do-you-trim-whitespace-from-the-beginning-and-end-of-a-string/6270382#6270382 Where I started: If you have serious text processing needs then use the text package from hackage. And concluded:

Re: [Haskell-cafe] hoogle data no connection to host http://code.galois.com/darcs/haskell-platform ...

2011-08-26 Thread Thomas DuBuisson
The Galois link works fine for me now - it also worked for me earlier today when I ran hoogle data for my own system. I suggest you try again, possibly with a better internet connection? Cheers, Thomas On Fri, Aug 26, 2011 at 12:39 AM, informationen informatio...@gmx.de wrote: Hi, i

Re: [Haskell-cafe] - Try to install ssh package by cabal.

2011-08-23 Thread Thomas DuBuisson
FYI: It's usually good to CC the package maintainer when a build fails for non-trivial reasons. At first glance it seems the SSH package was released when version 0.3 of the ASN package was current. The ASN package is now on version 0.5 - so you can either add that constraint into the SSH

Re: [Haskell-cafe] Question about data

2011-08-19 Thread Thomas DuBuisson
This is not a valid data declaration. You can't have a Float field without any constructor name and have it still of type MathExpression. I suggest you do something like: data MathExpr = MathFloat Float So you may declare pi: let mathPi = MathFloat pi -- note pi is defined in

Re: [Haskell-cafe] Compilation error in Chapter 5 of Real World Haskell

2011-08-18 Thread Thomas DuBuisson
This is a linking issue. It seems GHC 7 automatically feeds the linker SimpleJSON.o so when you explicitly provide it too then you get those conflicts. All you need to do is call: ghc -o simple Main.hs Unless you're using GHC 6, then the original command is correct: ghc -o simple Main.hs

Re: [Haskell-cafe] why is Random in System?

2011-08-16 Thread Thomas DuBuisson
I think of it as natural for exactly the reason you stated (the data comes from the OS). It seems even more natural to me in the entropy package module 'System.Entropy' as I am accustom to the phrase system entropy. Equally, I would fine a 'Network.Entropy' module acceptable under the assumption

Re: [Haskell-cafe] Simple Parsec example

2011-08-07 Thread Thomas DuBuisson
I suggest you install hoogle or use the web interface as it can easily answer such questions for you: http://www.haskell.org/hoogle/?hoogle=commaSep http://www.haskell.org/hoogle/?hoogle=integer+%2bparsec Cheers, Thomas On Sun, Aug 7, 2011 at 11:44 AM, michael rice nowg...@yahoo.com wrote:

Re: [Haskell-cafe] The Typeable class is changing

2011-07-11 Thread Thomas DuBuisson
On Mon, Jul 11, 2011 at 1:22 PM, jutaro j...@arcor.de wrote: I hope that typeRepKey is no longer in the IO monad (for the simple reason to teach me that the key can change between session). If it's implementation dependent then I see no reason for it to be in IO (this was mentioned on another

Re: [Haskell-cafe] Fwd: The Typeable class is changing

2011-07-11 Thread Thomas DuBuisson
Alberto G. Corona agocor...@gmail.com wrote: What to do when the data has been defined in other package and provides no Typeable instance? You'd have to use standalone deriving, which I hope gets into Haskell 201X. module A where data A = A {-# LANGUAGE StandaloneDeriving,

Re: [Haskell-cafe] (no subject)

2011-07-06 Thread Thomas DuBuisson
Ian, This requires dynamic typing using Data.Dynamic (for application) and Data.Typeable (to do the typing). Namely, you are asking for the dynApply function: START CODE import Data.Dynamic import Data.Typeable import Control.Monad maybeApp :: (Typeable a, Typeable b, Typeable c) = a - b

[Haskell-cafe] Splitting Hackage Packages and re-exporting entire modules (with same module name)

2011-07-04 Thread Thomas DuBuisson
All, I have decided it would be beneficial to split System.Crypto.Random and the rest of crypto-api into different packages. Is there I way I can create a package, entropy, with System.Crypto.Random but continue to expose that module from crypto-api (allowing people who use that module some time

[Haskell-cafe] ANNOUNCING: Hac PDX II - A Portland Haskell Hackathon

2011-06-30 Thread Thomas DuBuisson
WHAT: A Haskell Hackathon WHEN: July 22-24 (Friday, Saturday, Sunday) 10:00 AM to 5:30 PM WHERE: Forth Avenue Building (FAB, 1900 SW 4th Ave) Room 10 Portland, Oregon 97201 WHERE, take 2: FAB10 is a small auditorium just inside the west most Harrison Street entrance. URL:

Re: [Haskell-cafe] If Python now has a good email library; how challenging is it to call Python from Haskell?

2010-10-27 Thread Thomas DuBuisson
How does python having an e-mail library change the situation with calling Python from Haskell? On Wed, Oct 27, 2010 at 10:43 AM, cas...@istar.ca wrote: :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] In what language...?

2010-10-15 Thread Thomas DuBuisson
I think you would enjoy reading (and working) through TAPL[1] and/or Software Foundations[2] if this interests you. Cheers, Thomas [1] http://www.amazon.com/Types-Programming-Languages-Benjamin-Pierce/dp/0262162091 [2] http://www.cis.upenn.edu/~bcpierce/sf/ On Fri, Oct 15, 2010 at 1:36 PM,

Re: [Haskell-cafe] Layered maps

2010-10-08 Thread Thomas DuBuisson
Alex, The containers library can do this already - there are no constraints on the elements of a Map. For example: type TripleNestedMap a = Map Int (Map Char (Map String a)) But this is rather silly as you can just do: type MapOfTriples a = Map (Int ,Char, String) a for most uses. Cheers,

[Haskell-cafe] ByteString missing rewrite RULES (zipWith' f a = pack . zipWith f a)

2010-10-05 Thread Thomas DuBuisson
All, (I notice ByteString still isn't under l...@h.o ownership, which is good because this way I can avoid the bureaucracy and e-mail the maintainers directly) The following is a Data.ByteString comment for the (non-exported) function zipWith' -- -- | (...) Rewrite rules -- are used to

Re: [Haskell-cafe] ByteString missing rewrite RULES (zipWith' f a = pack . zipWith f a)

2010-10-05 Thread Thomas DuBuisson
 I don't have a horse in this race; but I am curious as to why  you wouldn't ask for `chunkOverhead = 16' as that seems to be  your intent as well as what the expression works out to on any  machine in common use. To avoid copying data when perform FFI calls to common cipher routines (such

Re: [Haskell-cafe] ByteString missing rewrite RULES (zipWith' f a = pack . zipWith f a)

2010-10-05 Thread Thomas DuBuisson
 I don't have a horse in this race; but I am curious as to why  you wouldn't ask for `chunkOverhead = 16' as that seems to be  your intent as well as what the expression works out to on any  machine in common use. Sorry, after I sent my long explanation I see what you are really asking. I

Re: [Haskell-cafe] can't find in hayoo

2010-09-29 Thread Thomas DuBuisson
By and large hayoo is the alta-vista of Haskell search - it has a huge database but isn't well organized or good at prioritizing. Use Hoogle when doing type-based searches for functions in the typical GHC load. http://haskell.org/hoogle/?hoogle=%3A%3A+ByteString+-%3E+[Word8] Also, what's with

Re: [Haskell-cafe] can't find in hayoo

2010-09-29 Thread Thomas DuBuisson
In addition to hoogle I suggest you check out hackage too. I think you'll be particularly interested in base64-bytestring: http://hackage.haskell.org/package/base64-bytestring Cheers, Thomas On Wed, Sep 29, 2010 at 9:41 AM, Roderick Ford develo...@live.com wrote: The idea was to go from

[Haskell-cafe] Re: [fp-embedded] Which Haskell DSL for writing C? (Was ANN: Copilot 0.22 -- A stream DSL for writing embedded C.)

2010-09-21 Thread Thomas DuBuisson
The best reference for Copilot's constraints is this paper: http://www.cs.indiana.edu/~lepike/pub_pages/rv2010.html. Non-Haskell programmers should note that paper has a few typos (Lee, please correct me if I'm mistaken). Section 4.1 is where I'm at so far and I see missing backticks (shoulld

[Haskell-cafe] [ANN] Crypto-API 0.1.0.0

2010-09-20 Thread Thomas DuBuisson
Crypto-API is a project aimed at unifying algorithm developers and users by presenting a uniform typeclass interface to low level algorithms and providing generalized helper functions for the (slightly) higher-level interactions needed by crypto-users. The main features are typeclasses (hash,

Re: [Haskell-cafe] ANN: happstack-auth-0.2

2010-09-18 Thread Thomas DuBuisson
Why are you using Crypto? I'm hoping to make Crypto as we know it obsolete. To that end, I've been working on a unified interface (crypto-api) and after the algorithms packages catch up I planned to make a meta package crypto-algs. Cheers, Thomas On Sat, Sep 18, 2010 at 11:19 AM, Nils

[Haskell-cafe] [PREANNOUNCE] Crypto-API Major Version Bump (0.1.0.0)

2010-09-15 Thread Thomas DuBuisson
All, Ironing out crypto-api, I have commited the below changes mostly intended to streamline crypto-api and focus it on the main purpose of connecting algorithm developers with slightly higher-level (and generic) function needed by crypto-users. Feel free to object, comment, or recommend

Re: [Haskell-cafe] [PREANNOUNCE] Crypto-API Major Version Bump (0.1.0.0)

2010-09-15 Thread Thomas DuBuisson
On Wed, Sep 15, 2010 at 6:38 PM, Felipe Lessa felipe.le...@gmail.com wrote: On Wed, Sep 15, 2010 at 9:54 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: * cereal = 0.2 0.3 (was == 0.2.*) Do you mean, = 0.2 0.4? Yes, that was what I ment, thanks

Re: [Haskell-cafe] Curious why cabal upgrade parsec not installing latest version

2010-09-15 Thread Thomas DuBuisson
Parsec 3 is unloved by much of the community because it's evidently slower than parsec 2. For this reason the community remains divided over the two versions and cabal has special preferred versions of particular packages. To force installation of parsec 3, over the preferred parsec 2, you

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-11 Thread Thomas DuBuisson
- when recompiling a package with ABI changes, does cabal always update dependent packages? If Foo depends on Bar and there is a new version of Foo that specifies a newer version of Bar then yes, the newer library being depended on will be build too (out of necessity). OTOH, if you are

[Haskell-cafe] [ANN] Crypto-API 0.0.0.1 Released

2010-09-07 Thread Thomas DuBuisson
At long last and after much fruitful discussion on librar...@haskell.org, Crypto-API is having its first release, version 0.0.0.1! Crypto-API is a generic interface for cryptographic operations, platform independent quality entropy acquisition, property tests and known-answer tests (KATs) for

Re: [Haskell-cafe] ANNOUNCE: secure-sockets version 1.0

2010-09-06 Thread Thomas DuBuisson
Good work Dan! Would you be interested in providing a build option that replaces the OpenSSL dependency with something more stand-alone? Or does ossl perform a significant part of the TLS protocol work for you (vs just being used for algorithms)? Anyone impatient for the midnight haddocking can

Re: [Haskell-cafe] ANNOUNCE: secure-sockets version 1.0

2010-09-06 Thread Thomas DuBuisson
On Mon, Sep 6, 2010 at 9:16 AM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Good work Dan! Sorry! David. Good work David. Not sure where Dan came from.  Would you be interested in providing a build option that replaces the OpenSSL dependency with something more stand-alone? Or does

Re: [Haskell-cafe] ANNOUNCE: secure-sockets version 1.0

2010-09-06 Thread Thomas DuBuisson
David said: I'd be interested with breaking the dependency on OpenSSL, for various reasons: [snip] Can't say I'm surprised by these. Its unfortunate the situation hasn't improved. I recall a half decent O'Reilly book on OpenSSL but if you weren't using it as a cookbook (and wanted a 1-off

Re: [Haskell-cafe] ANNOUNCE: secure-sockets version 1.0

2010-09-06 Thread Thomas DuBuisson
You could have gone to Hackage and checked your protocols correctness using CPSA, not that the side-channel attacks would be discovered by such a tool. Interesting. I had seen CPSA announced at one point, but there appears to be no documentation whatsoever. Did I miss the doc links? There's

Re: [Haskell-cafe] Re: Crypto-API is stabilizing

2010-09-04 Thread Thomas DuBuisson
On Sat, Sep 4, 2010 at 3:23 AM, Heinrich Apfelmus apfel...@quantentunnel.de wrote: A better reason is the data structure has no way to implement generateKeyPair. That's a non-problem: each algorithm (RSA, DSA, ...) implements a function with the same type as  generateKeyPair . Compare   rsa

Re: [Haskell-cafe] Re: Crypto-API is stabilizing

2010-09-04 Thread Thomas DuBuisson
, this is simply trying to re-enforce the fact that buildKeyPair (formerly 'generateKeyPair') does have a place. Cheers, Thomas On Sat, Sep 4, 2010 at 7:45 AM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Slightly contrived example:    buildAgreementMessage :: (Monad m, CryptoRandomGen g

Re: [Haskell-cafe] Re: Crypto-API is stabilizing

2010-09-03 Thread Thomas DuBuisson
If MR the more agreeable path then I'll do it, though this means I use the unholy fail function. You don't want to use monads because the Monad class defines the fail function? Sorry, I phrased this better on the blog comment. I don't want to use MonadRandom m = m (p,p) (MonadRandom + fail)

[Haskell-cafe] Re: Crypto-API is stabilizing

2010-09-02 Thread Thomas DuBuisson
Marcel noted: A central interface to get the output of a PRNG would be nice, preferably not constrained to Int like RandomGen. While BOS said: Also, don’t use RandomGen for your asymmetric PRNG. The default implementation in System.Random gives absolutely disastrous performance, and the

Re: [Haskell-cafe] Re: Crypto-API is stabilizing

2010-09-02 Thread Thomas DuBuisson
On Thu, Sep 2, 2010 at 3:07 PM, Sebastian Fischer s...@informatik.uni-kiel.de wrote:  data Key = Key {               encrypt   :: B.ByteString - B.ByteString,               decrypt   :: B.ByteString - B.ByteString,               keyLength :: BitLength,               serialize :: B.ByteString}

[Haskell-cafe] Re: Crypto-API is stabilizing

2010-08-26 Thread Thomas DuBuisson
class (Binary p, Serialize p) = AsymCipher p where generateKeypair :: RandomGen g = g - BitLength - Maybe ((p,p),g) encryptAsym :: p - B.ByteString - B.ByteString decryptAsym :: p - B.ByteString - B.ByteString asymKeyLength :: p - BitLength Regarding AsymCipher:

[Haskell-cafe] Crypto-API is stabilizing

2010-08-23 Thread Thomas DuBuisson
All, Crypto-API - a unified interface to which I hope hash and cipher algorithms will adhere - has recently gotten a reasonable amount of polish work. I continue to welcome all comments! A blog on its current interface is online [1] as are darcs repositories of the crypto-api package [2].

Re: [Haskell-cafe] Re: Microsoft's Singularity Project and Haskell

2010-07-31 Thread Thomas DuBuisson
And note that we wouldn't need unsafePerformIO for the FFI if all programs were made in Haskell ;). Perhaps that's true, though entirely unrealistic, in the application world. In the OS world you need access to machine registers and special instructions (CR3 anyone? CP15?) which isn't built

Re: [Haskell-cafe] Re: Microsoft's Singularity Project and Haskell

2010-07-31 Thread Thomas DuBuisson
On Sat, Jul 31, 2010 at 8:27 PM, wren ng thornton w...@freegeek.org wrote: Thomas DuBuisson wrote: And note that we wouldn't need unsafePerformIO for the FFI if all programs were made in Haskell ;). Perhaps that's true, though entirely unrealistic, in the application world.  In the OS world

Re: [Haskell-cafe] Memory and Threads - MVars or TVars

2010-07-29 Thread Thomas DuBuisson
On Thu, Jul 29, 2010 at 6:53 AM, Job Vranish job.vran...@gmail.com wrote: You might try pulling downloading the package ('cabal fetch org'  will do this) and changing the base dependency (to = 4.1) in the orc.cabal file cabal also has an 'unpack' command for the particularly lazy (me). Ex:

Re: [Haskell-cafe] Chart package segfaults when rendering to window

2010-07-26 Thread Thomas DuBuisson
Can you boil this down to some simple example code? Are you using a recent version of Chart? And your definition of latest gtk2hs is 11, right? How about your gtk+ C library, it what? 2.20? Cheers, Thomas On Mon, Jul 26, 2010 at 9:39 PM, bri...@aracnet.com wrote: Seems to be ok rendering to

Re: [Haskell-cafe] Porting ELF statifier to Haskell!

2010-07-22 Thread Thomas DuBuisson
Interesting tool. For my recent work I too have found a use for the elf package, but its lack of a full binary instance and no parsing of .symtab or .dynstr sections limits its usefulness. This isn't a debilitating limitation - you can use elf for basic inspection then perform mutations via

Re: [Haskell-cafe] Experiences with cabal-install and Hackage

2010-07-22 Thread Thomas DuBuisson
Not to discourage this brainstorming, but many of what people think to be new ideas are being implemented by a GsoC student [1] already. Yay! I've rather recently started to use cabal-install to install packages from Hackage.  Unfortunately, so far many packages fail to install.  I try to

Re: [Haskell-cafe] HTTP Redirect With HTTPS Rejected

2010-07-20 Thread Thomas DuBuisson
You should be CCing the author and creator (different people) of the library. Not everyone in the Haskell universe is subscribed to -cafe or any other ML. Cheers, Thomas On Tue, Jul 20, 2010 at 1:49 PM, aditya siram aditya.si...@gmail.com wrote: The problem is that any page that that responds

Re: [Haskell-cafe] HTTP Redirect With HTTPS Rejected

2010-07-20 Thread Thomas DuBuisson
Sorry, I ment to say CC the maintainer and the author if that wasn't obvious. Thomas On Tue, Jul 20, 2010 at 2:00 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: You should be CCing the author and creator (different people) of the library.  Not everyone in the Haskell universe

Re: [Haskell-cafe] Deprecated gtk2hs functions

2010-07-16 Thread Thomas DuBuisson
You mean something like buttonPressEvent [1]? on button buttonPressEvent You can define signals, the constructor is exposed. [1] http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-Abstract-Widget.html#v%3AexposeEvent On Fri, Jul 16, 2010 at 11:36 AM, Alex Rozenshteyn

[Haskell-cafe] Re: cryptohash and an incremental API

2010-07-14 Thread Thomas DuBuisson
Vincent said: couple of comments around the hashes interface: * updateCtx works on blockLength, instead of working on arbitrary size... So for performance reasons you seem to prefer Semantics 1.2? 1.2 Multiple of blockSize bytes Implementations are encouraged to consume data (continue

Re: [Haskell-cafe] Marshalling

2010-07-13 Thread Thomas DuBuisson
That code is effectively copying the data (thats what those peeks / pokes do), so it stands to reason it would be slow by most performance standards. The reason ByteStrings are fast when used both by C and Haskell is there is a zero-copy `useAsCString`. Cheers, Thomas On Tue, Jul 13, 2010 at

Re: [Haskell-cafe] PNG sample on haskellwiki

2010-07-12 Thread Thomas DuBuisson
I don't know about that code, but have had good experiences on two projects using the DevIL binding library found on hackage [1]. I tried pngload [2] originally, but that isn't full featured enough for real use. iirc, stb-image [3] had a similar issue of being too bare-bones; the haddock

Re: [Haskell-cafe] GHC vs GCC

2010-03-26 Thread Thomas DuBuisson
On Fri, Mar 26, 2010 at 6:16 PM, Felipe Lessa felipe.le...@gmail.com wrote: I'd guess that the LLVM backend could generate code that is at least as fast as gcc. It would be nice if you could test it. NCG done with GHC 6.12.1 w/ -O3 LLVM using a version of HEAD w/ -O3 GCC version 4.4.3 w/ -O3

Re: [Haskell-cafe] GHC vs GCC

2010-03-26 Thread Thomas DuBuisson
Using bang patterns didn't help almost anything here. Using rem instead of mod made the time go from 45s to 40s. Now, using -fvia-C really helped (when I used rem but not using mod). It went down to 10s. Bang patterns should have helped tons - it isn't GHC thats at fault here and yes it does

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-23 Thread Thomas DuBuisson
BOS: Well, your benchmarks are highly suspect. Attached is another benchmark with similar results. This is no criterion benchmark but I did try to adjust a wee bit for cache issues. Suffice to say I am not yet impressed with Data.Text performance wise. In the broader scope I feel there is a

Re: [Haskell-cafe] Re: Bytestrings and [Char]

2010-03-23 Thread Thomas DuBuisson
If you read the source code, length do not read the data, that's why it is so fast. It cannot be done for UTF-8 strings. I think at this point most the amazement is directed at Data.Text being slower than good old [Char] (at least for this operation - we should probably expand our view to more

Re: [Haskell-cafe] Trace

2010-03-19 Thread Thomas DuBuisson
Hi, I'm a new Haskell programmer and am trying to output the values of some of the variables (for debugging) as the program executes. Debugging? Use the GHCi debugger. Cheers, Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] SoC Proposals?

2010-03-16 Thread Thomas DuBuisson
Be sure to try your user name without any capitals - that worked for me... On Tue, Mar 16, 2010 at 6:59 PM, Jeff Wheeler j...@nokrev.com wrote: Is there any way to propose a SoC idea right now? My account doesn't seem to have been created correctly, so I can't login to the Trac. I think it'd

Re: [Haskell-cafe] Num instance for Lazy ByteStrings (was: NumLazyByteString Package License)

2010-03-08 Thread Thomas DuBuisson
Is NumLazyByteString a newtype around Bytestring.Lazy that interprets the bit stream represented by the ByteString as integer? Not exactly. There is not newtype wrapper. NumLazyByteString is: instance Num L.ByteString where ... instance Enum L.ByteString where ... instance Integral

[Haskell-cafe] Num instance for Lazy ByteStrings (was: NumLazyByteString Package License)

2010-03-08 Thread Thomas DuBuisson
Tristan and other interested parties on the Cafe, Answering your question first, Tristan: I was going to use BSD3 (if it isn't already) for the NumLazyByteString. For the cafe too: A while ago I made a Num instance for LPS; it is currently on my code.haskell.org account. Notice this isn't on

Re: [Haskell-cafe] how to get a string from file

2010-03-03 Thread Thomas DuBuisson
On Wed, Mar 3, 2010 at 10:26 AM, Pradeep Wickramanayake prad...@talk.lk wrote: getItemFile :: IO String This says getItemFile is an action that returns a string. No arguments. getItemFile test = ... And your implementation obviously requires a file path as an argument. You wanted a type

Re: [Haskell-cafe] Profiling

2010-02-21 Thread Thomas DuBuisson
How do I tell Cabal to install the necessary code? set: library-profiling: True in your ~/.cabal/config file and never deal with this again (for any new packages you install). use --reinstall -p to updat existing packages. Thomas ___ Haskell-Cafe

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-02-17 Thread Thomas DuBuisson
On Wed, Feb 17, 2010 at 3:17 AM, Jeremy O'Donoghue jeremy.odonog...@gmail.com wrote: You're probably correct about the dependencies. I have never tried to compile wxHaskell against GHC 6.12.1 I'm waiting for Haskell Platform to be released to make the required changes since (working primarily

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-02-16 Thread Thomas DuBuisson
On Tue, Feb 16, 2010 at 3:48 PM, Henk-Jan van Tuyl hjgt...@chello.nl wrote: On Tue, 16 Feb 2010 18:57:20 +0100, Neil Mitchell ndmitch...@gmail.com wrote: I used to recommend Gtk2hs over wxHaskell for GUI development as there was always a version that worked on Windows with the latest GHC

Re: [Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-11 Thread Thomas DuBuisson
Bardur Arantsson s...@scientician.net wrote: ...       then do errno - getErrno               if errno == eAGAIN                 then do                    threadDelay 100                    sendfile out_fd in_fd poff bytes                 else throwErrno Network.Socket.SendFile.Linux      

Re: [Haskell-cafe] matrix question

2010-02-02 Thread Thomas DuBuisson
This is identical to the homework problem posted on stackoverflow: http://stackoverflow.com/questions/2182300/haskell-matrix-scalar-multilple-question Do not post homework problems to the cafe! If you feel compelled to then identify an aspect that is tricky to you, show us what you tried, and

  1   2   3   >