This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-23
Channels
- # announcements (2)
- # atom-editor (3)
- # babashka (49)
- # beginners (100)
- # biff (9)
- # calva (78)
- # clj-kondo (18)
- # clojure (143)
- # clojure-europe (13)
- # clojure-germany (1)
- # clojure-nl (2)
- # clojure-spec (5)
- # clojure-sweden (2)
- # clojure-uk (4)
- # clojurescript (58)
- # conjure (1)
- # cursive (4)
- # datascript (11)
- # datomic (63)
- # docker (7)
- # emacs (18)
- # events (1)
- # fulcro (18)
- # graalvm (5)
- # helix (4)
- # improve-getting-started (13)
- # jobs (4)
- # jobs-discuss (3)
- # lsp (15)
- # malli (90)
- # membrane (14)
- # off-topic (12)
- # other-languages (5)
- # pedestal (7)
- # polylith (53)
- # re-frame (15)
- # reitit (23)
- # releases (4)
- # remote-jobs (9)
- # ring (11)
- # shadow-cljs (90)
- # specter (2)
- # testing (3)
- # tools-build (63)
- # vim (2)
- # xtdb (8)
@U02JTH42R7A I am assuming you are using Calva, are you?
to be more specific I have a file with this simple code
(defn lights [n]
(let [exp (reduce *' (repeat n 2N))]
(long (mod (dec exp) 1e5))))
and when I jack-in and load the file it tells me that *'
can't be found
I had similar issues with biginteger
type coercion.
They both are in clojure.core
but it's like it can't find themHmmm, I tried to reproduce this, but I didn't get that error. The function is defined and works. I tried it in Clojure. Is this Clojure or ClojureScript?
I saved the file, started up bb
REPL to jack-in to and tried to load the file with calva, and the error popped up
what could it be that fails to load only some definitions in the clojure.core... doesn't make much sense
you mentioned clojurescript... I actually didn't specify it in any other way, but I wrote a .clj file, so I assume it's standard clojure
It works when I use babashka... Hmmm. Can you describe the steps you take in more detail?
I opened an empty folder project and created a clojure file inside.
I open the command menu and choose
Calva: Start or Connect to a clojure REPL
then
Start your project with a REPL and connect (a.k.a. jack-in)
then I'm offered with a choice of repl
babashka
or bb
And I chose bb
FYI. Babashka is a special version of Clojure. It is remarkably like Clojure, but there are also some differences. I am super happy you can use it to explore Clojure in the editor.
I didn't realise... why does I only get those choices, and not a standard clojure nRepl?
There are some more quick REPLs like that in Calva. You reach them differently, which might be confusing (note to self: figure out how to ease this confusion). Anyway you find them searching for "fire up” in the command palette.
Well, it only shows what you will see if bring up the command palette in vscode and type ”fire up”. 😃
No, I've been through the welcome stuff, but I think it's misleading... I was lead to think that the "fire up" command is only to run the "introductory exploratory sessions"
I'll use your questions to aid me in designing some better support for what you are needing right now.
Just pointing that out to improve the beginner's experience here... maybe it would be better to have a way to not "fire up" the files if you tell it so
VS Code is a bit peculiar with when there is no folder open. There's no way to create the folder an open it via the API, so the fire-up folders are created in a /tmp folder where they are not very accessible... But nothing stops us from also allowing them to be created in a folder that the user does have open. Maybe we should do that. And add a way to create an empty project that way as well.
Hmm. That works for me too. I really don't understand what goes wrong on your machine. What OS are you using? Which version of bb
?
For me switching to non-babashka repl worked fine, I simply expect the clojure.core missing some implementation?
> why does I only get those choices, and not a standard clojure nRepl? This is because Calva does not detect a project file associated with a specific CLI tool, like Leiningen (project.clj), or the Clojure CLI (deps.edn). If you add a deps.edn file, for example, and place an empty map in it (`{}` - which avoids an error during the jack-in process), then you’ll see an option to start a deps.edn repl when you run the commands you mentioned above to start a repl. This is beyond the “getting started” and standalone REPLs, however, but is the more “standard” way to work on a Clojure project, even if it’s just a small project with a file or two for testing things out. I just wanted to add that info here in case it helps.
FYI, there is a new https://clojurians.slack.com/archives/CPABC1H61/p1645624599312619 release 🎉
And a new Calva release, https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.245: • https://github.com/BetterThanTomorrow/calva/issues/1542 • https://github.com/BetterThanTomorrow/calva/issues/1554 (disabled) • https://github.com/BetterThanTomorrow/calva/issues/1536 • Fix: https://github.com/BetterThanTomorrow/calva/issues/1539 • Fix: https://github.com/BetterThanTomorrow/calva/issues/1556 Thanks @corasaurus-hex for the lint config update and major cleanup! Thanks @domagala.lukas for the improvement of our dev CI pipeline! ❤️
Awesome! You guys pushed out the fix for https://github.com/BetterThanTomorrow/calva/issues/1539 so quickly, can’t believe it
Thanks, @U02RXJVMKNE! I wonder about my solution a bit. Seems like a very roundabout way. But whatever works, works, I guess. 😃 And it isn't like I can see an alternative route.
The VS Code API make it a bit difficult to give clearer indication about ongoing evaluations. Please help with upvoting this issue: https://github.com/microsoft/vscode/issues/143774
Would it be possible to have the green highlighting stay on forms that haven't been changed at all ? e.g. Say I have these silly functions, and I evaluate them all in:
Then I go and edit bar
, I lose the green highlighting on foo and quax... I expect it would be REALLY hard for Calva to know that foo
and quax
haven't changed, so leave the highlighting on them ? Or maybe a gutter icon, basically something to let you see at a glance if something is the same as is currentl evaluated into the repl ?
yeah those decorations are hard to make sticky, since you define them on certain lines/columns. So tracking where a form moved and if it’s the same is kinda complicated 😅
CIDER keeps the user informed about wether something top-level is evaluated or not. Using the gutter to indicate it. We can check how it's done. As for retaining the decorations, I’ve tried, but it got very messy an and I ended up with the current scheme.
@pez are you still seeing eslint errors you shouldn't be?
which OS are you using?
I'm curious if it's different file path handling or something
I had a directory src/cursor-doc/out
(no idea when it was created, or why, there was even a node_modules
there) that was causing most of the noice. Removing that and adding /site
to .eslintignore
fixed it for me.
oh that's odd, glad it's all sorted at least 💜
Now remember why I had this. Some years ago I made branch of Calva where the clojure-doc/mirror stuff was published and consumed as an npm library. https://www.npmjs.com/package/calva-clojure-cursor-doc
Just a reminder that the State of Clojure 2022 survey https://www.surveymonkey.com/r/clojure2022 is open and to make sure you register your use of Calva (Question #20) - I'm kind of surprised how low it is at the moment!
We are still early in the sampling so make your usage known!
According to the usage stats that Calva collects we have almost doubled since last year in daily usage.
We don't really know from that, though, since only users allowing telemetry are counted. But hard to see how real usage could have decreased...
Yeah, I’d have guessed Calva to be the fastest “gainer” since it’s the easiest beginner IDE. Would be interesting to compare “clojure experience time” to IDE usage
yep, we will be doing some of that stuff for analysis.
actually, I may need to apologize on my initial comment - I believe I had a filter enabled on one or both of the 2021/2022 results when I got that impression which made it an incorrect comparison. I do see a ~5% increase in total share this year for Calva (so far)
Ah, that's more in line with what I think I see out there. 1/6-1/5 use Calva. We appreciate that you reached out! ❤️