Re: [Haskell-cafe] Proposal: Applicative = Monad: Call for consensus

2011-01-21 Thread Casey Hawthorne
uj supplied this: About the discussion putStrLn (readLn + (5 :: Int)).. I'll write it as the following line, importing Control.Applicative main = (+) readLn (return 3) They look almost exactly same in my eyes.. On Fri, 21 Jan 2011 11:01:36 -0800, you wrote: Interesting little paper,

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-10 Thread Casey Hawthorne
Of course Banks/Financial Firms/Investment Banks want software that is correct, secure, and logs transactions. Aspects are great for cross-cutting concerns like security and logging; as in AspectJ. For correctness, functional programming has that. With monads its easy to add logging and

Re: [Haskell-cafe] Multidimensional Matrices in Haskell

2010-07-07 Thread Casey Hawthorne
Doesn't mutable state have to be held in a monad? If you want mutable like behaviour without a monad, you may want a tree or some other data structure. On Wed, 7 Jul 2010 17:08:48 +0300, you wrote: Hi, A friend of mine wanted to do some Cellular Automata experiments in Haskell and was asking

[Haskell-cafe] Is there good place to post Haskell alorithms/data structures that follow Steven Skiena's book on algorithm design and also Haskell code snippets that follow some of Knuth's books?

2010-06-21 Thread Casey Hawthorne
Is there good place to post Haskell alorithms/data structures that follow Steven Skiena's book on algorithm design and also Haskell code snippets that follow some of Knuth's books? These code snippets don't seem to fit with Hackage. Is there a Hatorial? -- Regards, Casey

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-18 Thread Casey Hawthorne
But as a starting point, and especially to shake up preconceived notions, it still helps to compress common prejudices this way. Many people think they are thinking when they are merely rearranging their prejudices. William James? :) -- Regards, Casey

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-16 Thread Casey Hawthorne
I remember quite a few months ago, someone gave a presentation on Haskell and he admitted that so far all he had used it for were shell scripts. He said that his Haskell shell scripts ran faster than his shell scripts written in ? So all he had used so far, was just the imperative part of

Re: [Haskell-cafe] Steven S. Skiena of The Algorithm Design Manual, Second Edition, 2008 has sent me a message that if there is a Haskell page of algorithms he will link to it.

2010-05-28 Thread Casey Hawthorne
I have both books. The challenge is to get something linked from the The Stony Brook Algorithm Repository (http://www.cs.sunysb.edu/~algorith/) to a Haskell algorithms/data structures page to promote Haskell. For those who would not pick up a book (nor web page) with Haskell or functional in the

[Haskell-cafe] Steven S. Skiena of The Algorithm Design Manual, Second Edition, 2008 has sent me a message that if there is a Haskell page of algorithms he will link to it.

2010-05-27 Thread Casey Hawthorne
Hi: Steven S. Skiena of The Algorithm Design Manual, Second Edition, 2008 has sent me a message that if there is a Haskell page of algorithms he will link to it. So, is there such a page and/or is there some collection(s) of algorithms and data structures some where that I can massage into the

Re: [Haskell-cafe] Re: Math questions

2010-05-27 Thread Casey Hawthorne
This is an effect with any language that offers a very high degree of abstraction. I think this is an example of the Haskell effect (more typically seen on #haskell), which can be categorised as follows: 1) Someone asks a (usually rather simple) question. 2) People discuss this and provide

[Haskell-cafe] Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult.

2010-04-03 Thread Casey Hawthorne
Apparently, Erlang does not have a static type system, since with hot code loading, this is intrinsically difficult. Erlang Programming, Francesco Cesarini Simon Thompson, June 2009, O'Reilly, page 31. If Haskell allows hot code loading, would this throw a wrench into the static type system?

Re: [Haskell-cafe] Bubble sort algorithm implementations (Haskell vs. C)

2010-03-21 Thread Casey Hawthorne
You may want to use a mutable array. The performance may suffer from the memory allocation for the list. I wonder if it's possible to make Haskell implementation work faster without changing the algorithm (there's are actually a few tricks to make it work faster, but neither implementations have

Re: [Haskell-cafe] How to do the permutation and combination thing?

2010-03-11 Thread Casey Hawthorne
This sounds like homework. Think in abstract terms what you want to accomplish. Start with the simplest case first, usually the base case. On Fri, 12 Mar 2010 14:02:02 +0800, you wrote: Hi, For example, I have this: list1 = [a, b, c] list2 = [d, e, f] list3 = [g, h, i] Now I want: [ [(a,

Re: [Haskell-cafe] Function to detect duplicates

2010-02-24 Thread Casey Hawthorne
On Tue, 23 Feb 2010 08:30:18 -0300, you wrote: Hi folks, While solving a puzzle, I was posed the problem of finding if there was no duplicates on a list. Must it be a list data structure(DS) or list ADT? Mergesort can be parallelized. Best regards, Rafael -- Regards, Casey

Re: [Haskell-cafe] Function to detect duplicates

2010-02-24 Thread Casey Hawthorne
On Tue, 23 Feb 2010 08:30:18 -0300, you wrote: Hi folks, While solving a puzzle, I was posed the problem of finding if there was no duplicates on a list. Must it be a list data structure(DS) or list ADT? Mergesort can be parallelized. Best regards, Rafael If space is at a premium you

Re: [Haskell-cafe] If monads are single/linearly threaded, doesn't that reduce parallelism?

2010-02-10 Thread Casey Hawthorne
On Tue, 9 Feb 2010 21:56:49 +, you wrote: Monads are not commutative. A structure that would tell the compiler that it's commutative, would give it more leeway for optimization (and parallel execution). Thank you. Not commutative was the phrase I was looking for. -- Regards, Casey

Re: [Haskell-cafe] Stack ADT?

2010-02-05 Thread Casey Hawthorne
You could also implement stacks with mutable data structures, e.g. STArray, etc. What do you want to use a stack ADT for? Usually stacks are discussed for pedagogical purposes but usually recursion is used if you need a stack like operation. -- Regards, Casey

Re: [Haskell-cafe] Stack ADT?

2010-02-04 Thread Casey Hawthorne
On Thu, 4 Feb 2010 09:07:28 -0800 (PST), you wrote: Can't find a Stack datatype on Hoogle? Where should I look? Michael From Algorithms: a functional programming approach Second edition Fethi Rabhi Guy Lapalme data Stack a= EmptyStk

Re: [Haskell-cafe] Stack ADT?

2010-02-04 Thread Casey Hawthorne
On Thu, 4 Feb 2010 09:07:28 -0800 (PST), you wrote: Can't find a Stack datatype on Hoogle? Where should I look? Michael From Algorithms: a functional programming approach Second edition Fethi Rabhi Guy Lapalme To be more complete. module Stack(Stack,push,pop,top,emptyStack,stackEmpty)

[Haskell-cafe] Re: Why?

2009-12-10 Thread Casey Hawthorne
I have not read all/most of the replies. What material benefit does Haskell derive from being a pure functional language as opposed to an impure one? Please provide examples as I require instruction. A pure functional lanugage allows lazy evaluation, which adds another tool to your modularity

[Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread Casey Hawthorne
Are there major inefficiencies in Haskell compared to OCaml? If so, can something be done about them? -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] seems like I'm on the wrong track

2009-12-01 Thread Casey Hawthorne
Please check out Paul Hudak's page. http://cs-www.cs.yale.edu/homes/hudak-paul/ On Tue, 01 Dec 2009 17:01:29 -0800, you wrote: Perhaps someone could either (1) help me do what I'm trying to do, or (2) show me a better way. I have a problem that is very state-ful and I keep thinking of it as

[Haskell-cafe] Tips for a FFI-wrapped C library?

2009-11-30 Thread Casey Hawthorne
I would suspect that the IO Monad is to unsafe, maybe a more stringent monad would be more appropriate. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Partially applied functions

2009-11-29 Thread Casey Hawthorne
You can pattern match on the right hand side of '|' in a list comprehension, since a list comprehension is just the list monad. Just changed a few things. Hopefully this answers the OP's question and any interested others. add :: Int - Int - Int add x y = x + y -- a list of partially applied

Re: [Haskell-cafe] Partially applied functions

2009-11-28 Thread Casey Hawthorne
Will the following do what you wish? add :: Int - Int - Int add x y = x + y addends = [3,5,7,3,5,8]::[Int] add3s :: [Int] - [Int - Int] add3s addends = map add (filter (3==) addends) k3 :: [Int] k3 = map (\ f - f 10 ) (add3s addends) -- Regards, Casey

Re: [Haskell-cafe] Partially applied functions

2009-11-28 Thread Casey Hawthorne
Will the following do what you wish? add :: Int - Int - Int add x y = x + y addends = [3,5,7,3,5,8]::[Int] -- P for predicate addPs :: (Int - Bool) - [Int] - [Int - Int] addPs predicate addends = map add (filter predicate addends) kP :: [Int] kP = map (\ f - f 10 ) (addPs (3==) addends) --

Re: [Haskell-cafe] Partially applied functions

2009-11-28 Thread Casey Hawthorne
It sounds as if you want to carry some state around for each partially applied function, I think that's in monad territory. A cardinal rule of functional programming is to create new data, whenever possible. -- Regards, Casey ___ Haskell-Cafe mailing

[Haskell-cafe] Partially applied functions

2009-11-28 Thread Casey Hawthorne
You can pattern match on the right hand side of '|' in a list comprehension, since a list comprehension is just the list monad. add :: Int - Int - Int add x y = x + y -- a list of partially applied functions adds = [add 3, add 5, add 7, add 3, add 5, add 8] -- an example usage of the list kP

[Haskell-cafe] Reducing Latency - Reducing the Size of Larger Data Structures

2009-11-27 Thread Casey Hawthorne
An idea to reduce memeory latency, is to have a complex dual/quad/etc. core CPU surrounded by four or more simpler CPUs. The simpler CPUs have a simpler instruction set and do less context switching. So any operations (e.g. folding, filtering) that reduce the size of a larger data structure and

[Haskell-cafe] If you haven't bought any of Knuth's fascicles yet, this is definitely the one to get. Bitwise Tricks Techniques

2009-11-18 Thread Casey Hawthorne
If you haven't bought any of Knuth's fascicles yet, this is definitely the one to get. The Art of Computer Programming: Volume 4 Bitwise Tricks Techniques Binary Decision Diagrams Fascicle 1 Donald E. Knuth 2009 Describes basic broadword operations and an important class of data structures

Re: [Haskell-cafe] If you haven't bought any of Knuth's fascicles yet, this is definitely the one to get. Bitwise Tricks Techniques

2009-11-18 Thread Casey Hawthorne
, Casey Hawthorne cas...@istar.ca wrote: If you haven't bought any of Knuth's fascicles yet, this is definitely the one to get. The Art of Computer Programming: Volume 4 Bitwise Tricks Techniques Binary Decision Diagrams Fascicle 1 Donald E. Knuth 2009 Describes basic broadword operations

Re: [Haskell-cafe] Howto start a bigger project

2009-11-16 Thread Casey Hawthorne
What is this big project about? Why not use www.sourceforge.net? On Mon, 16 Nov 2009 21:15:44 +0100, you wrote: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will

Re: Re[2]: [Haskell-cafe] Howto start a bigger project

2009-11-16 Thread Casey Hawthorne
On Mon, 16 Nov 2009 23:43:49 +0300, you wrote: Hello Casey, Monday, November 16, 2009, 11:30:51 PM, you wrote: Why not use www.sourceforge.net? i strongly recommend http://code.google.com or http://codeplex.com SF is slow and olf-fashioned Just because a Scandinavian started it, doesn't mean

[Haskell-cafe] I'm also missing examples of library function and Hackage usage. Haskell Wiki?

2009-11-15 Thread Casey Hawthorne
I'm also missing examples of library function and Hackage usage. Where does one put up code on the Haskell Wiki? :) -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Where is a good place to place code like this, so if I may be so bold, people can learn from it?

2009-11-14 Thread Casey Hawthorne
Where is a good place to place code like this, so if I may be so bold, people can learn from it? {- Author Modifications:Casey Hawthorne Author Original: Jeff Newbern Maintainer: Casey Hawthorne cas...@istar.ca Maintainer?: Jeff Newbern jnewb...@nomaware.com Time-stamp

Re: [Haskell-cafe] Where is a good place to place code like this, so if I may be so bold, people can learn from it?

2009-11-14 Thread Casey Hawthorne
Hi Bulat: I believe Jeff's original idea was to show an example of a monad transformer stack and ASCII art output. On Sat, 14 Nov 2009 21:42:01 +0300, you wrote: Hello Casey, Saturday, November 14, 2009, 9:15:51 PM, you wrote: Where is a good place to place code like this, so if I may be so

Re: [Haskell-cafe] looking for a good algorithm

2009-11-13 Thread Casey Hawthorne
Sorry, I forgot to ask an important question. Is the table stored in a dense format as in complete rows and complete columns or in a sparse table format? The question is more about algorithm than Haskell. But I am going to code in Haskell which I am still learning. Suppose I have a large

Re: [Haskell-cafe] Pattern Matching

2009-11-13 Thread Casey Hawthorne
Thank you to all who replied, very instructive. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] looking for a good algorithm

2009-11-12 Thread Casey Hawthorne
To: Casey Hawthorne cas...@istar.ca Subject: Re: [Haskell-cafe] looking for a good algorithm From: Casey Hawthorne cas...@istar.ca Date: Thu, 12 Nov 2009 11:14:02 -0800 On third thought, convert the table to a 2D array of bits (or a 1D array of bits mapped to a 2D coordinate system). The bit

[Haskell-cafe] Why can I run (runghc) some Haskell scripts but I cannot seem to compile them?

2009-11-12 Thread Casey Hawthorne
Why can I run (runghc) some Haskell scripts but I cannot seem to compile them? e.g. http://www.haskell.org/all_about_monads/examples/example25.hs I've changed the import listing to the following: import IO import System import Monad import Data.Maybe import Data.List import Data.Char (toLower)

[Haskell-cafe] Why can I run (runghc) some Haskell scripts but I cannot seem to compile them?

2009-11-12 Thread Casey Hawthorne
Why can I run (runghc) some Haskell scripts but I cannot seem to compile them? e.g. http://www.haskell.org/all_about_monads/examples/example25.hs I've changed the import listing to the following: import IO import System import Monad import Data.Maybe import Data.List import Data.Char (toLower)

Re: [Haskell-cafe] Why can I run (runghc) some Haskell scripts but I cannot seem to compile them?

2009-11-12 Thread Casey Hawthorne
Shazam! Thank you! On Thu, 12 Nov 2009 15:13:47 -0500, you wrote: Did you try ghc --make? On Thu, Nov 12, 2009 at 3:12 PM, Casey Hawthorne cas...@istar.ca wrote: Why can I run (runghc) some Haskell scripts but I cannot seem to compile them? e.g. http://www.haskell.org/all_about_monads

[Haskell-cafe] Pattern Matching

2009-11-12 Thread Casey Hawthorne
Why in a pattern match like score (1 3) = 7 can I not have sizeMax = 3 score (1 sizeMax) = 7 -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] looking for a good algorithm

2009-11-11 Thread Casey Hawthorne
So, as I understand it, you have a very large sparse table, thousands of rows and hundreds of columns, of which each cell within a column of type String, Int, or Double can contain one of those types or nothing. Then you to want to shuffle the rows to maximize the number of columns whose first

Re: [Haskell-cafe] Area from [(x,y)] using foldl

2009-11-08 Thread Casey Hawthorne
How about these type signatures. import Data.List poly1 = [(0,1),(5,0),(3,4)]::[(Double,Double)] areaPoly :: [(Double,Double)] - Double areaPolyCalc :: (Double,(Double,Double)) - (Double,Double) - (Double,(Double,Double)) Spoiler Alert! -- Functions Below!

Re: [Haskell-cafe] Area from [(x,y)] using foldl

2009-11-08 Thread Casey Hawthorne
How about these BETTER type signatures. -- Area of a Polygon import Data.List type X = Double type Y = Double type Area = Double poly1 = [(0,1),(5,0),(3,4)]::[(X,Y)] areaPoly :: [(X,Y)] - Area areaPolyCalc :: (Area,(X,Y)) - (X,Y) - (Area,(X,Y)) Spoiler Alert! -- Functions

Re: [Haskell-cafe] Area from [(x,y)] using foldl

2009-11-08 Thread Casey Hawthorne
Sorry, I forgot to add that if the polygon is very far from the origin, you may have overflow or increased round off error; it is better to translate the polygon back to the origin, before doing the area calculation. How about these BETTER type signatures. -- Area of a Polygon import

Re: [Haskell-cafe] Area from [(x,y)] using foldl

2009-11-08 Thread Casey Hawthorne
the calculation, without evaluating more points. --- On Sun, 11/8/09, Casey Hawthorne cas...@istar.ca wrote: From: Casey Hawthorne cas...@istar.ca Subject: Re: [Haskell-cafe] Area from [(x,y)] using foldl To: haskell-cafe@haskell.org Date: Sunday, November 8, 2009, 5:44 PM Sorry, I forgot to add

Re: [Haskell-cafe] bit of help with n-ary please...

2009-11-08 Thread Casey Hawthorne
I don't know if this is homework. I suppose what you mean is the following: I'm trying to replace an element in an n-ary tree and display the completed tree. A more precise specification might help. - is the tree ordered - are all the elements in the leaves (not internal nodes) - is the location

[Haskell-cafe] Is there a way to embed a Haskell interpreter/compiler in a browser. I think this would be a safer language than JavaScript.

2009-10-25 Thread Casey Hawthorne
Is there a way to embed a Haskell interpreter/compiler in a browser. I think this would be a safer language than JavaScript. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Fwd: [Haskell-cafe] Haskell for Physicists

2009-09-30 Thread Casey Hawthorne
On Wed, 30 Sep 2009 21:24:11 +0200, you wrote: I?m a physicist, so I think they would be attracted by something like Haskell: high level physics modelling at Fortran speeds Haskell: mathematics beyond numerical calculus And, easier to make use of multi-core machines than threaded Fortran.

[Haskell-cafe] I read somewhere that for 90% of a wide class of computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language.

2009-09-29 Thread Casey Hawthorne
I read somewhere that for 90% of a wide class of computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language. If this is true, it needs to be pushed. And if by changing a few lines of source code one can develop a whole family of similar

Re: [Haskell-cafe] I read somewhere that for 90% of a wide class of computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language.

2009-09-29 Thread Casey Hawthorne
On Tue, 29 Sep 2009 18:19:08 -0700, you wrote: On Tue, Sep 29, 2009 at 5:24 PM, Casey Hawthorne cas...@istar.ca wrote: I read somewhere that for 90% of a wide class of computing problems, you only need 10% of the source code in Haskell, that you would in an imperative language

Re: [Haskell-cafe] Doing people's homework?

2009-09-28 Thread Casey Hawthorne
If you do a student's homework, you are cheating that student out of an education. He/She may realize that t late in the future. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Cal, Clojure, Groovy, Haskell, OCaml, etc.

2009-09-28 Thread Casey Hawthorne
I think a language needs the following to exist: - a community - good library - a package manager Thoughts? -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Cal, Clojure, Groovy, Haskell, OCaml, etc.

2009-09-28 Thread Casey Hawthorne
On Tue, 29 Sep 2009 12:25:30 +1000, you wrote: I think one must distinguish what it means for a language to exist and be practical. Counter-example: Java fails catastrophically at all three and it most certainly exists; boy do I know it. QOTM! Casey Hawthorne wrote: I think a language needs

Re: [Haskell-cafe] Cal, Clojure, Groovy, Haskell, OCaml, etc.

2009-09-28 Thread Casey Hawthorne
On Mon, 28 Sep 2009 21:50:14 -0500, you wrote: Good libraries are not enough for a language to go beyond mere existence. There must exist good documents, i.e., good tutorials, good books, and good explanations and examples in the libraries, etc, that are easy for people to learn and use. In my

Re: [Haskell-cafe] Cal, Clojure, Groovy, Haskell, OCaml, etc.

2009-09-28 Thread Casey Hawthorne
On Mon, 28 Sep 2009 21:50:14 -0500, you wrote: Good libraries are not enough for a language to go beyond mere existence. There must exist good documents, i.e., good tutorials, good books, and good explanations and examples in the libraries, etc, that are easy for people to learn and use. In my

Re: [Haskell-cafe] 16 bit floating point data in Haskell?

2009-09-27 Thread Casey Hawthorne
I think a 16-bit float type would require compiler revisions as opposed to doing something within the present type classes. This is similar to how Java would benefit from an unsigned byte primitive type for processing images, etc., whereas Haskell already has Word8. -- Regards, Casey

Re: [Haskell-cafe] 16 bit floating point data in Haskell?

2009-09-27 Thread Casey Hawthorne
On Mon, 28 Sep 2009 12:06:47 +1300, you wrote: On Sep 28, 2009, at 9:40 AM, Olex P wrote: Hi, Yes, I mean sizeOf 2. It's useful not only on GPUs but also in normal software. Think of huge data sets in computer graphics (particle clouds, volumetric data, images etc.) Some data (normals,

[Haskell-cafe] How does one delare a 2D STUArray in Haskell?

2009-09-25 Thread Casey Hawthorne
How does one delare a 2D STUArray in Haskell? I see the following from a diffusion program segment: module Diffusion where import Data.Array import Data.List (sortBy) type VFieldElem = Float type VField = Array (Int,Int) VFieldElem snip zeros = listArray ((1,1),(imax,jmax)) (repeat 0)

Re: [Haskell-cafe] How does one delare a 2D STUArray in Haskell?

2009-09-25 Thread Casey Hawthorne
Well that makes sense, but for a learner, how is he/she supposed to know that 'i' could be '(i,i)' or for that matter a tuple of n of those i's? STUArray s i e Could you also have a tuple of states? Obviosly, 'e' could be a tuple, for instance (Int,Char) -- Regards, Casey

Re: [Haskell-cafe] Strong duck typing / structural subtyping / type class aliases / ??? in Haskell

2009-09-25 Thread Casey Hawthorne
On Fri, 25 Sep 2009 23:25:21 +0200, you wrote: On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish jvran...@gmail.com wrote: Supposedly OCaml has an OO feature that does this but I haven't tried it out. Indeed, OCaml has stuctural polymorphism, it's a wonderful feature. *# let f myobj = myobj#foo

Re: [Haskell-cafe] Strong duck typing / structural subtyping / type class aliases / ??? in Haskell

2009-09-25 Thread Casey Hawthorne
On Fri, 25 Sep 2009 23:25:21 +0200, you wrote: On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish jvran...@gmail.com wrote: Supposedly OCaml has an OO feature that does this but I haven't tried it out. Indeed, OCaml has stuctural polymorphism, it's a wonderful feature. *# let f myobj = myobj#foo

Re: [Haskell-cafe] line intersection code

2009-09-21 Thread Casey Hawthorne
Posting small packages like that on Hackage is a good way for others to learn Haskell. Is a record kept of suggested changes on Hackage? -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Do I have this right? Remembering Memoization!

2009-09-13 Thread Casey Hawthorne
Do I have this right? Remembering Memoization! For some applications, a lot of state does not to be saved, since initialization functions can be called early, and these functions will remember - (memoize) their results when called again, because of lazy evaluation? -- Regards, Casey

[Haskell-cafe] Haskell#? F#?

2009-09-13 Thread Casey Hawthorne
The other morning, someone was telling me they had converted most of their VB financial/stock market code to F#. Whereas VB only used one core, the F# code used all four cores. In one software developers meeting, someone was saying that since database work is mostly all state, he didn't see the

[Haskell-cafe] Haskell#? F#?

2009-09-13 Thread Casey Hawthorne
The other morning, someone was telling me they had converted most of their VB financial/stock market code to F#. Whereas VB only used one core, the F# code used all four cores. In one software developers meeting, someone was saying that since database work is mostly all state, he didn't see the

[Haskell-cafe] Uncontrolled Concurrency, isn't that concept now thread-bare?

2009-08-16 Thread Casey Hawthorne
-- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell on JVM

2009-06-26 Thread Casey Hawthorne
Since the JVM doesn't seem to support tail call optimization, I suppose one could could directly manipulate the bytecodes generated by jhc to do TCO. One challenge would be the garbage collector, since Haskell and Java have very different working sets of what is still being used. -- Regards,

Re: [Haskell-cafe] Need some help with an infinite list

2009-06-16 Thread Casey Hawthorne
On Wed, 17 Jun 2009 00:45:56 -0400, you wrote: And here's a version along similar lines that avoids (++) for greater sharing and efficiency: let sss = [] : [ [ c:s | c - ['a'..'z'], s - ss ] | ss - sss ] in concat (tail sss) Sheer genius! I just inverted it since I like to see the main

[Haskell-cafe] When folding is there a way to pick out the last point being processed?

2009-06-11 Thread Casey Hawthorne
When folding is there a way to pick out the last point being processed? The first point can easily be picked out with (x:xs) but last xs crawls down the list. -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] The Q Programming Language can do symbolic manipulation -- Haskell?

2006-08-15 Thread Casey Hawthorne
The Q Programming Language can do symbolic manipulation -- Haskell? The Q Programming Language can do the following: sqr X = X*X ==sqr 5 25 ==sqr (X+1) (X+1)*(X+1) Can Haskell do symbolic manipulation? Or are term-rewriting and the lambda calculus sufficiently far enough apart concepts? --