简体   繁体   中英

How to add a Clojure REPL to an existing .NET application?

How do I add an interactive Clojure REPL to an existing .NET application so I can use it as a live debugging aid? (Ideally this would be a C# REPL, but those are someway off (maybe .NET 5.0?) the last I heard: http://channel9.msdn.com/blogs/pdc2008/tl16 )

I know there is the Clojure-CLR project on GitHub, but I wonder if someone has already come up with a guide or simple library for integrating a Clojure-CLR REPL into an existing application?

I have no idea how different Clojure CLR is from regular Clojure, so this may not be helpful, but you should take a look at the implementations of these REPLs:

I integrated the Enclojure REPL into the Redcar Editor pretty easily, so this might be an option for you if you port Enclojure to Clojure CLR? The code concerning the Enclojure REPL is pretty concise, so I don't think it would be a huge effort.

If you aren't looking for anything fancy, you can always roll your own REPL using the load-string function.

If I understand your question correctly, you would like a C# REPL, but failing that you're looking for any kind of .NET-based REPL, and Clojure seems like a possibility since it already has a REPL, and there's a .NET port of Clojure.

If so, you might consider integrating the F# REPL, F# Interactive. For one, it's already been integrated into the open-source MonoDevelop IDE , so there's source code available to reference.

My eventual solution was to adopt IronPython. As Joel correctly identified I was not particularly tied to Clojure (my question was ill-posed), and any language supporting interactive development would do.

Looking for eval function in any .NET language

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM