On 8/11/07, Neil Bartlett [EMAIL PROTECTED] wrote:
You're absolutely right that a dynamic/adaptive approach is the only
one that will work when the tasks are of unknown size. Whether this
approach is as easy as you think is open for you to prove. I look
forward to testing your VM
On 8/21/07, Tim Chevalier [EMAIL PROTECTED] wrote:
I don't think you have to worry too much about the political
obstacles. People want automatic multithreading, and in a year or two
we'll all have multicore boxen. In any case, if you don't solve the
technical problems, the political ones will
Exactly. For this to work there needs to be the constraint that there's a
one-to-one mapping in each direction. The Bimap should have the uniqueness
promise that Set (k, v) gives. Yet you should be able to search on either
tuple value.
Or... have the possibility of returning a list of values.
On 8/21/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
Currently, it's never worse. GHC's backend is about as good as GCC;
most of the optimiations it doesn't do are not possible for GCC because
of various lack-of-information problems (the stack pointer never aliases
the heap pointer, stuff like
On 8/21/07, Andrew Coppin [EMAIL PROTECTED] wrote:
I highly doubt that automatic threading will happen any time this decade
- but I just learned something worth while from reading this email. ;-)
That's an interesting observation. I cant say I dont believe it, but
I'm interested to know why
Thank-you for the information. It was very useful. Couple of reactions FWIW:
On 8/21/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
Sooo if I was feeling evil, could I take this c-code and pipe it
into something that turns it into C#???
Yes. You could do the same with the original
On 8/22/07, Twan van Laarhoven [EMAIL PROTECTED] wrote:
But Double is already quite badly behaved:
let x = 1e20
Prelude 1 + (x - x)
1.0
Prelude (1 + x) - x
0.0
E. Whilst that's understandable and unavoidable, that kindof
rings alarm bells for folds of Doubles in an automatic
On 8/22/07, Brandon Michael Moore [EMAIL PROTECTED] wrote:
Automatic threading is inherently limited by data dependencies.
You can't run a function that branches on an argument in parallel
with the computation producing that argument. Even with arbitrarily
many processors and no communication
On 8/30/07, Derek Elkins [EMAIL PROTECTED] wrote:
Either the language of the graphics card is Turing complete and the
answer is yes or the language isn't and the answer is no.
Well, a quick google for are graphics cards turing complete?
suggests that some nVidia cards are Turing complete, but I
On 8/30/07, Miguel [EMAIL PROTECTED] wrote:
What about running Haskell on a PostScript printer? PostScript IS
Turing-complete.
Yes, because postscript printers are famous for being really fast ;-)
___
Haskell-Cafe mailing list
Dan Piponi [EMAIL PROTECTED] wrote:
http://developer.nvidia.com/object/cuda.html
It's a C compiler with multiprocessor streaming extensions that
targets nvidia cards.
Whoa :-O Cool :-)
But it's not that simple...
Few things are ;-) Whats the catch? Can we use a graphics-card as an
n-core
So, according to the blurb, and since this is product-specific, I dont
know if this is allowed on the newsgroup?, but it does seem to be a
fairly unique product? :
- this technology works on GeGForce 8800 cards or better
- there's a dedicated processing unit available called the Tesla,
which is
On 8/30/07, Bulat Ziganshin [EMAIL PROTECTED] wrote:
it's the same as 8800GTX. please read CUDA manual first. these 128
threads are not independent, each 8 or 16 threads execute the same
code
H, yes you are right. The GPU contains 8 multiprocessors, where
each multiprocessor contains
On 8/31/07, Dan Piponi [EMAIL PROTECTED] wrote:
Right. But the functions and data that we are trying to map and fold
could be anything, so we are required to have the full functionality
of Haskell running on the GPU - unless the compiler can smartly figure
out what should run on the GPU and
Cool I had prolog for my Spectrum, many years ago (83?), but I
stopped using it when I realized it didnt have any input/output
capabilities beyond print, and no way to escape from the prolog
bubble, eg FFI (not sure what FFI stands for, but I think it is a
way for Haskell to escape into other
A really simple way to track the quality of a package is to display
the number of downloads.
A posteriorae, this works great in other download sites.
We can easily hypothesize about why a download count gives a decent
indication of some measure of quality:
- more people downloading it means more
On 9/2/07, Sven Panne [EMAIL PROTECTED] wrote:
High-qualitiy standard libraries which are packaged with GHC/Hugs/... will
probably almost never be downloaded separately.
Good point. Note however that if someone is hunting for a library,
it's generally because it's not already bundled with
On 9/2/07, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
in the early 90s
I think I found the flaw in your argument ;-)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Sooo.. what is the modern equivalent of Prolog?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Off-topic, so stop reading now if you want ;-) , but reminds me of my
experience using Python and C++. Python and C++ are both great
languages, with their own strengths, and one might think that
combining thing gets the best of both.
However, using Swig etc to join Python to C++ takes a
On 9/3/07, Adrian Hey [EMAIL PROTECTED] wrote:
The popularity of MS
Winders or Office Suite are the obvious examples. We all know why these
are used on 95% or whatever of the worlds PCs, and it has nothing
whatever to do with quality.
Oh come on. You've been reading waaayyy too much
On 9/3/07, Derek Elkins [EMAIL PROTECTED] wrote:
Because no one has said it quite this way:
The modern equivalent of Prolog is Prolog.
Ok, thanks. Just wanted to check that.
(btw, just thought, when I was talking about FFI, probably meant
Forth, not Prolog. FFI for Prolog probably isnt that
(BTW I thought the FFI for Forth was the Forth assembler; have things
changed since FIG/F83?)
I didnt have a real PC, just a ZX Spectrum. It wasnt real Forth, just
Spectrum Forth. It was kindof fun, but a little disappointing not to
be able to do anything useful with it. Well, I wanted to
Just noticed, erlang has the second kind of bimap (a bijection?)
built into each process:
From http://www.erlang.org/doc/reference_manual/processes.html :
10.9 Process Dictionary
Each process has its own process dictionary, accessed by calling the
following BIFs:
put(Key, Value)
get(Key)
get()
On 9/3/07, Adrian Hey [EMAIL PROTECTED] wrote:
FYI, I am old enough to actually remember life before MS and I can
also remember what's happened to the industry at large and to various
the organisations I've worked in and had dealings with over the last
25 years or so.
Fair enough.
On 9/3/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
Well, then you should take a look at Boo... http://boo.codehaus.org
Yes, I've looked at Boo a little. It looks cool. It made me think
that a lot of language wars boils down not just to the syntactic sugar
that hits one in the face at the
Couple of thoughts/observations:
- Erlang has a vm, so that would avoid building a vm.
On the downside, erlang is not pure: the message-passing and the io:
commands imply the possibility of side-effects.
Still, it could be good enough for a proof-of-concept?
- implementation as a library
Just out of curiosity, how could one do something like a factory, so
that by default a library uses, say, Data.Map, but by making a simple
assignment we can switch the library to use a different
implementation?
(This is alluded to above, but not explicitly stated. I guess it's
too easy, but
On 9/18/07, Hugh Perkins [EMAIL PROTECTED] wrote:
Just out of curiosity, how could one do something like a factory, so
that by default a library uses, say, Data.Map, but by making a simple
assignment we can switch the library to use a different
implementation?
(And of course, the 10 million
Gotta love lazy infinite loops :-D
Sounds like something out of a Douglas Adams novel.
Ok, this post is totally off-topic...
On 9/22/07, Pasqualino 'Titto' Assini [EMAIL PROTECTED] wrote:
The funny thing is that, while it is stuck in an infinite loop, GHCi
doesn't seem to use any CPU time
On 10/3/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
I needed to type at least 3 times the amount of code, much
of which was boilerplate code, and the code is not elegant.
Reflection is your friend here.
Example. Code before reflection:
MyConfig
{
// some properties here
public
Have you tried F#? I mean, I havent ;-) but maybe it's an interesting
half-way house? Presumably you can use all the standard .Net
libraries (maybe good enough for getting asp.net working etc?), and
you can still use FP constructs?
I understand F# is not pure (I think?), and doesnt have monads,
On 10/14/07, Vimal [EMAIL PROTECTED] wrote:
Dear Haskellers,
I have been trying my best to read about Haskell from the various
tutorials available on the internet and blogs. I havent been following
YAHT properly, so its always been learning from 'bits and pieces'
scattered around.
You might
You're picking on Andrew Coppin? That's insane. He's got a sense of
humour, and he's a lay (non-phd) person.
Honestly, in one thread you've got Haskell is misunderstood! Its the
greatest language in the world! Why does no-one use it and in
another you're insulting one of the few non-phds
Correction, I'm also very interested in Haskell, and I even don't have a
bachelor degree :-) I'm a completely self-educated kind-a-guy...
That's true, and actually you and Andrew are two of the people whose
opinions I respect the most. Well, I'll add SPJ to that list I guess.
Anyway, IMHO
On 10/31/07, Paulo J. Matos [EMAIL PROTECTED] wrote:
Hello all,
I, along with some friends, have been looking to Haskell lately. I'm
very happy with Haskell as a language, however, a friend sent me the
link:
http://shootout.alioth.debian.org/gp4/
Careful: it's worse than you think. Many
On 10/26/07, John Meacham [EMAIL PROTECTED] wrote:
Heh, the plethora of pdf papers on Haskell is part of what originally
brought me to respect it. Something about that metafont painted cmr
just makes me giddy as a grad student. A beautifully rendered type
inference table is a masterful work of
On Nov 3, 2007 5:00 AM, Ryan Dickie [EMAIL PROTECTED] wrote:
Lossless File compression, AKA entropy coding, attempts to maximize the
amount of information per bit (or byte) to be as close to the entropy as
possible. Basically, gzip is measuring (approximating) the amount of
information
On Jan 9, 2008 5:43 PM, Derek Elkins [EMAIL PROTECTED] wrote:
A shorter and lighter and and also interesting and entertaining read is:
http://research.microsoft.com/~simonpj/Papers/haskell-retrospective/index.htm
While the reason Haskell was pure was to support laziness, at this point
though
Linq went live in C# in November, as part of .Net 3.5.
It adds lots of FP-things to C#.
It's really fun to be able to use Haskell-ish things in C#.
Manipulating lists and collections just got *much* easier.
Things it does:
- map, fold, filter are all there (they're called select, agregate,
On Jan 12, 2008 10:19 PM, Rafael Almeida [EMAIL PROTECTED] wrote:
After some profiling I found out that about 94% of the execution time is
spent in the ``isPerfectSquare'' function.
I guess that Haskell's referential transparence means the answers to
the isPerfectSquare will be cached, ie
On Jan 12, 2008 10:54 PM, Henning Thielemann
[EMAIL PROTECTED] wrote:
On Sat, 12 Jan 2008, Hugh Perkins wrote:
I guess that Haskell's referential transparence means the answers to
the isPerfectSquare will be cached, ie automatically memoized? (not
sure if is correct term?)
http
What are the possibilities for website construction using Haskell?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Jan 13, 2008 8:13 PM, Derek Elkins [EMAIL PROTECTED] wrote:
http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programming
Good link. Lots of options apparently :-)
I'm sure you can figure it out from here, or at least come back with a
more specific question.
Which ones
I seem to remember a thread about this a while back actually, but...
Any chance of adding the number of downloads to the hackageDB page?
For those packages that are included in ghc, hugs etc, perhaps add a
green tick with included in ghc, included in hugs, etc?
That way it should be relatively
Hi,
Trying to write a function to deserialize a haskell type from xml.
Ideally this wont need a third DTD file, ie it will work something like
XmlSerializer.Deserialize from C#:
deserializeXml :: Data(a) = String - a
serializeXml :: Data(a) = a - String
Writing serializeXml is pretty easy:
Trying to create a datatype/constructor given just its constructor as a
string, something like:
mkConstr :: String - Constr
parseData :: (Data a) = String - a
***without knowing in advance anything about the datatype apart from the
string contents***
So, not something like:
parseData Just 3
Just noticed that all my responses have been going only to Neil, not to the
group.
Anyway, the jist of our conversation was that it's not possible to create
arbitrary datatypes/constructors from strings in Haskell. Can anyone
deny/confirm?
___
Yes, or better:
gshow' :: Data a = a - String
gshow' t = fromMaybe (showConstr(toConstr t)) (cast t)
(which gets rid of the parentheses around numbers).
Still doesnt get a deserialize though ;-)
On 6/24/07, Andrea Vezzosi [EMAIL PROTECTED] wrote:
As a side note i'd like to point out that
On 6/25/07, Udo Stenzel [EMAIL PROTECTED] wrote:
That type signature describes a function that can deliver *anything*
(that is in class Data), whatever you ask from it.
Yes, that is the goal :-)
If you do that, you wind up dragging in all the
machinery of Data.Generic
Is reflection
Still struggling with this. If anyone has any constructive ideas?
I guess it's not really easy otherwise someone would have come up with a
solution by now ;-)
The issue is the line in makeConstrM'' where we're trying to read (Data a =
a) from (String). read doesnt work, because read needs a
Just an outsider's reaction, and for all I know unsafeRead is actually safe,
but if the point of using Haskell (and I'm still trying to discover what
that is ;-) ) is either to be able to rigorously mathematically prove that
your program will work perfectly (target usage 1), or to carry out
On 6/26/07, Udo Stenzel [EMAIL PROTECTED] wrote:
That's another way of saying that the truly powerful features are
missing from C#...
Hi Udo,
Genuine question: please could you tell me what are the truly powerful
features of Haskell?
My own personal interest comes from a presentation by
Big Chris wrote:
http://www.cs.nott.ac.uk/~gmh/bib.html#monparsing
Hey, just to say, the first few pages of this explain monads really well.
Good reference :-)
It's the first introduction to monads I've seen that describes monads
directly, without using analogies, and manages to be both
Ok good info :-)
btw, are you read Hoar's book Communicating Sequential Processes? i
think that his model is very FPish and reading his book should allow
to switch your look at concurrency in right direction
No, I'll check it out.
On 7/1/07, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello
Well, figured out a solution to parsing xml. It's not really pretty, but it
works.
Basically we just convert the incoming xml into a gread compatible format
then use gread :-D
If someone has a more elegant solution, please let me know.
module ParseXml
where
import IO
import Char
import
Clll :-) Thanks for the link.
Er are you the Philip Armstrong I was at college with
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
lol small world :-)
On 7/2/07, Philip Armstrong [EMAIL PROTECTED] wrote:
On Mon, Jul 02, 2007 at 12:23:36AM +0200, Hugh Perkins wrote:
Clll :-) Thanks for the link.
Er are you the Philip Armstrong I was at college with
Shhh. Don't tell everyone or they'll all want one
In imperative languages we can do this type of thing:
SystemLogging.LogInfo(About to do something...);
DoSomething();
SystemLogging.LogInfo(Did Something);
SystemLogging.LogInfo(x is + x );
How can we do something similar in Haskell?
___
Haskell-Cafe
This sounds something like using a continuation function.
In imperative languages, we might have something like:
class MyDisplayForm
{
void ButtonGo_Press()
{
Processor.Go( new CallbackDelegate( this.SetStatus ) );
}
public void SetStatus( string message )
{
StatusLbl.Text
Graham Hutton has some great tutorials on parsing. Check out the Are
parsers monodic? thread (not exact name) for a good reference.
There's also a good tutorial at http://www.cs.nott.ac.uk/~gmh/book.html In
Section Slides, click on 8 Functional parsers, but you may just want to
start from 1.
On 7/3/07, Neil Mitchell [EMAIL PROTECTED] wrote:
See trace: http://www.haskell.org/hoogle/?q=trace
I'll check that out. Thanks.
Maybe, with System.IO,
Fine in main :-) Less good in a 100,000 line application.
___
Haskell-Cafe mailing list
:
On 7/2/07, Hugh Perkins [EMAIL PROTECTED] wrote:
Anyway, so the question is: how do we write callback functions in
FP/Haskell? Can someone provide a simple, but functional example?
What makes a callback different from any other kind of function? In
Haskell, as in other functional programming
Ok, I'll play with that.
On 7/3/07, Jules Bean [EMAIL PROTECTED] wrote:
Hugh Perkins wrote:
In imperative languages we can do this type of thing:
SystemLogging.LogInfo(About to do something...);
DoSomething();
SystemLogging.LogInfo(Did Something);
SystemLogging.LogInfo(x is + x
Can you just write:
data ListGT map k a
= Empt
| BraF ![k] a !(map (ListGT map k a))
| BraE ![k] !(map (ListGT map k a))
deriving( Typeable )
?
On 7/7/07, Adrian Hey [EMAIL PROTECTED] wrote:
Hello,
I'm trying to make the type (ListGT map k a) an instance of Typeable,
where map is
This is a compact solution, but it produces multiple permutations of the
same solution, which increases runtime. I let it run for 10 seconds, then
ctrl-c'd.
Here's a solution that produces all 2 (or three, if you include Barbecue
Sandwich) solutions instantly:
Output:
=
*Xkcd287 go
Menu 1
On 7/8/07, Andrew Coppin [EMAIL PROTECTED] wrote:
I was wittering on about stream fusion and how great it is, and I got a
message from Mr C++.
(Mr C++ develops commercial games, and is obsessed with performance. For
him, the only way to achieve the best performance is to have total
control
By the way, if you enjoy these problems, there are tons of these at
topcoder.com I cant help thinking it'd be neat to have topcoder-like
competitions for Haskell, either by pursuading topcoder to integrate support
for Haskell, or hosting our own.
___
You're talking to someone who spent his teenage years doing assembler
because that's what l33t games developers did, and I wanted to be like
them. Sure, you can still find assembler around the place, but even l33t
games developers dont use it any more.
On 7/10/07, Alex Queiroz [EMAIL PROTECTED]
On 7/10/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
While I personally think that the productivity argument should be
enough to make the switch, the killer-app (the app that will kill C,
that is :-)) is concurrency. C is just not a tractable tool to program
highly concurrent programs, unless
We can consider three families of character sets:
- ASCII: 127 characters, some of which are escape codes like bell etc
- regional encodings: china uses GB2312, Europe uses ISO-8859-1, America
uses ... something
- unicode: UTF-8, UTF-16
The regional encodings are optimized for their region, and
rpc layer, like .Net Remoting or ICE (but preferably without needing
configuration/interface files)
Course, if you know what you're doing, that's more like 1 week than one
year, but you could do that and then see where it takes you.
If you want something really challenging, rewrite OSMP (
Simple answer: you always have to have the single element first, then the
list bit second. It's just the way it is. You can learn why later on ;-)
On 7/11/07, Alexteslin [EMAIL PROTECTED] wrote:
Oh, I am lost now - for now anyway.
I am attempting to do next exercise in the book to define
Ok so I played with the tweaked problem (Unix 'uniq'), and getting it to be
lazy. This seems to work:
testunique :: Eq a = [a] - [a]
testunique list = testunique' list []
where testunique' :: Eq a = [a] - [a] - [a]
testunique' [] elementssofar = []
testunique' (x:xs)
Oh, lol because I'm stupid and put the arguments the wrong way around in the
first recursive call to testunique' ;-)
On 7/11/07, Hugh Perkins [EMAIL PROTECTED] wrote:
Ok so I played with the tweaked problem (Unix 'uniq'), and getting it to
be lazy. This seems to work:
testunique :: Eq
) of the
second argument.
It's pretty hard not to put the right arguments in the right order.
Not so in Haskell where I spend insane amounts of time trying to remember
what argument is what in a function I wrote 30 seconds ago.
On 7/11/07, Hugh Perkins [EMAIL PROTECTED] wrote:
Oh, lol because I'm stupid
So no, using the form of my argument, it is NOT possible to prove
anything about Haskell -vs- C. It is ONLY possible to make claims
about Haskell *libraries* -vs- C *libraries*.
You can claim anything you like, but if you want people to believe it you'd
be best providing the code used so that
Hi Claus,
Well, I read the website and it stated that it doesnt support alpha blending
yet. Thats a pretty basic operation, so I assumed no-one is using hopengl
for anything more than a few triangles. I'll check the docs you've linked
to.
On 7/13/07, Claus Reinke [EMAIL PROTECTED] wrote:
Wow, ok, this does look amazingly comprehensive, cool :-) Might want to
update the blurb on the website a little ;-)
On 7/13/07, Claus Reinke [EMAIL PROTECTED] wrote:
just be sure to ignore http://www.haskell.org/HOpenGL/ , which should
be moved to the wiki or to /dev/null. instead, look at
On 7/13/07, Philippa Cowderoy [EMAIL PROTECTED] wrote:
This is a cultural thing, and assuming that it's a lack of sophistication
on our part is a bad idea - on the contrary, some of the better reasons to
avoid a web-based board are entirely about enabling sophistication.
There's a very simple
Can someone post either a simple Hopengl example or a link to one please?
(Something that displays a triangle or two, preferably rotatign slowly,
ideally rotating when you move the mouse).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 7/14/07, Andrew Coppin andrewcoppin wrote:
That is my recollection also. (Don't ask me *which* monads, mind you...)
In the case in point, the law breakage never the less matches
intuition; personally, I ignore the monad laws on the basis that if
you're doing something sane, the laws will
Hi,
Pretty dumb question I know, but..how to I display fractions of a second
from a datediff?
ie:
main = do starttime - gettime
-- do something here that takes a few seconds
endtime - gettime
let timediff = diffClockTimes endtime starttime
let timediffstring
Well, can you provide an example of an implementation of bind that satisfies
an intuitive definition of bind but does not satisfy the monad laws?
On 7/14/07, Derek Elkins [EMAIL PROTECTED] wrote:
-Documentation- damn well better have the monad laws. Something is not
a monad if it does not
Ok, so for anyone who cares, the answer is, the negative picoseconds should
be added to the seconds to get the final answer:
let secondsfloat = realToFrac( tdSec timediff ) +
realToFrac(tdPicosec timediff) / 1
___
Haskell-Cafe
On 7/14/07, Henk-Jan van Tuyl [EMAIL PROTECTED] wrote:
There was some discussion about prime number generators earlier this year:
http://www.haskell.org/pipermail/haskell-cafe/2007-February/022347.html
http://www.haskell.org/pipermail/haskell-cafe/2007-February/022699.html
Ok, so using
As I say, I'm not a Haskell expert, so feel free to provide a better
implementation.
On 7/15/07, Chaddaï Fouché [EMAIL PROTECTED] wrote:
... Did you really read the Haskell code ?
You're comparing two completely unrelated algorithms, talk about a
fair comparison !
There's really a tendency in this newsgroup to point people to huge
documents, when a small copy and paste would make the answer so much more
accessible ;-)
Anyway... so reading through the paper, it looks like its using a priority
queue? Which basically is changing the algorithm somewhat
Chaddai,
Unfortunately, your program doesnt work ;-)
The function needs to take a parameter, which is the upper limit on our
sieve, and return a single value, which is the number of primes in that
interval. Complex requirements I know ;-)
___
On 7/15/07, Derek Elkins [EMAIL PROTECTED] wrote:
Read http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf
Ok, so switched to using the Data.Map version from this paper, which looks
like a lazy, but real, version of the sieve of Arostothenes.
This does run quite a lot faster, so we're going
(Random observation: Hmmm, strange, in the Data.Map version of primes above,
we are missing 5 primes?)
Hi Chaddai,
Your algorithm does work significantly better than the others I've posted
here :-)
So much so, that we're going for a grid of 1000 to get the timings in an
easy-to-measure
Sebastian,
Why would I write a slow, complicated algorithm in C#?
I'm not making these comparisons for some academic paper, I'm trying to get
a feel for how the languages run in practice.
And really in practice, I'm never going to write a prime algorithm using
merge and so on, I'd just use the
Hey, guys, I just realized this test is not really fair!
I've been using the Microsoft .Net compiler ,which is a proprietary
closed-source compiler.
To be fair to Haskell, we should probably compare it to other open source
products, such as g++ and mono?
Here are the timings ;-)
Haskell
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
[me thinks he doth protest too much] ;-)
The rules of the competition are quite fair: both sides make an optimal
algorithm using their preferred language. It's ok to hardcode the first 3
or 4 primes if you must, hardcoding the entire
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote:
[snip] unsafeWrite[snip]
[snip]unsafeRead[snip]
Hi Donald, the idea is to use this for operational code, so avoiding unsafe
operations is preferable ;-) You'll note that the C# version is not using
unsafe operations, although to be
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote:
What C# version are you using, by the way? (So I can check if it does
any tricks).
- csc is in the Microsoft.Net Framework 2.0 runtime, which you can download
from microsoft.com (free download).
- gmcs/mono are from Mono 1.2.2.1 ,
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
unsafe' here just means direct array indexing. Same as the other
languages. Haskell's 'unsafe' is a little more paranoid that other
languages.
Yes, I was kindof hoping it was something like that. Cool :-)
Since the goal is to flip
On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote:
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
unsafe' here just means direct array indexing. Same as the other
languages. Haskell's 'unsafe' is a little more paranoid that other
languages.
Yes, I was kindof hoping
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
Well, *I* didn't say it but yes. Unsafe disables bounds checking
(which in this case is safe). I think you can just stick an unsafe{}
in the C# version to disable them.
Oh well that's not good. Yes, you can use unsafe in C# too, but you
Hey, I just realized I can shave off another 30% in C# ;-)
So now the timings become:
Safe Haskell
=
J:\dev\haskellghc -O2 -o primechaddai.exe PrimeChaddai.hs
J:\dev\haskellprimechaddai
number of primes: 664579
Elapsed time: 26.234
Unsafe Haskell
===
J:\dev\haskellghc
1 - 100 of 167 matches
Mail list logo