Monthly Archives: December 2013

Tasty Languages

haggisMy mother, or so I am told, had a device for dealing with that frustrating syndrome where you wake up in the middle of the night and your damn brain decided to tour all the things that are making you anxious.   The trick was to try and enumerate something, for example vegetables in alphabetical order.

So I’ve be trying this out but I needed something to enumerate.  At first I was enumerating foods, and then I started adding constraints.  … gizzards, haggis, intestines, …   Then I started enumerating programing languages: APL, Basic, C, Datalog, …   But it was became fun to try and include a language only if it has some aspect that makes me smile.  For example the function calling weirdness in SL5.   Elang is a layer cake of odd smilies, though then I can’t use E.  R is a must have for how evaluates function arguments.

You might pick Caja[1,2] for C.   And that lead me to recall Dart.  I’ve been meaning to go back and see what’s up with Dart.   This talk is a fascinating entry point into Dart, at least for me.  Google managed to find a good guy, Gilad Bracha, for this design challenge!

For the me the tasty thing in this talk is that they are trying to stand in the middle ground between a dynamically typed language and something, well, something else.

This decades after what Common Lisp did about this problem.  In Common Lisp you can declare that something is, for example, a small integer; but the programming environment can ignore that; it’s just advice.  In fact even in a single language environment how that statement effects things can vary depending on other stuff like optimization settings.   If you implementation ignores the declarations then they practically comments.  I think it was an Algol manual that documented comments by saying “the compiler makes no effort to check the correctness of the comments.”  This wiggle room makes some people’s skin crawl.  And, it’s certainly enticed a lot of engineering effort on the part of Common Lisp implementors.

In fact a Common Lisp programmer can do wonderfully weird things with the type system and declarations.  For example we can define a type that asserts our graphs are acyclic and provide a predicate that we only use in desperate situations.

(defun acyclic-graph-p-for-type (g)  (if *desperate-debug* (acyclic-graph-p g) t))

(deftype acyclic-graph () (and graph (satisfies #'acyclic-graph-p-for-type))

The reason I found that Dart talk so interesting is the how Gilad deals with the skin crawling issue. He adopts a war weary Eeyore-ish manner.  I can totally relate.  He makes no real effort to argue why this is a useful such a powerful and useful approach.  In fact I’d say he baits his audience into an absence of sympathy.

I’ve done some very fun things with type systems that are analogous to what he is calling optional typing, for example this diagnostic typing I described a while back.

I’ll have to dig some more to see if any of the Caja ideas survived into Dart.  But they are similar, in the sense that there turn out to be many type system like blankets one might want to throw over your program to make you feel more cozy.  And if you insist that on exactly when in the program life cycle, if ever, they are checked (or worse proven) it’s just not as much fun.

The talks also made me sad.  It’s clear there is a lot of language design argot that I haven’t kept up with.

… junket, keratin, …

Distraction

distractionI let myself be baited into one of those soul sucking debates that occur on mailing lists.

So, here’s an interesting paper on distracted driving.   The researchers ran a very carefully designed experiment using a driving simulator and then measure maybe a dozen different things as the drivers engaged in various tasks.   They then summed up those measures into a metric they call workload.  What I found surprising is how all forms of conversation are basically equivalently distracting – talking to a passenger, talking on a classic cellphone, and talking on via a handsfree device.   Their scale runs from 1 to 5 where the task that anchors #1 is driving their course, and #5 is an obnoxious task where the driver has to listen to and solve word and match puzzles.

  • 1.00 Driving
  • 1.21 Listening to the radio
  • 1.75 Audio book
  • 2.27 Hands-free cellphone
  • 2.33 Talking to a passenger
  • 2.45 Handheld cellphone
  • 3.06 speech-to-text email system

In the US the legal limit for drunk driving is 0.08, and apparently talking on a classic cell phone is equivalent.   I’ve not found any research on how distracting thinking about internet trolls is.

Weoponization of the Politics of Currency

The social sciences can be dangerous stuff.  Get you public health policies wrong people die.  Get your diplomacy wrong and all hell breaks loose.  Follow the wrong economic policies and folks starve or worse.

One of the charts that most effected me over the years is this one that shows when various nations abandoned the gold standard during the depression and the lead up to the 2nd world war.  I think you make a pretty straight forward argument that the 2nd world war might have been avoided if the sequence had been different.  Hard money kills.

All currencies have an agenda.  Sometimes their designers are too foolish to know what it is, but still.  Gift cards, frequent flier miles, credit cards, check clearing networks all have an agenda.  You can manage your nation’s currency to make workers insecure and increase the level of unemployment.

This essay by Charlie Stross about why Bitcoin is evil says many of the things I have been thinking.  He calls it a weapon by design.

I’ve wondered if nation states engage in cold warfare by viciously engaging in PR campaigns designed to advance the bad economic policies in their rivals.  I don’t see why not, all the other players in the democratic policy strive to guide social policies to their benefit.

Inequality .

This chart comes from the Financial Times by way of Roger Pielke.   The horizontal axis runs from poor to rich.   The vertical axis show how much their income changed in the last 20 years.   For example the poorest 10-15% saw their incomes rise by 50% over the last 20 years.  That’s about 2% a year.

So how much did the world economy grow (per person or household) during this 20 years.  I’m not clever enough to answer that question quickly.  This other chart shows world GDP (it has a very cool horizontal axis).  And that suggests that growth was 4% during the first decade and effectively zero during the second.  But I’d take that with a grain of salt.

world_income_change_last_20_yearsOf course, given how skewed the income distribution is, it takes a lot more money to raise the top 10 percent by 2% v.s. the bottom 50%.  This chart totally obscures that.  So while it’s good that the 5%..70% saw their incomes rise I’m not confident that they got a reasonable share of the over all growth.

None the less, a thought-provoking chart.

repurposing a phone

I don’t think I ever mentioned here, in the blog, a little hack I enjoyed doing a while back.  I bought an old android phone ($10 on eBay, boy was it junk!) and repurposed it to fill the role of an Airport Express, i.e. so I could route music from iTunes to the phone and then to a set of speakers.

Naturally that got me thinking of all the curious things you might do with an Android Phone.  For example put it in the car as a nav system, use it as a webcam, or tracking/security device.  If you poke around you can file lists of suggestions (for example).

Some of my more self amused fantasies involve using the camera to look at a sensor, say a thermometer for an input signal and then using the flash, speaker, or bluetooth as the output signal in some over engineered control system.  Say to boil water, or heat a fish tank.

I see that you can now buy a new android phone for $30 at Radio Shack, or online from Best Buy.

Freemium signals stability

SugarSync, a well liked Dropbox competitor, announce it would no longer offer a free pricing plan.  Josh Gans says all the usual things over here, plus one more thing:

That said, it is hard to see this move as a positive one for the company. One of the things I worry about with backup services is that they will always be there when I need them. But the worry is that the company may go under. This move from SugarSync does not inspire confidence in this regard. It is suggestive of a company under pressure and looking to a possible change in industry practices to keep it going.

It’s true.  You appear mean, desperate and weak If you don’t give a lot.  That’s not an industry practice, it’s a universal.  The details vary.

Selling out your Friends

Robert Shiller: “It’s not the financial crisis per se, but the most important problem we are facing now, today, I think, is rising inequality in the United States and elsewhere in the world.”  And he won a Nobel Prize.

I have a theory about this problem.  Think of the set of all the world’s supply chains as a network.  I think we need to grow this graph so it’s a lot more bushy at the low-end.  Shrubbery!   I guess this theory shares a lot with Bill McKibbon’s ideas in Deep Economy; or the Prahalad’s ideas in Fortune at the Bottom of the Pyramid.

‘I don’t keer w’at you do wid me, Brer Fox,’ sezee, ‘so you don’t fling me in dat brier-patch. Roas’ me, Brer Fox,’ sezee, ‘but don’t fling me in dat brier-patch,’ …

I continue to harbor great optimism about the Internet,  It can help us with this.  The Internet has an amazing power to enable communities of common interest to form.  These communities are great of shubbery.  Precursors of commerce?  Maybe.

But, it’s worth chewing on the ideas in “how to lose friends and family via mult-level marketing” a posting that Andrew highlights.  Andrew introduces the idea that MLM schemes provide a way for people to liquidate (e.g. convert to cash) their social networks.  Liquidate is what you get when your done the monetizing a social network.  Lots of people are into that.  Monetize – what a word!  What can’t we monetize, my cat?

So while I love the Internet’s power as a host of community forming I must say I’m taken aback by how rapidly capitalism has evolved businesses models that feed on these tender shrubs.

Ironically my social network got infected by one of these parasites just today.   A friend signed up for Venmo, a p2p payment company, and they posted this exciting fact to Facebook on his behalf.  I admit to an unhealthy curiosity about these emerging currency systems.  For example, I think Bluebird is very interesting.  So I went and signed up for Venmo and installed the app.  A few moments later I was distressed to discover it was scanning the entire address book on my phone, maybe a few thousand entries.  If you want to use thier payment network you have to hand over your contacts.  No way to void it.  So I uninstalled, etc.  Who knows if that helped?

I totally get that building out “the network” is an existential issue for companies like Venmo.  Desperate need is an excuse in a starving man, is it an excuse for a start up?  Not that you need to worry about Venmo.  Venmo got bought, and the buyer then got bought by Paypal.  So they captured and sold a network.  That this is what most internet startups need to do worries me.

Returning to shrubbery as a tool to work inequality problem.  No doubt there are many much more ethical ways to convert the small communities into engines of economic activity.  It would be great to have a list.  No doubt looking at MLM business models would inform that search.