Hello,
At runtime, I am getting
aio: schedule: re-entered unsafely.
Perhaps a 'foreign import unsafe' should be 'safe'?
I want to understand from an implementation viewpoint .. deeper. This is a
GC issue yes?
Kind regards, Vasili
___
Haske
Luke Palmer wrote in response to Harald ROTTER
> > I also wonder if there is some kind of "generalized" foldr such that, e.g.
> > D1 $ D0 $ D0 $ Sz = specialFoldr ($) Sz [D1,D0,D0]
> > I think that this foldr must be some "special" foldr that augments the data
> > type of the result in each f
See the Data.ByteString.Internal docs:
http://www.haskell.org/ghc/docs/latest/html/libraries/bytestring/Data-ByteString-Internal.html#v%3AtoForeignPtr
Of course, you'd better not write to the contents of that pointer, or
bad things could happen...
David
On Mon, Jun 23, 2008 at 08:18:23PM -0500,
e.g. on Word8 .
let aiocb = AIOCB{
aioFd=fd,
aioLioOpcode=0,
aioReqPrio=0,
aioOffset=0,
aioBuf=??,< Ptr Word8
aioByte
ok .
1) how do I marshall from ByteString to char * (poke)??
2) how do I write
let x =??? :: Word8
3) how do I write
let y = ??? ::ByteString
Kind regards, Vasili
On Mon, Jun 23, 2008 at 6:13 PM, Adam Langley <[EMAIL PROTECTED]>
wrote:
> On Mon, Jun 23, 2008 at 2:27 P
On 23 Jun 2008, at 6:30 pm, leledumbo wrote:
I've successfully create a function to return lists of N-ple that
satisfy the
following function:
x1 + x2 + x3 + ... + xN = C
But unfortunately, it's not generic.
Why do you want it to be a tuple? All the elements are the same type,
so it
migh
On Mon, Jun 23, 2008 at 2:27 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> So heap allocated and collected, but not moved.
My bad. In that case, you might want to work with ByteStrings all the
way since it might make building the visible interface (which probably
should use ByteStrings) easier.
A
Literate haskell response:
> {-# LANGUAGE GADTs, RankNTypes #-}
> module Digits where
> {-
On 6/23/08, Luke Palmer <[EMAIL PROTECTED]> wrote:
> > I also wonder if there is some kind of "generalized" foldr such that, e.g.
> > D1 $ D0 $ D0 $ Sz = specialFoldr ($) Sz [D1,D0,D0]
> > I think that
Adam Langley wrote:
> On Sat, Jun 21, 2008 at 10:52 PM, Maurício <[EMAIL PROTECTED]> wrote:
>> Are there mature libraries for IMAP and NNTP
>> available to Haskell?
>
> Pretty much, if a Haskell library exist it will be listed at [1].
> Since I don't see anything for IMAP, nor NNTP I can be prett
agl:
> On Sat, Jun 21, 2008 at 10:52 PM, Maurício <[EMAIL PROTECTED]> wrote:
> > Are there mature libraries for IMAP and NNTP
> > available to Haskell?
>
> Pretty much, if a Haskell library exist it will be listed at [1].
> Since I don't see anything for IMAP, nor NNTP I can be pretty sure
> that
agl:
> 2008/6/23 Galchin, Vasili <[EMAIL PROTECTED]>:
> > Basically I want to model POSIX async io "aiocb"(
> > http://uw714doc.sco.com/en/man/html.5/aiocb.5.html) in Haskell .. in
> > particular the aiocb field "aio_buf"!
>
> That's a mutable buffer, so this has to be pretty low level in your
> w
On 23 jun 2008, at 22:26, Spencer Janssen wrote:
On Sun, Jun 22, 2008 at 02:52:33AM -0300, Maurí cio wrote:
Hi,
Are there mature libraries for IMAP and NNTP
available to Haskell?
Thanks,
Maurício
There is the haskellnet project:
http://darcs.haskell.org/SoC/haskellnet/
I'm not sure whe
On Mon, Jun 23, 2008 at 1:15 PM, Galchin, Vasili <[EMAIL PROTECTED]> wrote:
> I tried to write a test value of Word8 without success. Can you give an
> example?
I'm not quite sure what you would want in such an example. See [1] for
the malloc function. Then you take the result and wrap it wi
On Sun, Jun 22, 2008 at 02:52:33AM -0300, Maurício wrote:
> Hi,
>
> Are there mature libraries for IMAP and NNTP
> available to Haskell?
>
> Thanks,
> Maurício
There is the haskellnet project:
http://darcs.haskell.org/SoC/haskellnet/
I'm not sure whether it is mature or maintained.
Cheers
On Mon, Jun 23, 2008 at 12:07 PM, Adam Langley <[EMAIL PROTECTED]>
wrote:
> 2008/6/23 Galchin, Vasili <[EMAIL PROTECTED]>:
> > Basically I want to model POSIX async io "aiocb"(
> > http://uw714doc.sco.com/en/man/html.5/aiocb.5.html) in Haskell .. in
> > particular the aiocb field "aio_buf"!
>
> Th
On Sat, Jun 21, 2008 at 10:52 PM, Maurício <[EMAIL PROTECTED]> wrote:
> Are there mature libraries for IMAP and NNTP
> available to Haskell?
Pretty much, if a Haskell library exist it will be listed at [1].
Since I don't see anything for IMAP, nor NNTP I can be pretty sure
that the answer is "no"
2008/6/23 Galchin, Vasili <[EMAIL PROTECTED]>:
> Basically I want to model POSIX async io "aiocb"(
> http://uw714doc.sco.com/en/man/html.5/aiocb.5.html) in Haskell .. in
> particular the aiocb field "aio_buf"!
That's a mutable buffer, so this has to be pretty low level in your
wrapping of the AIO
Alfonso,
Thanks! For didactic purposes I will defer looking into your code. It
does not always help to know the correct solution :)
Bests,
--A
On Mon, Jun 23, 2008 at 11:26 AM, Alfonso Acosta
<[EMAIL PROTECTED]> wrote:
> Inspired in Oleg's ideas, I implemented the packages type-level and
> par
2008/6/23 Abhay Parvate <[EMAIL PROTECTED]>:
> Hello,
>
> You might already know this, but in case you don't: there is another
> literate style:
>
I had trouble finding the docs on this, as I expected them to be in
the ghc user guide. For the record, the relevant docs are in the h98
report:
http:
On Mon, 23 Jun 2008, Xiao-Yong Jin wrote:
Thanks for the explanation. I guess it's just easier for me
not to give any type signature to `go', since ghc should do
the type inference quite nicely and reliably.
If you want to stay Haskell98 'asTypeOf' can help you in similar cases.
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Howard
>
> the error:
>
> renao.hs:6:4:
> Couldn't match `HttpResponse' against `IO HttpResponse'
> Expected type: IO HttpResponse
> Inferred type: IO (IO HttpResponse)
> In the expression: return $ (h
I am having issues with type signatures for the resourceHandler action
below. I haven't figured out what I'm doing wrong to cause the wrong
type to be returned. It looks like Haskell is inferring that I'm
returning a function from this action, when from the type signature I've
specified, that
> It would be nice to have blogs for all Haskell GSoC projects
> on Planet Haskell.
See also
http://hackage.haskell.org/trac/summer-of-code/wiki/progress2008
Regards,
Malcolm
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.hask
On Mon, 2008-06-23 at 04:03 -0700, leledumbo wrote:
> >> Don't give up so fast !! (Note that you can't do what you asked for in
> >> Pascal either, in fact Pascal don't support n-uplet)
> I'm not going to use n-uplet, dynamic array of array of Byte is enough.
> Though not very optimizing, I can us
(I'd rather people did not send me copies of list posts.)
On Mon, Jun 23, 2008 at 02:40:27PM +0100, Claus Reinke wrote:
> It would be nice to have blogs for all Haskell GSoC projects
> on Planet Haskell.
Any such blogs would certainly qualify. Authors should read
http://planet.haskell.org/policy
It would be nice to have blogs for all Haskell GSoC projects
on Planet Haskell.
Infrequent updates (such as Neil's weekly summaries) would
be quite okay - details can always be followed up in email,
provided that interested parties are aware of them in the
first place;-)
Otherwise, we end up wit
"Luke Palmer" <[EMAIL PROTECTED]> writes:
> On Mon, Jun 23, 2008 at 5:58 AM, Luke Palmer <[EMAIL PROTECTED]> wrote:
>> On Mon, Jun 23, 2008 at 3:26 AM, Xiao-Yong Jin <[EMAIL PROTECTED]> wrote:
>>> Hi all,
>>>
>>> I'm writing a short function as follows, but I'm not able to
>>> find a suitable type
Isaac Dupree wrote:
Don Stewart wrote:
Interesting.
Does it depend on an unreleased version of the process library?
by the way, is there a policy for when new versions of packages
maintained by [EMAIL PROTECTED] are *released*? Or do patches just collect
in the darcs repository until they'r
Hello,
You might already know this, but in case you don't: there is another
literate style:
... non-code ...
\begin{code}
... code ...
\end{code}
... non-code ...
in which you do not put prefixes to each line. (In fact the standard says
somewhere it is not recommended to mix the two styles if I
>> Don't give up so fast !! (Note that you can't do what you asked for in
>> Pascal either, in fact Pascal don't support n-uplet)
I'm not going to use n-uplet, dynamic array of array of Byte is enough.
Though not very optimizing, I can use 2 step process:
1. Generate all lists (array of Byte) of
>> Don't give up so fast !! (Note that you can't do what you asked for in
>> Pascal either, in fact Pascal don't support n-uplet)
I'm not going to use n-uplet, dynamic array of array of Byte is enough.
Though not very optimizing, I can use 2 step process:
1. Generate all lists (array of Byte) of
Don Stewart wrote:
Interesting.
Does it depend on an unreleased version of the process library?
by the way, is there a policy for when new versions of packages
maintained by [EMAIL PROTECTED] are *released*? Or do patches just collect
in the darcs repository until they're picked up by some m
Hello Chaddai,
Monday, June 23, 2008, 1:42:25 PM, you wrote:
>> I give up %-|, I'll go back to Pascal instead. Thanks for your answers.
> findAllAns 0 0 = [[]]
> findAllAns 0 s = []
> findAllAns n s = [ x:xs | x <- [0..s], xs <- findAllAns (n - 1) (s - x) ]
seems that leledumbo found a new way
2008/6/23 leledumbo <[EMAIL PROTECTED]>:
>
> I give up %-|, I'll go back to Pascal instead. Thanks for your answers.
Don't give up so fast !! (Note that you can't do what you asked for in
Pascal either, in fact Pascal don't support n-uplet)
A recursive way to do it is :
findAllAns 0 0 = [[]]
fin
Basically I want to model POSIX async io "aiocb"(
http://uw714doc.sco.com/en/man/html.5/aiocb.5.html) in Haskell .. in
particular the aiocb field "aio_buf"!
Kind regards, Vasili
On Sun, Jun 22, 2008 at 1:47 AM, Galchin, Vasili <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I want to model an I/O re
> > I'm wondering how usually you parse command line arguments
> > list safely.
> >
> > Prelude.read: no parse
>
> It's generally not a good idea to call 'read' on user data.
There is (at least one) proper parsing library intended as a direct
replacement for Read:
http://www.cs.york.ac.uk/fp
I give up %-|, I'll go back to Pascal instead. Thanks for your answers.
--
View this message in context:
http://www.nabble.com/Help-with-generalizing-function-tp18063291p18065206.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
__
Inspired in Oleg's ideas, I implemented the packages type-level and
parameterized-data (which includes number-parameterized vectors).
To get an idea about how they work you might want to read their
haddock documentation in hackage:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/type-
On Mon, Jun 23, 2008 at 6:30 AM, leledumbo <[EMAIL PROTECTED]> wrote:
> I've successfully create a function to return lists of N-ple that satisfy the
> following function:
> x1 + x2 + x3 + ... + xN = C
> But unfortunately, it's not generic. The N is supposed to be an input, too.
> I don't know how
On Mon, Jun 23, 2008 at 06:51:09AM +0100, Jamie Brandon wrote:
> I was hoping to have my summer of code blog added to planet haskell
> but [EMAIL PROTECTED] no longer seems to exist. Hopefully
> the owner is subscribed to this list?
It exists but seems to be broken. Thank you for letting me know.
On Mon, Jun 23, 2008 at 6:50 AM, Harald ROTTER <[EMAIL PROTECTED]> wrote:
> Hello,
>
> sorry for the late answer, I was off for the weekend :-)
>
> The paper "Number-parameterized types" by Oleg Kielyov is located at
>
> http://okmij.org/ftp/papers/number-parameterized-types.pdf
>
> It impress
>> tuples may contain any combination of types, use lists instead
I think so, too.
>> You can use <- in a list comprehension or list "do"-block to select a
>> single list from a list of lists.
Is it related with my question? I mean, instead of extracting, I need to
construct lists.
--
View this
42 matches
Mail list logo