Fork me on GitHub

Anyone know of a tool like is for .NET, but for the JVM and/or Clojure?


Any editor with Clojure support is basically a linqpad :)

👍 1

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


a separate project with REBL or reveal or clerk sounds like what you are describing


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


@U013YN3T4DA I have that kind of project too but I don't agree that it is better, since it isn't portable. What @U04V15CAJ described with babashka comes the closest.


conjure (vim plugin) starts bb automatically when in clojure mode so you can start evaluating expressions

🎉 1

in 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.


I guess maybe it's more GUI oriented than some of the Clojure tooling?


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.

☝️ 1

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: 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:


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.


The downside to that is user friendlyness I guess.


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:


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


Good to know, thanks


Just stumbled upon this and... wow. I can't even imagine how to approach such a problem.

😲 2
rich 1

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

😄 5

This developer have a huge amount of quines in Ruby... He have one that plays tic-tac-toe, one that's a spinning globe, one that spits another language that spits another until it goes back to the first...