ChanServ changed the topic of #racket to: The Racket Programming Language -- https://racket-lang.org/ -- https://racket.discourse.group/ -- http://pasterack.org -- logged at https://libera.irclog.whitequark.org/racket/ -- This is the right place to ask for help with DrRacket. Remember to wait around for an answer!
Everything has quit [Quit: leaving]
Tuplanolla has quit [Quit: Leaving.]
lucasta has quit [Quit: Leaving]
Origin has quit [Quit: Leaving]
Origin has joined #racket
skapata has quit [Remote host closed the connection]
svm has joined #racket
msv has quit [Read error: Connection reset by peer]
svm is now known as msv
msv has quit [Remote host closed the connection]
msv has joined #racket
notzmv has joined #racket
shawnw has quit [Ping timeout: 252 seconds]
notzmv has quit [Ping timeout: 264 seconds]
ajf has quit [Remote host closed the connection]
shawnw has joined #racket
shawnw has quit [Ping timeout: 244 seconds]
Everything has joined #racket
shawnw has joined #racket
shawnw has quit [Ping timeout: 244 seconds]
skapata has joined #racket
eriol has quit [Ping timeout: 252 seconds]
eriol has joined #racket
Everything has quit [Quit: leaving]
lucasta has joined #racket
<Putonlalla> Is `else` supposed to be rebindable? I thought not, but the behavior of `cond` says otherwise, as the expression `(let ((else #f)) (cond (#f 'if-branch) (else 'else-branch)))` evaluates to an (unspecified) empty value.
<samth> Putonlalla: yes, `else` is rebindable.
<samth> consider: `(let ([else #f]) (cond [else 1] [#t 2]))` which produces 2
<Putonlalla> So, syntax rule literals are somehow defined and also not defined.
<samth> Putonlalla: they are recognized by their binding. So `cond` recognizes the `else` that was bound (or not) where `cond` is defined, and other bindings of `else are not the same.
<Putonlalla> If I declare `(module m racket (provide c) (define-syntax c (syntax-rules (e) ((_ e) 'yes) ((_ _) 'no))))`, then `e` is somehow implicitly exported, although I cannot refer to it without getting an `unbound identifier` error.
<samth> Putonlalla: no, e is not exported, it's unbound, and so the `c` macro recognizes an _unbound_ `e`
<Putonlalla> I see.
<samth> the traditional scheme practice of using unbound identifiers as keywords has some drawbacks, and racket has moved away from that, but `cond` is very old
<Putonlalla> It's indeed a bit strange that `else` and `=>` are free variables, especially since this problem could have been avoided with `(define else #t)` and forgetting about `=>`.
lucasta has quit [Quit: Leaving]
red-snail1 has quit [Quit: ZNC 1.8.2 - https://znc.in]
Tuplanolla has joined #racket
Oxyd has quit [Quit: WeeChat 3.8]
Oxyd has joined #racket
Everything has joined #racket
lucasta has joined #racket
Everything has quit [Quit: leaving]