[ANN] Nightcode 2: Total Rewrite

786 views
Skip to first unread message

Zach Oakes

unread,
Jul 13, 2016, 1:58:05 PM7/13/16
to Clojure

TL;DR: Nightcode, a Clojure IDE, just got a makeover: https://sekao.net/nightcode/


In a world...where developer tools are gargantuan beasts, unapproachable to beginners, one IDE stood alone.


*a fiddle softly plays ashokan farewell*


“You’re not going already, are you, Nightcode?”


“I must, father. So many new people are learning Clojure. They need me.”


*music becomes ominous as Nightcode rides a wagon into the distance*


Until one day, when it embarked on a journey to save the world...from itself.


*scene switches to Nightcode crouching in a fetal position in a dense forest*


“I’m hearing voices.”


*heavy breathing*


“STOP TALKING TO ME!”


*one of those jumanji drums starts beating slowly and then gets faster and louder*


*the camera zooms in on Nightcode’s face as it suddenly smiles wryly*


Things are about to get...complicated.


*scene changes, a crowd gathers in a small village*


“Gather ‘round! I’m making it easy to start coding!”


“But Nightcode, those appear to be bugs!”


“Wrong, ma’am, they are features! All of them!”


“SILENCE!”


*the crowd becomes mute as a hooded figure moves forward*


“Enough of this madness, Nightcode. In three years your features have remained dormant as your bug count has exploded! Meanwhile, people have been using --”


“Don’t listen to this fraud, you all need me!!!!”


*Nightcode lifts its trench coat and releases a plague of bugs on the village as it runs away*


“I don’t want to crash but I will if I have to. I don’t want to crash but I will if I have to. I don’t want to crash but I will if I have to. STOP THE VOICES, MAKE IT STOP!”


When your life is no longer your own...


*screen dims, Nightcode runs into a forest as the village is ravaged*


...a hero must rise.


*the hooded figure reveals himself*


Meet...Kevin.


*Kevin Hart smiles as upbeat music blares*


“HEEEEEY Y’ALL THAT WAS CRAZY! I guess it’s a bad time to ask for a better hotel. HAHA!”


Kevin is just an average guy, with a few...friends.


*the camera pans several feet up to reveal...Ice Cube and Dwayne Johnson*


“This is gonna be bad, Cube.”


“I know, man. How did we get stuck with this guy again?”


A brave trio must save the world from Nightcode...by reinventing it.


“Check it. Nightcode can’t be killed. We gotta find the good inside it and rip it out!”


“YEAH CUBE I AGREE. JUST LIKE YOU DID WITH YOUR CAREER!”


*Cube slaps Hart and continues*


“There’s only one way to do that. We gotta rewrite Nightcode.”


“You mean like a sequel? Like we keep doing with Fast and the Furious? No way.”


“YEAH CUBE, JOEL SPOLSKY SAID YOU SHOULD NEVER --”


“Dammit I KNOW what Joel Spolsky said, and I don’t care. You guys got any better ideas?”


*Hart and Johnson look at each other sheepishly*


*scene switches to a workshop with maps and shit*


“Nightcode is written with Swing, a deprecated UI framework. We’re gonna replace it with Java FX. What do you got Rock?”


“The editor. Right now it doesn’t offer much beyond syntax highlighting. We’re gonna have to write something from scratch.”


“AWW HELL YEAH, GONNA BE LIKE LIGHT TABLE HAD A BABY WITH CURSIVE, HAHAAAAAA!”


“What? No. Relax Kev. An instaREPL and some basic inline errors, that’s all we have time for.”


The trio will learn…


*Hart looks in a mirror*


“Oh hey Nightcode, what’s up? CAN YOU DEAL WITH THESE RAINBOW PARENS?! Didn’t think so.”


...what it’s like…


*Cube emerges from the workshop covered in oil*


“We shrunk the damn jar file from 50 MB to just 19!”


...to overcome odds.


“The new version has just 1600 lines of code, less than half what the old one has. We may actually pull this off.”


This summer, get ready…


“WATCH ME MOVE. WATCH ME MOVE. WATCH ME -- hey man take it easy put that down be cool.”


...for the rewrite…


“I’m sick of these motherfuckin’ bugs, on this motherfuckin’ IDE!”


...of your life.


“We’re gonna get this done or die tryin’. And Kevin IF YOU DON’T STOP DANCING YOU’LL DIE NO MATTER WHAT.”


*a door opens as the trio argue, music stops, and Nightcode’s silhouette appears*


“Game over, gents. How can you replace me? Beginners don’t know how to run jar files.”


“We built native installers, fool.”


*explosions*


NIGHTCODE 2


TOTAL REWRITE


https://sekao.net/nightcode/

Boris Kourtoukov

unread,
Jul 13, 2016, 2:16:10 PM7/13/16
to Clojure
Looks awesome so far Zach! Thanks for going through this monumental rewrite!

Gary Trakhman

unread,
Jul 13, 2016, 3:29:40 PM7/13/16
to Clojure
Pretty cool!

On Ubuntu, I was unable to run the jar, it couldn't find the main sekao...core class, although on inspection it was there just fine.

I was able to run it from a git checkout with `boot run`, however I additionally found out I needed to `sudo apt-get install openjfx` 

--
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/d/optout.

Zach Oakes

unread,
Jul 13, 2016, 3:51:57 PM7/13/16
to Clojure
Ah yeah I don't think Java FX is part of openjdk yet, so I think you need to install the oracle version to get it to work on linux.

ojito

unread,
Jul 13, 2016, 5:15:59 PM7/13/16
to Clojure
I'm using LightTable, can anyone compare the experience with nightcode? Seems like it's quite different than before. 

Sean Corfield

unread,
Jul 13, 2016, 6:44:01 PM7/13/16
to Clojure Mailing List

I see a Boot tab in the REPL area but looking at the source code, detecting build.boot is disabled (and, indeed, I can’t get NC to recognize any of my Boot-only projects).

 

Can you speak to where you are on Boot support?

 

Thanks,

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Zach Oakes

unread,
Jul 13, 2016, 8:52:48 PM7/13/16
to Clojure
That Boot tab is quite a tease ;) I wanted to finish support for it so bad, but technical difficulties prevented me from doing it. I definitely plan to still do so, and any help would be appreciated.

The issue is actually pretty simple: I need to be able to call Boot commands without having Boot installed. I do so for Leiningen by literally adding it as a dependency and calling its build commands programatically. Boot simply isn't designed to work that way.

After talking to the Boot folks, they suggested I add Boot.java to my project and start a process that calls its main method with the appropriate task names. Easy enough, but that does not actually work. It turns out that AOT compilation causes this java file to not behave correctly.

If anyone is interested in investigating this, I created a minimal case for this issue here: https://github.com/oakes/boot-clj-issue

Once that is resolved, it will be pretty trivial to enable building Boot projects.I actually would like to make the built-in templates use Boot by default instead of Leiningen. Boot scripts in particular will be awesome for beginners.

Mark Stang

unread,
Jul 13, 2016, 9:44:50 PM7/13/16
to clo...@googlegroups.com

How about, until the issues are resolved, you require boot to be installed?

--

Zach Oakes

unread,
Jul 13, 2016, 10:12:23 PM7/13/16
to Clojure
If I get desperate I may do that, but the main users I care about are beginners, and they generally have trouble installing CLI tools. I'm hoping it is a trivial fix and I'll be able to get Boot working in 2.1.0 :)

Keith Irwin

unread,
Jul 13, 2016, 10:17:57 PM7/13/16
to clo...@googlegroups.com
Now a simple question…

How do you evaluate a form into the running repl?

Colin Fleming

unread,
Jul 13, 2016, 10:18:05 PM7/13/16
to clo...@googlegroups.com
What I do for Leiningen in Cursive is basically mimic what the lein script does, and download the uberjars to .lein/self-installs, and then run processes with those on the classpath. Would something similar for Boot work? As I understand it, boot.sh is just a tricky wrapper around an embedded jar, so hopefully that would work. I'm also selfishly interested in this because I don't support boot yet but I want to.

Zach Oakes

unread,
Jul 13, 2016, 10:35:53 PM7/13/16
to Clojure
As I understand it, the Boot.java I linked to basically does that. You just run its main function and it takes care of downloading Boot to the right spot and invoking it.

Christopher Small

unread,
Jul 13, 2016, 11:18:04 PM7/13/16
to Clojure
OMG. Thank you for this brilliant introduction. And of course all your hard work, as well :-)

Yoko Harada

unread,
Jul 14, 2016, 10:46:17 PM7/14/16
to clo...@googlegroups.com
Thanks for the update! A single REPL window on the new version looks nice. It's good to avoid confusion for beginners.
Recently, ClojureBridge (clojurebridge.org) officially switched to Nightcode. I think ClojureBridge students will like this easy to use editor.

However, there's a really *ouch* problem in version 2.0.0. It doesn't play nicely with Overtone. ClojureBridge has one Overtone material, which works well on night code 1.3.1. I could run (piano),  (piano 48) or other Overtone functions many times on the REPL window. But, on 2.0.0, if I run (piano) once, that's it. REPL window acts weirdly.

Are there any links to older versions? For a while, ClojureBridge wants to stick to version 1.3.x.

- Yoko


Boris Kourtoukov

unread,
Jul 14, 2016, 11:51:59 PM7/14/16
to Clojure
Hi Yoko,

If all you need is standalone jar versions of Nightcode you can see all the past releases here: https://github.com/oakes/Nightcode/releases

The jar should run on any platform.

Best,
Boris

Yoko Harada

unread,
Jul 15, 2016, 9:37:21 AM7/15/16
to clo...@googlegroups.com
Boris,

Yes! That's what I want to know. Also, the  jar archive is the one ClojureBridge will use.
Thanks!

- Yoko

Zach Oakes

unread,
Jul 15, 2016, 10:45:22 AM7/15/16
to Clojure
I will definitely look into the REPL issue this weekend. Sorry about that regression -- there are some rough edges right now. My users are also my beta testers :)


On Thursday, July 14, 2016 at 10:46:17 PM UTC-4, yokolet wrote:

Yoko Harada

unread,
Jul 15, 2016, 11:13:45 AM7/15/16
to clo...@googlegroups.com
Zach,

Here's additional info. Hitting ENTER key a couple of times, at least, one more, fixes the problem.
Probably, reloading has a problem. If I don't hit Reload button, this weird behavior doesn't happen. If I hit Reload button, or type (require ... :reload) in REPL, this weird behavior starts.

Also, it happens only when I'm using Overtone. Quil apps don't have this problem. Overtone connects to internal server, so this may be a problematic on Nightcode REPL.

- Yoko

Dave Yarwood

unread,
Jul 15, 2016, 8:49:40 PM7/15/16
to Clojure
Nightcode 2 is already looking great! I'm looking forward to seeing how it develops.

I'm also tickled that there is an Audio App template using Alda! Let me know if there's anything Alda-related I can help with :)

On Wednesday, July 13, 2016 at 1:58:05 PM UTC-4, Zach Oakes wrote:

Ivan Reese

unread,
Jul 17, 2016, 1:29:25 PM7/17/16
to Clojure
Stellar introduction! I love the use of long-form humour in the Clojure community (re-frame, I'm looking at you).

Zach Oakes

unread,
Jul 18, 2016, 1:50:31 AM7/18/16
to Clojure
I just released 2.0.1 which (hopefully) fixes the REPL issue that occurred when using Overtone. I also adds the ability to cycle through REPL history with up/down arrows. Lastly, for those with issues using it on Linux with OpenJDK, I now have deb/rpm packages that bundle the necessary oracle stuff.

Dave: Thanks for making alda! It rocks and I'm hoping to do all kinds of stuff to integrate with it.


On Wednesday, July 13, 2016 at 1:58:05 PM UTC-4, Zach Oakes wrote:
Reply all
Reply to author
Forward
0 new messages