On Fri, 1 Dec 2006, Huazhi (Hank) Gong wrote:
myrand :: Int
myrand = randomRIO(1::Int, 100)
concerning random and IO:
http://haskell.org/haskellwiki/Things_to_avoid#Separate_IO_and_data_processing
___
Haskell-Cafe mailing list
Hello Henning,
Sunday, December 3, 2006, 1:37:08 PM, you wrote:
Who rides so late through the bits and the bytes?
It's Haskell with his child Hank;
He has the boy type safe in his arm,
He holds him pure, he holds him warm.
I vote for an art/lyrics section on HaskellWiki.
humor section
I am programming an application with a lot of interactivity. When using
x-getChar the character corresponding to the pushed key is assigned to
x immediately. Launching the module through runghc works properly.
However, the compiled module through ghc requires to push return after
the character key
Taral wrote:
On 12/1/06, Brian Hulley [EMAIL PROTECTED] wrote:
This problem is so general (ie converting a cyclic graph into an
expression tree such that each node appears no more than once) that
I'm sure someone somewhere must already have determined whether or
not there can be a solution,
Paul Hudak wrote:
Brian Hulley wrote:
Anyway to get to my point, though all this sounds great, I'm
wondering how to construct an arbitrary graph of Fudgets just from a
fixed set of combinators, such that each Fudget (node in the graph)
is only mentioned once in the expression. To simplify the
[EMAIL PROTECTED] wrote:
I am programming an application with a lot of interactivity. When using
x-getChar the character corresponding to the pushed key is assigned to
x immediately. Launching the module through runghc works properly.
However, the compiled module through ghc requires to push
I've got what's probably a beginner's question, but I'm out of ideas
for solving it. It looks like it tripped me up in Write Yourself a
Scheme... too, since the code there seems like it's arranged so I
never ran into it...
I've got a couple functions:
binop :: (AmbrosiaData - AmbrosiaData -
On Sun, Dec 03, 2006 at 12:26:30PM -0500, Jonathan Tang wrote:
I've got what's probably a beginner's question, but I'm out of ideas
for solving it. It looks like it tripped me up in Write Yourself a
Scheme... too, since the code there seems like it's arranged so I
never ran into it...
I've
Hi,
After a partial rewrite of my webserver, it is suffering from locked files:
/path/to/file: openBinaryFile: resource busy (file is locked)
The file in question really shouldn't be locked:
- Only my server knows of the file's existence.
- Only one thread accesses the file.
- The
Are you using hGetContents? If you are, take a closer look at the
documentation. The function creates a lazy stream and until you finish
reading from it the file will be in the semi-closed state (which
means it will be locked).
On 12/3/06, Arie Peterson [EMAIL PROTECTED] wrote:
Hi,
After a
Vyacheslav Akhmechet [EMAIL PROTECTED] wrote:
Are you using hGetContents? If you are, take a closer look at the
documentation. The function creates a lazy stream and until you finish
reading from it the file will be in the semi-closed state (which
means it will be locked).
No. I read/write
I wish to pass a 2 dimensional array to use in a back-tracking
algorithm. Since I will be doing lots of inserts, a Data.Array is
unsuitable. It seems that a Map Int (Map Int a) is the most suitable
structure, but this seems cumbersome.
Is there anything more appropriate?
--
Tony Morris
At 12:25 PM +1000 12/4/06, Tony Morris wrote:
I wish to pass a 2 dimensional array to use in a back-tracking
algorithm. Since I will be doing lots of inserts, a Data.Array is
unsuitable. It seems that a Map Int (Map Int a) is the most suitable
structure, but this seems cumbersome.
Is there
Hi
unsuitable. It seems that a Map Int (Map Int a) is the most suitable
structure, but this seems cumbersome.
You might want to use IntMap, which is a version of Map specialised to
Int's, with better time bounds.
Thanks
Neil
___
Haskell-Cafe
I'm working on some code where I have some complex state. This is the
first time I've dealt with anything like this in haskell. If anyone would
review my code and let me know if there are ways I could do this better,
cleaner, in a more idiomatic way, etc, I would greatly appreciate it.
You might want to consider using a DiffArray, though if the
backtracking is of just the wrong sort, you might get worse
performance than you want. Updates are O(length xs) where xs is the
list of updates to be performed (so O(1) in the singleton case), but
lookups into older versions of the array
16 matches
Mail list logo