[Haskell-cafe] Is the following implemented by a sparse matrix representation? type Graph n w = Array (n, n) (Maybe w)

2013-07-09 Thread KC
type Graph n w = Array (n,n) (Maybe w) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is the following implemented by a sparse matrix representation? type Graph n w = Array (n, n) (Maybe w)

2013-07-10 Thread KC
ething like "IntMap > (IntMap w)" or "Map (n,n) w" or "Array n (IntMap w)". Each of these > representations is slightly different, and there will be different > trade-offs. > > > Twan > > On 09/07/13 23:26, KC wrote: > > Is the following

[Haskell-cafe] There was someone here going to use REPA and a functional way to find eigenvalues :)

2013-07-11 Thread KC
Have you succeeded? In general, is there a functional way to do matrix manipulations? Linear algebra? Linear programming? Integer Programming? Numerical Analysis? Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

[Haskell-cafe] Do combinatorial algorithms have a matroid strucutre XOR non-matroid structure?

2013-07-11 Thread KC
I ask this on this mailing list because there are quite a few mathematically oriented people here. Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] memoization

2013-07-22 Thread KC
oes > "memoized_fib 10001"). > > Could someone explain the technical details of why this works? Why is "map > fib [0 ..]" not recalculated every time I call memoized_fib? > > ___ > Haskell-

Re: [Haskell-cafe] Alternative name for return

2013-08-05 Thread KC
tinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe> >> >> > > ______**_ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe> > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Poll & plea: State of GUI & graphics libraries in Haskell

2013-09-26 Thread KC
to replies. Thanks, > > -- Conal > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Are side effects necessary is a non question; you compute so as to change the state of the world.

2012-03-16 Thread KC
Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] The Theoretical Question would be; are side effects necessary for computational heavy lifting.

2012-03-16 Thread KC
Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-16 Thread KC
rency, or does >it? > > > Jerzy Karczmarczuk > What does referential transparency mean to you? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-17 Thread KC
Apparently on such solid ground that you hinder their critical thinking skills by answering for them. On Fri, Mar 16, 2012 at 9:24 PM, Donn Cave wrote: > Quoth KC , > >> On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk >> wrote: >> >>> ... but the questi

[Haskell-cafe] In Haskell, because of the fine layers of abstraction that are possible, it pays to hone one's critical thinking skills.

2012-03-17 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] In an imperative language, commands & fulling memory cells is easy, but gives the false impression that S/W engineering is easy.

2012-03-17 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-05 Thread KC
tical Programming but optimization in language constructs. You might want to take a look at MIN by Stephen Tse. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] why are applicative functors (often) faster than monads? (WAS Google Summer of Code - Lock-free data structures)

2012-04-20 Thread KC
Think of the differences (and similarities) of Applicative Functors and Monads and the extra context that monads carry around. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] why are applicative functors (often) faster than monads? (WAS Google Summer of Code - Lock-free data structures)

2012-04-20 Thread KC
y, but that is probably hard in general. > > b > > On Apr 20, 2012, at 2:54 PM, KC wrote: > > > Think of the differences (and similarities) of Applicative Functors and > Monads and the extra context that monads carry around. > > > >

[Haskell-cafe] Is it only one data structure per ST monad?

2012-04-23 Thread KC
Is it only one data structure per ST monad? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] (no subject)

2012-04-23 Thread KC
buildPair = do arr <- newArray ((1,1),(1,10)) 37 :: ST s (STArray s (Int,Int) Int) a <- readArray arr (1,1) writeArray arr (1,1) 64 b <- readArray arr (1,1) return (a,b) main = print $ runST buildPair -- -- Re

[Haskell-cafe] The last statement in a 'do' construct must be an expression: a <- readArray arr (1, 1)

2012-04-23 Thread KC
unST buildPair -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] The last statement in a 'do' construct must be an expression: a <- readArray arr (1, 1)

2012-04-23 Thread KC
Thank you, that was it. I was mixing up and tabs and spaces. I expected new versions of NotePad++ to keep my old settings. On Mon, Apr 23, 2012 at 1:54 PM, Ryan Yates wrote: > Perhaps you are mixing tabs and spaces? > > On Mon, Apr 23, 2012 at 4:52 PM, KC wrote: > >> I&#

[Haskell-cafe] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread KC
pe declaration. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread KC
Thank you. One is ONLY supposed to supply the list elements for "newListArray" which fill the array in increasing order. On Tue, Apr 24, 2012 at 3:21 PM, Kevin Charter wrote: > On Tue, Apr 24, 2012 at 3:20 PM, KC wrote: > >> initIdentityMat :: Int -> ST s (STUArr

[Haskell-cafe] From some "High-Performance Computing" book; "It is hard to eradicate from C++'ers the need for objects, classes, etc. ..."

2012-05-22 Thread KC
speed of C (i.e. C++ without most of the software engineering abstractions). Still, I remember that quote that, "Another level of indirection solves everything." Or If you're Penn & Teller, "Another level of misdirection solves every

[Haskell-cafe] Found quote: "One of the ineradicable illusions about C++ is that the compiler should be able to see through ...

2012-05-22 Thread KC
plexity management features of Haskell; they should be comparable. :) Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread KC
exponentiation and logarithm. So, I believe this C++ versus Haskell versus (your language of choice) is a Penn & Teller misdirection. Whereas, another level of indirection solves everything. -- -- Regards, KC ___ Haskell-Cafe mailing list Has

Re: [Haskell-cafe] How to select n random words from a file ...

2012-06-10 Thread KC
An interesting related problem is if you are only allowed one pass through the data how would you randomly choose one word. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] [Haskell-beginners] Function application versus function composition performance

2012-06-19 Thread KC
ptimised - maybe by > replacing all functions applications with composition and then > simplifying? Or maybe the simplifying/optimisation step never > happens? As you can see I'm just guessing at things :-) But it's > nice to wonder. > > Many thanks for

[Haskell-cafe] Is there a GHC flag that will allow mutable top level state while you are debugging and then ...

2012-07-05 Thread KC
you can turn the flag off when you are ready to do the computational heavy lifting so that you don't have to modify your code base? That is, GHC can then apply its algebraic transformation optimizations to the "code algebra" of the pure functions. --

Re: [Haskell-cafe] Best way to build a GHC backend?

2012-07-07 Thread KC
s will become irrelevant. > (with the exception of C, of course). > > Thoughts? > > --J Arthur > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] There is some article mentioning that FP is mainly good for mathematical and list programming.

2012-07-10 Thread KC
instead of 18 wheels I have only 17 wheels. :D -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell-beginners] Graph Coloring Library?

2012-07-14 Thread KC
this is research code). > > The graphs are pretty small in general, all my test cases will have < 10 > nodes, but have high connectivity. They don't have any special properties. > On Jul 14, 2012 2:50 PM, "KC" wrote: > >> Are you looking for an exact or approximate

Re: [Haskell-cafe] [Haskell-beginners] Graph Coloring Library?

2012-07-14 Thread KC
t; Beginners mailing list > beginn...@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] I can see lists "working" for matrix algorithms if the access patterns are mostly from the start or end of rows and columns.

2012-07-15 Thread KC
Are there any such matrix algorithms that operate mainly from the start or end or rows and columns? Note: If the access pattern starts from the end of a row then one stores the row in reverse order in a list. -- -- Regards, KC ___ Haskell-Cafe mailing

[Haskell-cafe] The following is supposed to be initializing a 2D array but it doesn't seem to work.

2012-07-31 Thread KC
ll I am getting is this: array ((1,5),(1,5)) [((1,5),1.0)] Maybe the behaviour of ghc was changed since the article was written. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] The following is supposed to be initializing a 2D array but it doesn't seem to work.

2012-07-31 Thread KC
That was it! On Tue, Jul 31, 2012 at 3:34 PM, Jan-Willem Maessen wrote: > > > On Tue, Jul 31, 2012 at 5:52 PM, KC wrote: > >> All I am getting is this: >> >> array ((1,5),(1,5)) [((1,5),1.0)] >> >> Maybe the behaviour of ghc was changed since the artic

Re: [Haskell-cafe] [Haskell-beginners] vector indexing time

2012-08-03 Thread KC
ly up to the element that you > actually demand. > > The linear time you're seeing is not the result of an inefficiency of > vector indexing, but the result of an efficiency in vector creation. > > > Best regards, > Heinrich Apfelmus > > -- >

[Haskell-cafe] Why is the the transpose function in Data.List more complicated?

2012-08-03 Thread KC
]] -> [[b]] transp ([]:_) = [] transp rows = map head rows : transp (map tail rows) Why is the the transpose function in Data.List more complicated? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell

[Haskell-cafe] I use "cabal install repa" but then WinGHCi says module Data.Array.Rep.Algorithms.Ramdomish not found.

2012-08-12 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] I use "cabal install repa" but then WinGHCi says module Data.Array.Rep.Algorithms.Ramdomish not found.

2012-08-13 Thread KC
gt; I think you need to install repa-algorithms. > > On 13 August 2012 04:18, KC wrote: >> -- >> -- >> Regards, >> KC >> >> ___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http

[Haskell-cafe] For consistency; it would be better if the import statement matched the cabal install statement or :m form.

2012-08-14 Thread KC
:m +Data.Array.Repa.Algorithms.Randomish cabal install repa.algrothms would be more consistent. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Does someone have a compiled binary of the LLVM for Windows 7 or must one compile the source?

2012-08-15 Thread KC
I just want to get started on some matrix operations with REPA. Or is there a library (package?) like REPA without using the LLVM? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Does someone have a compiled binary of the LLVM for Windows 7 or must one compile the source?

2012-08-18 Thread KC
Thank you It involves going to - \cabal\packages\hackage.haskell.org\repa-algorithms\3.2.1.1\repa-algorithms-3.2.1.1 - making the cabal file changes - re-tar-ing - re-gzip-ing On Wed, Aug 15, 2012 at 6:29 PM, Ivan Lazar Miljenovic wrote: > On 16 August 2012 11:21, KC wrote: >&g

[Haskell-cafe] Is it worth adding Gaussian elimination and eigenvalues to REPA?

2012-08-31 Thread KC
I realize if one wants speed you probably want to use the hMatrix interface to GSL, BLAS and LAPACK. Worth it in the sense of have a purely functional implementation. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] hstats median algorithm

2012-09-01 Thread KC
t; > Cheers, > Gershom > > > On 9/1/12 3:26 PM, David Feuer wrote: >> >> The median function in the hstats package uses a naive O(n log n) >> algorithm. Is there another package providing an O(n) option? If not, >

[Haskell-cafe] Haskell seems setup for iterative numerics; i.e. a standard example is Newton's method where lazy evaluation ...

2012-09-05 Thread KC
separates control from computation. It seems as if Haskell would be better for iterative matrix methods rather than direct calculation. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Haskell seems setup for iterative numerics; i.e. a standard example is Newton's method where lazy evaluation ...

2012-09-05 Thread KC
The REPA package/library doesn't have LU factorization, eigenvalues, etc. On Wed, Sep 5, 2012 at 12:59 PM, Carter Schonwald wrote: > Hello KC, > you should check out the Repa library then and see how it works for you. > Cheers > -Carter > > On Wed, Sep 5, 2012

[Haskell-cafe] One of the new buzz phrases is "Event-Sourcing"; is Haskell suitable for this?

2012-09-29 Thread KC
http://martinfowler.com/eaaDev/EventSourcing.html http://martinfowler.com/articles/lmax.html -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] If I want to make a pure Haskell eigenvalue, etc. package without calling to LAPACK, etc ...

2012-09-29 Thread KC
What are some good basis (pun intended) to start from? e.g. REPA? or ? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Monads

2012-09-29 Thread KC
ll.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] What is a functional approach to linear algebra routines? I see REPA warns that one must use fusion or risk slow routines.

2012-10-04 Thread KC
Apparently using STUarrays in an imperative fashion is fraught with peril (and the performance of molasses). Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Tutorial: Haskell for the Evil Genius

2012-10-13 Thread KC
The latest Haskell Platform is 2012.2.0.0 You are apparently running a much older version. >> #!"c:/Program Files/Haskell Platform/2010.2.0.0/bin/" runhaskell -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@

Re: [Haskell-cafe] code length in Haskell, a comparison

2012-11-19 Thread KC
t;Pascal 1.86 >Fortran 2.33 >C++ 2.58 >C4.09 > --- > > _______ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...

2012-11-19 Thread KC
Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language (or generate bytecode) to access the Java class libraries when needed? Or Is there a way for a JVM language or bytecode to call Haskell when needed? -- -- Regards, KC

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-22 Thread KC
I believe the question you are asking is why do large software systems need to be designed in terms of levels or some other software engineering construct(s). To manage their complexity as opposed to getting mangled in their complexity. :D -- -- Regards, KC

[Haskell-cafe] To "cabal install cabal-install" on Windows ...

2012-11-22 Thread KC
install process (or hanging it) is the thrashing of your hard drive to find all the little file fragments it needs during the install Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] How to incrementally update list

2012-11-30 Thread KC
t; managable. > > Is there some solution to this problem as I think it is rather > common? > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > --

Re: [Haskell-cafe] Why is boxed mutable array so slow?

2012-12-01 Thread KC
a 0 > ps a 1 n k > where > ps a i n s > | i > n = return () > | otherwise = do > k <- unsafeRead a i > let !l = fromIntegral $ s + k > unsafeWrite a i l > ps a (i+1) n l > > data' :: [Int32] > data' = [k + k `div` 3 | k <- [0..] ] > > sum' = scanl1 (+) > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Are there REPA linear algebra routines? e.g. Eigenvalues?

2012-12-05 Thread KC
:) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Is http://hackage.haskell.org/packages/hackage.html having a challenging serving up archive.tar?

2013-01-09 Thread KC
:) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Mobile app development?

2013-01-19 Thread KC
> Cheers, > > Andrew Pennebaker > www.yellosoft.us > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Mobile app development?

2013-01-19 Thread KC
g point. Can we please prioritize mobile support? I'd much >> > rather write everything in ML than PhoneGap. >> > >> > -- >> > Cheers, >> > >> > Andrew Pennebaker >> > www.yellosoft.us >> > >> > ___ >> > Haskell-Cafe mailing

[Haskell-cafe] Will Haskell Platform 2012.4.0.0 uninstall cleanly for the installation of 2013.2.0.0

2013-04-11 Thread KC
:) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Computational Physics in Haskell

2011-03-30 Thread KC
ol of Science and Engineering, > Lahore University of Management Sciences, > Lahore, Pakistan > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailm

Re: [Haskell-cafe] Stacking data types

2011-04-06 Thread KC
h extensions (ScopedTypeVariables, >> UndecidableInstances, IncoherentInstances...) I can't get it working. >> >> Has someone a simpler way to achieve modular types? > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Is there a way to find out the type inferred for a local function inside another function? :)

2011-04-07 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Emscripten: compiling LLVM to JavaScript

2011-04-11 Thread KC
-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Adjoint Folds and Unfolds Or: Scything through the Thicket of Morphisms

2011-04-18 Thread KC
6120, Mathematics of Program Construction, Pages 195-228 -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Adjoint Folds and Unfolds Or: Scything through the Thicket of Morphisms

2011-04-18 Thread KC
6120, Mathematics of Program Construction, Pages 195-228 -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Errata for "Pearls of Functional Algorithm Design" by Richard Bird, 2010, page 25 #Haskell

2011-04-18 Thread KC
(False, False)-> search (k-(my-ly)-1) (lx,rx) (my+1,ry) where mx = (lx+rx) `div` 2 my =

Re: [Haskell-cafe] Good reads?

2011-04-27 Thread KC
;> >> -- >> Edward Amsden >> Student >> Computer Science >> Rochester Institute of Technology >> www.edwardamsden.com >> >> ___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.or

Re: [Haskell-cafe] For Project Euler #1 isn't it more efficient to generate just the numbers you need?

2011-05-07 Thread KC
;>    | otherwise = x : xs `merge` ys >> >> >> >> ___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe &

Re: [Haskell-cafe] For Project Euler #1 isn't it more efficient to generate just the numbers you need?

2011-05-07 Thread KC
Got it. You mean use the formula for summing an arithmetic progression twice and take account of duplicates. Sheer genius! On Sat, May 7, 2011 at 11:56 AM, Eugene Kirpichov wrote: > One doesn't have to touch them to compute their sum. > > 2011/5/7 KC : >> Do you

Re: [Haskell-cafe] For Project Euler #24 you don't need to generate all the lexicographic permutations

2011-05-08 Thread KC
I see from the solutions on Project Euler others did think of this way but at least on my last IQ test I did get an 'A'; 95. I am a jenius. :D -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

Re: [Haskell-cafe] Division: Is there a way to simultaneously find the quotient and remainder?

2011-05-14 Thread KC
/www.haskell.org/haskellwiki/Haskell_programming_tips#Forget_about_quot_and_rem > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- -- Regards, KC ___

[Haskell-cafe] Is there an efficient way to generate Euler's totient function for [2, 3..n]?

2011-05-14 Thread KC
Is there an efficient way to generate Euler's totient function for [2,3..n]? Or an arithmetical sequence? Or a geometric sequence? Or some generalized sequence? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Is there an efficient way to generate Euler's totient function for [2, 3..n]?

2011-05-14 Thread KC
May 14, 2011 at 10:29 AM, Warren Henning wrote: > On Sat, May 14, 2011 at 10:22 AM, KC wrote: >> Is there an efficient way to generate Euler's totient function for [2,3..n]? >> >> Or an arithmetical sequence? >> >> Or a geometric sequence? >> >&

[Haskell-cafe] I cannot find the module Data.Numbers.Primes

2011-05-17 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] I cannot find the module Data.Numbers.Primes

2011-05-17 Thread KC
fisch/primes > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] why doesn't ghc give you a type signature that works ?

2011-05-17 Thread KC
ng this happens to me quite a lot, and I've never tried to > understand what's going on, because the signature is not required.  I've > decided to try now :-) > > Obviously I'll need some help. > > Thanks, > > Brian > &g

[Haskell-cafe] For Euler 25; What is the first term in the Fibonacci sequence to contain 1000 digits?; the following seems to work.

2011-05-19 Thread KC
t 5 :: Double phi = (1 + sq5) / 2 -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-19 Thread KC
> Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Is there a place where we can have a discussion on the merits of various GUI's & various graphics? And then vote?

2011-05-20 Thread KC
:) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is there a place where we can have a discussion on the merits of various GUI's & various graphics? And then vote?

2011-05-20 Thread KC
So we can get this "show" on the road. Pun intended. :D On Fri, May 20, 2011 at 12:20 PM, KC wrote: > :) > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] "In several chapters there is a penetrating conceptual analysis of the matter at hand, on which a superstructure of code is erected."

2011-05-20 Thread KC
Interesting comment on the book "The Fun of Programming" in JOOP. "In several chapters there is a penetrating conceptual analysis of the matter at hand, on which a superstructure of code is erected." -- -- Regards, KC ___ Haske

[Haskell-cafe] Extension for "Pearls of Functional Algorithm Design" by Richard Bird, 2010, page 25 #Haskell

2011-05-20 Thread KC
a) -> ((Int,Int,Int),(Int,Int,Int),(Int,Int,Int)) -> a smallest3h k (xa,ya,za) ((lx,mx,rx),(ly,my,ry),(lz,mz,rz)) = case (k<=mx-lx+my-ly+mz-lz) of (True)-> search3 k (xa,ya,za) (lx,rx) (ly,ry) (lz,mz) (False) -> search3 (k-(mx-lx)-1) (xa,ya,za) (mx+1

Re: [Haskell-cafe] Is there an efficient way to generate Euler's totient function for [2, 3..n]?

2011-05-22 Thread KC
> It's declarative and may help to verify more efficient implementations. WOW! Good insight. :) On Sun, May 22, 2011 at 9:27 AM, Henning Thielemann wrote: > Daniel Fischer schrieb: > >> On Saturday 14 May 2011 19:38:03, KC wrote: >>> Instead of finding the toti

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread KC
Librarians have been struggling for years with classifying topics; I don't imagine classifying coding libraries as any easier. :) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/lis

[Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

2011-06-05 Thread KC
If new intermediate classes crop up then there would be no point in fixing class (Applicative m) => Monad m where since it would have to be changed if new intermediate classes are found. I realize non-existence proofs are hard. -- -- Regards,

[Haskell-cafe] I'm trying to install the Haskell Platform on a Mac and ...

2011-06-05 Thread KC
I'm trying to install the Haskell Platform on a Mac and I've already installed Xcode 3.2.6 but the platform says that the tools are not installed. Do I need to reboot? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskel

Re: [Haskell-cafe] I'm trying to install the Haskell Platform on a Mac and ...

2011-06-05 Thread KC
Never mind. I didn't realize there were two steps: - clicking on the dmg file - then actualling installing the software On Sun, Jun 5, 2011 at 1:20 PM, KC wrote: > I'm trying to install the Haskell Platform on a Mac and I've already > installed Xcode 3.2.6 but the platfor

[Haskell-cafe] OK! I have a Mac with Snow Leopard 10.6.7?, Xcode 3.2.6, Haskell Platform 2011.2.0.1; What are 2or 3 ways so far to get a GUI & graphics?

2011-06-05 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

2011-06-06 Thread KC
On Mon, Jun 6, 2011 at 9:19 AM, Brent Yorgey wrote: > On Sun, Jun 05, 2011 at 12:51:47PM -0700, KC wrote: >> If new intermediate classes crop up then there would be no point in fixing >> >> class (Applicative m) => Monad m where >> >> since it would have to be

[Haskell-cafe] In ML books; functors only consume & produce structures; whereas, functions C&P values.

2011-06-10 Thread KC
I've never seen such an easy description in Haskell books. Is there more going on with Haskell functors? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Dead else branch does influence runtime?

2011-06-14 Thread KC
hat can I do to circumvent the problem? > (Perhaps write some RULES magic?) > > Thanks - J.W. > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/lis

Re: [Haskell-cafe] Dead else branch does influence runtime?

2011-06-14 Thread KC
ap' = div cap 2 >                 v1 = work cap' e s1 >                 v2 = work cap' e s2 >                 v = g v1 v2 >             in par v1 $ pseq v2 $ v > > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Can one drop GHC 7.0.4 into the Haskell Platform or does the platform need to be updated?

2011-06-16 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell: The Craft of Functional Programming 3rd ed is out.

2011-06-16 Thread KC
http://www.haskellcraft.com/craft3e/Home.html -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread KC
pick the low hanging fruit first. > > > Best regards, > Heinrich Apfelmus > > -- > http://apfelmus.nfshost.com > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] For class Monoid; better names than mempty & mappend might have been: mid (mident) & mbinop

2011-07-23 Thread KC
It would be easier for beginners to "grok". -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] For class Monoid; better names than mempty & mappend might have been: mid (mident) & mbinop

2011-07-24 Thread KC
e at it, what's with that weird name >"Monoid" anyway, let alone "Functor", "Monad", etc.? ;-) Ivan: I had thought those were words expressing valid mathematical concepts. In order to find similarities between apparently different operations & data one w

  1   2   >