Re: [Haskell-cafe] design question: decision tree from Programming Collective Intelligence

2010-08-04 Thread S. Doaitse Swierstra
I have added the permutation parsers from uulib to uu-parsinglib: http://hackage.haskell.org/packages/archive/uu-parsinglib/2.5.1.1/doc/html/Text-ParserCombinators-UU-Perms.html, where you find reference to the paper Doaitse On 22 jun 2010, at 09:24, Stephen Tetley wrote: Hello Maybe

Re: [Haskell-cafe] design question: decision tree from Programming Collective Intelligence

2010-06-24 Thread Jason Dagit
On Mon, Jun 21, 2010 at 11:22 AM, Daniel Lyons fus...@storytotell.orgwrote: Hi, I'm having a little trouble figuring out precisely how to port the decision tree code from the book Programming Collective Intelligence. You can see the code here:

Re: [Haskell-cafe] design question: decision tree from Programming Collective Intelligence

2010-06-22 Thread Stephen Tetley
Hello Maybe permutation trees are a viable starting point? See the paper Parsing Permutation Phrases which appears to be on CiteSeer. Some slides are also here - the data type definitions and Functor instance for permutation trees are on page 18 (pdf index page 19):

[Haskell-cafe] design question: decision tree from Programming Collective Intelligence

2010-06-21 Thread Daniel Lyons
Hi, I'm having a little trouble figuring out precisely how to port the decision tree code from the book Programming Collective Intelligence. You can see the code here: http://code.google.com/p/memothing/source/browse/trunk/PCI/ch7/treepredict.py?r=29 The design issue is that this code depends

Re: [Haskell-cafe] design question/font metrics

2010-06-03 Thread Christopher Done
Maybe you could check out the FTGL package for inspiration on using the freetype as a conventional C library. I was going to try to write a Hackage package but realised I know nothing about typography and had to start reading the intro. on Freetype's homepage (which is pretty good, actually).

[Haskell-cafe] design question/font metrics

2010-06-01 Thread Gery Debongnie
Dear Haskell-Cafe list, Since I am learning Haskell, I decided to try to do a real program, to practice and give me some experience. I choose to do a basic typesetting program (like TeX/LaTeX). Now, obviously, such a program needs to manipulate font objects, and in particular, font metrics.

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Anthony Cowley
On Tue, Jun 1, 2010 at 10:30 AM, Gery Debongnie gery.debong...@gmail.com wrote: 3. Perform a reading of the font metrics file in the main program, put the results into some FontMetrics object, and give that to stringWidth :: FontMetrics - Font - String - Double.  Pros : allow me to avoid

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Stephen Tetley
Hi Gery There probably isn't a library to help - I've looked at extracting TrueType font metrics myself but abandoned it - TrueType fonts have a very complicated file format, and the spec is inadequate to code an implementation. TeX font metrics are probably simpler but obviously tied to TeX.

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Brandon S. Allbery KF8NH
On Jun 1, 2010, at 10:53 , Stephen Tetley wrote: There probably isn't a library to help - I've looked at extracting TrueType font metrics myself but abandoned it - TrueType fonts have a very complicated file format, and the spec is inadequate to code an The saner way to do this is to write a

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Stephen Tetley
Hi Brandon Even that's not simple - freetype is essentially a framework for writing font processors rather than a conventional C library[*]. Saner perhaps is to write a C program using freetype to do the exact job you have in mind, then bind to your C program. Best wishes Stephen [*} Probably

[Haskell-cafe] Design question, HTML for GUIs?

2010-01-10 Thread Günther Schmidt
Hi everyone, as probably most people I find the GUI part of any application to be the hardest part. It just occurred to me that I *could* write my wxHaskell desktop application as a web app too. When the app starts, a haskell web server start listening on localhost port 8080 for example

Re: [Haskell-cafe] Design question, HTML for GUIs?

2010-01-10 Thread Gwern Branwen
2010/1/10 Günther Schmidt gue.schm...@web.de: Hi everyone, as probably most people I find the GUI part of any application to be the hardest part. It just occurred to me that I *could* write my wxHaskell desktop application as a web app too. When the app starts, a haskell web server start

Re: [Haskell-cafe] Design question, HTML for GUIs?

2010-01-10 Thread Jochem Berndsen
Günther Schmidt wrote: as probably most people I find the GUI part of any application to be the hardest part. It just occurred to me that I *could* write my wxHaskell desktop application as a web app too. When the app starts, a haskell web server start listening on localhost port 8080

Re: [Haskell-cafe] Design question, HTML for GUIs?

2010-01-10 Thread Michael Snoyman
I wrote a package to turn Hack applications into standalone apps using Webkit. The code is available at http://github.com/snoyberg/hack-handler-webkit. However, it's currently Linux-only. However, if I was going to write a desktop app based on an HTML GUI, I would bundle Webkit like this. It fixes

Re: [Haskell-cafe] Design question

2009-12-28 Thread Alexander Solla
There are many SVG elements, of which only a few are valid as the content of each other SVG elements. SvgDocumentElement defines the allowed subset for the SVG document. I want to generate a DList Char for all those sub-elements and finally collapse them to one DList Char representing

Re: [Haskell-cafe] Design question

2009-12-17 Thread hask...@kudling.de
Hi all, thanks for your ideas so far. I think you might be looking for too much sugar.  I don't know much about your problem, but I would use approximately your approach and be straightforward: To bother you with some details: i am building a model for an SVG document.

Re: [Haskell-cafe] Design question

2009-12-17 Thread minh thu
2009/12/17 hask...@kudling.de hask...@kudling.de: Hi all, thanks for your ideas so far. I think you might be looking for too much sugar. I don't know much about your problem, but I would use approximately your approach and be straightforward: To bother you with some details: i am

Re: [Haskell-cafe] Design question

2009-12-17 Thread Stephen Tetley
Ohhh... SVG is a truly horrible format though, that almost completely disguises the fact you are working with geometry. Being rude about the designers, its as if they realized half way through the job that putting a function-free PostScript into angle brackets was far too verbose, so they added

Re: [Haskell-cafe] Design question

2009-12-17 Thread hask...@kudling.de
I'd strongly recommend you simply choose a set of geometric objects paths, polygons, whatever... and work with those, only considering SVG as a final rendering step when you could probably just generate I do, cheers. The SVG model is just an intermediate representation for the SVG

[Haskell-cafe] Design question

2009-12-16 Thread hask...@kudling.de
Hi, i am not quite sure how to do this in the most elegant way: I have some data structures: data A = A Double data B = B Double data C = C Double ... and i want to allow only a subset in another data structure, so i did something like this:     data SubSet = SubSetA A | SubSetC C and use it

[Haskell-cafe] Design question

2009-12-16 Thread Jeff Wheeler
On Wed, Dec 16, 2009 at 10:40 AM, hask...@kudling.de hask...@kudling.de wrote: 1) Is the way i define and use SubSet, the only/valid way to define subsets? 2) What's the best way to make doSomethingElse polymorphic? I'm not very familiar with them, so I'm not sure if it's totally applicable,

Re: [Haskell-cafe] Design question

2009-12-16 Thread Sean Leather
Hi Lenny, i am not quite sure how to do this in the most elegant way: I have some data structures: data A = A Double data B = B Double data C = C Double ... and i want to allow only a subset in another data structure, so i did something like this: data SubSet = SubSetA A |

Re: [Haskell-cafe] Design question

2009-12-16 Thread Luke Palmer
On Wed, Dec 16, 2009 at 9:40 AM, hask...@kudling.de hask...@kudling.de wrote: Hi, i am not quite sure how to do this in the most elegant way: I have some data structures: data A = A Double data B = B Double data C = C Double ... and i want to allow only a subset in another data