Ketil Malde wrote:
Michael Hobbs [EMAIL PROTECTED] writes:
I believe that the P3 chips come with a noisy diode built-in,
specifically for the purpose of generating random numbers.
Apparently, the Intel i810 chipset also contains a hardware random
number generator. See
http
source
environment.) Probably not as good as the entropy daemon, anyway.
I believe that the P3 chips come with a noisy diode built-in,
specifically for the purpose of generating random numbers. You might try
to find a way to access that little gizmo. (Assuming that you're running
on a P3.)
- Michael
Pair
(hint, hint)
.. This is my first attempt at haskell -- and although I am not looking
for the solution, I was wondering if anyone could help me :()
Hope I didn't give away too much. :-)
- Michael Hobbs
George Russell wrote:
Does the phrase "Dining Philosophers Problem" ring a bell with anyone?
And AFAIK, the existing solutions to that problem requires a knowledge
of who all the philosophers are and what they are attempting to do. That
gets back to the issue of having a global value that
y. I haven't thought enough
about it to come up with a concrete solution. If this is good enough,
I'll see if I can noodle on it some more.
- Michael Hobbs
lly.
...or querying the system time, down to the nanosecond...
- Michael Hobbs
Michael Hobbs wrote:
(We're assuming that we can't lock them both simultaneously)
I knew I should have read the literature on deadlock avoidance before
posting that message. :-/ In fact, I should have used the word
"atomically" above instead of "simultaneously". As it
Michael Hobbs wrote:
Here's my stab at it. (NB: This is simply an off-the-cuff attempt. It
looks like it should work right, but it is far from rigorously tested or
analyzed.)
grumble/
I discovered a path that would cause a deadlock in that code as well.
However, I have a change that /should
[EMAIL PROTECTED] wrote:
This is probably a stupid question, but...
Are there any jobs out there to be had programming in haskell?
My apologies if this is inapropriate for this list or if I missed it on the
web site.
Thanks-
Brett
I have never met an employer that has so much as even
I believe that there is a nanosecond value in one of the data types
specified in the Time module. (One of the Haskell 98 libraries) I don't
know if Hugs supports that module, though. I know GHC does.
Nick Eby wrote:
Is there a straightforward way to access the current system time in
haskell,
Adrian Hey wrote:
On Mon 24 Jan, Michael Hobbs wrote:
(*) One place where the World - (World, a) model breaks down is when
the IO function is a blocking function such as "getChar :: IO Char". If
this function was equivalent to World - (World, a) then that would mean
that
Jerzy Karczmarczuk wrote:
BTW. Hobbs term "_unevaluated_ imperative action" is something as
nice and meaningful for me as, say "revolutionary justice", or
"popular democracy". [[appropriate smiley, please.]]
Is Adrian's substitution of "unexecuted imperative action" more
meaningful for you.
"patterns" is a big buzzword in industry right now, which
is very close to his notion of frameworks.
A person would *love* to use templates in C++, if only it wasn't so
broken,
- Michael Hobbs
quot;.
My original intent was to say that if you describe 'IO a' values simply
as _unevaluated_ imperative actions and throw away notions of
referential transparency and World states, then *poof* no more nasty
philosophy debates. :-)
- Michael Hobbs
ially transparent", well I guess
that's up to your own philosophic bias.
- Michael Hobbs
Michael Hobbs wrote:
Adrian Hey wrote:
I've read this paper, and it is good, but I still see no reason to
change my opinion regarding referential transparency and IO.
But I am terribly confused about this issue, there seems to be no real
consensus about this in the FP world. I just
Michael Hobbs wrote:
Consider this:
type IO a = StateOfUniverse - (a, StateOfUniverse)
-- Not syntactically correct, but you know what I mean.
So anything that is declared, say `IO Int', means that it is actually a
function that reads in the state of the universe, potentially
.
Or were you thinking of something even more elegant? (I must admit that
I haven't looked at MetaML yet.)
- Michael Hobbs
Christopher Jeris wrote:
Here is another one for haskell-newbies, really. :)
Does anybody else wish for Ix.increment and Ix.decrement ? I have been
writing some matrix code and whenever I want to refer to "the next row
down" I have been writing (range (i0,i1))!!1, which seems inelegant.
t you were looking for,
- Michael Hobbs
Havoc Pennington wrote:
Hi,
I'm trying to learn Haskell, and I'm wondering what experiences people
have with designing programs with graphical user interfaces. Assume for
the moment that a GUI implies an object-oriented existing library such as
s probably
competing against hard-core compiler writers, I didn't have much heart.
;-)
- Michael Hobbs
on this? As a supplement to, or instead of Literate
Haskell? Not that I've ever really used Literate Haskell, but I had
always planned on using it someday. ;-)
- Michael Hobbs
any such effort on haskell.org. Fortunately, someone on
this list supplied a reference to Haskell++, whose ideas I'm in the
process of stealing. :)
- Michael Hobbs
documentation for unzip is this:
unzip = foldr (\(a,b) ~(as,bs) - (a:as,b:bs)) ([],[])
Not exactly intuitive. Could be better. I'm assuming that George's point
is that this documentation leaves plenty of room for expansion.
- Michael Hobbs
"S. Alexander Jacobson" wrote:
Are we tal
a
empty :: seq a
data Stack a = MkStack (Sequence a)
...
push a (MkStack seq) = MkStack (cons seq a)
...
instance SequenceClass [] a where
mkSequence list = let
cons a = mkSequence (a:list)
...
in MkSeq cons ...
empty = []
- Michael Hobbs
Fergus Henderson wrote:
On 27-Aug-1999, Michael Hobbs [EMAIL PROTECTED] wrote:
Those who are into the more esoteric aspects of OO know that an object
has both a "type" (interface) and a "class" (implementation).
Yes, but of course Haskell uses those two words i
ts out standard Haskell code, which uses the conventions I
alluded to above? My current project probably isn't large enough to
warrant the effort, but if someone else could use it I might be willing
to go the extra mile.
- Michael Hobbs
Martin Norb{ck wrote:
Have you looked at Haskell++?
http://www.cs.chalmers.se/~rjmh/Software/h++.html
Wasn't aware of its existence. Thanks for the pointer. I'll be sure to
look into it.
- Michael Hobbs
that one of the
compilers is optimized to handle it in less than O(n) time. :)
- Michael Hobbs
uld help get a pulse of where people are at and what
they would be willing to do.
Not that *I* have the time to create such a web site. :-)
- Michael Hobbs
rking, you can remove the type variable
and use:
data BTree = Leaf Integer | Node Integer (BTree Integer)
- Michael Hobbs
tial types is
just what I need, I guess I can bite the bullet.
Thanks,
- Michael Hobbs
"Manuel M. T. Chakravarty" wrote:
Michael Hobbs [EMAIL PROTECTED] wrote,
I don't know if this is a known bug or not, so I figured I'd send a
message and find out for sure. Anyway, I'm using a binary build of GHC
4.03 for Sparc that Simon M. (?) posted a while back. When
: createAdjustor.
I looked for it in all of the libraries, but was unable to find it. I'm
assuming that it's just not there. It's supposed to be in libHSrts.a,
right?
Thanks,
Michael Hobbs
x_inv) (int y_inv))
- Michael Hobbs
ing that we may be opening Pandora's Box here.
Surely, there must be a more elegant solution that resolves all of these
problems. If I come up with it, I'll let you know. :)
- Michael Hobbs
oo(x - 1)
According to your implementation, the type of `foo' isn't `Int - [a]'
it's `Int - [Char]'. That is, the compiler knows that the only thing
that can ever be in the list is characters. Therefore, it complains when
you claim that it can be a list of "anything".
- Michael Hobbs
Alex Ferguson wrote:
What's the state of the art as regards calling Haskell functions from
'the outside world'? I note that Haskell Direct has this in its
manifesto, but says "currently unsupported". Does that mean a moderate
size black hole at the centre of something still potentially
in as mathematically rigorous a
fashion.) The weakness that I pointed out above was in regard to using
pattern matching types vs. type classes. With type classes, you can
declare an instance in any module and the instance declarations
typically don't step on each others' toes.
- Michael Hobbs
MaybePoly)
- Michael Hobbs
quot;. Looks like
the source of this bug is due to a copy-and-paste from waitQSem. (Also,
in the 'else' clause of the function, it shouldn't blindly write a 0
into the new value of 'avail', it keep the value of 'avail' as it is.)
- Michael Hobbs
FYI, The reason I was reading through the
x
polyX (NotPoly str) = str
But that fails to type-check.
Thanks for all input,
Michael Hobbs
Even with GHC 4.02 I've noticed that 'ghc -M' always adds one too many
newlines into the Makefile. The large gap gets to be pretty obnoxious if
you run 'make depend' several times.
Kudos for the FFI fixes, BTW.
- Michael Hobbs
or things
such as parsing LL(1) grammars, but I could not see how such a scheme
could become a _replacement_ for monads in general purpose programming.
Perhaps I was expecting the wrong thing from the concept...
- Michael Hobbs
Marcin 'Qrczak' Kowalczyk wrote:
Fri, 05 Nov 1999 09:42:20 -0600, Michael Hobbs [EMAIL PROTECTED] pisze:
Monads do indeed have a viral nature to them. That is, once you use a
monadic function, you are required to make the calling function monadic,
and it's calling function, and it's
provide a very good framework for using relational algebra in order to
combine and extract data. (In contrast to using something like a
Structured Query Language.) I dabbled with this a bit, but didn't get
very far before I lost interest. :)
Michael Hobbs
to be deallocated after calling the
function.
- Michael Hobbs
fix should solve all of the foreseeable
problems I have with using HDirect for GTK. (Except for callbacks, which
is an entirely separate issue.) If all goes well, you shouldn't hear
much more from me for a while.
Thanks,
Michael Hobbs
FYI: This latest snapshot caused 4.01-compiled i
of defining the type of a Ptr is to add clarity, I don't think
that the use of "Ptr String" adds much clarity.
Rambling on,
Michael Hobbs
Hdirect.sizeofDouble)
primfoo bar
...
If I understand allocOutPtr correctly, it will allocate 32 bytes of
memory in this instance, since sizeofAddr = 4 and sizeofDouble = 8.
Let me know if I'm not seeing something,
Michael Hobbs
(HDirect 0.13)
.
(HaskellDirect 0.13)
Michael Hobbs
P.S. If you're interested in seeing an example that *really* exposes the
limits of IDL, let me know; I've got a doozy.
Haskell functions to the outside with H/Direct?
Thanks,
Michael Hobbs
through
implementation-specific precompilers like Green Card. To make the
specification
simple, I think all that would need to be defined is a way to invoke a
library
routine. (No special in-line C code syntax, etc. However, callbacks
could be a
bear.)
I'm done now,
Michael Hobbs
Felix Schroeter wrote:
for instance, i could want to sort a list,
according to two different criteria,
using two different instances of Ord.
newtype IntFunnilyOrdered = IFO Int
instance Ord IntFunnilyOrdered where
compare (IFO x) (IFO y) | even x even y = compare x y
Ralf Hinze wrote:
As it stands `sortBy' is more general than `sort': I can define `sort'
in terms of `sortBy' but not the other way round. [However, sometimes
it is far more convenient to implement `sort' than `sortBy'.]
sort = sortBy (=)
Just to add a voice to support your
performIO() I get seg faults, bus errors, and/or core dumps (take
your pick). I'm using GHC 3.02 on Linux i386. (RedHat 5.1, to be exact)
- Michael Hobbs
56 matches
Mail list logo