pocmatos
2019-2-6 12:54:04

@robby is there a tour de force on contracts, maybe explaining where they started up and where we are today and what is still to do research-wise, maybe with some connections to Racket? Maybe an internal/technical report or something of the sort that you can share.


robby
2019-2-6 13:19:52

Nothing comes to mind sorry


pocmatos
2019-2-6 13:27:50

Thanks.


samth
2019-2-6 17:05:11

@pocmatos I would say that @robby’s ICFP 2014 keynote would be the best thing


pocmatos
2019-2-6 17:08:14

@samth icfp14 doesn’t seem to be online. do you have a link to the keynote?


robby
2019-2-6 17:08:41

pocmatos
2019-2-6 17:08:41

got it



pocmatos
2019-2-6 17:08:45

lol


pocmatos
2019-2-6 17:08:46

thanks!


robby
2019-2-6 17:08:57

I’m not sure it is what you’re looking for, tho …..


pocmatos
2019-2-6 17:09:12

Thanks anyhow. Will take a look. :slightly_smiling_face:


sorawee
2019-2-6 18:40:38

Perhaps I miss something really simple. How can I transform an expanded code?

Right now I have something like:

(define-for-syntax (my-expand stx)
  (define expanded (local-expand stx 'expression '()))
  (syntax-parse expanded
    #:datum-literals (#%app)
    [(#%app x y)
     expanded]))

This works, but if I change expanded to #'x, I start to get cannot use identifier tainted by macro transformation


alexknauth
2019-2-6 18:52:33

Which #%app is expanding? Racket’s #%app or one that you’re defining?


alexknauth
2019-2-6 18:53:22

If it’s one that you’re defining, does the my-expand code work if you use it only with Racket’s #%app?


sorawee
2019-2-6 19:04:41

Racket’s app


alexknauth
2019-2-6 19:07:22
(define-syntax ex
  (lambda (stx)
    (syntax-parse stx
      [(_ e) (my-expand #'e)])))
(ex (add1 5))

?


sorawee
2019-2-6 19:07:30

Ohh interesting.


alexknauth
2019-2-6 19:07:54

Where the #%app inserted before add1 is Racket’s #%app and not a custom one


sorawee
2019-2-6 19:07:56

Yeah, probably not racket’s app


sorawee
2019-2-6 19:12:15

Right, so if I change:

(provide (rename-out [module-begin #%module-begin])
         build
         (except-out (all-from-out rosette) #%module-begin))

to

(provide (rename-out [module-begin #%module-begin])
         build
         (except-out (all-from-out racket) #%module-begin))

(that is, change rosette to racket), then disassembling the expanded syntax works.


sorawee
2019-2-6 19:13:01

But since I need to use rosette, how could I make this work?


sorawee
2019-2-6 19:14:04

Also, I thought that local-expand is supposed to turn rosette’s #%app to Racket’s #%app. Isn’t that the case?


soegaard2
2019-2-6 19:25:34

@pocmatos Have you checked out this? https://andykeep.com/pubs/dissertation.pdf


andreiformiga
2019-2-6 19:41:42

@soegaard2 I’ve read it because I tried to understand the insides of Chez too, but it does not document many important parts of it. Some stuff you can find in some of Dybvig’s papers, though scattered and incomplete information


alexknauth
2019-2-6 19:43:29

@sorawee Rosette’s #%app uses syntax-protect on its output, and that makes this harder. Maybe syntax-disarm somewhere will help?


sorawee
2019-2-6 19:44:02

Yup, I think I have a solution now


soegaard2
2019-2-6 19:44:19

Agree.


andreiformiga
2019-2-6 19:45:16

nanopass itself is great though


soegaard2
2019-2-6 19:59:42

A Scheme compiler written with Nanopass - including some comments:



soegaard2
2019-2-6 20:00:27

Anyone knows about readscheme / Jim Bender?


andreiformiga
2019-2-6 20:01:42

the domain expired?


soegaard2
2019-2-6 20:02:10

I would be happy to chip in - to get the web site back up.


andreiformiga
2019-2-6 20:03:08

I think someone in the freenode #scheme IRC channel tried to contact him


soegaard2
2019-2-6 20:05:26

Even hosting the references on Github would be great.


soegaard2
2019-2-6 20:06:58

pocmatos
2019-2-6 20:32:21

Thanks. Hadn’t seen that before.


sorawee
2019-2-7 00:45:14

@alexknauth thanks, it works now. I was aware of syntax-disarm but it doesn’t seem to fix the issue. It turns out that is indeed the issue, but I need to disarm at every level. E.g. in [(_ foo (bar)) ...], I can disarm foo straightforwardly, but for bar, I need to disarm (bar) first and then disarm the actual bar.