This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-29
Channels
- # announcements (17)
- # aws (12)
- # babashka (27)
- # beginners (85)
- # bristol-clojurians (1)
- # calva (16)
- # cider (3)
- # clara (7)
- # clojure (80)
- # clojure-europe (13)
- # clojure-italy (19)
- # clojure-nl (2)
- # clojure-norway (6)
- # clojure-poland (1)
- # clojure-spec (31)
- # clojure-uk (61)
- # clojurescript (29)
- # core-async (10)
- # cursive (7)
- # data-science (1)
- # datomic (29)
- # docker (3)
- # fulcro (120)
- # graphql (16)
- # hugsql (2)
- # leiningen (17)
- # luminus (2)
- # off-topic (36)
- # other-languages (3)
- # pathom (13)
- # re-frame (12)
- # ring (2)
- # rum (1)
- # shadow-cljs (126)
- # tools-deps (56)
- # vscode (5)
Hi, I had a weird behavior when I was playing with the repl (I just installed babashka, and the repl was the first thing I tried). I explain: I was evaluating some commands in the repl and everything was working fine, until I tried to review the last command that in the history (I didn’t know that history was not supported, at least it’s not working for me), when I checked the command (I just pressed the up key) this ^[[A was the expression that appeard and without noticed I evaluated it 😅, this error showed up Could not resolve symbol: [at line 1, column 1]
, every was fine until here, the problem was when I tried to eval another expression and nothing happened, I think it can be an error parsing that weird character because when I entered a an invalid closing parenthesis it gave me this error Unmatched delimiter: ), expected: ] to match [ at [9 2] [at line 11, column 1]
and after that everything worked fine, It seems like a problem
@raydelalonsobaryolo this is not about what you reported, but if rlwrap is available on your system, i think that can provide history functionality, i.e. rlwrap bb
but still I think that bb has kind of a problem as explained before, maybe i´m doing something wrong 😅 (i just installed it 😁)
@raydelalonsobaryolo borkdude may be around in a bit and might have something more directly relevant to your report
A bit of a general question. If I wanted to calculate an exponent in Clojure or ClojureScript, I can use interop with Java or JS via (Math/pow base exponent)
What's an appropriate way to have access to an exponent function in sci?
For sci you should add the java.lang.Math
class to :classes
(assuming you're using the JVM version) and if you're using GraalVM, you should also add that class to the reflection config
@raydelalonsobaryolo Isn't this the same you get with clojure
?
$ clojure
Clojure 1.10.1
user=> ^[[A
Syntax error reading source at (REPL:1:1).
EOF while reading
FYI @borkdude, my asynchronous js code now works with the npm update 🙂 Thanks!
however if after that I eval and invalid closing parentheses I get this error Unmatched delimiter: ), expected: ] to match [ at [1 2] [at line 3, column 1]
, and then everything works fine again
it seems this is exactly the same behavior of
$ clojure -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.597"}}}' -m cljs.main -re node
ClojureScript 1.10.597
cljs.user=> ^[[A
WARNING: Use of undeclared Var cljs.user/ at line 1 <cljs repl>
Execution error (SyntaxError) at (<cljs repl>:1).
Invalid or unexpected token
(node:60990) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
1
2
3
)
Syntax error reading source at (REPL:1).
<NO_SOURCE_FILE> [line 5, col 2] Unmatched delimiter ).
also of the clojure REPL. Only the error message differs a bit, but I don't see how bb is much different there?
Oh, I see, it’s the same behavior, maybe I was confused because when I run clojure
and I reproduce that, the prompt doesn’t showed up again
by the way, great tool, really fun and really fast, I would like to contribute in the future :thumbsup:
babashka v0.0.67: adds clojure.test and more https://github.com/borkdude/babashka/releases/tag/v0.0.67
I've also tested this example from clojuredocs: https://clojuredocs.org/clojure.test/assert-expr