cfg_bind() binds a term argument's internal handle, so cfg_bind("x", parse_term("2")) binds x = 9
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 67/100
Línea de trabajo
Start at the R cfg_bind() wrapper described in the issue and trace its .Call() into the Rust binding implementation. Check how the wrapper handles rssn_term values and vectors of length greater than one; use the examples in the issue to verify the behavior. Done means invalid inputs are rejected or terms bind to their evaluated values, with tests covering the reported cases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
cfg_bind() accepts an rssn_term and silently binds the symbol to the term's internal integer handle instead of its value, so cfg_bind("x", parse_term("2")) binds x = 9 (the handle), not x = 2.
library(rssn)
s <- rssn_session()
t <- parse_term("2", s)
unclass(t) # 9 (the term handle)
cfg <- rssn_config() |> cfg_numeric(1e-12) |> cfg_bind("x", t)
compute(parse_term("x", s), cfg, s)$value # 9 -- should be 2
compute(parse_term("x + 1", s), cfg, s)$value # 10 -- should be 3
cfg_bind() is function(config, symbol, value) .Call(..., as.character(symbol), as.numeric(value)). An rssn_term is an integer with a class, so as.numeric() strips the class and returns the handle. A different term therefore binds a different number unrelated to its text:
t2 <- parse_term("100", s)
cfg2 <- rssn_config() |> cfg_numeric(1e-12) |> cfg_bind("x", t2)
compute(parse_term("x", s), cfg2, s)$value # 15 (handle of "100"), not 100
The help page says value is "The number a symbol is bound to", so either a non-numeric argument should be rejected (as it already is for a value_new() object, which fails with cannot coerce type 'environment') or a term should be evaluated first. A length-2 vector is likewise silently truncated (cfg_bind("x", c(1, 2)) binds x = 1), so the argument is not validated at all.
rssn 0.3.0, R 4.6.2 binding, Windows x86_64.
- Lenguaje dominante
- Rust
- Estrellas
- 36
- Forks
- 3
- Merge medio
- 14 h 51 min
- PR fusionados (30 d)
- 29
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Apich-Organization/rssn
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothAbiertoarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Apich-Organization/rssn#383 ·
Los mantenedores suelen responder en 1 día
-
area/numerical good first issue help wanted kind/doc-mismatch severity/5-trivial
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Apich-Organization/rssn#373 ·
Los mantenedores suelen responder en 1 día
-
area/numerical good first issue help wanted kind/doc-mismatch severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Apich-Organization/rssn#371 ·
Los mantenedores suelen responder en 1 día
-
json_encode() re-emits a decoded empty JSON object as [], so {} and {"":1} are not round-trip stableAbiertoarea/api-bindings good first issue help wanted kind/contract severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Apich-Organization/rssn#361 ·
Los mantenedores suelen responder en 1 día
-
area/statistics good first issue help wanted kind/wrong-result severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Apich-Organization/rssn#362 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Apich-Organization/rssn
Issues similares
-
triage: failed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
oxc-project/tsrs#1277 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
autofixer: follow-up triage: bug triage: classified triage: correctness triage: has-reproducer
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
tursodatabase/turso#13221 ·
Los mantenedores suelen responder en 1 día
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648Posiblemente ocupada @flyingrobots la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
flyingrobots/edict#457 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100