News for hackers. Stuff that matters.
Re:Hoon's Moronic Type System by urbit on Thursday October 03, 2013 @01:40PM (#6490539)
The type, as a set of nouns, is the range (excuse me, "codomain") of a function.

So, if we have another function and we call it with a noun of that type, we know the range of the input, we know the code in the function, we can infer the range of the output. It's not terribly rocket scientific.

Re:Hoon's Moronic Type System by samatman on Thursday October 03, 2013 @01:45PM (#6490569)
This explanation falls apart for me because the third time you use the word "function", it can refer to either of the two referents you already introduced.

I think you're saying a type is the range of inputs to function1 which succeed by not crashing; given function2 and a noun in the type, we may use function1 to infer the range of values which function2 must accept? Maybe?

Re:Hoon's Moronic Type System by urbit on Thursday October 03, 2013 @02:04PM (#6490727)
Range == set of outputs which the function can produce.

In any language, a type defines a set of values and some semantics for manipulating those values. It so happens that our way of defining common sets is to build a function whose range is some useful set.

Actually any gene (ie, expression) has a product range. It doesn't even need to be a function. So the range of the constant

[%foo %bar]

whatever the subject is, is always [%foo %bar], ie, the pair [7.303.014 7.496.034].

Re:Hoon's Moronic Type System by samatman on Thursday October 03, 2013 @02:17PM (#6490832)
Outputs indeed. I forgot your country willingness to 'normalize' input. I suppose a bull can be a steer if you're willing to cut the balls off on the way into the pen.

You're not a big believer in airbags, are ya.

Re:Hoon's Moronic Type System by urbit on Thursday October 03, 2013 @03:44PM (#6491466)
An automatic castrator is an excellent safety device for your steer pen.

Generally we don't actually use these functions unless we're normalizing foreign data. Then, we do. Because anyone on the Internets can send a bull into your steer pen...

Re:Hoon's Moronic Type System by samatman on Thursday October 03, 2013 @05:25PM (#6492189)
I guess I'm hoping there's some snipping noise that lets one distinguish the two cases.
Re:Hoon's Moronic Type System by offensivehandle on Thursday October 03, 2013 @11:53PM (#6493622)
Range is used to mean either codomain or image. You appear to have meant image.

Mathematicians keep all three words around because each of them has its use.

Re:Hoon's Moronic Type System by urbit on Friday October 04, 2013 @12:23AM (#6493698)
Oh, fine. Actually I mean codomain, because it's a conservative algorithm...