Send Beginners mailing list submissions to beginners@haskell.org 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 beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Installing HDBC (Kathleen Lynch) 2. Re: Installing HDBC (Antoine Latter) 3. Re: Installing HDBC (Daniel Fischer) 4. Informal proof of bijective mapping between Naturals and Natural pairs (Lyndon Maydwell) 5. Any advice on installing gtk2hs (patricklynch) 6. Re: Any advice on installing gtk2hs (patricklynch) 7. Re: Any advice on installing gtk2hs (Daniel Fischer) 8. Re: Any advice on installing gtk2hs (aditya siram) ---------------------------------------------------------------------- Message: 1 Date: Mon, 31 Jan 2011 10:39:30 -0500 From: "Kathleen Lynch" <kmandpjly...@verizon.net> Subject: [Haskell-beginners] Installing HDBC To: <beginners@haskell.org> Message-ID: <5C05CA2B04F64D1C90797283F1DC3485@UserPC> Content-Type: text/plain; charset="iso-8859-1" Good morning, I'm trying to install Sqlite on a Windows PC... I'm using "Real World Haskell" as a guide in regard to this... It indicates that HDBC must be installed first and points to http://hackage.haskell.org/. I displayed this url and see the following in regard to downloading HDBC: Downloads a.. HDBC-2.2.6.1.tar.gz (Cabal source package) b.. package description (included in the package) If I'm correct, tar is a Unixy thing... Can someone tell me how to download this to a Windows Vista PC? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110131/14c54a0b/attachment-0001.htm> ------------------------------ Message: 2 Date: Mon, 31 Jan 2011 09:51:31 -0600 From: Antoine Latter <aslat...@gmail.com> Subject: Re: [Haskell-beginners] Installing HDBC To: Kathleen Lynch <kmandpjly...@verizon.net> Cc: beginners@haskell.org Message-ID: <aanlktinb_rxpouhjfkbceesdhr+nipcpvyt5lcerl...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Hello, If you've installed the Haskell Platform for Windows you should have the command-line tool cabal-install already installed. For many packages, the following will work: > cabal update > cabal install <package-name> This will fetch the tar.gz package from Hackage (as well as its transitive dependencies) and install them. I hear from Windows developers that even with these tools, it is still a chore to install certain packages and libraries on a Windows environment. But the above would be the place to start. Antoine Links: The Haskell Platform: http://hackage.haskell.org/platform/ Cabal install: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall On Mon, Jan 31, 2011 at 9:39 AM, Kathleen Lynch <kmandpjly...@verizon.net> wrote: > Good morning, > I'm trying to install Sqlite on a Windows PC... > I'm using "Real World Haskell" as a guide in regard to this... > It indicates that HDBC must be installed first and points to > http://hackage.haskell.org/. > > I displayed this url and see the following in regard to downloading HDBC: > > Downloads > > HDBC-2.2.6.1.tar.gz (Cabal source package) > package description (included in the package) > > If I'm correct, tar is a Unixy thing... > > Can someone tell me how to download this to a Windows Vista PC? > > Thank you > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > ------------------------------ Message: 3 Date: Mon, 31 Jan 2011 16:54:19 +0100 From: Daniel Fischer <daniel.is.fisc...@googlemail.com> Subject: Re: [Haskell-beginners] Installing HDBC To: beginners@haskell.org Message-ID: <201101311654.19463.daniel.is.fisc...@googlemail.com> Content-Type: text/plain; charset="utf-8" On Monday 31 January 2011 16:39:30, Kathleen Lynch wrote: > Good morning, > I'm trying to install Sqlite on a Windows PC... > I'm using "Real World Haskell" as a guide in regard to this... > It indicates that HDBC must be installed first and points to > http://hackage.haskell.org/. > > I displayed this url and see the following in regard to downloading > HDBC: Downloads > a.. HDBC-2.2.6.1.tar.gz (Cabal source package) > b.. package description (included in the package) > If I'm correct, tar is a Unixy thing... Windows can handle .tar.gz, but if you have the cabal executable (you should have it if you've installed the Haskell platform, otherwise you'll probably need it sooner or later anyway: http://www.haskell.org/cabal/download.html ), simply "cabal install HDBC" [1] in a command shell should work (unless there are some foreign [C] libraries missing, in which case you'd need to install those first). [1] before you can cabal install something, you first need to call "cabal update" to let cabal know what is available on hackage > > Can someone tell me how to download this to a Windows Vista PC? > > Thank you ------------------------------ Message: 4 Date: Tue, 1 Feb 2011 00:43:14 +0800 From: Lyndon Maydwell <maydw...@gmail.com> Subject: [Haskell-beginners] Informal proof of bijective mapping between Naturals and Natural pairs To: Beginners Haskell Mailinglist <beginners@haskell.org> Message-ID: <aanlktikjrm_jtfeh0c-fhp-phsqao5oconyq8ckjf...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Hi Beginners. I was musing over weather Naturals were isomorphic to Natural pairs and wrote the following "proof". I don't have any formal mathematical training beyond calculus, and was wondering if this was an okay approach to take, if there were any better techniques available, if my terminology makes sense, and if my use of Haskell could be improved. Any pointers would be greatly appreciated! The code follows, and is also available as a gist: https://gist.github.com/804248 ---------- import Control.Monad.Logic import Data.Maybe import Data.List import Data.Numbers.Primes import Test.QuickCheck -- This program demonstrates a mapping between the pairs of natural numbers and a subset of co-primes. -- The property should hold for all sized lists, not just pairs. Ordering is preserved. -- Question: Are we able to compress the range to create a bijection? -- Answer: Yes! We can use the breadth-wise indces of the products, rather than the products themselves. -- Pair to Number x_p = (evens !!) y_p = (odds !!) xy_p x y = x_p x * y_p y xy_c x = ns_nc . xy_p x -- Number to Pair p_xy n = (x,y) where x = fromJust $ findIndex (`divides` n) evens y = fromJust $ findIndex (`divides` n) odds c_xy = p_xy . nc_ns -- Sparse Number to Compact Number numbers = odds >>- \x -> evens >>- \y -> return (x*y) -- I don't really understand LogicT... :-( ns_nc n = fromJust $ findIndex (==n) numbers -- Compact Numner to Sparse Number nc_ns = (numbers !!) -- Helpers evens = map (primes !!) [0,2..] odds = map (primes !!) [1,3..] x `divides` y = y `mod` x == 0 -- Id referencing properties prop_p1 = forAll (elements [(x,y) | x <- [1..6], y <- [1..7]]) f where f (x,y) = (x,y) == c_xy (xy_c x y) prop_p2 = forAll (elements [1..100]) f where f c = c == uncurry xy_c (c_xy c) ------------------------------ Message: 5 Date: Mon, 31 Jan 2011 13:54:29 -0500 From: "patricklynch" <kmandpjly...@verizon.net> Subject: [Haskell-beginners] Any advice on installing gtk2hs To: <beginners@haskell.org> Message-ID: <6e796214ca804372b47d089e7431e...@stsv.com> Content-Type: text/plain; charset="us-ascii" Good afternoon, Any advice on installing gtk2hs. I used the instructions at: http://www.haskell.org/haskellwiki/Gtk2Hs and get a bunch of error messages. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110131/7176aa68/attachment-0001.htm> ------------------------------ Message: 6 Date: Mon, 31 Jan 2011 13:55:15 -0500 From: "patricklynch" <kmandpjly...@verizon.net> Subject: Re: [Haskell-beginners] Any advice on installing gtk2hs To: "'patricklynch'" <kmandpjly...@verizon.net>, <beginners@haskell.org> Message-ID: <1ff14db828f34b4ca3d83620f678d...@stsv.com> Content-Type: text/plain; charset="us-ascii" PS, this was for the Windows installation. -----Original Message----- From: patricklynch [mailto:kmandpjly...@verizon.net] Sent: Monday, January 31, 2011 1:54 PM To: 'beginners@haskell.org' Subject: Any advice on installing gtk2hs Good afternoon, Any advice on installing gtk2hs. I used the instructions at: http://www.haskell.org/haskellwiki/Gtk2Hs and get a bunch of error messages. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110131/c261072d/attachment-0001.htm> ------------------------------ Message: 7 Date: Mon, 31 Jan 2011 19:41:14 +0100 From: Daniel Fischer <daniel.is.fisc...@googlemail.com> Subject: Re: [Haskell-beginners] Any advice on installing gtk2hs To: beginners@haskell.org Message-ID: <201101311941.14916.daniel.is.fisc...@googlemail.com> Content-Type: text/plain; charset="utf-8" On Monday 31 January 2011 19:54:29, patricklynch wrote: > Good afternoon, > > > > Any advice on installing gtk2hs. > > I used the instructions at: http://www.haskell.org/haskellwiki/Gtk2Hs > and get a bunch of error messages. > I know neither windows nor gtk2hs well, so I probably won't be able to help you, but for those who will, it will be easier to diagnose the problem if you post the errors (or at least some, if there are too many). ------------------------------ Message: 8 Date: Mon, 31 Jan 2011 14:42:37 -0600 From: aditya siram <aditya.si...@gmail.com> Subject: Re: [Haskell-beginners] Any advice on installing gtk2hs To: patricklynch <kmandpjly...@verizon.net> Cc: beginners@haskell.org Message-ID: <AANLkTikYp0R02K4QdfKNmC_TNef7onLn47qWXXioa=x...@mail.gmail.com> Content-Type: text/plain; charset=windows-1252 I wrote those instructions. What errors are you getting? -deech On Mon, Jan 31, 2011 at 12:54 PM, patricklynch <kmandpjly...@verizon.net> wrote: > Good afternoon, > > > > Any advice on installing gtk2hs? > > I used the instructions at: http://www.haskell.org/haskellwiki/Gtk2Hs and > get a bunch of error messages? > > > > Thanks? > > > > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 31, Issue 39 *****************************************