>> what's the canonical way of declaring a top-level array
Did you try State/StateT monads?
10 марта 2012 г. 5:05 пользователь John Meacham написал:
> On Fri, Mar 9, 2012 at 5:49 PM, Clark Gaebel
> wrote:
> > What's the advantage of using D.A.Storable over D.Vector? And yes,
> > good call with
Excellent. registering killThread works great. Hopefully the library will be
fixed correctly.
Thanks a lot for your help,
Grant
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
As it seems from code runTCPServer registers socket close
and TCPClient runs it in bracket so all open resources should be
closed. It my last try I add
_ <- register $ killThread tId
after forking serverSrc $$ clientSink, to kill outter thread explicilty
otherwise it closes thread with error.
I've tried running the code with runTCPServer first but I get
"recv: invalid argument (Bad file descriptor)" on ubuntu (virtualbox)
and when running on windows
I get "Network.Socket.ByteString.recv: failed (Unknown error)".
Also, it seems odd that when I run this code https://gist.github.com/
On 12-03-09 07:36 PM, Paolo Capriotti wrote:
I'm pleased to announce the release of version 0.0.1 of pipes-core, a
library for efficient, safe and compositional IO, similar in scope to
iteratees and conduits.
I like your design, it seems to strike a good balance between
elegance and practi
On Fri, Mar 9, 2012 at 5:49 PM, Clark Gaebel
wrote:
> What's the advantage of using D.A.Storable over D.Vector? And yes,
> good call with creating an array of HSDouble directly. I didn't think
> of that!
Oh, looks like D.Vector has an unsafeFromForeignPtr too, I didn't see
that. so D.Vector shou
What's the advantage of using D.A.Storable over D.Vector? And yes,
good call with creating an array of HSDouble directly. I didn't think
of that!
On Fri, Mar 9, 2012 at 8:25 PM, John Meacham wrote:
> On Fri, Mar 9, 2012 at 12:48 PM, Clark Gaebel
> wrote:
>> static const double globalArray[] = {
On Fri, Mar 9, 2012 at 12:48 PM, Clark Gaebel
wrote:
> static const double globalArray[] = { huge list of doubles };
> double* getGlobalArray() { return globalArray; }
> int getGlobalArraySize() { return
> sizeof(globalArray)/sizeof(globalArray[0]); }
>
> And importing it in haskell witht h
I'm pleased to announce the release of version 0.0.1 of pipes-core, a
library for efficient, safe and compositional IO, similar in scope to
iteratees and conduits.
http://hackage.haskell.org/package/pipes-core
This is a reimplementation of the original 'Pipe' concept by Gabriel
Gonzales. The pack
Could template-Haskell be used somehow?
- Lyndon Maydwell
On Mar 10, 2012 4:50 AM, "Clark Gaebel" wrote:
> In Haskell, what's the canonical way of declaring a top-level array
> (Data.Vector of a huge list of doubles, in my case)? Performance is
> key in my case.
>
> The straightforward way would
In Haskell, what's the canonical way of declaring a top-level array
(Data.Vector of a huge list of doubles, in my case)? Performance is
key in my case.
The straightforward way would just be something like:
globalArray :: V.Vector Double
globalArray = V.fromList [ huge list of doubles ]
{-# NOINLI
For first error it seems best way will be patching conduit-network as it
done it warp [1]. I don't know how to deal with second error.
[1]
http://hackage.haskell.org/packages/archive/warp/1.1.0.1/doc/html/src/Network-Wai-Handler-Warp.html#runSettings
--
Alexander V Vershilov
Fri, Mar 09, 201
When I run the code you suggested on windows I get the following error:
getAddrInfo: does not exist (error 10093)
which probably refers to http://trac.haskell.org/network/ticket/32
After adding withSocketsDo I get a little further, but get the following error
after sending data through the pro
Hello.
I'm not expert but first you should not use Network sockets, because everything
is included into Data.Conduit.Network, just use high level API.
Second, you should use not server inside client but client inside server:
so you can make such a code [1]:
{-# OPTIONS -Wall #-}
import Data.Con
I am pleased to announce the release of version 0.5 of diagrams [1], a
full-featured framework and embedded domain-specific language for
declarative drawing. Check out the gallery [2] for examples of what it
can do!
[1] http://projects.haskell.org/diagrams
[2] http://projects.haskell.org/diagrams/
I am trying to get a proxy working using the network-conduit package on windows.
So I send a request to port 5002 and that gets forwarded to another port 5000
where I have a simple echo server running.
I made a stab at it, but get intermittent send errors after the first connection
Here is the c
I've uploaded a new version to hackage incorporating suggestions from
Joachim Breitner, Michael Snoyman and (offlist) Matthias Fischmann.
The package now supplies (<>), a generic function for string concatenation.
(Under ghc >= 7.4 this is a re-export from Data.Monoid to avoid name
clashes.)
Sö
On Fri, Mar 9, 2012 at 4:36 PM, Sönke Hahn wrote:
> Michael Snoyman wrote:
>> I'm the author of convertible-text, and I consider it deprecated (it's
>> marked as such in the synopsis).
>>
>> As far as string-conversions, I'm a little concerned that it's using
>> decodeUtf8, which can throw excepti
Michael Snoyman wrote:
> I'm the author of convertible-text, and I consider it deprecated (it's
> marked as such in the synopsis).
>
> As far as string-conversions, I'm a little concerned that it's using
> decodeUtf8, which can throw exceptions from pure code for invalid UTF8
> sequences. I would
Hi Joachim!
Joachim Breitner wrote:
> you could elaborate the documenatation “Assumes UTF-8” – I guess this
> only applies to the two ByteString variants, as String and Text _should_
> contain unicode codepoints and no encoding. Not that someone tries to
> use a String where each Char corresponds
Jerzy Karczmarczuk wrote:
Well...
Personally I hate thinking about bottom as "value". I don't do this. I
NEVER teach that. And, I am a "lazy guy", almost all my Haskell programs
are strongly based on laziness.
I'll tell you what I teach, and you might throw some tomatoes...
"The fundamental thin
Jerzy Karczmarczuk writes:
> and the source of it power" - if I might cite you - is that we don't see
> the difference between an object and the process which creates it.
Interestingly, according to Wikipedia's article on "type system":
A type system associates a type with each computed value
Hi,
Am Freitag, den 09.03.2012, 13:44 +0200 schrieb Michael Snoyman:
> On Fri, Mar 9, 2012 at 1:40 PM, Joachim Breitner
> wrote:
> >
> > I was about to suggest to merge this into the convertible package (to
> > fight package proliferation), but found that it seems it is already
> > there:
> > htt
Hi,
Am Freitag, den 09.03.2012, 13:44 +0200 schrieb Michael Snoyman:
> On Fri, Mar 9, 2012 at 1:40 PM, Joachim Breitner
> wrote:
> >
> > I was about to suggest to merge this into the convertible package (to
> > fight package proliferation), but found that it seems it is already
> > there:
> > htt
On Fri, Mar 9, 2012 at 1:40 PM, Joachim Breitner
wrote:
> Hi Sönke,
>
> Am Freitag, den 09.03.2012, 11:17 +0100 schrieb Sönke Hahn:
>> Any comments welcome.
>
> you could elaborate the documenatation “Assumes UTF-8” – I guess this
> only applies to the two ByteString variants, as String and Text _
Hi Sönke,
Am Freitag, den 09.03.2012, 11:17 +0100 schrieb Sönke Hahn:
> Any comments welcome.
you could elaborate the documenatation “Assumes UTF-8” – I guess this
only applies to the two ByteString variants, as String and Text _should_
contain unicode codepoints and no encoding. Not that someone
John Meacham :
> The fact that bottom is a value in Haskell is the fundamental thing that
> differentiates Haskell from other languages and the source of its power. The
> fact that f _|_ /= _|_ potentially _is_ what it means to be a lazy language.
> Not treating
> _|_ as a value would be a huge di
Hi all!
string-conversions is a very simple package to facilitate dealing with
different string types. It provides a simple type class that allows you to
convert between values of different string types. It also provides type
synonyms for these string types.
Supported types are:
- String
- St
28 matches
Mail list logo