For the last few weeks, I’ve been taking part in a small weekly neural net study group run by Michael Nielsen. It’s been really awesome! Neural nets are very very cool! They’re so cool, I had to use them somehow. Having been interested in mathematical handwriting recognition for a long time, I decided to train a neural net to clean up images of blackboards as a short weekend project/break. Thanks to Dror Bar-Natan’s Academic Pensieve, it was easy to get a bunch of data.
As readers of this blog are probably aware, I’m a rather big fan of multiplicative calculus, an obscure mathematical tool that is very useful in reasoning about quasi-exponential trends. And I’m rather sad that I get few occasions to apply it. So, it should come as no surprise that when I was given an opportunity to speak at Singularity Summit last fall, a conference largely concerned with exponential trends in technology, I decided to try to persuade people of the utility of multiplicative calculus and the value of mathematical abstractions.
Now, there was a bit of confusion because a lot of people thought that I was going to be speaking about my work — that’s what all the other Thiel Fellows did — but I think this was much more valuable. The things I do are generally of very domain specific interest and don’t have super deep implications world-changing for the future of technology, just some minor, incremental improvements. In any case, you can watch me and the other fellows talk.
My public speaking skills aren’t the greatest, and it wasn’t the best talk I’ve given… but it was pretty cool when Vernor Vinge came up to me and told me that he liked my talk! (And I think Ray Kurzweil may have said so as well, but I wasn’t sure if it was him.) And then I and the other fellows had dinner with Eliezer Yudkowsky (and lots of other awesome people, but he sat beside us). So it was a crazy awesome experience in general!
At a meeting of the Toronto Haskell User Group a few months back (Jan 9, 2013), after going over the basics of the combinatoric parsing library Parsec, I talked about some clever tricks that made my work with it much cleaner. (See also Alber Lai’s write up of his talk, Parsec Generally.)
Note that I don’t have deep knowledge of Parsec. I’ve just used it for a few things and noticed that some code patterns really cleaned up my code. I’d love to hear about other people’s tricks for writing awesome parsers with Parsec!
One thing I’ve realized in the last year is that I really deeply misunderstood what romantic attraction was. Most people I’ve tried to describe this to have been incredulous, since the things I misunderstood seem trivial to them. Nevertheless, I think that for a certain type of person this may actually be a really difficult point. In particular, I think the way romance is generally talked about and portrayed in our culture is kind of misleading if you can’t read beneath the surface. Personally, I only realized these points after reading neuroscience literature on romantic attraction.
It seems like everyone writes a monad tutorial in the Haskell community… Well, here’s mine.
People learning Haskell generally seem to get tripped up about monads. There are good reasons for this.
- Monads are, really, needed to write a serious Haskell program. As a consequence, people generally try to learn them fairly shortly after beginning to use Haskell.
- Monads are defined in Haskell and have a very short definition. As such, it is very tempting to not just teach someone how to use monads, but to also try to teach them the underlying definition. The definition involves a bunch of rather advanced Haskell. In combination with (1), this is a big problem.
- Monads are a very abstract idea. I’m not really sure that the motivation can be properly grasped by anything other than using them.
- Monads are generally interweaved with the idea of an IO object.
This introduction attempts to avoid some of these problems. In particular, it is only going to teach you how to use monads and not what they are. This avoids (2) and, to a lesser extent, (3). I’ve tested this approach on a number of people in the last few months, and it seems to be quite effective. That said, I understand that some people may prefer an introduction focusing on the what and why, in which case you may wish to look Chris Smith’s Why Do Monad’s Matter?.
Some day, you will need to learn more. But, if you find you understand the contents of this tutorial, I’d encourage you to wait and play around with monads for a while. Then, when the time comes to learn the in full, they’ll be natural and obvious ideas. We can talk more about that later. For now: onwards!
A while back, I wrote a post on some unusual math notation I was playing with. I actually took it much further than that and drafted up a paper full of different ideas over the following months. At the time, I was hoping it might be publishable but then got discouraged and never did anything with it… Except show it to people in person and promise I’d put it online soon. In any event, it’s one of those things I’ve been meaning to put up for forever.
So here it is. I’m particularly proud of the quantifier stuff and the numerals.
When one considers how complicated the ideas mathematical notation must represent are, it clearly does quite a good job. Despite this, the author believes that any claim that modern mathematical notation is the best should be met with extreme scepticism.
Mathematical notation is a natural language: no one sat down and constructed it, but rather it formed gradually by people making changes that are adopted. Most changes are not adopted; whether they are depends on a variety of factors including: mathematical utility, ease of adoption (the average individual doesn’t want to spend hours learning), dissemination, and shear dumb luck. The first two of these qualities are associated to real properties in notation, forming the necessary selective pressure for evolution to occur.
Evolution is a blind watchmaker: the world around us is filled with examples of the stupidity of biological evolution (the classic example being halibut). Similarly, evolution is also a blind language and notation designer. In particular, it is held back by a strong selective force against change, since people would need to adopt it, and so evolution doesn’t effectively explore the full notation-space. This staticism means that even the most outrageous notations remain unchallenged by virtue of age.
Please keep in mind that I wrote this (except for the redaction of some sillier sections and some minor improvements) three years ago, when I was quite a bit younger, and it isn’t representative of my present abilities. That said, I do still think that the fundamental idea, that notation is important and should be explored, is very true.
(I’ve also put the paper on github, for those who are interested.)
Last summer (2011), I had an opportunity to go to Europe and jumped at the chance: we went to Paris in celebration of my sister’s 16th birthday, and I stayed behind for a while longer and traveled around by train. I’ve had a draft post about it floating around for a while, and, well, now I’m finishing and posting it.
One interesting detour I took this last month was writing a toy Haskell Symbolic Algebra library, HaskSymb. It takes advantage of Quasi-Quoters and View Patterns to do awesome math pattern matching and enable one to write beautiful code.
An example of its use:
> -- Let's make some variables! > let (a,b) = (V "a", V "b") > -- Basic Expression manipulation > (a+1)^3 (a + 1)³ > expand $ (a+1)^3 a³ + a² + a² + a² + a + a + a + 1 > collectTerms $ expand $ (a+1)^3 a³ + 3a² + 3a + 1
The interesting part, however, is the code for expand, collectTerms and friends. It’s extremely pretty. For example:
expand [m| a+b |] = expand a + expand b expand [m|a*(b+c)|] = expand (a*b) + expand (a*c) expand a = a
I was the organizer of the most recent meeting of the Toronto RepRap User Group. It went excellently, with a turn out of about twenty people and five printers. We had a number of talks that were filmed by Socrates from the Singularity Weblog. In all, an awesome outcome!
Attendees also saw the first public demonstration of a collaboration between myself and my friend Rob, a web interface for ImplicitCAD. It’s still very much in development and I won’t be talking about it any further till the release of ImplicitCAD 0.0.2 (in a week or two).
You can read more and find links to the videos of the talks at the hacklab blog.
I’m very excited about a new project I’m collaborating on with my friend Sen: Quantified Hacklab. Inspired by Quantified Self, we’re analyzing the information that we naturally generate by living so close to technology in the hopes of better understanding our community. Also because we like data and pretty graphs.
You can read about some of our very initial results on the Hacklab Blog. To whet your appetite:
I’m pleased to announce the second release of ImplicitCAD: 0.0.1. (The first release was 0.0.0 because 0 is the true first ordinal.)
The point of this release is somewhat arbitrarily chosen. We were over due for one and no clean break was in sight. Then I woke up with a nasty headache and couldn’t seem to code, so I thought I’d do a release instead.
I’m going to try and martial together my thoughts and discuss changes in this release and what’s coming up. The TL;DR is that ImplicitCAD is going exciting places and if you are willing to tolerate bugs and file bug reports, you should become a beta user for it.
Do-it-yourself biological innovation! We’re inspired by the California group “biocurious”, like them, we believe in the power of open source, open access, and learning in community. We believe this philosophy should be applied to biology! Wouldn’t it be great to have a biology-based maker space here in Toronto? Join us and help make that a reality! Read the rest of this entry »
It’s that time of the year again: I’m making my fractal Holiday cards! I slacked last year and only made a few, but I’m back at it.
Previous years, I’d made up fractals for my cards. This year I just explored the Mandelbrot set and found cool looking regions. Since I obsessed over my choice of pictures, it took me a while to make them — I’ve made about twenty so far, and still need to make more! Read the rest of this entry »
A couple years ago, I wrote a patch for sage, an open source alternative to programs like Mathematica and Matlab, to allow it to export surfaces as STLs for 3D printing. Since then, I’ve seen a few uses of it pop up. Recently, it has been used for something extremely awesome: Project Shellter!
They’re 3D printing hermit crab shells! And the shells are being adopted!
As someone who kept hermit crabs when I was younger, I think this is awesome!
Makerbot has a more thorough blog post, with a video of the shell being adopted.
Last night I gave a talk, “Open Source 3D Printing: The Printers, Toolchain, & Things”, at the Greater Toronto Area Linux User Group (GTALUG). In addition to being the longest talk I’ve given thus far, at 90 minutes, I think it was the best. I feel more relaxed and in control with every talk I give.
For reference, I’m making the slideshow available.