Hi everyone.
I was wondering if I can make assumptions about the evaluation order of
the following code:
isTrue :: Int - IO Bool
isTrue val = pure (||) * boolTest1 val * boolTest2 val
{- boolTest1 is an inexpensive, quick check -}
boolTest1 :: Int - IO Bool
boolTest1 val = undefined
{-
Hi all,
With a base system with just ghc and cabal-install, if I try to install
bytestring-lexing I get:
$ cabal install bytestring-lexing
Resolving dependencies...
Configuring bytestring-lexing-0.4.0...
cabal: The program alex version =2.3 is required but it could not be found.
Hi,
Am Freitag, den 16.03.2012, 21:00 +1100 schrieb Erik de Castro Lopo:
With a base system with just ghc and cabal-install, if I try to install
bytestring-lexing I get:
$ cabal install bytestring-lexing
Resolving dependencies...
Configuring bytestring-lexing-0.4.0...
Joachim Breitner wrote:
no, cabal-install does not automatically install build-tools at all,
only Cabal checks them for compilation. I guess the reason is that
build-tools needs to be put on the PATH, and that is beyond the scope of
cabal-install.
This is rather sub-optimal.
One place where
On 16 March 2012 21:56, Erik de Castro Lopo mle...@mega-nerd.com wrote:
Joachim Breitner wrote:
no, cabal-install does not automatically install build-tools at all,
only Cabal checks them for compilation. I guess the reason is that
build-tools needs to be put on the PATH, and that is beyond
On 16/03/12 10:45, Rouan van Dalen wrote:
Hi everyone.
I was wondering if I can make assumptions about the evaluation order of
the following code:
isTrue :: Int - IO Bool
isTrue val = pure (||) * boolTest1 val * boolTest2 val
{- boolTest1 is an inexpensive, quick check -}
boolTest1 :: Int -
As usual you can check:
Prelude Control.Applicative pure (||) * pure True * undefined
*** Exception: Prelude.undefined
Prelude Control.Applicative (||) True undefined
True
2012/3/16 Rouan van Dalen rvda...@yahoo.co.uk
Hi everyone.
I was wondering if I can make assumptions about the
Dear all,
there is a question I have been thinking about a bit. In short, we could
simply formulate it like this:
Are there any problems which *cannot *be solved a side effect-free language
(such as Haskell)? In other words, are there problems that would explicitly
demand semantics that can only
Christopher,
On 16/03/2012, at 11:23 PM, Christopher Svanefalk wrote:
there is a question I have been thinking about a bit. In short, we could
simply formulate it like this:
Are there any problems which cannot be solved a side effect-free language
(such as Haskell)? In other words, are
On Fri, Mar 16, 2012 at 9:23 AM, Christopher Svanefalk
christopher.svanef...@gmail.com wrote:
Are there any problems which cannot be solved a side effect-free language
(such as Haskell)? In other words, are there problems that would explicitly
demand semantics that can only be provided by a
Hi there,
Christopher Svanefalk christopher.svanef...@gmail.com wrote:
there is a question I have been thinking about a bit. In short, we
could simply formulate it like this:
Are there any problems which *cannot *be solved a side effect-free
language (such as Haskell)? In other words, are
Rouan van Dalen rvda...@yahoo.co.uk wrote:
I was wondering if I can make assumptions about the evaluation order
of the following code:
Nitpick: This is execution order, not evaluation order. The evaluation
order is indeed undefined here.
Greets,
Ertugrul
--
nightmare = unsafePerformIO
Hello!
tl;dr: text package's pack function is creating huge chunks of code everywhere.
Michael Snoyman and I have been trying to nail the performance
problems of persistent's Template Haskell code -- GHC was taking a lot
of memory and CPU time to compile these. What we found out is that
the
Alex is supplied as part of the Platform though which is the
recommended system for beginners, is Yesod currently in advance of the
Platform?
On 16 March 2012 10:56, Erik de Castro Lopo mle...@mega-nerd.com wrote:
The problem is that many of the people trying out Yesod are newcomers to
The Yesod docs all state very explicitly that we depend on the Haskell
Platform, and in particular that alex needs to be installed. However,
that doesn't stop this issue from confusing people.
I think a good short term solution could be what Alan Zimmerman did
with language-javascript: include
On 16.03.2012 17:41, Felipe Almeida Lessa wrote:
Does anyone have any ideas why GHC is inlining so much code
everywhere? While everything I said here was tested on GHC 7.0, we
have evidence that GHC 7.4 suffers from the same problem. We don't
know about GHC 6.12, though. This seems to be a
Thanx to all. I've done it!
===
import Text.XML.HXT.Core
import Text.XML.HXT.Curl
import Text.XML.HXT.HTTP
import Control.Arrow.ArrowNavigatableTree
pageURL = http://localhost/test.xml;
main = do
r - runX (configSysVars [withCanonicalize no, withValidate no, withTrace
0,
Hi,
Christopher Svanefalk wrote:
Are there any problems which *cannot* be solved a side effect-free language
(such as Haskell)?
No. Haskell is expressive enough.
One way to prove that is to implement an interpreter for a language with
side effects in Haskell. Now if there's a program P to
On Fri, Mar 16, 2012 at 12:30:13PM +0100, Twan van Laarhoven wrote:
If you want to avoid the side effects of boolTest2 when boolTest1
returns true, you will need to implement a monadic or, something like
orM ma mb = do
a - ma
if a then return True else mb
Note also
Many thanks for the replies and references all of you! I will continue to
read up on this from here, and you have all boosted my interest in
investigating how complex systems could be developed using functional
languages.
On Fri, Mar 16, 2012 at 1:46 PM, Dimitri Scheftelowitsch
Just to clarify, since I've been getting a ton of emails on the topic, we
*have* been accepted to the Google Summer of Code this year.
The list on their site is still updating, and we should appear there
shortly.
-Edward
___
Haskell-Cafe mailing list
Hi everyone,
I am currently teaching a half-credit introductory Haskell class for
undergraduates. This is the second time I've taught it. The last
time, for their final project I gave them the option of contributing
to an open-source project; a couple groups took me up on it and I
think it
Hey everyone, I'm hoping someone can point me in the right direction.
The regex-pcre package exports (=~) and (=~~) as two useful infix
functions. They're great! The only problem is, they are a *positive* match
for a regex. I have a file that contains HTML comments (it was generated in
Word) and
On 16 March 2012 21:28, Brent Yorgey byor...@seas.upenn.edu wrote:
So I'd like to do it again this time around, and am looking for
particular projects I can suggest to them. Do you have an open-source
project with a few well-specified tasks that a relative beginner (see
below) could
On 3/16/12 6:00 AM, Erik de Castro Lopo wrote:
Hi all,
With a base system with just ghc and cabal-install, if I try to install
bytestring-lexing I get:
$ cabal install bytestring-lexing
Resolving dependencies...
Configuring bytestring-lexing-0.4.0...
cabal: The program
On Fri, Mar 16, 2012 at 8:35 AM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
If you're asking about performance, as in is there a problem that can
be solved in O(f(n)) time in Java but not in Haskell-sans-IO-and-ST?,
then it becomes a harder question. I'm not sure what the answer is.
On 3/16/12 12:22 PM, Aleksey Khudyakov wrote:
Disclaimer. I'm no expert in text internals.
Because it's told to do so. This is an unfortunate feature of stream
fusion. It does eliminate intermediate data structures but it requires
that everything is inlined.
There are ways of mitigating
Ivan Lazar Miljenovic wrote:
One trivial solution is to assume ~/.cabal/bin is on the PATH and to
ignore system-wide packages, which I think is even *more* sub-optimal
(why install a new version of alex when it's already available?).
The tool should only install alex in ~/.cabal/bin if alex
On 17 March 2012 09:02, Erik de Castro Lopo mle...@mega-nerd.com wrote:
Ivan Lazar Miljenovic wrote:
One trivial solution is to assume ~/.cabal/bin is on the PATH and to
ignore system-wide packages, which I think is even *more* sub-optimal
(why install a new version of alex when it's already
On 17.03.2012 01:51, wren ng thornton wrote:
On 3/16/12 12:22 PM, Aleksey Khudyakov wrote:
Disclaimer. I'm no expert in text internals.
Because it's told to do so. This is an unfortunate feature of stream
fusion. It does eliminate intermediate data structures but it requires
that everything is
I suggest you file a bug. :)
https://github.com/bos/text/issues
-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Mar 16, 2012 at 3:43 PM, serialhex serial...@gmail.com wrote:
an interesting question emerges: even though i may be able to implement an
algorithm with O(f(n)) in Haskell, and write a program that is O(g(n))
O(f(n)) in C++ or Java... could Haskell be said to be more efficient if
Casey
--
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Casey
--
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
If the question is when can I have my output, then both are equally
relevant and can be safely conflated.
That said, while some programming problems *are* of this type, I think
most aren't, and your points certainly stand.
On Fri, Mar 16, 2012 at 3:31 PM, Chris Smith cdsm...@gmail.com wrote:
have you considered using one of the many amazing HTML parsers on hackage?
If the goal is to just get the HTML comments, that might be a much more
effective use of your time
--
Carter Tazio Schonwald
On Friday, March 16, 2012 at 4:55 PM, Joseph Bozeman wrote:
Hey everyone, I'm hoping
On 17.03.2012 02:24, Johan Tibell wrote:
I suggest you file a bug. :)
I'm way too lazy for that. Also I don't want to steal
joy of reporting a bug from people who actually suffer
from it
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hey Chris,
I'm up for working on pg simple a bit, partly for my own ends. Email me off
list and I'll elaborate further, but one thing I'd really like to do is flesh
out the geometry/gis bits.
--
Carter Tazio Schonwald
On Friday, March 16, 2012 at 5:07 PM, Christopher Done wrote:
On
On Fri, Mar 16, 2012 at 3:48 PM, Aleksey Khudyakov
alexey.sklad...@gmail.com wrote:
On 17.03.2012 02:24, Johan Tibell wrote:
I suggest you file a bug. :)
I'm way too lazy for that. Also I don't want to steal
joy of reporting a bug from people who actually suffer
from it
I meant you as in
There's a lot of reasons why I don't recommend that approach, but I think it's
best explained by the following now classic stack overflow post and answer
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
Basically this applies in your case
You can emulate mutation with at most O(log(n)) penalty using a map. Given
that memory is of fixed size, log2(n) = 64, so for real-world programs
this becomes O(1). So any program you can implement using mutation can be
implemented in a pure language with the same big-O running time (but much
Ryan Ingram:
Other external state is harder to emulate. For example, communication
over a network most definitely requires some concept of a 'computation
with side effects' since the network's response could change from
request to request.
In GHC, even IO objects are pure, but they
On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
jerzy.karczmarc...@unicaen.fr wrote:
... but the question of purity of a program - in my opinion - concerns the
program, and nothing else.
You might be thinking of software engineering purity.
The networking is not expected to break the
Quoth KC kc1...@gmail.com,
On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
jerzy.karczmarc...@unicaen.fr wrote:
... but the question of purity of a program - in my opinion - concerns
the program, and nothing else.
You might be thinking of software engineering purity.
Or software
Hello cafe,
I've got a benchmarking script which currently generates gnuplot scripts
(of simple lines and points) and I'd like to port it to use two** new
backends:
(1) Chart for PDF generation and gtk viewing
(2) Something-or-other for generating pretty interactive charts in the
browser,
It is the third or the fourth time that somebody recently puts the
equivalence between the communication with the outer world, and side
effects. I contest that very strongly, perhaps a TRUE guru might
instruct me.
I think there are three key concepts rumbling around in this discussion
that
46 matches
Mail list logo