Re: When is it safe to cheat?

2000-05-10 Thread Michael Hobbs
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

Re: When is it safe to cheat?

2000-05-09 Thread Michael Hobbs
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

Re: lists

2000-04-02 Thread Michael Hobbs
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

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread 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

Re: Trivial Haskell Concurrency problem

2000-02-14 Thread Michael Hobbs
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

Re: Trivial Haskell Concurrency problem

2000-02-14 Thread Michael Hobbs
lly. ...or querying the system time, down to the nanosecond... - Michael Hobbs

Re: Trivial Haskell Concurrency problem

2000-02-14 Thread 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

Re: Trivial Haskell Concurrency problem

2000-02-14 Thread Michael Hobbs
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

Re: Job market

2000-02-09 Thread Michael Hobbs
[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

Re: random number seeds

2000-02-07 Thread Michael Hobbs
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,

Re: Haskell Clean

2000-01-27 Thread Michael Hobbs
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

Re: Unevaluated worlds

2000-01-26 Thread Michael Hobbs
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.

Re: A hard core game programmers view

2000-01-26 Thread Michael Hobbs
"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

Re: Haskell Clean

2000-01-24 Thread 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

Re: Referential Transparency (was Re: OO in Haskell)

1999-10-07 Thread Michael Hobbs
ially transparent", well I guess that's up to your own philosophic bias. - Michael Hobbs

Re: Referential Transparency (was Re: OO in Haskell)

1999-10-07 Thread 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

Re: Referential Transparency (was Re: OO in Haskell)

1999-10-07 Thread Michael Hobbs
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

Re: CPP and system configuration

1999-10-05 Thread Michael Hobbs
. Or were you thinking of something even more elegant? (I must admit that I haven't looked at MetaML yet.) - Michael Hobbs

Re: [haskell] incredibly dumb question

1999-09-30 Thread 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.

Re: advice wanted on GUI design patterns

1999-09-27 Thread Michael Hobbs
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

ICFP programming contest

1999-09-15 Thread Michael Hobbs
s probably competing against hard-core compiler writers, I didn't have much heart. ;-) - Michael Hobbs

Re: Haskell Wish list: library documentation

1999-09-08 Thread 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

Re: Towards a more OO Haskell

1999-09-08 Thread 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

Re: Haskell Wish list: library documentation

1999-09-08 Thread 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

Re: Towards a more OO Haskell

1999-08-31 Thread Michael Hobbs
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

Re: Towards a more OO Haskell

1999-08-30 Thread 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

Towards a more OO Haskell

1999-08-27 Thread Michael Hobbs
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

Re: Towards a more OO Haskell

1999-08-27 Thread 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

Re: opposite of (:)

1999-08-20 Thread Michael Hobbs
that one of the compilers is optimized to handle it in less than O(n) time. :) - Michael Hobbs

Re: Question

1999-08-20 Thread 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

Re: Question

1999-08-19 Thread Michael Hobbs
rking, you can remove the type variable and use: data BTree = Leaf Integer | Node Integer (BTree Integer) - Michael Hobbs

List of class instances?

1999-08-18 Thread Michael Hobbs
tial types is just what I need, I guess I can bite the bullet. Thanks, - Michael Hobbs

Re: Problem with 4.03 FFI on Sparc?

1999-07-09 Thread 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

Problem with 4.03 FFI on Sparc?

1999-07-07 Thread Michael Hobbs
: 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

Re: greencard example does not compile

1999-04-16 Thread Michael Hobbs
x_inv) (int y_inv)) - Michael Hobbs

Re: Threads in GHC's RTS

1999-04-14 Thread 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

Re: Type casting??

1999-03-11 Thread 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

Re: Calling Haskell from...

1999-02-25 Thread 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

Re: Do Existential Types make Algebraic Types obsolete? (was Re: how to exploit existential types)

1999-02-20 Thread Michael Hobbs
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

Re: A plea for a little Haskell help.

1999-02-17 Thread Michael Hobbs
MaybePoly) - Michael Hobbs

waitQSemN bug

1999-02-16 Thread 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

A plea for a little Haskell help.

1999-02-16 Thread Michael Hobbs
x polyX (NotPoly str) = str But that fails to type-check. Thanks for all input, Michael Hobbs

Automatic Makefile dependencies

1999-02-12 Thread 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

Re: syntactic sugar for arrows

1999-01-28 Thread 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

Re: f :: IO x - x

1999-01-04 Thread 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

Re: Haskell as a relational database language

1998-12-15 Thread Michael Hobbs
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

HDirect: references to arrays.

1998-12-09 Thread Michael Hobbs
to be deallocated after calling the function. - Michael Hobbs

Re: HDirect: A couple of new bugs.

1998-12-08 Thread 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

HDirect: String abiguity

1998-12-04 Thread Michael Hobbs
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: allocOutPtr

1998-12-04 Thread 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 and array of strings

1998-12-03 Thread Michael Hobbs
. (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.

Re: A Haskell FFI (was: Haskell 2 idea -- instancetype)

1998-11-08 Thread Michael Hobbs
Haskell functions to the outside with H/Direct? Thanks, Michael Hobbs

Haskell 2 idea -- instancetype

1998-11-07 Thread 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

Re: topdelcs / decls

1998-10-26 Thread 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

Re: topdelcs / decls

1998-10-23 Thread Michael Hobbs
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

doubled-up performIO

1998-10-03 Thread Michael Hobbs
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