How My Neural Net Sees Blackboards

May 11, 2013

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.

Etingof-130323-110039 Etingof-130323-110039
Etingof-130323-110039 Etingof-130323-110039
Etingof-130323-110039 Etingof-130323-110039

Read the rest of this entry »

Singularity Summit Talk

May 7, 2013

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.

Chris Olah speaking at singularity summit

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!

Parsec Patterns

May 7, 2013

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!

(Read More On Github)

Misunderstanding Romantic Attraction

May 3, 2013

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.

Read the rest of this entry »

Monads For The Terrified

March 20, 2013

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.

  1. 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.
  2. 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.
  3. Monads are a very abstract idea. I’m not really sure that the motivation can be properly grasped by anything other than using them.
  4. 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!

(Read more on github)

Math Notation Experiment “Paper”

March 20, 2013

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.

Read More…

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.)

Europe Trip (Summer 2011)

January 2, 2013

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.

Read the rest of this entry »

HaskSymb: An Experiment in Haskell Symbolic Algebra

June 1, 2012

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

Read more on github. You can also find some discussion on the Haskell reddit.

Toronto RepRap User Group #3 = Great Success

March 1, 2012

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!

Atendees look at a printer at the third Toronto RepRap User Group

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).

A web interface for ImplicitCAD is demonstrated

You can read more and find links to the videos of the talks at the hacklab blog.

Quantified Hacklab

February 11, 2012

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:

Hacklab's Activity according to doorbot for 2009,2010, and 2011; 7 day sum

ImplicitCAD 0.0.1 Release

February 6, 2012

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.)

Variable Twist Extrusion of a Rounded Union in ImplicitCAD

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.

Read the rest of this entry »

DIY Bio Toronto Meetup 1

January 20, 2012

On January 11th, we had the first DIY Bio Toronto Meetup at hacklab. To quote the description of DIY Bio Toronto:

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 »

Fractal Holiday/Solstice/Christmas Cards!

December 24, 2011

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.

Christopher Olah's fractal Christmas cards from 2011

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 »

Project Shellter

December 22, 2011

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!

A 3D Printed Hermit Crab Shell

A 3D Printed Hermit Crab Shell (source)

They’re 3D printing hermit crab shells! And the shells are being adopted!

A Hermit Crab in a 3D Printed Shell

A Hermit Crab in a 3D Printed Shell (source via makerbot)

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.

Open Source 3D Printing: The Printers, Toolchain, & Things (GTALUG talk)

November 10, 2011

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.


Follow

Get every new post delivered to your Inbox.

Join 317 other followers