4 ms·
I read maybe a dozen pages, might read more but I'm curious if someone can tell me the type of $vau?
by openfuture 8y ago
I read maybe a dozen pages, might read more but I'm curious if someone can tell me the type of $vau?
- shawn 8y agoAccording to Racket, the type is 'ultimate-abstraction': $ racket -I swindle Welcome to Racket v6.12. > (class-of 42) #<primitive-class:exact-integer> > (class-of $vau) #<primitive-class:ultimate-abstraction> I guess the paper wasn't lying.
- chaoticmass 8y agodchaney@sagan:/~$ racket -I swindle Welcome to Racket v6.7. > (class-of 42) #<primitive-class:exact-integer> > (class-of $vau) ; $vau: undefined; ; cannot reference undefined identifier ; [,bt for context] > What did I do wrong? Or did the joke go over my head?
- shawn 8y ago$vau was introduced in Racket v6.11. You'll need to upgrade.
- leoh 8y agoWhat? No it wasn't.
- shawn 8y agoRacket 6.11 release notes: https://racket.ycombinator.lol/v6.11.html https://racket.ycombinator.lol/v6.11.html Racket v6.11 * `$vau` is now a built-in primitive. See "Fexprs as the basis of Lisp function application" * Typed Racket supports refinement types and dependent function types. Previously an experimental feature, refinement types allow types to describe more interesting properties of values, especially integers. For example, this type shows that the `max` function always produces a number at least as big as its inputs: `(-> ([x : Integer] [y : Integer]) (Refine [z : Integer] (and (>= z x) (>= z y))))` * DrRacket's Program Contour is significantly more efficient; using it no longer hurts DrRacket's interactivity. * The `web-server/formlets` library produces formlets that are serializable, facilitating dynamic uses of formlets in stateless #lang web-server servlets. The new `web-server/formlets/stateless` and `web-server/formlets/unsafe` libraries provide additional support with the same API. * The `db` library supports the Cassandra database.
- p4bl0 8y agoHow would you type lambda? If something like Symbol -> AST -> Closure is a type you accept for lambda, I guess vau's type would be the same except with two Symbols (one for the argument like lambda except it won't be evaluated before being passed to the closure, and one for the dynamic environment which you will need to evaluate the argument).