tealeg
2019-4-2 07:00:13

I was at Racketfest. :metal:


pocmatos
2019-4-2 07:07:59

@jesse Racketfest!


pocmatos
2019-4-2 07:08:04

:slightly_smiling_face:


jesse
2019-4-2 07:19:32

I’m preparing the Racketfest videos and proceedings — stay tuned!


pocmatos
2019-4-2 07:25:44

Awesome! :slightly_smiling_face: Thanks for that.


jesse
2019-4-2 07:51:37

I’ve got 4.5 gigabytes of Shriram


pocmatos
2019-4-2 08:01:00

That’s definitely lots of Shriram bytes!


jerome.martin.dev
2019-4-2 09:49:10

Ok you were right. Passing a class through #’(my-class-name) seems to actually pass the whole identifier down phase levels. I was expecting something like “my-class-name is not bound to a class”, but it seems to work.


jerome.martin.dev
2019-4-2 09:51:23

Maybe there’s something about begin-for-syntax I don’t understand. I would have thought the scope of a begin-for-syntax would prevent other phases from accessing the classes defined there. Does #' work as a closure?


gfb
2019-4-2 13:21:07

is there a standard way to have a cut inside a syntax class be treated as a cut for the pattern that uses the class


lexi.lambda
2019-4-2 13:24:31

@gfb Yes, use #:no-delimit-cut.


gfb
2019-4-2 13:31:01

@lexi.lambda Thanks! Maybe that should be mentioned under the description of ~!, which mentions syntax classes but not that option (which is probably why I didn’t look carefully enough in the syntax-class section).


jesse
2019-4-2 14:36:06

@greg for some reason I’m finding that call/input-request in the http package is really slow — has something changed? I’m on 7.2.


jesse
2019-4-2 14:43:05

wait, nevermind — I’m using port->bytes as part of my entity reader, and this is somehow the bottleneck.


samth
2019-4-2 14:45:40

@alama if there’s something wrong (or even suboptimal) in port->bytes let me know


jesse
2019-4-2 14:49:41

it’s my mistake, no error in either @greg’s stuff or port->bytes— I was being dumb and unboundedly reading an open HTTP connection


jesse
2019-4-2 14:51:06

very silly error on my part. presumably the remote HTTP server was cutting me (that is, the open connection) off after one minute (the amount of time port->bytes was taking)


samth
2019-4-2 14:52:45

aha


samth
2019-4-2 14:52:52

btw, sounds like RacketFest was great!


jesse
2019-4-2 14:55:04

yeah! it was a blast. a ton of people showed up (65 registered, about 55 actually came), coming from many perspectives. I’d say only a handful of the people were major/serious Racket programmers. Most were enthusiasts of one kind or another and had dabbled with the language to varying degrees.


alexknauth
2019-4-2 17:56:11

The scope of a begin-for-syntax? Identifiers defined inside a begin-for-syntax are available in all other phase 1 code that has those scopes.

This includes: - Other begin-for-syntax things in that module - Macro transformer expressions in define-syntax, let-syntax, etc. in that module - Macro templates in that module that might get inserted into phase–1 positions in any module, including other modules

This isn’t about crossing phases. I’m guessing the way you’re using it, the identifier is being put into a phase–1 position in the other module, and that’s fine, supported by macro hygiene.


jerome.martin.dev
2019-4-2 18:17:03

I guess my case is the third one. I’m putting the syntax-class in a template, moved through provide into other modules.


alexknauth
2019-4-2 18:49:59

And when it gets moved into other modules it retains the scopes from the macro-definition site in the original module, so the non-provided syntax class in the begin-for-syntax will be available as long as you insert it into the same phase.


wlbberman
2019-4-2 19:20:11

@wlbberman has joined the channel


jerome.martin.dev
2019-4-2 20:04:40

I see, thanks for the explanation!


lexi.lambda
2019-4-2 20:23:01

Is there any way to do the equivalent of exec in Racket, i.e. replace the current process with a new one? I suppose I could always just call execv via the FFI, but I’d rather not have to.


soegaard2
2019-4-2 20:23:02

Try this. Open DrRacket. Type a little. Minimize the window (macOS). Switch to another program, then switch back to DrRacket.


soegaard2
2019-4-2 20:23:29

Now I see “DrRacket”, “File” and “Help” menus in the menu bar.


soegaard2
2019-4-2 20:23:40

Alas the “Window” menu is gone.


soegaard2
2019-4-2 20:23:52

So how can I choose the window I minimized?



matias
2019-4-3 02:55:18

@soegaard2 is it not in the dock?


mflatt
2019-4-3 05:42:14

No, there’s no equivalent to exec.


philip.mcgrath
2019-4-3 06:21:13

I hope I’m missing something simple here, but I’m trying to write a macro that expands to class, declares an lexically-scoped initialization argument, and lets the body forms refer to it via a syntax parameter. Some ways that don’t work: (define-syntax-parameter arg #f) (let () (define-local-member-name lexical) (syntax-parameterize ([arg (make-rename-transformer #'lexical)]) (class object% (super-new) (init [lexical 1]) (printf arg)))) ;; lexical: unbound local member name (define-syntax-parameter arg #f) (let () (define-local-member-name lexical) (class object% (super-new) (init [lexical 1]) (splicing-syntax-parameterize ([arg (make-rename-transformer #'lexical)]) (printf arg)))) ;; identifier used out of context: lexical (define-syntax-parameter arg #f) (let () (define-local-member-name lexical) (class object% (super-new) (init [(internal-name lexical) 1]) (splicing-syntax-parameterize ([arg (make-rename-transformer #'internal-name)]) (printf arg)))) ;; identifier used out of context: internal-name