On Tue, 2007-08-14 at 17:22 +0200, Bas van Dijk wrote:
On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:
I'm looking for cool but mind-bending examples of functional brilliance.
Maybe:
http://www.haskell.org/haskellwiki/Blow_your_mind
On Thu, 2007-08-16 at 12:50 -0700, Kim-Ee Yeoh wrote:
Aaron Denney wrote:
On 2007-08-15, Pekka Karjalainen [EMAIL PROTECTED] wrote:
A little style issue here on the side, if I may. You don't need to use
(++) to join multiline string literals.
text = If you want to have multiline
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote:
I find the feature that the construct let x = f x in expr
assigns fixed point of f to x annoying.
Any alternative? Non-recursive assignments?
f x =
let x = x * scale in
let x = x + transform in
g x
I think it is often it
On Mon, 2007-09-03 at 14:57 +0200, Henning Thielemann wrote:
In the current Haskell Wiki (haskell.org/haskellwiki) I found references
to articles of the old Hawiki (haskell.org/hawiki), like OnceAndOnlyOnce
and SeparationOfConcerns. Are the files still available somewhere?
Ditto for links to
On Sat, 2007-09-01 at 23:53 +0200, Benjamin Franksen wrote:
Sven Panne wrote:
Well, on a normal Linux distro a user should *never* have to call cabal (or
any of its cousins) directly, the distro's package manager should be the
used
instead.
This is very theoretical.
Perfect is
On Wed, 2007-09-05 at 08:19 +0100, Simon Peyton-Jones wrote:
| confusing for new users to have the compiler suggest pointless things
| like declaring an instance of Num String or whatever.
This also gets my vote for the
Error-message-most-likely-to-be-unhelpful-award. IME, this often
arises
On Wed, 2007-09-05 at 13:02 +1000, Donald Bruce Stewart wrote:
The xmonad dev team is pleased to announce the 0.3 release of xmonad.
I just wanted to congratulate the team, and say that xmonad is, along
with darcs, my favorite mainstream Haskell program. I used to spend
days experimenting
WARNING: Learning Haskell is dangerous to your health!
:-) I liked that so much I made a hazard image to go with it.
http://malde.org/~ketil/Hazard_lambda.svg
-k
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Wed, 2007-09-05 at 09:56 +0100, Simon Peyton-Jones wrote:
Is your suggestion specific to String?
No.
then I really might have intended to use Complex as a Num type
IME this is much rarer, and I think if a newbie is told that Complex is
not (but needs to be) and instance of Num, it is
On Wed, 2007-09-05 at 12:06 +0100, Simon Marlow wrote:
Ketil Malde wrote:
WARNING: Learning Haskell is dangerous to your health!
:-) I liked that so much I made a hazard image to go with it.
http://malde.org/~ketil/Hazard_lambda.svg
Cool! Can we have a license to reuse that image
On Wed, 2007-09-05 at 20:37 +0200, Henning Thielemann wrote:
Can someone explain me, why there are arrays with mutable but boxed
elements?
I, on the other hand, have always wondered why the strict arrays are
called unboxed, rather than, well, strict? Strictness seems to be
their observable
On Wed, 2007-09-05 at 09:54 -0700, Simon Michael wrote:
I agree actually. That picture, while very cool, won't help Haskell
marketing one bit. :)
Avoid success at all costs, remember?
Lisp's made with alien technology is much more inviting:
http://www.lisperati.com/logo.html .
True.
On Tue, 2007-09-11 at 09:10 +0200, Sven Panne wrote:
foo :: Binary a = ... - a - ...? This should probably mean foo is
using some portable (de-)serialization, but doesn't care about the
actual representation,
I'm probably missing something, but:
How can the format be portable if the
On Tue, 2007-09-11 at 12:01 +0100, Jules Bean wrote:
How can the format be portable if the representation isn't unambigously
defined? And if it is unabmigously defined, what's wrong with using it
for externally defined data formats?
It's portable because it works on other machines also
On Thu, 2007-09-13 at 09:56 +0100, Jules Bean wrote:
Neil Mitchell wrote:
Hi
Although I appluad the semantics of the safe package, I'm not delighted
with the idea of replacing our concise elegant standard library names
with uglyAndRatherLongCamelCaseNamesThatCouldBePerlOrEvenJava
On Wed, 2007-09-12 at 17:40 -0700, Stefan O'Rear wrote:
On Thu, Sep 13, 2007 at 12:23:33AM +, Aaron Denney wrote:
Unfortunately, at this point it is a well entrenched bug, and changing
the behaviour will undoubtedly break programs.
...
There should be another system for getting the
On Thu, 2007-09-13 at 13:56 +0100, Neil Mitchell wrote:
tail = fromJust . tailMay
The error messages suffer [..]
That's why I supplied tailNote
Still, given tailMay, we have:
tailDef xs = maybe xs id . tailMay
tailNote msg = tailDef (error msg)
tailSafe = tailDef []
tail =
On Sun, 2007-09-16 at 12:13 -0700, David Roundy wrote:
On Sat, Sep 15, 2007 at 08:27:02AM +0100, Adrian Hey wrote:
Perhaps what you really mean is, you long for a Data.Map.Strict that
carries the offically blessed status of being shipped with ghc (reminds
me of someone asking for a ghc
On Mon, 2007-09-17 at 14:37 -0500, John Goerzen wrote:
* It would be really nice if QuickCheck supported I/O and some version
of HUnit's TestLabel to generate hierarchical names when failures
occur.
I've done this for testing IO (reading and writing files):
prop_serialize (E s) =
On Tue, 2007-09-18 at 01:11 +0100, Neil Mitchell wrote:
DBM's can differentiate themselves on external database support,
Surely this is an opportunity to focus development on a single library
with broader support? Currently, we have HSQL and HDBC supplying
incompatible low-level interfaces,
On Tue, 2007-09-18 at 11:14 +0100, Malcolm Wallace wrote:
I would like to see the same separation forming between the ghc compiler
itself (which would minimally include only the small number of libraries
needed to build the compiler), and larger distributions which would be
maintained by
On Sun, 2007-09-23 at 21:17 -0400, David Menendez wrote:
My point was that I'm not aware of any packaging systems that don't
have a global installed/not installed bit for each package, which
isn't suited to handling Haskell libraries.
I don't agree - you are assuming there is a one to one
On Tue, 2007-10-02 at 14:32 -0700, Stefan O'Rear wrote:
UTF-8 supports CJK languages too. The only question is efficiency, and
I believe CJK is still a relatively uncommon case compared to English
and other Latin-alphabet languages. (That said, I live in a country all
of whose dominant
On Tue, 2007-10-02 at 21:45 -0400, Brandon S. Allbery KF8NH wrote:
Due to the additional complexity of handling UTF-8 -- EVEN IF the
actual text processed happens all to be US-ASCII -- will UTF-8
perhaps be less efficient than UTF-16, or only as fast?
UTF8 will be very slightly faster
Claus Reinke [EMAIL PROTECTED] writes:
if this is the official interpretation of cabal package version numbers,
could it please be made explicit in a prominent position in the cabal docs?
Me too. This is not a criticism nor endorsement of any particular
scheme, just a vote in favor of having
Daniel McAllansmith [EMAIL PROTECTED] writes:
I think what you're asking for is more than that: you want us to provide
base-1.0, base-2.0 and base-3.0 at the same time, so that old packages
continue to work without needing to be updated.
Yes.
That is possible, but much more work for the
Claus Reinke [EMAIL PROTECTED] writes:
You need a way to specify foo 1.2 foo 2, which is a
suggestion that was tossed around here recently.
but what does such a version range say? that i haven't tested any
versions outside the range (because they didn't exist when i wrote
my package)?
ChrisK [EMAIL PROTECTED] writes:
Once it is possible to have cabal register the hsFoo-3.0.0 also as hsFoo-2 it
will be easy to upgrade to hsFoo. No old programs will fail to compile.
Who here knows enough about the ghc-pkg database to say how easy or hard this
would be?
Ignoring disk
Daniel McAllansmith [EMAIL PROTECTED] writes:
3. Otherwise, major.minor MUST remain the same (other version components MAY
change).
Is it an option to say SHOULD rather than MUST here? There are
other reasons for a version bump than breaking compatibility.
-k
--
If I haven't seen further,
PR Stanley [EMAIL PROTECTED] writes:
Do you trust mathematical materials on Wikipedia?
Generally, yes. Another site you might want to cross check with is
Wolfram Research's Mathworld:
http://mathworld.wolfram.com/
-k
--
If I haven't seen further, it is by standing in the
Daniel McAllansmith [EMAIL PROTECTED] writes:
There are other reasons for a version bump than breaking compatibility.
Technical reasons?
Well - say I refactor everything, and use algorithms with different
run-time complexities, and possibly introduce different bugs than the
ones the
Claus Reinke [EMAIL PROTECTED] writes:
Incedentally, this reminds me that GHC should have a warning for not
using explicit import lists (perhaps only for external package
imports).
for package-level imports/exports, that sounds useful.
Isn't there a secret key combination in haskell-mode
I've done something similar, I think. Often, I want to output some
kind of progress indicator, just to show that the program is working.
Typically, the program works by lazily evaluating a list (lines from
an input file, say); each element of the list is wrapped with an IO
action that outputs
Hi,
I'm struggling to get my HXT-based parser to parse a largish file
(300MB), even after breaking into reasonably-sized chunks. The
culprit appears to be parsing one element comprising 25K lines of
text, which apparently requires more memory than the 2Gb my computer
is equipped with.
I'm
[EMAIL PROTECTED] writes:
1. Avoid two pass filtering.
2. Avoid unecessary (++), with an accumulator. For example:
Also, I find that
3. Accumulate equal elements, too
pa (y:ys) s e b = case compare x y of ...
to be a good choice. Otherwise, quicksort easily grows towards
quadratic if
Rene de Visser [EMAIL PROTECTED] writes:
If I undertand the coding correctly every tag is stored as a seperate
Haskell string. As each byte of a string under GHC takes 12 bytes this alone
leads to high memory usage.
Not that it detracts from your point, but I guess that is 24 bytes per
Ketil Malde [EMAIL PROTECTED] writes:
HaXml on my list after TagSoup, which I'm about to get to work, I
think (got distracted a bit ATM).
As it is, I managed to parse my document using TagSoup. One major
obstacle was the need to process a sizeable partition of the file.
Using 'partitions
Don Stewart [EMAIL PROTECTED] writes:
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
Presumably it is less common since octal and hexadecimal are more
compact and almost as easy to interpret
Dusan Kolar [EMAIL PROTECTED] writes:
// PLS, no flame
I apologize if my post came across as such, that was certainly not the
intent.
I think the question was [..] whether there's such a literal or not
and whether it is bad idea to have something like 0b10111011.
I agree.
From my point
Some time ago, I posted this code:
countIO :: String - String - Int - [a] - IO [a]
countIO msg post step xs = sequence $ map unsafeInterleaveIO ((blank
outmsg (0::Int) c):cs)
where (c:cs) = ct 0 xs
output = hPutStr stderr
blank= output ('\r':take 70 (repeat '
Jeff Polakow [EMAIL PROTECTED] writes:
Besides anything else, sequence will diverge on an infinite list.
Argh, of course. Thanks!
It is necessary to compute all of the computations in the list before
returning
any of the pure resulting list.
Replacing sequence with sequence', given as:
Don Stewart [EMAIL PROTECTED] writes:
goalieca:
So in a few years time when GHC has matured we can expect performance to
be on par with current Clean? So Clean is a good approximation to peak
performance?
If I remember the numbers, Clean is pretty close to C for most
benchmarks, so
Sebastian Sylvan [EMAIL PROTECTED] writes:
[LOC vs gz as a program complexity metric]
Obviously no simple measure is going to satisfy everyone, but I think the
gzip measure is more even handed across a range of languages.
It probably more closely aproximates the amount of mental effort [..]
Andrew Butterfield [EMAIL PROTECTED] writes:
I'm puzzled - when I run this on GHCi (v6.4, Windows XP) I get the
following outcome^^
The process cannot access the file because it is being used by another
process.
Isnt' this a difference between Windows and
Maurício [EMAIL PROTECTED] writes:
Actually, what I want is to select a region of
text from emacs and get back the result of that
evaluated as haskell code. So, I need something
that is fast to type
M-| xargs ghc -e
almost works - but ghc -e evaluates only a single argument, so you
need
david48 [EMAIL PROTECTED] writes:
Didn't work for me : Installs fine, ghci works fine, but I get linking
problems. ld complains about -lgmp
Did you try installing any of these?
% apt-cache search libgmp
libgmp3-dev - Multiprecision arithmetic library developers tools
libgmp3c2 -
Ryan Bloor [EMAIL PROTECTED] writes:
I am trying to create a function that uses the words function... I am doing
the
same thing to each element in a list so I am using mapping techniques.
And it doesn't work?
--Define the main first function
rStrings2Results :: ([String] - String) -
Neil Mitchell [EMAIL PROTECTED] writes:
I just removed GHC 6.6.1 and installed 6.8.1, and I noticed something
rather unexpected. I recompiled an existing program (with -O2), and
instead of taking 30 seconds to compile, it took roughly 2 seconds.
In previous releases, certain constructs took
Seth Gordon [EMAIL PROTECTED] writes:
Bioinformaticians are among the first to adopt functional
programming languages
From my experience, Bioinformatics use a mixture of langauges - C to
implement various algorithms, a bit of Java for UI-oriented stuff, and
Perl to tie it all together. (You
Peter Verswyvelen [EMAIL PROTECTED] writes:
Most research papers have the same layout: two columns per A4
page. They mostly come as PDF or PS.
I think it is (more and more) common these days for journals to
publish an HTML version on their web site. Otherwise I'd suggest
e-mailing the author
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
Kind of like Google PageRank for libraries.
Yes.
Only up to a point; not all programs written using such libraries are
necessarily going to end up on hackage. (Consider the code written
by the financials folks that have been mentioned here
Thomas Schilling [EMAIL PROTECTED] writes:
I would advocate using a comment system that is similar to the one
at http://djangobook.com/.
I'm pretty sure Brian O'Sullivan has written a Haskell implementation of
this for the Real World Haskell book.
While the technology is there (or will
Gracjan Polak [EMAIL PROTECTED] writes:
let entries = IntMap.fromList (map (\(a,b,c) - (a,c)) (concat p))
Gut reaction: Map is lazy in its values (but probably not the key,
which are checked for order), so you should force the 'c' before
inserting it in the map. (There's probably a strict
Duncan Coutts [EMAIL PROTECTED] writes:
4. Meanwhile, we could get a lot more mileage from de-centralised
approaches. Ideas I saw in this thread that sound attractive to me
are to make Hackage display, for each package:
- date of last update
- download statistics
- some kind of
Gracjan Polak [EMAIL PROTECTED] writes:
The problem is that my prog allocates a lot just to free it immediatelly
after.
But what?
Use +RTS -hd instead, which will tell you the constructor.
I bet you'll find it's (:), and that you are retaining a load of Chars
from your input file, pending
Gracjan Polak [EMAIL PROTECTED] writes:
I tried both Map and IntMap and there was no difference in memory total usage
or
usage pattern. Seems I'm already strict enough.
This only proves Map and IntMap are equally strict, or in other words,
they are both lazy in the elements.
Values are
David Menendez [EMAIL PROTECTED] writes:
Someone in a previous thread made an analogy between GHC and the linux
kernel. I imagine that third-party Haskell distributions, consisting
of GHC/Hugs/whatever and some bundled packages, would meet the desire
for a batteries included Haskell
Duncan Coutts [EMAIL PROTECTED] writes:
I did a quick popularity count by wget'ting the whole thing, and
looking for hrefs under cgi-bin/packages/archive¹.
That's quite fascinating. Thanks. You've convinced me we should add
something like that :-).
Note that that was only a direct count, I
Thomas Schilling [EMAIL PROTECTED] writes:
Haskell is a general-purpose, pure functional programming languages
that puts many interesting results from research into a practical
programming language. It's features include:
* Static typing with type inference: enables writing robust and fast
[EMAIL PROTECTED] writes:
increment b = b + 1
This is also called 'succ' (for successor).
main = dolet b = 0
let c = randomRIO (1,2)
until (c == 1) increment b
return b
ERROR StPetersburg.hs:8 - Type error in application
*** Expression
Ben Franksen [EMAIL PROTECTED] writes:
PS (completely off-topic, sorry): I've been using the collections library
throughout the project I must say it is a lot nicer to work with
I tried to Google for this, and ended up at
http://hackage.haskell.org/trac/ghc/wiki/CollectionClassFramework
Don Stewart [EMAIL PROTECTED] writes:
And it reminds me to release the galois sqlite3 bindings, which do
happily work with 6.8. Surely one of the other 15 haskell db bindings
would also work.
I think this is the problem, not the solution. There is a lot of DB
libraries, just like there are a
Yitzchak Gale [EMAIL PROTECTED] writes:
Guido is clearly not rejecting functional influences
on Python, he is supporting them. But he feels that
these specific instances do not fit in.
I read some of his statements, and find that I disagree vehemently.
But I wonder if partial evaluation is
Claus Reinke [EMAIL PROTECTED] writes:
you might find it easier to use GHCi's :browse command
While ghc -e works, this no longer work within GHCi?
Prelude :b Control.Concurrent.MVar
module 'Control.Concurrent.MVar' is not interpreted
-k
--
If I haven't seen further, it is by standing in
Bryan O'Sullivan [EMAIL PROTECTED] writes:
For higher dimensions, there are enough options in terms of
traversal direction and what exactly e.g. a fold should fold over
(single elements? lower-dimensional slices?) that a sensible API
doesn't exactly leap out.
How about a 'reduce' instead of
Andrew Coppin [EMAIL PROTECTED] writes:
(BTW, what's the difference between unsafePerformIO and unsafeInterleaveIO?)
Prelude :m + System.IO.Unsafe
Prelude System.IO.Unsafe :t unsafePerformIO
unsafePerformIO :: IO a - a
Prelude System.IO.Unsafe :t unsafeInterleaveIO
unsafeInterleaveIO :: IO
Johan Tibell [EMAIL PROTECTED] writes:
It would be great if someone could exemplify these rules of thumb,
e.g. Primitive types such as Int should be strict unless in the three
canonical examples X, Y and Z. My strictness radar is still quite
poor and I feel I can't make informed decisions on
Tim Chevalier [EMAIL PROTECTED] writes:
aka a call graph. This is called control flow analysis and the
classic paper on it is Olin Shivers' dissertation
This is very well-trodden ground, but if you familiarize yourself with
the literature on the subject, then who knows, you may discover
Philip Weaver [EMAIL PROTECTED] writes:
You'll find that the pattern that it's failing to match is:
[('b',[5,4]),('b',[1]),('b',[6])]
You could also use ghc with -Wall, which will tell you exactly which
cases you've omitted.
-k
--
If I haven't seen further, it is by standing in the
Daniel Fischer [EMAIL PROTECTED] writes:
IO is important because you can't write any real program without using
it.
Ouch! I get awfully discouraged when I read statements like this
one.
I think Lennart was referring to that, you HAVE to know a little IO to write
programmes, at least
Dan Piponi [EMAIL PROTECTED] writes:
The question isn't Does Haskell need quickdirty hackers? It's
would we get better software (using your favourite metric) if we put
Haskell into the hands of quick and dirty hackers?. I think the
answer might be yes.
This is an interesting trade-off: if
Vimal [EMAIL PROTECTED] writes:
Vimal wrote:
What is the difference between In-Reply-To and References?
There was a time In-Reply-To was for emails and References was for Usenet.
My friend wrote a parser for Haskell-cafe messages from the mailman
archives as suggested.
One place to look
Simon Marlow [EMAIL PROTECTED] writes:
Concurrency is supported just fine without -threaded. You need
-threaded if you want to:
:
3) write a multithreaded Haskell library or DLL
I thought -threaded (A.K.A. -smp, no?) only affected which runtime was
used, and thus was a linking option. I
Lutz Donnerhacke [EMAIL PROTECTED] writes:
* Peter Padawitz wrote:
I'd like to define several instances of the same type class with the
same type variable instance. Only method instances differ. How can I do
this without writing copies of the type class?
Define the type class in a module
Nicholls, Mark [EMAIL PROTECTED] writes:
After many years of OOP though my brain is wired up to construct software in
that ?pattern??.a problem for me at the moment is I cannot see how to
construct
programs in an OO style in Haskell?.I know this is probably not the way to
approach it?but I
Thomas Davie [EMAIL PROTECTED] writes:
Yes, and you can indeed do a similar thing in Haskell. The natural
thing to do here would be to define a type Shape...
data Shape = Circle Int
| Rectangle Int Int
| Square Int
If however, you *really* want to keep your shapes
Miguel Mitrofanov [EMAIL PROTECTED] writes:
I've noticed it, but there are some problems with this
representation, so I decided not to mention it. It's OK as far as we
don't want functions working on two areas - I don't see, how we can
implement, say, intersect :: Shape - Shape - Bool in this
Cristian Baboi [EMAIL PROTECTED] writes:
Here is some strange example:
module Hugs where
aa::Int
aa=7
Small note, it's common to use spaces around the :: and = I've
never really noticed before.
cc :: (Int-Int) - (Int-Int-Int) - Int - (Int-Int)
cc a op b = \x- case x of { _ | x==aa -
Cristian Baboi [EMAIL PROTECTED] writes:
I mean anything that you can put between { }, and between ;
Okay, there you have it then: the syntax for a block is a {, followed
by elements separated by ;s and terminated by a }.
Perhaps you are really asking about how the layout rule works? (Which
Miguel Mitrofanov [EMAIL PROTECTED] writes:
Well, LISP can [print functions], if I remember it right.
Only in an interpreter, if I remember it right.
I think Emacs used to print #function or something for functions.
It seems to keep around the reresentation now.
Anyway, LISP has a bunch of
Georg Sauthoff [EMAIL PROTECTED] writes:
Well, how do I compile a Haskell program in such a way, that I
get a useful error message from read? I mean, like the
filename/linenumber of the calling expression for starters.
It's dirty, it's mean, but you can use CPP. (On one line, and with
ghc
Don Stewart [EMAIL PROTECTED] writes:
A Wake Up Call for the Logic Programming Community
http://www.cs.kuleuven.ac.be/%7Edtai/projects/ALP//newsletter/dec07/content/Articles/tom/content.html
Interesting read!
Clearly, the logic programming people are vastly more successful at
our
Andrew Coppin [EMAIL PROTECTED] writes:
http://www.cs.kuleuven.ac.be/%7Edtai/projects/ALP//newsletter/dec07/content/Articles/tom/content.html
Haskell is the undisputed flagship of the FP community.
Er... really?
It depends on how you define the FP community, of course. The
author
Albert Y. C. Lai [EMAIL PROTECTED] writes:
B. This mailing list sets the List-Post header:
List-Post: mailto:haskell-cafe@haskell.org
Progressive mail clients honour this, e.g., Evolution. Thus you are
given three buttons:
I'm rather tied to my MUA, and while I'm not complaining (and Gnus
[EMAIL PROTECTED] writes:
I suggest that you read something on 'quantum computing'.
I guess I should disclaim the rest of my post right away: I don't know
much about quantum anything, beyond what I read in the newspapers.
Sorry. But:
Concerning quanta, the simulation of quantum processes on
Peter Verswyvelen [EMAIL PROTECTED] writes:
Well, it's a good habit in Haskell to move the most important parameter to
the end of the argument list. See e.g.
http://www.haskell.org/haskellwiki/Parameter_order.
I must say I like these recommendations. As for the Data.Map examples,
the
Derek Elkins [EMAIL PROTECTED] writes:
I don't understand your point. We know what swimming is: floating and
moving autonomously.
You're the first one I've heard who would use the term 'swimming' for
ships. (And to be pedantic, wouldn't you say that fish swim, except
when they float?)
The
Cristian Baboi [EMAIL PROTECTED] writes:
I think it's a bug.
Here is why:
let f = (\x - x/0) in f 0 == f 0
Referential transparency say that f 0 must equal to f 0, but in this
case it is not. :-)
I think you are wrong. Referential transparency says that you can
replace any occurence of
Yitzchak Gale [EMAIL PROTECTED] writes:
In the semantic domain there is one bottom.
In Haskell there are many expressions that represent bottom.
One cannot test those for equality.
If we are being pedantic, I can define
data Foo = Foo
instance Eq Foo where _ == _ = True
David Roundy [EMAIL PROTECTED] writes:
I just want to point out that unsafePerformIO is at the core of the
(safe) bytestring library. As SPJ et al pointed out, this is crucial
functionality, and is only unsafe if unsafely used.
In Modula-3 modules using hacks must be explicitly marked as
Sebastian Sylvan [EMAIL PROTECTED] writes:
Maybe I'm just lucky, but if we are still talking about the games
industry I don't think this fits my experience of bosses. Games
compete very much on performance, and we basically rewrite almost all
of our code over a few years or so anyway
Another
Achim Schneider [EMAIL PROTECTED] writes:
You need to use the / operator, if you want to do floating-point
division.
Yes, exactly, integers don't have +-0 and +-infinity... only
(obviously) a kind of nan.
No, failure (exception, bottom) is different from NaN, which is just
another value in
Wolfgang Jeltsch [EMAIL PROTECTED] writes:
However, the fact that (0 / 0) == (0 / 0) yields False is quite shocking. It
doesn’t adhere to any meaningful axiom set for Eq.
Tough luck, but that's how floating point works, and what the
numericalists know, and possibly even love (although I have
Ketil Malde [EMAIL PROTECTED] writes:
The bombing of NaN *might* be a profound compilation option, but for
people who really do numerical work, this is a blessing NOT to have
it.
I'll expand a bit of this, after I've checked with Wikipedia. Please
correct me (and it) if I'm wrong, but:
1
[EMAIL PROTECTED] writes:
The difference between you (and/or Wolfgang J.) and myself is that I enjoy
more my freedom, even if I have to pay with a little more work. You want
to enforce rigid reactions of the system. You should be free to do it on
*your* machine, not on mine.
You are putting
[EMAIL PROTECTED] writes:
People, you are monsters.
Well, bring on the torches and the pitchforks (although the image in
my mind is more like a mob carrying lenses and bananas).
no, some users are victims of its success as a formal language, not
just as a coding tool
I think Haskell's
S. Doaitse Swierstra doai...@cs.uu.nl writes:
then (s1 ++ s2 ++ s3 ++ s4) where
s1 = Golds
s2 = show (gold s g)
s3 = , Silvers
s4 = show (silver s g)
If you want to keep the definitions local to the expression you should write
Miguel Mitrofanov miguelim...@yandex.ru writes:
Maybe it's just me, but I think composition chain is MUCH easier to read.
I definitely agree.
[Cited from Learn You a Haskell for Great Good]
oddSquareSum :: Integer
oddSquareSum = sum . takeWhile (1) . filter odd . map (^2) $
Colin Adams colinpaulad...@googlemail.com writes:
Named values are just like comments, which IMO also should be kept to a
bare minimum. A bit tongue in cheek: If you need a name to understand
what a function does, or a comment to understand how it does it, then
your code is too complicated.
Sebastian Fischer s...@informatik.uni-kiel.de writes:
I do not agree that introducing names locally for compositions is
*always* a bad idea, even if used only once.
Well, of course I do that all the time too. :-)
(Choosing names that are misleading or flat out wrong is of course
always a
1 - 100 of 923 matches
Mail list logo