Welcome, Eli writes here.
See also Imagery and his other projects.

Programming

45 posts under this tag.

Today's Reading: Kon’nichi wa, Ruby 2
0
0
6
Apr
22

Unlike most people these days, I happened to chance upon Rails through Ruby, not the other way round. But wait, today’s reading is a tad geeky but I’m putting it up here for non-geeks to read it —particularly those, you know who you are, that don’t yet speak any computer language— so here’s some context: Rails is a tool (a web framework they call it) to make web-apps (that’s right, a meta-tool: a tool to make tools) and Ruby is the computer language in which Rails is written.

Anyway, I can’t remember how I found Ruby but I can tell you when I was certain it was something truly special: when I found Programming Ruby: The Pragmatic Programmer’s Guide and, shortly thereafter, Why’s (Poignant) Guide to Ruby. The first one is a most delightful, witty, unique manual of the language made out of of an acute bout of ruby-rapture and given away for free by its freakishly talented authors; the second is the exact same thing.

So, after much ado, here’s today’s reading: the first chapter of Why The Lucky Stiff’s poignant guide, Kon’nichi wa, Ruby . Technophobists worry not, this chapter doesn’t contain a line of computer code nor does it force you to install a thing, it’s just good ole prose. It is my Trojan horse to try to get you to learn Ruby (you gotta learn a computer language someday). In fact, I’m so confident in my wooden stallion that let’s do this: you only need to read the very first section (1. Opening This Book) of the chapter. If it doesn’t mesmerize you, if you don’t have the weirdest crooked grin on your face by it’s end, feel under no obligation to read any further.

Star
Because we can 2
0
0
6
Apr
17

Storage space and computing power are dirt cheap; our task isn’t to “use them efficiently,” it’s to “squander them creatively.”

Or I could tell you about the time Apple released an unbelievably cool, unbelievably wasteful, 3d-rotating user-switching. The best description I read, and it still reads on the feature page: “Because we can.”

I'm so tired 2
0
0
6
Apr
07

Goddamned Rails-Engines!

...

mmm… Ok, Ok… I take that back. They’re indeed very helpful but installing them locally was a true nightmare and now that I was finally ready to deploy to TextDrive they refuse to cooperate. I’ve no idea what’s going wrong. I was counting on having my (political) web-app online tonight but it seems it’ll have to wait until tomorrow, my eyes are too bleary.

And the worst thing is that it’s almost 5AM. Which means one more day I miss my yoga class. Oh well… :(

Sleep that knits up the ravelled sleave of care

The death of each day’s life, sore labour’s bath

Balm of hurt minds, great nature’s second course,

Chief nourisher in life’s feast.
Macbeth, William Shakespeare

(I just found out there’s a pretty good song from The Beatles with the same title as this post. Heh. A nice surprise.)

Star
Formists 2
0
0
6
Mar
12

  1. A patternist is someone with an unusual ability to discern, manipulate, and enjoy patterns.
  2. A form is a linguistic pattern.
  3. A formist is someone with an unusual ability to discern, manipulate, and enjoy forms.
  4. Formists are prone to strange and seemingly dumb language misunderstandings. A subtle error in form in a sentence can led a formist completely astray. This is often irritating to non-formists—who, as if they wore cognitive sunglasses that dull them to form, remain undazed by its glaring inconsistencies.
  5. It is also common for a formist to stop people in mid-sentence only to point out a particularly beautiful (or ugly) form they just noticed in their conversation or the surrounding language. Non-formists find this offensive and obnoxious. They shouldn’t—to continue the sunglass metaphor, where they see drab colors, formists enjoy vivid hues.
  6. Formists are good at spelling and care about it (even in spite of themselves). They just can’t help noticing it.
  7. Formists make formidable poets, programmers, writers (of all kinds), philosophers, mathematicians, linguists, and translators.
  8. Formists excel easily in school and in academia in general, both having a marked bias towards verbal talents.
  9. Formists learn new languages faster and better than non-formists—to the point that their enthusiasm and natural talent can be seriously annoying and off-putting to non-formists. Even Norbert Wiener, one of the greatest mathematicians of the twentieth century, was overwhelmed by his extremely formist father.
    Thus it was a familiar part of our life to hear foreign languages spoken in the household. My father, indeed, could speak some forty of them. He was so proficient in linguistic matters that his insistence as a teacher on accuracy and fluency had the somewhat surprising effect of almost completely inhibiting the efforts of my mother and of us children to speak more than one language.
    I Am a Mathematician, Norbert Wiener
  10. Formists have a natural bias against non-formists (and vice versa); they often think (mistakenly, of course) that theirs is the only kind of intelligence.
  11. Linguistic pedantry is an occupational hazard of being a formist.
  12. Eemadges is a website for and by formists. So is the lovingly kept Language Hat.
  13. Homo Sapiens is the formist ape.
  14. We live in the age of the triumph of form. In mathematics, physics, music, the arts, and the social sciences, human knowledge and its progress seem to have been reduced in startling and powerful ways to a matter of essential formal structures and their transformations. The magic of computers is the speedy manipulation of 1s and 0s. If they just get faster at it, we hear, they might replace us… Life in all its richness and complexity is said to be fundamentally explainable as combinations and recombinations of a finite genetic code. The axiomatic method rules, not only in mathematics but also in economics, linguistics, sometimes even music. The heroes of this age have been Gottlob Frege, David Hilbert, Werner Heisenberg, John Von Neumann, Alan Turing, Noam Chomsky, Norbert Wiener, Jacques Monod, Igor Stravinsky, Claude Levi-Strauss, Herbert Simon.

    [...]

    A college student enrolled in economics, once a branch of ethics, will now spend considerable time manipulating formulas. If she studies language, once firmly the province of humanists and philologists, she will learn formal algorithms. if she hopes to become a psychologist, she must become adept at constructing computational models. The manipulation of form is so powerful and useful that school is now often seen as largely a matter of learning how to do such manipulation.

    The Way We Think, Gilles Fauconnier, and Mark Turner (both emphases are mine)
  15. Much (arguably lame) humor is formist in nature. Puns are the quintessential formist joke.

    What did the Buddhist monk say to the hotdog vendor?

    “Make me one with everything.”

    * * *

    When the monk asked for his change, the vendor replied, “Change comes from within.”

    Formists just want to have fun.

  16. A formist compliment: “I’m warm for your form.”
  17. Formists enjoy proverbs, sayings, slogans, mottoes, aphorisms, and quotes in general. Have you noticed how trivial and pedestrian they sound when rephrased? Much of what we love in them is their form.
  18. Esperanto is the formist language—a mixed blessing.
  19. Math is the study of patterns through forms. And thus it was so disappointing to find so surprisingly few formists during the time I pursued a Math major.
  20. Algebra is the most formist of math theories.
  21. A classic formist comment: ”X is almost a lump of syntactic sugarWP .
  22. It takes a formist to enjoy Toki Pona.
  23. This list of figures of speech is a formist’s field day. So is this collection of aphorisms.
  24. All sitcom dialogues are formist but The Simpsons is specially remarkable. Here are two noteworthy compilations of Simpsonian formist candy: Beyond embiggens and cromulent and Subtly Simpsons.

    Carl [To the MENSA members]: Let’s make litter of the literati!

    Lenny: That was too clever! You’re one of them! [punches him]

    Episode: AABF18, They Saved Lisa’s Brain
  25. Touch, a language of making languages, is a formist wet dream.

An each function for JS 2
0
0
6
Feb
18

Since Javascript 1.2 and later there has been a cool and very powerful literal syntax for functions:

var sum = function(x, y) {return x+y}

A couple of weeks ago I found an interesting use of this syntax. Missing Ruby’s wonderful each function, I decided to implement something similar in JS, and, after some experimentation, ended up with this:

function each(a, f) { for(var i=0, l=a.length; i<l; i++) f(a[i]) };

The function syntax comes in handy when you use this each:

each([1, 2, 3, 4, 5], function(e) { alert(e) });

It may not be as satisfying as Ruby’s each, but it’s quite useful.