IPL will use the following syntax for exponentiation:
x = y ^ 2;
Read the rest of this entry »
Archive for category IPL — the Ideal Programming Language
IPL: Exponent Syntax
Nov 28
In the last article, I talked about ordered groups in the form of sequences. This time I will be talking about unordered groups, or sets.
Read the rest of this entry »
I want to propose the use of the pound sign instead of brackets to index into arrays. So I will.
Except they won’t be called arrays, because that’s a lame name.
IPL will support two types of “groups”; “sets” and “sequences”. A set is an unordered group, and a sequence is an ordered group. What does this mean?
Read the rest of this entry »
Don’t get me started on rotations.
I can get myself started, thanks.
Another great thing about units of measurement and automatic conversions is that you will never have to worry about whether a variable is using radians or degrees again.
I mean, oh my god, right?
Read the rest of this entry »
Yep, it’s another one. Just like Part 1 and Part 2.
Derivatives
Consider three interesting dimensions that relate to each other: position, velocity, and acceleration. Velocity can be thought of as change in position with respect to time, and acceleration can be thought of as change in velocity with respect to time.
Often in video games, you need to represent these things as three different vectors explicitly defined. If you wanted to move a car without messing with its position, for example, you would say
car.velocity = whatever...;
and trust that sometime later, the code is affecting the position based on its velocity
car.position += car.velocity * timeslice;
Things like this get boiler-plated a lot. I think it should be built into the language. I think that any numeric value should have a derivative operator, using the tick “‘” character. When you do the following:
car.position' = 5 meters / second;
You are saying that the car’s position changes by 5 meters every second*, which is the same thing as saying that its velocity is 5 meters per second. Read the rest of this entry »