e Haskell to Java, Java bytecode or DEX directly. A Google
search for "haskell java" turns up at least one good candidate[1], but
if you manage to get that working well, binding the APIs is a rather
trivial task ;)
[1] http://www.cse.unsw.edu.au/~pls/thesis-topics/ghcjava.html
A
tionally) IE_Fail, for
indicating a parse failure.
The actual implementation is unpleasant, although functional.
[1]
http://darcs.imperialviolet.org/darcsweb.cgi?r=binary-strict;a=headblob;f=/src/Data/Binary/Strict/IncrementalGet.hs
--
Adam Langley [EMAIL PROTECTED] http://www.i
the time to deal with. It's a
constant cost for my name to be associated with them and, if nobody
cares enough to take the maintainership, they should probably die -
Hackage has a lot of packages these days. Do you want control-timeout?
:)
AGL
--
Adam Langley [EMAIL PROTECTED] ht
-minihttp
network-rpca
system-inotify
Cheers
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
d be better for you(,
and for everyone else!) than avoiding the use of GHC threads. But,
with that error, you're correct that the current select based system
is insufficient.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Ha
hink it's safe to assume that no one has taken it up yet.
Personally, some of my other projects are higher priorities at the
moment.
I'd suggest that you write your server on the select() based system
as-is for now. Then, when you need epoll you'll be sufficiently
motivated to ha
ic.
That's a good reference. Also note that the paper is 6 years old and
GHC has come a long way since then. I'd suspect that the graph on page
15 would look much more favourable to Haskell these days.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
_
ific problem, I see you're allocating xptr, but I don't
see that you're ever poking a value into it. Indeed, I can't see that
createEvent ever uses 'x'.
Hope that helps.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
ny
> recommendations?
Specialised for 2d only, but:
http://www.imperialviolet.org/binary/NearestNeighbour2D.hs
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haske
On Tue, Jun 24, 2008 at 12:08 PM, Galchin, Vasili <[EMAIL PROTECTED]> wrote:
> yes I am invoking a callback function written in Haskell.
Then you should just need to remove the "unsafe" from the foreign
import decl which leads to the callback getting called.
AGL
--
uently, objects other
than stable pointers (cf. Section 5.6) may be moved or garbage
collected by the storage manager."
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
s) easier.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
g/hoogle/hoodoc.cgi?module=Foreign.Marshal.Alloc&name=mallocBytes&mode=func
[2]
http://www.haskell.org/hoogle/hoodoc.cgi?module=Foreign.ForeignPtr&name=newForeignPtr&mode=func
[3]
http://www.haskell.org/hoogle/hoodoc.cgi?module=Foreign.ForeignPtr&name=withForeignPtr&mode=func
--
Adam Langl
the answer is "no" I'm afraid. Perhaps you would care to write
such libraries if you have a need?
[1] http://hackage.haskell.org/packages/archive/pkg-list.html
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskel
ce an AIO interface is probably going to
return while the IO is still in progress, you don't want to stop the
collector, but nor do you want the data moving because the kernel's
pointer isn't going to move with it.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
tp). You're right that I should add Applicative
too; maybe this weekend.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
f I
took his highly tuned binary library and made it slow :)
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
le of binary-strict is
better.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Wed, Jun 18, 2008 at 9:16 AM, Anatoly Yakovenko
<[EMAIL PROTECTED]> wrote:
> C doesn't work like that :)
Yes it can. You would have to check the disassembly to be sure, but C
compilers can, and do, perform dead code elimination.
AGL
--
Adam Langley [EMAIL P
alviolet.org/darcsweb.cgi?r=binary-strict;a=headblob;f=/src/Data/Binary/BitPut.hs
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
like it's exported from anywhere, just used internally
for c_nanosleep
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
that an application which only
cares about 2616 headers can do call a single function to parse them
all, but I no longer advocate that the base interface use parsed forms
of headers.
Also, parsing URLs seems to be pretty uncontroversial (maybe parsing
key, value pairs from the path, maybe no
ttle for a non static:
checkUnparsedHeaders :: [String] -> IO ()
Which can be put in 'main' (or equivalent) and can call error if
there's a mismatch.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-
tp;a=headblob;f=/Network/MiniHTTP/URL.hs
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
libs.
One thing that you might need on the target host is GMP, however
that's pretty common.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
n
Python.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
al subset of the functions
(the last two need not be in Haskell, although I suspect that it would
be a good idea for them to be so)
* The first, minimal, Haskell X client using XCB
* Having sensible bindings for 25%/50%/75% and 100% of the XCB interface.
AGL
--
Adam Langley [EMAIL PRO
edirects would be a good start but, other than
that, I'm rather distracted with elliptic curve groups at the moment.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www
The client doesn't do a lot, but I don't know what you would want from
a client. Email me a list of use cases and ;)
It does support HTTPS, however. See examples/webcat.hs
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
__
On Fri, Mar 21, 2008 at 6:41 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> Firstly, I would use the Get and Put monads directly, rather than
> making them instances of Binary.
Also, while I'm at it - I believe that AMQP messages and small and
delineated. I
p (amqpGetTable !) getWord8
Hope that helps some
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ve timeouts for talking to
the network. However, these shouldn't be too hard.
[1]
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-minihttp-0.2
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe maili
s given a talk at Google.
(It might have been very informal, in which case there wouldn't be a
record of it, and nor would there be a video)
Cheers,
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Ha
peeps like to speak up here?
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
L, O_RDWR|O_NONBLOCK) = 0
You can see that the socket is set to non-blocking immediately.
[1]
http://haskell.org/ghc/docs/latest/html/libraries/network/src/Network-Socket.html#recvFrom
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
__
/ghc/ticket/2161
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sun, Mar 16, 2008 at 8:40 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> I believe that I've managed to distill a crash which has been driving
> me crazy for a few days into a short enough test case (22 lines) that
> it might be useful.
Cale made a suggestion which shor
oping that this is useful to someone who knows the RTS.
Cheers,
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Mar 14, 2008 at 10:13 AM, Adam Langley <[EMAIL PROTECTED]> wrote:
> See [1] for an example which works for me.
(If you're on Windows, you probably need to wrap main in withSocketsDo)
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.impe
get
this:
"working..."
"working..."
("testing\n",8,127.0.0.1:36179)
"working..."
"working..."
("testing two\n",12,127.0.0.1:36179)
"working..."
[1] http://hpaste.org/6362
--
Adam Langley [EMAIL PROTECTED] http://www.impe
the code for send and recv in there.
Alternatively, you can use the functions in Network.Socket, which
should work fine.
[1]
http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html#v%3AthreadWaitRead
[2]
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-b
ng Handles to interface to the network, they
can buffer the response. hFlush[1] may need to be called when you have
finished generating it.
[1]
http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#v%3AhFlush
AGL
--
Adam Langley [EMAIL PR
On Wed, Mar 12, 2008 at 3:49 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> The OpenID example is running in EC2[4] at the moment if anyone wants to
> play.
Well, thanks to all the people who hit it, there's nothing like users
to find the stupid bugs ;)
* Caching was wrong
On Wed, Mar 5, 2008 at 12:25 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> I'm
> working towards, is an OpenID consumer. Once I have that working, I'll
> do a second release. It's not that far off, it's just a question of
> time.
The darcs release of m
e overflow :(
Map is probably a better choice than HashMap. Exactly how large is the
input? Like I said, I got about 2x bloat (measured by RSS), maybe you
can send a fuller example code?
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
__
e to try and figure out which
module they are going to resolve into all the time!
Cheers,
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
j/papers/stm/index.htm
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
normal
processing, such a state doesn't arise. Otherwise, have a Maybe in
your state and set it to Nothing when the input is exhausted. Then
have combinators, like many, handle the EOF case sensibly.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
ere was the trick that I've been missing all this time ;) I'll
probably submit a documentation patch for this since I'm a Bear of
Little Brain and this wasn't obvious to me.
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
askell I'm afraid. I usually end up FFIing out to htons
or just assuming that the system is little-endian.
We should really fix this unless there's some trick that I've been
missing all this time.
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
__
e filesystem quite happily. The darcs repo is
just a mess at the moment. (darcs.imperialviolet.org/network-minihttp)
[1]
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-minihttp-0.1
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperi
On Wed, Mar 5, 2008 at 11:07 AM, Bryan O'Sullivan <[EMAIL PROTECTED]> wrote:
> Indeed. In addition to the code you mention, people like Adam Langley
> and Johan Tibbell are taking on corners of the web app problem space in
> a more modern context.
I should probably s
.
However, it shouldn't be too hard to wrap HsOpenSSL in this interface.
I might try this this week. Then HTTPS should Just Work (maybe ;)
AGL
--
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing li
re running. If it's < 6.8, you may have problems because the
directory package didn't exist before then, I believe the same modules
were in the base package. In that case, the easy solution is probably
to upgrade GHC.
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/dir
wanted
to avoid hitting the monomorphism restriction in code. That might have
been a mistake, I'm not sure yet.
If it doesn't excite anyone enough to reply, I'll change the name and
put it in Hackage, mostly as is. Then I'll tie HsOpenSSL into it so
that SSL connections work tran
On Sun, Feb 24, 2008 at 4:08 PM, Evan Martin <[EMAIL PROTECTED]> wrote:
> So two questions: Is there an alternative C-parsing library?
You could use gcc-xml[1] with one of the various XML parsers.
[1] http://www.gccxml.org/HTML/Index.html
--
Adam Langley [EMAIL PROTEC
d [] right now, but it will
apply 'shows i " "' to each element in the first list and concat the
results. Since strings are just [Char], concating them is string
concatenation. And so you have "1 16 81 " (again, note the trailing
space)
AGL
--
Adam Langley [EMAIL P
o serious with it
yet, however. It needs a few limits to stop DoS attackers from, for
example, sending an infinite header and using up all the memory :)
[4]
http://hackage.haskell.org/packages/archive/network-dns/0.1.1/doc/html/Network-DNS-Client.html
--
Adam Langley [EMAIL PROTECTED]
http://www.i
Filed as:
http://hackage.haskell.org/trac/ghc/ticket/2096
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Feb 12, 2008 11:04 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> structure filled in. HsUnix.h has a wrapper around lstat for exactly
> this reason, however ltrace shows it calling the wrong one.
So (finally!) the real issue:
hsc2hs has a C preprocessor prelude (utils/hsc2hs/te
On Feb 12, 2008 10:44 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> Currently I'm looking at hsc2hs for this bug. On a 32 bit box here:
hsc2hs is forgiven; if you build with #define _FILE_OFFSET_BITS 32
then the structure is 96 bytes and the 64-bit offset is, indeed, at
offset 88
function (which does both the lstat and
extraction from the structure) and FFI it.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
2008/2/11 Galchin Vasili <[EMAIL PROTECTED]>:
> http://hackage.haskell.org/packages/archive/pkg-list.html .. what are
> some packages that use Storable?
binary and binary-strict at least.
AGL
--
Adam Langley [EMAIL PRO
n nice bindings to much of OpenSSL:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HsOpenSSL-0.3.1
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
_
), you'll need to marshal
yourself:
data SomeIOCtlStruct = CInt CInt CInt
ioctlSomeIOCtlStruct :: CInt -> CInt -> SomeIOCtlStruct -> IO ()
ioctlSomeIOCtlStruct = do
... (see the above linked to pointers to hsc2hs and c2hs about how to write
this function)
AG
erning.org/magnus/archives/tag/hsc2hs
[2] http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
e or a
Bits type. Having a Ptr Baz where Baz is an ADT seems a little odd. If
you need to translate a structure from Haskell to C code, probably you
are better off having callers pass in a Baz then, internal to the
wrapping, fill out the C structure and call the FFI function with a
Ptr CBaz (wher
1)
My bad, I thought that the Posix.IO stuff was a closer wrapping than
that. It does, indeed, throw an exception on 0. How unfortunate.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org
tualByteCount == 0.
You can catch and handle the resulting exception with the functions in:
http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org
re thinking of layering a unionfs over the top. It works
well in my experience.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
On Jan 30, 2008 1:07 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> So, if I don't hear otherwise soon, I'll probably push a new version
> of binary-strict later on today with the interface above.
It's in the darcs now, http://darcs.imperialviolet.org/binary-str
On Jan 30, 2008 12:04 PM, Bryan O'Sullivan <[EMAIL PROTECTED]> wrote:
> Adam Langley wrote:
> I'd have expected it to look more like this:
>
> data Result a = Failed String
> | Finished B.ByteString a
> | Partial (B.ByteString -> Res
ls the real
function with the contents of that pointer. Then you just call your
wrapper function. You can make these functions by the dozen with the
preprocessor.
AGL
--
Adam Langley [EMAIL PROTECTED]
http
e IncrementalGet in the binary-strict package which is a Get with a
continuation monad that stops when it runs out of bytes and returns a
continuation that you can give more data to in the future.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.im
tp://haskell.org/ghc/docs/latest/html/libraries/base/src/GHC-List.html#foldr1
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe maili
nning strace twice, with different binaries and
output files)
and send me the resulting traces? (They'll be quite big, so I don't
know if you want to spam that whole list with them)
Cheers
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialvi
of only a single element, it can
be parameterized to choose in advance the number of elements whose
loss it can tolerate.
Hackage:
http://hackage.haskell.org/packages/archive/fec/0.1.1/doc/html/Codec-FEC.html
It's new code, but the library that it's
update bytestring...)
Cheers,
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
Thanks Isaac and Malcolm. That neatly solves all my problems!
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
Haskell-Cafe
On Jan 15, 2008 7:33 PM, Adam Langley <[EMAIL PROTECTED]> wrote:
> Ok, no TH ;)
I've just uploaded binary-strict 0.2.2 to Hackage which factors most
of the common code out via CPP. Hopefully I didn't break anything.
AGL
--
Adam Langley
LINE needs to start at the beginning of a line.
Has anyone a workaround for this, or a way to get the preprocessor to
output a newline?
Cheers
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 65
ByteString
byteaDecode = B.pack . catMaybes . snd . mapAccumL f initState . B.unpack where
initState = (0, 0)
f (0, _) 92 = ((1, 0), Nothing)
f (0, _) x = ((0, 0), Just x)
f (1, _) 92 = ((0, 0), Just 92)
f (3, n) x = ((0, 0), Just (n * 8 + (x - 48)))
f (c, n) x = ((c + 1, n * 8 + (x -
hould return a spine of 1 byte strict
ByteStrings.)
A fully lazy BitGet would also be possible, of course, I've just not written it
yet ;)
> Adam Langley imperialviolet.org> writes:
> Another thought: could e.g. getRightByteString be in the IO monad and then I
> don't have
the next $n$ bits in a
ByteString of Word8's. The padding is either at the end of the last byte (left
aligned) or at the beginning of the first byte (right aligned).
If you did want a [Bool], you could use:
bits <- sequence $ take n $ repeat getBit
AGL
--
Adam Langley
On Jan 15, 2008 5:01 PM, Neil Mitchell <[EMAIL PROTECTED]> wrote:
> That would be bad. Then you'll have gone from Data.Binary being
> portable code, to being GHC specific code, and I will cry :'-(
Ok, no TH ;)
AGL
--
Adam Langley
thin binary-strict and between binary and
binary-strict. I think this code needs a whole lot of restructuring
(maybe a bit of TH for generating the common bits). I'll get to that
when it appears that the API seems reasonable.
AGL
--
Adam Langley
fully I'm just
doing something stupid).
[1]
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-strict-0.2.1
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
at least.
How about a BitGet monad which get be run in the Get monad?
> test :: Get ()
> test = do
> runBitGet 2 (do
>getBitField 2)
So the first argument to runBitGet is the number of bytes to parse for
bit fields and then functions in BitGet can extract bit-len
hen 0x80 else 0))
sign = if n `shiftR` 31 == 0 then 1 else -1
exp = rawExp - (127 + 23)
rawExp = (n `shiftR` 23) .&. 0xff
(b, rest) = BS.splitAt 4 bytes
n :: Word32
n = foldl1 (.|.) $ map (\(s, v) -> (fromIntegral v) `shiftL` s) $
zip [0, 8, 16, 24] $ BS.unpack b
AGL
to tell that
Partial apart from one which has "real" values.
But if this is useful to you, make any requests. I'll (hopefully) do
them, clean it up and push a new release of binary-strict.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialvi
It wouldn't be too hard to make up
something like that using ContT if it would be useful to you.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
eouts - e.g. actions which occur after
a given number of seconds and which can be canceled. It does it in a
not-totally-stupid fashion so that you don't need to worry about
setting hundreds of them.
AGL
--
Adam Langley [EMAIL PROTECTED]
http
't (always) get the magic links.
Cheers,
AGL
[1]
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bzlib-0.4.0.1
[2]
http://hackage.haskell.org/packages/archive/bzlib/0.4.0.1/doc/html/Codec-Compression-BZip.html
[3] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/tar-0
't
be surprised if System.Posix just doesn't exist for Windows.
System.Process is marked as portable, so I'm not sure why that one
wouldn't be found. Finally, I believe that you want
Control.Concurrent.STM.
AGL
--
Adam Langley [EMAIL PROTECTED]
GHC API for code
motion and building a simple MapReduce like framework etc.
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
Haskell-Ca
be a parallel quicktest - which
is cool because the tests took quite a while previously).
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
get this affect, but I'm not sure you can
be sure that you don't ever get it.
Floating point numbers make me sad :(
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
_
).
If these functions would be useful for you, you should bug the binary
team to add something similar.
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
data-binary-float.da
speed, and an alternative which returns a Maybe,
removing a little bit of lazyness in cases where you want to handle
parse failures in pure code. Hopefully something will happen with this
at the next sprint ;) )
[1] http://www.cse.unsw.edu.au/~dons/binary/Data-Binary.html#1
--
Adam L
aught as exceptions when you
actually come to using the result. This is perfect for very large
messages, but might be slightly wrong for you.
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-0.3
--
Adam Langley [EMAIL PROTECTED]
h
1 - 100 of 101 matches
Mail list logo