Showing posts from March, 2012

Using Wolfram Alpha from Clojure

I have been blown away in the last year by Wolfram Alpha but I haven't done much with the developer's APIs . To make it easier to experiment with Wolfram Alpha, I wrote a simple Clojure wrapper for the Java APIs. You can get a copy at github . In case you don't want to grab the github repo, here is most of the code: (ns wolfram) (def appid (System/getenv "WOLFRAM_APP_ID")) (def engine (com.wolfram.alpha.WAEngine.)) (.setAppID engine appid) (.addFormat engine "plaintext") (defn query [input] (let [query (.createQuery engine)] (.setInput query input) (let [result (.performQuery engine query)] {:pods (for [pod (.getPods result)] {:title (.getTitle pod) :sub-pods (for [sub-pod (.getSubpods pod)] (for [contents (.getContents sub-pod)] (.getText contents)))})}))) Notice that you need to set the API key for your application in an environment variable. You get 2000 free API calls a

A bright future, with some potential problems

Even though the news media portrays a dire world situation, I disagree. In the last few decades the world has become a safer place and fundamental shifts in technology keep driving down the cost of computing resources, networks, and storage that enable greatly increased global productivity. For much of the world globalization is a rising tide that floats most people's boats. The problem is that not everyone benefits from new paradigms for constant lifelong learning, diminishing advantages of organizations who hold to old mega-scale production and business models, and a free flow of information. The book The Power of Pull is a good reference for ideas how to take advantage of the transitions that the world is going through, whether you like them or not! The losers in this new world are people and organizations who cannot (or don't want to) adapt and learn and who expect material rewards that are out of touch with their productivity. The biggest potential problem that concer