BTW, while I'm here... I sat down and wrote my own MD5 implementation.
How is the performance on this new MD5 routine? It looks like we have
gone from just one Haskell MD5 implementation (that I know of) to
three in a short period of time. This isn't counting the C bindings,
of coarse.
Also,
On Nov 17, 2007 11:40 AM, Andrew Coppin [EMAIL PROTECTED] wrote:
As far as I know, mine is unique in that it's 100% Haskell and
requires nothing aside from the libraries shipping with GHC in order to
compile. (E.g., I downloaded somebody else's, and it just wouldn't
compile. It was looking for
However, I suggest avoiding trivially reducible problems like computing
constants (e, pi, primes, fib) and redundant operations (binary trees). Make
sure programs accept a non-trivial input (even if it is just an int over a
wide range). Avoid unnecessary repeats (e.g. atom.hs). This will
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
Does the 'old' function referenced in the SPJ and Tim Harris data
invariants paper stil exist? It is of type STM a - STM a and allowed
invariants to compare old TVar values with new ones. I can't find it in
any of the Haddocks or the code (and the 'check' funciton is not
commented in the
On Wed, 2008-01-30 at 19:32 -0600, Derek Elkins wrote:
Uh, why not? Often that's exactly what I do as checking even
conveniently located documentation is more time consuming than just
trying it.
I find it agreeable that there always be documentation for exported
functions.
In my undergrad
Cafe,
Fact 1: ghc{,i} does not crash when executing this code.
Fact 2: I do not want this to crash.
Question: Is there some theoretical window between the 'catchDyn' exception
handling and the recursive call to 'catchThatDamnError' that could result in an
unhandled exception? (of type
Hopefully this bundle would be a module that re-exports all the
submodules packages. I'm kind of annoyed by some of my code that
imports ten different modules for one function from each.
So in this case:
import nanoCrypto (md5, sha, hmac)
where nanoCrypto is a bundle (just another hackage
Generally you should be able to tell which library you're missing
based on the names of the undefined symbols. Have you link in...
libgmp.a? libm.a? libc.a? What are the missing symbols?
Thomas
On Tue, Oct 6, 2009 at 9:44 AM, John Velman vel...@cox.net wrote:
I think if I knew which libraries
You are missind libHSbase. Try, for example:
locate libHSbase-3.0.1.0.a
and link that in.
Thomas
On Tue, Oct 6, 2009 at 11:51 AM, John Velman vel...@cox.net wrote:
On Tue, Oct 06, 2009 at 09:48:44AM -0700, Thomas DuBuisson wrote:
Thanks, Thomas.
Linking in only libffi.a, libgmp.a, I
(I notice that it relies on the user manually annotating anything that isn't
safe to revert... This makes me nervous.)
So due to impurity everything that isn't explicitly annotated is
implicitly 'unsafeIOToSTM'?
___
Haskell-Cafe mailing list
Modules come from Haskell packages, most of which can be found on
hackage.haskell.org.
If you are looking for a module but you don't know which package it
comes from then feel free to search using hoogle or hayoo!. Obviously
manually checking all the seemingly related packages on hackage is
also
thanks for your quick answer. But
I think he actually answered your question. I.e. try it with this
extra 'do' statement:
winSSQ count noRed noBlue = do { do
let yesRed = [1..33] \\ noRed;
let yesBlue = [1..16] \\ noBlue;
bracket (openFile ssqNum.txt WriteMode) (hClose) (\hd1 -
If its monadic code then use Control.Monad.when.
If its pure code then omitting the 'else' clause makes no sense
what-so-ever; to omit the else you must know the boolean is always true so
why have the if? See the Common Misunderstandings [1] page I put together
in response to seeing one too many
zaxis z_a...@163.com wrote:
let aaa = unsafePerformIO $ newIORef []
writeIORef aaa [1,2,3]
readIORef aaa
[(),(),()]
What in Haskells name do you think you're doing? Don't use
unsafePerformIO like that! Its unnecessary and a bit concerning,
really.
Prelude :m Data.IORef
Prelude Data.IORef
For clarity, one trick that uses unsafePerformIO which you may have seen
posted on this list earlier today is the following way of creating a
globally visible IORef:
import Data.IORef
import System.IO.Unsafe
*** counter = unsafePerformIO $ newIORef 0 ***
next = do
modifyIORef counter
FYI
I've fixed up the GPS package [1] (not previously announced) so it now
has a correct distance calculation, new addVector function, and a
separate module for the KML export functionality. This is just
something I pretty up if/when I need it; let me know if you find it
useful and I'll be more
Iain,
If you wanted to make sure it didn't have to do with ghci then you
should have compiled the original code, not tested different
functions. The code you provided works fine compiled and I too am
curious what is going on when you run it in ghci.
Thomas
On Tue, Oct 27, 2009 at 8:26 AM, Iain
+ Distributed hackage is DHT network.
A DHT has been discussed before on IRC, glad to hear more people
voicing the thought.
+ Everything is PGP-signed.
Yes, that would certainly be needed and also came up in our discussion.
+ Everyone can push package into network, everyone can rate
On Wed, Nov 4, 2009 at 2:21 PM, Torsten Otto t-otto-n...@gmx.de wrote:
Hi!
My students have the task to program an interactive chatbot. We have run
into a problem that I can't solve either:
When we read the user's input through
t - getLine
it is not possible to delete typos before
1 -- How active is the team who is writing the JHC compiler?
The Team is John and Its not his day job afaik. Lemmih used to work
on it before he forked it into LHC which has since evolved into a
new (GRIN based) backend for GHC [1].
2 -- Is it complete Haskell? The author claims that it is;
Like paolino, I did a couple tests and found:
data TreeX = Leaf Int | NotLeaf Int deriving (Show, Read)
[to...@mavlo Test]$ ./jtree
Give me a tree:
Leaf 5
jtree_code.c:2572: case fell off
Aborted
[to...@mavlo Test]$ ./jtree
Give me a tree:
NotLeaf
The documentation explicitly says indexU is O(n) - no need for so much
testing to rediscover that fact. When I needed a contiguous block of
values in UArr, I just relied on sliceU to acquire the block and
performed a foldU.
Thomas
On Sun, Nov 15, 2009 at 4:00 AM, Alexey Khudyakov
Could you expand on this fragment of code? Perhaps a fullying
compilable example? It depends how you are getting the pointer, not
how you are reading data out of the pointer. For example, if you use
withCString to get ptr then the memory will be freed automatically.
Thomas
On Sun, Nov 29,
On Tue, Dec 15, 2009 at 10:30 AM, Maciej Piechotka
uzytkown...@gmail.com wrote:
My results (ghc 6.12.1, Core 2 Duo 2.8 GHz, Linux 2.6.32, Gentoo):
Not Optimized not compiled:
First: 12.47 secs, 1530911440 bytes
Second: 17.40 secs, 1929614816 bytes
Optimized compiled:
First: 1.24 secs,
I would like to write a routine like
nextPtr :: Storable a = Ptr a - Ptr a
nextPtr = (`plusPtr` sizeOf (undefined :: a))
How about:
getA :: Ptr a - a
getA _ = undefined
nextPtr ptr = (`plusPtr` sizeOf (getA ptr)) ptr
-Thomas
'time' is the generally accepted package which exports the Data.Time you
mentioned. 'DateTime' looks to use 'time' to provide an aledgedly simpler
API. 'old-time' should go away eventually and thus you should not use it for
new projects.
You likely want 'getCurrentTime' [1].
Thomas
[1]
I agree with Michael in this - such material is out of place for the cafe.
On Thu, Dec 31, 2009 at 10:04 AM, Michael Snoyman mich...@snoyman.comwrote:
On Thu, Dec 31, 2009 at 11:57 AM, Ivan Miljenovic
ivan.miljeno...@gmail.com wrote:
2009/12/31 Michael Snoyman mich...@snoyman.com:
Some
Handbook of Computer Vision Algorithms in Image Algebra
I started to read it felt it was a solid text but just don't have the time.
Thomas
http://www.amazon.com/Handbook-Computer-Vision-Algorithms-Algebra/dp/0849300754/ref=sr_1_1?ie=UTF8s=booksqid=1264487502sr=8-1
2010/1/25 Keith Sheppard
1) Don't use System.Posix.Signals
It isn't necessary and makes your code less portable
2) The POSIX SIGALRM is used/caught by the RTS and that is why you are
seeing strange behavior.
3) Consider using Haskell exceptions from Control.Concurrent (throwTo).
Not sure what you want to do but you can
Brian Denheyer bri...@aracnet.com wrote:
On Mon, 25 Jan 2010 23:19:53 -0800
Thomas DuBuisson thomas.dubuis...@gmail.com wrote:
1) Don't use System.Posix.Signals
It isn't necessary and makes your code less portable
2) The POSIX SIGALRM is used/caught by the RTS and that is why you
Brian Denheyer bri...@aracnet.com wrote:
On Tue, 26 Jan 2010 10:54:03 -0800
Thomas DuBuisson thomas.dubuis...@gmail.com wrote:
doEvent f usDelay = forkIO $
threadDelay usDelay
doEvent f usDelay
f
Are you sure that's right ? It seems to be a memory-gobbling infinite
loop
On Wed, Jan 27, 2010 at 7:31 AM, Brian Denheyer bri...@aracnet.com wrote:
On Tue, 26 Jan 2010 22:41:44 -0800
Thomas DuBuisson thomas.dubuis...@gmail.com wrote:
Brian Denheyer bri...@aracnet.com wrote:
On Tue, 26 Jan 2010 10:54:03 -0800
Thomas DuBuisson thomas.dubuis...@gmail.com
Other responses have been great but if you are cabalizing you might also be
interested in:
http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html
Cheers,
Thomas
On Wed, Jan 27, 2010 at 9:06 AM, Matveev Vladimir dpx.infin...@gmail.comwrote:
Hi,
I'm writing cross-platform
Brian Denheyer bri...@aracnet.com writes:
doEvent f usDelay = forkIO $
threadDelay usDelay
doEvent f usDelay
f
There's a missing 'do' here, right?
Yes - I said that in a later e-mail but it doesn't fix me violating my own
peeve about non-functional code snippits on -cafe.
To install on ghc-6.12.1 I had to modify the .cabal to accept containers
package version 0.3 (I already had the gtk2hs installed). It works fine at
first glance, will use it more.
- containers = 0.2 0.3
+containers = 0.2 0.4
Cheers,
Thomas
On Wed, Jan
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
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
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
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
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
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
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
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].
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:
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
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}
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)
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
, 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
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
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
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
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
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
- 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
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
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
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
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
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,
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
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
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
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
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
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
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,
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,
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
- they all can use the low-level binding in this package for
OpenUSB (which is not available now, until some expert on
that library helps me do it). No need for testing, debugging,
checking for portability or proper initialization, as all that
has been taken into account.
Having OpenUSB
I haven't seen the Haskell site mention the shootout, whereas web pages
about Clean often do.
Well, there certainly has been significant efforts on the shootout in the
Haskell community. There's wiki pages about it [1] and it comes up on the
Haskell reddit and proggit frequently.
With
While not entirely handy, do the .prof files not contain enough
information on entries into a function?
[...@mavlo Test]$ grep addLeaf PingNet.prof
addLeaf Network.Pastry.Data.LeafSet
822 1 0.00.0 0.00.0
addLeaf
All,
I have a simple Haskell P2P library that I've been playing with in
simulations of 20 to 600 nodes. To run the simulation there is a
Haskell thread (forkIO) for every node in the system, one that starts
up all the nodes and prints the info (so prints aren't mangled), and
one that acts as the
On Sat, May 9, 2009 at 6:28 AM, Neil Brown nc...@kent.ac.uk wrote:
properly, the slight variation is actually a good test). What I would
like to know is are there any plans for GHC to incorporate
user-definable scheduler?
What exactly is it that you want from a user-definable scheduler? Do
Because you're looking for:
Just 3 = return . (+1)
or more simply
Just 3 = Just . (+1)
or more generally:
return 3 = return . (+1)
The second argument of (=) is supposed to be of type (Monad m = a
- m b) but (+1) ishe of type (Num a = a - a). Wre is the monad in
that?
Thomas
On Sat, May 9,
On Mon, May 18, 2009 at 10:13 PM, Brandon S. Allbery KF8NH
allb...@ece.cmu.edu wrote:
On May 19, 2009, at 01:07 , z_axis wrote:
rollDice_t n = do
hd - openFile /dev/random ReadMode
v - B.hGet hd 1
return (v `mod` n) + 1
No instance for (Integral B.ByteString)
You can't just
Manu,
Did you skip over the dozens of links at haskell.org answering exactly
these questions? There are links to some great tutorials [1] and IRC
information where you can get real-time help [2]. Also there are some
good books [3].
I think most recent learners learned from YAHT [4], Gentle
There are links to some great tutorials [1] and IRC
information where you can get real-time help [2]. Also there are some
good books [3].
I think most recent learners learned from YAHT [4], Gentle
Introduction [5], and LYAH [6]. I personall read [3] [4] and
eventually discovered [7],
I think getRemainingLazyByteString expects at least one byte
No, it works with an empty bytestring. Or, my tests do with binary 0.5.0.1.
The specific error means you are requiring more data than providing.
First check the length of the bytestring you pass in to the to level
decode (or 'get')
that
19 was the minimum size instead of 13.
On Tue, Jun 2, 2009 at 1:24 PM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
I think getRemainingLazyByteString expects at least one byte
No, it works with an empty bytestring. Or, my tests do with binary
0.5.0.1.
The specific
...@gmail.com wrote:
On Tue, Jun 2, 2009 at 1:56 PM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
Again, I can't reproduce your problem. Are you getting data through
some previous Binary instance before calling the routines you show us
here?
Ah good question... I'm calling decode, but it's
1 - 100 of 226 matches
Mail list logo