I'd like to emphasize that there is a precedent to non-recursive let
in the world of (relatively pure) lazy functional programming.
The programming language Clean has such non-recursive let and uses
it and the shadowing extensively. They consider shadowing a virtue,
for uniquely typed data.
oleg at okmij.org writes:
...
In Haskell I'll have to uniquely number the s's:
let (x,s1) = foo 1 [] in
let (y,s2) = bar x s1 in
let (z,s3) = baz x y s2 in ...
and re-number them if I insert a new statement.
I once wrote about 50-100 lines of code with the
Hi café.
I've come up with a little version of 'uniq' that should take into account
md5 sums of the file changes... In essence, this:
main :: IO ()
main = getContents
= mapM check . lines -- PROBLEM
= mapM_ (putStrLn . ( -- ++ )) . strip
check :: String - IO (String, ABCD)
check s =
Mark Lentczner wrote:
I'm a little lost in the bewildering array of music packages for Haskell,
and need some help.
I'm looking to recreate one of my algorithmic music compositions from the
1980s. I can easily code the logic in Haskell.
I'm looking for a the right set of packages and SW so
On Wed, Jul 10, 2013 at 3:47 AM, o...@okmij.org wrote:
Jon Fairbairn wrote:
It just changes forgetting to use different variable names because of
recursion (which is currently uniform throughout the language) to
forgetting to use non recursive let instead of let.
Let me bring to the
By analogy to ML, which has let and let rec, where the latter
corresponds to Haskell's let, one is led to let nonrec. I
would definitely not like shadow, for it means that new
variable does NOT cast a shadow on its definining expression.
I fear also that let nonrec by any name would introduce
Currently I'm creating a small library and I wanted to create tests for it.
So I have a library section in cabal file and also a test-suite section.
Everything goes well but when I tried to load file with tests into ghci
(actually it was a REPL in emacs) I received errors stating that GHCi can
The onlys solution I see at the moment is to get rid of cabal-dev and
install dependencies globally (which works quite OK with gentoo-haskell)
Kind regards,
Kirill Zaborsky
четверг, 11 июля 2013 г., 15:55:15 UTC+4 пользователь Kirill Zaborsky
написал:
Currently I'm creating a small library
On Thu, Jul 11, 2013 at 3:44 AM, John Lato jwl...@gmail.com wrote:
Hi Michael,
I don't think those are particularly niche cases, but I still think this
is a bad approach to solving the problem. My reply to Erik explicitly
covers the worker thread case, and for running arbitrary user code
On Thu, Jul 11, 2013 at 10:56 AM, Michael Snoyman mich...@snoyman.com wrote:
The only
approach that handles the situation correctly is John's separate thread
approach (tryAll3).
I think you meant tryAll2 here. Got me confused for some time =).
Cheers,
--
Felipe.
Yup. Nested cases *are* non recursive lets.
(Can't believe I forgot about that )
On Thursday, July 11, 2013, Edward Kmett wrote:
On Wed, Jul 10, 2013 at 3:47 AM, o...@okmij.org javascript:_e({},
'cvml', 'o...@okmij.org'); wrote:
Jon Fairbairn wrote:
It just changes forgetting to use
On 07/10/2013 11:44 PM, Ertugrul Söylemez wrote:
A very simple way to do this is to use integralLim_ instead of
integral_. It allows the ball itself to handle the bouncing. A less
invasive way (i.e. you can add it to your example) is to use the (--)
combinator:
ball = integral_ 0 .
On Thu, Jul 11, 2013 at 6:07 PM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
On Thu, Jul 11, 2013 at 10:56 AM, Michael Snoyman mich...@snoyman.com
wrote:
The only
approach that handles the situation correctly is John's separate thread
approach (tryAll3).
I think you meant
Hello Cafe,
I have
data CmpFunction a = CF (a - a - Bool)
that contains comparing functions, like ==, , ..., and I'm trying to declare
the Show instance for it like this
instance Show (CmpFunction a) where
show (CF (==)) = ==-- no good
show f = case
On Thu, Jul 11, 2013 at 1:33 PM, Vlatko Basic vlatko.ba...@gmail.comwrote:
data CmpFunction a = CF (a - a - Bool)
that contains comparing functions, like ==, , ..., and I'm trying to
declare the Show instance for it like this
instance Show (CmpFunction a) where
show (CF
Fellow Haskellers,
We are looking to hire a Haskell expert to work with us at Well-Typed as
a Haskell developer. This is an exciting opportunity for someone who is
passionate about Haskell and who is keen to improve and promote Haskell
in a professional context.
The role is quite general and
On 07/11/2013 07:33 PM, Vlatko Basic wrote:
Hello Cafe,
I have
data CmpFunction a = CF (a - a - Bool)
that contains comparing functions, like ==, , ..., and I'm trying to
declare the Show instance for it like this
instance Show (CmpFunction a) where
show (CF (==)) = ==
Original Message
Subject: Re: [Haskell-cafe] Comparing functions
From: Brandon Allbery allber...@gmail.com
To: Vlatko Bašić vlatko.ba...@gmail.com
Cc: Haskell-Cafe haskell-cafe@haskell.org
Date:
* Vlatko Basic vlatko.ba...@gmail.com [2013-07-11 19:33:38+0200]
Hello Cafe,
I have
data CmpFunction a = CF (a - a - Bool)
that contains comparing functions, like ==, , ..., and I'm trying
to declare the Show instance for it like this
instance Show (CmpFunction a) where
On Thu, Jul 11, 2013 at 10:50 AM, Brandon Allbery allber...@gmail.comwrote:
... but functions don't have an Eq instance, and *can't* have one.
Not a general one that's interesting.
There are two Eq instances that'll compile for all functions (not that it's
advisable):
instance Eq ((-) a b)
On Thu, Jul 11, 2013 at 2:11 PM, Vlatko Basic vlatko.ba...@gmail.comwrote:
The problem here isn't quite what you think it is; (==) is not a
constructor, therefore it is a *variable*. It's exactly the same problem as
a = 5
-- ...
foo a = 3 -- this does NOT compare with the
Original Message
Subject: Re: [Haskell-cafe] Comparing functions
From: Brandon Allbery allber...@gmail.com
To: Vlatko Bašić vlatko.ba...@gmail.com
Cc: Haskell-Cafe haskell-cafe@haskell.org
Date:
On Thu, Jul 11, 2013 at 2:58 PM, Vlatko Basic vlatko.ba...@gmail.comwrote:
Hm, I thought it is a pattern match with constant, as in f ('a':xs) ==
I wonder what you'd make of this definition, then?
(*) `on` f = \x y - f x * f y
According to the enlightenment above, I'd say (*) is a
Original Message
Subject: Re: [Haskell-cafe] Comparing functions
From: Brandon Allbery allber...@gmail.com
To: Vlatko Bašić vlatko.ba...@gmail.com
Cc: Haskell-Cafe haskell-cafe@haskell.org
Date:
Note that for non-recursive lets
let' x1 = e1
x2 = e2
is sequential and *not* the same as the parallel
let' (x1, x2) = (e1, e2)
The first is
(\ x1 - (\x2 - ...) e2) e1
and the second is
(\ (x1,x2) - ...) (e1, e2)
On 11.07.2013 13:36, Doug McIlroy wrote:
By analogy to ML,
I can do this without extra indentation:
(|) = flip ($)
f = 5 | \ x -
6 | \ y -
x + y
Non-recursive let is as superfluous as the do-notation.
On 11.07.2013 17:40, Carter Schonwald wrote:
Yup. Nested cases *are* non recursive lets.
(Can't believe I forgot about that )
On
On 07/11/2013 05:52 PM, Just wrote:
On 07/10/2013 11:44 PM, Ertugrul Söylemez wrote:
A very simple way to do this is to use integralLim_ instead of
integral_. It allows the ball itself to handle the bouncing. A less
invasive way (i.e. you can add it to your example) is to use the (--)
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
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
Just hask...@justnothing.org wrote:
Thank you very much, this works as expected and is easy to understand.
However a complete example of a bouncing ball would be super awesome
since I have trouble to get it work with integralLim_.
My first try was to use object_ from Control.Wire.Prefab.Move
On 11/07/2013, at 6:16 PM, o...@okmij.org wrote:
I'd like to emphasize that there is a precedent to non-recursive let
in the world of (relatively pure) lazy functional programming.
So what? You can find precedents for almost anything.
I could even point you to a lazy mostly-functional
I agree that how the exception was thrown is more interesting than the
type. I feel like there should be a way to express the necessary
information via the type system, but I'm not convinced it's easy (or even
possible).
Another issue to be aware of is that exceptions can be thrown from pure
Lens even supplies this as ()
On Thu, Jul 11, 2013 at 5:18 PM, Andreas Abel andreas.a...@ifi.lmu.dewrote:
I can do this without extra indentation:
(|) = flip ($)
f = 5 | \ x -
6 | \ y -
x + y
Non-recursive let is as superfluous as the do-notation.
On 11.07.2013 17:40,
Here's a problem variations of which have been plaguing the Haskell
community for as long as I can remember.
To see it for yourself:
1.) Be running OS X
2.) install GLFW-b-1.0.0 (you may need to cabal update) [1]
3.) ghci -package GLFW-b
4.) import Graphics.UI.GLFW as GLFW
5.) GLFW.init
Security
34 matches
Mail list logo