neolateral

programming, drawing, photograpy etc.
PicoTurtle released

This week I built the first release of PicoTurtle - a turtle program built on REST/HTTP APIs, allowing programs written in potentially any programming language to draw turtle graphics with it. The desktop editor is built using electron. Download it at PicoTurtle Homepage.

I'll make follow-up posts about how the program works, but here's a dragon curve drawn using picoturtle...

And here's the code... (based on the entry on dragon curve in wikipedia at https://en.wikipedia.org/wiki/Dragon_curve#Code)

from picoturtle import *
create_turtle()

### Your code goes here ###

def dragonCurve(order, length):
    right(order * 45)
    dragonCurveRecursive(order, length, 1 …
VS Code Extension - timed-themes

VS Code is now my primary IDE, it's the IDE I use the most and really like. At home I use a laptop hooked to a large monitor. This setup is in a room with lots of windows and skylights. So during the day, the room lights up a lot and there are a lot of reflections on the screen. So I use a dark theme with lots of contrast during the day. But at night I use a lighter theme with less contrast. I used to switch manually with a two lines in my settings for the IDE theme …

Install gcloud-sdk and Docker on Ubuntu 16.04 on VirtualBox

I use Windows 10 Home on my laptop, so docker integration is a challenge, espescially running all the builds written in shell scripts won't run nicely on Ubuntu on Windows or MSYS2.

So I've had to fallback on installing ubuntu on virtualbox, with docker and gcloud-sdk. I've documented the steps below.

Get VirtualBox

Download VirtualBox

Install Ubuntu on VirtualBox

Get Xubuntu 16.04 ISO. Xubuntu is lightweight and provides a standard desktop. Ubuntu or other flavours should also work.

Download Xubuntu LTS

VirtualBox Guest Config

Config suggested for guest: 1. Min Disk: 30GB 2. RAM: 2GB 3. LVM Partitioning 4 …

Exploring turtle graphics

This week I started exploring turtle graphics with my son as he is very interested in drawing and crafts (he calls his room "art room"). We wrote one program together in python's turtle graphics library. It's here - face.py , and this is what it looks like :)

So this got me reading and exploring a bit more about turtle graphics, especially since the tools and language python were not really easy enough to use for my son. So I decided to create my own turtle environment (currently I'm thinking about doing this in electron so that it's available on all platforms …

A GCD Game!

Recently I've again started reading Dijkstra's book "A Discipline Of Programming". In the very first chapter "Chapter 0 on executional abstraction", he mentions a board game which when played correctly produces the GCD of two numbers. It is just an implementation of Euclid's Algorithm. I wanted to write a program to play this game.

I'd also discovered a library to produce svg animations called vivus, which I wanted to try.

So here's my implementation of the GCD game in html/javascript - GCD Board Game. Note that the numbers are provided using URL params to the html (x, and y are …

First Post!

This is my first post on the new jekyll site on my github page. I'm currently learning node.js using nodeschool.io tutorials. I'm recording my progress at learnnode

Learning and Memorization

Got thinking with this old article on wired: Want to Remember Everything You'll Ever Learn? Surrender to This Algorithm

Fascinating!

I have recently had trouble remembering things because of my interest in so many fields. This looks promising as a strategy to learn more and more.

Excellent quote from above article:
"You must clarify your goals, gain knowledge through spaced repetition, preserve health, work steadily, minimize stress, refuse interruption, and never resist sleep when tired. This should lead to radically improved intelligence and creativity. The only cost: turning your back on every convention of social life. It is a severe …

My Library At Google Books

Today I created my own library at the Google Books site. Its publicly accessible at Abhishek's Library.

I have added some of the books I recently bought to the library. Some comments/observations about the service:

  1. The "Import Books" feature is excellent. It uses the ISBN number to look for books and add them to your library. But, it failed to find some of my books. These I had to add using the book search option.
  2. The following two books, I could not find even after a search.

97801433335818 The Exploits of Professor Shonku
81-87-98118-0 The Best of Saki

The lisp of life

stretching abstraction very far.... at any moment in time (say t), one could think of one's life as a cons pair of time gone by and the future.

such that:

(car life) -> past
(cdr life) -> future.

(cons past future) -> life

and now at the time t+1, one could recalculate life as
(cons (+ past 1) (- future 1))

if expected age is a constant *FULL-LIFE*, then in the beginning we are
(cons 0 *FULL-LIFE*)

and in the end
(cons *FULL-LIFE* 0)

and mid-life crisis is when
(eqlp (car life) (cdr life))

A Psychological Sci-Fi Film Wish-list

A recently compiled list of films in the psychological sci-fi genre, which I would like to watch.

  1. The Day the Earth Stood Still (1951 film)
  2. 12:01 PM (1990 film)
  3. Equilibrium (film)
  4. Primer (film)
  5. A Scanner Darkly (film)
  6. K-PAX (film)
  7. It Happened Here
  8. Avalon (2001 film)
  9. Fantastic Planet
  10. Donnie Darko