Profile cover photo
Profile photo
Andre Masella
122 followers -
Outing the dysfunctionalities of Earth.
Outing the dysfunctionalities of Earth.

122 followers
About
Andre's posts

Post has attachment
I created a table from my grandmother's timpagno (pasta board) to hold my mixer and bread proofer (and make pasta too).
Photo

Post has attachment

Post has attachment

Post has attachment
Here's a quick guide to how Canadian laws are made so you can understand how the Queen and Gordon Lightfoot work together.

I think I just figured out how to add a `typeof` operator to Flabbergast and not have it suck.

The problem with `typeof` in Javascript (ignoring that it returns `object` for `null`) is that it returns a string. This is not the Flabbergast way. Why a string? Why not a frame or an integer? The purpose is for the user to take this value and then either compare it or do a lookup in some other structure. Why should it be tied to a particular type? The answer, is, now so clearly, lookup.

If you do `TypeOf "x"`, it should do a lookup for `str` and return whatever that is. This creates a relatively small binding between the language and user's namespace: one name for each of the 7 types (bringing the total number of magic words to 9: args, value, bin, bool, int, float, frame, str, tmpl)

Unfortunately, this design is awkward since we have no namespace control on those new magic words, unlike `args` and `value`, where the structure of the program controls their scopes.

So, let's introduce a namespace prefix:
`Type foo Of "x" ` would resolve to `foo.str`
Now, the user can have namespace control. This means one could do:

type_id : { bin : 0 bool : 1 int : 2 float : 3 frame : 4 str : 5 tmpl : 6 }
value : Type type_id Of x == Type type_id Of y

has_sql_literal : { bin : True bool : True int : True float : True frame : False str : True tmpl : False }
value : Type has_sql_literal Of x

We can even be craftier:
create_shell_literal : {
bin : Template { value : ... }
bool : Template { value : If input Then "true" Else "false" }
int : Template { value : input }
float : Template { value : input }
frame : Template { value : Error "Cannot convert frame to shell." }
str : Template { value : ... }
tmpl : Template { value : Error "Cannot convert template to shell." }
}
value : (Type create_shell_literal Of x)(input : x)

That is, use `Type Of` to find a function and then call that function on the value.


Post has attachment
So, are we going to start engineering the biosphere?

Post has attachment

Post has attachment

Post has attachment

Post has attachment
Futuramagasm.
Wait while more posts are being loaded