pocmatos
2017-12-21 13:30:03

@greg thanks for the explanation. Makes sense although I would love to have a debugger that I can use to step through code. I will take a look at debug package and racket/trace.


raedon.neil
2017-12-21 17:20:38

@raedon.neil has joined the channel


lexi.lambda
2017-12-21 17:40:31

@leif can nanopass consume and produce syntax objects?


leif
2017-12-21 17:50:10

@lexi.lambda Not really. (Technically yes, but then it won’t do all of the template generation for you.)


leif
2017-12-21 17:50:21

(At which point there’s not much point.)


leif
2017-12-21 17:50:28

pun not intended. :wink:


lexi.lambda
2017-12-21 17:50:29

okay. that is what I suspected, but it’s good to know for sure.


leif
2017-12-21 17:50:40

Can I ask what you are doing?


leif
2017-12-21 17:51:01

Because if what you want is things like source locations then that should still be fine.


lexi.lambda
2017-12-21 17:51:06

I am interested in adding an optimizer to Hackett. I would like to expand Hackett to a core language, then run the optimizer on the core language before expanding to #%kernel.


leif
2017-12-21 17:52:27

Okay. in that case (depending on how you want to do it), nanopass might still be good.


leif
2017-12-21 17:52:43

I presume you want to do whole module compilation, yes?


lexi.lambda
2017-12-21 17:53:03

yes, the optimizer would essentially run after module expansion.


lexi.lambda
2017-12-21 17:53:23

that is, in #%module-begin.


leif
2017-12-21 17:53:52

Okay


leif
2017-12-21 17:54:04

In that case nanopass would probably be the way to go.


leif
2017-12-21 17:54:12

(Depending on how large your compiler is going to be.)


leif
2017-12-21 17:54:38

(If its a small one, or if you want to use a single IR, then there are obviously other ways to get the boilerplate reduction.)


leif
2017-12-21 17:55:18

What I would do is when you have your ‘parse’ pass, store the binding information yourself.


lexi.lambda
2017-12-21 17:55:31

I’m not sure yet. Right now I mostly want to do simple things. If I’m going to do laziness, I need to be able to do strictness analysis. Eventually I’ll need to be able to do type-directed specialization.


leif
2017-12-21 17:55:38

Either by storing the literal identifier (rather than the symbol), or with some binding structure.


leif
2017-12-21 17:55:56

Ah, fair.


leif
2017-12-21 17:56:12

Well if you do choose nanopass, feel free to let me know and I will do what I can to help. :slightly_smiling_face:


lexi.lambda
2017-12-21 17:56:30

Okay, that’s helpful. I might experiment with a few different things. :)


leif
2017-12-21 17:58:26

Okay cool. Well good luck, and I hope it goes well. ^.^


lexi.lambda
2017-12-21 18:00:17

The main obstacle is finding the time, but I’ve been toying with the idea for a while with my spare cycles, so I think I just need to sit down and start writing some code.


leif
2017-12-22 02:02:40

Does anyone know if there is a good mapping from editor or display coordinates from a snips on-event method, to the dc coordinates in its draw method?


leif
2017-12-22 02:03:33

Like, it looks like I can use the dx and dy variables to re-position the origin, but then I’m worried about the dc coordinates using a different scale than the editor (or display) ones.


leif
2017-12-22 02:03:46

Like iirc, on os x its 2 to 1 or something like that.