🐾 rigby

GRIBFILE #1: what is grib? what is anything?

You look blankly at your computer screen as your mind mulls over the myriad of lines of idiotic mush Budster wrote. You start to wonder why you’re on a site called Rigby reading some buffoon’s ramblings on a language that doesn’t have an existing implementation. You look around, and begin to ask questions that have vexed great thinkers all around the world. What is life? What is reality? But most importantly, what is GRIB?

Budster knew you were going to ask that question. Budster was prepared. Budster foresaw your confusion. Budster put together a loose spec that will probably mutate depending on what features are most convenient for him to implement.

IDENTIFIERS
/[a-zA-Z_]\w*/. Budster has no more to say on this topic.

VARIABLES
Variables are declared using the decl keyword and an identifier. Uninitialized variables have a default value of nil. Contrary to Budster’s core values, GRIB has JS levels of type unsafely (nonexistent identifiers will be identified at compile time, though). Even angelic little dingo boys need to get their paws dirty sometimes…

decl frustration = \"god damn it TextEdit stop autocorrecting Budster to buster\";

COMMENTS
All content that lies between @ and a newline character is ignored by the compiler.

@ it's two am

OPERATORS
GRIBLANG has the following operators [0]:

Binary
	- Plus (+)
	- Minus (-)
	- Multiplication (*)
	- Div (/)
	- Modulo (%)
	- Greater than (>)
	- Less than (<)
	- Greater than or equal to (>=)
	- Less than or equal to (<=)
	- Equal (==)
	- Logical and (&&)
	- Logical or (||)
	- Assignment (=)
	- Assign-plus (+=)
	- Assign-minus (-=)
	- Assign-multiplication (*=)
    	- Assign-division (/=)
	- Assign-modulo (%=)
Unary
	- Negation (~) [1]
    	- Logical negation (!)

NUMBERS
All numbers are 64 bit floating point and consist of [digit] or [digit.decimal]. No scientific notation or hex. Budster likes to keep things simple here (which is code word for saying \“the creator(s) didn’t want to put that much work into this\”).

decl a = 235.262135;
decl m = ~23 + 4; @ No, you're not the only one who thinks the negation operator looks stupid.  Subservience to convenience is a destructive practice.

LOOPS
There are two kinds of loops present in GRIB: standard while loops and for loops.

decl m = 0;
while m < 20 {
	println(m);
	m += 1;
}

for decl h = 2; h < 10; h += 3 {
	println(h);
}

FUNCTIONS
Functions are defined with the keyword proc followed by an identifier name and a code block. Values are returned explicitly via the return keyword. If no value is returned, nil is returned. Arguments are accessed via the args array present in function blocks [2].

proc min {
	decl m; @ Implicit nil assignment
	for decl i = 0; i < arrayLength(args); i += 1 {
		if m == nil || args[i] < m { @ nil will always evaluate as less than any number
			m = args[i];
		}
	}
	return m;
}

STRINGS
Lovely little immutable strands you can pack chars into.

decl m = \"aaaa \" +  thingy + \" interpolation syntax is for the weak\";

IF STATEMENTS
if [expression] { [code block] }
else if [expression] { [code block] }
else { [code block] }
Values that evaluate as true:
- An array
- true
- Any nonzero number
- Any nonempty string
Values that evaluate as false
- false
- Zero
- An empty string

ARRAYS
Arrays are mutable lists that can be modified by array-specific functions. Elements can be accessed via the classic [index operator]. Other array processes can be done with functions provided in the standard library. Arrays are passed by reference.

decl m = [1, 2, 3, 4, ]; @ trailing commas are welcome here, because that format just so happens to be what is most convenient for BUDSTED

Budster can listen to you think. You’re thinking \“Why would any self respecting dingo boy ever put an ounce of effort into something so horrid?\”

Well
1) Budster has no self respect
2) This is Budster’s destiny

The second bullet requires a bit of elaboration.

…………………..

There was nothing before the creation. The universe was vacant, like an empty container of cottage cheese, and four deities dwelled in the infinite abyss. The four divine goldfish drifted around in their sea of eternal darkness, until the smallest one spoke: \“We have roamed the cosmos for our entire lives, and nothing has come from it. We remain in a stagnant hell, and I have reached my wit’s end. I have nothing but myself, so I give my only heart out to the void so that it may become a plane that can be cultivated.\” [3] So the being reached into its bosom and extracted its heart. The severed muscle flattened out into a cylinder of astronomical girth, and the smallest god faded into the blackness that surrounded the lonely object. The other three were taken aback by the smallest one’s unexpected actions. As to not let their companion’s sacrifice be for naught, they all gathered around the circular platform to bestow their gifts upon the ba

Comments

bdingo on 2019-01-13

THE FREAKING CHAR LIMIT CUT THE ARTICLE SHORT https://pastebin.com/raw/gRvTjrrY

new reply

Matthias on 2019-01-13

I have looked, I have seen, I have read, and I have become enlightened.

bdingo on 2019-01-13

yes yes, assimilate the knowledge

new reply

luke on 2019-01-13

Truly a poetic work, words cannot describe-

bdingo on 2019-01-13

words cannot describe what has been described with words

new reply

musicalbird on 2019-02-15

buster when is gribfile 2 coming out

musicalbird on 2019-02-15

*budster

bdingo on 2019-02-26

presumably after GRIBFILE 1.5

new reply

new comment