简体   繁体   English

在日食中运行clojure(逆时针)

[英]running clojure in eclipse (counterclockwise)

I'm learning clojure on eclipse (counterclockwise plugin). 我正在学习日食(逆时针插件)。

  • When I click "run" in eclipse (as I would do with Java) I get not only the console opened but this "REPL" window. 当我在eclipse中单击“run”时(就像我使用Java一样),我不仅打开了控制台,而且打开了这个“REPL”窗口。 Why is it necessary and what does it do? 为什么它是必要的,它做了什么?
  • When I click "run" it takes quite a few seconds to launch the app. 当我点击“运行”时,启动应用程序需要几秒钟。 Is there a way to make it faster? 有没有办法让它更快?
  • When I need to edit the code and relaunch (run) the the app I'm getting this message: "The selection cannot be launched, and there are no recent launches". 当我需要编辑代码并重新启动(运行)应用程序时,我收到此消息:“无法启动选择,并且最近没有启动”。 What is that and why wouldn't it let me relaunch my code? 这是什么,为什么不让我重新启动我的代码? If I wait a while I can launch it again. 如果我等一会儿,我可以再次启动它。

This is simple bit of code that I'm trying to run: 这是我正在尝试运行的简单代码:

(ns ClojureTest.core)

(let [input (read-line)]
  (if (= "x" input)
    (do
      (println "Exit")
      (System/exit 0)
    )
    (do
      (println input)
      (recur)
    )
  )
)

UPDATE: I managed to screw it up even further. 更新:我设法进一步搞砸了。 Now when I click "Run" the console ignores any input as if the application wasn't even running... 现在,当我单击“运行”时,控制台会忽略任何输入,就像应用程序甚至没有运行一样...

UPDATE2 I've restarted eclipse and the previous problem was solved. UPDATE2我重启了eclipse,之前的问题解决了。 Now I can run the app in the console again. 现在我可以再次在控制台中运行该应用程序。 I have no idea what happened. 我不知道发生了什么。 The only difference I can see is that when I messed it up - the REPL window title looked like this: 我能看到的唯一区别是,当我搞砸了它时 - REPL窗口标题看起来像这样:

REPL @ nrepl://127.0.0.1:60429 (user)

And after restarting eclipse it came back to this: 重新启动eclipse之后又回到了这个:

REPL @ nrepl://127.0.0.1:60001 (ClojureTest.core)

I have no idea what this means. 我不知道这是什么意思。

You only need one open REPL per project. 每个项目只需要一个打开的REPL。 Once opened, you can evaluate changed code from an existing file (namespace), by choosing so from the Clojure menu. 打开后,您可以从Clojure菜单中选择,从现有文件(命名空间)中评估更改的代码。 The selection or entire file, depending on what you choose, is then sent to the REPL for evaluation. 根据您的选择,选择或整个文件将被发送到REPL进行评估。 You can try out your changes immediately by calling functions from the REPL. 您可以通过调用REPL中的函数立即尝试更改。 This is called interactive development. 这称为交互式开发。 There is no need to recompile your entire project, before you can try out changes. 在尝试更改之前,无需重新编译整个项目。

The developers of CCW just chose the action for the Run button to be 'open a REPL for the existing project'. CCW的开发人员只是选择Run按钮的操作为“打开现有项目的REPL”。 Use it only once and don't keep pressing it, while developing. 在开发过程中,只使用一次并且不要持续按压它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用CounterClockwise和Eclipse评估Clojure REPL - Evaluation in Clojure REPL with CounterClockwise and Eclipse 如何在带有逆时针方向的Eclipse中使用已编译的Clojure类 - How to use a compiled Clojure class in Eclipse with Counterclockwise 如何在Eclipse / CounterClockWise中重新格式化/重新生成Clojure代码? - How to reformat/reindent Clojure code in Eclipse/CounterClockWise? 无法在Eclipse逆时针Clojure插件中创建项目 - Cannot Create Project in Eclipse Counterclockwise Clojure Plugin Eclipse(逆时针)-新的Clojure项目:[Exception]无法加载模板,Leiningen - Eclipse (Counterclockwise)- New Clojure Project: [Exception] Could not load template, Leiningen 如何使用Eclipse和CounterClockwise查看Clojure函数的调用层次结构 - How to see a Clojure function's call hierarchy using Eclipse and CounterClockwise 如何使Eclipse / Counterclockwise使用Macports安装Clojure - How to make Eclipse/Counterclockwise use Macports installed Clojure Eclipse-Clojure-逆时针插件-用于评估REPL名称空间(而非文件名称空间)中选择的快捷方式 - Eclipse - Clojure - Counterclockwise plugin - shortcut for evaluating selection in REPL namespace (not file namespace) 在Eclipse中使用Breakpoint与逆时针调试器 - Using Breakpoint in Eclipse with counterclockwise debugger 在Eclipse上安装逆时针插件失败 - Installing counterclockwise plugin on eclipse fails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM