Leave a comment

kragen December 22 2009, 19:59:08 UTC
Lua very intentionally omits 95% of the feature set of Common Lisp, so that you can use it in environments where you only have room for the half of Common Lisp you're using. There are off-the-shelf libraries for a lot of those features, though, so you don't have to use an informally-specified, bug-ridden version.

Reply

maradydd December 22 2009, 20:17:50 UTC
I grok that, though it's mind-boggling to me that a language with first-class functions wouldn't have either list slicing a la Python or cons/car/cdr. Presumably this is because the built-in listlike object is the associative array (which gives the whole thing an uncomfortably PHP-like feel), but it still leaves me wondering where the tools that fit in my hands so well have gone.

And the whole business of indexing from 1 is just ridiculous. This is computer science, not biology.

Reply

lightning_rose December 27 2009, 17:45:47 UTC

There's always Pascal, where you can index an array from where ever the heck you want. :)

Reply

maradydd December 27 2009, 17:59:43 UTC
Strangely, I never learned Pascal. I would have, if I'd taken the Computer Math II class that my high school offered (Computer Math I, aka "BASIC programming", was a required course for honors students), but the year I planned to take it (junior year), only four students signed up -- and one, my then-boyfriend, moved to Utah just before the school year started, so there weren't enough students to justify paying a teacher for it. I could have tried again my senior year, but I wanted to take both second-year chemistry and second-year physics, so there was no room in my schedule.

Computer Math I was also the course where I kept getting in trouble for finishing the assignments within the first few minutes of class and spending the rest of the hour either playing Wing Commander, exploring the network, or writing BASIC programs that annoyed other people. Halfway through the semester I got pulled aside and asked "okay, since you obviously already know everything on the syllabus, what do you really want to be doing in here?" I said, "I hear ( ... )

Reply

kragen December 27 2009, 18:11:52 UTC
it was really only by an improbable string of coincidences that I ended up in software engineering at all.

So natural talent had nothing to do with it? Are you going to tell us that the reason you finished each day's assignment in a few minutes was that you were raised in a monastery of kernel hackers who taught you BASIC before you could ride a bicycle?

Reply

maradydd December 27 2009, 18:16:45 UTC
No, it was because when I was eight my dad brought home a PCjr in a box.

"What's that, Daddy?" I asked.

"It's a computer," he said.

"How does it work?" I asked.

He handed me the manual and said, "Find out!"

I learned how to ride a bike when I was nine.

Reply

kragen December 28 2009, 07:53:57 UTC
Haha! Very similar to my own story.

...any number of other eight-year-olds, though, had that same opportunity and didn't make it through enough of the manual to do anything interesting.

Reply

maradydd December 28 2009, 11:01:43 UTC
Point. Though it's really only been recently that this has become evident, since the people I was hanging out with in high school had not only done the same thing with respect to BASIC, but also understood modem init strings and spoke enough assembler to be dangerous and had assorted other skills that had me thinking I was just average. After high school, I didn't touch an interpreter again until grad school, a good ten years later.

Reply

lightning_rose December 28 2009, 16:43:46 UTC

Pascal as a professional programming tool was pretty much dead by the mid 80's, although Wirth's book on algorithms and data structures was probably still in use and had a Pascal style syntax for the examples. Anyone with a reasonable knowledge of C could pick up Pascal in a couple of days.

What I was alluding to is that in Pascal, one defines the size of an array by the valid indices for that array. For example,

someString: array [0..99] of char;

defines a C style array of 100 bytes, indexed from 0 to 99

But to get a bit weird...

fooArray: array [-100..100] of foo;

defines an array of type foo containing 201 elements that can be indexed from -100 to 100. And yes, any arbitrary values such as 17..77 can be used.

This maybe useful for some programming problems, but I've never needed anything like it.

Reply


Leave a comment

Up