Hi Dmitry,
Thanks for the links. I've been through the 24 Days of Hackage, but I
think its time to run through them again now that I'm a little more
familiar with everything.
Why do you think browsing function by function is a bad idea? It seems
that knowing exactly what the most used
Hi Cafe,
I have two programs for the same problem Eight queens problem,
the link is http://www.haskell.org/haskellwiki/99_questions/90_to_94.
My two grograms only has little difference, but the performance, this is
my solution:
-- solution
Junior White efi...@gmail.com писал(а) в своём письме Tue, 29 Jan 2013
12:25:49 +0300:
The only different in the two program is in the first is q - [1..n], qs
- queens' (k-1), and the second is qs - queens' (k-1), q - [1..n].
In the first case `queens' (k-1)` is being recomputed for every q
Hi Artyom,
Thanks! But I don't understand why in the first case queens' (k-1) is
being recomputed n times?
On Tue, Jan 29, 2013 at 5:31 PM, Artyom Kazak artyom.ka...@gmail.comwrote:
Junior White efi...@gmail.com писал(а) в своём письме Tue, 29 Jan 2013
12:25:49 +0300:
The only
Junior White efi...@gmail.com писал(а) в своём письме Tue, 29 Jan 2013
12:40:08 +0300:
Hi Artyom,
Thanks! But I don't understand why in the first case queens' (k-1)
is
being recomputed n times?
Because your list comprehension is just a syntactic sugar for
concatMap (\q -
Thanks again! I understand now. I'll be careful when the next time I use
list comprehension.
On Tue, Jan 29, 2013 at 5:48 PM, Artyom Kazak artyom.ka...@gmail.comwrote:
Junior White efi...@gmail.com писал(а) в своём письме Tue, 29 Jan 2013
12:40:08 +0300:
Hi Artyom,
Thanks! But I don't
So this is a problem in lazy evaluation language, it will not appear in
python or erlang, am i right?
On Tue, Jan 29, 2013 at 5:54 PM, Junior White efi...@gmail.com wrote:
Thanks again! I understand now. I'll be careful when the next time I use
list comprehension.
On Tue, Jan 29, 2013 at
On Tue, 29 Jan 2013 09:23:34 +0100, Casey Basichis
caseybasic...@gmail.com wrote:
I guess what I'm looking for doesn't exist, which is what it is. I'm
just
interested in why it's not an ideal way to take in Haskell, starting with
the common and moving to the to rare.
It is worth while
Junior White efi...@gmail.com писал(а) в своём письме Tue, 29 Jan 2013
12:59:31 +0300:
So this is a problem in lazy evaluation language, it will not appear in
python or erlang, am i right?
Not quite. Compilers of imperative languages don’t perform CSE (common
subexpression elimination)
On Tuesday 29 January 2013, 03:27:41, Artyom Kazak wrote:
Hi!
I’ve always thought that `quotRem` is faster than `quot` + `rem`, since
both `quot` and `rem` are just wrappers that compute both the quotient
and the remainder and then just throw one out. However, today I looked
into the
Shachaf Ben-Kiki shac...@gmail.com писал(а) в своём письме Tue, 29 Jan
2013 09:09:37 +0300:
That code is from base 4.5. Here's base 4.6:
quotRem x@(I32# x#) y@(I32# y#)
| y == 0 = divZeroError
-- Note [Order of tests]
| y == (-1) x ==
On Sun, Jan 27, 2013 at 12:20:25AM +, Roman Cheplyaka wrote:
Very nice! This can be generalized to arbitrary arrows:
{-# LANGUAGE ExistentialQuantification #-}
import Prelude hiding (id)
import Control.Arrow
import Control.Applicative
import Control.Category
data F
Today I thought it was about time to simplify how new 'things' of a certain
kind are added to the system. These things are some a cross between an event
and an assertion of a fact in a rule based system. There are many different
kinds of these things. I already have more than a dozen
Hi Chris,
With the following type, and transformation functions:
data Odd = OddOne Even | OddZero Even deriving
(Data,Typeable,Show)
data Even = EvenOne Odd | EvenZero Odd | Nil deriving
(Data,Typeable,Show)
t1,t2,t3 :: Even - Maybe Even
But if one of the
Hi,
tl;dr: I'm planning on removing the String instances from the HTTP
package. This is likely to break code. Obviously it will involve a major
version bump.
The basic reason is that this instance is rather broken in itself. A
String ought to represent Unicode data, but the HTTP wire format is
On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam gan...@earth.li wrote:
tl;dr: I'm planning on removing the String instances from the HTTP
package. This is likely to break code. Obviously it will involve a major
version bump.
The basic reason is that this instance is rather broken in
`Control.Exception.bracket` is a nice function to acquire and release a
resource in a small context.
But, how should I handle resources that are hold for a long time?
Should I put `Control.Exception.finally` on every single line of my
finalizers?
What exceptions may occur on an IO operation?
Hi,
The pattern is essentially the same as in imperative languages; every
allocation should involve a finally clause that deallocates the
resource.
On Tue, Jan 29, 2013 at 2:59 PM, Thiago Negri evoh...@gmail.com wrote:
Should I put `Control.Exception.finally` on every single line of my
On 29/01/2013, at 10:59 PM, Junior White wrote:
So this is a problem in lazy evaluation language, it will not appear in
python or erlang, am i right?
Wrong. Let's take Erlang:
[f(X, Y) || X - g(), Y - h()]
Does the order of the generators matter here?
You _bet_ it does.
First off,
On 1/29/13 4:25 AM, Junior White wrote:
Hi Cafe,
I have two programs for the same problem Eight queens problem,
the link is http://www.haskell.org/haskellwiki/99_questions/90_to_94.
My two grograms only has little difference, but the performance, this is
my solution:
The difference is
On 29/01/2013 22:46, Johan Tibell wrote:
On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam gan...@earth.li wrote:
tl;dr: I'm planning on removing the String instances from the HTTP
package. This is likely to break code. Obviously it will involve a major
version bump.
I think it's the
21 matches
Mail list logo