hhydjbpt
2019-11-8 13:39:16

@hhydjbpt has joined the channel


robbert.gurdeepsingh
2019-11-8 13:49:45

@robbert.gurdeepsingh has joined the channel



robbert.gurdeepsingh
2019-11-8 13:51:31

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


robbert.gurdeepsingh
2019-11-8 13:52:42

soegaard2
2019-11-8 13:53:55

Did you provide it in “wa.rkt” ?


soegaard2
2019-11-8 13:55:01

Ah, you did at the last line.


soegaard2
2019-11-8 13:56:49

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


robbert.gurdeepsingh
2019-11-8 13:59:34

It works in the wa.rkt file


soegaard2
2019-11-8 14:00:13

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


robbert.gurdeepsingh
2019-11-8 14:00:34

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


soegaard2
2019-11-8 14:01:02

I better stop guessing - we need a Redex user.


robbert.gurdeepsingh
2019-11-8 14:02:02

Did you mean like this in wa.rkt ?:


robbert.gurdeepsingh
2019-11-8 14:02:08

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


soegaard2
2019-11-8 14:02:13

yes


robbert.gurdeepsingh
2019-11-8 14:02:34

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)


soegaard2
2019-11-8 14:03:03

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


robbert.gurdeepsingh
2019-11-8 14:06:41

soegaard2
2019-11-8 14:08:30

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


robbert.gurdeepsingh
2019-11-8 14:09:43

yes, but below the provide


robbert.gurdeepsingh
2019-11-8 14:09:51

I’ll try swapping it


soegaard2
2019-11-8 14:10:34

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


soegaard2
2019-11-8 14:10:55

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


robbert.gurdeepsingh
2019-11-8 14:12:51

:slightly_smiling_face: It seems to work


robbert.gurdeepsingh
2019-11-8 14:12:59

Thank you


soegaard2
2019-11-8 14:13:14

So the rename-out was the solution?


robbert.gurdeepsingh
2019-11-8 14:15:00

yes


robbert.gurdeepsingh
2019-11-8 14:15:12

I reverted all the rest to my initial config


robbert.gurdeepsingh
2019-11-8 14:15:18

and removed the define lang


soegaard2
2019-11-8 14:15:59

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



robbert.gurdeepsingh
2019-11-8 14:54:18

Cool


steveh2009
2019-11-8 15:33:55

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.


robbert.gurdeepsingh
2019-11-8 15:43:43

@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?


soegaard2
2019-11-8 15:46:04

Sorry - I have never got [1] around to playing with Redex.

[1] Grammar question: “got” or “gotten”?


zbir
2019-11-8 15:46:23

@zbir has joined the channel


Bot messages not yet supported
steveh2009
2019-11-8 15:49:11

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#.


soegaard2
2019-11-8 15:50:02

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


samth
2019-11-8 15:50:28

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


steveh2009
2019-11-8 15:51:18

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


soegaard2
2019-11-8 15:51:39

:wink:


steveh2009
2019-11-8 15:51:48

Typio…bg (background)


robbert.gurdeepsingh
2019-11-8 15:52:38

It does in wa.rkt


soegaard2
2019-11-8 15:52:41

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


samth
2019-11-8 15:54:26

why is the require using for-syntax?


robbert.gurdeepsingh
2019-11-8 15:56:22

It isn’t anymore


robbert.gurdeepsingh
2019-11-8 15:56:27

I’ll update my gist



ben
2019-11-8 17:39:39

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


samth
2019-11-8 17:55:21

Yes


samth
2019-11-8 17:56:59

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.


ben
2019-11-8 17:58:56

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


ben
2019-11-8 18:52:47

@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
2019-11-9 02:30:00

@tterhune has joined the channel