samth
2018-9-7 13:27:35

@maxsnew re: your tweet: which one of those is explicit in Typed Racket?


maxsnew
2018-9-7 14:54:16

casts are explicit in TR because they are specified at module boundaries


maxsnew
2018-9-7 14:54:55

but my understanding is that TR has unusual parametricity enforcement


maxsnew
2018-9-7 14:55:07

so it might not apply directly


maxsnew
2018-9-7 14:57:05

I’m currently working on something where sealing is explicit and therefore accessible to the programmer even in dynamically typed code


maxsnew
2018-9-7 14:57:42

but I don’t think my solution works without making polymorphism explicit as well :confused:


samth
2018-9-7 14:59:46

@maxsnew casts don’t need to be explicit if you can synthesize them during type checking


samth
2018-9-7 14:59:59

for example, they aren’t explicit for typed->untyped casts


samth
2018-9-7 15:00:11

our DLS paper has no explicit casts


samth
2018-9-7 15:00:20

you just need a simple type system


maxsnew
2018-9-7 15:01:52

a module boundary is an explicit cast


samth
2018-9-7 15:10:07

I don’t understand — there’s a simple type-directed translation from the GTLC to the system in my DLS paper


maxsnew
2018-9-7 15:15:25

so? there’s a simple type-directed translation from GTLC into explicit cast calculi also


maxsnew
2018-9-7 15:17:51

also isn’t polymorphism explicit in TR (as in you have to annotate to get a polymorphic type, not that you explicitly instantiate)


pnwamk
2018-9-7 15:19:49

w.r.t. polymorphism in TR, a polymorphic type is only used when explicitly annotated as such. More generally, unannotated arguments are given type Any generally speaking.


maxsnew
2018-9-7 15:22:08

right versus trying to generalize like in https://link.springer.com/chapter/10.1007/978-3-319-89884-1_1


pnwamk
2018-9-7 15:30:53

… I don’t immediately understand the comparison (and have not read that paper, to be clear). They say “the first goal of this paper is to propose a generalization of consistent subtyping that is adequate for polymorphic subtyping”… Typed Racket does not use consistent subtyping at all, or consistency while performing inference, because both of these things are done in an entirely statically typed context, which makes me think this isn’t the right comparison and/or isn’t addressing the overarching question/comment you have about TR


maxsnew
2018-9-7 16:08:54

sorry you’re missing some context from a tweet that Sam TH was referencing don’t worry about it


samth
2018-9-7 17:41:24

@maxsnew right, generalization is explicit in TR (but that’s not necessary for the gradual typing part) but instantiation (what you said in the tweet) is implicit


maxsnew
2018-9-7 17:42:41

yes though instantiation in typed code doesn’t seal anything so it’s not really what I was talking about


samth
2018-9-7 17:43:13

right but the important case, which is instantiation of functions casted to a polymorphic type, is also implicit


maxsnew
2018-9-7 17:47:59

ok well I’m sure my tweet was wrong/too pithy


jlshown
2018-9-7 17:51:09

Hello Everyone! Hope all are well! I have a quick questions for Racket 6.6 with the language Scheme, what packages do I need to have with it?


jlshown
2018-9-7 17:56:33

I have the simply scheme by danny yoo which is used with the simply scheme curriculum, but things like (first ’truffle) is throwing an error: first: contract violation expected: (and/c list? (not/c empty?))


pnwamk
2018-9-7 17:59:06

@jlshown what did you expect the expression (first 'truffle) to do? (i.e. I don’t understand the problem, because that error seems appropriate and accurate to me)


samth
2018-9-7 18:02:16

@maxsnew the reason that I bring it up is that I think all of those features are required for a sensible account of gradual polymorphism


samth
2018-9-7 18:02:44

in the sense that you don’t write any of them explicitly in an untyped language, so requiring them breaks some fundamental part of the approach


pnwamk
2018-9-7 18:04:29

@jlshown (ah sorry, I glanced over at the simply scheme text and see it’s supposed to return ’t)


maxsnew
2018-9-7 18:04:52

but you do make sealing explicit in a dynamic language, the difference between a value and a value wrapped in an opaque struct is not implicit at all


ben
2018-9-7 18:07:07

samth
2018-9-7 18:07:09

I disagree; map doesn’t do any sealing in Racket


samth
2018-9-7 18:07:38

people use sealing in dynamic languages to represent existentials, usually


pnwamk
2018-9-7 18:08:04

@jlshown In DrRacket (v6.6) I clicked File > Package Manager, then entered simply-scheme in the text box and clicked install, and the following program now works: #lang simply-scheme (first 'truffle)

i.e. producing 't


maxsnew
2018-9-7 18:14:19

I agree map doesn’t seal


maxsnew
2018-9-7 18:14:46

it is also not parametric


samth
2018-9-7 18:15:19

what do you mean? the standard definition is certainly parameteric


maxsnew
2018-9-7 18:28:17

sorry didn’t think that through


maxsnew
2018-9-7 18:28:35

map is parametric, there’s no difference whether it is sealed or not


maxsnew
2018-9-7 18:29:41

I’m not saying that sealing is implicitly used in dynamic languages to enforce parametricity


maxsnew
2018-9-7 18:30:03

I’m saying that the language feature that corresponds to sealing (generative structs, units) is not implicit in the dynamically typed language


maxsnew
2018-9-7 18:31:00

the language design I have works for existential types, making it work for forall types is a bit strange I admit


samth
2018-9-7 18:34:39

i agree with that about existentials


samth
2018-9-7 18:34:59

but I think universals have to be implicit


maxsnew
2018-9-7 18:37:54

I sort of agree but only inasmuch as I think sealing for universals is not really what anybody wants


samth
2018-9-7 18:40:53

well dynamic enforcement of gradual types isn’t something anyone “wants” in a certain sense


maxsnew
2018-9-7 18:42:52

I think people do like opaque structs?


maxsnew
2018-9-7 18:42:58

I certainly do


maxsnew
2018-9-7 18:43:49

and so conclude that people do want dynamic enforcement of existentials


samth
2018-9-7 18:44:28

I feel like the question of “want” is problematic


maxsnew
2018-9-7 18:48:21

ok


jlshown
2018-9-7 19:03:31

@pnwamk Thank you so much, what I will do is uninstall the package or racket if I have to then, reinstall racket + simply-scheme and try it again. I will let you know.


jlshown
2018-9-7 19:04:19

@pnwamk yes (first ’truffle ) would be ’t


collin
2018-9-8 04:00:38

@collin has joined the channel