Re: [Haskell] pros and cons of static typing and side effects ?

2005-08-11 Thread Hamilton Richards
with a disclaimer of all responsibility for their quality. Regards, --Ham -- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer (retired)The University of Texas at Austin [EMAIL PROTECTED

Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Hamilton Richards
you'll help spread the word. With best wishes, --Ham -- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University

Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Hamilton Richards
At 9:36 AM -0700 2005/5/7, Fergus Henderson wrote: On 07-May-2005, Hamilton Richards [EMAIL PROTECTED] wrote: As far as I know, the last programming language that included arrays' sizes in their types was Standard Pascal, There have been many such languages since Standard Pascal. For example C

Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Hamilton Richards
At 12:04 PM -0700 2005/5/7, Jacob Nelson wrote: GCC knows how big an array is: jake$ cat arrsizetest.c #include stdio.h int main() { int a[50]; printf(sizeof a == %d\n,sizeof(a)); return 0; } jake$ gcc arrsizetest.c jake$ ./a.out sizeof a == 200 jacob gcc knows the size of

Re: [Haskell-cafe] Thompson's Exercise 9.13

2005-04-14 Thread Hamilton Richards
At 6:53 PM +0200 2005/4/12, Henning Thielemann wrote: On Tue, 12 Apr 2005, Hamilton Richards wrote: Here's a solution: init :: [a] - [a] init xs = tail (foldr keep [] xs) where keep :: a - [a] - [a] keep x [] = [x] keep x [y] = [x,x] keep x (y:z:zs) = x:x:y:zs Nice idea

Re: [Haskell-cafe] mathematical notation and functional programming

2005-01-28 Thread Hamilton Richards
At 9:14 PM +0100 2005/1/27, Henning Thielemann wrote: Over the past years I became more and more aware that common mathematical notation is full of inaccuracies, abuses and stupidity. I wonder if mathematical notation is subject of a mathematical branch and whether there are papers about this

Re: [Haskell-cafe] Question on case x of g when g is a function

2005-01-27 Thread Hamilton Richards
If he really wanted to use a case-expression, he could write it this way: f x = case x of False - 0 True - 1 --Ham At 1:02 PM +0100 2005/1/27, Henning Thielemann wrote: On Thu, 27 Jan 2005 [EMAIL PROTECTED] wrote: Can a kind soul please enlighten me on why f bit0 and f bit1

[Haskell-cafe] RE: Answers to Exercises in Craft of FP

2005-01-26 Thread Hamilton Richards
to instructors, or to those who might convince me that they are not reading the book for credit. Or is that being too draconian? -Paul -- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer

Re: [Haskell-cafe] Visual Functional Languages

2005-01-25 Thread Hamilton Richards
/~joel/vfpe/http://www.csse.uwa.edu.au/~joel/vfpe/ Does anyone know other languages or at least projects on this subject? Have a look at LabView: http://www.icon-tech.com.au/thelabviewfaq.html --Ham -- -- Hamilton Richards, PhD

Re: [Haskell-cafe] How to hold common data

2004-05-12 Thread Hamilton Richards
action that calls itself-- with a parameter representing the state. --Ham -- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525

Re: [Haskell-cafe] Data constructors

2004-04-25 Thread Hamilton Richards
to be enlightened. Regards to all, --Ham -- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station

Re: show function

2003-12-02 Thread Hamilton Richards
, Int, Char, etc.), there's no canonical representation for functions (other than a complete list of argument-result pairs, which would not be very useful). Regards, --Ham -- -- Hamilton Richards, PhD Department of Computer

Re: A question about overloading

2003-11-08 Thread Hamilton Richards
: (Num a, Boolable a) = Bool *** Expression : isTrue 3 Main isTrue (3::Int) True Main Main isTrue (length []) False Main isTrue (length abcde) True Main Regards, --Ham -- -- Hamilton Richards, PhD Department of Computer

Re: determining if a int is a power

2003-11-07 Thread Hamilton Richards
function. I have been trying this: isPower n = let powerF = floor(sqrt(n)) in if (powerF*PowerF == n) then True else False [...] -- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer

Re: Question abt Num

2003-10-22 Thread Hamilton Richards
-- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall 5.138Austin, Texas

Re: let vs. where

2003-08-20 Thread Hamilton Richards
-- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall 5.138Austin, Texas 78712-1188 [EMAIL PROTECTED][EMAIL PROTECTED

Re: let vs. where

2003-08-20 Thread Hamilton Richards
-- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall 5.138Austin, Texas 78712-1188 [EMAIL PROTECTED][EMAIL PROTECTED

Re: Case expressions, matching, and constants

2003-07-17 Thread Hamilton Richards
-- -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall 5.138Austin, Texas 78712-1188 [EMAIL PROTECTED

Re: [OT] Teaching Haskell in High School

2003-02-03 Thread Hamilton Richards
: No. [...] Wolfgang -- -- Hamilton RichardsDepartment of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall

Re: where block local to a guard?

2002-09-17 Thread Hamilton Richards
-- -- Hamilton RichardsDepartment of Computer Sciences Senior Lecturer The University of Texas at Austin 512-471-9525 1 University Station C0500 Taylor Hall 5.138Austin, Texas 78712-1188 [EMAIL PROTECTED][EMAIL

Re: Simpler Fibonacci function

2002-02-10 Thread Hamilton Richards
himself no credit by blaming the tutorial. --HR -- Hamilton RichardsDepartment of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin

Re: Pointers in Haskell??

2001-12-07 Thread Hamilton Richards
that values were always (except in exceptional cases) secretly pointers to.) -- Jeff -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525

Re: Pointers in Haskell??

2001-12-07 Thread Hamilton Richards
of Haskell programs, and derive educated guesses. Cheers, --Ham -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas

Re: Unicode support

2001-09-29 Thread Hamilton Richards
unit). [0] http://www.unicode.org/unicode/standard/principles.html -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University

Re: newbie syntax question

2001-07-24 Thread Hamilton Richards
-- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin Taylor Hall 5.138Austin, Texas 78712

re: Biggest Haskell unit in the world

2001-06-27 Thread Hamilton Richards
-- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin Taylor Hall 5.138Austin, Texas 78712-1188 [EMAIL PROTECTED][EMAIL

Re: cross product of lists

2001-05-08 Thread Hamilton Richards
. --Ham -- Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin Taylor Hall 5.138Austin, Texas

openfile :: String - String

2000-04-26 Thread Hamilton Richards
, they must be named globally. This is no problem with openfile, but readFile forces their names to be local to an IO command. Can anyone suggest a solution? Thanks, --Ham -- Hamilton Richards Jr.Department of Computer

Re: openfile :: String - String

2000-04-26 Thread Hamilton Richards
-- Hamilton Richards Jr.Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin SHC 434 Austin, Texas 78712-1188 [EMAIL PROTECTED] --

Re: string to Integer

2000-04-05 Thread Hamilton Richards
h . g . f which can be thought of as a pipeline only if one imagines data flowing right to left. --HR ------ Hamilton Richards Jr.Department of Computer Sciences Senior Lecturer Mail Cod

Re: drop take [was: fixing typos in Haskell-98]

2000-01-26 Thread Hamilton Richards
= [] | otherwise = drop (n-1) xs' where (_:xs') = xs Regards to all, --Ham ------ Hamilton Richards Jr.Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525

Haskell home page

2000-01-01 Thread Hamilton Richards Jr.
-- Hamilton Richards Jr.Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin SHC 434 Austin, Texas 78712-1188 [EMAIL PROTECTED] --

Re: Haskell mailing list

1999-10-11 Thread Hamilton Richards Jr.
Would it be possible to have both the current mailing list and a Haskell newsgroup? If postings to each were automatically replicated on the other, then each reader could take her choice of which one to follow. --Ham -- Hamilton

Re: Reverse composition

1999-10-08 Thread Hamilton Richards Jr.
. g . h . ... --Ham ------ Hamilton Richards Jr.Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin SHC 434 Austin, Tex

Re: Monads in plain english (Was: Re: Licenses and Libraries)

1999-09-01 Thread Hamilton Richards Jr.
75-8) takes exactly this tack. It works very nicely. --HR ------ Hamilton Richards Jr.Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 T

type question

1999-01-17 Thread Hamilton Richards Jr.
erred type : _2 Yet if the inner type declaration is omitted: f :: a - a f x = g where -- g :: a g = x it compiles without a hitch. Is there a simple explanation for this phenomenon? Thanks, --Ham ------