MAH BUKKIT

HAI

CAN HAS STDIO?
MAH BUKKIT!!0 IZ FISH
BTW MAH denotes array

MAH BUKKIT!!1 IZ LOLRUS
MAH BUKKIT!!Z1 IZ STOLEN
MAH BUKKIT!!Z1 IZ 1
BTW access vars in arrays with !!<index>.
BTW !!Z is last index, !!A is first. !!Z1 is one-after-Z, !!1A is one-before-A, for push and pop purposes.

VISIBLE MAH BUKKIT?
BTW prints 4. size of array.

NERF MAH BUKKIT!!Z!!2
BTW NERF !!Z!!2 reduces last element by 2
BTW (not sure how to handle string/int issues)

VISIBLE MAH BUKKIT!!A THRU MAH BUKKIT!!Z
BTW changed to thru as suggested.
BTW above prints array slices.

STEAL MAH BUKKIT
BTW steal -> undef

MAH BUKKIT sounds good for arrays. One issue with the above might be the need to have more than one array in a program, though. We could just use MAH BUKKIT when declaring an array, although we might lose the opportunity to use STEAL, unless we repurposed it as a copy operator… (see subsequent comment) — ILikePi, 2007/05/29 15:40


See, I think that MAH is the array designator. Bukkit is the name of the array.

So, it could have been written as such:

HAI

CAN HAS STDIO?

MAH FISH0RZ!!0 R FISH
BTW MAH denotes array

MAH FISH0RZ!!1 R LOLRUS
MAH FISH0RZ!!Z1 R STOLEN
MAH FISH0RZ!!Z1 R 1

VISIBLE MAH FISH0RZ?

NERF MAH FISH0RZ!!Z!!2

VISIBLE MAH FISH0RZ!!A 2 MAH FISH0RZ!!Z
BTW 2 is the worst keyword ever, but it fits. suggestions?
BTW above prints array slices.

STEAL MAH FISH0RZ

As for '2' as a keyword, what about THRU?

VISIBLE MAH FISH0RZ!!A THRU MAH FISH0RZ!!Z

Also, FISH0RZ (or BUKKIT) was originally declared as FISH, but then assigned a '1'. I'm not sure how this would work in a loosely typed language. — Risser, 2007/05/29 16:08


OK, my bad. So what is “R” doing? Is that assignment of value or type? Everything else seems OK…THRU works for me. — ILikePi, 2007/05/29 16:14


Not sure I like the R. It doesn't really support matrices on the right-hand side very well, either.

How about “OF” for typing, like in my proposal for threading? — wohali, 2007/05/29 19:48


I don't know why I was using R, I'll change that now. It was meant to be variable assignment.

I was going to add, but didn't get a chance, arrays of arrays and also returning the entire contents of the array in list form:

VISIBLE MAH BUKKIT

should print (or return, in the case of VAR IS MAH BUKKIT) the entire array.

MAH BUKKIT!!1 IZ MAH FISHES

puts the FISHES in the BUKKIT.

VISIBLE "MAH FIRST FISHES IN MAH BUKKIT IZ" N MAH BUKKIT!!1!!0

prints “MAH FIRST FISHES IN MAH BUKKIT IZ MACKRL”, because FISHES!!0 is MACKRL. This time, anyway!

Say FISHES!!1 is numeric:

NERF MAH BUKKIT!!1!!1!!2

This takes two from index 1 of index 1 of MAH BUKKIT. It means we also get traditional-looking strings of !!n!!m, which I am in favour of. — Dan, 2007/05/31 01:23


I would say to let BUKKIT be the type name

HAI
CAN HAS STDIO?

I HAS BUKKIT!!3 FISHES
BTW defines BUKKETSIZE as 3

FISHES!!1 HALIBUT
FISHES!!2 SALMON
FISHES!!3 TUNA

I HAS A VAR
IM IN YR LOOP UPPING YR VAR!!1 TILL BUKKITSIZE
     VISIBLE "MAH BUKKIT HAZ " N FISHES!!VAR!!
IM OUTTA YR LOOP
KKTHXBYE

Greg, 2007/05/31 14:32


Also, do we want to distinguish between arrays and matrices or have arrays of arrays? — Greg, 2007/05/31 14:57

Actually, to make it simple:

I HAS BUKKIT!!3 FISHEZ
BTW declares an array of length 3 named FISHEZ

I HAS BUKKIT!!3!!6 MAMMLZ
BTW declares a matrix of width 3 and height 6

I suppose that could continue recursively as well. — Greg, 2007/05/31 15:25

contributions/mah-bukkit.txt · Last modified: 2007/05/31 15:28 by bornyesterday
Recent changes RSS feed Creative Commons License Donate Driven by DokuWiki