Tuesday, June 16, 2009

Python, Arduino, and CUDA

It seems uncommon anymore to get really pumped about something. And by pumped, i mean real ultimate power pumped. It just so happens that a few things have recently got me that pumped.

1. The birth of my son. No question there and pretty self-explanatory so we'll move onto the others.
2. Python programming language. Holy heck is this a rocking language.
3. Arduino prototyping platform. Once again, rocking.
4. nVidia CUDA library. Using your video card as a math coprocessor? Awesome.

I've been programming for a little while now, mostly Matlab and Perl. Some C/C++ from classes but nothing production. It's only been recent that I've discovered Python, and quite frankly I wish I'd discovered it earlier. I'm enjoying how straightforward the syntax is and how much you can do with little coding. It's very programmer friendly. I intend to write much more about Python, especially since there is now a Python interface to nVidia's CUDA library.

The Arduino is essentially the face of physical computing. Generally speaking, it isn't a trivial thing to get your computer to interface with the real world and act upon it. There's all sorts of kits and what have you for the crummy basic stamp and related trash, but they were always extremely limiting and rather proprietary. In fact I always found those to be rather discouraging.

The Arduino, however, is open source, powerful, and very flexible. There are tons of projects on instructables involving the Arduino. There's tons of info out there where all sorts of people have fiddled with it and made really cool things. Heck here's one that has your plants twitter you when they need watering. Freaking cool. The biggest thing about what I find on instructables is how inspiring the projects are. Everyone swears by how easy the Arduino is to program. It's time to start fiddling.

And then there's nVidia's CUDA library. It essentially allows you to use your video card for matrix math operations. The one I have here at work was able to run a n-body simulation with 27,000 objects at 360 GFlops. Trust me, that's freaking insane. It also did an eigenvector decomposition of a 2048 x 2048 randomly generated matrix in 4.8ms. So yeah, if it's matrix math you need done, especially on a large matrix or system of equations, the CUDA library lets you have a supercomputer on your desktop.

Anyways I'll be writing more about these later. This is just the starting point.

3 comments:

  1. Arduino, Python *and* CUDA in a single post?
    Nice! :-)

    Have you checked out reprap.org and their Aduino-based open source 3D printer project?

    Maybe we'll see you at the GPU Technology Conference in September?

    -will (wramey /at/ nvidia.com)

    ReplyDelete
  2. Hello, Will, and thanks for commenting =)

    The reprap project is rather amazing. I remember seeing it many years ago when it started. Wow they've come a long way, thanks for linking it.

    I would love to attend the conference but for the moment I'll have to settle for the forum interactions. There may be a possibility of attending next year though. One of my side projects at work is to use the cuda library to process synthetic aperture radar (SAR) images. It would be something to be able to share some of that with the community.

    ReplyDelete
  3. np. :-)

    Google Scholar is a great way to see what's already being done with SAR and CUD:
    * http://scholar.google.com/scholar?q=cuda+sar+radar

    -will (wramey /at/ nvidia.com)

    ReplyDelete