Haskell XML Toolbox 8.0.0
I would like to announce a new version of the Haskell XML Toolbox.
The main change is the separation of the old filter interface
into a separate package hxt-filter.
This makes the API simpler and more readable.
The filter API will not be developed further. But all the
Benjamin L. Russell:
Assuming the square had 100 pixels per side, on the average, approximately
how many random pixels should be plotted in the square before obtaining a
reasonably good estimate of pi?
Nothing to do with Haskell...
What do you mean by reasonable? This Monte-Carlo
Hi all,
just a thought: is it just me, or is Haskell really really really the
coolest general-purpose programming language?
If I had the time, I would love to do a re-implementation of Harpy [1]
using category-extras [2].
Martin
[1]
Hello Martin,
Monday, April 28, 2008, 3:51:11 PM, you wrote:
just a thought: is it just me, or is Haskell really really really the
coolest general-purpose programming language?
the only Haskell drawback is that it forces you to hate all other
programming languages (c) people :)
--
Best
Hi,
I am calling a Haskell function from my C code, wherein I export a
Haskell function xyz that takes as an argument string and returns a
string:
Foreign export ccall xyz::CString - IO CString
xyz = do
-- extract the input string and act on it--
-- at the end I return a string
Hello Verma,
Monday, April 28, 2008, 4:11:51 PM, you wrote:
newCString str
Now once I call this function from C code, I am freeing the allocated
memory using free function. I want to confirm that this is the right
thing to do.
yes, i've traced this function down to mallocArray -
On Sun April 27 2008 2:02:25 pm Don Stewart wrote:
zefria:
In GHC there's a GHC.Unicode library, but for a string such as
*AIOO, a GHC compiled program prints it as a string of unknown
characters, and in the interpreter, the string evaluates to a string of
escape sequences instead of
Antonio Regidor García wrote:
I'm trying to implement an alarm in Haskell and wrote the following code:
http://hpaste.org/7201
But it doesn't work as expected.
Hi,
The getLine function ties up stdin. So the system function isn't
able to proceed until getLine completes, even when it is in
I sent some patches to the maintainer of StorableVector, Spencer Janssen
http://code.haskell.org/~sjanssen/storablevector
but did not get some feedback and the patches are still not applied. Any
idea what might went wrong?
___
Haskell-Cafe mailing
On Mon, Apr 28, 2008 at 09:47:44AM +0200, [EMAIL PROTECTED] wrote:
Benjamin L. Russell:
Assuming the square had 100 pixels per side, on the average, approximately
how many random pixels should be plotted in the square before obtaining a
reasonably good estimate of pi?
Nothing to do
The garbage collector never gets to collect either the action used to populate
the cached value, or the private TMVar used to hold the cached value.
A better type for TIVal is given below. It is a newtype of a TVal. The
contents are either a delayed computation or the previously forced
lemming:
I sent some patches to the maintainer of StorableVector, Spencer Janssen
http://code.haskell.org/~sjanssen/storablevector
but did not get some feedback and the patches are still not applied. Any
idea what might went wrong?
I think its just unmaintained.
-- Don
I want to simulate various process/thread scheduling algorithms for a
small project. I'm trying to compare the performance versus power
consumption of several algorithms. If anyone knows of some Haskell
code along those lines I'd love to hear about it. Thanks in advance!
Justin
p.s. I can find
r.kelsall:
(Extracting these questions from my previous thread for clarity.)
Below is my simplest possible program to solve the Fasta shootout
benchmark.
http://shootout.alioth.debian.org/gp4/benchmark.php?test=fastalang=all
http://haskell.org/haskellwiki/Shootout/Fasta
I can see one
Don Stewart wrote:
r.kelsall:
(Extracting these questions from my previous thread for clarity.)
Below is my simplest possible program to solve the Fasta shootout
benchmark.
http://shootout.alioth.debian.org/gp4/benchmark.php?test=fastalang=all
http://haskell.org/haskellwiki/Shootout/Fasta
I
ccing Haskell Cafe in case anyone else is interested in my answer..
Bryan O'Sullivan wrote:
Adrian Hey wrote:
I don't think anyone is interested in working on this or maintaining
it, so it's probably best not to use it for new stuff.
If nobody has stepped up yet, I'll take it over. It
Hi Chris,
Thanks a bunch for the new angle.
Question comments:
* I like the simplicity of using a single TVar whose state reflects the
not-computed/computed state of the IVal.
* I also like the public interface of taking an STM argument (newTIVal(IO))
over returning a sink
Hello, Haskellers,
I feel like I'm missing something obvious, but here's some example code:
module Instance where
data Value = Value Integer
class ValueClass a where
fromValue :: Value - a
instance ValueClass Bool where
fromValue (Value n) = n /= 0
instance ValueClass String
On Apr 28, 2008, at 16:22 , Fraser Wilson wrote:
instance (Num a) = ValueClass a where
fromValue (Value n) = fromInteger n
What I'm really confused by is the response to instance (Num a) =
ValueClass a -- what I am trying to say is if a is an instance of
Num, then can be an instance
On Mon, Apr 28, 2008 at 10:50 PM, Brandon S. Allbery KF8NH
[EMAIL PROTECTED] wrote:
The format is instance [context =] classname instance.
Your classname is ValueClass.
Your instance is a. a is not of the form (T a1 ... an).
But neither is
instance (Show a) = Show [a] ...
*sound of
Assume a tree is a subtree of the other if all elements of the first
tree is included in the second with the exact structure; all
parent-child relations are preserved with their order.
data
Tree = Empty | Leaf Int | Node (Int,Tree,Tree)
subtree::
Tree - Tree - Bool
How can i start to write this
2008/4/28 Fraser Wilson [EMAIL PROTECTED]:
On Mon, Apr 28, 2008 at 10:50 PM, Brandon S. Allbery KF8NH
[EMAIL PROTECTED] wrote:
The format is instance [context =] classname instance.
Your classname is ValueClass.
Your instance is a. a is not of the form (T a1 ... an).
But neither is
2008/4/28 Fraser Wilson [EMAIL PROTECTED]:
what I am trying to say is if a is an instance of Num, then
can be an instance of ValueClass too, and here's how.
Oh, didn't answer this one. This is almost canned response, questions
like this get asked weekly on this list.
Short answer: you can't.
On Mon, Apr 28, 2008 at 11:33 PM, Luke Palmer [EMAIL PROTECTED] wrote:
To answer your other question, no, there is no list show hack.
Perhaps hack was a strong word. I'm not referring to type synonyms, but to
the fact that Prelude's show class happens to have a special show function
for
On Mon, Apr 28, 2008 at 3:47 PM, Fraser Wilson [EMAIL PROTECTED] wrote:
On Mon, Apr 28, 2008 at 11:33 PM, Luke Palmer [EMAIL PROTECTED] wrote:
To answer your other question, no, there is no list show hack.
Perhaps hack was a strong word. I'm not referring to type synonyms, but to
the fact
2008/4/28 cetin tozkoparan [EMAIL PROTECTED]:
Assume a tree is a subtree of the other if all elements of the first tree
is included in the second with the exact structure; all parent-child
relations are preserved with their order.
data Tree = Empty | Leaf Int | Node (Int,Tree,Tree)
Bit of a
On Mon, Apr 28, 2008 at 11:46 PM, Luke Palmer [EMAIL PROTECTED] wrote:
2008/4/28 Fraser Wilson [EMAIL PROTECTED]:
what I am trying to say is if a is an instance of Num, then
can be an instance of ValueClass too, and here's how.
Oh, didn't answer this one. This is almost canned response,
Hello
Somewhat on the topic of optimistic evaluation, I've just thought of
another way to evaluate thunks.
When the program is about to block on some IO, what if we start a thread
to evaluate (any) unevaluated thunks. We'll have additional system
thread, but the blocked one will not
On Apr 28, 2008, at 5:09 PM, Daniil Elovkov wrote:
Somewhat on the topic of optimistic evaluation, I've just thought of
another way to evaluate thunks.
When the program is about to block on some IO, what if we start a
thread to evaluate (any) unevaluated thunks. We'll have additional
On Apr 28, 2008, at 17:47 , Fraser Wilson wrote:
Perhaps hack was a strong word. I'm not referring to type
synonyms, but to the fact that Prelude's show class happens to have
a special show function for lists, which happens to be handy when
writing an instance for Show Char. I find the
Andrew Coppin wrote:
Well, for example, Haskell doesn't have hetrogenous lists - which
are trivial in any OOP language. That's quite awkward to get around.
Also, both spheres and cylinders have a radius property, but then
you end up with name clashes. Again, a non-issue in OOP languages.
[I
The problem I have with all of these STM-based solutions to this
problem is that they don't actually cache until the action fully
executes successfully.
For example, if you have a :: TIVal a, and f :: a - TIVal b, and you execute
force (a = f)
and the action returned by f executes retry for
Is anyone using HaXml to validate XHTML Strict?
The old 1.13.2 version has some bugs in how it handles attributes that
stop me from using it. It handled the DTD parsing fine.
The most-recent darcs version relies on a newer ByteString than I
have, so it is not easy for me to test it.
A
On 28/04/2008, at 7:23 PM, Bulat Ziganshin wrote:
Hello Verma,
Monday, April 28, 2008, 4:11:51 PM, you wrote:
newCString str
Now once I call this function from C code, I am freeing the allocated
memory using free function. I want to confirm that this is the right
thing to do.
yes,
On Apr 28, 2008, at 10:01 PM, Ryan Ingram wrote:
[...] if you have a :: TIVal a, and f :: a - TIVal b, and you execute
force (a = f)
and the action returned by f executes retry for whatever reason, then
the caching done in a gets undone.
Dangit, you're right. You just rained on the parade!
Thanks, Ryan, for the reminder and explanation of this problem. - Conal
On Mon, Apr 28, 2008 at 8:01 PM, Ryan Ingram [EMAIL PROTECTED] wrote:
The problem I have with all of these STM-based solutions to this
problem is that they don't actually cache until the action fully
executes
Peter,
A naïve question I have now after reading your mail. How do I call
MarshallAlloc.free from my C code because that's where I need to free it?
Anurag
So no, using C's free is not the right thing to do. It will probably
work in the real world, but you should try to use Haskell's free
On Apr 29, 2008, at 1:45 , Verma Anurag-VNF673 wrote:
A naïve question I have now after reading your mail. How do I call
MarshallAlloc.free from my C code because that's where I need to
free it?
Provide a Haskell wrapper function to deallocate / free it, as a
parallel to the function
38 matches
Mail list logo