Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Audio packages (Sourabh)
2. Re: Audio packages (Antoine Latter)
3. Re: suggestions for optimizing sudoku solver (Peter Hall)
4. Re: Audio packages (Sourabh)
5. Re: suggestions for optimizing sudoku solver (Ray Song)
----------------------------------------------------------------------
Message: 1
Date: Mon, 2 Jan 2012 11:37:45 -0800
From: Sourabh <[email protected]>
Subject: Re: [Haskell-beginners] Audio packages
To: [email protected]
Message-ID:
<CAK0HM3ks5gNxzCPE2j=ECW0Fy9coR=cjxj9skub3cxorxbm...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
> ghc-pkg check
There are problems in package Cabal-1.10.1.0:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
Warning: library-dirs: C:\SDL-1.2.14\lib doesn't exist or isn't a directory
Warning: include-dirs: C:\SDL-1.2.14\include\SDL doesn't exist or isn't a
direct
ory
There are problems in package process-1.0.1.5:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
There are problems in package language-c-0.4.2:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
There are problems in package language-c-0.3.2.1:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
There are problems in package hpc-0.5.0.6:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
There are problems in package haskell98-1.1.0.1:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
There are problems in package ghc-7.0.3:
dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
exist
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
Cabal-1.10.1.0
process-1.0.1.5
language-c-0.4.2
language-c-0.3.2.1
hpc-0.5.0.6
haskell98-1.1.0.1
ghc-7.0.3
haskell-src-1.0.1.4
haskell-platform-2011.2.0.1
bin-package-db-0.0.0.0
On Sun, Jan 1, 2012 at 12:05 PM, Antoine Latter <[email protected]> wrote:
> Can you run 'ghc-pkg check' and email the list the output?
>
> On Sun, Jan 1, 2012 at 12:51 PM, Sourabh <[email protected]>
> wrote:
> > Thanks for the reply. I will give wxHaskell a shot for the audio.
> >
> > Any ideas on how to resolve #2?
> >
> >> Finally, I have started getting this error every time I do a cabal
> install
> >> now:
> >> Setup.hs:1:8:
> >> Could not find module `Distribution.Simple':
> >> Use -v to see a list of the files searched for.
> >> 2. What should I do to get cabal to start installing stuff again?
> >
> > _______________________________________________
> > Beginners mailing list
> > [email protected]
> > http://www.haskell.org/mailman/listinfo/beginners
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120102/58a75331/attachment-0001.htm>
------------------------------
Message: 2
Date: Mon, 2 Jan 2012 17:58:12 -0600
From: Antoine Latter <[email protected]>
Subject: Re: [Haskell-beginners] Audio packages
To: Sourabh <[email protected]>
Cc: [email protected]
Message-ID:
<CAKjSnQEwfw-W0QVKgW=cw0izfypx-xndyfvxxktuuxmtyfz...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Mon, Jan 2, 2012 at 1:37 PM, Sourabh <[email protected]> wrote:
>
>> ghc-pkg check
>
Okay! Now let us know what the result of "ghc-pkg list directory" is.
I'm expecting you have a user installation of the "directory" package,
which is shadowing the system-wide install, which breaks all of the
packages that are built against the system-wide version.
We can remove the use install of "directory", but that will require
transitively removing all of your user packages which you've installed
against your user version of "directory". This shouldn't be too bad.
Antoine
> There are problems in package Cabal-1.10.1.0:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
> Warning: library-dirs: C:\SDL-1.2.14\lib doesn't exist or isn't a directory
> Warning: include-dirs: C:\SDL-1.2.14\include\SDL doesn't exist or isn't a
> direct
> ory
> There are problems in package process-1.0.1.5:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
> There are problems in package language-c-0.4.2:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
> There are problems in package language-c-0.3.2.1:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
> There are problems in package hpc-0.5.0.6:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
> There are problems in package haskell98-1.1.0.1:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
> There are problems in package ghc-7.0.3:
> ? dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> exist
>
> The following packages are broken, either because they have a problem
> listed above, or because they depend on a broken package.
> Cabal-1.10.1.0
> process-1.0.1.5
> language-c-0.4.2
> language-c-0.3.2.1
> hpc-0.5.0.6
> haskell98-1.1.0.1
> ghc-7.0.3
> haskell-src-1.0.1.4
> haskell-platform-2011.2.0.1
> bin-package-db-0.0.0.0
>
> On Sun, Jan 1, 2012 at 12:05 PM, Antoine Latter <[email protected]> wrote:
>>
>> Can you run 'ghc-pkg check' and email the list the output?
>>
>> On Sun, Jan 1, 2012 at 12:51 PM, Sourabh <[email protected]>
>> wrote:
>> > Thanks for the reply. I will give wxHaskell a shot for the audio.
>> >
>> > Any ideas on how to resolve #2?
>> >
>> >> Finally, I have started getting this error every time I do a cabal
>> >> install
>> >> now:
>> >> Setup.hs:1:8:
>> >>??? Could not find module `Distribution.Simple':
>> >>????? Use -v to see a list of the files searched for.
>> >> 2. What should I do to get cabal to start installing stuff again?
>> >
>> > _______________________________________________
>> > Beginners mailing list
>> > [email protected]
>> > http://www.haskell.org/mailman/listinfo/beginners
>> >
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
------------------------------
Message: 3
Date: Tue, 3 Jan 2012 00:09:28 +0000
From: Peter Hall <[email protected]>
Subject: Re: [Haskell-beginners] suggestions for optimizing sudoku
solver
To: Michael Serra <[email protected]>, [email protected]
Message-ID:
<CAA6hAk4ypcSRJMA6KvJmprkOyQtWKdrOYMANSyqu6d=uvy7...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Thanks,
It was really just an exercise that I'd set myself, and I wouldn't buy
a book just for that. But, you're second person to recommend it to me,
and it should have some good insight that will help me think the right
way about other problems, so I've ordered it.
Any other more general comments about my code?
Peter
On Mon, Jan 2, 2012 at 11:01 PM, Michael Serra <[email protected]> wrote:
> This book by Richard Bird covers optimizing a Sudoku solver with equational
> reasoning, along with quite a few other algorithms.
>
> On Sun, Jan 1, 2012 at 9:27 PM, Peter Hall <[email protected]> wrote:
>>
>> I set myself a learning task of writing a sudoku solver.
>> (https://github.com/peterjoel/sudoku/blob/master/src/Sudoku.hs)
>> It works pretty well, but struggles with some of the harder grids.
>> e.g. data/hard4.txt and data/hard5.txt take around 18 seconds to
>> solve. Obviously there's a limit, but I feel like I should be able to
>> make this faster.
>>
>> I think the main issue is reading/writing to the cells in the grid,
>> since (!!) is O(n). Even though it never has to go beyond index 8, it
>> will add up over the millions of times it has to do it. I imagine it
>> could be a lot faster if I use a static, non-list data structure, but
>> I was hoping to keep it a bit more flexible.
>>
>> Also, I'm struggling to get started with performance profiling. Can
>> someone point me to some good resources?
>>
>> Peter
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>
>
------------------------------
Message: 4
Date: Mon, 2 Jan 2012 16:27:53 -0800
From: Sourabh <[email protected]>
Subject: Re: [Haskell-beginners] Audio packages
To: [email protected]
Message-ID:
<cak0hm3num5wa1o5tnwon99vxc6bjwvurqp2yrb2hkf2tnvy...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Yeah, I did try to install the directory-1.1.0.0 thingy, which was a
pre-req to something else I needed.... I think that is when the problems
started.
Here is the output....
>ghc-pkg list directory
WARNING: there are broken packages. Run 'ghc-pkg check' for more details.
C:/Program Files (x86)/Haskell Platform/2011.2.0.1\lib\package.conf.d:
C:\Users\ssjoshi\AppData\Roaming\ghc\i386-mingw32-7.0.3\package.conf.d:
On Mon, Jan 2, 2012 at 3:58 PM, Antoine Latter <[email protected]> wrote:
> On Mon, Jan 2, 2012 at 1:37 PM, Sourabh <[email protected]> wrote:
> >
> >> ghc-pkg check
> >
>
> Okay! Now let us know what the result of "ghc-pkg list directory" is.
>
> I'm expecting you have a user installation of the "directory" package,
> which is shadowing the system-wide install, which breaks all of the
> packages that are built against the system-wide version.
>
> We can remove the use install of "directory", but that will require
> transitively removing all of your user packages which you've installed
> against your user version of "directory". This shouldn't be too bad.
>
> Antoine
>
> > There are problems in package Cabal-1.10.1.0:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> > Warning: library-dirs: C:\SDL-1.2.14\lib doesn't exist or isn't a
> directory
> > Warning: include-dirs: C:\SDL-1.2.14\include\SDL doesn't exist or isn't a
> > direct
> > ory
> > There are problems in package process-1.0.1.5:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> > There are problems in package language-c-0.4.2:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> > There are problems in package language-c-0.3.2.1:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> > There are problems in package hpc-0.5.0.6:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> > There are problems in package haskell98-1.1.0.1:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> > There are problems in package ghc-7.0.3:
> > dependency "directory-1.1.0.0-3a2367d72569467a8af8a231656ff1b8" doesn't
> > exist
> >
> > The following packages are broken, either because they have a problem
> > listed above, or because they depend on a broken package.
> > Cabal-1.10.1.0
> > process-1.0.1.5
> > language-c-0.4.2
> > language-c-0.3.2.1
> > hpc-0.5.0.6
> > haskell98-1.1.0.1
> > ghc-7.0.3
> > haskell-src-1.0.1.4
> > haskell-platform-2011.2.0.1
> > bin-package-db-0.0.0.0
> >
> > On Sun, Jan 1, 2012 at 12:05 PM, Antoine Latter <[email protected]>
> wrote:
> >>
> >> Can you run 'ghc-pkg check' and email the list the output?
> >>
> >> On Sun, Jan 1, 2012 at 12:51 PM, Sourabh <[email protected]>
> >> wrote:
> >> > Thanks for the reply. I will give wxHaskell a shot for the audio.
> >> >
> >> > Any ideas on how to resolve #2?
> >> >
> >> >> Finally, I have started getting this error every time I do a cabal
> >> >> install
> >> >> now:
> >> >> Setup.hs:1:8:
> >> >> Could not find module `Distribution.Simple':
> >> >> Use -v to see a list of the files searched for.
> >> >> 2. What should I do to get cabal to start installing stuff again?
> >> >
> >> > _______________________________________________
> >> > Beginners mailing list
> >> > [email protected]
> >> > http://www.haskell.org/mailman/listinfo/beginners
> >> >
> >
> >
> >
> > _______________________________________________
> > Beginners mailing list
> > [email protected]
> > http://www.haskell.org/mailman/listinfo/beginners
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120102/f789bd01/attachment-0001.htm>
------------------------------
Message: 5
Date: Tue, 3 Jan 2012 02:07:00 +0000
From: Ray Song <[email protected]>
Subject: Re: [Haskell-beginners] suggestions for optimizing sudoku
solver
To: [email protected]
Cc: [email protected]
Message-ID:
<CAN30aBHsmimNC8KtFpf5ZHgZ=jt1khrohwghpemg0cd_0mz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
An array with destructive updates (IO/ST) may help. You can also look into
the exact cover problem and dancing links. If I recall correctly, this
problem can be transformed to a 729*324 matrix.
? 2012-1-3 ??8:10?"Peter Hall" <[email protected]>???
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120103/e61812f9/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 43, Issue 3
****************************************