This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-19
Channels
- # aleph (5)
- # announcements (1)
- # babashka (5)
- # beginners (123)
- # biff (9)
- # calva (8)
- # cider (1)
- # clj-on-windows (8)
- # clojure (20)
- # clojure-europe (7)
- # clojure-hungary (3)
- # clojure-norway (1)
- # clojure-sweden (32)
- # clojurescript (2)
- # core-async (2)
- # emacs (6)
- # events (3)
- # fulcro (30)
- # graphql (4)
- # gratitude (3)
- # helix (10)
- # honeysql (7)
- # introduce-yourself (11)
- # kaocha (1)
- # malli (16)
- # matcher-combinators (1)
- # off-topic (7)
- # portal (1)
- # re-frame (12)
- # reagent (3)
- # ring (7)
- # scittle (3)
- # shadow-cljs (1)
- # sql (1)
- # tools-deps (8)
Is there a pattern, framework or approach to building https://spring.io/projects/spring-webflow like flows to complete multi step business tasks in a Ring or Pedestal world. I’m working on an approach that stores a state machine in the session and calls handlers depending on events and state. I’m confident it will work fine but I’d really like to know if there are already any good ways to do this in the Clojure ecosystem.
If I am looking for a clojure editor that RUNS IN THE BROWSER, is the state of the art https://github.com/nextjournal/clojure-mode ? There's also https://calva.io/ but I'm not sure if that runs in the browser. I.e. vscode runs in the browser: https://vscode.dev/ but when I try to load the calva extension from http://vscode.dev, I get the warning of: > The 'Calva: Clojure & ClojureScript Interactive Programming' extension is not available in Visual Studio Code for the Web Back to original question. Conditioned on RUNNING IN BROWSER, is the current best clojure ide nextjournal-codemirror-clojure-mode ? (Say we really care about things like structural editing / par-edit / refactorings.)
Calva website mentions this thing: https://gitpod.io/#https://github.com/PEZ/get-started-with-clojure
Here's the page where it's mentioned: https://calva.io/get-started-with-clojure/
that ^^ is basically Calva and VS Code running in the browser via gitpod
Is gitpod open source? Is it truly running in the browser, or is there a server part, and the frontend is basically a "vnc / x-forwarding", except for VSCode DOM elements ?
Calva runs on Gitpod and on GitHub codespaces. Both run VS Code in the web browser, no VNC or such. Both need a server part/container, but it’s cloud stuff, so you just need a browser. We haven’t made Calva work on VS Code Web, yet, because lot of work and there’s only recently we could even run Clojure that way.
VNC can run there, though, as is demoed hacking on a Java GUI app here: https://youtu.be/oXU17qZjtWM
If you have the ability to host your own environment (e.g. k8s, ec2, cloud-hosted machine), you might also look at the stuff from https://coder.com/ (notably code-server, which serves an oss vscode in the browser) to get a bit more customized beyond the level of what gitpod offers
I'm re-reading https://clojure.org/guides/deps_and_cli - I see it suggests "io.github.yourname/time-lib" would resolve to http://github.com/yourname/time-lib.git - being a little curious, I followed the link and found out while the repo doesn't exist, "yourname" is a valid github user - is it owned by the clojure team or someone here? Otherwise, if someone eventually added a repo there, could that be a problem? if someone ran the guide commands literally, would it pull the hosted (potentially dangerous) code? I was thinking it might be nice if the guide actually linked to a real sample deps installable lib (perhaps the referenced "time-lib" toy library) - edit: follow up Q - is "io.github" a custom resolver for deps? Is there a way to list/view all such resolvers? I assume if I wrote "io.ahungry.foo/bar", it would not auto resolve to "http://ahungry.com/foo/bar.git" ?
Probably would be better if it wasn’t an actual name. The resolvers are hard coded and doc’ed in the reference see https://clojure.org/reference/deps_and_cli#_git
What's a good CLJS library for displaying a file/directory tree. I'm looking for something where directories can either be expanded or not expanded, (i.e. + or -), and files are leafs -- like the way IDEs typically display a directory to the left of the editor pane.
if there isn't a cljs lib I would look for a JS lib, the host platform ecosystems usually have what you need
Is there a way to use maps/structures containing lazy infinite sequence in the REPL? When I try it throws an error after trying to print it all
I'm using nREPL with Calva if that helps
things like
(set! *print-length* 20)
(set! *print-level* 5)
will help@U24MDANHY https://github.com/jpmonettas/flow-storm-debugger has a feature for this, called the value inspector. So if you have the debugger open you can use like (tap> {:n 5 :r (range)}
or (reduce + (take 10 #tap (range)))
and then use the value inspector to recursively inspect the structures, doesn't matter if they contain infinite sub structures