This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-27
Channels
- # announcements (8)
- # babashka (11)
- # beginners (34)
- # clerk (11)
- # clj-http (2)
- # clojure (5)
- # clojure-europe (9)
- # clojure-gamedev (1)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-poland (1)
- # clojure-sweden (5)
- # clojure-uk (9)
- # clojurescript (17)
- # core-typed (12)
- # cursive (4)
- # datahike (4)
- # datalevin (2)
- # datomic (7)
- # emacs (8)
- # events (8)
- # graphql (5)
- # gratitude (1)
- # hyperfiddle (19)
- # jobs-discuss (4)
- # leiningen (4)
- # lsp (21)
- # meander (2)
- # off-topic (9)
- # play-clj (1)
- # polylith (10)
- # releases (1)
- # sci (18)
- # vim (10)
When I try this
$ bb '(.toPath (io/file "xyz"))'
#object[sun.nio.fs.UnixPath 0x5210b532 "xyz"]
in ys
(via SCI)
$ ys -Ce '(.toPath (io/file "xyz"))'
Error: Method toPath on class java.io.File not allowed!
from: https://github.com/babashka/sci/blob/bf6a0f1e00313a902c62c59e440266612725b926/src/sci/impl/evaluator.cljc#L152-L154
How do I config to allow these method calls?I'm getting
$ YS -e 'clj/for [i (range 1 6)]: println(i)' -p
Error: Method nth on class clojure.lang.LongRange$LongChunk not allowed!
where clj/for
is interned macro from clojure.core/for
clojure.lang.LongRange$LongChunk nth is defined here clojure.lang.LongRange$LongChunk
Is this because the class is private?
Is there a possible workaround?(I'm trying to expose a ys.std/for
that is an interned clojure.core/doseq
and a clj/for
that is an interned clojure.core/for
)
I don't know anything about YS, please submit a SCI-alone fully standalone and minimal repro
(I'm trying to expose a ys.std/for
that is an interned clojure.core/doseq
and a clj/for
that is an interned clojure.core/for
)
I wasn't aware. Looking now.
This one?:
$ bb -e "(resolve 'for)"
#'clojure.core/for
> Ingy döt Net [4:11 PM]
> (I'm trying to expose a ys.std/for
that is an interned clojure.core/doseq
> and a clj/for
that is an interned clojure.core/for
)
If for
is built into sci, I'm pretty sure that's what I'm using...
https://github.com/yaml/yamlscript/blob/main/core/src/yamlscript/runtime.clj#L80 I can make a standalone sci repro if you'd like...
It's from this rabbithole with @U0HG4EHMH https://clojurians.slack.com/archives/C05HQFMTURF/p1716808881911529?thread_ts=1716133577.435449&cid=C05HQFMTURF It's not important because I think @U0HG4EHMH is talking me out of it. But I'd be interested to know what's happening so I'll post it later, maybe. Thanks...