tonyg changed the topic of #racket to: The Racket Programming Language -- https://racket-lang.org/ -- https://gather.town/app/wH1EDG3McffLjrs0/racket-users -- http://pasterack.org -- logged at https://libera.irclog.whitequark.org/racket/ -- This is the right place to ask for help with (Dr)Racket. Remember to wait around for an answer!
morte_ has joined #racket
FreeFull has quit []
monkey_ has quit [Ping timeout: 240 seconds]
morte_ is now known as monkey_
szkl has quit [Quit: Connection closed for inactivity]
monkey_ has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
clicker has quit [Remote host closed the connection]
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
GreaseMonkey has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
ski has joined #racket
dpk has quit [Ping timeout: 256 seconds]
dpk has joined #racket
skapata has quit [Read error: Connection reset by peer]
<Putonlalla> I can wrap the `struct` macro in this way, and it will work as expected: `(define-syntax structer (syntax-rules () ((_ arg ...) (struct arg ...))))` and then `(structer document (author title))`.
<Putonlalla> However, if I do this with my own macro that uses `datum->syntax` to create identifiers, the bindings get lost along the way. How should this be done correctly?
pony has quit [Server closed connection]
pony has joined #racket
<Putonlalla> Looks like my minimal broken counterexample turned into a minimal working example, which is quite annoying.
<Putonlalla> This demonstrates the problem. https://pastebin.com/hnHVYufb
<Putonlalla> The two definitions look the same, but do not work the same.
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
<Putonlalla> I have a hunch that the `ctxt` passed into `syntax-append` is somehow wrong.
mwnaylor has quit [Ping timeout: 240 seconds]
lucasta has joined #racket
ec has quit [Ping timeout: 240 seconds]
ec has joined #racket
morte has quit [Ping timeout: 240 seconds]
morte has joined #racket
avocadoist has quit [Ping timeout: 258 seconds]
avocadoist has joined #racket
sagax has quit [Remote host closed the connection]
avocadoist has quit [Read error: Connection reset by peer]
avocadoist has joined #racket
morte_ has joined #racket
avocadoist has quit [Read error: Connection reset by peer]
avocadoist has joined #racket
FreeFull has joined #racket
morte_ has quit [Read error: Connection reset by peer]
morte_ has joined #racket
skapata has joined #racket
<samth> Putonlalla: using `#'id` for the context will make it work
<Putonlalla> Ah! Indeed.
<samth> right now, you're using `stx` which is the syntax object created by the expansion of `structer*`
<samth> in general abstracting over non-hygenic macros is hard because which syntax object you use for the context is part of the interface
<Putonlalla> Could I use any identifier that comes from "the user" as the context?
morte has quit [Ping timeout: 240 seconds]
dbohdan has quit [Server closed connection]
lucasta has quit [Quit: Leaving]
dbohdan has joined #racket
m1dnight has quit [Ping timeout: 240 seconds]
Ekho has quit [Ping timeout: 240 seconds]
avocadoist has quit [Ping timeout: 240 seconds]
ns12 has quit [Ping timeout: 240 seconds]
ns12 has joined #racket
m1dnight has joined #racket
avocadoist has joined #racket
Ekho has joined #racket
morte_ has quit [Ping timeout: 252 seconds]
monkey_ has joined #racket
monkey_ has quit [Ping timeout: 265 seconds]
Tuplanolla has joined #racket
morte has joined #racket
morte_ has joined #racket
<samth> Putonlalla: yes, but again which one you choose is part of the interface (eg if you write a macro that synthesizes the field names then they don't come from the user)
mwnaylor has joined #racket
morte_ has quit [Remote host closed the connection]
<Tuplanolla> Okay, cool.