News aggregator

ANN: hmatrix-0.16

haskell-cafe - Fri, 06/20/2014 - 5:36pm
Hi! I am happy to announce the release of hmatrix-0.16, a Haskell package for matrix computations and numeric linear algebra. New features: - BSD3 license. The modules depending on GSL have been moved to a new package hmatrix-gsl (GPL). Now hmatrix depends only on BLAS/LAPACK. - Simpler reexport modules with improved documentation and usage examples. There are a few API changes but the traditional modules are also exposed for backwards compatibility. - Alternative interface using type-level literals for static dimension checking and inference (work in progress). - Initial support for sparse linear systems. - Minor improvements and bug fixes (see the changelog for details). http://hackage.haskell.org/package/hmatrix https://github.com/albertoruiz/hmatrix Some examples: http://dis.um.es/~alberto/hmatrix/hmatrix.html Suggestions, contributions, and bug reports are welcome. Thanks! Alberto
Categories: Offsite Discussion

How to represent a board?

haskell-cafe - Fri, 06/20/2014 - 4:24pm
Hello, There are many examples of games which use boards: chess, checkers, go, etc. Many people starting out at programming and/or game programming are very much tempted to code a board game. It looks like such a game would be easy to build at first sight. Even more sophisticated games sometimes use a grid system, which looks a lot like boards as well. In a grid system the movements of a given agent are bound do discrete positions. Although the user may not see the board underneath pretty graphics, it is a board game. Having in mind the sort of operations such games have to make on boards, I ask: what are the best representations for a board in Haskell? In many languages a NxN array seems like a good pick. In Haskell, most would translate that into lists of lists. I know I have. However, traversing those lists to get a position, calculate where a piece or agent could go, etc., feels awkward and unefficient. Beside the point already made, we have no type safe guarantee that our 64x64 won't become a 63x63
Categories: Offsite Discussion

What is the state of "The JavaScript Problem"? What is the currently preferred way to solve in a real world application?

Haskell on Reddit - Fri, 06/20/2014 - 2:51pm

Hey guys. I've been looking at different options for solving the JavaScript problem for my own applications, and from the long list of options it came down to the following

  • Fay - Probably the most stable right now? FPComplete uses this, which seems like a big plus. Another plus seems the option to share some code between frontend and backend, though there are some Haskell features like Typeclasses missing (I'm not sure what the actual impact this has on Fay apps?)
  • Haste - The Haskell wiki page says it works, though from looking at the GitHub repo it seems to only be developed by one person, and I'm not sure if anyone uses it in production?
  • Purescript - I have mixed feeling about this, as Purescript is a new language, while Fay allows for some code sharing.
  • Idris - I'm not really sure if this is a usable option at this point, but it seems interesting that JS compiler is there out of the box?

I'm mostly interested in opinions and personal experiences anyone has. There are lots of pages and lots of information about features of each of these languages, but I just couldn't find anything that objectively compares these for a real world application.

submitted by progfu
[link] [55 comments]
Categories: Incoming News

Ken T Takusagawa: [kazhsrsn] Uncompress then execute

Planet Haskell - Fri, 06/20/2014 - 1:57pm

The UPX executable packer works reasonably well on GHC-compiled programs (7.6.3, ELF x86-64):

$ upx --best hello-world

Ultimate Packer for eXecutables Copyright (C) 1996 - 2011 UPX 3.08        Markus Oberhumer, Laszlo Molnar & John Reiser   Dec 12th 2011      File size         Ratio      Format      Name --------------------   ------   -----------   ----------- 1133761 ->    314008   27.70%  linux/ElfAMD   hello-world

The failure mode before and after compression when libgmp is missing is identical, which is good. Compression does not obfuscate errors, even though ldd can no longer detect the shared libraries.
$ ./hello-world
./hello-world: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory

$ ldd ./hello-world not a dynamic executable

Packing executables is in general an interesting problem. Any other type of file that is read, we can insert a uncompression program as a pipe. However, executing is a bit more magical than just reading.

Categories: Offsite Blogs

Monomorphizing GHC Core?

glasgow-user - Thu, 06/19/2014 - 8:28pm
Has anyone worked on a monomorphizing transformation for GHC Core? I understand that polymorphic recursion presents a challenge, and I do indeed want to work with polymorphic recursion but only on types for which the recursion bottoms out statically (i.e., each recursive call is on a smaller type). I'm aiming at writing high-level polymorphic code and generating monomorphic code on unboxed values. This work is part of a project for compiling Haskell to hardware, described on my blog (http://conal.net). Thanks, - Conal _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Categories: Offsite Discussion

New haskell type searcher http://quicktypesearch.com

Haskell on Reddit - Thu, 06/19/2014 - 6:28pm

Greetings! I've been doing a new type searcher (just like Hayoo/Hoogle) but retrieving just exact matches (up to variables renaming, arguments order, currified/uncurrified ...etc.). This is the first time I did a Haskell program supposed to be used and read by other people so I'm afraid the code might not be the best and there are for sure still some bugs and quirks...so it could be awesome if someone can take a look and help me with his advice :)

submitted by sofosure
[link] [24 comments]
Categories: Incoming News

Do you recognize this type?

haskell-cafe - Thu, 06/19/2014 - 4:17pm
Hi guys, I am making a DSL for event composition (inspired from digestive-functor & reactive-banana) and I find myself wanting a primitive like that:
Categories: Offsite Discussion

Joachim Breitner: Another instance of Haskell Bytes

Planet Haskell - Thu, 06/19/2014 - 2:00pm

When I gave my “Haskell Bytes” talk on the runtime representation of Haskell values the first time, I wrote here “It is in German, so [..] if you want me to translate it, then (convince your professor or employer to) invite me to hold the talk again“. This has just happened: I got to hold the talk as a Tech Talk at Galois in Portland, so now you can fetch the text also in English. Thanks to Jason for inviting me!

This was on my way to the Oregon Summer School on Programming Languages in Eugene, where I’m right now enjoying the shade of a tree next to the campus. We’ve got a relatively packed program with lectures on dependent types, categorical logic and other stuff, and more student talks in the evening (which unfortunately always collide with the open board game evenings at the local board game store). So at least we started to have a round of diplomacy, where I am about to be crushed from four sides at once. (And no, I don’t think that this has triggered the “illegal download warning” that the University of Oregon received about our internet use and threatens our internet connectivity.)

Categories: Offsite Blogs

Relations between Functor typeclass and kind

haskell-cafe - Thu, 06/19/2014 - 8:36am
Hi all, Some days ago, I was talking with someone about Kinds and GADTs. At some point he mention that types with this Kind: (* -> *) are called Functors. So, is there any relations between Functor typeclass and Functor kind? Is it considered as a "pattern"? if so, are there some other ones? If you have any link on this, I'll take them. Thanks in advance for your help. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

How do use haskell to do math research?

Haskell on Reddit - Thu, 06/19/2014 - 6:37am

I am about to enter grad school in the next year and to this day, aside from using matlab to graph 3d functions, I still do math using pencil and paper. I am really interested in geometry and I just purchased a book on computational geometry. My main interests are differential geometry and topology. I would like to know how to get started in those areas using haskell.

I have looked at "haskell for great good" and I also own the book "The craft of functional programming". I have programmed in the past but I never really had a project that interested me so although I can program I don't do enough of it as I would like to.

Any good suggestions to some resources?

submitted by spitfiredd
[link] [9 comments]
Categories: Incoming News