All,
I have a simple Haskell P2P library that I've been playing with in
simulations of 20 to 600 nodes. To run the simulation there is a
Haskell thread (forkIO) for every node in the system, one that starts
up all the nodes and prints the info (so prints aren't mangled), and
one that acts as the
Andy Gill has been advocating programmatic access to the 'is evaluated'
status bit for years now. 'seq' becomes cheaper, and we can write
operational properties/assertions about strictness.
-- Don
jochem:
> Nikhil Patil wrote:
> > Hi,
> >
> > I am curious to know if there is a function in Haskel
John Lask wrote:
on the other hand a function to release pool memory to the OS down to
the current active level should (I hope) be easily implementable, and
quickly incorporated into application where required, whereas arriving
at one or more automatic deallocation policies would most likely
r
Brandon S. Allbery KF8NH wrote:
> On May 8, 2009, at 13:08 , Sittampalam, Ganesh wrote:
>> Brandon S. Allbery KF8NH wrote:
>>> and therefore must be in IO. You may be thinking that it would
>>> return a result for _|_, but as described if you fed it _|_ it could
>>> only produce False (if the _|_
At Fri, 8 May 2009 17:33:25 +0200,
Peter Verswyvelen wrote:
>
> [1 ]
> [1.1 ]
> If you work with a text editor like Microsoft Visual Studio (maybe also
> Eclipse, don't know), each text editor has its own undo/redo history.
> However, when you perform refactoring - like renaming a function - thi
I am pleased to announce the initial release of hpc-strobe: Hpc-generated
strobes for a running Haskell program. hpc-strobe is a rudimentary library
that demonstrates the possibility of using Hpc (Haskell Program Coverage) to
inspect the state of a running Haskell program. hpc-strobe-0.1 has bee
On Fri, May 8, 2009 at 8:49 AM, Neil Mitchell wrote:
>
> I've used the project extensively in HLint
> (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hlint) and
> it works fantastically.
Hi Neil,
A bit off-topic, but your post reminded me: Does HLint currently help the
user find s
Am Freitag 08 Mai 2009 19:18:37 schrieb Brandon S. Allbery KF8NH:
> On May 8, 2009, at 12:00 , Neil Brown wrote:
> > If you change fromInteger in Num Bool to be fromInteger x = x /= 0,
> > then we could all start writing nasty C-like if-expressions...
>
> I'd be strongly tempted to say
>
> > fromI
On Fri, May 8, 2009 at 12:43 PM, Jason Dagit wrote:
> Hi Peter,
>
> On Fri, May 8, 2009 at 8:33 AM, Peter Verswyvelen wrote:
>> If you work with a text editor like Microsoft Visual Studio (maybe also
>> Eclipse, don't know), each text editor has its own undo/redo history.
>> However, when you per
Hi Neil,
Thanks for the suggestion! I'd seen the package before, but I couldn't
figure out a good way to integrate it into my codegen situation.
I guess I should write the "skeleton" of the code I want to generate,
get HSE to parse it, and then replace the parts I want to change of
the AST with w
On May 8, 2009, at 13:08 , Sittampalam, Ganesh wrote:
Brandon S. Allbery KF8NH wrote:
and therefore must be in IO. You may be thinking that it would
return a result for _|_, but as described if you fed it _|_ it could
only produce False (if the _|_ has been evaluated you would not be
able to re
On May 8, 2009, at 12:00 , Neil Brown wrote:
If you change fromInteger in Num Bool to be fromInteger x = x /= 0,
then we could all start writing nasty C-like if-expressions...
I'd be strongly tempted to say
> fromInteger = const False
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell
Brandon S. Allbery KF8NH wrote:
> On May 8, 2009, at 01:33 , Joe Fredette wrote:
>> That strikes me as being bad in a "I'm violating the Halting Problem"
>> sort of way- but I'm not sure how. Is there some contradictory
>> construction that could be built from such a function?
>
> I don't think it
That must have been the vibe I was getting. My haskell-spider senses
were tingling, I just overshot RT and went for the Halting Problem.
/Joe
Brandon S. Allbery KF8NH wrote:
On May 8, 2009, at 01:33 , Joe Fredette wrote:
That strikes me as being bad in a "I'm violating the Halting Problem"
so
Daniel Carrera schrieb:
> I think it largely depends on the learner. Some people find vocabulary
> easier, or more interesting, others not. I have a hard time learning a
> lot of isolated facts (e.g. vocabulary), but I find it easier and more
> enjoyable to learn a rule that I can apply many times.
wren ng thornton schrieb:
> Chris Forno (jekor) wrote:
>> That being said, Esperanto, and even Japanese sentence structure perhaps
>> is not as different as an agglutinative language like German. I'll need
>> to study it more to find out.
>
> Actually, Japanese is agglutinative too (moreso than Ge
On May 8, 2009, at 01:33 , Joe Fredette wrote:
That strikes me as being bad in a "I'm violating the Halting
Problem" sort of way- but I'm not sure how. Is there some
contradictory construction that
could be built from such a function?
I don't think it is; surely the Haskell runtime knows wh
Hi Peter,
On Fri, May 8, 2009 at 8:33 AM, Peter Verswyvelen wrote:
> If you work with a text editor like Microsoft Visual Studio (maybe also
> Eclipse, don't know), each text editor has its own undo/redo history.
> However, when you perform refactoring - like renaming a function - this
> becomes
> > Does that also mean that you could write:
> >
> > if 3 - 4 then ... else ... (= if (fromInteger 3 :: Bool) - (fromInteger 4
> > :: Bool) then ... else ...)
>
> No. 3 - 4 is an Integer, the proposal is to convert Bools to Ints, not
> Ints to Bools.
Rather, (3 - 4) is a "(Num t) => t", so yes,
> Does that also mean that you could write:
>
> if 3 - 4 then ... else ... (= if (fromInteger 3 :: Bool) - (fromInteger 4
> :: Bool) then ... else ...)
No. 3 - 4 is an Integer, the proposal is to convert Bools to Ints, not
Ints to Bools. Of course, Lennart has been asking for precisely this
funct
Neil Mitchell wrote:
I didn't at first, then I remembered:
1 + True
=
fromInteger 1 + True
And if we have Num for Bool, it type checks.
Does that also mean that you could write:
if 3 - 4 then ... else ... (= if (fromInteger 3 :: Bool) - (fromInteger
4 :: Bool) then ... else ...)
or per
Nope, it's in the Haskell standard. It means we can type:
1 + (2 :: Int) and have it work
Otherwise what type would 1 have? Integer? Float? It's just a way of
giving constants the type :: Num a => a
On Fri, May 8, 2009 at 4:53 PM, Andrew Wagner wrote:
> Hmm, I never knew that. Is that a GHC thi
Hmm, I never knew that. Is that a GHC thing? Is it strictly necessary? Seems
like it could be done in the Num instance for Integers, Ints, etc.
On Fri, May 8, 2009 at 11:51 AM, Neil Mitchell wrote:
> > Err, I'm not seeing the danger of this
> > (+) :: forall a. (Num a) => a -> a -> a
> > Doesn't
> Err, I'm not seeing the danger of this
> (+) :: forall a. (Num a) => a -> a -> a
> Doesn't this require the two parameters to be the same instance of Num?
I didn't at first, then I remembered:
1 + True
=
fromInteger 1 + True
And if we have Num for Bool, it type checks.
Thanks
Neil
__
Err, I'm not seeing the danger of this
(+) :: forall a. (Num a) => a -> a -> a
Doesn't this require the two parameters to be the same instance of Num?
On Fri, May 8, 2009 at 10:51 AM, Sittampalam, Ganesh <
ganesh.sittampa...@credit-suisse.com> wrote:
> Stephan Friedrichs wrote:
>
> > When lookin
Hi Dan,
> I was wondering whether anyone had any suggestions on a good way to
> generate repetitive code with associated types and kind annotations.
haskell-src-exts is the answer:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts
>From the project description:
"Haskel
If you work with a text editor like Microsoft Visual Studio (maybe also
Eclipse, don't know), each text editor has its own undo/redo history.
However, when you perform refactoring - like renaming a function - this
becomes an undo/redo on multiple files together, so in a sense these changes
are part
Am Freitag 08 Mai 2009 15:51:28 schrieb Miguel Mitrofanov:
> j.waldmann wrote on 08.05.2009 17:39:
> > Wow. This is really a bikeshed discussion. My post contained praise for
> > the book,
> > a critique of one of its design decisions (intermediate language not
> > explicitely typed),
> > and a syn
Hi all,
I was wondering whether anyone had any suggestions on a good way to
generate repetitive code with associated types and kind annotations.
I'd like to use TH but as far as I understand, it doesn't support this
yet (I think associated types are in HEAD but not kinds), so for now
I've been usi
Stephan Friedrichs wrote:
> When looking for an xor function, I found one in Data.Bits but
> couldn't use it for Bool, because Bool is no instance of Bits and of
> Num (which would be necessary, because it's "class (Num b) => Bits
> b"). My question is: Why not?
>
> [...]
> quite trivial... Why
Deniz Dogan wrote:
>> instance Num Bool where
>>(+) False = id
>>(+) True = not
>>
>>(*) True True = True
>>(*) _ _= False
>>
>
> Isn't "XOR" for booleans (/=)?
Oh right. And (*) would be (&&):
instance Num Bool where
(+) = (/=)
(*) = (&&)
-- ...
//Stephan
2009/5/8 Stephan Friedrichs :
> Hi!
>
> When looking for an xor function, I found one in Data.Bits but couldn't
> use it for Bool, because Bool is no instance of Bits and of Num (which
> would be necessary, because it's "class (Num b) => Bits b"). My question
> is: Why not?
>
> We could declare
>
>
Hi!
When looking for an xor function, I found one in Data.Bits but couldn't
use it for Bool, because Bool is no instance of Bits and of Num (which
would be necessary, because it's "class (Num b) => Bits b"). My question
is: Why not?
We could declare
instance Num Bool where
(+) False = id
http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello Jan,
the principle of duality in category theory is not like "being the
inverse", but more like "stating the same somewhere else". To each
category there is an opposite category, which is just the same, but with
all arrows flipped. A comonad in the original category is then a monad
in the
j.waldmann wrote on 08.05.2009 17:39:
Wow. This is really a bikeshed discussion. My post contained praise for the
book,
a critique of one of its design decisions (intermediate language not
explicitely typed),
and a syntactical remark. Guess what the discussion is about.
(This is also known as
Wow. This is really a bikeshed discussion. My post contained praise for the
book,
a critique of one of its design decisions (intermediate language not
explicitely typed),
and a syntactical remark. Guess what the discussion is about.
(This is also known as http://www.haskell.org/haskellwiki/Wadler
Am Freitag 08 Mai 2009 13:23:09 schrieb Wolfgang Jeltsch:
> Am Donnerstag, 7. Mai 2009 14:42 schrieb Daniel Fischer:
> > Of course, if centuries ago people had decided to write the argument
> > before the function, composition would've been defined the other way
> > round. They haven't.
>
> Algebra
Seems like I was wrong. It does satisfy comonad laws. Sorry.
However, the "duality" of monads and comonads isn't that simple. A comonad is actually a monad itself, but in different category. It has nothing
to do with inverse functions etc.
Jan Christiansen wrote on 08.05.2009 14:47:
Hi,
I ha
Hi,
On 08.05.2009, at 13:14, Miguel Mitrofanov wrote:
I have a question regarding the connection between monads and
comonads. I always thought of the comonad operations as being the
inverse operations of the corresponding monad functions.
That's not true.
I thought there is some kind of
Am Donnerstag, 7. Mai 2009 14:42 schrieb Daniel Fischer:
> Of course, if centuries ago people had decided to write the argument before
> the function, composition would've been defined the other way round.
> They haven't.
Algebraists used to write x f instead of f(x) at least in the 1980s. I think
I have a question regarding the connection between monads and comonads.
I always thought of the comonad operations as being the inverse
operations of the corresponding monad functions.
That's not true.
If this is the case I would like to know what the corresponding monad
for the following com
Hi,
I have a question regarding the connection between monads and
comonads. I always thought of the comonad operations as being the
inverse operations of the corresponding monad functions. As I do not
know the underlying theory I thought I simply ask the masters.
Is there a formal verific
Hello Jason,
Thursday, May 7, 2009, 9:06:33 PM, you wrote:
>> you are right again. so, that remains: you shouldn't suppose that
>> user have read 90's GC paper. give a short excerpt of it: how
>> generational GC works and how memory usage converts to memory
>> footprint. then descriptions of RTS
Hello Ketil,
Friday, May 8, 2009, 10:49:23 AM, you wrote:
>> FWIW, the JVM also fails to release memory resources back to the
>> OS. Given all the problems I've seen that one cause for long-running
>> processes, I'm definitely in support of correcting any behavior like
>> this in the GHC RTS.
>
Nikhil Patil writes:
> I am curious to know if there is a function in Haskell to find if a certain
> value has already been evaluated. The function I need would have the type:
>
>> (?!) :: a -> Bool
Well, obviously you can't do this, it would violate referential
transparency. Except if you defi
46 matches
Mail list logo