Daniel Fischer's modifications to my original program lead to a 400 %
speed boost !!!
(It now runs in 22 seconds on my machine)
He avoided unecessary calls to 'length', uses Array instead of Map,
refactored 'search' function (details below)
I've put up his version on hpaste :
All went finally fine. wiki is live.
thanks for your help. great example. this helped me progressing my
understanding of happs.
This should conveniently go on the happs tutorial wiki., or at least be
referred to .
(I have seen alex is doing some tutorial on a wiki in the latest head
release,
On Monday 27 August 2007 09:09:17 manu wrote:
Daniel Fischer's modifications to my original program lead to a 400 %
speed boost !!!
(It now runs in 22 seconds on my machine)
He avoided unecessary calls to 'length', uses Array instead of Map,
refactored 'search' function (details below)
I've
Am Montag, 27. August 2007 14:40 schrieb Jon Harrop:
Probably not, but what's wrong with using arrays (here and in general)?
Here I find arrays very natural, after all a grid has a fixed set of
indices. And as they have a much faster lookup than maps (not to mention
lists), what do you
A while ago I confused currying with partial application, which was
pointed out by members of this community, and the wiki pages got adapted
so that newbies like me don't make the same mistake twice ;) That's great.
Anyway, at the risk of making mistakes again, I'm looking for good
In Scheme, on can quote code, so that it becomes data. Microsoft's F#
and C# 3.0 also have something similar that turns code into expression
trees. The latter is used extensively in LINQ which translates plain C#
code into SQL code or any other code at runtime (this idea came from FP
I heared)
For the translation of the above OCaml code, there is not much to do,
in fact it is mostly functional, and so easily translated in Haskell
code, note that I add a code to handle input of the form
4.8.5.3..7..2.6.8.4..1...6.3.7.5..2.1.4..,
to resolve it and
On 8/27/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
In Scheme, on can quote code, so that it becomes data. Microsoft's F#
and C# 3.0 also have something similar that turns code into expression
trees. The latter is used extensively in LINQ which translates plain C#
code into SQL code or any
Look at Template Haskell.
Intuitively Template Haskell provides new language features that
allow us to convert back and forth between concrete syntax, i.e. what
Gee coming from C++ that was the last thing I expected templates to do. It
seems a bit more powerful in Haskell though!
I'll look
Bryan O'Sullivan wrote:
I just posted a library named suffixtree to Hackage.
http://www.serpentine.com/software/suffixtree/
It implements Giegerich and Kurtz's lazy construction algorithm, with a
few tweaks for better performance and resource usage.
API docs:
Peter Verswyvelen [EMAIL PROTECTED] writes:
A while ago I confused currying with partial
application, which was pointed out by members of this
community, and the wiki pages got adapted so that newbies
like me don't make the same mistake twice ;) That's great.
Anyway, at the risk of making
On Mon, 2007-08-27 at 16:29 +0200, Peter Verswyvelen wrote:
A while ago I confused currying with partial application, which was
pointed out by members of this community, and the wiki pages got adapted
so that newbies like me don't make the same mistake twice ;) That's great.
Anyway, at the
On Mon, 2007-08-27 at 17:56 +0200, Peter Verswyvelen wrote:
Look at Template Haskell.
Intuitively Template Haskell provides new language features that
allow us to convert back and forth between concrete syntax, i.e. what
Gee coming from C++ that was the last thing I expected templates to
Steve Schafer wrote:
x = a - sqrt(a^2 - b^2)
I don't know offhand if there's a straightforward way to arrive at this
result without using trigonometry.
Here you go, though with a slightly different result
(same as Joel Koerwer):
a^2=(b^2)/4+(a-x)^2 (Pythagoras)
solving x: --
x(1,2) = a
On 8/27/07, Derek Elkins [EMAIL PROTECTED] wrote:
...Really, it's not all that appropriate a name anyway...
Indeed, Meta Haskell would be better I think.
Bas
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Correction
stefan a b = a - a * sqrt (1 - b*b / a*a)
should be:
stefan a b = a - a * sqrt (1 - b*b / (a*a))
*Main stefan 10 8
4.0
(0.01 secs, 524896 bytes)
Thanks
@@i
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
From: Daniel Fischer
Thought it was something like that.
Must check whether that beats Norvig's constraint propagation.
it does !
on my machine :
Jon Harrop's : 12.5 sec and Norvig's : 15 sec
Manu
___
Haskell-Cafe mailing list
On 8/27/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
Look at Template Haskell.
Gee coming from C++ that was the last thing I expected templates to do. It
seems a bit more powerful in Haskell though!
There's much in common between C++ template metaprogramming and
template Haskell - they
Gleb Alexeyev wrote:
Bryan O'Sullivan wrote:
I just posted a library named suffixtree to Hackage.
http://www.serpentine.com/software/suffixtree/
It implements Giegerich and Kurtz's lazy construction algorithm, with
a few tweaks for better performance and resource usage.
API docs:
On Mon, 27 Aug 2007 19:05:06 +0200, you wrote:
Where do I go wrong (I)?
b is defined to be _half_ of the chord (the semichord, I suppose).
You're assuming it to be the entire chord.
Steve Schafer
Fenestra Technologies Corp.
http://www.fenestra.com/
I've taken over maintenance of the pcap library (an interface to
libpcap, for user-level network packet capture), and released a new version.
Home page: http://www.serpentine.com/software/pcap/
API docs: http://darcs.serpentine.com/pcap/dist/doc/html/pcap/
Download:
ChrisK wrote:
That is almost certainly because the algorithm expects the source string to have
a unique character at its end.
Chris is correct. I'll ensure that the docs make this clear.
b
___
Haskell-Cafe mailing list
2007/8/27, Steve Schafer [EMAIL PROTECTED]:
b is defined to be _half_ of the chord (the semichord, I suppose).
You're assuming it to be the entire chord.
Based on the drawing I thought it was the length of the arc (in blue) ?
--
Jedaï
___
Peter Verswyvelen [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
In Scheme, on can quote code, so that it becomes data. Microsoft's F#
and C# 3.0 also have something similar that turns code into expression
trees. The latter is used extensively in LINQ which translates plain
Am Montag, 27. August 2007 10:09 schrieb manu:
Daniel Fischer's modifications to my original program lead to a 400 %
speed boost !!!
(It now runs in 22 seconds on my machine)
He avoided unecessary calls to 'length', uses Array instead of Map,
refactored 'search' function (details below)
At Mon, 27 Aug 2007 17:04:17 +0200,
Peter Verswyvelen wrote:
In Scheme, on can quote code, so that it becomes data. Microsoft's F#
and C# 3.0 also have something similar that turns code into expression
trees. The latter is used extensively in LINQ which translates plain C#
code into SQL
The author of the question (Tony Morris) actually asked two different
questions, and so people gave two different replies :)
To quote Tony:
"I may have misunderstood his problem (we were drawing in dirt) and actually, it is
the straight line between the two points on the circumference that
I want to make an array using GLUT.Key as an index, but it is not an
instance of Enum nor Ix
Of course, I can make it an instance myself, but I guess it would be
easier to do so in the library?
Cheers,
Peter
___
Haskell-Cafe mailing list
28 matches
Mail list logo