Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$bracket-apply$ of SRFI 105 not implemented #47

Open
damien-mattei opened this issue Mar 21, 2022 · 4 comments
Open

$bracket-apply$ of SRFI 105 not implemented #47

damien-mattei opened this issue Mar 21, 2022 · 4 comments

Comments

@damien-mattei
Copy link

hello,
i can not use $bracket-apply$ and find no occurence of it in the repository.I suppose it is not implemented.
In theory it should be as curly infix is included in neotreic expression incuded in sweet expressions.
Bienvenue dans DrRacket, version 7.7 [3m].
Langage: sweet-exp racket, avec débogage; limite mémoire : 128 MB.

    (define T (make-vector 5))
    '{T[3] <- 7}
    '(<- (T 3) 7)

{T[3] <- 7}
. set!: not an identifier in: (T 3)

normally this should expand like:

'{T[3] <- 7}
'(<- ($bracket-apply$ T 3) 7)

{T[3] <- 7}
7

{T[3]}
7

i suppose sweet exp transforming T[3] in T(3) and is ignoring the $bracket-apply$

Regards,
Damien

@takikawa
Copy link
Owner

This package was originally ported from the "readable" project code around 2011, so I think it predates SRFI-105.

I'm not actively maintaining the package, but would accept PRs to update it to more recent versions of the syntax.

@takikawa
Copy link
Owner

It looks like there is an older version of this bracket syntax (with bracketaccess) defined in https://github.com/takikawa/sweet-racket/blob/master/sweet-exp-lib/sweet-exp/modern.rkt but it's disabled in this package. You could try enabling it in a local copy of the package.

@damien-mattei
Copy link
Author

sorry for the late answer but i did not get any notification for your answer...
yes i will try to activate and test "bracketaccess" locally...

@damien-mattei
Copy link
Author

i read the code ,there exist a bracketaccess that should be $bracket-apply$ and there is a line :
; Configuration:
(define modern-backwards-compatible #f) ; If true, "(" triggers old reader.
(define modern-bracketaccess #f) ; If true, "f[...]" => [bracketaccess f ...]
; if not, "f[...]" => [f ...].

but there is no underlying implementation in the code using it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants