Short video intro into my guile scheme project hatis (Hackable text input system). Currently in very early pre-pre-pre alpha dev/research stage
https://youtu.be/Yq88C7y5goM
#wayland #guile #guix #hatis #text
@4c603b88@c39d2605@462ebf4c@338f82ef probably the answer given was toatally correct. set! and stuff will work in repl, but won't when launched in the testing env that I just set up.
@4c603b88@c39d2605@462ebf4c@338f82ef
it won't update setted variable's value in all procedures of `(X)` that uses `x`. `(define (square r pi) (* r r pi))` <-- here pi will stay 3.14 when `square` will be called from `(Y)`
@4c603b88@c39d2605@462ebf4c@338f82ef probably the answer given was toatally correct. set! and stuff will work in repl, but won't when launched in the testing env that I just set up.
@4c603b88@c39d2605@462ebf4c@338f82ef
it won't update setted variable's value in all procedures of `(X)` that uses `x`. `(define (square r pi) (* r r pi))` <-- here pi will stay 3.14 when `square` will be called from `(Y)`
@338f82ef@c39d2605@4c603b88@462ebf4c
I'm not sure about this formulation. I want to update `x` from `(X)` "globally": in a way that everything from `(X)` that'd have `x` referenced would also update it to the new value.
Question for #scheme ☯️ kings & queens 👑 ! Are there an alternative to clojure's alter-var-root https://clojuredocs.org/clojure.core/with-redefs in scheme?
Imagine I have a module `(X)` with `(define a 1) (define-public (f x) (+ x a))` and module `(Y)` that has `#:use-module (X)`. In `(Y)` want to alter a from `(X)` in a way that would also affect `f`. Example: (being in module `(Y)`): `(alter! a 2) (equal? (f 3) 5) => #t`
CC @c39d2605@4c603b88@462ebf4c
@c39d2605@4c603b88@462ebf4c@338f82ef
Imagine that you have a module already written by someone that does the job you want to, but there is only one variable (example `(define pi 3.14)` ) that you want just override but otherwise would like everything to work as previously. Wouldn't like to copy-paste a one of code
Notes by Grigory Shepelev | export