Fragmenting Hackage is bad. But on the other hand I don't see why I
should stick with the inconvenient mtl. Open source software is all
about choice, and as long as the mtl fails to provide the same
flexibility and convenience, I won't use it. Combined with the fact
that fixing it would
That's indeed an advice I've read [1].
But wouldn't it damage the performances, since code will have to go through
an extra layer?
[1] http://blog.ezyang.com/2010/06/principles-of-ffi-api-design
2010/7/7 Chris Eidhof ch...@eidhof.nl
On 5 jul 2010, at 23:48, Yves Parès wrote:
Hello,
I
2010/7/7 Liam O'Connor lia...@cse.unsw.edu.au
Making an immutable API from a mutable one generally damages performance
(on von neumann architectures) somewhat, the goal is to minimize that
impact.
In fact, I would like to determine if an EFFICIENT way to make images and
such immutable exists,
texture handling.
2010/7/7 Sebastian Sylvan sebastian.syl...@gmail.com
On Wed, Jul 7, 2010 at 2:24 PM, Yves Parès limestr...@gmail.com wrote:
2010/7/7 Liam O'Connor lia...@cse.unsw.edu.au
Making an immutable API from a mutable one generally damages performance
(on von neumann architectures
monadLib looks nice, indeed, but the major problem with using it resides in
the fact that most of the libraries on hackage use MTL.
Must be tedious to have to use two monad libraries at the same time...
2010/7/6 Ertugrul Soeylemez e...@ertes.de
Gregory Crosswhite gcr...@phys.washington.edu
/7/6 Ertugrul Soeylemez e...@ertes.de
Yves Parès limestr...@gmail.com wrote:
monadLib looks nice, indeed, but the major problem with using it
resides in the fact that most of the libraries on hackage use MTL.
Must be tedious to have to use two monad libraries at the same time...
In general
I was wondering : wouldn't it be possible that things like BaseM be
implemented on top of MTL?
Couldn't just one develop a package, say mtl-missing, that would contain the
functionnalities of monadLib, but compatible with MTL?
___
Haskell-Cafe mailing
I must have the same impediment. We should start a support group, that, or
give in and write a compiler. To add insult to injury,
I think it should be called Turbo Haskell.
That's true... I never noticed, because in French the two words get
pronounced very differently.
While we're on the
About monad transformers, I don't really like to use them because they
can get hairy in some cases, and because they have poor performance in
other cases.
Then what is your alternative? How do you replace monad transformers?
___
Haskell-Cafe
data A_GADT where A_GADT :: A t = t - A_GADT
By the way, is there an extension that enables A_GADT to be automatically
declared as an instance of class A?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello,
I don't know if some of you are familiar with the SFML library (stands for
Simple and Fast Multimedia Library) -- http://sfml-dev.org
As SDL, SFML is a 2D graphics library, but conversely to SDL it provides a
hardware-accelerated drawing, through OpenGL.
Well, I'm currently writing its
Okay, I understand better, now.
But I could never have guessed it just from the GHC error message.
Another question on the same code:
import Control.Monad.Identity
newtype SomeMonad s a = SomeMonad { unSome :: Identity a }
deriving (Monad)
newtype SomeType s = SomeType Int
runSomeMonad ::
That's it !
Indeed, you do not create a STRef yourself using a STRef data constructor,
you use the function:
newSTRef :: a - GHC.ST.ST s (STRef s a)
Thanks.
2010/7/4 Dan Doel dan.d...@gmail.com
On Sunday 04 July 2010 5:41:07 am Yves Parès wrote:
Okay, I understand better, now.
But I could
And conversely, someone who have made a C-to-Haskell binding may not be a
Haskell guru.
What about Arrows: do you think one should master them so that he could be
regarded as experienced?
It's kind of hard to put a border between casual Haskell and skilled
Haskell, since it's a very wide language
Back to initial topic, I have a sudden fear: do you have to master Template
Haskell so as to be regarded as a guru :-{ ?
Let it be no, please, let it be no...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello everybody,
I'm trying to implement the type protection used by ST to prevent a monad
from returning a certain type.
There's my code:
import Control.Monad.Identity
newtype SomeMonad s a = SomeMonad { unSome :: Identity a }
deriving (Monad)
newtype SomeType s = SomeType Int
runSomeMonad
Hello,
I saw on the haskell wikibook that coroutines could be implemented by using
continuations :
http://en.wikibooks.org/wiki/Haskell/Continuation_passing_style#Example:_coroutines(unhappily,
the section is empty)
Since I'm actually learning the wonders of continuations, I just wonder :
how ?
It helps me understand better, but would you have some simple code that
would do that ?
2010/6/19 Paul Johnson p...@cogito.org.uk
On 19/06/10 10:36, Yves Parčs wrote:
Hello,
I saw on the haskell wikibook that coroutines could be implemented by
using continuations :
operational?
Heinrich Apfelmus wrote:
Gwern Branwen wrote:
Yves Parès limestr...@gmail.com wrote:
[...]
But when running the game, the program cannot switch from a player's
monad
to another.
Do you have any suggestion?
Your desires remind me of the MonadPrompt package
http
of such games using operational?
Heinrich Apfelmus wrote:
Gwern Branwen wrote:
Yves Parès limestr...@gmail.com wrote:
[...]
But when running the game, the program cannot switch from a player's
monad
to another.
Do you have any suggestion?
Your desires remind me of the MonadPrompt package
by the
real player through the network.
Then, if I want to have a human an a network player playing sequentially,
how can I do this without stacking each player's monad? (See my first mail)
Philippa Cowderoy wrote:
On 10/04/2010 13:57, Yves Parès wrote:
I answered my own question by reading
schrieb Yves Parès:
Yes, from what I read, I assumed it had this behavior.
But, then, I don't see why the server holds...
I've posted a mail on Haskell-Cafe called Network: buffering
troubles, in which I put a smaller example which reproduces this
problem.
I know :)
I have now tested
Problem tracked!
It comes from the last version of bytestring package.
I tried with bytestring-0.9.1.5, and it works perfectly.
Do you know where I should submit this bug?
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Simple-binary-protocol
Parès wrote:
Problem tracked!
It comes from the last version of bytestring package.
I tried with bytestring-0.9.1.5, and it works perfectly.
Do you know where I should submit this bug?
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com
such a thing.
What I try to avoid is having every player running in IO monad.
Do you have any suggestion?
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Simple-game%3A-a-monad-for-each-player-tp28183930p28183930.html
Sent from the Haskell - Haskell
/binary-protocol and push me your proposed
changes.
Cheers,
Greg
On Apr 8, 2010, at 9:12 AM, Yves Parès wrote:
By the way, Gregory, concerning the package binary-protocol, I was
wondering
if it was possible to turn the BinaryProtocol monad from
type BinaryProtocol = StateT (Handle
the client closes the connection, even if I flush the
handle on the client side after writing or even if I turn off buffering on
both sides.
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Network%3A-buffering-troubles-tp28162932p28162932.html
Sent
no problem with GHC 6.10.
I think that network+binary is quite a common combination in Haskell, so is
there anyone here who also uses GHC 6.12 and has this problem?
Yves Parès wrote:
Hello,
I have isolated a problem when using (lazy) ByteStrings through the
network (GHC 6.12.1, Ubuntu 9.10
Strings, it doesn't hold:
import Network
import System.IO
main = do
(hdl,_,_) - listenOn (PortNumber ) = accept
hSetBuffering hdl NoBuffering
inp - hGetContents hdl
putStrLn . show $ take 8 inp
I think this behavior is normal for strict ByteStrings, but not for lazy
ones...
-
Yves
I'm wondering, would it be a problem of chunk size when using L.hGetContents?
Since the data to read is shorter than the default chunk size (32k), would
it cause problems?
Yves Parès wrote:
Okay, so I turned off every buffering using hSetBuffering hdl NoBuffering
on both Client and Server
. When less than the default chunk size is
available, it makes a chunk of what it got and tries to get more later
(unless it found EOF, then it closes the handle).
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Simple-binary-protocol-through
/file/p28157883/Server.hs Server.hs
http://old.nabble.com/file/p28157883/SharedData.hs SharedData.hs
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Simple-binary-protocol-through-network-test-tp28157883p28157883.html
Sent from the Haskell - Haskell
OSX and (Gentoo) Linux, with
GHC 10.4. What platform/GHC version are you running it on?
Cheers,
Greg
On Apr 6, 2010, at 2:38 PM, Yves Parès wrote:
Hello,
I'm trying to use the packages Network and Control.Monad.BinaryProtocol
together, with a very simple program in which a client
6, 2010, at 3:44 PM, Yves Parès wrote:
Weird...
I use GHC 6.12.1, and I run Ubuntu 9.10 (32bits version).
Would have I miss something? Like a flush or a close? Logically, I don't
see
where I would...
Gregory Crosswhite-2 wrote:
Yay, I'm glad to see someone else using my package
Hello,
Is there a way to perform some kind of remote method invocation in haskell?
(Or, remote object, but I prefer not to use this term, as there are no
objects strictly speaking in Haskell)
I would like to use a higher level API than sockets for network programing.
-
Yves Parès
Live long
: simple_client: user error (Error calling examples.add: connect: does
not exist (Connection refused))
I know I have to adapt the url the client tries to connect at (in the
sample, http://localhost/~bjorn/cgi-bin/simple_server;), but I don't know
how.
Roman Cheplyaka-2 wrote:
* Yves Parès limestr
Okay, well, apparently I have to rely on an external HTTP server. This is not
very simple, is there another more suitable way to get RPC working in
haskell?
Yves Parès wrote:
Okay, I tried to make the sample here:
http://www.haskell.org/haskellwiki/HaXR
But I can't get it working
every drawable in a DrawableObj:
drawMany window [DrawableObj image, DrawableObj text, DrawableObj
otherImage]
Is there another more suitable way to handle a list of drawables?
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Lists-of-Existential-DT
a) = a], which obligates you to
declare an extra datatype...
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Lists-of-Existential-DT-tp27735354p27737144.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com
have to launch it in a bound thread -- and however it went right...
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Threading-and-FFI-tp27611528p27665592.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com
or is it no that easy to foresee the behaviour of my program?
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Threading-and-FFI-tp27611528p27647126.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com
I've also discovered something interesting: when I link with the 'threaded'
runtime, but let the program use only one core (with '+RTS -N1'), the
problem disappears. How comes?
The whole thing remains a mystery, because I think what I'm trying to do is
quite common...
Yves Parès wrote
Okay! So under UNIX, haskell threaded runtime uses pthreads, if I well
understood.
To sum up, in order to achieve what I want, I have no other choice than
compiling with '-threading' and importing as 'safe' the functions which can
make a 'sleep'.
Thanks!
Ben Franksen wrote:
Yves Parès
!
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Threading-and-FFI-tp27611528p27635260.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
___
Haskell-Cafe mailing list
Haskell
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Undecidable-instances-with-functional-dependencies-tp27555079p27605436.html
Sent from the Haskell - Haskell-Cafe mailing
a thread
which calls inside its loop to a C function which makes a little sleep.
BTW, what is the portable way to sleep a thread in Haskell ?
Control.Concurrent.threadDelay is GHC only.
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/Threading-and-FFI
they're
displayed).
Felipe Lessa wrote:
On Tue, Feb 16, 2010 at 09:00:08AM -0800, Yves Parès wrote:
I was wondering: is the Haskell default runtime (that which uses only one
processor) scheduler able to interrupt a thread which is currently
calling
to a C function in order to enable another
There is a minimal code which produces this issue:
http://old.nabble.com/file/p27613138/func.c func.c
http://old.nabble.com/file/p27613138/main.hs main.hs
Yves Parès wrote:
Well I tried both 'unsafe' and 'safe', and actually I saw no difference...
Even with 'safe', I see a huge
Thanks!
Looks a bit complex to me at the moment, but I'll probably have a look at it
when I have the time.
Tom Hawkins-2 wrote:
On Sun, Feb 14, 2010 at 1:30 AM, Yves Parès limestr...@gmail.com wrote:
I've been interested in using Atom since I saw this:
http://blog.sw17ch.com/wordpress/?p
@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-
Yves Parès
Live long and prosper
--
View this message in context:
http://old.nabble.com/ANN%3A-atom-1.0.0-tp27574165p27579930.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com
301 - 350 of 350 matches
Mail list logo