Not all computational effects are monads
- 17 November 2008
- Computation
Lately I've been thinking about computational effects in general, i.e., what is the structure of the “space of all computational effects”. We know very little about this topic. I am not even sure we know what “the space of all computational effects” is. Because Haskell is very popular and in Haskell computational effects are expressed as monads, many people might think that I am talking about the space of all monads. But I am not, and in this post I show two computational effects which are not of the usual Haskell monad kind. They should present a nice programming challenge to Haskell fans.
→ continue reading (14 comments)Remote Backup with Secure Shell and Rsync
- 16 September 2008
- Software
Back in 2000 John Langford of the Machine Learning (Theory) blog and I wrote a backup script which I am still using today. A number of other people have found it useful so I decided to release it under an open source license. The script is easy to use under Linux. I am told it also backs up Windows with a bit of tweaking.
→ continue readingSub and Poly, two new additions to the PL Zoo
- 14 September 2008
- Programming languages, Software
I have added two new languages to the Programming Languages Zoo which demonstrate polymorphic type inference and type checking with subtypes.
→ continue reading (1 comment)Exact real arithmetic in Haskell
- 03 September 2008
- Computation, Guest post, News, Software
HERA is an implementation of exact real arithmetic in Haskell using the approach by Andrej Bauer and Iztok Kavkler, see these and these slides. It uses the fast multiple precision floating point library MPFR. Download source, and see documentation and examples of usage at my home page.
[Note by Andrej: this is a guest post by Aleš Bizjak, a first-year student of mathematics at my department. I am very proud of the excellent work he did on his summer project.]
→ continue readingEfficient computation with Dedekind reals
- 24 August 2008
- Computation, Constructive math, Logic, Talks
Two versions of this talk were given at Computability and complexity in analysis 2008 and at Mathematics, Algorithms and Proofs 2008.
Joint work with Paul Taylor.
Abstract: Cauchy's construction of reals as sequences of rational approximations is the theoretical basis for a number of implementations of exact real numbers, while Dedekind's construction of reals as cuts has inspired fewer useful computational ideas. Nevertheless, we can see the computational content of Dedekind reals by constructing them within Abstract Stone Duality (ASD), a computationally meaningful calculus for topology. This provides the theoretical background for a novel way of computing with real numbers in the style of logic programming. Real numbers are defined in terms of (lower and upper) Dedekind cuts, while programs are expressed as statements about real numbers in the language of ASD. By adapting Newton's method to interval arithmetic we can make the computations as efficient as those based on Cauchy reals.
Slides: slides-map2008.pdf (obsolete version: slides-cca2008.pdf)
Extended abstract: abstract-cca2098.pdf
Intuitionistic mathematics for physics
- 13 August 2008
- Constructive math, Tutorial
At MSFP 2008 in Iceland I chatted with Dan Piponi about physics and intuitionistic mathematics, and he encouraged me to write down some of the ideas. I have little, if anything, original to say, so this seems like an excellent opportunity for a blog post. So let me explain why I think intuitionistic mathematics is good for physics.
→ continue reading (37 comments)An object-oriented language Boa
- 07 May 2008
- Programming languages, Software
I have added another language, called Boa, to the Programming Languages Zoo. It is an object-oriented language with the following features:
- integers and booleans as base types,
- first-class functions,
- dynamically typed,
- objects are extensible records with mutable fields,
- there are no classes, instead we can define “prototype” objects and extend them
to create instances.
The Programming Languages Zoo
- 06 May 2008
- Programming languages, Software
I teach Theory of Programing Languages (page in Slovene). For the course I implemented languages which demonstrate basic concepts such as parsing, type checking, type inference, dynamic types, evaluation strategies, and compilation. My teaching assistant Iztok Kavkler contributed to the source code as well. I decided to publish the source code as a Programming Language Zoo for anyone who wants to know more about design and implementation of programming languages.
→ continue reading (1 comment)Representations of uncomputable and uncountable sets
- 06 February 2008
- Computation, Tutorial
Occasionally I hear claims that uncountable and uncomputable sets cannot be represented on computers. More generally, there are all sorts of misguided opinions about representations of data on computers, especially infinite data of mathematical nature. Here is a quick tutorial on the matter whose main point is:
→ continue reading (11 comments)It is meaningless to discuss representations of a set by a datatype without also considering operations that we want to perform on the set.
Today I lectured about the Hydra game by Laurence Kirby and Jeff Paris (Accessible Independence Results for Peano Arithmetic, Kirby and Paris, Bull. London Math. Soc. 1982; 14: 285-293). For the occasion I implemented the game in Java. I am publishing the code for anyone who wants to play, or use it for teaching.
→ continue reading (23 comments)