Steve Horne wrote:
Heinrich Apfelmus wrote:
Maybe it helps to try to find an example of a function f :: A - B
for some cleverly chosen types A,B that is not pure, i.e. does not
return the same values for equal arguments.
[..]
For your specific challenge, place that as a left-hand
Conal Elliott wrote:
I wrote that post to point out the fuzziness that fuels many
discussion threads like this one. See also
http://conal.net/blog/posts/notions-of-purity-in-haskell/ and the
comments.
I almost never find value in discussion about whether language X is
functional, pure, or
On 12/29/2011 07:07 PM, Steve Horne wrote:
On 29/12/2011 10:05, Jerzy Karczmarczuk wrote:
Sorry, a long and pseudo-philosophical treatise. Trash it before reading.
Heinrich Apfelmus:
You could say that side effects have been moved from functions to
some other type (namely IO) in Haskell.
I
On 12/29/2011 11:06 PM, Steve Horne wrote:
On 29/12/2011 21:01, Chris Smith wrote:
On Thu, 2011-12-29 at 18:07 +, Steve Horne wrote:
By definition, an intentional effect is a side-effect. To me, it's by
deceptive redefinition - and a lot of arguments rely on mixing
definitions - but
On 12/29/2011 09:39 PM, Jerzy Karczmarczuk wrote:
Truly random numbers are very rarely used, forget about them.
Well, obviously, but why should we forget about them? The usual
approach(*) is to gather entropy from a truly(**) random source
and use that to seed (and perhaps periodically
One possible option would be to make a library that has all the combinators
lifted to your more general type and use lift or runQ or something similar
for any quotes that need lifting, along with operations from monad-control or
monad-peel to lift quotes that also need access to the StateT
On Dec 29, 2011, at 2:16 PM, Steve Horne wrote:
Of course you can extract values out of IO actions to work with them - the
bind operator does this for you nicely, providing the value as an argument to
the function you pass to the right-hand argument of the bind. But that
function returns
Gregg Reynolds d...@mobileink.com писал(а) в своём письме Fri, 30 Dec
2011 17:23:20 +0200:
Regarding side-effects, they can be (informally) defined pretty simply:
any non-computational effect caused by a computation is a side-effect.
I wonder: can writing to memory be called a
Bardur Arantsson:
Random streams are not referentially transparent, though, AFAICT...?
Either way this thread has gone on long enough, let's not prolong it
needlessly with this side discussion.
Sure.
But the discussion on randomness is /per se/ interesting, especially in
a functional
On Dec 30, 2011, at 10:34 AM, Artyom Kazak wrote:
Gregg Reynolds d...@mobileink.com писал(а) в своём письме Fri, 30 Dec 2011
17:23:20 +0200:
Regarding side-effects, they can be (informally) defined pretty simply: any
non-computational effect caused by a computation is a side-effect.
On Fri, 2011-12-30 at 18:34 +0200, Artyom Kazak wrote:
I wonder: can writing to memory be called a “computational effect”? If
yes, then every computation is impure. If no, then what’s the difference
between memory and hard drive?
The difference is that our operating systems draw an
On Fri, Dec 30, 2011 at 12:52 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
I wrote that post to point out the fuzziness that fuels many
discussion threads like this one. See also http://conal.net/blog/posts/**
On Fri, Dec 30, 2011 at 8:12 AM, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 12:52 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
I wrote that post to point out the fuzziness that fuels many
discussion threads like this one. See also
On Dec 30, 2011, at 10:19 AM, Conal Elliott wrote:
On Fri, Dec 30, 2011 at 12:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return (i+x)
is pure according to the common definition of pure in the
On 30 December 2011 16:59, Gregg Reynolds d...@mobileink.com wrote:
On Fri, Dec 30, 2011 at 12:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return (i+x)
is pure according to the common definition of pure in
time t: f 42 (computational process implementing func application
begins…)
t+1: keystroke = 1
t+2: 43 (… and ends)
time t+3: f 42
t+4: keystroke = 2
t+5: 44
Conclusion: f 42 != f 42
That conclusion would only follow if the same IO action always produced
the same
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds d...@mobileink.com wrote:
On Fri, Dec 30, 2011 at 12:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return
Conal Elliott wrote:
Heinrich Apfelmus wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return (i+x)
is pure according to the common definition of pure in the context of
purely functional programming. That's because
f 42 = f (43-1) = etc.
Put differently, the
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds d...@mobileink.com wrote:
On Fri, Dec 30, 2011 at 12:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
The function
On Fri, Dec 30, 2011 at 9:11 AM, Chris Smith cdsm...@gmail.com wrote:
time t: f 42 (computational process implementing func application
begins…)
t+1: keystroke = 1
t+2: 43 (… and ends)
time t+3: f 42
t+4: keystroke = 2
t+5: 44
Conclusion: f 42 != f 42
That
On Fri, Dec 30, 2011 at 9:20 AM, Colin Adams colinpaulad...@gmail.comwrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds d...@mobileink.com wrote:
On Fri, Dec 30, 2011 at
On 30 December 2011 17:27, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 9:20 AM, Colin Adams colinpaulad...@gmail.comwrote:
proof: f is a function, and it is taking the same argument each time.
Therefore the result is the same each time.
Careful of circular reasoning here.
On Fri, Dec 30, 2011 at 9:19 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
Heinrich Apfelmus wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return (i+x)
is pure according to the common definition of pure in the context of
On Fri, Dec 30, 2011 at 9:30 AM, Colin Adams colinpaulad...@gmail.comwrote:
On 30 December 2011 17:27, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 9:20 AM, Colin Adams
colinpaulad...@gmail.comwrote:
proof: f is a function, and it is taking the same argument each time.
On Dec 30, 2011, at 11:20 AM, Colin Adams wrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds d...@mobileink.com wrote:
On Fri, Dec 30, 2011 at 12:49 AM, Heinrich
On Dec 30, 2011, at 11:11 AM, Chris Smith wrote:
time t: f 42 (computational process implementing func application
begins…)
t+1: keystroke = 1
t+2: 43 (… and ends)
time t+3: f 42
t+4: keystroke = 2
t+5: 44
Conclusion: f 42 != f 42
That conclusion would only
On Fri, Dec 30, 2011 at 9:43 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:20 AM, Colin Adams wrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds
On Fri, Dec 30, 2011 at 9:43 AM, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 9:43 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:20 AM, Colin Adams wrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM,
On Dec 30, 2011, at 11:19 AM, Heinrich Apfelmus wrote:
Conal Elliott wrote:
Heinrich Apfelmus wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return (i+x)
is pure according to the common definition of pure in the context of
purely functional programming. That's
On 30/12/2011 10:41, Bardur Arantsson wrote:
This doesn't sound right to me. To me, a side effect is something
which happens as a (intended or unintended) consequence of something
else. An effect which you want to happen (e.g. by calling a procedure,
or letting the GHC runtime interpreting
On Dec 30, 2011, at 11:43 AM, Conal Elliott wrote:
roof: f is a function, and it is taking the same argument each time.
Therefore the result is the same each time.
That's called begging the question. f is not a function, so I guess your
proof is flawed.
It seems pretty clear that
Quoth Steve Horne sh006d3...@blueyonder.co.uk,
On 30/12/2011 10:41, Bardur Arantsson wrote:
This doesn't sound right to me. To me, a side effect is something
which happens as a (intended or unintended) consequence of something
else. An effect which you want to happen (e.g. by calling a
On Dec 30, 2011, at 11:21 AM, Conal Elliott wrote:
And I also raised a more fundamental question than whether this claim of
sameness is true, namely what is equality on IO? Without a precise
consistent definition of equality, the claims like f 42 == f (43 - 1) are
even defined, let
On 12/30/2011 04:38 PM, Jerzy Karczmarczuk wrote:
Bardur Arantsson:
Random streams are not referentially transparent, though, AFAICT...?
Either way this thread has gone on long enough, let's not prolong it
needlessly with this side discussion.
Sure.
But the discussion on randomness is
On Fri, Dec 30, 2011 at 10:24 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:43 AM, Conal Elliott wrote:
roof: f is a function, and it is taking the same argument each time.
Therefore the result is the same each time.
That's called begging the question. f is not a
On 30/12/2011 15:23, Gregg Reynolds wrote:
Now one way of understanding all this is to say that it implicates the
static/dynamic (compile-time/run-time) distinction: you don't know what e.g. IO
values are until runtime, so this distinction is critical to distinguishing
between pure and
On Fri, Dec 30, 2011 at 10:45 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:21 AM, Conal Elliott wrote:
And I also raised a more fundamental question than whether this claim of
sameness is true, namely what is equality on IO? Without a precise
consistent definition
I'm not very familiar with monad-control, but it looks like the
equivalent of liftWith from monad-control would be a function that has
type StateT S Q a - Q (S - (a, S)). IIUC, you are suggesting that
the code would look something like restoreT [| ... $( liftWith ( ...
) ) ... |].
Unfortunately,
On 30/12/2011 15:50, Gregg Reynolds wrote:
On Dec 30, 2011, at 10:34 AM, Artyom Kazak wrote:
Gregg Reynoldsd...@mobileink.com писал(а) в своём письме Fri, 30 Dec 2011
17:23:20 +0200:
Regarding side-effects, they can be (informally) defined pretty simply: any
non-computational effect
On Fri, 2011-12-30 at 12:45 -0600, Gregg Reynolds wrote:
I spent some time sketching out ideas for using random variables to provide
definitions (or at least notation) for stuff like IO. I'm not sure I could
even find the notes now, but my recollection is that it seemed like a
promising
Donn Cave d...@avvanta.com писал(а) в своём письме Fri, 30 Dec 2011
20:36:46 +0200:
That's why we use terms in a sense that apply meaningfully to computer
programming languages in general and Haskell in particular. To do
otherwise - for example to insist on a definition of pure that could
On Fri, 2011-12-30 at 12:24 -0600, Gregg Reynolds wrote:
No redefinition involved, just a narrowing of scope. I assume that,
since we are talking about computation, it is reasonable to limit the
discussion to the class of computable functions - which, by the way,
are about as deeply embedded
Chris Smith cdsm...@gmail.com писал(а) в своём письме Fri, 30 Dec 2011
22:04:21 +0200:
Computability is just a distraction here. The problem isn't whether
getAnIntFromUser is computable... it is whether it's a function at
all! Even uncomputable functions are first and foremost functions,
On Fri, 2011-12-30 at 23:16 +0200, Artyom Kazak wrote:
Thus, your function “f” is a function indeed, which generates a list of
instructions to kernel, according to given number.
Not my function, but yes, f certainly appears to be a function.
Conal's concern is that if there is no possible
On 2011-12-30 14:32, Steve Horne wrote:
A possible way to implement a Haskell program would be...
1. Apply rewrite rules to evaluate everything possible without
executing primitive IO actions.
2. Wait until you need to run the program.
3. Continue applying rewrite rules to evaluate
Chris Smith cdsm...@gmail.com писал(а) в своём письме Fri, 30 Dec 2011
22:28:36 +0200:
I really think that the notion of “purity” appeared to convince C
programmers. It would be silly to try to explain that “Int - IO Int”
isn't really a function from Int to Int, monads, blah blah blah. So,
On 30/12/2011 10:47, Bardur Arantsson wrote:
On 12/29/2011 11:06 PM, Steve Horne wrote:
Using similar mixed definitions to conclude that every C program is full
of bugs (basically equating intentional effects with side-effects, then
equating side-effects with unintentional bugs) is a fairly
On 30/12/2011 20:38, Scott Turner wrote:
On 2011-12-30 14:32, Steve Horne wrote:
A possible way to implement a Haskell program would be...
1. Apply rewrite rules to evaluate everything possible without
executing primitive IO actions.
2. Wait until you need to run the program.
3.
(Whether readers would consider the post [or indeed this post] an act of
trollery was mooted and mentioned several times in the original post - my
thoughts at the end. I am writing this because I would have expected
somebody to have said this by now. If it has been said then my sincere
apologies.
Hi all,
As a getting-my-feet-wet project I was starting to look into using
plugins-auto with the yesod devel server, but I was quickly stymied
because the plugins package isn't building on GHC 7.2. The error I get
locally is the same as the one reported by hackage[1]. In short,
I'm using Gtk2hs in windows (and linux) with no big problems. Cairo also works.
Glade does not allow me to use accents in the user interfaces on windows, but
otherwise works ok.
I haven't tried wx on windows. It works on linux and it provides a
more natural interface
(gtk will look like gtk also
On 12/30/2011 10:10 PM, Steve Horne wrote:
On 30/12/2011 10:47, Bardur Arantsson wrote:
On 12/29/2011 11:06 PM, Steve Horne wrote:
Calling it a straw man won't convince anyone who has the scars from
being attacked by those straw men.
I've been in those arguments, being told that C has
Is it possible to copy .cabal and .ghc folders to different machine/
user and develop same project over there ?
Or is the only way to allow a team of developers to work on the same
project is to force each one of them to install all necessary packages
on their machines.
On 31 December 2011 10:49, Vagif Verdi vagif.ve...@gmail.com wrote:
Is it possible to copy .cabal and .ghc folders to different machine/
user and develop same project over there ?
If you have the same version of GHC and necessary C libraries on all
machines, and they're all using the same
The problem is, i tried and it does not work. Cabal has absolute paths
hardcoded in many places.
So just copying folders does not work unless you copy it under the
same home folder.
On Dec 30, 4:16 pm, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com
wrote:
On 31 December 2011 10:49, Vagif Verdi
For anyone interested, here's a patch I came up with that seems to fix
the build failure. I'm trying now to reach the relevant parties to get
this included in the package.
diff -rN -u old-hs-plugins/src/System/Plugins/Load.hs
new-hs-plugins/src/System/Plugins/Load.hs
---
On 31 December 2011 11:27, Vagif Verdi vagif.ve...@gmail.com wrote:
The problem is, i tried and it does not work. Cabal has absolute paths
hardcoded in many places.
So just copying folders does not work unless you copy it under the
same home folder.
sed the ~/.ghc/*/package.conf.d/* files,
Hello!
fairly new to twidge. Got it installed and have it setting status etc etc .
I'm maintaing a local website supporting the eating of a seasonal pastry in
a highly competitve fashion. A race of sorts. The contestant eating the
most from january first to good friday wins. To keep the eating as
58 matches
Mail list logo