Impossible Programs - A Program that Ends Before it Starts Alice laughed. “There’s no use trying,” she said: “one can’t believe impossible things.” “I daresay you haven’t had much practice,” said the Queen. “When I was your age, I always did it for half-an-hour a day. Why, sometimes I’ve believed as many as six impossible things before breakfast. There goes the shawl again!”
An ode to programming in three parts I was with you in those days bright Connected terminals. Connected minds Across from each other, pulled together with boolean logic Tethered tight but soaring high, kites dancing in the sky I am with you in these days short Rushing to make the long now linger The symmetries have broken, turned upside down And we watch the waters race by, fractals breaking every…
A secret message inside a 10,000 hyperdimensional vector We’ve seen in previous posts how we can encode data structures using Vector Symbolic Architectures in Clojure . This is an exploration of how we can use this to develop a cipher to transmit a secret message between two parties. A Hyperdimensional Cipher Usually, we would develop a dictionary/ cleanup memory of randomly chosen…
generated with Stable Diffusion Before diving into the details of what Vector Symbolic Architectures are and what it means to implement Clojure data structures in them, I’d like to start with some of my motivation in this space. Small AI for More Personal Enjoyment Over the last few years, I’ve spent time learning, exploring, and contributing to open source deep learning. It continues…
What if I told you that you could pick up a library model and instantly classify text with arbitrary categories without any training or fine tuning? That is exactly what we are going to do with Hugging Face’s zero-shot learning model . We will also be using libpython-clj to do this exploration without leaving the comfort of our trusty Clojure REPL. What’s for breakfast? We’ll…
AI Debate 2 from Montreal.AI I had the pleasure of watching the second AI debate from Montreal.AI last night. The first AI debate occurred last year between Yoshua Bengio and Gary Marcus entitled “The Best Way Forward for AI” in which Yoshua argued that Deep Learning could achieve General AI through its own paradigm, while Marcus argued that Deep Learning alone was not sufficient and needed a…
In this edition of the blog series of Clojure/Python interop with libpython-clj , we’ll be taking a look at two popular Python NLP libraries: NLTK and SpaCy . NLTK - Natural Language Toolkit I was taking requests for doing examples of python-clojure interop libraries on twitter the other day, and by far NLTK was the most requested library. After looking into it, I can see why. It’s the…
libpython-clj has opened the door for Clojure to directly interop with Python libraries. That means we can take just about any Python library and directly use it in our Clojure REPL. But what about matplotlib ? Matplotlib.pyplot is a standard fixture in most tutorials and python data science code. How do we interop with a python graphics library? How do you interop? It turns out that matplotlib…
A new age in Clojure has dawned. We now have interop access to any python library with libpython-clj . Let me pause a minute to repeat. ** You can now interop with ANY python library. ** I know. It’s overwhelming. It took a bit for me to come to grips with it too. Let’s take an example of something that I’ve always wanted to do and have struggled with mightly finding a way to do…
clojure.spec allows you to write specifications for data and use them for validation. It also provides a generative aspect that allows for robust testing as well as an additional way to understand your data through manual inspection. The dual nature of validation and generation is a natural fit for deep learning models that consist of paired discriminator/generator models. TLDR: In this post we…
In this first post of this series, we took a look at a simple autoencoder . It took and image and transformed it back to an image. Then, we focused in on the disciminator portion of the model, where we took an image and transformed it to a label. Now, we focus in on the generator portion of the model do the inverse operation: we transform a label to an image. In recap:
In the last post , we took a look at a simple autoencoder. The autoencoder is a deep learning model that takes in an image and, (through an encoder and decoder), works to produce the same image. In short: Autoencoder: image -> image For a discriminator, we are going to focus on only the first half on the autoencoder. Why only half? We want a different transformation. We are going to want to take…
If you look long enough into the autoencoder, it looks back at you. The Autoencoder is a fun deep learning model to look into. Its goal is simple: given an input image, we would like to have the same output image. It’s sort of an identity function for deep learning models, but it is composed of two parts: an encoder and decoder, with the encoder translating the images to a latent space…
Spring is bringing some beautiful new things to the Clojure MXNet . Here are some highlights for the month of April. Shipped We’ve merged 10 PRs over the last month. Many of them focus on core improvements to documentation and usability which is very important. The MXNet project is also preparing a new release 1.4.1 , so keep on the lookout for that to hit in the near future. Clojure MXNet…
I’m starting a monthly update for Clojure MXNet . The goal is to share the progress and exciting things that are happening in the project and our community. Here’s some highlights for the month of March. Shipped Under the shipped heading, the 1.4.0 release of MXNet has been released, along with the Clojure MXNet Jars . There have been improvements to the JVM memory management and an…
Object detection just landed in MXNet thanks to the work of contributors Kedar Bellare and Nicolas Modrzyk . Kedar ported over the infer package to Clojure, making inference and prediction much easier for users and Nicolas integrated in his Origami OpenCV library into the the examples to make the visualizations happen. We’ll walk through the main steps to use the infer object detection which…
It’s holiday time and that means parties and getting together with friends. Bringing a baked good or dessert to a gathering is a time honored tradition. But what if this year, you could take it to the next level? Everyone brings actual food. But with the help of Deep Learning, you can bring something completely different - you can bring the image of baked good! I’m not talking about…
This is an introduction to the high level Clojure API for deep learning library MXNet . The module API provides an intermediate and high-level interface for performing computation with neural networks in MXNet. To follow along with this documentation, you can use this namespace to with the needed requires: ( ns docs.module ( :require [clojure.java.io :as io] [clojure.java.shell :refer [sh]]…
I’m delighted to share the news that the Clojure package for MXNet has now joined the main Apache MXNet project. A big thank you to the efforts of everyone involved to make this possible. Having it as part of the main project is a great place for growth and collaboration that will benefit both MXNet and the Clojure community. Invitation to Join and Contribute The Clojure package has been…
This is the beginning of a series of blog posts to get to know the Apache MXNet Deep Learning project and the new Clojure language binding clojure-package MXNet is a first class, modern deep learning library that AWS has officially picked as its chosen library. It supports multiple languages on a first class basis and is incubating as an Apache project. The motivation for creating a Clojure…
I was 10 years into my career when I met her. I could count the number of other women programmers I had worked with on one hand and none of them had young children at home like me. She was not only incredibly experienced and competent, but also had a son in college. I was curious about her career path so I asked her one day at lunch why she was still programming and hadn’t become a manager…
I wrote a blog post a while back about using a Clojure machine learning library called Cortex to do the Kaggle Cats and Dogs classification challenge. I wanted to revisit it for a few reasons. The first one is that the Cortex library has progressed and improved considerably over the last year. It’s still not at version 1.0, but it my eyes, it’s really starting to shine. The second…
In my talk at Clojure Conj I mentioned how a project from Oracle Labs named GraalVM might have to potential for Clojure to interop with Python on the same VM. At the time of the talk, I had just learned about it so I didn’t have time to take a look at it. Over the last week, I’ve managed to take it for a test drive and I wanted to share what I found.
So, you have an idea for a fiction book. First, let me tell you that it’s a good idea and it’s a great thing that you are a coder. Quite a few successful authors have a background in software development. Arrival , (which is a fabulous movie), comes from the book, Stories of your Life , written by a fellow programmer Ted Chiang . Charlie Stross is another fine example. One of my…
Update: Cortex has moved along since I first wrote this blog post, so if you are looking to run the examples, please go and clone the Cortex repo and look for the cats and dogs code in the examples directory. There is an awesome new Clojure-first machine learning library called Cortex that was open sourced recently. I’ve been exploring it lately and wanted to share my discoveries so far in…
Clojure.spec is a new library for Clojure that enables you to write specifications for your program. In an earlier post , I showed off some of it’s power to generate test data from your specifications. It’s a pretty cool feature. Given some clojure.spec code, you can generate sample data for you based off of the specifications. But what if you could write a program that would generate…
I sit next to my daughter, showing her programming for the first time. (+ 1 1 ) “Now press enter.” 2 “Pretty cool, huh?” She looks unimpressed. I fear I’m losing her. How can I explain that this is just a small tip of something so much bigger? You can make the code sing to you. You can take these numbers, turn them into notes, and line them up with the beat of your…
So you want to write a book? Awesome. I’ve been working on one too for the last year. No, it’s not really a programming book, but it does have code in it. It’s a sci-fi/fantasy book written for my ten year daughter, but this post isn’t about that. It’s about sharing the tools and setup that I’ve found work best for me. Tools for Writing If the first thing you…
Clojure.spec is an exciting, new core library for Clojure. It enables pragmatic specifications for functions and brings a new level of robustness to building software in Clojure, along with unexpected side benefits. One of which is the ability to write specifications that generate Dr. Seuss inspired rhymes. In this blog post, we’ll take a tour of writing specifications for a clojure…
It happened again. I was sitting down reading a paper and I came across the phrase Kolmogorov-Uspensky machine and I had no idea what it was. My initial reaction was just to move on. It probably wasn’t important, I told myself, just a detail that I could skim over. I took a sip of my tea and continued on. The next paragraph it appeared again . It was just sticking up like a thread waiting to…
This post continues our exploration from the last blog post Why Hyperdimensional Socks Never Match . We are still working our way through Kanerva’s paper . This time, with the basics of hypervectors under our belts, we’re ready to explore how words can be expressed as context vectors. Once in a high dimensional form, you can compare two words to see how similar they are and even…
The nature of computing in hyperdimensions is a strange and wonderful place. I have only started to scratch the surface by reading a paper by Kanerva . Not only is it interesting from a computer science standpoint, it’s also interesting from a cognitive science point of view. In fact, it could hold the key to better model AI and general reasoning. This blog is a casual stroll through some of…
Book of Software Miracles - Cover This 21st century illustrated manuscript was recently uncovered. It depicts miraculous phenomena in software engineering and represents one of the most spectacular new discoveries in the field of Renaissance Computer Science. Some examples of the glorious illustrations and text translations are presented here. Book of Software Miracles Fol. 26 On the day in 1958…
All programming languages are not created equal. Some clearly excel at solving different problems. There are languages that are great for scalability and others that are great for proving correctness. But what about one that that will make you smarter? To look for this answer, I am going to turn to a different language, our human language, and research from the field of linguistics and cognitive…
The last time I went to the dentist to get a cavity filled, I got a shot of Novocain as a local anesthetic to numb the area. After I emerged from the dental chair, I still had no feeling in my lip and mouth area. Trying to talk and smile was comical. Trying to drink tea resulting in dribbles down my face. Luckily, the loss of feeling only lasted a couple hours. Soon, I was back to normal. Even in…
It’s that time of the year again for radars . Since I made one last year , I decided to continue the tradition and make one this year. Languages No changes from last year for Clojure and Pixie. Adopt : Clojure - It is fantastic language. Trial : Pixie - The language continues to grow and improve and has a great community - and it is a LISP. Assess : Elixir - Another great functional language…
We humans are quite wonderful. We do amazing things every day without even realizing it. One of them, you are doing right now. You are reading text. Your brain is taking these jumbles of letters and spaces in this sentence, which in linguist terms is called an utterance , and making sense out of it. The individual meanings of sentences might be quite complex. Take for example the utterance,…
This is a continuation of the first and second conversations in which topics such as creating databases, learning facts, querying, and time traveling were discussed. Today’s topics include architecture, caching, and scaling. Human: Hello again Datomic . Ready to talk again? Datomic: Sure. I think you wanted to ask me some questions about how I would fit in with your other systems. Human:…
The following is a continuation of the first conversation which touched on schema creation and querying. This conversation includes learning new facts, time, and the sometimes unfortunate reality of lawyers. Human: Hi Datomic . I am back from my tea and cookies break. I really enjoyed talking with you, could we continue our conversation? Datomic: Certainly. Let me see, where did we leave off?…
Human: Hi Datomic . I have been hearing good things about you. I would like to talk to you and get to know you. Is that alright? Datomic: Sure! I would be happy to talk with you. What language would you like to converse in? Human: I like Clojure. Datomic: That is one of my favorites too. You know how to setup a Leiningen project right? Human: Oh yes. What dependency should I use?
Sometimes I want to create something and I run into a limitation or constraint. It is at this point where I am tempted to give up and say that I just can’t do that. At this time, I remember Maurice Sendak and the origins of Where the Wild Things Are . In this interview with Bill Moyers , he explains how the book was originally titled Where the Wild Horses Are , but he couldn’t draw…
I made it to that magical moment when the Clojure book I had been working on so long was published and I could actually hold it in my hand. It was an immense project and I am very happy that it is finally done. Since then, I met some people that are interested in writing books as well. They asked if I had any insights or tips having gone through the process as a first time author. I have collected…
Clojure’s partition and partition-all functions are very useful. However, I have been bitten a few times using partition when I really wanted partition-all . So to help myself and all of you to remember it, I have made some diagrams with pugs from the Game of Thrones In code, partition takes a collection and returns a lazy sequence of lists, each containing n items. To demonstrate this with…
It’s that time of year for radars to be published. So this year, I thought I would publish one of my own. Here is what is on my radar. Languages Adopt : Clojure - It is fantastic language. Really. Trial : Pixie - The promise of a really fast startup Clojure inspired language. I am impressed already and it is only a few months old. Assess : Idris - I have only seen this lang briefly, but was…
Sure you may have done FizzBuzz before. Maybe you have even done it in Clojure. But have you done it without the use of any conditionals? As your brain starts to work on the how this we be done, you might be wondering why you should do this in the first place? There are two very good reasons for this. The first is that it is a kata . Katas build your code practice
Denial : I am not really writing a book. Anger : Why did I ever decide to write a book? Bargaining : If I just finish this book, I promise never to write another one. Depression : I am never going to finish this book. Resolution : I am writing a book and I am going to give it my frigging all .
Recently, I switched from a traditional, “go to an office” job, to working from my home. It took some time to setup my home work space and get used to working remotely, but I finally have a system working for me. In this post, I thought I would share some things that I found useful. Window Seat Please If at all possible, locate your home work space near a window. The natural light does…
A quick tour of Clojure Transducers with core.async with Dr. Seuss as a guide. Follow along at home by: lein new green-eggs modify your project.clj to include the following: ( defproject green-eggs '0.1.0-SNAPSHOT' :description 'try them' :url 'http://en.wikipedia.org/wiki/Green_Eggs_and_Ham' :license { :name 'Eclipse Public License' :url 'http://www.eclipse.org/legal/epl-v10.html' } :dependencies…
Sometimes I pause before talking to someone about Clojure code. Not because I am unsure of the code, but because I am unsure of how to pronounce the code. The particular code in question is Clojure’s assoc . I have heard it pronounced two ways. One is “assosh”, the other is “assok”. So, to determine it, I decided to conduct a scientific poll of the Clojure community.…
Nobody knows how it happened. Some people think it was due to the rapid expansion and adoption of Clojure. Other people say that the language itself was caused by something deeper and more magical. No one knows for sure. All that we really know is that people starting being born with extraordinary powers. Powers that no human had had before. They were strange and unique to each person they…