April 2017
« Jul    




C++ casting operators

Today in my research, I came across an interesting challenge. I’m editing an older version of JavaScriptCore (JSC), redefining the most basic typedef in the sytem, EncodedJSValue. Previously it was a simple void*, but I need to gift it with some special secret sauce, so I changed it to a struct.

typedef struct EncodedJSValue { […]

Flexible Iterators

Java has some odd quirks which make it far more inflexible than it needs to be. For example, many programs have data structures which need to be iterated both forwards and backwards, and some algorithms require treating the first or last element differently than the others. My goal here is to find a tweak […]

Notes: CSTA CS+IT Conference

Today I attended the 2012 ACM Computer Science and Information Technology Conference. It was focused heavily on the advocacy of teaching Computer Science material in the K-12 system.

I most liked the fact that every session I attended have some kind of interactive portion. Including trial activities, and Think-Pair-Share.

Think positively. Have your students relate […]

Nanopass Compiler

Through a friend, I got hold of a provocative paper A Nanopass Framework for Compiler Education, by Sarkar, Waddell, and Dybvig. They describe a compiler written in scheme that makes 50ish passes. Each pass is described as a language transform, where both the starting input and output language must have precise grammars. To reduce the […]

Embedded Languages

I don’t like them.

I’ve ranted before about how the Web is a festering polyglot made horrific by Postel’s Law. Many, including Tim Bray, advocate more knowledge at the client end, when an error occurs in parsing the steaming pile of HTML that forms today’s Web pages. I almost fell in line […]

Scaling Automated CS Education

The success of Salman Kahn’s Academy and other instances of disruptive education, have started me thinking about how computer science education might scale. Let’s first analyze how Kahn is organizing the learning experience.

First: Have a huge collection of videos. Kahn’s library has been organically grown. Each video introduces only a single topic, through the […]

Measuring Effectiveness of a Domain Specific Language

Also, at CGO I met Hassan Chafi, who is working on a graph-based Domain Specific Language. Even though I never seem to find time that I can explicitly devote to studying them, DSL’s are, to me, an compulsively fascinating topic. A day or so after the discussion it occurred to me that we need some […]

Express yourself: to the compiler and to your fellow developer.

The keynote speaker at CGO 2012 (Chris Lattner, LLVM) put some crazy thoughts into my head.

Want compiler to know about:

memory disjointness aliasing Usage of data structures (array of struct vs struct of arrays) whether arithmetic is done on a pointer (and the bounds) invariants (in loops and between methods)

A language needs to […]

Information Uncertainty Principle

Through Denning’s Presentation Great Principles of Computing I heard of this fascinating tale regarding Buridan’s ass.

It refers to a hypothetical situation wherein an ass is placed precisely midway between a stack of hay and a pail of water. Since the paradox assumes the ass will always go to whichever is closer, it will […]

Segregate Third-Party JS Libraries

Typically, web authors simply load whatever library they’d like to use with full trust. In JS, such loading amounts essentially to a #include. I’m flabbergasted that this practice remains normal. It could be paranoia, but even without invoking all the security concerns, I’d be reluctant to include other people’s code simply because of the potential […]