Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-12-17 Thread Guillaume Savaton
Several months have passed since I started this thread. I have finally decided to write a blog series about this experiment. There are seven posts planned, the first four of which are already published: - General introduction

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread Guillaume Savaton
Le mardi 26 mai 2020 21:45:21 UTC+2, johnbclements a écrit : > > In your case, the type checker would also be “resolving” lightweight > expressions like (assign (h1 a) a) into fully-decorated expressions like > (assign (port-ref half-adder h1 a) (port-ref full-adder a)) . > Does this make sense?

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread Guillaume Savaton
Le mardi 26 mai 2020 21:41:14 UTC+2, Sam Tobin-Hochstadt a écrit : > > I think the best way to implement what you describe for a "better > version" is as follows: > > Expand `(instance h1 half-adder-arch)` into something like > > (define-syntax h1 (half-adder-arch-info)) > I have seen this d

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread 'John Clements' via Racket Users
Okay, I could just be putting my foot in my mouth, here, but it sounds like you’re describing the kinds of things that are typically done by a type-checker. Have you considered adding a type-checking pass? It would contain an environment that maps names like “h1” to “types” that indicate that h1

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread Sam Tobin-Hochstadt
I think the best way to implement what you describe for a "better version" is as follows: Expand `(instance h1 half-adder-arch)` into something like (define-syntax h1 (half-adder-arch-info)) Where `half-adder-arch-info` is an expansion-time structure describing half-adders. Then the `assign` m

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread Guillaume Savaton
Le mardi 26 mai 2020 03:59:59 UTC+2, johnbclements a écrit : > > > So far, I have made two attempts to work around these issues: (1) by > creating a metamodel-like data structure using Racket structs, and > transforming syntax objects into struct instances; or (2) using syntax > objects only and

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-25 Thread 'John Clements' via Racket Users
> ... > So far, I have made two attempts to work around these issues: (1) by creating > a metamodel-like data structure using Racket structs, and transforming syntax > objects into struct instances; or (2) using syntax objects only and attaching > context data to each of them as a syntax proper

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-25 Thread Jens Axel Søgaard
Hi Guillaume, Thanks for taking the time to write this question. ... > My main concern is about managing the scopes/lexical contexts in my language. > I am still browsing the documentation but I have found no library or guide that addresses this issue. > The language examples that I have found ar

[racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-21 Thread Guillaume Savaton
I am a Racket beginner trying to create my own DSL. As a long-time user of Xtext and other similar tools in the Eclipse ecosystem, I have come to Racket expecting that it would address similar concerns. At the moment, I have mixed feelings: I find the metaprogramming facilities in Racket very ef