Tag Archives: Ruby
The Only Data Structures You’ll Ever Need
Perl was the first programming language I really liked, the first language that made programming fun. Perl has three basic types: “scalars” for atomic values, arrays for ordered sets, and hash tables for unordered sets. (Yes, there are others, but … Continue reading
Permutations of Iteration
Ah, the loop, so fundamental to programming it’s hard to imagine a single program without one. After all, what’s the use of calculating just one thing? Usually you have a big pile of things you want to calculate, which is … Continue reading
JavaScript-like Objects in Ruby (or Lisp)
As part of my exploration of Ruby, I attended Francis Hwang’s presentation to the New York Linux Users’ Group. One feature that caught my interest in his talk was the OpenStruct class, which lets you assign values to arbitrary “slots” … Continue reading
Ruby: Python for Lisp Programmers
A popular game on comp.lang.lisp is comparing Lisp with Python. Lispers complain that Python has a crippled lambda and no lexical closures, and they hiss and boo whenever Python’s development tends in a non-functional direction. I’ve recently been playing with … Continue reading