zaxis writes:
>>>Why do you bother with the interior definition of f in there?
> Because i want to try a C code style not layout style without `do` syntax
> sugar .
Haskell /= C, so stop trying to code as if it is. If you like C so
much, then use C.
--
Ivan Lazar Miljenovic
ivan.miljeno...@g
David Menendez wrote:
On Sat, Mar 27, 2010 at 12:56 AM, Thomas DuBuisson
wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It went down to
10s.
Bang patte
>>Why do you bother with the interior definition of f in there?
Because i want to try a C code style not layout style without `do` syntax
sugar .
Yusaku Hashimoto wrote:
>
>>> fac n = let { f = foldr (*) 1 [1..n] } in f
>>
>> Why do you bother with the interior definition of f in there?
>>
>>
I just start ghci from shell and do nothing else. In fact, i really donot
know `Monad ((->) a) ` . Would you mind expplain it ?
Yusaku Hashimoto wrote:
>
> Did you import the module includes the instance of Monad ((->) e)
> somewhere in your code loaded in ghci?
>
> I tried this on a fresh ghc
On Sat, Mar 27, 2010 at 12:56 AM, Thomas DuBuisson
wrote:
>> Using bang patterns didn't help almost anything here. Using rem
>> instead of mod made the time go from 45s to 40s. Now, using -fvia-C
>> really helped (when I used rem but not using mod). It went down to
>> 10s.
>
> Bang patterns should
> Using bang patterns didn't help almost anything here. Using rem
> instead of mod made the time go from 45s to 40s. Now, using -fvia-C
> really helped (when I used rem but not using mod). It went down to
> 10s.
Bang patterns should have helped tons - it isn't GHC thats at fault
here and yes it do
On Fri, Mar 26, 2010 at 6:49 PM, Jason Dagit wrote:
>
>
> On Fri, Mar 26, 2010 at 2:33 PM, Bryan O'Sullivan
> wrote:
>>
>> On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida
>> wrote:
>>>
>>> During a talk with a friend I came up with two programs, one written in
>>> C and another in hask
On Fri, Mar 26, 2010 at 10:42 PM, Bernie Pope wrote:
> On 27 March 2010 04:46, Rafael Cunha de Almeida wrote:
>
>> During a talk with a friend I came up with two programs, one written in
>> C and another in haskell.
>
> snip
>
>> The Haskell version:
>> real 0m45.335s
>> user 0m45.275s
>> s
I have to Point out that any such scheme as is being described would
need to be done quite carefully as to not break pass by reference data
semantics that Haskell enjoys/ the wealth of sharing
Moreover, as I understand it, something like this only is feasible in
general for statically sized data s
On Fri, Mar 26, 2010 at 6:16 PM, Felipe Lessa wrote:
> I'd guess that the LLVM backend could generate code that is at least
> as fast as gcc. It would be nice if you could test it.
NCG done with GHC 6.12.1 w/ -O3
LLVM using a version of HEAD w/ -O3
GCC version 4.4.3 w/ -O3
Please take note Johns
Hi,
I'm trying to solve the N-queens problem, but with a catch: I want to
generate solutions in a random order.
I know how to solve the N-queens problem; my solver (below) generates all
possible solutions. What I am trying to do is generate solutions in a
random order by somehow randomizing the
On 27 March 2010 04:46, Rafael Cunha de Almeida wrote:
> During a talk with a friend I came up with two programs, one written in
> C and another in haskell.
snip
> The Haskell version:
> real 0m45.335s
> user 0m45.275s
> sys 0m0.004s
>
> against the C version:
> real 0m6.021s
> use
On Fri, Mar 26, 2010 at 9:13 PM, Ivan Lazar Miljenovic
wrote:
> David Menendez writes:
>> On Fri, Mar 26, 2010 at 8:59 PM, Ivan Lazar Miljenovic
>> wrote:
>>> Some definitions and exports got changed, so in 6.12 the (-> a) Monad
>>> instance is exported whereas in 6.10 it isn't.
>>
>> What? Fro
>> fac n = let { f = foldr (*) 1 [1..n] } in f
>
> Why do you bother with the interior definition of f in there?
>
> fac = product . enumFromTo 1
let fac = do is_zero <- (==0); if is_zero then return 1 else liftM2
(*) id (fac . pred)
-nwn
On Sat, Mar 27, 2010 at 9:59 AM, Ivan Lazar Miljenovic
I'd guess that the LLVM backend could generate code that is at least
as fast as gcc. It would be nice if you could test it.
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
David Menendez writes:
> On Fri, Mar 26, 2010 at 8:59 PM, Ivan Lazar Miljenovic
> wrote:
>> Some definitions and exports got changed, so in 6.12 the (-> a) Monad
>> instance is exported whereas in 6.10 it isn't.
>
> What? From where?
>
> I thought the whole reason the Monad ((->) a) instance was
On Fri, Mar 26, 2010 at 8:59 PM, Ivan Lazar Miljenovic
wrote:
> zaxis writes:
>> In 6.10.4_1 under freebsd
>>> let f x y z = x + y + z
>> *Money> :t f
>> f :: (Num a) => a -> a -> a -> a
>>
>>> :t (>>=) . f
>> (>>=) . f :: (Monad ((->) a), Num a) => a -> ((a -> a) -> a -> b) -> a -> b
>>> ((>>=)
zaxis writes:
> In 6.10.4_1 under freebsd
>> let f x y z = x + y + z
> *Money> :t f
> f :: (Num a) => a -> a -> a -> a
>
>> :t (>>=) . f
> (>>=) . f :: (Monad ((->) a), Num a) => a -> ((a -> a) -> a -> b) -> a -> b
>> ((>>=) . f) 1 (\f x -> f x) 2
>
> :1:1:
> No instance for (Monad ((->) a))
Did you import the module includes the instance of Monad ((->) e)
somewhere in your code loaded in ghci?
I tried this on a fresh ghci 6.12, but I got "No instance" error.
-nwn
On Sat, Mar 27, 2010 at 9:20 AM, zaxis wrote:
>
> In 6.12.1 under archlinux
>>let f x y z = x + y + z
>> :t f
> f :: (N
On Fri, Mar 26, 2010 at 8:20 PM, zaxis wrote:
>
> In 6.12.1 under archlinux
>>let f x y z = x + y + z
>> :t f
> f :: (Num a) => a -> a -> a -> a
>
>> :t (>>=) . f
> (>>=) . f :: (Num a) => a -> ((a -> a) -> a -> b) -> a -> b
>> ((>>=) . f) 1 (\f x -> f x) 2
> 5
>
> In 6.10.4_1 under freebsd
>> let
In 6.12.1 under archlinux
>let f x y z = x + y + z
> :t f
f :: (Num a) => a -> a -> a -> a
> :t (>>=) . f
(>>=) . f :: (Num a) => a -> ((a -> a) -> a -> b) -> a -> b
> ((>>=) . f) 1 (\f x -> f x) 2
5
In 6.10.4_1 under freebsd
> let f x y z = x + y + z
*Money> :t f
f :: (Num a) => a -> a -> a ->
On Fri, Mar 26, 2010 at 10:52 PM, Mads Lindstrøm
wrote:
> Hi
>
> On Fri, 2010-03-26 at 21:33 +, Sebastian Sylvan wrote:
>
> >
> >
> > Reorganizing data on the fly sounds like it may be a pretty sensible
> > idea now that cache misses are so bad (in comparison). The fact that
> > Haskell data i
Hi
On Fri, 2010-03-26 at 21:33 +, Sebastian Sylvan wrote:
>
>
> Reorganizing data on the fly sounds like it may be a pretty sensible
> idea now that cache misses are so bad (in comparison). The fact that
> Haskell data is generally immutable helps too.
> However, I think your scheme sounds
On Fri, Mar 26, 2010 at 2:33 PM, Bryan O'Sullivan wrote:
> On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida <
> almeida...@gmail.com> wrote:
>
>>
>> During a talk with a friend I came up with two programs, one written in
>> C and another in haskell.
>
>
> Your Haskell code builds a huge t
Hi
On Fri, 2010-03-26 at 21:24 +, Sebastian Sylvan wrote:
>
>
> On Fri, Mar 26, 2010 at 9:21 PM, Brandon S. Allbery KF8NH
> wrote:
> On Mar 26, 2010, at 16:28 , Mads Lindstrøm wrote:
> For some time I have been thinking about an idea,
> which could li
On 26 mrt 2010, at 22:37, Alexandru Scvortov wrote:
> How stable is it?
I don't know. I remember that we didn't have to change anything and that
everything just worked.
> Was it easy to use?
Actually yes, because:
> Did it have enough documentation?
I think we used the Java documentation. Th
How stable is it?
Was it easy to use?
Did it have enough documentation?
Do you think it could use a rewrite? If so, what should be done differently?
Could it be extended into something more?
(sorry for the barrage of questions, but you're the one person I've seen so
far, apart from the origi
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida <
almeida...@gmail.com> wrote:
>
> During a talk with a friend I came up with two programs, one written in
> C and another in haskell.
Your Haskell code builds a huge thunked accumulator value, so of course it's
slow (put bang patterns on
On Fri, Mar 26, 2010 at 8:28 PM, Mads Lindstrøm wrote:
> Hi
>
> For some time I have been thinking about an idea, which could limit
> Haskell's memory footprint. I don't know if the idea is crazy or clever,
> but I would love to hear peoples thoughts about it. The short story is,
> I propose that
We've used this library to generate a prototype JVM backend for UHC about a
year ago, and it Just Worked. That was probably on 6.10 or 6.8.
-chris
On 26 mrt 2010, at 21:33, Brian Alliet wrote:
> On Fri, Mar 26, 2010 at 08:01:57PM +, Alexandru Scvortov wrote:
>> I'm thinking of writing a lib
On Fri, Mar 26, 2010 at 11:21 PM, Brandon S. Allbery KF8NH
wrote:
> On Mar 26, 2010, at 16:28 , Mads Lindstrøm wrote:
>>
>> For some time I have been thinking about an idea, which could limit
>> Haskell's memory footprint. I don't know if the idea is crazy or clever,
>
> This is called pointer tag
On Fri, Mar 26, 2010 at 9:21 PM, Brandon S. Allbery KF8NH <
allb...@ece.cmu.edu> wrote:
> On Mar 26, 2010, at 16:28 , Mads Lindstrøm wrote:
>
>> For some time I have been thinking about an idea, which could limit
>> Haskell's memory footprint. I don't know if the idea is crazy or clever,
>>
>
> Th
On Mar 26, 2010, at 16:29 , Warren Harris wrote:
FWIW, downloading the haskell-platform-2010.1.0.0 tarball and
building it on my 10.5.8 system (with ghc 6.12.1 installed from the
dmg) worked just fine. Didn't take too long either. Unfortunately I
don't see any telltale linker options in the
On Mar 26, 2010, at 16:28 , Mads Lindstrøm wrote:
For some time I have been thinking about an idea, which could limit
Haskell's memory footprint. I don't know if the idea is crazy or
clever,
This is called pointer tagging. The original STG design avoided it
because of the perceived perform
On Fri, Mar 26, 2010 at 08:01:57PM +, Alexandru Scvortov wrote:
> I'm thinking of writing a library for analyzing/generating/manipulating JVM
> bytecode. To be clear, this library would allow one to load and work with
> JVM
> classfiles; it wouldn't be a compiler, interpretor or a GHC backe
FWIW, downloading the haskell-platform-2010.1.0.0 tarball and building
it on my 10.5.8 system (with ghc 6.12.1 installed from the dmg) worked
just fine. Didn't take too long either. Unfortunately I don't see any
telltale linker options in the build logs.
Warren
On Mar 26, 2010, at 7:38 AM
Hi
For some time I have been thinking about an idea, which could limit
Haskell's memory footprint. I don't know if the idea is crazy or clever,
but I would love to hear peoples thoughts about it. The short story is,
I propose that the garbage collector should not just reclaim unused
memory, it sho
This is certainly something I could use.
John
--
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
I've got an idea for a Summer of Code project and I'd really appreciate some
feedback on it. If people generally find it interesting, I'll go into more
detail.
GSoC: Haskell JVM bytecode library
==
What
I'm thinking of writing a library for analyzing
On 03/25/10 12:36, Simon Marlow wrote:
I'd also be amenable to having block/unblock count nesting levels
instead, I don't think it would be too hard to implement and it wouldn't
require any changes at the library level.
Wasn't there a reason that it didn't nest?
I think it was that operations
Here are jhc's timings for the same programs on my machine. gcc and ghc
both used -O3 and jhc had its full standard optimizations turned on.
jhc:
./hs.out 5.12s user 0.07s system 96% cpu 5.380 total
gcc:
./a.out 5.58s user 0.00s system 97% cpu 5.710 total
ghc:
./try 31.11s user 0.00s system 9
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida <
almeida...@gmail.com> wrote:
> Hello,
>
> During a talk with a friend I came up with two programs, one written in
> C and another in haskell.
>
> Haskell
>main :: IO ()
>main = print $ rangeI 0 0
>
>rangeK :: Int -
Hello,
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
Haskell
main :: IO ()
main = print $ rangeI 0 0
rangeK :: Int -> Int -> Int -> Int -> Int
rangeK i j k acc
| k < 1000 =
if
On Fri, 2010-03-26 at 17:06 +, Duncan Coutts wrote:
> On Fri, 2010-03-26 at 16:50 +, Maciej Piechotka wrote:
> > On Fri, 2010-03-26 at 13:29 +, Duncan Coutts wrote:
> > > On Fri, 2010-03-26 at 02:11 +, Maciej Piechotka wrote:
> > > > Hello,
> > > >
> > > > I have written patch (at
On Fri, 2010-03-26 at 13:29 +, Duncan Coutts wrote:
> On Fri, 2010-03-26 at 02:11 +, Maciej Piechotka wrote:
> > Hello,
> >
> > I have written patch (attached) which introduce new API for zlib -
> > personally I wrote it to have easy implementation of
> > compression/decompression in itera
On Fri, Mar 26, 2010 at 3:43 PM, Gregory Collins
wrote:
> Matthew Brecknell writes:
>
>> And is confirmed by a simple test (with GHC 6.10.4 on Linux):
>>
>> import Prelude hiding(catch)
>> import Control.Concurrent
>> import Control.Exception
>>
>> main = do
>> chan <- newEmptyMVar
>> done <-
On Fri, Mar 26, 2010 at 11:07 AM, Edward Kmett wrote:
>
> On Fri, Mar 26, 2010 at 11:04 AM, Edward Kmett wrote:
>>
>> -- as long as you're ignoring 'seq'
>> terminateSeq :: a -> Unit
>> terminateSeq a = a `seq` unit
>>
>
> Er ignore that language about seq. a `seq` unit is either another bottom o
On Fri, Mar 26, 2010 at 11:04 AM, Edward Kmett wrote:
>
> -- as long as you're ignoring 'seq'
> terminateSeq :: a -> Unit
> terminateSeq a = a `seq` unit
>
>
Er ignore that language about seq. a `seq` unit is either another bottom or
undefined, so there remains one canonical morphism even in the
On Mon, Mar 22, 2010 at 12:33 PM, Sjoerd Visscher wrote:
>
> Of course the are still a lot of things missing, especially in the details.
> And I'm a category theory beginner, so there will probably be some mistakes
> in there as well. F.e. Edward Kmett doesn't like () being the terminal
> object i
Maciej Piechotka writes:
> Hello,
>
> I have written patch (attached) which introduce new API for zlib -
> personally I wrote it to have easy implementation of
> compression/decompression in iteratee (example file - no yet working
> -attached).
+1, I need this also, and was planning on writing s
This FAQ on the sqlite website seems relevant:
http://www.sqlite.org/faq.html#q19
David
On Wed, Mar 24, 2010 at 5:34 PM, Vasyl Pasternak
wrote:
> Hi Jason,
>
> Your recommendations worked for me. When I enclosed updating into
> single transaction, the code executed in less than 0.5 seconds, whi
Matthew Brecknell writes:
> And is confirmed by a simple test (with GHC 6.10.4 on Linux):
>
> import Prelude hiding(catch)
> import Control.Concurrent
> import Control.Exception
>
> main = do
> chan <- newEmptyMVar
> done <- newEmptyMVar
> kill <- block $ forkIO $ do
> (takeMVar chan >>
Malcolm Wallace writes:
>> It's a known issue, and it's mine. If you (naively) just expect to link on
>> Snow Leopard without passing any special backwards-
>> compatibility flags, and have things work on Leopard, well, Apple has news
>> for you.
>
> gcc -mmacox-version-min=10.5.8 ?
Something
It's a known issue, and it's mine. If you (naively) just expect to
link on Snow Leopard without passing any special backwards-
compatibility flags, and have things work on Leopard, well, Apple
has news for you.
gcc -mmacox-version-min=10.5.8 ?
Regards,
Malcolm
Han Joosten writes:
> Last weekend a new version of the haskell platform has been released. I was
> expecting that also for windows the ghc 6.12 would be in it. However, when I
> follow the link:
>
> http://hackage.haskell.org/platform/windows.html
>
> I still get the 'old' version (2009.2.0.2) w
Last weekend a new version of the haskell platform has been released. I was
expecting that also for windows the ghc 6.12 would be in it. However, when I
follow the link:
http://hackage.haskell.org/platform/windows.html
I still get the 'old' version (2009.2.0.2) which contains ghc 6.10
Is this
56 matches
Mail list logo