My Collection

I am a connoisseur of programming languages. I collect them like some people collect hand tools. I believe that each language has a set of problems that it is particularly suited to solve. All sufficiently complex languages are able to solve any problem that can be solved by a computer program. However, each language is most expressive for some subset of problems. This set of problems are the ones that the language is best suited to solve.

I find myself cycling back and forth between a small group of languages. My favorite language is Clojure but it is the hardest to make best use of. It has a number of features that are outside the norms of other programming languages. But it doesn’t have support for some other features that are commonly supported by most other languages. This is on purpose. Languages like this are called opinionated. The developer of the language has strong feelings about how things should be done, so he builds the language to make doing things his way easier, often at the expense of doing them more conventionally. This can make it difficult to accomplish your goals because of the constraints the programming language designer has placed on you.

The languages that I have been cycling between lately are, Python, Clojure, Javascript, and Ruby. Each have their own advantages and disadvantages. Each has their own challenge to mastering it. Each time I return to one of them after a time away, I understand it better. Eventually I hope to have mastered them all.

I had thought I might compare these languages in this blog but I am running out of space and time. So, I’ll try to characterize each in a short sentence. Python is widely used by people that are amateur programmers because it is easy to learn and yet is capable of tackling problems of significant complexity. Clojure on the other hand is a power house of best practice principles. It is very good at what it’s designer, Rich Hickey, was interested in making it good at which is a class of programs he calls situated.

Javascript’s best feature is that it is available in virtually every browser. Consequently, you don’t have to worry about finding a copy and downloading it.  The rise in popularity of Node.js as a server side Javascript platform along with the availability of the NPM javascript code archive have gone a long way to making programming in Javascript productive.

Ruby is a comfortable mix of object orientation and a more conventional imperative style of programming. It has an extensive archive of libraries called gems. It was one of the first popular dynamic web site languages and still has a vibrant community using and extending it.

One of the development tools available to the Python community is Jupyter. It is a server that allows the user to create a notebook on a web page in which the user can combine textual notes, written in the simplified markup language Markdown, with live code cells where the reader can tweak the example code, execute it and see the results in-line on the notebook web page.

I recently discovered a package called Gorilla that plugs in to the Clojure build manager Leiningen and provides a notebook server to the Clojure community. I’ll have more to say about Gorilla after NaNoWriMo is over at the end of November.

Which reminds me to remind my readers that I won’t be posting blog posts during NaNoWriMo. I’ll be doing good to just write the 1667 words a day that is necessary to “win” NaNoWriMo without trying to post to the blog as well.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Fall Has Fell

The seasons each have their own allure. It seems that each comes just as the previous season is starting to be less exciting than it was initially. Fall has come just as we are thinking we would never get past the hot, humid sweaty days of summer. The crops are getting ripe. Children are carving pumpkins and picking out costumes to wear for Halloween.

My favorite associations with fall, aside from colorful fallen leaves and that pastel shade of yellow that the sunlight has taken on, is such classics as Ray Bradbury’s The October Country and the short stories of Edgar Allen Poe. There are plenty of others, Harvest Home and The Lottery come to mind, but Poe and Bradbury are always the first stories of fall that come to mind.

I discovered one of my favorite musical artists thanks to Poe. Sarah Jarosz set Poe’s Annabelle Lee to music (and adjusted the lyrics slightly to fit the rhythm and rhyme of the song form) and I heard her play it on All Things Considered. I checked out the rest of that album and became a devoted fan.

Another dark story that has presented itself this fall is Bladerunner 2049. I was very pleased with how it turned out. It was better than practically any sequel that we have been subjected to in recent years. It carries the story from the original smoothly forward while having its own story to tell. Highly recommended to fans of the original. It is probably a good idea to take a look at the original before viewing the new movie. Lots of subtle tie ins would be easy to miss if you haven’t seen it recently.

Fall is when the apples come in and the Athens State Fiddler’s Convention is held. Unfortunately I missed Fiddler’s and I haven’t made it to any of our orchards yet. Perhaps if the weather holds we will make it to the orchard this weekend.

Iron and Wine has come out with a new album this fall. It is called Beast Epic and I’m looking forward to picking it up. I’ll review it in some detail after I’ve had a listen to it. I found out about it when my issue of Wood & Steel, the Taylor Guitar magazine, included an interview with Sam Beam, the creative force behind Iron and Wine. As I should have figured out, he too is a Taylor guitar fan.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Natural Language, Computer language, and Music

I have been contemplating the similarities and differences between natural language, computer language, and music. In all three cases there is a dichotomy between the aspects of performance and notation. In the case of natural language, there is at least one case of one notation informing three different performances, that is, the classical form of pictographic writing is shared between Chinese, Japanese, and Korean although the spoken languages are totally different. A similar case is that of a higher level computer language that can be compiled to run on different hardware cpu architecture.  In the case of musical notation, while the pitch and duration of sound is firmly established, many aspects of the intonation of the music is left to the interpretation of the musician.

Although the three examples above have a number of similarities, they also have a number of significant differences. For instance, music has a rich emotional semantics but its abstract intellectual semantics is somewhat constrained. On the other hand, while mappings between computer notations and intellectual semantics abound, code is notoriously devoid of inherent emotional semantics.

Natural language brides the other two examples by providing adequate mechanisms for both intellectual and emotional semantics. It is interesting that in so many cases those that embrace the exploration of one of these three media so often dabble in all three. This has not always been the case. Only recently has fundamental computer programming literacy become common enough that many, if not most, educated adults are capable of writing simple programs in some computer language.

Considering these three as separate domains becomes somewhat confused when you consider that you can describe music and programs in prose. You can write programs that produce music and text for that matter. While I haven’t heard of music producing prose or code per se, it is certainly not much of a stress to imagine some form of experimental mapping that might do just that.

All three domains are subject to detailed formal syntactic and semantic analysis. I plan to tabulate the similarities and differences between these domains and will share it with you when I have done so. I expect to find some more subtle correlations between them.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Writing

Writing takes practice. The more you practice, the more you realize how much you have to learn. You also get better at it. You find yourself eavesdropping on conversations in public places. You observe things more carefully, the places, the people, the food and drink. You collect story ideas. You mine your past for incidents worth retelling.

You think about dramatic structure and conflict. You think about what people want and the obstacles they have to overcome to get it. You think about what you are trying to say. That way lies madness. The story has it’s own logic. If you try to force it, it won’t be worth reading.

You get strict with yourself. You insist that you are going to write your target number of words before you get up again. You set deadlines and start trying to hold yourself to them. You befriend other writers. You try to glean any tips that they are willing to share to make the writing life more comfortable.

You find a critique group. You learn to give and receive constructive criticism. You donate stories to raise money for the library. You look forward to talking with other writers and swapping experiences. Writing is a lonely activity. At its simplest, its just you your computer and a chair (or a pad of paper if you prefer).

I always loved stationery. I am a little surprised that I prefer writing on a computer. It goes back to my horrible handwriting and the ease with which you can edit a digital manuscript.

People see you writing and give you looks. It makes me wonder what they are thinking. Are they writers too? If not, they can’t understand why your are compelled to do this. You stare back and try to remember to smile.

You find that it helps to write in different places. It inspires new thoughts. It helps you  focus on getting the words on the page. But sometimes, no matter what you do, you end up racking your brain for a topic. I sometimes write several abortive attempts before I come up with a topic that has legs.

And then there are the blogs you read looking for inspiration. Attempting to address topics something as interesting as the ones you read.

And you write some more. That is what practice is all about.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

My Diet

I’ve been doing a potato fast for eight days now. That is, I have been eating only potatoes. White potatoes, sweet potatoes, red potatoes, russet potatoes, any kind of potato but nothing else. No butter no sour cream, no cinnamon sugar, Just potatoes. As many as I want. I lose weight without being hungry, on the order of five or ten pounds a week.

When I come off the potato fast, I am going to eat a low sugar, low salt, low fat, plant based diet. I’ve done this before. I lost from three hundred pounds down to two hundred and forty pounds. Then Thanksgiving and Christmas happened and I gained back to two hundred and seventy five pounds. I’ve tried exercise and several variations on the second stage diet, all with no luck. I was stuck on a plateau around two hundred and seventy five pounds.

In a week, I’ve lost around eight pounds. I expect the trend to continue. It worked once, This time I’ll be more diligent. I will be happy to get to the stage where I’m eating salads again though. I really like salads. I also like vinegar as a salad dressing. No oil, just vinegar. I’ve also had a lot of luck with salsa as salad dressing. I have to be careful about controlling portions of salsa. Most commercial salsas have too much salt in them.

I also avoid processed grains like white flour. That means I don’t eat sandwiches. More to the point, when I do eat sandwiches made from store bought bread, I end up gaining the weight back. I love bread, and eggs, and cheese. But when I eat them on any kind of regular basis, I am back in the holding pattern again.

I’ve also discovered that if I’m doing it right, I have this feeling that I used to think was hunger. It’s not really hunger though. I’m not sure what to call it but it accompanies weight loss. I find that exercise, although it is healthy, doesn’t seem to have much effect on weight loss one way or another. At least not as much exercise as I have been doing. I park a good way from my office so I get in some extra walking that way. I also work on the second floor and climb the stairs two or three times a day.

I drink a lot of water. I drink tea and coffee too. But everything I drink has no sugar and no sweetener. I think that sweetener interferes with your body’s ability to regulate it’s blood sugar. I admit to having cherry picked the research that I’ve based this diet on. I don’t recommend it to anyone else without consulting with their doctor and reading up on diet for themselves. That said, It seems to work for me and this time, I’m sticking to it.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Memory

My most creative moments seem to be when I am in the shower. The sensual feeling of the water hitting my skin relaxes me. I used to think it activated the right side of my brain but the myth that the right side of the brain is responsible for creativity has been disproved in recent years. I do think that relaxation aids creativity.

Another prime time for creativity is when you are about to go to sleep, drifting between consciousness and that first stage of sleep where you hear things going on around you but you can’t do anything about them and often don’t remember when you wake up.

Both of these times have something in common. It is difficult to remember what you were thinking when you try to recall them later. I had an incident like that this morning in the shower. I thought of a great topic for a blog post. I tried to fix it in my memory but something distracted me and the next thing I knew I had forgotten it.

That seems to happen more and more frequently as I get older. I don’t think it’s organic, at least not yet. I think it has more to do with the vast amount of experience that I’ve stuffed in my poor brain and the pitiful job that I’ve done of organizing it. My evidence for that conclusion is that I usually do remember things that I’ve had trouble remembering. It usually just takes relaxing and not worrying about it.

Sometimes I wonder what it would be like to have a personal memory prosthesis, a digital memory that I could access directly by thinking about it. A memory that would never fade or alter itself over time. I think we may some day have such a device. I even tell myself that I might live long enough to benefit from such technology.

Part of me knows that it is probably just a pipe dream. Brain prostheses are in the same category as general AI, something that is perennially just five or ten years in the future. And even if it should become technically feasible there is the question of how in the world would I pay for it?

I guess my practical hope is that I manage to live a full healthy life free from debilitating mental ailments. Anything more will be lagniappe. Technology advances at an ever accelerating pace. Things that I would have thought the stuff of science fiction when I was a boy are common place today.

Things like only having three or four channels on TV or phone booths or having to wait a week to get a response from a letter you sent to a friend are totally foreign to kids in their twenties and thirties. Even the fact that I call young adults kids shows my age.

I’ll think of the topic that I forgot and post a blog post based on it. That is, if it’s even worth it when I remember.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

AI: Once Again Into the Breach

Artificial Intelligence has been about to take off as the next big thing for over sixty years. It is usually said that it will really hit big in about five years. But it never does. Or more precisely, the technology that was predicted does show up five years later but it has been so over hyped that it’s not what everyone expects.

We have been progressively learning more and more about Artificial Intelligence, both so-called weak-AI or machines that do some intelligent things and strong-AI or machines that actually think. Strong-AI may be a pipe dream. Or it may emerge from the detritus of the internet. Or some brilliant programmer(s) will write it sometime in the next fifty years.

I honestly don’t think it will be more than fifty years. Technology does advance exponentially and while we keep discovering that the human brain is more complex than we ever thought it was, The curves have to cross eventually. My money is on 2035 or so. I think Ray Kurtzweil has done his homework.

In the meantime, I have cracked out Stuart Russell and Peter Norvig’s book, Artificial Intelligence: A Modern Approach, Third Edition. This time I think I’ll make it further than I ever have before. Some topics just take persistence before they sink in.

I’ve been reading books about implementing Machine Learning (ML) with Python. I have decided that I need to backfill my understanding of the basic principles of AI before I dive quite so deep into one of the most productive, if difficult, subdomains of AI.  It’s a good book, if a bit on the pricey side. I recommend it if you are persistent and have a basic understanding of computers and how to program fairly well in at least one programming language. Python suggests itself as a good language to have under your belt as you venture forth. Lisp wouldn’t be bad either. There are free versions of both languages that you can download from the internet along with several good free tutorials.

Python is an easy first language although it can take a good while to advance from novice to journeyman. My advice is to find and read code that someone else has written in the language your are trying to learn. That is the best way to learn the idioms of the language that aren’t necessarily immediately apparent from reading the Users Guide or the Reference Manual. The documentation on the Python.org site is good but you’ll still want to find a bunch of working code to read to see how things are done.

The Singularity is coming. Hold on and we may live a good while longer. The world is going to be an awesome place. As if it isn’t already. I just hope the trend of being a selfish jerk stops. We need to be kind to each other and make the world a better place.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.