Ross Paterson | 1 Dec 02:02 2008
Picon

Re: Compilers

On Sun, Nov 30, 2008 at 08:50:51AM -0800, John Meacham wrote:
> And creating a crippled version of something you wrote and passing it
> off as the original, in a way that clearly breaks things for other
> people definitely is something to get upset about.

There was a discussion of this issue on the libraries list in June/July,
resulting in an agreed policy being added to the hackage upload page,
including:

	If a package is being maintained, any release not approved and
	supported by the maintainer should use a different package name.

I am also willing to remove any release with an unchanged name and
made without the support of the maintainer.  You have made clear that
the DrIFT-2.2.3 upload is in that category, so I have now removed it.
Looking through, the only other package I spotted that might be such
is HsASA-0.1 -- please let me know about this one, and any others
I've missed.
ajb | 1 Dec 02:54 2008
Picon

Re: The Knight's Tour: solutions please

G'day all.

Quoting Don Stewart <dons <at> galois.com>:

> So, team, anyone want to implement a Knight's Tour solver in a list
> monad/list comprehension one liner? These little puzzles are made for
> fast languages with backtracking monads....

I conjecture that any one-liner won't be efficient.

Anyway, here's my ~30 min attempt.  The showBoard and main are both very
quick and dirty, and I'm sure someone can do much better.

I particularly like the fact that changing "Maybe" to "[]" will make
knightsTour return all tours starting at the upper left-hand corner,
rather than just one.  Warm fuzzy things rule.

Cheers,
Andrew Bromage

module Main where

import qualified Data.Set as S
import Data.List
import Data.Function
import Control.Arrow
import Control.Monad
import System

knightsTour :: Int -> Maybe [(Int,Int)]
(Continue reading)

Don Stewart | 1 Dec 02:53 2008

Re: The Knight's Tour: solutions please

ajb:
> G'day all.
> 
> Quoting Don Stewart <dons <at> galois.com>:
> 
> >So, team, anyone want to implement a Knight's Tour solver in a list
> >monad/list comprehension one liner? These little puzzles are made for
> >fast languages with backtracking monads....
> 
> I conjecture that any one-liner won't be efficient.
> 
> Anyway, here's my ~30 min attempt.  The showBoard and main are both very
> quick and dirty, and I'm sure someone can do much better.
> 
> I particularly like the fact that changing "Maybe" to "[]" will make
> knightsTour return all tours starting at the upper left-hand corner,
> rather than just one.  Warm fuzzy things rule.
> 
> Cheers,
> Andrew Bromage
> 
> module Main where
> 
> import qualified Data.Set as S
> import Data.List
> import Data.Function
> import Control.Arrow
> import Control.Monad
> import System
> 
(Continue reading)

Brent Yorgey | 1 Dec 02:55 2008

Haskell Weekly News: Issue 95 - November 30, 2008

---------------------------------------------------------------------------
Haskell Weekly News
http://sequence.complete.org/hwn/20081130
Issue 95 - November 30, 2008
---------------------------------------------------------------------------

   Welcome to issue 95 of HWN, a newsletter covering developments in the
   [1]Haskell community.

   Real World Haskell is [2]finally here! [3]Read it online, and/or [4]get
   your own dead tree copy. Better yet, get two copies, one for yourself
   and one for a friend. The fifteenth [5]Haskell Communities and
   Activities Report is also here---check out all the exciting stuff being
   worked on in the Haskell world!

Announcements

   HCAR. Janis Voigtlaender [6]announced the 15th edition of the
   [7]Haskell Communities and Activities Report (HCAR) is now available!

   Not quite another Haskell tutorial, but .... Janis Voigtlaender
   [8]announced that he submitted his [9]Habilitation thesis last week.
   The first few chapters of it try to give an introduction to Haskell
   with emphasis on types and reasoning principles.

   hledger 0.2. Simon Michael [10]announced version 0.2 of
   [http://joyful.com/hledger hledger, a minimal haskell clone of John
   Wiegley's [11]"ledger" text-based accounting tool.

   darcs zlib error workaround. Eric Kow [12]outlined workarounds and
(Continue reading)

John Meacham | 1 Dec 03:06 2008
Picon

Re: Compilers

On Mon, Dec 01, 2008 at 01:02:40AM +0000, Ross Paterson wrote:
> I am also willing to remove any release with an unchanged name and
> made without the support of the maintainer.  You have made clear that
> the DrIFT-2.2.3 upload is in that category, so I have now removed it.
> Looking through, the only other package I spotted that might be such
> is HsASA-0.1 -- please let me know about this one, and any others
> I've missed.

No, that one is fine. I don't have any issues with my haskell _libraries_
being packaged up if done properly. Cabal has signifigantly more
utility for libraries than programs so the scales tip in its direction
more often then. Speaking of which, it would be nice if they were
seperated into two different sections on hackage. A few projects that
have both library and programs would be listed in both categories.

        John

--

-- 
John Meacham - ⑆repetae.net⑆john⑈
Dan Doel | 1 Dec 03:12 2008
Picon

Re: The Knight's Tour: solutions please

Here's a clean-up of my code (it even fits within the line-length limit of my 
mail client :)). Note that it's pretty much exactly the Python algorithm. When 
the Python program finds a solution, it prints the board and exits. Since 
that's evil IO type stuff, we noble functional folk instead set up an exit 
continuation using callCC, and call it when we find a solution. :)

I haven't bothered testing it against the Python version, but the backtracking 
solution I wrote with the Logic monad (and Data.Map) took around 50% more time 
than this.

-- Dan

---- snip ----

module Main where

import Control.Monad.Cont
import Control.Monad.ST

import Data.Array.ST
import Data.List
import Data.Ord
import Data.Ix

import System.Environment

type Square  = (Int, Int)
type Board s = STUArray s (Int,Int) Int
type ChessM r s = ContT r (ST s)
type ChessK r s = String -> ChessM r s ()
(Continue reading)

Don Stewart | 1 Dec 03:14 2008

Re: The Knight's Tour: solutions please

dan.doel:
> Here's a clean-up of my code (it even fits within the line-length limit of my 
> mail client :)). Note that it's pretty much exactly the Python algorithm. When 
> the Python program finds a solution, it prints the board and exits. Since 
> that's evil IO type stuff, we noble functional folk instead set up an exit 
> continuation using callCC, and call it when we find a solution. :)
> 
> I haven't bothered testing it against the Python version, but the backtracking 
> solution I wrote with the Logic monad (and Data.Map) took around 50% more time 
> than this.

I've created a wiki page,

    http://haskell.org/haskellwiki/The_Knights_Tour

I note the LogicT version is the shortest so far.

-- Don
oleg | 1 Dec 08:04 2008

The Knight's Tour: solutions please


It seems the following pure functional (except for the final printout)
version of the search has almost the same performance as the Dan
Doel's latest version with the unboxed arrays and callCC. For the board of
size 40, Dan Doel's version takes 0.047s on my computer; the version
below takes 0.048s. For smaller boards, the difference is
imperceptible. Interestingly, the file sizes of the compiled
executables (ghc -O2, ghc 6.8.2) are similar too: 606093 bytes for Dan
Doel's version, and 605938 bytes for the version below.

The version below is essentially Dan Doel's earlier version.  Since
the problem involves only pure search (rather than committed choice),
I took the liberty of substituting FBackTrack (efficient MonadPlus)
for LogicT. FBackTrack can too be made the instance of LogicT; there
has not been any demand for that though.

import Data.List
import Data.Ord
import qualified Data.IntMap as Map
import System.Environment
import FBackTrack
import Control.Monad

-- Emulate the 2-dimensional map as a nested 1-dimensional map
initmap n = Map.fromList $ (1,Map.singleton 1 1):[ (k,Map.empty) | k <- [2..n] ]
notMember (i,j) m = Map.notMember j $ Map.findWithDefault undefined i m
insrt (i,j) v m = Map.update (Just . Map.insert j v) i m
lkup (i,j) m = Map.findWithDefault undefined j $ 
	       Map.findWithDefault undefined i m
							     
(Continue reading)

Emil Axelsson | 1 Dec 08:06 2008
Picon
Picon

Combining licences

Hello,

I know very little about licensing, so I'm hoping to get some advice from you guys.

In the next release of Wired, I plan to include an open-source standard cell 
library (or rather data derived from it). This cell library has a custom license 
(found at the bottom of http://www.nangate.com/openlibrary). It appears to be 
very permissive, but it states that the license text "must be included in all 
copies of the Library, in whole or in part, and all derivative works of the 
Library". Wired itself is BSD3-licensed.

How do I arrange this in the package? Can I still have a BSD3 license for Wired? 
Where do I put the respective license texts? Any other things I should have in mind?

Or perhaps it's better to put the cell library in its own package? I'm a bit 
reluctant to do this, because it means that Wired will be essentially useless on 
its own.

Thanks,

/ Emil
Henning Thielemann | 1 Dec 09:48 2008
Picon

Re: Cabal


On Sun, 30 Nov 2008, Duncan Coutts wrote:

> On Sun, 2008-11-30 at 21:14 +0100, Henning Thielemann wrote:
>> On Sun, 30 Nov 2008, Don Stewart wrote:
>>
>>> lemming:
>>>>
>>>> Maybe you like to add a pointer in cabal-install.cabal/Homepage field to
>>>> this page.
>>>
>>> Good idea. Duncan?
>>
>> After I finished that article, I also found:
>>    http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
>
> I'm trying to work out what the best thing is to do with the Cabal
> documentation. Currently it's kind of patchy and spread over about three
> sites. There's the http://haskell.org/cabal website, the dev wiki and
> trac and the pages on the main Haskell.org wiki.

... and it's divided into cabal and cabal-install documentation. Though, 
this separation might also be sensible.

> I think ideally we'd have all the user documentation on the cabal
> website, including the docs for cabal-install. Unless people think
> that's a silly idea and we should just put everything on the haskellwiki
> system.

For me, access to HaskellWiki is the easiest, because I have no access to 
(Continue reading)


Gmane