Taking a Look at Lisp

For the past few weeks I have been taking a look at Common Lisp. That is I have been working though Practical Common Lisp, making notes and then flash cards for Anki. So this is a real effort to learn it. Very different to my previous attempts where I would played a bit and then moved on.

I guess the first question is why?

If you browse through my recent posts you will see I have been profiling the time I spend on personal projects. I have not published all my data and the number of hours I put in is highly variable but at the low end one week I put in about 8 hours.

As a thought experiment I decided to imagine I could only work 8 hrs a week on my personal projects. How would I feel about that.

Frustrated or unhappy with my lack of progress. To the point where I suspect I would drift away from many of my personal projects. So the next question is what could I do to stop that. I am not allowed to change number of hours I can use so I would want to improve what I got out of each hour. That is improve my productivity.

When working on projects at home, part of productivity is producing joy/fulfillment for myself, this can take the form of learning new topic or coding ideas that are not published. I mention this to remind myself I am not trying to be come a machine. As motivation comes from intrinsic and extrinsic sources, actually producing public work is something I should improve on but that’s for a different post.

Broadly dividing up the projects I want to do they fit into two categories, learning/creative work and the pleasure of figuring out how to make things go fast. At the moment I more learning towards the learning/creative part. Given most projects are fairly small it makes sense to default to a dynamic language rather than C++/C/Rust, they are just better for exploration. I can choose one of the others if it suits the task better.

It was then a choice between Python, Lisp, Ruby and JavaScript. I have a bit of a love hate relationship with Python, Ruby didn’t pull me in, JS is fun and the runner up if Lisp fails. I admit a bit part of the decision was based on a “Why not you have been meaning to learn it for ages” thought process. I figured I am unlikely to be less productive in it than using the others.

A couple of other factors were I have been using Emacs for a while so won’t have the start up cost there. It is very stable so worth memorising significant sections of it, JavaScript seems in constant flux. It is possible to distribute Lisp applications, it is not ideal but better than Python or Ruby AFAIK.

I plan on keep thinking on this 8 hour limit as a way to consider things that I would not usually consider, forcing myself to try out new things. Over a long-ish time frame I hope it will pay dividends.

Where I am at?

So I just finished the bulk of Practical Common Lisp but probably will not do the final few chapters containing many worked examples. I am considering working through a couple of other books, well perhaps 3 of them but want to mix in actually writing real code. QuickLisp (the de facto package manager) has binding to SDL2 along with OpenGL so I may try writing a few little bits of code in that.

What would make me drop Lisp?

It is usually a good idea to know when to get out of something. Common Lisp is not popular so it will suffer from a lack of libraries. That is acceptable to me, Learning the FFI is on the list. I don’t plan on only using Lisp so can drop back to C/C++/Rust when they are more suited.

So my biggest technical concern is deployment. I would love to see Webassembly become a common target or perhaps JavaScript. Being able to easily show small hacks would be great. Even that is not a show stopper as many of the things I want to explore will not make it out to the public. They are mostly small hacks to understand something rather than being secretive things.

So what would make me drop Lisp. I think if I was now enjoying it, if I am not happy I won’t be productive and cyclically if I am not productive I will not be happy :). Curently the plan is to give it until the end of the year and then judge it after having given it a good chance to prove itself. Lisp the minimum bar I expect from you is to hit is the same productivity as Python or C++.


lisp

816 Words

2020-07-30 09:56 +0000