Re: [Haskell-cafe] Hackage dependencies problem.
On 19 November 2012 18:21, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, I am having ghc 7.6.1 working here. But anytime I installed something with cabal-install, I got prompts like: Warning: The following packages are likely to be broken by the reinstalls: haskell98-2.0.0.2 ghc-7.6.1 Cabal-1.16.0 bin-package-db-0.0.0.0 directory-1.2.0.0 hpc-0.6.0.0 Continuing even though the plan contains dangerous reinstalls. And even worse, then I got: command line: cannot satisfy -package Cabal-1.16.0: Cabal-1.16.0-dd0ce1db6fea670a788547ee85411486 is unusable due to missing or recursive dependencies: directory-1.2.0.0-8edf300597b0da609c8eccc9aa6d0cc3 process-1.1.0.2-03ae5757aa509ffbe497f42660cba52c unix-2.6.0.0-4bc27fc415f60036a88211de7cde3e9a (use -v for more information) What should I do? Why user space directory and process would interrupt Cabal in global space? It shouldn't. Can you please give an example of a package that gives you an error like this? Also, what does ghc-pkg check say? The only thing I can think of is that you're trying to upgrade a package like array, containers, etc. -- 竹密岂妨流水过 山高哪阻野云飞 And for G+, please use magiclouds#gmail.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage dependencies problem.
On 12-11-19 04:45 AM, Ivan Lazar Miljenovic wrote: On 19 November 2012 18:21, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: command line: cannot satisfy -package Cabal-1.16.0: Cabal-1.16.0-dd0ce1db6fea670a788547ee85411486 is unusable due to missing or recursive dependencies: directory-1.2.0.0-8edf300597b0da609c8eccc9aa6d0cc3 process-1.1.0.2-03ae5757aa509ffbe497f42660cba52c unix-2.6.0.0-4bc27fc415f60036a88211de7cde3e9a (use -v for more information) What should I do? Why user space directory and process would interrupt Cabal in global space? It shouldn't. Can you please give an example of a package that gives you an error like this? Also, what does ghc-pkg check say? The only thing I can think of is that you're trying to upgrade a package like array, containers, etc. It does. It has always been. When unioning user and global, user takes precedence: user directory-1.2.0.0 shadows global directory-1.2.0.0 (GHC User's Guide 4.9.4). But look closer: user directory-1.2.0.0-feedbabe... shadows global directory-1.2.0.0-deadbeef... Therefore, if global Cabal-1.16.0 was built against directory-1.2.0.0-deadbeef..., it's a missing dependency for you. See my http://www.vex.net/~trebla/haskell/sicp.xhtml#pigeon Fortunately, shadowing is a sessional property, not a data-loss property. One can say, it's a data-surplus property. To regain working sessions, cut surplus data, add -no-user-package-db to all your ghc and ghci commands. ghc-pkg check does not report shadowing. Go straight for ghc -v. This is what you get for --reinstall. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [repa] beginner questions
On 11/19/2012 01:21 AM, Dominic Steinitz wrote: Dmitry Malikov malikov.d.y at gmail.com writes: Playing around with repa arrays and got some questions. 1) How I can get list of indexes of array that suffice some predicate? a1 AUnboxed (Z :. 3) (fromList [False,False,True]) it :: Array U (Z :. Int) Bool Indexes of element that satisfying specific predicate could be obtained like that: (\a p → Data.List.map (subtract 1 . snd) $ filter (p . fst) $ zip (toList a) [1..]) a1 (== False) [0,1] Looks ugly. How REPA users used to do filtering like that without converting to list? I hope someone will correct me if I am wrong and furthermore I was not entirely clear what you were trying to do but it seems to me that if you want to filter out an unknown number of elements from a collection then repa is the wrong abstraction to use. You can however filter out a known number of elements e.g. xs = Repa.fromListUnboxed (Z :. 3) [1, 2, 3] removeOne ix xs = Repa.fromFunction (Z :. dx - 1) (\(Z :. jx) - xs ! (Z :. f jx)) where Z :. dx = Repa.extent xs f jx | jx ix = jx | otherwise = jx + 1 test = Repa.computeP $ removeOne 1 xs :: IO (Array U DIM1 Float) Does that help? Dominic. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe Does that help? Yep, kinda, this is a nice example of fromFunction usage, but my question was about retrieving indexing of elements that satisfy some predicate. Thanks for response. -- Best regards, dmitry malikov ! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Cabal failures...
I follow the Cabal-messes threads with some interest, since that is the hardest area for me since starting to use Haskell. Probably 40-60% of all package install fail for some mysterious reason, with threats that trying to fix them will break more things, which generally is true. :-) I am not exert in the area, but I wonder how /why/ this is different than other package managers, like apt in Linux, I have never had any problems with it, and I would think that their dependencies are of at least similar complexities. In any case; Trying to do a cabal update I was told to try to update cabal-install, which I think means actually updating cabal (since I actually run installs via cabal install...), but that fails with this message below, and I don't know how to proceed. Linking C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-13880\Cabal-1.16.0.3\dist\setup\setup.exe ... Configuring Cabal-1.16.0.3... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package process-1.1.0.1 requires base-4.5.0.0 package pretty-1.1.1.0 requires base-4.5.0.0 package old-time-1.1.0.0 requires base-4.5.0.0 package old-locale-1.0.0.4 requires base-4.5.0.0 package filepath-1.3.0.0 requires base-4.5.0.0 package directory-1.1.0.2 requires base-4.5.0.0 package deepseq-1.3.0.0 requires base-4.5.0.0 package containers-0.4.2.1 requires base-4.5.0.0 package bytestring-0.9.2.1 requires base-4.5.0.0 package array-0.4.0.0 requires base-4.5.0.0 package Win32-2.2.2.0 requires base-4.5.0.0 package filepath-1.3.0.0 requires base-4.5.1.0 package Cabal-1.16.0.3 requires base-4.5.1.0 package Cabal-1.16.0.3 requires filepath-1.3.0.0 package process-1.1.0.1 requires filepath-1.3.0.0 package directory-1.1.0.2 requires filepath-1.3.0.0 package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0 package bytestring-0.9.2.1 requires ghc-prim-0.2.0.0 package base-4.5.0.0 requires ghc-prim-0.2.0.0 package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0 package base-4.5.1.0 requires ghc-prim-0.2.0.0 package base-4.5.1.0 requires integer-gmp-0.4.0.0 package base-4.5.0.0 requires integer-gmp-0.4.0.0 Building Cabal-1.16.0.3... Preprocessing library Cabal-1.16.0.3... command line: cannot satisfy -package-id array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9 (use -v for more information) cabal: Error: some packages failed to install: Cabal-1.16.0.3 failed during the building phase. The exception was: ExitFailure 1 cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install. --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal failures...
Hi Greg, On Mon, Nov 19, 2012 at 1:25 PM, Gregory Guthrie guth...@mum.edu wrote: I follow the Cabal-messes threads with some interest, since that is the hardest area for me since starting to use Haskell. Probably 40-60% of all package install fail for some mysterious reason, with threats that trying to fix them will break more things, which generally is true. :-) We're working on it. Be brave, things are going to get better! I am not exert in the area, but I wonder how /why/ this is different than other package managers, like apt in Linux, I have never had any problems with it, and I would think that their dependencies are of at least similar complexities. The Linux package managers solve a different problems. They let you install a set of packages that have been manually curated and are know to work together (i.e. all version dependencies are fixed) while cabal does version resolution on packages that might not ever have been tried together. If you install Haskell packages via your distro's package manager I assume they will always install cleanly. The problem is that people want the latest bleeding edge of packages, which haven't made it into the distros yet, and hence they get to experience some of the pains associated with being on the bleeding edge. Being on Windows also makes things harder, as most developers don't have a Windows box to test their stuff on. In any case; Trying to do a cabal update I was told to try to update cabal-install, which I think means actually updating cabal (since I actually run installs via cabal install...), but that fails with this message below, and I don't know how to proceed. cabal-install is the package that includes the cabal executable. Cabal (with a capital C) is the library that cabal-install uses. The naming is unfortunate but hard to change at this point. To update cabal-install you do: $ cabal update cabal install cabal-install Make sure that the place that the cabal binary gets installed into (which is printed at the end of the install) is on your PATH. Linking C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-13880\Cabal-1.16.0.3\dist\setup\setup.exe ... Configuring Cabal-1.16.0.3... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. This is a sure sign that things are not going to work well. Could you include the output of cabal install -v cabal-install please. The output here is not enough to tell me what's going on. Please also include the output of cabal --version ghc --version Are you using the Haskell Platform, if so, which version? -- Johan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Reactive-Banana-Wx Install Trouble
Hi Everyone, I'm currently trying to install reactive-banana-wx on OSX. Whenever I try to cabal install it though, I get this error back: [1 of 1] Compiling Main ( /var/folders/yy/k1kyw7252q1f_01xv4q5nnj4gn/T/reactive-banana-wx-0.7.1.0-91555/reactive-banana-wx-0.7.1.0/Setup.hs, /var/folders/yy/k1kyw7252q1f_01xv4q5nnj4gn/T/reactive-banana-wx-0.7.1.0-91555/reactive-banana-wx-0.7.1.0/dist/setup/Main.o ) /var/folders/yy/k1kyw7252q1f_01xv4q5nnj4gn/T/reactive-banana-wx-0.7.1.0-91555/reactive-banana-wx-0.7.1.0/Setup.hs:10:22: Couldn't match expected type `Distribution.Simple.Setup.BuildFlags' with actual type `Cabal-1.16.0.3:Distribution.Simple.Setup.BuildFlags' Expected type: Args - Distribution.Simple.Setup.BuildFlags - Distribution.PackageDescription.PackageDescription - Distribution.Simple.LocalBuildInfo.LocalBuildInfo - IO () Actual type: Cabal-1.16.0.3:Distribution.Simple.UserHooks.Args - Cabal-1.16.0.3:Distribution.Simple.Setup.BuildFlags - Cabal-1.16.0.3:Distribution.PackageDescription.PackageDescription - Cabal-1.16.0.3:Distribution.Simple.LocalBuildInfo.LocalBuildInfo - IO () In the return type of a call of `appBundleBuildHook' In the `postBuild' field of a record cabal: Error: some packages failed to install: reactive-banana-wx-0.7.1.0 failed during the configure step. The exception was: ExitFailure 1 A couple of things; The version of cabal installed is: cabal-install version 0.14.0 using version 1.14.0 of the Cabal library The version of GHC that I'm using is: The Glorious Glasgow Haskell Compilation System, version 7.4.2 One other thing I should probably note is that I have cabal-macosx installed, but whenever I try to just call it by saying cabal-macosx it doesn't work, I have to tunnel down into the actual macosx-app to build any wx stuff. I'm not sure if I'm just using it wrong (I'm quite new to the wx stuff) or if it's a problem with the installation. Any help on these two (possibly related) problems would be fantastic. Cheers, Ian ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Reactive-Banana-Wx Install Trouble
On Mon, Nov 19, 2012 at 5:13 PM, Ian fitzp...@tcd.ie wrote: Expected type: Args - Distribution.Simple.Setup.BuildFlags - Distribution.PackageDescription.PackageDescription - Distribution.Simple.LocalBuildInfo.LocalBuildInfo - IO () Actual type: Cabal-1.16.0.3:Distribution.Simple.UserHooks.Args - Cabal-1.16.0.3:Distribution.Simple.Setup.BuildFlags - Cabal-1.16.0.3:Distribution.PackageDescription.PackageDescription - Cabal-1.16.0.3:Distribution.Simple.LocalBuildInfo.LocalBuildInfo - IO () You have multiple versions of the Cabal library installed and they are conflicting somehow. Later on you show Cabal-1.14.0 as the one built into cabal-install; make sure you are running the right cabal-install. (Likely either you don't have $HOME/Library/Haskell/bin on $PATH, or it comes after /usr/bin, or you forgot to hash -r in any open shells after installing an updated cabal-install.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix/linux, openafs, kerberos, infrastructure http://sinenomine.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal failures...
cabal install -v cabal-install Not sure if you're running into this one, but a configuration that wasn't working for me: 1) Install Haskell Platform 2) Install GHC 7.6.1 3) cabal install cabal-install As I recall, the error had something to do with a Cabal-generated 'Paths' file assuming the Prelude exported 'catch'. It was affecting a bunch of other packages too, which forced me to upgrade cabal-install. To get things working, I had to boot GHC 7.6 from my system PATH, upgrade cabal-install using GHC 7.4, and then put 7.6 back in the system path. After doing that, everything has worked well with GHC 7.6. -Greg On Mon, Nov 19, 2012 at 1:38 PM, Johan Tibell johan.tib...@gmail.com wrote: Hi Greg, On Mon, Nov 19, 2012 at 1:25 PM, Gregory Guthrie guth...@mum.edu wrote: I follow the Cabal-messes threads with some interest, since that is the hardest area for me since starting to use Haskell. Probably 40-60% of all package install fail for some mysterious reason, with threats that trying to fix them will break more things, which generally is true. :-) We're working on it. Be brave, things are going to get better! I am not exert in the area, but I wonder how /why/ this is different than other package managers, like apt in Linux, I have never had any problems with it, and I would think that their dependencies are of at least similar complexities. The Linux package managers solve a different problems. They let you install a set of packages that have been manually curated and are know to work together (i.e. all version dependencies are fixed) while cabal does version resolution on packages that might not ever have been tried together. If you install Haskell packages via your distro's package manager I assume they will always install cleanly. The problem is that people want the latest bleeding edge of packages, which haven't made it into the distros yet, and hence they get to experience some of the pains associated with being on the bleeding edge. Being on Windows also makes things harder, as most developers don't have a Windows box to test their stuff on. In any case; Trying to do a cabal update I was told to try to update cabal-install, which I think means actually updating cabal (since I actually run installs via cabal install...), but that fails with this message below, and I don't know how to proceed. cabal-install is the package that includes the cabal executable. Cabal (with a capital C) is the library that cabal-install uses. The naming is unfortunate but hard to change at this point. To update cabal-install you do: $ cabal update cabal install cabal-install Make sure that the place that the cabal binary gets installed into (which is printed at the end of the install) is on your PATH. Linking C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-13880\Cabal-1.16.0.3\dist\setup\setup.exe ... Configuring Cabal-1.16.0.3... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. This is a sure sign that things are not going to work well. Could you include the output of cabal install -v cabal-install please. The output here is not enough to tell me what's going on. Please also include the output of cabal --version ghc --version Are you using the Haskell Platform, if so, which version? -- Johan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal failures...
On Mon, Nov 19, 2012 at 2:55 PM, Greg Fitzgerald gari...@gmail.com wrote: cabal install -v cabal-install Not sure if you're running into this one, but a configuration that wasn't working for me: 1) Install Haskell Platform 2) Install GHC 7.6.1 3) cabal install cabal-install As I recall, the error had something to do with a Cabal-generated 'Paths' file assuming the Prelude exported 'catch'. It was affecting a bunch of other packages too, which forced me to upgrade cabal-install. To get things working, I had to boot GHC 7.6 from my system PATH, upgrade cabal-install using GHC 7.4, and then put 7.6 back in the system path. After doing that, everything has worked well with GHC 7.6. The issue is that cabal-install-1.16.0.1 is broken on Windows. We have a new, fixed cabal-install-1.16.0.2 out, but if you were unlucky enough to install the broken one you need to delete that binary and install cabal-install again (either by using the bootstrap.sh script in the cabal-install repo or by some other means). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage dependencies problem.
Not only shadowing. For example, when I installed warp-static, yesod, or gtk2hs. A clear-user-space may ease the problem and got them installed. But normally with a not brand new user space, it failed like above. And, the key point is that using upgrade-dependencies with cabal-install. I am using git (current) version of cabal-install. Without that argument, things could be fine. With it, it must fail. And ghc-pkg check reports no errors. On Tue, Nov 20, 2012 at 3:47 AM, Albert Y. C. Lai tre...@vex.net wrote: On 12-11-19 04:45 AM, Ivan Lazar Miljenovic wrote: On 19 November 2012 18:21, Magicloud Magiclouds magicloud.magiclouds@gmail.**com magicloud.magiclo...@gmail.com wrote: command line: cannot satisfy -package Cabal-1.16.0: Cabal-1.16.0-**dd0ce1db6fea670a788547ee854114**86 is unusable due to missing or recursive dependencies: directory-1.2.0.0-**8edf300597b0da609c8eccc9aa6d0c**c3 process-1.1.0.2-**03ae5757aa509ffbe497f42660cba5**2c unix-2.6.0.0-**4bc27fc415f60036a88211de7cde3e**9a (use -v for more information) What should I do? Why user space directory and process would interrupt Cabal in global space? It shouldn't. Can you please give an example of a package that gives you an error like this? Also, what does ghc-pkg check say? The only thing I can think of is that you're trying to upgrade a package like array, containers, etc. It does. It has always been. When unioning user and global, user takes precedence: user directory-1.2.0.0 shadows global directory-1.2.0.0 (GHC User's Guide 4.9.4). But look closer: user directory-1.2.0.0-feedbabe... shadows global directory-1.2.0.0-deadbeef... Therefore, if global Cabal-1.16.0 was built against directory-1.2.0.0-deadbeef..., it's a missing dependency for you. See my http://www.vex.net/~trebla/**haskell/sicp.xhtml#pigeonhttp://www.vex.net/~trebla/haskell/sicp.xhtml#pigeon Fortunately, shadowing is a sessional property, not a data-loss property. One can say, it's a data-surplus property. To regain working sessions, cut surplus data, add -no-user-package-db to all your ghc and ghci commands. ghc-pkg check does not report shadowing. Go straight for ghc -v. This is what you get for --reinstall. __**_ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/**mailman/listinfo/haskell-cafehttp://www.haskell.org/mailman/listinfo/haskell-cafe -- 竹密岂妨流水过 山高哪阻野云飞 And for G+, please use magiclouds#gmail.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] code length in Haskell, a comparison
There is some interesting data in the article at: Code Length Measured in 14 Languages http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ basically comparing program lengths in various languages, and some ensuing discussion of how this relates to language expressiveness, etc. (He does all of his analysis in Mathematica, which is the goal of the article.) It is interesting to see how well Haskell showed in the data; and it would also be interesting to see how well it could replicate the analysis example which was a nice example of web data scraping! The data is the length of a series of programs written in a number of languages (data from: http://rosettacode.org/wiki/Rosetta_Code). (The columns don't map well to text only, Haskell column marked with (Why doesn't this list support HTML?)). See nicer version at: http://pastehtml.com/view/ciy7woohv.rtxt The average for Haskell of 1.89 means that on the average the same program in Haskell takes ~2x in the other languages. Given the correlation of size to clarity, complexity, effort, and errors, this is a good thing! :-) Code Size relative to Mathematica Larger numbers indicate that the language on top needs more code. C C++ Fortran JavaCLisp Python C# JavaScript R MATLAB Clojure Pascal Haskell RubyAverage ??? Mathematica 17.09.1 8.1 6.4 6.3 7.2 6.4 5.0 3.2 3.2 1.6 5.8 3.5 5.2 6.29 Ruby2.7 1.8 1.9 1.3 1.1 1.1 1.5 1.0 0.7 0.9 0.4 1.4 0.7 1.27 Haskell 3.6 2.7 2.5 2.0 1.6 1.7 2.2 1.5 1.1 1.5 0.7 2.1 1.4 1.89 Pascal 2.2 1.5 1.2 0.8 0.8 0.8 1.0 0.8 0.5 0.6 0.2 0.5 0.7 0.89 Clojure 8.8 5.3 5.2 3.6 3.7 3.3 3.8 2.5 1.9 2.9 5.0 1.5 2.6 3.85 MATLAB 3.6 2.4 1.8 1.1 1.4 1.1 1.7 0.9 0.8 0.3 1.6 0.7 1.1 1.42 R 4.7 3.3 2.4 1.9 1.8 1.7 2.1 1.5 1.3 0.5 2.2 0.9 1.4 1.98 JavaScript 2.8 2.1 1.9 1.2 1.2 1.1 1.6 0.7 1.1 0.4 1.3 0.7 1.0 1.31 C# 2.0 1.4 1.3 0.9 0.8 0.8 0.6 0.5 0.6 0.3 1.0 0.5 0.7 0.87 Python 2.2 1.6 1.5 1.1 0.9 1.2 0.9 0.6 0.9 0.3 1.3 0.6 0.9 1.07 Common Lisp 2.8 1.8 1.6 1.3 1.1 1.3 0.8 0.6 0.7 0.3 1.3 0.6 0.9 1.16 Java2.1 1.4 1.5 0.8 0.9 1.1 0.8 0.5 0.9 0.3 1.2 0.5 0.8 0.98 Fortran 1.4 1.0 0.7 0.6 0.7 0.8 0.5 0.4 0.6 0.2 0.8 0.4 0.5 0.66 C++ 1.4 1.0 0.7 0.6 0.6 0.7 0.5 0.3 0.4 0.2 0.7 0.4 0.6 0.61 C 0.7 0.7 0.5 0.4 0.5 0.5 0.4 0.2 0.3 0.1 0.5 0.3 0.4 0.41 Overall:4.1 2.582.3 1.681.561.611.85 1.270.851.140.411.860.831.29 Overall Ranking: Clojure 0.41 Haskell 0.83 R0.85 MATLAB 1.14 JavaScript 1.27 Ruby 1.36 Common Lisp 1.56 Python 1.61 C++ 1.68 C# 1.85 Pascal 1.86 Fortran 2.33 C++ 2.58 C4.09 --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] code length in Haskell, a comparison
I am leery of code comparisons (but not Timothy Leary of them). Clojure being a JVM language has the advantage of the massive Java class libraries. If Haskell could tie in fairly seamlessly to the Java class libraries ... If more developers learned the need for finer grained abstraction ... On Mon, Nov 19, 2012 at 7:55 PM, Gregory Guthrie guth...@mum.edu wrote: There is some interesting data in the article at: Code Length Measured in 14 Languages http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ basically comparing program lengths in various languages, and some ensuing discussion of how this relates to language expressiveness, etc. (He does all of his analysis in Mathematica, which is the goal of the article.) It is interesting to see how well Haskell showed in the data; and it would also be interesting to see how well it could replicate the analysis example which was a nice example of web data scraping! The data is the length of a series of programs written in a number of languages (data from: http://rosettacode.org/wiki/Rosetta_Code). (The columns don't map well to text only, Haskell column marked with (Why doesn't this list support HTML?)). See nicer version at: http://pastehtml.com/view/ciy7woohv.rtxt The average for Haskell of 1.89 means that on the average the same program in Haskell takes ~2x in the other languages. Given the correlation of size to clarity, complexity, effort, and errors, this is a good thing! :-) Massive Snip! Overall Ranking: Clojure 0.41 Haskell 0.83 R0.85 MATLAB 1.14 JavaScript 1.27 Ruby 1.36 Common Lisp 1.56 Python 1.61 C++ 1.68 C# 1.85 Pascal 1.86 Fortran 2.33 C++ 2.58 C4.09 --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] cabal errors
I did a package check, and I always get a ton of these things: Warning: haddock-html: E:\Plang\Haskell Platform\lib\extralibs\doc\haskell-src-1.0.1.4\html doesn't exist or isn't a directory Which I think is just missing documentation, so I ignore them. But this time I also got this: The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. HTTP-4000.2.3 haskell-platform-2012.2.0.0 ghc-pkg list shows: Cabal-1.10.1.0 Cabal-1.10.2.0 Cabal-1.14.0 Cabal-1.14.0 GLUT-2.1.2.1 GLUT-2.1.2.1 GLUT-2.1.2.1 {HTTP-4000.2.3} HTTP-4000.2.5 ... {haskell-platform-2012.2.0.0} haskell-platform-2012.4.0.0 haskell-src-1.0.1.4 haskell-src-1.0.1.4 haskell-src-1.0.1.5 haskell-src-1.0.1.5 (haskell2010-1.0.0.0) (haskell2010-1.1.0.1) (haskell2010-1.1.0.1) haskell98-1.1.0.1 (haskell98-2.0.0.1) (haskell98-2.0.0.1) Not sure what it all means, but looks somewhat goofy to me. I always just do cabal installs, and an occasional -force-reinstalls when told that it is the only option, but recently when they might fail tried a cabal-dev install a few times, I assume that is what the {} entries are, but am not sure if they can all peacefully coexist. Do I need to do a reset and start over? I hope not, as it took me many hours of fiddling to install some packages like glut, wxcore, and a few others. Argh. --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] code length in Haskell, a comparison
I find myself wondering where Rebol would stand in this. On Nov 19, 2012 8:35 PM, KC kc1...@gmail.com wrote: I am leery of code comparisons (but not Timothy Leary of them). Clojure being a JVM language has the advantage of the massive Java class libraries. If Haskell could tie in fairly seamlessly to the Java class libraries ... If more developers learned the need for finer grained abstraction ... On Mon, Nov 19, 2012 at 7:55 PM, Gregory Guthrie guth...@mum.edu wrote: There is some interesting data in the article at: Code Length Measured in 14 Languages http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ basically comparing program lengths in various languages, and some ensuing discussion of how this relates to language expressiveness, etc. (He does all of his analysis in Mathematica, which is the goal of the article.) It is interesting to see how well Haskell showed in the data; and it would also be interesting to see how well it could replicate the analysis example which was a nice example of web data scraping! The data is the length of a series of programs written in a number of languages (data from: http://rosettacode.org/wiki/Rosetta_Code). (The columns don't map well to text only, Haskell column marked with (Why doesn't this list support HTML?)). See nicer version at: http://pastehtml.com/view/ciy7woohv.rtxt The average for Haskell of 1.89 means that on the average the same program in Haskell takes ~2x in the other languages. Given the correlation of size to clarity, complexity, effort, and errors, this is a good thing! :-) Massive Snip! Overall Ranking: Clojure 0.41 Haskell 0.83 R0.85 MATLAB 1.14 JavaScript 1.27 Ruby 1.36 Common Lisp 1.56 Python 1.61 C++ 1.68 C# 1.85 Pascal 1.86 Fortran 2.33 C++ 2.58 C4.09 --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal failures...
Thanks for looking at this and the help; Trying with topdown changes things, but as often is the case warns that it will break another ~60 packages if I force it, not sure if this will help me or cause the ruin of the rest of the local Haskell library universe. Should I force it?! :-) C:\Users\guthriecabal install -v --solver=topdown cabal-install Reading available packages... Resolving dependencies... In order, the following would be installed: Win32-2.2.2.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 array-0.4.0.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 deepseq-1.3.0.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 containers-0.4.2.1 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 old-locale-1.0.0.4 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 old-time-1.1.0.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 directory-1.1.0.2 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 pretty-1.1.1.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 process-1.1.0.1 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 Cabal-1.16.0.3 (new version) text-0.11.2.3 (reinstall) parsec-3.1.3 (reinstall) network-2.4.0.1 (new version) HTTP-4000.2.5 (reinstall) changes: network-2.3.1.0 - 2.4.0.1 time-1.4 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 random-1.0.1.1 (reinstall) changes: base-4.5.0.0 - 4.5.1.0 cabal-install-1.16.0.2 -bytestring-in-base (new package) cabal: The following packages are likely to be broken by the reinstalls: QuickCheck-2.4.2 haskell98-2.0.0.1 ghc-7.4.1 Cabal-1.14.0 bin-package-db-0.0.0.0 hpc-0.5.1.1 haskell-platform-2012.4.0.0 QuickCheck-2.5.1.1 haskell98-2.0.0.1 ghc-7.4.2 Cabal-1.14.0 bin-package-db-0.0.0.0 hpc-0.5.1.1 text-0.11.2.0 parsec-3.1.2 stm-2.3 regex-posix-0.95.1 regex-compat-0.95.1 regex-base-0.93.2 parallel-3.2.0.2 haskell2010-1.1.0.1 haskell-src-1.0.1.5 fgl-5.4.2.4 template-haskell-2.7.0.0 hoopl-3.8.7.3 binary-0.5.1.0 GLUT-2.1.2.1 network-2.3.1.0 cgi-3001.1.7.4 blaze-builder-0.3.1.0 stm-2.4 async-2.0.1.3 regex-posix-0.95.2 regex-compat-0.95.1 regex-base-0.93.2 parallel-3.2.0.3 haskell2010-1.1.0.1 haskell-src-1.0.1.5 fgl-5.4.2.4 vector-0.10.0.1 vector-algorithms-0.5.4.2 math-functions-0.1.1.2 template-haskell-2.7.0.0 hoopl-3.8.7.3 binary-0.5.1.0 GLUT-2.1.2.1 HUnit-1.2.5.1 Use --force-reinstalls if you want to install anyway. --- From: Johan Tibell [mailto:johan.tib...@gmail.com] Cc: haskell-cafe@haskell.org; Andres Löh Subject: Re: [Haskell-cafe] Cabal failures... I'm not quite sure what's going on. I've CCed Andres, who wrote the new constraint solver. One especially confusing part is this: C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-12392\Cabal-1.16.0.3\dist\set up\setup.exe configure --verbose=2 --ghc --prefix=C:\Users\guthrie\AppData\Roaming\cabal --user --flags=base4 --flags=base3 --constraint=process ==1.1.0.1 --constraint=pretty ==1.1.1.0 --constraint=old-time ==1.1.0.0 --constraint=filepath ==1.3.0.0 --constraint=directory ==1.1.0.2 --constraint=containers ==0.4.2.1 --constraint=base ==4.5.1.0 --constraint=array ==0.4.0.0 --disable-tests --disable-benchmarks Configuring Cabal-1.16.0.3... Flags chosen: base3=True, base4=True Dependency array ==0.4.0.0: using array-0.4.0.0 Dependency base ==4.5.1.0: using base-4.5.1.0 Dependency containers ==0.4.2.1: using containers-0.4.2.1 Dependency directory ==1.1.0.2: using directory-1.1.0.2 Dependency filepath ==1.3.0.0: using filepath-1.3.0.0 Dependency old-time ==1.1.0.0: using old-time-1.1.0.0 Dependency pretty ==1.1.1.0: using pretty-1.1.1.0 Dependency process ==1.1.0.1: using process-1.1.0.1 Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. Why is Cabal setting both base3 and base4 to True? P.S. You can try the same command with --solver=topdown and see if that works. On Mon, Nov 19, 2012 at 8:22 PM, Gregory Guthrie guth...@mum.edu wrote: Johan, thanks for the note and information. My setup is: (Windows 7) cabal-install version 0.14.0 using version 1.14.0 of the Cabal library The Glorious Glasgow Haskell Compilation System, version 7.4.2 Haskell Platform 2012.4.0.0 . cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install. --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] code length in Haskell, a comparison
Darren Grant therealklu...@gmail.com wrote: I find myself wondering where Rebol would stand in this. Or APL. Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad. signature.asc Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...
Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language (or generate bytecode) to access the Java class libraries when needed? Or Is there a way for a JVM language or bytecode to call Haskell when needed? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal failures...
On 12-11-19 04:25 PM, Gregory Guthrie wrote: I am not exert in the area, but I wonder how /why/ this is different than other package managers, like apt in Linux, I have never had any problems with it, and I would think that their dependencies are of at least similar complexities. I feel very strongly about the dissonance in comparing problems without comparing costs. Debian has a horde of volunteers for just the menial and manual work of perpetually finding one coherent set of versions so end users don't have to. And in practice, There is never one coherent set of versions. There is only a not-too-incoherent set of versions, and the volunteers first have to decide on it, and then manually pick patches from other versions (backporting patches, cherry-picking patches) to turn the not-too-incoherent set into a coherent set that does not exist in any pristine version. On top of that, Mark Shuttleworth actually pays money for Ubuntu to start from Debian and further test the set, pick some more patches, unpick some other patches... How many hours and/or dollars are you willing to pay for the menial, manual, perpetual chore of identifying coherent sets of versions so other people don't have to? And if a coherent set does not exist, how many are you willing to pay for backporting patches? At least I paid my 3 hours to explain some cabal stuff at http://www.vex.net/~trebla/haskell/sicp.xhtml Even the Haskell Platform, one very small set, costs volunteer hours. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...
KC kc1...@gmail.com writes: Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language (or generate bytecode) to access the Java class libraries when needed? Or Is there a way for a JVM language or bytecode to call Haskell when needed? I'd be very interested to know the answer to this as well. Please let me know what you discover. John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...
And I'd be very interested.Let me know too, please. 20.11.2012, 13:32, "John Wiegley" jo...@newartisans.com: KC kc1...@gmail.com writes: Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language (or generate bytecode) to access the Java class libraries when needed? Or Is there a way for a JVM language or bytecode to call Haskell when needed?I'd be very interested to know the answer to this as well. Please let me knowwhat you discover.John___Haskell-Cafe mailing listHaskell-Cafe@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...
KC kc1...@gmail.com writes: Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language (or generate bytecode) to access the Java class libraries when needed? I once did a small test to get this working. It's not that hard, but needs some work. It's fine for exposing a few functions though. Basically it's a 2-step process, eased by using a makefile or similar helper. You have to compile your haskell code into a shared object (.so on linux, .dll on windows), which includes the haskell runtime (rts). This library can be called from c. A small pitfall is that you first need to do a call to initialize the haskell runtime, and when you're done using it, close it. This is most easily just tied to your c/java program's main initialization functions. Java is able to load/use these shared libraries through JNI. Of course you lose your platform-independance, so if you want your java application to work on multiple platforms / OSses, you need to build shared objects for all of them. Last but not least: You have to export the haskell functions you want through FFI. Also, make sure they use raw data types such as CString, as that what C and java will give you and expect back. So basically you go Haskell FFI - C - Java JNI I'm sorry I cannot give you any links or code, because I'm in a bit of a hurry. But google and the ghc docs are your friend. Mathijs Or Is there a way for a JVM language or bytecode to call Haskell when needed? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...
You may want to have a look at my little HJVM project on Github ( https://github.com/JPMoresmau/HJVM). Promise, I'll put in on Hackage some day. Basically it provides FFI wrappers and some c code to be able to start a JVM and call Java methods, etc from Haskell. -- JP Moresmau http://jpmoresmau.blogspot.com/ On Tue, Nov 20, 2012 at 7:53 AM, Mathijs Kwik math...@bluescreen303.nlwrote: KC kc1...@gmail.com writes: Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language (or generate bytecode) to access the Java class libraries when needed? I once did a small test to get this working. It's not that hard, but needs some work. It's fine for exposing a few functions though. Basically it's a 2-step process, eased by using a makefile or similar helper. You have to compile your haskell code into a shared object (.so on linux, .dll on windows), which includes the haskell runtime (rts). This library can be called from c. A small pitfall is that you first need to do a call to initialize the haskell runtime, and when you're done using it, close it. This is most easily just tied to your c/java program's main initialization functions. Java is able to load/use these shared libraries through JNI. Of course you lose your platform-independance, so if you want your java application to work on multiple platforms / OSses, you need to build shared objects for all of them. Last but not least: You have to export the haskell functions you want through FFI. Also, make sure they use raw data types such as CString, as that what C and java will give you and expect back. So basically you go Haskell FFI - C - Java JNI I'm sorry I cannot give you any links or code, because I'm in a bit of a hurry. But google and the ghc docs are your friend. Mathijs Or Is there a way for a JVM language or bytecode to call Haskell when needed? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe