Luke Palmer wrote:
The example being discussed in this thread is a good one:
sum [1..10^8] + length [1..10^8]
With Haskell's semantics, we know we can write this as:
let xs = [1..10^8] in sum xs + length xs
But it causes a change in memory *complexity*, so in some sense these
two sentence
Luke Palmer-2 wrote:
>
> I would like to know or to develop a way to allow abstract
> analysis of time and space complexity.
>
In the same way that type inference and strictness analysis can be
seen as instances of abstract interpretation, so can complexity
inference. I agree that the interpl
Hi Jason,
To help me understand your question, would you be unhappy with the following
structure?
-- runnable
main = interact f
-- composable
f = ...
The discipline is to use interact (or another combinator) to wrap a
functional/composable/pure component like f into an executable
equational /= denotational
Nonetheless, Haskell has equational semantics which are derived from
its denotational ones. But when I said "equational semantics" I
really meant something more like "equations" :-).
Unlike Standard ML, for instance, Haskell does not have standard
semantics - a pe
Hello Luke,
Thursday, November 6, 2008, 2:34:36 AM, you wrote:
> The example being discussed in this thread is a good one:
> sum [1..10^8] + length [1..10^8]
> With Haskell's semantics, we know we can write this as:
> let xs = [1..10^8] in sum xs + length xs
> But it causes a change in me
On Wed, Nov 5, 2008 at 1:24 AM, Claus Reinke <[EMAIL PROTECTED]> wrote:
>> How can we support analysis of time and space complexity without
>> expanding ourselves into the complicated dirty world of operational
>> thinking?
>
> equational /= denotational
Nonetheless, Haskell has equational seman
-- Haddock 2.4.0
A new version of Haddock, the Haskell documentation tool, is out.
This is a later version than the one shipped with GHC 6.10.1, which is version
2.3.0. That version will not be released on H
On 6 Nov 2008, at 1:25 am, Johannes Waldmann wrote:
using strings (inside a program) to represent structured data
is wrong (*).
+1
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Wed, 2008-11-05 at 10:01 -0800, Daryoush Mehrtash wrote:
> Lets assume we don't have undefined in the list, are there functions
> (or properties in the function) that would cause foldl to have
> different results than foldl'?
The only difference in the definition of foldl and foldl' is a seq so
2008/11/5 Cetin Sert <[EMAIL PROTECTED]>:
> :1:4:
> Warning: Pattern match(es) are overlapped
> In the definition of `emp':
> emp ((has -> True)) = ...
> emp ((has -> False)) = ...
>
> Why do I get this error in ghc or when I try to compile a file
alexanderforemny:
>My general idea is to have the main application listening to the network
>socket and then calling all the plugins on each incoming message.
>Therefore I maintain a list of plugin states in the main application's
>state and on each incoming message I call a functio
Hello dmitry,
Wednesday, November 5, 2008, 10:46:20 PM, you wrote:
> (.text+0x66dd7):fake: undefined reference to `base_DataziTuple_Z110T_con_info
looks like you omitted --make on cmdline. without this switch, ghc
don't automaticaly links in packages used in you program.
alternatively you may tr
Hello everyone,
I am trying to compile my program, but during the linking phase I see
errors like:
(.text+0x66dd7):fake: undefined reference to `base_DataziTuple_Z110T_con_info
Library libHSbase.a contains symbols base_DataziTuple_ZxxxT_con_info
for xxx <=62.
It look like I hit some compiler lim
I'm attempting to use Control.Event to limit HTTP requests made by a
dippy little scraper I'm constructing to once per second but I think,
maybe, that the Events are not being evaluated. First, some imports.
> import qualified Data.ByteString as B
> import qualified Data.ByteString.Char8 as C
> im
Jules Bean <[EMAIL PROTECTED]> wrote:
> Jason Dusek wrote:
> > Though that seems reasonable, it is not, in general, true.
> > For example,System.Info.osis generally treated as
> > pure, though it is not. It's not clear to me how to
> > disambiguate these "born again" values from really pur
kr.angelov:
> On Wed, Aug 13, 2008 at 1:18 AM, Don Stewart <[EMAIL PROTECTED]> wrote:
> >instance Binary a => Binary [a] where
> >put l = put (length l) >> mapM_ put l
> >get= do n <- get :: Get Int
> >replicateM n get
>
> Of course I changed this as we
kr.angelov:
> I had the same problem (stack overflow). The solution was to change
> the >>= operator in the Get monad. Currently it is:
>
> m >>= k = Get (\s -> let (a, s') = unGet m s
>in unGet (k a) s')
>
> but I changed it to:
>
> m >>= k = Get (\s -> cas
On Wed, 2008-11-05 at 10:01 -0800, Daryoush Mehrtash wrote:
> Lets assume we don't have undefined in the list, are there functions
> (or properties in the function) that would cause foldl to have
> different results than foldl'?
If the function is partial on some elements of the list.
(3 /), for
Lets assume we don't have undefined in the list, are there functions (or
properties in the function) that would cause foldl to have different results
than foldl'?
daryoush
On Tue, Nov 4, 2008 at 3:37 PM, Daniel Fischer <[EMAIL PROTECTED]>wrote:
> Am Mittwoch, 5. November 2008 00:08 schrieb Daryo
I suspect this has to do with the latest GHC not including it by
default, but the HOpenGL wiki's documentation links are broken.
-- Jeff
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I had the same problem (stack overflow). The solution was to change
the >>= operator in the Get monad. Currently it is:
m >>= k = Get (\s -> let (a, s') = unGet m s
in unGet (k a) s')
but I changed it to:
m >>= k = Get (\s -> case unGet m s of
Hello, Community.
I already bothered #haskell a few times with the very same problem and
always got interesting responses. But I seem to have always simplified my
problem too much ending up with an helpful answer to my (simplified)
problem, but not with a real solution. Thus I'm giving the mailing
On Wed, Aug 13, 2008 at 1:18 AM, Don Stewart <[EMAIL PROTECTED]> wrote:
>instance Binary a => Binary [a] where
>put l = put (length l) >> mapM_ put l
>get= do n <- get :: Get Int
>replicateM n get
Of course I changed this as well. Now it is:
instance (
Ketil Malde <[EMAIL PROTECTED]> writes:
> Doing 'x <- decodeFile "/dev/zero"
Well, it turns out 'decodeFile' needs to -- or does, anyway -- check
whether the file is empty. Replacing it with a combination of
'decode' and 'readFile' solved the problem.
Thanks to Saizan and the other people hangi
Hello,
Recently, we released a library on Hackage for generic rewriting
(package "rewriting" if you are curious). The user of the library is
expected to define type class instances to enable rewriting on his or
her own datatypes. As these instances follow the datatype declarations
closely, we
Old threads never die:
Tim Newsham <[EMAIL PROTECTED]> writes:
>> Chunk = {
>>length :: Word8
>>elems :: [Elem] -- 0..255 repetitions
>> }
>> Chunks = [Chunk] -- terminated with the first 0 length Chunk
> I tried my hand at the encoding above:
>
> http://www.thenewsh.com/%7Enewsh
Henning Thielemann <[EMAIL PROTECTED]> wrote:
> Achim Schneider schrieb:
> > Henning Thielemann <[EMAIL PROTECTED]> wrote:
> >>
> >> There was
> >> http://www.haskell.org/haskellwiki/Things_to_avoid
> >>
> >> which has been renamed to the more friendly
> >> "Haskell programming tips"
> >>
> >
"roger peppe" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 1:56 PM, Martijn van Steenbergen
> <[EMAIL PROTECTED]> wrote:
> > I think I'll try roger's (private)
>
> eek, bitten by "reply to sender only" again!
>
> i had intended to send to the list too.
>
I recommend using a newsreader and
"Luke Palmer" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 4:33 AM, Achim Schneider <[EMAIL PROTECTED]>
> wrote:
> > I know that I, coming from a C/Scheme POV, in the beginning
> > attributed much magic to Haskell's inner workings and assumed,
> > because of the general wizardly air of the
Johannes Waldmann schrieb:
> using strings (inside a program) to represent structured data
> is wrong (*).
>
> of course you need strings for interfacing the "outside" world,
> but the microsecond they get on the inside,
> they should be tokenized and parsed away
> into something useful (= an ab
On Wed, Nov 5, 2008 at 1:56 PM, Martijn van Steenbergen
<[EMAIL PROTECTED]> wrote:
> I think I'll try roger's (private)
eek, bitten by "reply to sender only" again!
i had intended to send to the list too.
___
Haskell-Cafe mailing list
Haskell-Cafe@haske
On Tue, Nov 4, 2008 at 6:44 PM, i wrote:
> i'm sorry if this is obviously wrong (i haven't used Text.Regex), but
> can't you do this with submatches?
rights or wrongs of regexps aside, i just checked that the above
approach *is* feasible with Text.Regex
here's some code:
>module Multimatch(multi
Achim Schneider schrieb:
> Henning Thielemann <[EMAIL PROTECTED]> wrote:
>>
>> There was
>> http://www.haskell.org/haskellwiki/Things_to_avoid
>>
>> which has been renamed to the more friendly
>> "Haskell programming tips"
>>
> I was rather thinking of a list of performance pitfalls and lazines
Hello everyone,
Thank you all for your comments! Those are some very useful ideas.
I think I'll try roger's (private) and ChrisK's suggestion first: using
the match groups. I'm not sure if the match groups inside the individual
regexes will cause much trouble, but we'll see. I imagine I'll ha
using strings (inside a program) to represent structured data
is wrong (*).
of course you need strings for interfacing the "outside" world,
but the microsecond they get on the inside,
they should be tokenized and parsed away
into something useful (= an abstract syntax tree).
(*) corollary:
u
Haskell's great strength is its equational semantics. I would like
Haskell programmers to think equationally, mathematically, rather than
operationally, when writing Haskell programs. If I were to teach a
course in Haskell, I would like to launch off of denotational
semantics, hopefully without
Excerpts from daniel.is.fischer's message of Wed Nov 05 00:37:47 +0100 2008:
> Am Mittwoch, 5. November 2008 00:08 schrieb Daryoush Mehrtash:
> > Are there cases (function or list) where the result of foldl (or
> > foldr)would be different that foldl' (or foldr')?
> >
> > thanks,
> >
> > daryoush
>
Excerpts from ajb's message of Wed Nov 05 03:59:03 +0100 2008:
> G'day all.
Hi,
>
> Quoting Achim Schneider <[EMAIL PROTECTED]>:
>
> > Considering that he's talking about a mud, I figure the grammar is a
> > quite straightforward
> >
> > command = l[eft] | r[ight] | ... | t[ake] | c[ast]
> >
On Wed, Nov 5, 2008 at 4:33 AM, Achim Schneider <[EMAIL PROTECTED]> wrote:
> I know that I, coming from a C/Scheme POV, in the beginning attributed
> much magic to Haskell's inner workings and assumed, because of the
> general wizardly air of the whole language, avg to run in O(n) time and
> consta
Henning Thielemann <[EMAIL PROTECTED]> wrote:
> Achim Schneider schrieb:
> > Derek Elkins <[EMAIL PROTECTED]> wrote:
> >
> >> well-known anti-patterns
> >>
> > I'm wondering why there are so miraculously well-known. Could it be
> > the dedicated wiki page titled "DONTDOTHAT!!!one!" that lists the
> System.Info is broken. "os" has the wrong type.
And the wrong value!
I have not installed mingw32 on this machine, mingw32 isn't even an
os...
/me has goal of having "os" on Linux report "wine1.1.7"
Thanks
Neil
==
Jason Dusek wrote:
Though that seems reasonable, it is not, in general, true. For
example,System.Info.osis generally treated as pure,
though it is not. It's not clear to me how to disambiguate
these "born again" values from really pure values.
It seems to me no one addressed you
Achim Schneider schrieb:
> Derek Elkins <[EMAIL PROTECTED]> wrote:
>
>> well-known anti-patterns
>>
> I'm wondering why there are so miraculously well-known. Could it be the
> dedicated wiki page titled "DONTDOTHAT!!!one!" that lists them
> all?
There was
http://www.haskell.org/haskellwiki/Thi
Excerpts from Chad Scherrer's message of Tue Nov 04 21:34:01 -0600 2008:
> Does anyone have any thought what it would take to get this going?
>
> Chad
>
Currently, franchise supports building in parallel with a -j flag, but
the code could definitely be optimized (in my experience, running with
s
I believe Svein is thinking of render-to-texture which indeed could be
used to emulate Stream-Out functionality (but with reduced performance
of course). This is also hardware specific and was still not supported
on the first GPU's.
From: Sebastian Sylvan [mailt
"Jason Dusek" <[EMAIL PROTECTED]> wrote:
> Can these components can
> be Haskell functions without IO in their signatures?
>
Sure. You might, for example, abstract networking out of your web
server and thus end up with a function of type
serve :: [HTTPRequest] -> [HTTPResponse]
that lazily map
Derek Elkins <[EMAIL PROTECTED]> wrote:
> well-known anti-patterns
>
I'm wondering why there are so miraculously well-known. Could it be the
dedicated wiki page titled "DONTDOTHAT!!!one!" that lists them
all?
--
(c) this sig last receiving data processing entity. Inspect headers
for copyright hi
A performance improvement could be the caching of responses based on
computation costs and number of accesses. This functionality can be
implemented a general module that may be used to wrap any pure program if
needed. This is something that only pure programs can ever do. And the
haskell type syst
Am Montag, 3. November 2008 02:43 schrieb Maurício:
> Hi,
>
> I've beeing doing something with darcs that is so great that,
> although I'm sure a lot of people are already doing the same, I
> think it would be nice to share with you. I did 'cd ~' and then:
>
> darcs initialize
> darcs add
Hi Martijn,
If you are brave to start implementing DFA with all required
optimisations then you might want to look at:
http://www.ontotext.com/gate/japec.html
This is a compiler for language called JAPE. In the language you
define a set of rules where the right hand side
is a regular expression
50 matches
Mail list logo