[Haskell-cafe] ANNOUNCE: som-4.0 (for data analysis and visualisation)
Do you have some data that you'd like to understand better? I'm happy to announce a new release of a package called som that may help: http://hackage.haskell.org/package/som https://github.com/mhwombat/som/wiki (wiki) A Kohonen Self-organising Map (SOM) maps input patterns onto a regular grid (usually two-dimensional) where each node in the grid is a model of the input data, and does so using a method which ensures that any topological relationships within the input data are also represented in the grid. This implementation supports the use of non-numeric patterns. In layman's terms, a SOM can be useful when you want to discover the underlying structure of some data. I have a brief tutorial in the wiki, which I hope to expand over the next few weeks. WHAT'S NEW - It is now easier to for non-math types to create a SOM (see defaultSOM) - Added another example to the wiki ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: grid 5.0
I'm happy to announce a new major release of the grid package: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) WHAT'S NEW: * Octagonal grids (just the thing for tiling that hyperbolic bathroom floor!) * Want to use the square grid, but need diagonal movement too? Try the octagonal grid. See the userguide for more information. * Updated the userguide to reflect the changes. ABOUT GRID: Grid provides tools for working with regular arrangements of tiles, such as might be used in a board game or self-organising map (SOM). Grid currently supports triangular, square, hexagonal, and octagonal tiles, with various 2D and toroidal layouts. If you need a tile shape or layout that isn't currently provided, please let me know. See Math.Geometry.Grid for an example of how to use the package. Suggestions for improvement are welcome. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Overloading
Also again, taking this way I can not provide several constructors taking inputs of different types, can I ? You can have multiple constructors, taking different numbers and types of input parameters, yes. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: grid-4.0 (tile maps for board games or maths)
I'm happy to announce a new major release of the grid package: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) WHAT'S NEW: * The package now uses associated (type) synonyms instead of multi-parameter type classes with functional dependencies. * Added two new classes: FiniteGrid and BoundedGrid. Moved some functions from the Grid class to the other classes, as appropriate. For example, only finite grids need the size function, and only bounded grids need the boundary function. * Added Unbounded grids for square, hexagonal, and triangular tiles. * Updated the userguide to reflect the changes. ABOUT GRID: Grid provides tools for working with regular arrangements of tiles, such as might be used in a board game or self-organising map (SOM). Grid currently supports triangular, square, and hexagonal tiles, with various 2D and toroidal layouts. If you need a tile shape or layout that isn't currently provided, please let me know. See Math.Geometry.Grid for an example of how to use the package. Suggestions for improvement are welcome. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Subject: ANNOUNCE: grid-3.0.1 (tile maps for board games or maths)
Twan van Laarhoven twanvl at gmail.com writes: After taking a peek at the documentation: have you considered removing the size function from Grid? . . . It might also be useful to add a rectangular grid type where diagonally adjacent cells are also neighbors. . . . Another interesting idea is to have modifier types that change which cells are neighbors, for example you could have Those are all great suggestions, thank you. I'll look into incorporating them into the next major release. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Subject: ANNOUNCE: grid-3.0.1 (tile maps for board games or maths)
I'm happy to announce a new major release of the grid package: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) WHAT'S NEW: Functions for reporting the boundary and centre of bounded grid have been added, along with some miscellaneous new utility functions. IMPORTANT: The order of parameters for some functions has changed to make it easier to use them with map and fold operations. ABOUT GRID: Grid provides tools for working with regular arrangements of tiles, such as might be used in a board game or self-organising map (SOM). Grid currently supports triangular, square, and hexagonal tiles, with various 2D and toroidal layouts. If you need a tile shape or layout that isn't currently provided, please let me know. See Math.Geometry.Grid for an example of how to use the package. Suggestions for improvement are welcome. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: gray-extended (tools for working with Gray codes)
I'm happy to announce a new package called gray-extended http://hackage.haskell.org/package/gray-extended-1.2 https://github.com/mhwombat/gray-extended (github) ABOUT GRAY-EXTENDED: Gray codes satisfy the property that two successive values differ in only one digit. Usually the term \Gray code\ refers to the Binary Reflected Gray code (BRGC), but non-binary Gray codes have also been discovered. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: creatur (framework for artificial life)
I'm happy to announce a new package called Créatúr (creatur) http://hackage.haskell.org/package/creatur https://github.com/mhwombat/creatur-examples/raw/master/Tutorial.pdf (tutorial) https://github.com/mhwombat/creatur (github) ABOUT CRÉATÚR: Créatúr is a software framework for automating experiments with artificial life (ALife) or other evolutionary algorithms (EA). It provides a daemon which ensures that each agent gets its turn to use the CPU. You can use other applications on the computer at the same time without fear of interfering with experiments; they will run normally (although perhaps more slowly). Créatúr also provides a library of modules to help you implement your own ALife species. Even if you aren't using the Créatúr framework, you may find some of these modules useful. A tutorial on how to use Créatúr, including lots of examples, is available at https://github.com/mhwombat/creatur-examples/raw/master/Tutorial.pdf. Créatúr (pronounced kray-toor) is an irish word meaning animal, creature, or unfortunate person. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: grid-2.0
I'm happy to announce a new major release of the grid package: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) WHAT'S NEW: The GridMap module provides ordered maps from tiles on a grid to values. This module is a wrapper around Grid and Map, in order to combine the functionality of grids and maps into a single type. This may be of interest to anyone developing a game based on a grid. ABOUT GRID: Grid provides tools for working with regular arrangements of tiles, such as might be used in a board game or self-organising map (SOM). Grid currently supports triangular, square, and hexagonal tiles, with various 2D and toroidal layouts. If you need a tile shape or layout that isn't currently provided, please let me know. See Math.Geometry.Grid for an example of how to use the package. Suggestions for improvement are welcome. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: som-1.0
Do you have some data that you'd like to understand better? I'm happy to announce a new package called som that may help: http://hackage.haskell.org/package/som https://github.com/mhwombat/som/wiki (wiki) A Kohonen Self-organising Map (SOM) maps input patterns onto a regular grid (usually two-dimensional) where each node in the grid is a model of the input data, and does so using a method which ensures that any topological relationships within the input data are also represented in the grid. This implementation supports the use of non-numeric patterns. In layman's terms, a SOM can be useful when you want to discover the underlying structure of some data. I have a brief tutorial in the wiki, which I hope to expand over the next few weeks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: grid-1.1
I'm happy to announce a new package called grid: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) Grid provides tools for working with regular arrangements of tiles, such as might be used in a board game or self-organising map (SOM). Grid currently supports triangular, square, and hexagonal tiles, with various 2D and toroidal layouts. If you need a tile shape or layout that isn't currently provided, please let me know. See Math.Geometry.Grid for an example of how to use the package. Suggestions for improvement are welcome. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: grid-1.1
Paul Visschers mail at paulvisschers.net writes: Looks nice. Does it scale well to millions of elements, and can it handle 3D? The current implementation wouldn't scale well to millions of elements, but it shouldn't take much tweaking to support that. Currently, when a grid is constructed, the list of all possible indices is constructed as well, so that calls to the indices function are fast. To support large numbers of tiles, I would instead generate all possible indices only when the indices function is called. Then the indices function would be too slow to be usable for more than, say, 50,000 tiles. But perhaps you don't need that function. At present, the only 3D support I have is for square tiles on the surface of the torus. I could add more tile shapes on the surface of the torus or other 3D shapes. I could also add support for 3D tiles (e.g., cubes, pyramids) in a 3D volume, if that's what you need. Let me know what your needs are and I'll try to incorporate it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: grid-1.1
It seems like you should be able to stick this behind some abstraction so that you can support multiple implementations for grids (i.e., currently storing indices as you mention, but could support other implementations with different trade offs ...)? kris Yes, there's a Grid typeclass which anyone can extend. The minimal complete definition is: indices, distance, and size. There are default implementations of the other functions, but you can also develop your own. So as you suggest, it would be easy for me to add other grid implementations that would live side-by-side with the current implementations, but would have different trade-offs. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: grid-1.1
Brent Yorgey byorgey at seas.upenn.edu writes: Looks neat! By the way, the URLs within the Haddock documentation are formatted improperly... Cheers! I'll fix that. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] How can I get rid of this link error?
I wrote a library called AmysGeometry. The only modules in it (so far) are: Amy/Geometry/ThreeD.hs Amy/Geometry/UnitSphere.hs The library compiles just fine, and I've been using it with other programs for a while. Then yesterday, I started getting the following error. Linking dist/build/add-centroids/add-centroids ... /usr/local/lib/AmysGeometry-1.0/ghc-7.0.3/libHSAmysGeometry-1.0.a(UnitSphere.o): In function `s3c6_info': (.text+0x4557): undefined reference to `__stginit_AmysGeometryzm1zi0_AmyziGeometry_' /usr/local/lib/AmysGeometry-1.0/ghc-7.0.3/libHSAmysGeometry-1.0.a(UnitSphere.o): (.data+0x3f0): undefined reference to `AmysGeometryzm1zi0_AmyziGeometry_DZCLocation_static_info' collect2: ld returned 1 exit status cabal: Error: some packages failed to install: I think this started because I recompiled some stuff with profiling. So I wiped out my current GHC and Haskell installation, re-installed it, and rebuilt AmysGeometry. But I'm still getting this error when I try to link with it. I would be grateful for any advice on how to diagnose this and fix it. Oh, and ghc-pkg check doesn't report any errors. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How can I get rid of this link error?
Tom Nielsen tanielsen at gmail.com writes: have you tried cabal clean before cabal install ? Yeah, forgot to mention that I'd tried that. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Indentation problem using Happy
I'm trying to use Happy for the first time, and I'm having trouble with this very simple example: = BEGIN: PolyParser.y = { module Main where import Char ( isAlpha, isDigit, isSpace ) } %name calc %tokentype { Token } %error { parseError } %token id { TokenId $$ } ',' { TokenCOMMA } wombat { TokenWombat $$ } %% Poly: id ',' wombat { parseError :: [Token] - a parseError _ = error Parse error data Poly = Poly Int String deriving Show data Token = TokenId Int | TokenCOMMA | TokenWombat String deriving Show lexer :: String - [Token] lexer [] = [] lexer (c:cs) | isSpace c = lexer cs | isAlpha c = lexVar (c:cs) | isDigit c = lexNum (c:cs) lexer (',':cs) = TokenCOMMA : lexer cs lexNum cs = TokenInt (read num) : lexer rest where (num,rest) = span isDigit cs lexVar cs = case span isAlpha cs of (wombat,rest) - TokenWombat wombat : lexer rest (id,rest) - TokenId id : lexer rest main = getContents = print . calc . lexer } = END: PolyParser.y = The resulting PolyParser.hs has an indentation problem (second-to-last line, below), so it won't compile. happyReduce_1 = happySpecReduce_3 4 happyReduction_1 happyReduction_1 _ _ _ = HappyAbsSyn4 (parseError :: [Token] - a parseError _ = error Parse error Thank you in advance to anyone who can tell me where I've gone wrong. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Handy abbreviations for using SciTE with Haskell
I often use SciTE for editing Haskell code. I wanted an easy way to type symbols such as ∀ (instead of forall), so I created a properties file that allows me to do that. I haven't seen anything similar online (I Googled first), so I made the code available online. You can find the file and instructions here: http://www.haskell.org/haskellwiki/Tips_for_using_SciTE_with_Haskell ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe