37
State of Counterclockwise: Past, Present and Future http://bit.ly/counterclockwise by Laurent Petit @laurentpetit first.clojure-conj.org - 2010/10/22

Counterclockwise past present future

Embed Size (px)

Citation preview

Page 1: Counterclockwise  past present future

State of Counterclockwise:Past, Present and Future

http://bit.ly/counterclockwise

by Laurent Petit@laurentpetit

first.clojure-conj.org - 2010/10/22

Page 2: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 3: Counterclockwise  past present future

Presentations 1/2

● Me● Laurent Petit, french

● Fond of Clojure since Q2 2008● Involved in Counterclockwise since Q4 2008

Page 4: Counterclockwise  past present future

Presentations 2/2

● Eclipse● multi-language software development environment● Primary target language/platform: Java/JVM● Eclipse Foundation claims “millions” of users,

worldwide

● Counterclockwise● An Eclipse extension for managing Clojure-based

projects● License : EPL● “ccw” for short

Page 5: Counterclockwise  past present future

Intro 1/2

● Counterclockwise is an Eclipse plugin helping developers write Clojure code

● Why an Eclipse plugin ?● Targetting a large base of java developers● Driving forces : writing Eclipse plugins both at work

& at home !● Want Clojure for my next paid java project !

Page 6: Counterclockwise  past present future
Page 7: Counterclockwise  past present future
Page 8: Counterclockwise  past present future

Intro 2/2

● Installing Counterclockwise and starting testing/developing in clojure is really just a matter of minutes!

Page 9: Counterclockwise  past present future

Intro 2/2

● Installing Counterclockwise and starting testing/developing in clojure is really just a matter of minutes! ● Ease of installation = maximize a good first

impression with the language (like it or not !)

Page 10: Counterclockwise  past present future

Intro 2/2

● Installing Counterclockwise and starting testing/developing in clojure is really just a matter of minutes! ● Ease of installation = maximize a good first

impression with the language (like it or not !)● No-brainer integration into Eclipse java users'

toolset– Parens will already feel UFOs to them, let the IDE get out

of their way and help them concentrate on the concepts

Page 11: Counterclockwise  past present future

Intro 2/2

● Installing Counterclockwise and starting testing/developing in clojure is really just a matter of minutes! ● Ease of installation = maximize a good first impression

with the language (like it or not !)● No-brainer integration into Eclipse java users' toolset

– Parens will feel alien enough to new users, let the IDE get out of their way and help them concentrate on the concepts

● But should provide same interactive “dynamic” experience

Page 12: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 13: Counterclockwise  past present future

History

● Started in 2008● By Casey Marshall, code name “clojure-dev”

● Joined on October 2008● Casey left the team early 2009 ...● … got the “de-facto” leadership since then

Page 14: Counterclockwise  past present future

Figures (google analytics)

Homepage – 2000 views per month

● Since March 1, 2010:● ~ 4000 different visitors

– 800-900 average different visitors per month● ~2000 homepage views per month● ~2000 documentation page views per month

Page 15: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 16: Counterclockwise  past present future

Installation● Super easy

● Use Eclipse 3.6 Helios' Market place– Menu Help > Eclipse Market Place– search for “clojure” & click

● Super fast● 6 Mb download

Page 17: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 18: Counterclockwise  past present future

Editor features 1/2

● Syntactic coloration (stable)● Strictly speaking, “token-based” coloration

● “rainbow” parens (and higlight, and jump to/from)

● Around the corner: true syntactic coloration (full use of parser's info)

● Structural edition commands (stable)● based on emac's paredit.el (~ 80% commands currently ported)

● Totally reusable outside Eclipse context (pure clojure)

● Jump to definition (stable)● Only to clojure global vars for now on ...

● Auto-indentation (stable)● Predictable behaviour with & without support of dynamic environment

● But judged “too simple” by increasing number of users ...

Page 19: Counterclockwise  past present future

Editor features 2/2

● Code completion (incomplete)● Clojure top level vars● Java

– Clojure is “backward”– full search in the project's classpath)– → slow !

● REPL interaction commands (stable)● Documentation hover (around the corner)● Code Outline (unstable)● Missing: formatting, macro-expansion

Page 20: Counterclockwise  past present future

Editor demo

● Structural edition modes● Default mode – does not break habit● Strict mode – mixed free/guided mode

● Underused structural edition commands● Both modes

– Structure-based selection– Raise over parent– Split / Join

● Strict mode only– Easy wrapping

Page 21: Counterclockwise  past present future

Project management feature

● Compliant with Eclipse's notion of project● Project “natures” : composable with JDT nature,

etc.

● “Running the project” uses “enhanced” java-nature-based “launch configuration”● Enabled to quickly provide out-of-the-box

interactivity

Page 22: Counterclockwise  past present future

Interactive Dev feature1/2

● REPL' state of the art (v0.0.64)● Based on the Java nature of the project

– Uses the project's classpath– Same configuration tabs as the java's

● But limited in scope ...– Forces the project to start with a stdin/stdout-based REPL class

(e.g. clojure.main or clojure.contrib.repl-ln)– Not possible to work with web projects (WTP), GWT projects,

Eclipse projects (PDE)

● … and in features– Plain text edition (no colors, no user assistance)– No history

Page 23: Counterclockwise  past present future

Interactive Dev feature 2/2

● Brand new REPL around the corner !● Based on cemerick's nREPL client/server REPL library

● And on cemerick's rework of the Graphical REPLView !

● Connection to any JVM running a nREPL client● No more need for special “launch configuration”

● => composable with projects of any kind (Web WTP, GWT, AppEngine, etc.)

● Rich set of feature for the REPL View● Shares source code editor featureset: colors, structural edition, code

completion (wip), navigation commands, etc.

● Colorized logs

● Recall previously entered commands (wip)

● Multiline (with auto-indentation!) command area

Page 24: Counterclockwise  past present future

Interactive Dev demo

● “launch” your project● auto-reload-on-save enabled or disabled

– Agile feature design at work ! :-)

● Exclusivity: new REPL View !● Same feature set as editor● Receive code from the editor

● Namespace browser● Embedded search engine● Click to jump to definition

Page 25: Counterclockwise  past present future

Debugger feature

● Features● Place breakpoints in clojure code● Leverage the classic Eclipse integrated java

debugger

● Still a little bit unstable● Future work

● Does not (yet) filter frames related to the internals of clojure (clojure.lang.*)

● Integration with George Jahad's CDT debugger

Page 26: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 27: Counterclockwise  past present future

Future – features around the corner

● Editor● Jump to definition (java)● Documentation hover (clojure & java)● True syntax-based coloration (locals, etc.)

● Project management● More “orthogonality” with underlying “project nature” (pure

java, GWT, WTP, AppEngine, Eclipse RCP, etc.)

● REPL● Port features of the editor● And then … towards “graphical REPL” (ability to display

“binary” return values as images, HTML, charts, etc.)

Page 28: Counterclockwise  past present future

Future – other features

● Refactoring features● Integration of tcrayford's clojure-refactoring project● Hopefully bidirectional java ↔ clojure

● Debugging features● Integration with George Jahad's Clojure Debugging

Toolkit (CDT)

Page 29: Counterclockwise  past present future

Future – “dream-about” features

● More “warnings” than what the compiler has to offer● Help enforcing conventions● Help detect potential bugs (more than one statement

inside dosync, local same name as global, etc., etc.)● → No hurry, 'cause “cinc” may be a game changer ...

● “AI-like” User suggestions● Analyse user's habits through heuristics (and occurrence)● Non-invasive (hard part !) suggestions

Page 30: Counterclockwise  past present future

Future - Miscellaneous

● Introduction of Contributor Agreement● Better juridical protection for project's code

● Better protection of sponsor's rights on project “as a whole”

● copy&paste of Clojure's one, just names changed

● Switch to “semantic versioning”

● “embedded” REPL for ccw own's development

● Open the door to more contributors● devs:

– mvn based build process

– Continuous integration

● users:

– Update Sites for “beta” versions as well as “stable” version

– Opening the plugin to user contributions (in clojure, of course)

Page 31: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 32: Counterclockwise  past present future

Share, ...

● Past & current contributors● Casey Marshall (first versions of ccw)● Stephan Müehlstraßer (preference pages, online

help, labrepl support)● Christophe Grand (Debug breakpoints)● Manuel Woelker (Source code outline)● Miaubiz, clooney (editor commands:navigate to

definition, etc.)● Nicolas Lambert (Outline commands)● Chas Emerick (integration with nREPL, REPLView)

Page 33: Counterclockwise  past present future

… reuse,

● vimClojure (@kotarak): code completion● parsley (@cgrand): source code parser● clojure.osgi (@aav): clojure+OSGi love story● nREPL (@cemerick): REPL client/server library

Page 34: Counterclockwise  past present future

… give back.

● Structural Editor● paredit.clj (github)

● Clojure Grammar● ccw.parsers.clojure (github, wip, no rush please)

Page 35: Counterclockwise  past present future

Where to find it

● Google code home page● http://code.google.com/p/counterclockwise/

● Google groups● Users : http://groups.google.com/group/clojuredev-

users (66 members)● Devs :

http://groups.google.com/group/clojuredev-devel (37 members)

Page 36: Counterclockwise  past present future

Agenda

● Presentations / Intro● History / Figures● Installation● Features / quick demos● Future● Credits● Q & A

Page 37: Counterclockwise  past present future

Thanks for attending!(can you wake up your neighbor pliz ?)