[Haskell-cafe] writing a function to make a correspondance between type-level integers and value-level integers
Well, I guess you might be interested in geometric algebra then http://dl.acm.org/citation.cfm?id=1173728 because Geometric Algebra is a quite more principled way of doing component-free calculations. See also the web page of the author http://staff.science.uva.nl/~fontijne/ Geigen seems like a nice DSL that could well be embedded in Haskell. Anyway, the reason I pointed out Vectro is that it answers your question about reifying and reflecting type-level integers (by means of a type class). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: haskell-names-0.1
Tom Lokhorst and myself worked on a tool to generate missing imports, both qualified and unqualified, at the Odessa hackathon. We created a working proof of concept [0]. I wasn't aware of fix-imports. Erik [0] https://github.com/haskell-suite/halberd On Tue, Jun 25, 2013 at 6:30 AM, Evan Laforge qdun...@gmail.com wrote: This is neat, it sounds like I could use this with fix-imports to find only modules that export the right function name, or even to add non-qualified imports. But since it's already 95% good enough for my use case, I probably won't get around to it any time soon. On Thu, Jun 20, 2013 at 8:13 AM, Roman Cheplyaka r...@ro-che.info wrote: I am pleased to announce the first public release of haskell-names, a name resolution library for haskell-src-exts AST. Namely, it can do the following: * for a module, compute its interface, i.e. the set of entities exported by the module, together with their original names. * for each name in the module, figure out what it refers to — whether it's bound locally (say, by a where clause) or globally (and then give its origin). Thanks to haskell-packages, this library is fully integrated with Cabal, so that you can easily generate name interfaces for any Cabalized package. See more details in the README: http://documentup.com/haskell-suite/haskell-names This library is based on the code written by Lennart Augustsson in 2010. Little of that code survived, but nevertheless it's been a great help. Roman ___ 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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] tangential request...
On Mon, Jun 24, 2013 at 11:32 PM, Mark Lentczner mark.lentcz...@gmail.com wrote: (apologies for keeping this tangential topic alive for so long... but it is the cafe... and it is all for a good Haskell related cause...) ... Ah, the indomitable Mr. Parker, we meet again! While the other console fonts were nothing so much as an indiscriminate pile of plundered pixels from the trash can of crufty CRTs Your font was of such refined line and design that it clearly marked you as a man of distinction, wealth, fame, power, and fine scotch! A straight sided capital A, sporting a peaked top that actually comes to a point?!?!!! Well played! Game of Baccarat over martinis? Now you both owe us an screenshot =). -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: HaTeX 3.6. Now with Babel, TikZ and more!
Hello everyone! It is time for a new release of HaTeX, the Haskell LaTeX library. http://hackage.haskell.org/package/HaTeX-3.6 == What is HaTeX? == HaTeX contains numerous types and functions that will assist you in the process of creating a LaTeX document within Haskell. You can also include your manually created LaTeX code in HaTeX, so you can choose the more convenient tool you want to use for each case. == What's new in this release? == A lot of changes have been made since the last release! The most important changes are explained in the blog post I just wrote: http://deltadiaz.blogspot.com.es/2013/06/hatex-36-texy-class-babel-fontenc-tikz.html However, the new feature I am more excited with is the TikZ script generator. Using a very intuitive interface, you will be able to generate high quality graphics for LaTeX documents. It is still far from be complete, but next releases will fill the gaps that you may find right now. Just to give you a taste, consider the following code: myFigure :: Figure myFigure = Scale 2 $ Figures [ RectangleFilled (0,0) 1 1 , Colored Green $ RectangleFilled (-1,1) 1 1 , Colored Red $ RectangleFilled ( 0,2) 1 1 , Colored Blue $ RectangleFilled ( 1,1) 1 1 ] With this simple construction you already have the following picture ready to be inserted in your LaTeX file output. http://daniel-diaz.github.com/projects/hatex/tikzsimple.png In the examples directory contained in the source distribution there is also an example (tikz.hs) that includes the plotting of a Haskell function (sine). However, the interface it uses may be less comfortable than the one shown in the example above. If you are a HaTeX user, don't miss this update, because it also contains some very important bug fixes. Any feedback gladly accepted. Good luck, Daniel Díaz. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: haskell-names-0.1
Yeah, no one seems to know about it, which is surprising to me. I've been using it for over 2 years and I'd never want to go back. I guess most people don't mind maintaining import lists, my guess is that few people work on large projects, so they never see a long import list. On Mon, Jun 24, 2013 at 11:58 PM, Erik Hesselink hessel...@gmail.com wrote: Tom Lokhorst and myself worked on a tool to generate missing imports, both qualified and unqualified, at the Odessa hackathon. We created a working proof of concept [0]. I wasn't aware of fix-imports. Erik [0] https://github.com/haskell-suite/halberd On Tue, Jun 25, 2013 at 6:30 AM, Evan Laforge qdun...@gmail.com wrote: This is neat, it sounds like I could use this with fix-imports to find only modules that export the right function name, or even to add non-qualified imports. But since it's already 95% good enough for my use case, I probably won't get around to it any time soon. On Thu, Jun 20, 2013 at 8:13 AM, Roman Cheplyaka r...@ro-che.info wrote: I am pleased to announce the first public release of haskell-names, a name resolution library for haskell-src-exts AST. Namely, it can do the following: * for a module, compute its interface, i.e. the set of entities exported by the module, together with their original names. * for each name in the module, figure out what it refers to — whether it's bound locally (say, by a where clause) or globally (and then give its origin). Thanks to haskell-packages, this library is fully integrated with Cabal, so that you can easily generate name interfaces for any Cabalized package. See more details in the README: http://documentup.com/haskell-suite/haskell-names This library is based on the code written by Lennart Augustsson in 2010. Little of that code survived, but nevertheless it's been a great help. Roman ___ 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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Roman Numeral Problem
Coincidence. I blogged about this today http://kusimari.blogspot.in/2013/06/roman-numerals-using-parser-combinators.html. I can share the haskelish python code offline, assuming this is not needed to pass the thoughtworks code submission. It more or less resembles what Richard has written. -Santhosh On Mon, Jun 24, 2013 at 12:54 PM, Richard A. O'Keefe o...@cs.otago.ac.nzwrote: An important question here is whether you want to notice when a Roman numeral is invalid, e.g., iix, or not. From a parsing point of view context-free grammars are not ideal. We have the patterns i{1,3} | iv | vi{1,3} | ix units x{1,3} | xl | lx{1,3} | xc tens c{1,3} | cd | dc{1,3} | cm hundreds m{1,3} | mↁ | ↁm{1,3} | mↂ thousands so we want to write a grammar rule like roman(N) -- group('m', 'ↁ', 'ↂ', M), group('c', 'd', 'm', C), group('x', 'l', 'c', X), group('i', 'v', 'x', I), {N is M*1000 + C*100 + X*10 + I}. group(U, F, T, N) -- ( [U,T] - {N = 9} ; [U,F] - {N = 4} ; [U,U,U] - {N = 3} ; [U,U] - {N = 2} ; [U] - {N = 1} ; [F,U,U,U] - {N = 8} ; [F,U,U] - {N = 7} ; [F,U] - {N = 6} ; [F] - {N = 5} ). using DCG notation. This is not context-free. It is an attribute grammar with attributes passed down the parse tree (U, F, T) and passed up the parse tree (N). Parser combinators are the easy way to do this in Haskell; see 'parsec' or any number of parser combinator tutorials. For that matter, it's pretty trivial to do this particular one with plain code that pretty much mirrors the structure shown above. Just write something that takes (as many arguments as you want) then a list of characters coming in and returns a pair with a computed answer and the remaining characters. But wait! That _is_ a parser combinator! I guess parser combinators can't be that hard after all (:-). Good luck finding the five thousand character (ↁ) or the ten thousand character (ↂ) or any of the other Unicode I'm not a letter, no, honest, I'm really not, I'm a Roman numeral characters on your keyboard. ___ 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
[Haskell-cafe] homotopy type theory for amateurs
hello cafe -- by now i'm sure you have heard that the homotopy type theory folks have just written up a free introductory book on their project. http://homotopytypetheory.org/2013/06/20/the-hott-book/ gabriel gonzalez and i are starting up a small reading group for the book. the level of study will be amateur, though i have high hopes for rigor and thoroughness. personally, i know hardly any type theory or logic, and the last time i thought about homotopy theory in any seriousness was years ago. thankfully the book looks very accessible. being time-constrained we were going to do it mostly over email, maybe starting a google group or other mailing list, but we might meet as well, say once a month in san francisco (where we both are.) if you're interested in joining us, send me an email (midfield at gmail) and i'll try to keep you informed of any developments. best, ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] writing a function to make a correspondance between type-level integers and value-level integers
Thanks Oleg, I have discovered geometric algebra some months ago. There is a textbook on the topic: http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470941634.html It seems very interesting, but I have not currently the time to make a detailed comparison with vector/tensor algebra. Moreover I have not your level of knowledge in Haskell/Standard ML and type theory, so I have already a lot of work. However, for sure this is something I will do in the few next years, because I think that notations are very important in physics and mathematics: it is of huge interest to have a condensed and easy to remember notation; still better if it is easily extended to higher dimensions/orders (unfortunately, generally these notations are not taught at university). Regards, TP o...@okmij.org wrote: Well, I guess you might be interested in geometric algebra then http://dl.acm.org/citation.cfm?id=1173728 because Geometric Algebra is a quite more principled way of doing component-free calculations. See also the web page of the author http://staff.science.uva.nl/~fontijne/ Geigen seems like a nice DSL that could well be embedded in Haskell. Anyway, the reason I pointed out Vectro is that it answers your question about reifying and reflecting type-level integers (by means of a type class). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe