Archive for July, 2014

Julia’s Counterpart to Python 2’s “Execfile” and Python 3’s “Exec”

Monday, July 28th, 2014

I learned from using Python to run files from within the language shell for easier debugging purposes using “execfile(“”) for Python 2 and “exec(open(“”).read()).” (Disregard the period in the quotes — I am torn between keeping to proper punctuation and not obfuscating code, and punctuation won this time.)

Thus, I wondered what Julia’s “execfile” counterpart was, not realizing that the answer was written in the “Getting Started” portion of the Julia documentation as “To evaluate expressions written in a source file file.jl, write include(“file.jl”).”

So turns out, the way to run files from within the Julia REPL is “include(“filename.jl”)” as of the 0.3.0-RC1 release.

Impressions of Richard Linklater’s Boyhood

Sunday, July 27th, 2014

I had a lukewarm experience with this film, though I did seem to enjoy the film more than my surrounding audience did. I was taken aback by the jeering I heard over the course of the film, and the sarcastic cheering I heard when the film ended. Usually, people just quickly and quietly shuffle out and leave if they did not like the film?

I really liked the film up until Mason becomes 15+. Super cute kids wrestling with the incomprehensible mysteries of relationships and societal expectations.

My largest problem with the work — I could not relate to it. A lot of the cinematography, the scoring seem to have been intended to induce a bittersweet nostalgia of time gone by, of fleeting youth. I did not feel any nostalgia. This boyhood presented on screen drew out my sympathy and commiseration during the periods of persecution by drunk fathers, but overall, it was an adolescence that seemed utterly alien. I am also an only child — people have told me that the scenes centering around sibling interaction did ring very true and made the film a fonder, more resonant experience.

For one, everybody in the core cast surrounding Mason was white. I grew up in an incredibly multicultural environment, and to me, this felt very dull. Mason and Sam, his sister, I found very interesting at the outset when they were children, but they became more dull as they grew up and conformed to caricatures. Eventually, became much more interested in the plight of the parents than that of the children. I found the scene where Mason is departing from his mom’s new apartment for college to be very affecting.

A second major problem tied to the relatability issue — there was not enough awkwardness for me. Characters would say, “Awkward,” “Ah, that was so awkward,” etc., but none of it felt that awkward. I remember puberty and growing up being a lot more awkward?

For all the suffering that Mason went through under the weight of his mother’s poor taste in men, I also found his situation to be glowingly ideal. A school with a dark room and a full Photoshop lab in Texas, where education is traditionally heavily underfunded, where there seems to be high support for the arts, classes teaching photography?

One photogenic girlfriend after another?

Another high school party in a huge mansion with a perfectly clean pool, with some students serving as de facto waitresses with jello shots? Oh, come the fuck on.

My other complaint was that the biological father played by Ethan Hawke seemed to get off scot-free in terms of criticism from the kids. Dude barely shows up, and is always constantly, jejunely jocular, but his kids basically adore him the whole time with the exception of a couple of modest criticisms? I have seen these jovial, absent fathers in real life, and while their kids love them in the beginning, coming into their late teens, they’ve usually accumulated plenty of anger and resent against their absent fathers.

Perhaps this was Linklater’s point? By exaggerating, mayhaps he intended to show that parents frequently get uneven raps, and that parenting, just like life, is brutally unfair? Perhaps he truly wanted to depict children becoming less interesting as they become teenagers as an unavoidable struggle of parenting? (I ask the latter question quarter-facetiously.)

Two sequences really made me cringe and bittered my aftertaste of the film:

One — the Ideal Professor character played by Patricia Arquette (more interesting as a mother than as a professor) is approached by a floor manager while she and her children are eating together at some restaurant. The audience groaned in recognition of the fellow, anticipating the cheese that would follow. Sure enough, he did not subvert expectations, revealing that a throwaway sentence about going to school from Patricia Arquette’s character in a trivial scene had inspired him to emerge from being a caricature of a Mexican laborer. English now grammatically perfect after only a couple of years, he waxes obstreperously about Arquette with a decorative Latino accent reminding the audience that no amount of education will turn one white and then grills the cheese with a pronouncement that the meal is on him and a compulsory “gracias.”

Two — the whole damn coda where Mason arrives at his college, and on the first day, meets his too-cool roommate who looks like a young Carrot Top, gets some drug, and then goes hiking with roommate + roommate’s girlfriend + roommate’s girlfriend’s roommate who claims to be starting a dance major, but already seems to have completed a PhD in the stunning looks department.

O suspense of disbelief, where art thou?

Adding Julia to your Windows Path

Sunday, July 27th, 2014

I installed Julia 0.3.0-RC1 onto my Windows 7 PC and then added C:\Program Files\Julia (where I installed Julia) to my PATH variable in my user profile environment variables list so that I could launch it in Command Prompt or PowerShell by typing “julia.” However, that did not work, returning the oft-seen “‘blah’ is not recognized as an internal or external command, operable program, or batch file.” I was a bit befuddled, then searched my system for the julia.exe. Turns out, it was located in C:\Program Files\Julia\bin.

Anyhow, if you add C:\path\to\Julia\bin to your user profile PATH, rather than just C:\path\to\Julia, you should be able to load Julia from a fresh launch of Command Prompt or PowerShell with “julia.”



Life Advice I Received from The Ghost of T G Kingsbury

Tuesday, July 22nd, 2014

Remember few faces.
Don’t eat too much.
Walk fast.

Decisions by Stochastic Processes

Tuesday, July 15th, 2014

Li Ning at the 1984 Olympics. Credit: Trevor Jones/Getty Images

In reference to the article, “If you can’t choose wisely, choose randomly” by Michael Schulson on Aeon.

There is a part where the writer talks about how the International Skating Union changed its method of judging, injecting randomness in an attempt to stymie collaborative corruption. My question is then, if we inject enough randomness into a competition where subjective judgment plays a significant role in deciding the top finishers, such that the winners on the podium change modestly between each iteration, than is it still even worthwhile/fair to declare a winner, to crown someone as more deserving over all the others when the creme de la creme is homogeneously talented and performances for a single competition are good all across the board?

I remember hearing about a “recency effect” for gymnastics meets where gymnasts who perform later tend to score higher than those who go earlier when competency is controlled. I am not certain whether this phenomenon has been empirically documented for judging, but it fits my present schemas that humans have shitty memories, are fickle, and tend to believe that the best is yet to come. If this effect exists, what can be done to mitigate it for fairness’ sake? Should there be an “early bird handicap” or a “night owl penalty”? (Neither of those sounds like a solution that would work well. Judges’ scoring would probably factor in and adjust to the handicap or penalty pretty quickly, and things would be back to how they were before.) Perhaps it would be easiest to just let the effect stand, since ordering itself is a rather arbitrary thing, and advantages and disadvantages should average out with more competitions to follow the law of large numbers, such that athletes of similarly excellent calibers and attendance levels should accrue similar amounts of wins over time. The elephant in the room is that some competitions matter more for their participants and spectators than others, and the ones that matter do not happen too often. Injuries, aging, athletic declines, also stochastic processes, prevent athletes from uniformly voluminous Olympic appearance counts.

Edit: it appears that research has been done about the effect of serial position in competitions — see here (Bruin 2004), here (Damisch et al 2006), and here (Le and Epley 2009) — and that going last can indeed dramatically boost one’s chances of topping a chart of subjective scores.


There was a 3rd place game that took place on Saturday at the World Cup. But was the winner of that match really the third best team? Could Brazil be considered the 4th best team at the World Cup, considering that in its last two games, it looked like more teams than Germany, Holland, and Argentina could have handled them in a match? Much easier to simply say that one team had won it all than deciding on specific ranking or placement, in my opinion.


I find combat sports to be unique in that one can win either in a subjective manner, i.e. via impressing the judges, or more objectively, i.e. through a knockout, technical knockout, or a submission.