Controlling Multiple Drones with Clojure and Goals and Beliefs

How to Control Multiple Drones with Clojure The clj-drone library now has multi-drone support! You can now send multiple drones commands, receive their navigation data, and even have them perform their actions autonomously with goals and beliefs. It takes a bit of extra setup to control more than one drone. We need to assign them each an ip and get them talking as an adhoc network. Jim Weirich creating a neat little script to run on the drone to do just this. Here are the instructions: ...

September 5, 2013 · 4 min · Carin Meier

Babar - A Little Language with Speech Acts for Machines

Preface: A Gentle Obsession About a year ago, I picked up John McCarthy’s paper on Elephant 2000. I have to admit that I only understood about 10% of it. But I was so intrigued by the ideas that it sent me on a quest. I re-read it numerous times, slept with it under my pillow, and finally decided that I needed to read his other papers to get an insight into his thoughts. I began a considered effort with Seven McCarthy Papers in Seven Weeks. It ended up taking about three months, rather than seven 7 weeks. Again I came back to Elephant 2000. I began to understand more as other ideas and concepts sunk in, like ascribing beliefs and goals to machines. But to really explore the ideas, I really wanted to try to implement parts of Elephant in my own programming language. The problem was, having no formal training in computer science, (my background is Physics), I had never created a programming language before. The stars aligned and I found the Instaparse Clojure library. The result is Babar, a language designed to explore communication with machines via Speech Acts. ...

June 4, 2013 · 6 min · Carin Meier

Growing a Language with Clojure and Instaparse

Creating your own programming language with Clojure and Instaparse is like building rainbows with s-expressions. The Instaparse library is an elegant way of building executable parsers trees with pattern matching and standard EBNF notation for context-free grammars. Since this is my first foray into parser trees and grammars, I thought I would share my learnings in this post. Starting with a Single Word Let’s start with the simplest example: a number. When we start up our REPL in our brand new language, we want to be able to enter an integer, and have evaluate as an integer. ...

May 2, 2013 · 4 min · Carin Meier

The Joy of Flying AR Drones with Clojure

Clojure is fun. Flying AR Parrot Drones are fun. Put them together and there is pure joy. Ever since I found out that you could program and control your drone over UDP, I couldn’t wait to try it out in Clojure. I had dreams of controlling it with my Emacs REPL. That dream came true and it has been a true joy to fly in a function language. This blog post shows some of the features that the clj-drone project has so far. There is still a bit of work to go to make it complete. But, I wanted to share and hopefully encourage others to start playing with it too. ...

February 5, 2013 · 3 min · Carin Meier

Hobby Languages for Clojurists

I spend most of my work day in Ruby and CoffeeScript. However, my true love belongs to Clojure, which I consider my “hobby” language right now. I started to wonder, what are the “hobby” languages for people who spend most of their work day with Clojure. My informal twitter poll revealed selection as diverse and interesting as the Clojurists themselves. **Developers Who Enjoy Clojure Also Enjoy: ** (In no particular order) ...

December 26, 2012 · 1 min · Carin Meier

7 McCarthy Papers in 7ish Weeks #5 & #6 - SDFW Tic-Tac-Toe

This holiday edition blog post covers two McCarthy papers instead of just one. We will be talking about Free Will - Even for Robots and the companion paper Simple Deterministic Free Will. In which we deftly sidestep the philosophers We know that computers and programs are completely deterministic. A philosophical question is whether we, as humans are ruled by determinism, (although complex it may be), or not. If we take the decision that humans are deterministic, then we can argue that either there is no free will - or that free will is “compatible” with determinism. Philosophers, of course, could discuss such questions interminably, trying to get a theory to fit for all people and all occasions. Thankfully, McCarthy takes a very admirable and practical view on free will. Let’s try out something simple for a computer program and see how it works. He explores a philosophy “Compatibilist’s” view, which regards a person to have free will if his actions are decided by an internal process, even if this process itself is deterministic. But by exploring this view with computer programs, he makes clear: ...

November 25, 2012 · 5 min · Carin Meier

7 John McCarthy Papers in 7 weeks - Prologue

In the spirit of Seven Languages in Seven Weeks, I have decided to embark on a quest. But instead of focusing on expanding my mindset with different programming languages, I am focusing on trying to get into the mindset of John McCarthy, father of LISP and AI, by reading and thinking about seven of his papers. Why? Get out of your box If you are comfortable, you are not challenging yourself to grow. You are doomed to stay in your same mindset and your little box and your world gets smaller. As an Object Oriented programmer, I was happy in my little box. Then one day, I discovered Clojure and Functional Programming and my world became bigger and richer because of it. I hope to glean a similar box expansion, by exploring the thoughts of McCarthy. Especially, since I have the nagging suspicion that we are somehow doing programming “completely wrong.” ...

September 19, 2012 · 2 min · Carin Meier

A Clojure REPL Driven Roomba

One of the things that I love about Clojure is that it can go anywhere that Java can. That is why, when I found out that the Roomba already had a Java library written for it - I was excited to be able to hook it up to my Emacs / Swank and be able to control it from my editor. It is great fun! If you have a Roomba at home and you want to play along… ...

August 9, 2012 · 2 min · Carin Meier

Baba Yaga and the Clojure Reducers

Once upon a time, a young girl decided to take a break from her code and stroll in the forest. It was quite a pleasant day, she packed her lunch in her bag and set off. While she was walking, she started thinking about a concurrency bug that her OO project was having. As she pondered the complexities of mutablilty, state, and threads, she must of strayed from the trail and lost track of time. By the time she looked around, she realized that she was totally lost. ...

July 7, 2012 · 6 min · Carin Meier

How to include non clojars/maven clojure version in your lein project

Do you need to have a specific version of Clojure in your leiningen project that you can’t get from Clojars? I ran into this problem when I wanted to run a sample project on Clojure’s reducers - which is not in the current Clojars version of 1.4.0. I needed to use the most recent version, (unreleased), of 1.5.0. These are the steps to get you running. Clone the clojure git repository ...

July 7, 2012 · 1 min · Carin Meier