如何将 Clojure REPL 添加到现有 .NET 应用程序?
如何将交互式 Clojure REPL 添加到现有 .NET 应用程序,以便将其用作实时调试辅助工具? (理想情况下,这将是一个 C# REPL,但这些都有些偏离(也许是 .NET 5.0?)我最后听到的: http://channel9.msdn.com/blogs/pdc2008/tl16)
我知道有 GitHub 上的 Clojure-CLR 项目,但我想知道是否有人已经提出了将 Clojure-CLR REPL 集成到现有应用程序中的指南或简单库?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道 Clojure CLR 与常规 Clojure 有什么不同,所以这可能没有帮助,但您应该看看这些 REPL 的实现:
我很容易地将 Enclojure REPL 集成到 Redcar Editor 中,所以如果您将 Enclojure 移植到 Clojure CLR,这可能是您的一个选择?有关 Enclojure REPL 的代码非常简洁,因此我认为这不会是一项巨大的工作。
如果您不寻找任何花哨的东西,您始终可以使用 load-string 函数推出您自己的 REPL。
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.
如果我正确理解你的问题,你会想要一个 C# REPL,但如果失败了,你正在寻找任何类型的基于 .NET 的 REPL,而 Clojure 似乎是一种可能性,因为它已经有一个 REPL,并且有一个 .NET 端口Clojure 的。
如果是这样,您可能会考虑集成 F# REPL、F# Interactive。其一,它已经集成到开源 MonoDevelop IDE 中,因此源码可供参考。
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.
我最终的解决方案是采用 IronPython。正如 Joel 正确指出的那样,我与 Clojure 并没有特别的联系(我的问题不恰当),任何支持交互式开发的语言都可以。
查找任何 .NET 语言的 eval 函数
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