Ryan Ingram writes:
> 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).
I'm not sure assuming fixed size memory is a good idea for a theoretical
discussion - your computer i
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
tha
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, sui
Quoth KC ,
> On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
> 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 engineers might be thinking of purity in
On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
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 referential transparency, or do
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 conceptua
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
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 becaus
On Fri, Mar 16, 2012 at 3:48 PM, Aleksey Khudyakov
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 the collective
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 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
http://w
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 som
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 wrote:
> On Fri, Mar 16,
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
On Fri, Mar 16, 2012 at 3:43 PM, serialhex 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
> time spent program
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 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
On 17 March 2012 09:02, Erik de Castro Lopo 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 available?).
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 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
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 answe
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
On 16 March 2012 21:28, Brent Yorgey 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 reasonably make a contributi
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 I
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 ended
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
Ha
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 <
d.scheftelowit...
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
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 so
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, wit
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 pro
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 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 wrote:
> The problem is that many of the people trying out Yesod are newcomers to
> Haskell. They are going to
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 cod
Rouan van Dalen 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 (getWrongWife >>= se
Hi there,
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 there problems that
> would
On Fri, Mar 16, 2012 at 9:23 AM, Christopher Svanefalk
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 language allowing direct
> modif
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, a
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
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
> Hi everyone.
>
> I was wondering if I can make assumptions about the evaluation order
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 :: In
On 16 March 2012 21:56, Erik de Castro Lopo 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 the scope of
>
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 wh
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...
>
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 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
{-
47 matches
Mail list logo