
@hhydjbpt has joined the channel

@robbert.gurdeepsingh has joined the channel


For some reason I am not able to use a language that is (required )


Did you provide it in “wa.rkt” ?

Ah, you did at the last line.

I have a hunch that term
doesn’t like your “renaming”. Does (term '() #:lang wasm-lang)
work?

It works in the wa.rkt file

Maybe use (provide (for-syntax lang))
?

term: expected an identifier defined by define-language in: wasm-lang

I better stop guessing - we need a Redex user.

Did you mean like this in wa.rkt
?:

(provide reductions term->kv (for-syntax lang))

yes

That gives wa.rkt:791:41: provide: provided identifier is not defined or required at: lang in: (#%provide (expand (provide-trampoline reductions term->kv (for-syntax lang))))
#(35049 4)

Oh! My bad. Use (provide lang) in “wa.rkt”, but import it with (require (for-syntax “wa.rkt”))


That indicates something wrong in “wa.rkt”. Do you still have the (define lang wasm-lang)
line?

yes, but below the provide

I’ll try swapping it

An alternative is to try: (provide (rename-out [wasm-lang lang]))
in “wa.rkt”

And then remove the (define lang wasm-lang)
line.

:slightly_smiling_face: It seems to work

Thank you

So the rename-out was the solution?

yes

I reverted all the rest to my initial config

and removed the define lang

Great it works. I am not quite sure how term
detected the difference.


Cool

Theoretically, one could port Winforms to Racket since it’s all just a giant wrapper around native win libs (with custom drawing at the higher levels). If you dig into the github code, sure does look like Microsoft is going to have .Net 5.0 support their Forms on Linux and Mac.

@soegaard2,the term function does not execute any of the meta functions defined in wa.rkt
, do you have any pointer as to what might be causing this?

Sorry - I have never got [1] around to playing with Redex.
[1] Grammar question: “got” or “gotten”?

@zbir has joined the channel

There’s a really cool project by a Russian university who built http://PascalABC.net\|PascalABC.net. Pretty amazing accomplishment. They took code from the dead project, SharpDevelop, used it to implement their Pascal-based (heavily modified form, making it closer to C#’s capabilities) Winforms designer and then they built incredibly an entire layer of Pascal libs on top of .net libs to enhance productivity. Gives one ideas of what Racket could have. My point is this. That http://PascalABC.net\|PascalABC.net environment they’ve created is addictive as its so easy to go from thought to implementation (e.g. you don’t need a “project” to run some code, much like the idea of linqpad for C#.

I wonder whether it is due to OS themes, that they make it difficult to change the color.

@robbert.gurdeepsingh I don’t know if term
runs metafunctions when you use unquote like that

That’s what Matthias F said in a 2012 reply to someone asking the same question (how to change by color of a button)

:wink:

Typio…bg (background)

It does in wa.rkt

The new fad with dark / light modes on macOS also complicates things.

why is the require
using for-syntax
?

It isn’t anymore

I’ll update my gist


@samth did you write the first version of the TR optimizer? 1e6aaf5928d25a650e3642f84657c6cd78476672

Yes

A slightly longer version of the story would be that I decided to write a PLDI paper out of the Scheme workshop paper, and decided it needed performance graphs. So I wrote a tiny optimizer with the plan to recruit Vincent to write a real one. And then we did that.

Ok, thanks! I’d assumed it started with Vincent. Also, I wasn’t sure if I’d found the earliest commit yet — since there were a few other renamings that made the git log
hard to follow

@robbert.gurdeepsingh there are two problems: (1) wa.rkt
doesn’t provide seq
and (2) thing
should be built with term
instead of quote … I would be surprised if Redex ever runs metafunctions in a quoted value
(if you really want, you can rebind quasiquote
to term
but I don’t recommend it)
Also you can leave out #:lang
since there are no underscores in thing

@tterhune has joined the channel