Thursday, January 23, 2014

Ruby: Lord of the Flies Programming

Ah, Ruby.

A friend who is learning computer programming right now asked me about my dislike of Ruby:
Can you explain (in high level language) why you dislike Ruby/Rails?  I
have no opinion one way or the other.  I'm just curious, why  so many
bootcamps teach RoR over, say, Python.  It seems to me that RoR is VERY popular right now.  Why do you think that is?

Here's my answer:

To answer your question, the reason (in my very opinionated opinion) why so many people are teaching RoR is simply all the hype.  There's no good technical reason to use Ruby for anything, but that doesn't stop people.

You get people who don't have the education to realize how badly Ruby sucks as a language (more on that below) and they think "wow, this is great, look at all the web app I can make in RoR"  and without good counter examples they develop a warped idea of the actual utility of the system.

Now, to be sure, Rails was a way better way to make (quick and dirty, simple) web apps than what people were doing up to then.  Rails was something of a revelation.

Rails was so good (compared to what went before it) that it was immediately copied in other languages (Hello Django!)   But now that we have web app frameworks in other, less insane languages there's NO reason to learn or use Ruby (unless you want to work at a place that insists on using it, or you're just curious.)

So, why does Ruby suck as a language?


The basic problem with Ruby is that is is NOT a computer language.  The folks who made Ruby were ignorant of the history and vast body of work that has gone into the study and construction of formal languages.

They were so innocent of this knowledge that Ruby DOES NOT HAVE A GRAMMAR!!  


This is an insane thing to do: creating a computer "language" without a formal grammar.  Essentially Ruby was made by children.

How bad is this?

It is very very bad.

Essentially Ruby was made by INSANE children.  "Lord of the Flies" kind of stuff.

But does that stop anyone from hyping it or using it?  Pardon me while I go shoot myself.  Bleah!

Rails is Ruby's only "killer app" and that's why anyone outside of Japan (and language geeks) have ever even heard of Ruby.

But now we have Django, Flask, etc.. so you don't have to use Ruby.

(Also, I just don't like all the little symbols.  Python (for example) went the other direction and eliminated many of the typical syntax constructions, or simplified them.  Made it much nicer.  Ruby plows head first into the Perl-ish garbage with a vengeance.)

Thursday, January 2, 2014

All the Rules are Broken

"Origin of The Effort", Part II

When you're very smart, but your parents are totally out to lunch, you kinda have to figure out a lot of stuff on your own.  When I was doing this I became concerned and even antisocial because it was very obvious that the rules people were trying to teach me (or simply trying to convince me were in effect despite whatever the truth of the matter might be) were totally bonkers.

For example: once when I was very young I got into a fight with another little boy.  I knocked him down and kicked him.  When I kicked him a teacher (who was in the process of breaking it up) said, "You don't kick a man when he's down!"

Now, of course, I understand: fighting is about winning, not destroying the other fellow.  But at the time it made no sense, I was too young and inexperienced at the time to figure out why I was "bad" for kicking the boy.  I just got confused: you are already hurting each other, why is it different to use the feet when "he's down"?

There was an incident where some kid was doing something wrong, I forget what, and, thinking that this was the thing to do, I told a teacher.  The teacher said, "no one likes a snitch".  I didn't know what a snitch was, but I was extremely confused: do we obey the rules or not?  Is it in fact okay to disregard the rules as long as you don't get caught?

No one explained.  It made no sense.  Eventually I learned both the word "hypocrite" and why no one likes a snitch.  However, the basic problem remains: either the rules are good and should be obeyed, or they are faulty and should be repaired or discarded.  In actual fact there are no rules whatsoever (although Nature does display regularities, even our mathematical equations that approximate these are tentative, contingent.)  Instead there are complex systems of feedback and neurosis that constrain and bind the human into intricate and mostly really stupid social forms. While humans are (or at least occasionally can be) sentient, these social forms and the feedback loops that maintain them are nearly idiotic.

There are two, and only two, solutions:  Form and Non-Form.

The first solution lies in mastering the world of form, becoming God-like and near-infinite.  This is ultimately a dead end.

The second solution lies in remembering what you are, becoming infinite God. This is what the world is for.

What Makes Sense?

"Origin of The Effort", Part I


Since earliest memory I have been puzzled by the world.  This life of ours makes no sense.  The Natural things are all harmonious and well, but anything to do with humans is drenched in shit and blood.

By the time of the advent of my little physical body on this planet a lot of the really severe crap had died down just a little, but still the casual horrors of the current status quo are enough to convince any observant thinker that things here are proceeding not as they should.

It had seemed for a time that the simple advances of technical knowledge might suffice to undo the effects of the madness of history, that our problems were more-or-less ones of production and distribution and, solving them, we could look forward to a Golden Age.

Sadly, this has not obtained.

Despite vast, even unthinkable, progresss (elimination of many diseases, food production requiring less than 5% of the population to feed the rest, men on the Moon, our achievements go on and on...) most people are still miserable, and many of them even have reasons.

However, the practical perfection of technological knowledge and art (nanotech and fusion) have unlocked the temporal limits on our abilities to take care of ourselves.  There is no reason to suspect that nanotechnology and fusion power do not grant "ultimate" achievement, at least on the physical, temporal, secular plane.

Quite literally we can do anything that can be done with atoms.

But all this has really done is thrown us squarely into a contest with our own baser aspects.  The elimination of physical limits as such forces us to confront our emotional and psychological limits.


Our power is such that we must become good or destroy ourselves.  There is no middle ground.  Star Trek or North Korea: choose the form of the destructor!

Sunday, October 20, 2013

Total Surveillance is the Perfection of Democracy

For once I disagree with RMS, re: https://www.gnu.org/philosophy/surveillance-vs-democracy.html

I believe that it is fundamentally not possible to "roll back" the degree of surveillance in our [global] society in an effective way.  Our technology is already converging to a near-total degree of surveillance all on its own.  The article itself gives many examples.  The end limit will be Vinge's "locator dust" or perhaps something even more ubiquitous and ephemeral.  RMS advocates several "band-aid" fixes but seems to miss the logical structure of the paradox of inescapable total surveillance.

Let me attempt to illustrate this paradox.  Take this quote from the article:
"If whistleblowers don't dare reveal crimes and lies, we lose the last shred of effective control over our government and institutions."
(First of all we should reject the underlying premise that "our government and institutions" are only held in check by the fear of the discovery of their "crimes and lies".  We can, and should, and must, hold ourselves and our government to a standard of not committing crimes, not telling lies.  It is this Procrustean bed of good character that our technology is binding us to, not some dystopian nightmare.)

Certainly the criminally-minded who have inveigled their way into the halls of power should not be permitted to sleep peacefully at night, without concern for discovery.  But why assume that ubiquitous surveillance would not touch them?  Why would the sensor/processor nets and deep analysis not be useful, and used, for detecting and combating treachery?  What "crimes and lies" would be revealed by a whistleblower that would not show up on the intel-feeds?

Or this quote:
"Everyone must be free to post photos and video recordings occasionally, but the systematic accumulation of such data on the Internet must be limited."
How will this limiting be done?  What authority will decide who gets to post what and when?  And (like any profanity filter) won't this authority need to see the content to be able to decide whether it gets posted publicly?

In effect, doesn't this idea imply some sort of ubiquitous surveillance system to ensure that people are obeying the rules for preventing a ubiquitous surveillance system?

Let's say we set up some rules like the ones RMS is advocating, how do we determine that everyone is following those rules?  After all, there is a very good incentive for trying to get a privileged position vis-a-vis these rules.  Whoever has the inside edge, whether official spooks, enemy agents, or just criminals, gains an enormous competitive advantage over everyone else.

Someone is going to have that edge, because it's a technological thing, you can't make it go away simply because you don't like it.  If the "good guys" tie their own hands (by handicapping their surveillance networks) then we are just handing control to the people who are willing to do what it takes to take it.

You can't unilaterally declare that we (all humanity) will use the kid-friendly "lite" version of the surveillance network because we cannot be sure that everyone is playing by those rules unless we have a "full" version of the surveillance network to check up on everybody!

We can't (I believe) prevent total surveillance but we can certainly control how the data are used, and we can certainly set up systems that allow the data to be used without being abused.  The system must be recursive.  Whatever form the system takes, it shall necessarily have to be able to detect and correct its own self-abuses.

Total surveillance is the perfection of democracy, not its antithesis.

The true horror of technological omniscience is that it shall force us for once to live according to our own rules.  For the first time in history we shall have to do without hypocrisy and privilege.  The new equilibrium will not involve tilting at the windmills of ubiquitous sensors and processing power but rather learning what explicit rules we can actually live by, finding, in effect, the real shape of human society.

Friday, August 23, 2013

Self-Driving Cars Save Lives

The "self-driving" car is on the way and coming faster every day. It can't happen soon enough.  Car accidents kill millions, and maim millions more. Computer-driven automobiles won't drive better just because they drive themselves.

Self-driving cars will also be interconnected and constantly communicating with each other.  They'll "know" their own goals and intentions as well as those of the vehicles around them. Being able to rely on each other to the degree of effectively perfect shared understanding will enable them to plot safe trajectories and prevent nearly all accidents.

Even if someone should dart out in front of traffic, such as a child running for a ball, the cars will be able to react in ways and at speeds that are impossible for humans.

Cars as well as sensor nets in the road itself or built into local infrastructure would be able to monitor conditions and report them to the shared "road database", allowing cars to reduce speed near playgrounds or route around them altogether during games, for example.

Ubiquitous computing, sensors, and networking will make most accidents a thing of the past. They will also prevent such soon-to-be-anachronistic things as traffic jams and car chases.  You won't get moving violation tickets any more either. Driving will be like watching a really comfortable but slightly boring movie rather than the often-nightmarish gamble you take with your life every time you take to the road.

It can't happen fast enough.

It will also be a totalistic surveillance system of such intimacy and perfection as to constitute a synthetic Akashic records. In the process of driving these machines will know everything about everybody around them, and they can be ganged together to track everything they see, and they remember.

This is the price of the universal machine: universal transparency.  We are entering the time when we can make ourselves live to whatever rules we will, so it behooves us to do our best to make those rules indeed liveable (autocorrect suggested "lovable"...  Not bad machine, not bad.)

You are going to be surveilled. That cat is not going back in the bag.

You must make your peace with that, as I did.

But now we will live without hypocrisy (if we can!) and we will no longer mash ourselves up in our car crashes, and kill people just to get from point A to point B, and waste hours jammed in traffic.

We will have to learn to forgive ourselves for a lot of the shit we do, and learn to stop doing the worst of it, and pay for the bits that must be paid (the Devil will have his due, and some of us are very right to be terrified of the panopticon: I almost feel sorry for the ones who are only now realizing that the National Security Agency already has their dirty laundry.)

We will have to learn to be good. There is no other way to get good government. No matter the system it is made out of us, we rule ourselves whether we own it or not.  Yes your privacy is a fiction, but you might notice that suddenly most kinds of crime can no longer be committed!

We can actually detect most kinds of crime already from the existent systems we know about. I am convinced there are much more powerful and extensive systems still hidden, but the results of these systems can be selectively fed to outer levels for reduction of undesirable aspects of civil society. We should not be concerned that this will happen (as there is no way to stop it in any event) but rather that the definition of "undesirable" may be warped by residual power bases.

In the great struggle to govern ourselves the executive power has become perfected by the fulfilment of the Analytical Engine's great promise, and now we can rule ourselves completely for the first time since the fall.

Tuesday, August 20, 2013

Python as Basin


TL;DR: I am saddened but resigned to not hacking on tree because it's written in C.
I've often said that the only thing wrong with Python is that it ruins you for other languages.

What I mean is that nowadays, having written software mostly in Python for the last few years, when I go to read the source code for a simple tool like the 'tree' program (which reads a directory structure and outputs a simple text-mode graphical "tree" representing it) which is written in C I am struck by the amount of work I would have to do to be able to consider myself a "C programmer". (I used to be unembarrassed to claim "I can write C code." No more.)

Using Python has made me become monolingual.

I'm not suggesting that Python is "the best language" or anything (after all, we all know Forth is the best language...)  I'm just comfortable leaning on it heavily and neglecting other languages.

This is an old folk's liberty.  You young coders better learn as many languages as you can, it's not as hard as it seems and it's the only real way to escape the nest of abstractions that ensnares the unwary specialist.

(Put it this way: Yes there are more Java programmers than Python programmers but don't let that prevent your shop from deciding to use Python because a programmer who knows Java but can't pick up Python should not be hired! That's a baaad programmer! I would never dream of hiring someone to write software who knew Java (or C++) but balked at learning Python.  That poor bastard can go polish his turds on someone else's dime, Real Programmers only here please!)

So if language-agnosticism is so important to identify good programmers why am I so comfortable "degenerating" into monolingualism?

Well, for one thing, the characterization is false: I am still reading about and learning new languages. I just tend not to use them (other than for toy programs to play with them.)

At this stage in my trajectory as a programmer (which is much deeper and more important to me than my career as a programmer) most languages won't have much to teach me.  They also wouldn't enable me to achieve things at work that I otherwise couldn't achieve [with Python].

They are still fascinating. (I read "The Go Programming Language Phrasebook" cover-to-cover, drooling, just for kicks.)  But the romance has worn thin.

I want to get things done and I can do that with Python faster and with fewer errors (and fewer trips to the documentation) than any other available language (plus "ecosystem".)

There are sweet spots though when it would make sense to us another language.  If I had to write high-performance low-level software (instead of the endless succession of poorly-thought-out Django apps that have been buttering my bread for the last few years) I would lunge for Go.  It is a wonderful language and seems to me to be very well-designed.

I am less sure of the niche (for me) of Rust or Dart or (shudder!) Coffee script.

What I think we are experiencing in the field right now is a kind of shift from programming by language to programming by concepts.

The process of translating a high-level language into efficiently-runnable form is already so intricate and esoteric that it pretty much must be left to the crunchiest and most capable of us.  To put another way, it is very unlikely that a newbie is going to make significant contributions to a byte-code or assembly optimization process, but all-too-likely that newbies will inflict new languages on us (e.g. Ruby and PHP, both created by people who really had no business trying to create new programming languages.)

To me, this indicates that the "innovation-space", if you will, for PLs has to do with expressing ideas clearly, rather than some spectacular new syntax or nifty whiz-bang feature.  It is no fun watching languages slowly recapitulate LISP.

Let your language describe what you are thinking and let the accumulated wisdom and sweat and tears of the brilliant people working on translation and new hardware design turn it into efficient, runnable form.

In this regard Python is very satisfying.  It is possible to write very elegant and expressive code in Python. Readability is always the first thing on the list when I'm enumerating Python's strong points.

The PyPy project is beginning to provide a robust and powerful way to use Pythonic code in ways that are very flexible without sacrificing rigor.  (This is not to say that similar efforts aren't proceeding for other languages and "ecosystems"!)

I'm looking forward to the day that PyPy can convert my Python code into something like native code. (And of course there are tools like Cython.)

I only have so many hours in a day to devote to my craft, I can only burn so many calories to produce thought-stuff.  It made good sense to learn and use several languages when I was "coming up".  But now that I've "arrived" I find it makes more sense for me to improve by means of deep mastery of a particular set of powerful tools, rather than continuing to grok yet more variations on what I already know (syntax of languages.)

Learning Category Theory is more likely to pay off, personally and professionally, than learning Rust or Julia.

Friday, June 7, 2013

You cost too much.

So many things to say and they all must pass through these tiny fingers.

As technology begins to automate more and more of the tasks we feel are so crucial to our lives, people are beginning to notice the kinds of things that folks like Bucky Fuller were pointing out decades ago: automation is obsolescing jobs.

This is happening.

Now what to do with all these "left over" people?

But first, before traipsing any further down this merry and utterly tragically hallucinatory path, let's pause and examine some of the typically unspoken underpinnings of this sort of thinking.

Let me start by asking you, in all seriousness, "Do you feel superfluous to yourself?"

I don't mean to inquire about your estimation of your value to some theoretical employer or to "the Economy", I mean are you valuable to yourself?

All estimations of value must perforce carry or imply (or have imputed to them) some criteria or measurement of some kind of utility, and that utility is perforce tied to some agent's goals!

Insensate inanimate Nature has no person and so can have no goals and so provides no basis from which to evaluate (assign a value to) any given phenomenon, such as a human person.

To speak of the value of a human always and automatically implies that some agency is evaluating that human according to its metric(s) of utility.

In discussions of "What to do with the surplus population?" it is very very typical for the people discussing to omit entirely the examination and analysis of the agent or entity doing the evaluation.

I always find it disturbing when people assume the stance of having the right to decide matters of life and death for other people. I especially hate it when folks unconsciously adopt the stance.

I recognize no human authority as having the right to decide matters of life and death. The fact that historically abrogation of that power has been an all too common past-time of "power-possessing beings" has no bearing on the fact that it is utterly and obviously wrong to kill.



One of the grossest manifestations of this mental and emotional error is in the worship of a nominalization called "the Economy". This purely imaginary deity is useful but when people forget that it's just a made-up phantom and start making decisions based on such a logical error we tend to find absurdities.

Unlike philosophical absurdities these bite.

So we find people saying things like "part of why so many people can't get jobs -- their costs do not exceed the value they deliver." [comment on http://www.aeonmagazine.com/living-together/james-somers-web-developer-money/]

This is an extraordinary statement. It is logically meaningless, just noises, but infected minds will treat such statements as though they convey meaning that is valid in the "real world".



Really I can't blame people, the hallucinations run deep and are bound up with how people have learned to get their needs met, but it certainly time for those who don't know what they are talking about to heartily shut the fuck up and start hearing the new hottness.

So, to begin with, what is your value to yourself? How much money would you accept to die? (And I don't mean that you get to give it to your kids or charity or something. I will give you money and then you die, the money reverts to whoever finds it next to your corpse or something.)

Would you take that deal?

You don't get to keep or spend or give away the money, just have it for a moment before you drop dead. How much? A million? Ten million? A trillion dollars!?

It is absurd, right?

Your life has infinite value (to YOU) according to this simple thought experiment. (And, conversely, when "pressed up to it" money is valueless no matter how much you pile up.)

This has been established over and over again.

So, if some bastard were to come along and tell you that your "costs exceed your value" and so climb into this oven here we don't need you, you can suddenly see the error in the stance taken, yes?

Who are you costing? These "costs", what are they exactly? How are they accounted? And by whom?

If I am going to be murdered or left to rot and starve in the street because I "cost" too much I would like to understand the situation a little better, y'know, before I go quietly to the reclamation plant.

Because, see, the necessities of life are free (if you don't fuck it up too badly.) The sun and the rain and the air and the land will naturally and of their own natures bring forth plants and animals that can supply all my needs.

I am a Permaculturist and I know that any spot on earth not ice-locked can be made to bear the necessities of life quite easily (I don't mean to disrespect the farmers, it's not their fault, but normal agriculture is actually about the stupidest way to try to grow food that is possible. If agriculture were any stupider it would actually degrade the land it is practiced on, which, in fact, as practiced today it generally does. Stupid beyond understanding or belief. But that's a different rant...)

So if I can be dropped on a patch of barren desert with a few tools, a water source, seeds, and a flock of chickens, and live comfortably the rest of my life, who am I "costing" and how?