[ANN] Nightcode, an IDE for Clojure and Java

1,105 views
Skip to first unread message

Zach Oakes

unread,
Aug 2, 2013, 9:03:03 AM8/2/13
to clo...@googlegroups.com

I’ve been working on a simple IDE for the past few months. It started as an attempt to add Leiningen integration to Clooj, but eventually I decided to start a new project from scratch. It is very alpha-quality, so please be gentle:


http://nightcode.info/


Here’s what it has:


-Written in Clojure (the UI is written with seesaw)

-Built-in copy of Leiningen to build Clojure and pure-Java projects

-Built-in templates for several common types of Clojure and Java projects

-Always-on REPL in the corner to try Clojure commands

-Android integration (includes the lein-droid plugin, LogCat output, etc)

-ClojureScript integration (includes the lein-cljsbuild plugin)

-Cool looking dark theme, because that’s trendy these days


Here’s what it’s missing:


-Fast build times (it launches Leiningen in a separate process, which is sloooooooow...I plan on fixing this and would love any help)

-Important editing features (code completion, text replace, etc)

-Quick switching between recent files

-Jump to definition, built-in documentation

-Integration between editor and REPL (eval form or entire file)

-Integration with git

-Many other things -- please give me your thoughts!

Lee Spector

unread,
Aug 2, 2013, 10:01:40 AM8/2/13
to clo...@googlegroups.com

On Aug 2, 2013, at 9:03 AM, Zach Oakes wrote:

> I’ve been working on a simple IDE for the past few months. It started as an attempt to add Leiningen integration to Clooj, but eventually I decided to start a new project from scratch. It is very alpha-quality, so please be gentle:
>
> http://nightcode.info/

Very exciting!

I've just given it a quick initial test and will definitely be trying it out more.

Thanks!!

-Lee

Alexander Yakushev

unread,
Aug 2, 2013, 10:34:02 AM8/2/13
to clo...@googlegroups.com
This initial version looks very mature already! I wonder what will become of it by the time of the release.

Great job, Zach! Eagerly waiting to see Nightcode's future.

Arie van Wingerden

unread,
Aug 2, 2013, 11:08:53 AM8/2/13
to clo...@googlegroups.com
What a fantastic initiative!
It already looks great and promises a lot.
I love the leight weight approach, still having lots of features.
Keep up the good work!


2013/8/2 Alexander Yakushev <unl...@bytopia.org>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Steven Degutis

unread,
Aug 2, 2013, 11:09:13 AM8/2/13
to clo...@googlegroups.com
Excited to try it out! Thanks for your hard work :)


--

Laurent PETIT

unread,
Aug 2, 2013, 11:36:28 AM8/2/13
to clo...@googlegroups.com
Great initiative !

Is it okay if I ask what your plans are?
Asking because in the past, there have been similar initiative which
are now either dead or at a slow pace, so it'd be good to know if it's
a between-2-jobs project that might not be pursued in the future, or
if you're serious about giving it time for a long period, etc. Feel
free to answer or not :-)

I saw that you use "public domain" as a license. Why so? I can see
people be relunctant to publish their work / submit pull requests with
such a "free for everyone" type of license. But maybe it's just me.
What about the EPL, the same as Clojure, Leiningen, Counterclockwise,
and a buuunnnch of other clojure all around us?




2013/8/2 Zach Oakes <zso...@gmail.com>:

Zach Oakes

unread,
Aug 2, 2013, 11:49:06 AM8/2/13
to clo...@googlegroups.com
I definitely plan on continuing development of Nightcode. As of yesterday, I am unemployed, so for the time being I have a lot of time on my hands. I am hoping to support myself with freelancing and tutoring in the Pittsburgh area. If that works out, I should be able to work on Nightcode (and my other project, Nightweb) indefinitely. We'll see how it goes.

As for my choice of public domain, I always do that for my projects. I realize that I am going against the grain, but it's a principled issue for me. I wrote about it on my blog, but if you'd like to discuss it further we should do it elsewhere because it can easily derail the thread.

Laurent PETIT

unread,
Aug 2, 2013, 11:56:01 AM8/2/13
to clo...@googlegroups.com
2013/8/2 Zach Oakes <zso...@gmail.com>:
> I definitely plan on continuing development of Nightcode. As of yesterday, I
> am unemployed, so for the time being I have a lot of time on my hands. I am
> hoping to support myself with freelancing and tutoring in the Pittsburgh
> area. If that works out, I should be able to work on Nightcode (and my other
> project, Nightweb) indefinitely. We'll see how it goes.

That's great. Because Clojure deserves an easy entry point. I like
what I've seen so far, it's inspiring.


> As for my choice of public domain, I always do that for my projects. I
> realize that I am going against the grain, but it's a principled issue for
> me. I wrote about it on my blog, but if you'd like to discuss it further we
> should do it elsewhere because it can easily derail the thread.

I will not start a discussion on the merits of public domain over EPL
or vice versa.

Just want to notice that you have a whole ecosystem around your
codebase, upon which you depend, which may start to depend upon you
also, and it is not public domain.

And I think it would probably help exchanging code between those
projects and yours if they have compatible licenses. Of course I can
see public domain code migrating easily to EPL code, but is the
reverse true?

All I need to know is if you're willing to "stand by your rule" for
nightcode, or make an exception.

Cheers,

--
Laurent

Zach Oakes

unread,
Aug 2, 2013, 12:01:36 PM8/2/13
to clo...@googlegroups.com
I have no problem using third-party code that is copyright-licensed, but for the sake of sanity I'd prefer that modifications to my own code be public domain -- it can get really absurd if one line of code in a file is EPL-licensed and the rest is public domain. There should not be any issue with using my code in other projects.

Jeff Heon

unread,
Aug 2, 2013, 1:53:02 PM8/2/13
to clo...@googlegroups.com
That's really cool. Thank you for doing this!

I really like the import feature, coloring and keyboard friendlyness.

If I can suggest the one feature that I couldn't bear to use an IDE without:

Basically I get pissed-off if an editor kills my selected expression when I type a paren or some other twin delimiter 8)

I even wish I had it when editing other languages than Clojure.

John Gabriele

unread,
Aug 2, 2013, 2:26:44 PM8/2/13
to clo...@googlegroups.com
On Friday, August 2, 2013 9:03:03 AM UTC-4, Zach Oakes wrote:

I’ve been working on a simple IDE for the past few months. It started as an attempt to add Leiningen integration to Clooj, but eventually I decided to start a new project from scratch. It is very alpha-quality, so please be gentle:


http://nightcode.info/



Some comments:

  * Wow the GUI looks amazing! Works great as well.
  * Rather than use a built-in lein, is there any way I can have it use my own ~/bin/lein? Why does it come with its own leiningen?
  * To open an existing project: Why "import" rather than "open"?

Is the repl at the bottom-left associated with a given project? It seems to be the same as if I'd run `lein repl` in the dir from where I ran the jar. (Hm. I can't get at any `(doc whatever)` from here...)

The buttons below the text-editing area correspond to the project to which the given open file belongs, correct? If so, that's really nice. (Hm, when using "Run with REPL", having trouble calling a function I added above -main...)

One big issue I see right now: no smart indentation in the editor window.

Seems to be quite a nice piece of work so far!

-- John

Zach Oakes

unread,
Aug 2, 2013, 2:48:36 PM8/2/13
to clo...@googlegroups.com
I agree that better parenthesis and indentation behavior is a must; I'll add that to my list. The REPL at the bottom left is not associated with your project; I thought it would be nice to just have a bare, always-on REPL to test clojure commands.

The "Run with REPL" button should use the leiningen REPL with your project's namespaces available, but I don't yet have any interaction between the editor and REPL, so any functions you add after loading the REPL won't be available -- I'll be fixing this soon.

A few people mentioned to me that they are getting errors when trying to run or build anything. I'll be overhauling how Leiningen is run so that should be fixed soon -- like I mentioned in the original post, I am currently running it in a separate process and it's quite slow and inefficient even when it works.

Lee Spector

unread,
Aug 2, 2013, 2:54:45 PM8/2/13
to clo...@googlegroups.com

On Aug 2, 2013, at 1:53 PM, Jeff Heon wrote:
> If I can suggest the one feature that I couldn't bear to use an IDE without:
> Strict Structural Editing Mode (paredit-style)

But please note that while many love paredit, many others hate it -- so if you implement this I would make it optional.

Also:

On Aug 2, 2013, at 2:26 PM, John Gabriele wrote:
> . (Hm, when using "Run with REPL", having trouble calling a function I added above -main...)

That happened to me and in my case it was because I hadn't saved the changed file... thought I did because I had hit command-s (on a mac) while Nightcode save is control-s.

> One big issue I see right now: no smart indentation in the editor window.

Totally essential, IMHO.

If I can dream big, after the core editing features, somewhere near the top of my own feature wish-list would be a debugging feature that I think is currently available for Clojure only in emacs via nrepl-ritz (oh, actually now I think I see that it's available in a vim environment too): the ability to browse or at least print the values of locals up and down the stack at the point of an exception (presumably in a run with locals-clearing off, although it'd be great to see whatever hasn't been cleared anyway).

There's a long thread of discussion about this and related ideas here: https://groups.google.com/forum/#!topic/clojure/qhdCrUoT_O0

It'd be totally fabulous to have this feature in a Clojure IDE that's as clean and usable as Clooj or Nightcode.

-Lee




Zach Oakes

unread,
Aug 2, 2013, 3:00:17 PM8/2/13
to clo...@googlegroups.com
That's a good point, I should be using command instead of control on OSX. I don't have a Mac so that slipped my mind; I'll make a note of it.

Dave Ray

unread,
Aug 2, 2013, 3:07:04 PM8/2/13
to clo...@googlegroups.com
In Seesaw [1] you can specify your shortcuts as "menu S" instead of "ctrl S" and it will pick the right one for the platform.

Cheers,

Dave

[1] my memory's a little fuzzy here :)



Colin Fleming

unread,
Aug 3, 2013, 2:40:51 AM8/3/13
to clo...@googlegroups.com
Hi Zach,

Congratulations, Nightcode looks very impressive - it looks like a worthy Clooj successor. I'll definitely download it and check it out.

Cheers,
Colin

Manuel Paccagnella

unread,
Aug 3, 2013, 8:07:31 AM8/3/13
to clo...@googlegroups.com
Wow, it looks very promising. I'd also like add a +1 for smart indent and paredit.

Kudos to you Zach!

Manuel

Zach Oakes

unread,
Aug 3, 2013, 2:42:42 PM8/3/13
to clo...@googlegroups.com
Thanks for the complements! I just released 0.0.2, which should make Run/Build faster and more reliable. It also fixes shortcuts on OS X so they use command instead of control.

Arie van Wingerden

unread,
Aug 4, 2013, 6:40:54 AM8/4/13
to clo...@googlegroups.com
Hi Zach,

0.0.1 worked OK.
0.0.3 gives this error when "Run with REPL":
   Error: Could not find or load main class nightcode.lein

TIA,
  Arie


2013/8/3 Zach Oakes <zso...@gmail.com>
--

Matthew Chadwick

unread,
Aug 4, 2013, 11:19:52 PM8/4/13
to clo...@googlegroups.com
this is great!

please please add structural editing (not simply bracket-matching in a text-editor, but direct manipulation of Clojure data structures (including code). I've been trying out some ideas in this area & would be happy to help out.

Frank Hale

unread,
Aug 4, 2013, 11:26:25 PM8/4/13
to clo...@googlegroups.com
Zach, I just want to say THANK YOU for doing what  you are doing. Your work is very much needed! Take care!


--

Zach Oakes

unread,
Aug 5, 2013, 7:01:59 PM8/5/13
to clo...@googlegroups.com
Arie, it looks like this is occurring for a lot of people. In lein.clj, I'm using two different methods to launch a process, a "fast" method that leverages Leiningen's trampoline feature, and a "slow" method that runs nightcode.lein which in turn runs Leiningen commands (i.e. it adds a level of indirection).

The "Run with REPL" button uses the slow method, because it doesn't work correctly with the fast method. I'm having a hard time figuring out why the slow method fails for some people, and not others. I've made some changes, so if you have the time, please try cloning the repo and running `lein run`, and see if the "Run with REPL" button still throws that error. Any help in this regard would be really appreciated.

Phil Hagelberg

unread,
Aug 5, 2013, 7:57:34 PM8/5/13
to clo...@googlegroups.com
On Friday, August 2, 2013 8:49:06 AM UTC-7, Zach Oakes wrote:
> As for my choice of public domain, I always do that for my projects.
 
Of course it's your choice, but are you aware there are jurisdictions in which users cannot legally make copies of code released in the public domain?

-Phil

Phil Hagelberg

unread,
Aug 5, 2013, 8:34:20 PM8/5/13
to clo...@googlegroups.com
> As for my choice of public domain, I always do that for my
> projects. I realize that I am going against the grain, but it's a
> principled issue for me. I wrote about it on my blog, but if you'd
> like to discuss it further we should do it elsewhere because it can
> easily derail the thread.

Oops; replied before I read the whole email. I'll assume your aware of this then; moving on.

-Phil

kovas boguta

unread,
Aug 5, 2013, 9:51:15 PM8/5/13
to clo...@googlegroups.com
I've just released paredit-widget, https://github.com/kovasb/paredit-widget

with the intention of creating a drop-in paredit solution for projects like nightcode. Its still pretty experimental but might be an interesting test case to try to integrate.





On Sun, Aug 4, 2013 at 8:19 PM, Matthew Chadwick <math...@gmail.com> wrote:
this is great!

please please add structural editing (not simply bracket-matching in a text-editor, but direct manipulation of Clojure data structures (including code). I've been trying out some ideas in this area & would be happy to help out.


On Friday, August 2, 2013 11:03:03 PM UTC+10, Zach Oakes wrote:
Message has been deleted

Zach Oakes

unread,
Aug 5, 2013, 11:42:40 PM8/5/13
to clo...@googlegroups.com
I just pushed 0.0.4 to the website. I received reports that it fixes the nightcode.lein error, but please let me know if anyone experiences otherwise.

Marcus Blankenship

unread,
Aug 6, 2013, 11:56:30 AM8/6/13
to clo...@googlegroups.com
Hey Zach,

First, this is awesome.  Really.  Awesome.  ;-)

Second, you should put an email sign-up on this page, so folks can be notified when you update it, or when you have other cool things to say.  Anyone that builds this kind of product probably has other cool things to say, and I would want to hear them.  

Just my $0.02.
Marcus


--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

MARCUS BLANKENSHIP
\\\ Owner, Problem Solver, Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

Arie van Wingerden

unread,
Aug 6, 2013, 1:33:41 PM8/6/13
to clo...@googlegroups.com
Zach,
sorry for my late reply.
It seems that 0.0.4 indeed solves the problem with "run repl"!
Thx very much,
   Arie


2013/8/6 Marcus Blankenship <mar...@creoagency.com>

Jörg Winter

unread,
Aug 6, 2013, 4:12:01 PM8/6/13
to clo...@googlegroups.com
Hey Zach, great initiative! Keep it going.. much needed toole there!

Just wanted to say that for indenting/reformatting clojure-code, it is indeed possible to
use clojure's own "pprint" function.

Unfortunately the official java API.invoke() is only available in clojure 1.6
But I have used this successfully already, so maybe this can help you somewhere.

Best,
Joerg
Reply all
Reply to author
Forward
0 new messages