使用Nightcode IDE与Clojure [英] Using Nightcode IDE with Clojure

查看:113
本文介绍了使用Nightcode IDE与Clojure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在我的空闲时间和乐趣学习Clojure。我安装了Leiningen,我有REPL工作在Windows命令。但我想使用IDE并下载夜间码。但我有缺乏Java经验和缺乏文档的问题。

I just started to learn Clojure in my free time and for fun. I installed Leiningen and I have the REPL working on the Windows command. But I wanted to use an IDE and downloaded Nightcode . But I am having problems with lack of Java experience and lack of documentation.

我试图阅读 Leiningen文档,但这也没有什么意义。我知道我不理解基础。当我点击在Nightcode上运行我只是得到这个结果

I tried to read Leiningen documentation but that did not make much sense either. I know I am not understanding the basics. When I click run on Nightcode I just get this result

Running...
Compiling my-project.core
Hello, World!

我知道这是一个非常新的问题,但任何人都可以指引我到正确的地方如何进入一些Clojure函数并运行它,并在Nightcode中看到结果?我期待看到像Python IDLE一样简单,但这是非常不同的。

I know this is a very newbee question but can anyone direct me to the right place about how to enter some Clojure functions and run it and see the result in Nightcode? I was expecting to see something as easy as Python IDLE but this is very different.

谢谢。

Re Jared314的回答:

现在我在顶部窗口上有这个代码:

Now I have this code on the top window:

(ns newclojureproject.core
  (:gen-class))

(+ 1 2 3)

我点击运行REPL 看不到结果,但这

I click Run with REPL and I don't see the result for sum but this

my-first-project.clj=> Running...
Compiling my-first-project.clj
Running with REPL...
nREPL server started on port 51595 on host 127.0.0.1
REPL-y 0.2.1
Clojure 1.5.1
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)

my-first-project.clj=> Running...

=== Finished ===

=== Finished ===

我做错了什么?

推荐答案

夜代码所以我可以能帮助。 Run with REPL按钮相当于在命令行上运行lein repl。它应该出现一个提示,您可以在项目的上下文中键入clojure命令。您似乎可能已经快速连续点击了几个按钮,所以提示不可用。

I'm the author of Nightcode so I may be able to help. The Run with REPL button is the equivalent of running "lein repl" on the command line. It should bring up a prompt where you can type in clojure commands within the context of your project. It appears that you may have clicked several buttons in rapid succession, so the prompt wasn't available.

请记住,如果你只是想简单的REPL尝试Clojure命令,只需使用窗口左下角的一个。它本质上是一样的,除了它总是开启,并且没有访问任何项目的命名空间。我添加它正是为了这些情况下,你只是想快速的方式尝试一个命令。

Keep in mind that if you just want a simple REPL to try Clojure commands in, just use the one in the bottom left of the window. It's essentially the same thing, except it's always-on and doesn't have access to any project's namespace. I added it precisely for these situations where you just want a quick way to try a command out.

如果您有其他问题,请随时在这里问或< a href =http://www.reddit.com/r/Nightcode> Nightcode subreddit 。

If you have other questions, feel free to ask here or on the Nightcode subreddit.

这篇关于使用Nightcode IDE与Clojure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆