
@mflatt: Regarding find-relative-path
: In macOS, the file system (HFS+) is case-insentive, the same as in Windows (NTFS). So wouldn’t your proposed change affect macOS as well?

@leafac No, the change is in terms of normal-case-path
, which is a no-op on Unix and Mac OS. Windows is different, because case-insensitive paths are a property of the OS, and not (just) a property of some filesystems

@mflatt: :+1: Got it. Thank you for the explanation.

I can’t figure out how to properly set the 'inferred-name
syntax property so that syntax-local-name
will recognize it. I tried this simple program, but it produces #f
: #lang racket
(require syntax/parse/define)
(define-syntax-parser with-inferred-name
[(_ e:expr)
(syntax-property #'e 'inferred-name 'custom-inferred)])
(define-syntax-parser inferred-name
[(_)
#`'#,(syntax-local-name)])
(with-inferred-name (inferred-name)) ; => #f
Does anyone know how this is supposed to work? @mflatt?

@lexi.lambda syntax-local-name
won’t recognize it; see syntax-local-infer-name

@mflatt: Interesting. I was looking at that at first, but then I noticed the docs claim syntax-local-name
will, too, and I thought maybe syntax-local-infer-name
was an older mechanism. http://docs.racket-lang.org/reference/syntax-model.html#%28part._infernames%29

That is, I thought the property-handling was added to syntax-local-name
after syntax-local-infer-name
was written. But it seems like maybe syntax-local-name
doesn’t handle properties, or at least it doesn’t now?

Can you point me more specifically to the wrong docs? The job of syntax-local-name
is to report a binding that surrounds the expression that a macro sees, while 'inferred-name
is attached to an expression that a macro sees directly; the syntax-local-infer-name
function combines syntax-local-name
(from surrounding an expression) with 'inferred-name
(on an expression).

If you look at the docs for syntax-local-name
, it links to the section named “Inferred Value Names”: http://docs.racket-lang.org/reference/stxtrans.html#%28def._%28%28quote._~23~25kernel%29._syntax-local-name%29%29 The bottom of the Inferred Value Names section discusses the inspection of 'inferred-name
properties: http://docs.racket-lang.org/reference/syntax-model.html#%28part._infernames%29

Got it - thanks

Peeking at the git blame, it seems like that comment has been in there for a rather long time—over 10 years. Is it safe to say the docs are just wrong, then?

Looks like it’s been that way since it was written in 2007: https://github.com/racket/racket/commit/cbf1d0752ced90216b11d789da4cda05d86a2e7a

Yes, the end of that last sentence “Inferred and property-assigned names are also available to syntax transformers, via syntax-local-name
.” is wrong

Alright, thanks; I’ll switch to expanding to a let
to set the inferred name.

@lexi.lambda I think I must misunderstand the issue; why not switch to syntax-local-infer-name
?

@mflatt: Because I’m not writing a macro that infers names, I’m writing a macro that sets the inferred name, and I want it to work with things like procedures.

The compiler effectively uses syntax-local-infer-name
to name procedures; that part of the docs is right

#lang racket
(require syntax/parse/define)
(define-syntax-parser with-inferred-name
[(_ e:expr)
(syntax-property #'e 'inferred-name 'custom-inferred)])
(with-inferred-name (lambda (x) x)) ; => <procedure:custom-inferred>

@mflatt: Gotcha. I might as well use a let
, anyway, though, since I can, and that will support syntax-local-name
as well as syntax-local-infer-name
.

is there a “best practice” for operating racket with collects directories in source control? like where you could switch branches and therefore use a different collects directory, but hopefully avoid all the ‘raco pkg’ calls to switch to that different dirctory?

@danl-ndi I recommend setting the PLTADDONDIR
environment variable

or maybe PLTCOLLECTS
in your case

PLTADDONDIR doesn’t seem to work… and setting PLTCOLLECTS removes the standard distro directories

specifically… setting PLTADDONDIR doesn’t seem to change any behavior

how do you handle switching branches? raco pkg setup?

@danl-ndi Include an empty path in PLTCOLLECTS
to splice the default path at that point

urg. my kingom for a single ";"

:sweat_smile:

but I’m still confused as to why -S <dir> doesn’t work?

oh,just saw the mailing list post

Concept: conflicting demands for medical resources among patients will be resolved by single combat duels. Each patient will designate a POP-PL battlebot. A winner-take-all to-the-death battlebot tournament will determine the allocation of resources.