Haskell doesn't provide such a value, but you could easily compute it
from from the values given in the RealFloat class. It tells you the
base, number of digits in mantissa, etc.
As for using such an eps in a convergence test I'd be very careful.
How do you know that your iteration doesn'
I don't think GHC is to blame in this case. If you follow all the
API (ABI) guidelines for building XLLs things work fine.
But there's a lot of things to get right.
-- Lennart
On Sep 25, 2006, at 05:16 , Simon Peyton-Jones wrote:
Andreas, Nikunj, and others
I don't have any experie
Or even shorter:
subst e l = concatMap $ \x->if x==e then l else [x]
I kinda like the list comprehension version too
subst e l1 l2 = [ r | x <- l2, r <- if x==e then l1 else [x] ]
On Sep 18, 2006, at 10:54 , Jón Fairbairn wrote:
Andrea Rossato <[EMAIL PROTECTED]> writes:
On Mon, Sep 18, 2
collecting!)
-- Lennart
On Sep 15, 2006, at 07:59 , Lennart Augustsson wrote:
No, I wasn't suggesting that evaluate can tell the difference, just
that you can add dubious "functions".
You can evaluate with eager evaluation and some kind of threads
+fair scheduler. Both pH an
I agree, the function can be tricky to use. But that's not our
problem, we are only to implement it. :)
On Sep 15, 2006, at 05:28 , Brian Brunswick wrote:
On 15/09/06, Lennart Augustsson <[EMAIL PROTECTED]> wrote: On
Sep 14, 2006, at 03:05 , Rohan Drape wrote:
>>>
not sure pH ever got the fair scheduler.)
-- Lennart
On Sep 15, 2006, at 05:00 , [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
No, you were right the first time. :) The denotational semantics
is the
important one. Haskell can be executed by other means than graph
reduction. (T
It's hard to tell what the best representation is if you don't know
what the operations that you are going to perform are. If all you
are going to do is I/O of bitstrings, then [Bool] could be great. If
you need to do bitwise boolean ops then Integer is a wise choice.
-- Lennart
On Sep 14, 2006, at 16:20 , [EMAIL PROTECTED] wrote:
Michael Shulman wrote:
On 9/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
So `seq` forces its first argument. When we define
f x = x `seq` (Return x)
we thereby get
f _|_== _|_
f [] == Return []
f (x:xs) == Return (x:x
On Sep 14, 2006, at 03:05 , Rohan Drape wrote:
splitStreams [(3,x),(1,y),(3,z),(2,w)]
[(3,[x,z]),(1,[y]),(2,[w])]
[snip]
Furthermore it should work on infinite lists. It can't eat the whole
list before producing any output.
This doesn't seem to make sense? Only at the end of the list can
The sum function really only needs the argument list to be a monoid.
And the same is true for the product function, but with 1 and * as
the monoid operators. Sum and product are really the same function. :)
I don't think Haskell really has the mechanisms for setting up an
algebraic class hi
To make it referentially transparent you might want to consider
adding 'por', parallel or, instead. It's like (||), but symmetric in
its treatment of bottom.
-- Lennart
On Sep 10, 2006, at 00:21 , Ashley Yakeley wrote:
Is it possible to write nondet?
nondet :: a -> a -> a
no
Brian,
Are you really sure Haskell compilers do that optimization?
I would regard a compiler that does optimizations that are justified
by laws that the compiler cannot check as broken.
-- Lennart
On Sep 7, 2006, at 08:50 , Brian Hulley wrote:
Deokhwan Kim wrote:
What is the pract
What about negative numbers?
Also, don't use (ord c - ord '0'), it doesn't work with Unicode digits.
That's why there is a digitToInt function.
-- Lennart
On Sep 7, 2006, at 02:12 , Bulat Ziganshin wrote:
readI = foldl f 0
where f m c | isDigit c = fromIntegral (ord c - ord '0') +
Furthermore, doing that optimization (common subexpression
elimination) can lead to space leaks. So you should not count on the
compiler doing it. Besides, I often find it more readable and less
error prone to name a common subexpression; only one place to change
when you need to change t
r real use.
-- Lennart
On Sep 6, 2006, at 08:13 , Tamas K Papp wrote:
On Wed, Sep 06, 2006 at 06:33:32AM -0400, Lennart Augustsson wrote:
I've also used Visual Studio, and I wouldn't mind having something
like that for Haskell. But I have to agree with Jon, I think the
best wa
I've also used Visual Studio, and I wouldn't mind having something
like that for Haskell. But I have to agree with Jon, I think the
best way of debugging is to understand your code. I think people who
come from imperative programming come with a mind set that you
understand your code by s
The x+1 looks suspicious.
On Sep 4, 2006, at 23:03 , John Goerzen wrote:
I have the below program, and I'm trying to run it on an input of
about
90MB. It eats RAM like crazy, and I can't figure out why.
I do know that the problem is not my custwords function (as you can
see,
I replaced th
I'd like to see a mix of the two systems. Top level quantifiers
should be optional; they often don't improve readability.
-- Lennart
On Sep 4, 2006, at 04:21 , Janis Voigtlaender wrote:
[EMAIL PROTECTED] wrote:
G'day all.
Quoting Donald Bruce Stewart <[EMAIL PROTECTED]>:
Get some
from ma.
Is that sufficiently close to what you mean or do I still not
understand what
you're trying to convey?
Cheers,
Daniel
On Sep 3, 2006, at 12:32 , Daniel Fischer wrote:
Am Sonntag, 3. September 2006 15:39 schrieb Lennart Augustsson:
Well, bind is extracting an 'a'. I c
where there is an 'a' lurking,
or f could not be called.
Perhaps you don't want to call that "extraction", and that's fine by
me. :)
-- Lennart
On Sep 3, 2006, at 12:32 , Daniel Fischer wrote:
Am Sonntag, 3. September 2006 15:39 schrieb Lennart Aug
Well, bind is extracting an 'a'. I clearly see a '\ a -> ...'; it
getting an 'a' so it can give that to g. Granted, the extraction is
very convoluted, but it's there.
-- Lennart
On Sep 2, 2006, at 19:44 , Udo Stenzel wrote:
Benjamin Franksen wrote:
Sure. Your definition of bind
An easy way to solve this is to ask lambdabot. Log on to the Haskell
IRC channel:
lennart: @pl \ f l -> l ++ map f l
lambdabot: ap (++) . map
Notice how it's much shorter than the Hughes' solution. :)
-- Lennart
On Sep 1, 2006, at 13:11 , John Hughes wrote:
From: Julien Oster <[EM
General Haskell constructs map really poorly to FPGAs.
You could define a subset that maps nicely, though. But as far as I
know noone has made such a compiler. It's a rather big undertaking.
You could look at Cryptol and Bluespec, they are languages with
similarities to Haskell better suit
I like sigfpe's introduction to monads:
http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-
and.html
-- Lennart
On Aug 26, 2006, at 14:04 , Andrea Rossato wrote:
Il Fri, Aug 25, 2006 at 01:13:58PM -0400, Cale Gibbard ebbe a
scrivere:
Hey cool, a new monad tutorial!
equal ( _ : _ : _) = error "Bad operands to equal"
equal_ = error "Not enough operands on stack"
-- Lennart
On Aug 21, 2006, at 04:42 , Gene A wrote:
Lennart and all,
On 8/19/06, Lennart Augustsson <[EMAIL PROTECTED]> wrote:
There are much be
ation and some other things that are more
tedious to write as primatives in other languages.. The only other
language that was as easy to get to this stage with was scheme.
Sorry for the ramble,
gene
On 8/19/06, Lennart Augustsson <[EMAIL PROTECTED]> wrote:
On Aug 19, 2006, at 05:14
On Aug 19, 2006, at 05:14 , Henk-Jan van Tuyl wrote:
[...]
*Iteration> fromtoby 12 42 3 (flip (**) 0.33)
fromtoby 12 42 3 (**0.33)
And why approximate so much?
fromtoby 12 42 3 (** (1/3))
___
Haskell-Cafe mailing list
Haskell-
On Aug 17, 2006, at 17:11 , Brian Hulley wrote:
On Thursday, August 17, 2006 7:54 PM, Brian Smith wrote:
I want to have conditionals limited in their placement
to make things easier for refactoring tools. But, I
don't have any ideas about how to deal with
conditional exports without allowing
Even though I'm largely responsible for making CPP available in a
Haskell compiler I think it's an abomination. It should be avoided.
If we standardize it, people will use it even more. I think we
should discourage it instead, then looking at exactly what it's used
for and supplying sane ve
There are two places where confusion could arise if you didn't have
the case distinction in Haskell: pattern matching (does a name refer
to a constructor or not) and type expressions (is it a type variable
or not).
In Haskell the distinction is made by case, but this is far from the
only
On Jul 17, 2006, at 10:04 , Bulat Ziganshin wrote:
#!/usr/bin/env runhaskell
instead of
#!/usr/bin/runhaskell
at the start of Setup.hs file. Is that really better?
Yes, much better. I think it's crazy to have runhaskell installed
in /usr/bin. It should be somewhere in your path, but n
Sounds like cartesian product to me.
So you could try
combinations [] = [[]]
combinations (xs:xss) = liftM2 (:) xs (combinations xss)
-- Lennart
[EMAIL PROTECTED] wrote:
Hi,
I need a functions which takes as argument a list of lists like this one:
[[1,2],[3],[4]]
and gives me a list
Adrian Hey wrote:
I've written about 5 lines of USB devices drivers for *BSD (in C).
They work from the bare metal and up. They contain no global
mutable state (except for variables that define debugging levels,
because you need to access these from the in-kernel debugger).
Yes, I was awar
Not to fuel the flame war, I will limit myself to two comments.
Adrian Hey wrote:
Or put another way, would it be possible to implement the socket
API, exactly as it currently is, entirely in Haskell, starting with
nothing but hardware? I don't believe it is possible, but perhaps
somebody can sh
Adrian Hey wrote:
.
I was going to respond, but Cale very eloquently said most
of what I was thinking.
Let me just add one thing. Sometimes you hear the argument
"I need a global IORef here because it's to track the use of my
single screen" (or keyboard, or elevator, or some some
other gizm
Robert Dockins wrote:
Ahhh... the singleton pattern. There is a debate among OO theorists
about whether the singleton pattern is actually a good idea. I tend to
side with those who say that it is Just Wrong. The reality is that
"singletons" are only unique within some scope (OS process, VM
Brian Hulley wrote:
Greg Buchholz wrote:
Hmm. It must be a little more complicated than that, right? Since
after all you can print out *some* functions. That's what section 5
of _Fun with Phantom Types_ is about. Here's a slightly different
example, using the AbsNum module from...
http:
Neil Mitchell wrote:
Hi,
First, its useful to define referential transparency.
In Haskell, if you have a definition
f = not
Then this means that anywhere you see f, you can replace it with not.
For example
"f True" and "not True" are the same, this is referentially transparent.
Now lets def
You can't give unRs a type.
What I usually do in this situation is to make the Rs type
a Resource too.
instance Resource Rs where
resourceName(Rs a) = resourceName a
resourceAdvance (Rs a) = Rs (resourceAdvance a)
resourceStarved (Rs a) = resourceStarved a
resour
Shannon -jj Behrens wrote:
lexString ('*':cs) = (classifyString "*", cs)
lexString (c:cs) = (classifyString [c], cs)
The first line isn't needed, it does the same as the second line.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.h
David F.Place wrote:
partList :: Ord k => [([k],v)]->[k]->[(k,[([k],v)])]
partList pairs alphabet = reverse . fst $ foldl' f ([],pairs) alphabet
where f (result,pairs) l = (result',rest)
where (part,rest) = span ((==l) . head . fst) pairs
result' = if null part
Well, if you are relying on exact results from floating point
arithmetic you're in trouble no matter what you do.
I would just ignore the slight error and when finally printing
the results do some rounding. Trying to fudge things is just
going to bite you somewhere else.
(BTW, I much prefer the
But speaking of HaXml bugs, I'm pretty sure HaXml doesn't handle
% correctly. It seem to treat % specially everywhere, but I think
it is only special inside DTDs. I have many XML files produced by
other tools that the HaXml parser fails to process because of this.
-- Lennart
Malcolm Wa
Neil Mitchell wrote:
In what way is the document() function not pure?
See [http://www.w3schools.com/xsl/func_document.asp]. In particular
their example:
i.e. this function needs to load the file celsius.xml. Note that
instead of celsius.xml there could be an arbitrary complex expression
here
Bulat Ziganshin wrote:
Hello Wolfgang,
Saturday, February 11, 2006, 3:17:12 PM, you wrote:
each and every monadic operation is a function!
WJ> What do you mean with "monadic operatation"? (>>=), (>>) and return are, of
WJ> course, functions but an I/O action like getChar is *not* a functio
John Hughes wrote:
What, no list comprehensions??
No. I think the do notation is good enough.
I'd disagree--sequencing is special, and lists represent it directly.
Don't forget, also, that lists are also much more prevalent in beginners'
code--and nice notation for beginners helps get peop
John Hughes wrote:
> Quoting Paul Hudak <[EMAIL PROTECTED]>:
>
>> Actually, one of the main reasons that we chose (:) is that that's what
>> Miranda used. So, at the time at least, it was not entirely clear what
>> the "de facto universal inter-language standard" was.
>
Phil Wadler argued
Robin Green wrote:
2. Dependent types: By programming in a dependently-typed functional
programming language such as the research language Epigram, it is
possible to write functional programs whose types force them to be
correct. See for example "Why Dependent Types Matter" by Thorsten
Altenki
Daniel Fischer wrote:
Now the question is, could that restriction be lifted, i.e., would it be
possible/worthwhile to let defaulting also take place if user defined classes
are involved?
The current defaulting mechanism in Haskell is very, very conservative.
You could easily relax the restrict
Daniel Fischer wrote:
Cool. So let's see if I got it.
If I have
n <- readIO
...
mapM_ (func n) list
...
in my programme, the runtime system will/might build object code for
func n that is then used instead of using the general code for func and
supplying both arguments to that?
Tha
Joel Reymont wrote:
You are right in that I spent the first few weeks learning. By now I
know that pickling is the bottleneck, though. The timeleak code is very
simple. It forks X threads where each thread opens a file for reading.
Why on earth do you want each tread to open the file and un
Branimir Maksimovic wrote:
Great! what are constrains on [begin..end] could they be some type
which supports (+) , but not Int.
Anything in the Enum class (so it doesn't even have to support (+)).
Many things are in the Enum class.
Last question is: Does creation of list of functions humpers p
Branimir Maksimovic wrote:
I've found that Haskell is pretty good in implementing recursive
algorithms.
Problem cames when one want's to implement non recursive algorithm
by terms of recursion as Haskell does not support loops.
Perhaps if we can get loops, situation will improve, but then that
w
John Meacham wrote:
On Thu, Dec 15, 2005 at 02:02:02PM -, Simon Marlow wrote:
With 2k connections the overhead of select() is going to start to be a
problem. You would notice the system time going up. -threaded may help
with this, because it calls select() less often.
we should be usin
Very cool! :)
[EMAIL PROTECTED] wrote:
Stefan Monnier wrote:
I expected at first you were doing some funky type class molestation
so you can use "djinn" in your code and let Haskell fill it in.
That has already been done:
De-typechecker: converting from a type to a term
http://www.haskell.
I've certainly thought of providing the functionality
you want, but I've not done that yet.
Internally djinn uses some kind of ASTs, it might be possible
to use GADTs to do what you want in a type safe way. If not
it should be possible to use Dynamic.
-- Lennart
Stefan Monnier wrote:
Well, the proof search is terminating (and complete) so
it has to stop somewhere. That happens to be result with
this particular search strategy.
-- Lennart
Chung-chieh Shan wrote:
Lennart Augustsson <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTE
There is a new version of Djinn available, with two notable
new features: Haskell data types can be defined and the
found functions are sorted (heuristically) to present the
best one first.
To play with Djinn do a
darcs get http://darcs.augustsson.net/Darcs/Djinn
or get
http://darcs.augustsso
Howdy, y'all!
I've written a small program that takes a (Haskell) type
and gives you back a function of that type if one exists.
It's kind of fun, so I thought I'd share it.
It's probably best explained with a sample session.
calvin% djinn
Welcome to Djinn version 2005-12-11.
Type :h to g
Have you tried using any of the standard string searching algorithms
to speed up the search? Like BM or KMP?
-- Lennart
Branimir Maksimovic wrote:
From: Tomasz Zielonka <[EMAIL PROTECTED]>
To: Branimir Maksimovic <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], haskell-cafe@haskell.org
S
Shae Matijs Erisson wrote:
Gregory Woodhouse <[EMAIL PROTECTED]> writes:
My knowledge of functional programming is pretty much limited to Haskell,
Scheme, and a smattering of Common Lisp. Are there languages other than
Haskell that explicitly use monads? How about "not so explicitly"?
Java ht
Greg Woodhouse wrote:
Well...think about this way. The function
f i = [1, 1 ..]!!i
is just a constant function expressed in a complicated way. Can I
algoritmically determine that f is a constant function?
In general, no. Even in this case I'm pretty sure you'll need induction
somewhere.
I
Greg Woodhouse wrote:
Perhaps the issue is that the manipulations below are purely syntactic,
But all the computation rules of the lambda calculus are "syntactic"
in that sense. When you can prove things by symbol pushing it's
the easiest way.
But as Paul Hudak mentioned, there definitions tha
Greg Woodhouse wrote:
--- Lennart Augustsson <[EMAIL PROTECTED]> wrote:
How about:
nil = \ n c . n
cons x xs = \ n c . c x xs
zero = \ z s . z
suc n = \ z s . s n
listFromZero = Y ( \ from n . cons n (from (suc n))) zero
(Untested, so I might have some mistake.)
-- L
Greg Woodhouse wrote:
--- Paul Hudak <[EMAIL PROTECTED]> wrote:
The important property of Y is this:
Y f = f (Y f)
Right. This is just a formal statement of the property thaat f fixex Y
f. I'm with you so far.
In this way you can see it as "unwinding" the function, one step at a
time.
How about:
nil = \ n c . n
cons x xs = \ n c . c x xs
zero = \ z s . z
suc n = \ z s . s n
listFromZero = Y ( \ from n . cons n (from (suc n))) zero
(Untested, so I might have some mistake.)
-- Lennart
Greg Woodhouse wrote:
--- Lennart Augustsson <[EMAIL PROTECTED]> wrote:
What do you mean by represent?
It's easy enough to write down the lambda term that is the
encoding of [0..].
-- Lennart
Greg Woodhouse wrote:
Maybe this is old hat, but the question about detecting loops in data
structures got me thinking about this. I know you can encode the cons
oper
Because mentioning FP is the kiss of death?
-- Lennart
PS. I can see Eric Meijer's shadow behind this. ;)
Niklas Broberg wrote:
Why is it that everything that OO "steals" from the functional
paradigm is always marketed as something new that will revolution the
way we program? Can't th
Tom Hawkins wrote:
Lennart Augustsson wrote:
Tom Hawkins wrote:
In a pure language, is it possible to detect cycles in recursive data
structures? For example, is it possible to determine that "cyclic"
has a loop? ...
data Expr = Constant Int | Addition Expr Expr
cyclic :: E
Tom Hawkins wrote:
In a pure language, is it possible to detect cycles in recursive data
structures? For example, is it possible to determine that "cyclic" has
a loop? ...
data Expr = Constant Int | Addition Expr Expr
cyclic :: Expr
cyclic = Addition (Constant 1) cyclic
Or phased different
Sebastian Sylvan wrote:
Also, you may use STArrays (I think they come in unboxed as well) for
stateful code, which may be even faster (unless accumArray does some
neat trick to make it O(m) where m is the number of index/value
pairs).
The whole idea with having accumArray as part of the Array s
Wolfgang Jeltsch wrote:
Am Samstag, 15. Oktober 2005 08:31 schrieb Bulat Ziganshin:
Hello Haskell,
number of type definition statements in Haskell (data, type, newtype) is
a bit too large. at least, newtype definition seems to be superfluous - it
can be replaced by the same `data` definition:
ing a pointer
without checking for 0, and extracting the Maybe value without
handling Nothing, apart from that it leads to undefined behavior in C
which in fact isn't really a point against "hybrid variables".
On 9/20/05, Lennart Augustsson <[EMAIL PROTECTED]> wrote:
Mark C
Mark Carter wrote:
OTOH, I think Charles Moore is quoted as saying that if he want to add 1
to the letter A, then he didn't want the programming language to stop
him. Which is quite a contrast to Haskell and its notions on safety. I'm
not flamebaiting, you understand, I'm just pointing out the
Mark Carter wrote:
The typical example in C is:
mem = malloc(1024)
Malloc returns 0 to indicate that memory cannot be allocated, or a
memory address if it can. The variable mem is a so-called hybrid
variable; it crunches together 2 different concepts: a boolean value
(could I allocate memory?)
Keean Schupke wrote:
Other things we can do ... with dependant types we can ask the compiler
to prove the correctness of sorting algorithms. If we define an ordered
list tgo be one where each element must be larger than the preceding one:
data OrderedIntList = Cons (a::Int) (l::OrderedList)
David Roundy wrote:
The issue is that Haskell (as far as I understand, and noone has suggested
anything to the contrary) doesn't have a sufficiently powerful type system
to represent matrices or vectors in a statically typed way. It would be
wonderful if we could represent matrix multiplication
Jonathan Cast wrote:
No type theory (that I know of) goes beyond System F in accepting
anything like foo. So, given the current state of the art, foo is
unconditionally ill-typed. That could change if someone comes up with a
/consistent/ type theory that accepts foo, but foo is i
Jonathan Cast wrote:
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
A somewhat similar problem exists even without fields:
foo :: Either a b -> Either () b
foo (Left _) = Left ()
foo x@(Right _) = x
Since Haskell type checking doesn't use the information gained
by pattern matc
types. I sort-of expected that the extension to pattern matching
would follow.
Or is that a nice paper waiting to be written?
Jacques
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
A somewhat similar problem exists even without fields:
foo :: Either a b -> Either () b
foo (Left _) =
A somewhat similar problem exists even without fields:
foo :: Either a b -> Either () b
foo (Left _) = Left ()
foo x@(Right _) = x
Since Haskell type checking doesn't use the information gained
by pattern matching to refine types we just have to accept that
some perfectly safe programs don't typ
Radu Grigore wrote:
List based solutions should also work if garbage collection
is done right, e.g.,
fib n = fs !! n
where fs = 1 : 1 : zipWith (+) fs (tail fs)
So you mean my solution of the LCS problem should work in O(n) space
"if garbage collection is done right"? What exactly does this
Radu Grigore wrote:
Anyway, I was wondering if the O(n) space and O(n^2) time solution can
be implemented in Haskell. Another way to ask this. Consider the
classic fibonacci example. Can one compute the n-th fibonacci number
in O(n) time and O(1) space, i.e. remember only the "last" two values
du
Jacques Carette wrote:
Anyone who thinks that +0 = -0 has never wrestled with a branch cut (and
lost...). Such people have the nasty habit of also thinking that ALL
functions are continuous! You might think they were constructivists or
something.
Why would a constructivist think that all funct
Greg Buchholz wrote:
Samuel Bronson wrote:
The former may not be hard, but the latter would require functions
with typeclass constraints on their types to be annotated in the
interface file with what typeclass methods they called. Does that
sound hard yet?
Compared to writing the rest of the c
Thank you for saying what I was too lazy to say myself. :)
-- Lennart
Jan-Willem Maessen wrote:
On May 10, 2005, at 4:14 AM, Bo Herlin wrote:
> Well, part of what I was doing was experimenting with what a library
like
> this should look like, even more than what it should do. For some
re
Have you tried heap profiling?
-- Lennart
Greg Buchholz wrote:
Josef Svenningsson wrote:
I think the thing that really kills you is the way you shuffle around
the list in the advance function. Your commented out rotations
function has the same problem. Here is my attempt to solve the proble
Benjamin Franksen wrote:
Another way to explain what sequence does is the following implementation,
which I find a bit easier to understand for the beginner than the one given
in http://www.haskell.org/onlinelibrary/standard-prelude.html :
sequence [] = []
sequence m:ms = do
x <- m
xs <- seq
Keean Schupke wrote:
Have a look at the linux kernel IDE drivers, look for
Generic IDE Chipset support
That's the part I missed, you were talking about IDE
chips. Yes, they have many similarities. You can
probably run many of them in one of the slower modes
with a common driver. But even these c
from chipset to chipset.
Keean.
Lennart Augustsson wrote:
But there are plenty of minor variations on how to program
and initiate DMA for different devices.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/ha
But there are plenty of minor variations on how to program
and initiate DMA for different devices.
-- Lennart
Keean Schupke wrote:
Actually with PCI chipsets, implementing a generic BusMaster DMA driver
is not too hard, assuming you already have interrupts handled (and you
don't want 64bit
Joe Fasel argued for the inclusion of S or W in the prelude
on the grounds that a complete combinator base would be "neat".
But the majority of the Haskell committee didn't buy that.
-- Lennart
Peter G. Hancock wrote:
Lennart Augustsson wrote (on Mon, 14 Feb 2005 at 14
Remi Turk wrote:
import Control.Monad.Reader
k :: a -> b -> a
k = return
s :: (a -> r -> b) -> (a -> r) -> a -> b
s = flip (>>=) . flip
Greetings,
Remi
Oh, a little bit of cheating. ;) But neat.
It can be done without importing anything.
(Except the implicit Prelude import, of course.)
-- Le
Daniel Fischer wrote:
And could one define
\f g h x y -> f (g x) (h y)
point-free?
Any definition can be made point free if you have a
complete combinator base at your disposal, e.g., S and K.
Haskell has K (called const), but lacks S. S could be
defined as
spread f g x = f x (g x)
Given that la
Malcolm Wallace wrote:
Lennart writes:
What encoding(s) did hbc allow in source files? The docs only mention
unicode characters inside character & string literals.
The Java encoding, i.e., \u.
Well, in that case, nhc98 also supports Unicode in source files,
identically to hbc.
Well, you have
Simon Marlow wrote:
Many years ago, hbc claimed to be the only compiler with support for
this.
What encoding(s) did hbc allow in source files? The docs only mention
unicode characters inside character & string literals.
The Java encoding, i.e., \u.
-- Lennart
Simon Marlow wrote:
Here's a summary of the state of Unicode support in GHC and other
compilers. There are several aspects:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC for some time, and is now true in Hugs.
I don't think it's true in nhc98 (plea
fnK_ :: Int -> Int
fnK_ = round . sqrt . fromIntegral
james pentland wrote:
what coercion can i use to get the below program to
compile?
i see
class (Real a, Fractional a) => RealFrac a where
round :: (Integral b) => a -> b
and
class (Fractional a) => Floating a where
sqrt
John Goerzen wrote:
On Tue, Dec 07, 2004 at 12:43:27PM +0100, Lennart Augustsson wrote:
slightly slower than statically linked ones), but you still have the
versioning issue.
Yay! :) Dynamically linked libraries are slower than statically linked
ones in just about every implementation I know of
Simon Marlow wrote:
Dynamic linking is (almost) a separate issue. GHC 6.4 will have some
support for dynamic linking in the native code generator thanks to
Wolfgang Thaller, but it needs someone to push it the final mile on
x86/Linux and Windows. Dynamically linked libraries will work (albeit
sli
501 - 600 of 626 matches
Mail list logo