Hi,
On 27/02/2013 20:38, John D. Ramsdell wrote:
How does one create a value of type System.IO.Handle for reading that
takes its input from a string instead of a file? I'm looking for the
equivalent of java.io.StringReader in Java. Thanks in advance.
I have this weird problem accessing hackage, when the first response
gets delayed by 30 seconds:
http://superuser.com/q/557271/53951
Does anyone else experience it? (No need to reply with works for me —
I know that it works for most people.)
Any clues about what can be the problem?
Roman
On 2/27/13 2:17 AM, Vincent Hanquez wrote:
Two major problems of lazy bytestrings is that:
* you can't pass it to a C bindings easily.
* doing IO with it without rewriting the chunks, can sometimes (depending
how the lazy bytestring has been produced) result in a serious
degradation of
On Thu, 2013-02-28 at 01:22 -0800, wren ng thornton wrote:
On 2/27/13 2:17 AM, Vincent Hanquez wrote:
Two major problems of lazy bytestrings is that:
* you can't pass it to a C bindings easily.
* doing IO with it without rewriting the chunks, can sometimes (depending
how the lazy
On Mon, 2013-02-25 at 11:59 -0800, Johan Tibell wrote:
On Mon, Feb 25, 2013 at 4:30 AM, Nicolas Trangez nico...@incubaid.comwrote:
- cereal supports chunk-based 'partial' parsing (runGetPartial). It
looks like support for this is introduced in recent versions of 'binary'
as well
On Wed, 2013-02-27 at 07:49 +0100, Vincent Hanquez wrote:
On Mon, Feb 25, 2013 at 01:30:40PM +0100, Nicolas Trangez wrote:
...
I've been looking at the same thing lately, and i've been quite surprised, to
say the least, by the usual go-to packages (cereal, binary). Performance wise
this is
Hi All,
Say I have a haskell function 'f' that does a forkIO and starts an action
a. I create a DLL of this haskell code and inovke f from C. Can I
expect the a to continue to run once f has returned to C?
Regards,
Kashyap
___
Haskell-Cafe mailing
Ok, I got what seems to be the correct answer:
http://superuser.com/a/558715/53951
In a nutshell, the misconfiguration of my ISP's DNS results in reverse
DNS queries of my IP address timing out.
So now my questions are:
- can anyone confirm that hackage indeed attempts to do reverse DNS
I think I wasn't clear about my question. I want something that
creates a value of type System.IO.Handle. You see, I have a high
performance S-expression parser that I'd like to use in GHCi reading
strings while at the command loop.
Here is more details on my module SExpr that exports the SExpr
Hi John,
Using bytestring-handle, you can get this with something like
stringHandle :: String - Handle
stringHandle s = readHandle False (Data.ByteString.Char8.pack s)
[note the complete disregard of encoding issues in the use of
Data.ByteString.Char8]
Cheers,
Ganesh
On 28/02/2013 13:32,
I couldn't find the mkHandle function in the source linked to the
specified Haddock generated documentation page.
If there is a consensus that others besides myself would like a
function with the signature
stringHandle :: String - IO (Handle)
I'd be happy to contribute code. I'd need help as I
I see now. I read the source code incorrectly. Now I know what to do.
John
On Thu, Feb 28, 2013 at 8:40 AM, Ganesh Sittampalam gan...@earth.li wrote:
Hi John,
Using bytestring-handle, you can get this with something like
stringHandle :: String - Handle
stringHandle s = readHandle False
Is your parser impure? I would expect a function from
String/Text/ByteString to Maybe (SExpr Pos).
Then you have no need for a Handle.
Regards,
Erik
On Thu, Feb 28, 2013 at 2:32 PM, John D. Ramsdell ramsde...@gmail.com wrote:
I think I wasn't clear about my question. I want something that
Just to clarify, here is the sample haskell code that I am using -
{-# LANGUAGE ForeignFunctionInterface #-}
module Glue where
import Foreign.C.String
import qualified Control.Concurrent as CC
funHaskell :: CString - IO Int
funHaskell cstr = do
putStrLn Haskell function called
str -
On Thu, Feb 28, 2013 at 6:09 AM, C K Kashyap ckkash...@gmail.com wrote:
Say I have a haskell function 'f' that does a forkIO and starts an action
a. I create a DLL of this haskell code and inovke f from C. Can I
expect the a to continue to run once f has returned to C?
While you're off in C
Hi café,
I'm working on a small project, and I need to rename all ocurrences of a
data type in a module.
For instance, if the program is
module Foo where
data Bar
fun :: Bar - Bar
fun = ...
I'd like that during compilation the module looks as if it was written like:
module Foo where
data
The actual parser is a bit more complicated than I let on. First,
it's important that not all of a file be read at the same time as the
files can be huge. Second, it keeps track of column row position
information as an IORef, which makes sense because the ref is bundled
in a structure with the
What data type are you dealing with exactly?
If you have a socket, I guess you can just use it from C (via FFI).
PS:
By Network.Connection, do you mean
http://hackage.haskell.org/package/network-connection-0.1.1 ? Seems
deprecated.
On 28/02/13 06:14, C K Kashyap wrote:
Hi,
I am using
Quoth C K Kashyap ckkash...@gmail.com,
...
Say I have a haskell function 'f' that does a forkIO and starts an action
a. I create a DLL of this haskell code and inovke f from C. Can I
expect the a to continue to run once f has returned to C?
Once control returns to f's caller, outside of the
I am using http://hackage.haskell.org/package/connection.
So I create network connection in Haskell
getConnection :: IO Connection
I'd like this connection to be returned to C so that subsequent calls from
C can send in the connection handle.
Regards,
Kashyap
On Thu, Feb 28, 2013 at 9:04 PM,
If I understand you correctly you need a StablePtr to your Connection
value. Please see:
http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.6.0.1/Foreign-StablePtr.html
Best regards,
Krzysztof Skrzętnicki
On Thu, Feb 28, 2013 at 6:31 PM, C K Kashyap ckkash...@gmail.com wrote:
I am
Quoth C K Kashyap ckkash...@gmail.com,
I am using http://hackage.haskell.org/package/connection.
So I create network connection in Haskell
getConnection :: IO Connection
I'd like this connection to be returned to C so that subsequent calls from
C can send in the connection handle.
Okay, for now I have figured out a working solution to the original problem
I was facing .
I just forkIO another IO action that does the actual network work and in
addition, it opens a server socket and waits for commands.
The calls from C reach Haskell, from where a connection is made to
Hey Donn .. thanks, it turns out that threads do resume!!! This is how
I got my gmail stuff working.
I only have a doubt if the TCP keep/alive stuff continues to happen or
not
Regards,
Kashyap
On Thu, Feb 28, 2013 at 9:07 PM, Donn Cave d...@avvanta.com wrote:
Quoth C K Kashyap
Quoth C K Kashyap ckkash...@gmail.com,
Hey Donn ... when you say, implement the IO in C, you also imply
implementing the SSL stuff too right?
Yes, if you need encrypted I/O from C.
Donn
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
You cannot bend the split package to your needs?
http://hackage.haskell.org/packages/archive/split/0.2.1.2/doc/html/Data-List-Split.html
Some combination of splitWhen and a pcre-based predicate?
On 24 February 2013 22:44, Simon Marechal si...@banquise.net wrote:
I could not find the
On Fri, Mar 01, 2013 at 08:30:20AM +1300, Alistair Bayley wrote:
You cannot bend the split package to your needs?
http://hackage.haskell.org/packages/archive/split/0.2.1.2/doc/html/Data-List-Split.html
Some combination of splitWhen and a pcre-based predicate?
This won't work; splitWhen
Welcome to issue 260 of the HWN, an issue covering crowd-sourced bits
of information about Haskell from around the web. This issue covers the
week of February 17 to 23, 2013.
Quotes of the Week
* danharaj: zygohistobfuscatory maintainomorphism
* merijn: after a week you can delete 80% of
On Mon, 2013-02-25 at 11:59 -0800, Johan Tibell wrote:
Simon's builder (originally developed in blaze-binary) has been merged
into the bytestring package.
I've been meaning to ask: does this mean that ByteString's concat and
append functions will now be implemented in terms of Builder
On Thu, Feb 28, 2013 at 1:26 PM, Brandon Allbery allber...@gmail.com wrote:
On Wed, Feb 27, 2013 at 8:37 AM, Corentin Dupont corentin.dup...@gmail.com
wrote:
Hi Chris,
Thanks!
That's true for the user number. What should I do? Encrypt it?
It's not that you have a user number, or even that
Hi
Another alternative is this Haskell library: https://github.com/paulcc/xsaiga
This is a combinator library which is suitable for mid-scale NLP work,
so handles left recursion and (high amounts of) ambiguity to produce a
packed result (which can be decoded to a list of results if required).
It
31 matches
Mail list logo