This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # aws (11)
- # babashka (11)
- # beginners (22)
- # calva (28)
- # cider (1)
- # clj-kondo (3)
- # clojars (14)
- # clojure (41)
- # clojure-europe (45)
- # clojure-norway (1)
- # clojure-uk (2)
- # clojured (31)
- # clojureindia (4)
- # cursive (5)
- # datahike (15)
- # datomic (11)
- # deps-new (11)
- # events (1)
- # holy-lambda (19)
- # introduce-yourself (1)
- # minecraft (17)
- # music (1)
- # nbb (3)
- # off-topic (37)
- # reagent (6)
- # reveal (3)
- # shadow-cljs (46)
- # tools-deps (8)
- # xtdb (22)
Anyone know of a tool like https://www.linqpad.net/ is for .NET, but for the JVM and/or Clojure?
For me it is nice to have a separate app for it to not pollute my main coding environment. Each script can have its own set of dependencies, and you aren't just spitting things out on a console. (I know there are visualization tools for Clojure, but Linqpad has it all integrated and easily accessible.)
For babashka you have
babashka.deps/add-deps so you can add the dependencies to your script.
For clojure JVM, you might be able to use the add-lib branch of tools deps
Yeah, I use LINQPAD daily for .NET stuff, but for clojure I just having a project I've called messing. With a bunch of random scratch1.clj, scratch2.clj etc, and that hooked up to the repl is way better than anything LINQPAD comes close to
I've used Linqpad when I was a .NET developer and it was useful, but imo a REPL is the equivalent experience and doesn't require a special tool. It's easy enough to add some deps to a deps.edn and spin it up
in my C# days I loved LINQPAD so you could code little prototypes without making a new huge C# project. With Clojure that need is almost non-existent because of the repl
> you aren't just spitting things out on a console. You should have it setup where you jsut get results inline with the code as you are evaluating into the repl
I’m also a huge fan of a classpath root that is gitignored so you can keep one-off dev stuff locally. And you can keep an alias in your user deps.edn that has helpful stuff so you can stay in one jvm while not risking adding deps to your project
conjure (vim plugin) starts bb automatically when in clojure mode so you can start evaluating expressions
in http://repl.it you may also be able to do stuff easily and even share it with others
I think its kind of different though, because in LINQPad there is a dedicated dump area, and it runs locally. Here is an example of something I made quickly in LINQPad for work. So people run the script, then they get kind of a little tool:
So I think what you guys have talked about largely fulfills the role of local playgrounds, and those are useful, but that doesn't encompass everything that LINQPad is.
Does it share scripts automatically with others? So like you get to instantly open other people's playgrounds?
But looking at the code, it looks like you had to use a GUI toolkit explicitly? Wouldn't just normal Clojure+Seesaw for example be good enough?
Or like others have said, if you want the GUI to be automatic, using Portal for example can give you that. Easy visualisation of a DB query result set for example.
And then you can just have a single git repo called team-scripts and for each scripts just make a folder add a deps.edn and a single clojure file.
Also, maybe you don't know, but some IDE have that built-in. For example in Cider Emacs, you can just M-x cider-inspect on a resultset from a DB query and it pop ups the results in Emacs and you can navigate through them.
If you're interested though, check out: https://vlaaad.github.io/reveal/ https://github.com/djblue/portal https://docs.datomic.com/cloud/other-tools/REBL.html They're all for data visualization and navigation though, so they don't have a code editor built-in, it's meant you use your preferred code editor for that and they just complement it with data navigation and visualization. Also some of the data-science stuff can be nice for graph visualization like: https://github.com/metasoarous/oz https://scicloj.github.io/clay/
Yea there are social features, like uploading your file and getting a link that you can send to others. And yea it is also more GUI oriented. What works about it is there is a dedicated area where you expect to see output. With Clojure, what would it be? Run this script, and look for random windows to pop up, something to be spit out in a console for this script, etc? It wouldn't be as easily digestible.
The social/gui oriented aspect sounds nice, I don't know about the "expected output tab". If a window pop, it's pretty obvious, it would take like one second for someone to figure out that the output pop ups in a window, or displays at a URL in your browser.
Right I've seen some of those, but I think those are kind of things that would be nice to have built in to an app, but they aren't really apps/sharing platforms themselves
The counterpoint, is that those tools (like linqpad) are restrictive "all-in-one". Where as if you leverage REPL friendly libraries, they can combine and play nice with one another, and you can build above and beyond whatever you want, as well as conveniently use your own editor of choice.
Yea for the expected output tab, it is hard to explain why but I think it makes a big difference. Maybe it is that there will be a commonly agreed on way to do things, not just starting all kinds of arbitrary processes, web browsers, etc.
Some of the libraries are also accessible outside of the program, so you can add a dependency on it and use some features of it. You can also call it from the command line on a schedule, for example.
You should give Reveal a try. It's the closest it seems to Linqpad. You can also extend it with your own actions, renders and even full on views with custom GUI, see: https://vlaaad.github.io/reveal/extend
The only difference is that there's no built in editor/project management, that relies on your own editor.
I've been using Portal personally, cause I prefer how browser UIs have all the features browsers add like forward/back, proper zoom/scaling. But I'm not sure it can be customized with custom UX
If you use VSCode as well, Portal can be integrated as a tab inside VSCode, so that could be closer to linqpad
Just stumbled upon this and... wow. I can't even imagine how to approach such a problem. https://github.com/mame/radiation-hardened-quine
I think steps 1..n-1 go something like embed a minikanren and define read-stringo and evalo and all the rest, then step n is ask for all the quines, and n+1 is prepare your strangeloop talk