[ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

321 views
Skip to first unread message

Frank Siebenlist

unread,
Apr 5, 2012, 1:56:51 AM4/5/12
to Clojure, seesa...@googlegroups.com, Frank Siebenlist
I still remember the first time I was introduced to Smalltalk, when my colleague demonstrated the class-browser - it was one of those jaw-dropping moments: all that information at your finger-tips of a live- and living system…

Guess nowadays it's more nostalgia than anything else, but in many ways that Smalltalk development environment is still a hard act to follow.

Hopefully this Clojure Namespace Browser will get us one small step closer to our ultimate development environment (… although I'm sure that some of you emacs-gurus believe you're already there ;-) ).

The graphical browser should give you easier access to the documentation strings of all the vars in your live clojure project, as well as the source code, and clojuredocs' examples&comments. You can get all that info from the repl, but hopefully this browser should make it easier to … browse, explore, and find stuff in Clojure's vast collection of libraries.

The installation is dead-simple - just add:

:dev-development [[clj-ns-browser "1.0.0"]]

to your project.clj file, start your repl, evaluate (use 'clj-ns-browser.sdoc), and then (sdoc), and your up and running with this namespace browser always one click or (sdoc…) away…

Caveat… it all works well on my MacOSX, but I have seen some issues with Lubuntu and missing "unloaded namespaces" - also I haven't tested it on windoze or other OS-flavors. So you mileage may vary…

The code and some more info with some screenshots are available at:

https://github.com/franks42/clj-ns-browser

Finally, kudos to Dave Ray and his Seesaw - fantastic tool and near real-time support on the mailing list.
(this has essentially been a 2 week project after Clojure-Conj/West - an "after the kids are asleep" project - no experience with Swing… a testament of how good seesaw is as an abstraction tool…)

Please let me know if it works for you, and suggestions and feedback are more than welcome.

Enjoy, FrankS.

Shantanu Kumar

unread,
Apr 5, 2012, 2:38:22 AM4/5/12
to Clojure


On Apr 5, 10:56 am, Frank Siebenlist <frank.siebenl...@gmail.com>
wrote:
Checked this out few days ago. Impressive and very nice!

Shantanu

Changa Damany Imara

unread,
Apr 5, 2012, 7:06:51 PM4/5/12
to clo...@googlegroups.com, seesa...@googlegroups.com, Frank Siebenlist
I believe there's a typo in your announcement:

 :dev-development [[clj-ns-browser "1.0.0"]]
  
should be 

 :dev-dependencies [[clj-ns-browser "1.0.0"]

Great stuff especially for someone with no Swing experience!

Frank Siebenlist

unread,
Apr 5, 2012, 7:14:49 PM4/5/12
to Changa Damany Imara, Frank Siebenlist, clo...@googlegroups.com, seesa...@googlegroups.com
Correct - thanks for catching that - should have c&p'ed ;-)

-FrankS.

Jeff Rose

unread,
Apr 6, 2012, 10:38:52 AM4/6/12
to Clojure
Cool, this will be helpful when exploring a new library. It would be
nice if the namespace column could optionally use a tree though,
rather than expanding everything to a single list.

Thanks,
Jeff

On Apr 5, 6:56 am, Frank Siebenlist <frank.siebenl...@gmail.com>
wrote:

Laurent PETIT

unread,
Apr 6, 2012, 11:50:19 AM4/6/12
to clo...@googlegroups.com
2012/4/6 Jeff Rose <ros...@gmail.com>

Cool, this will be helpful when exploring a new library.  It would be
nice if the namespace column could optionally use a tree though,
rather than expanding everything to a single list.

Yes, having a tree is what the Counterclockwise namespace browser does.
I never thought of providing it as a separate library, since it is based strongly on Eclipse libraries, and especially SWT, which does not come "for free" as does Swing.

I am impressed by what have been put on this namespace browser, tho, lots of things to "steal" for CCW :-) (especially the bonu integration with the external doc examples, etc.).

Keep up the good work!

-- Laurent

Lars Nilsson

unread,
Apr 6, 2012, 12:01:14 PM4/6/12
to clo...@googlegroups.com
On Thu, Apr 5, 2012 at 1:56 AM, Frank Siebenlist
<frank.si...@gmail.com> wrote:
> Caveat… it all works well on my MacOSX, but I have seen some issues with Lubuntu and missing "unloaded namespaces" - also I haven't tested it on windoze or other OS-flavors. So you mileage may vary…

Got it working fine on Linux. Looks really nice. :) On Windows, my
primary platform, the text is garbled in all text boxes and lists
(drop-down menus and static strings are ok). Even the text that I type
into, say, the namespace text field gets garbled. If I try typing
"clojure", I end up with "clnjtqe". Copying the text help doc text and
pasting into a text editor shows it correctly, so there's possibly
some kind of character encoding mismatch somewhere. Not sure what else
I can add..

Sample problem:

[Expected display]
clojure.core - Namespace

Fundamental library of the Clojure language

[Actual display]
clnjtqe.cnqe - Na'eroace

Ftmda'emsal libqaqx nf she Clnjtqe lamgtage

Lars Nilsson

Frank Siebenlist

unread,
Apr 6, 2012, 12:29:58 PM4/6/12
to clo...@googlegroups.com, Frank Siebenlist
Interesting "feature" on windoze… ;-)

One thing that may cause that is the Inconsolata font that I used as a fixed-width font to display most text. (not sure what happens if it's not installed… should just substitute an other font…)

Could you please try to install that font on your windows machine and try again?
(I don't have any windows box available for testing)

-FrankS.

> --
> 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

Lars Nilsson

unread,
Apr 6, 2012, 12:37:57 PM4/6/12
to clo...@googlegroups.com
Well, as it turns out, I installed Inconsolata just yesterday, along
with a couple of others, exploring alternatives to Courier New.
Uninstalling Inconsolata results in sdoc displaying the text
correctly.

Thanks for a very nifty tool. :)

Lars Nilsson

Frank Siebenlist

unread,
Apr 6, 2012, 12:46:14 PM4/6/12
to clo...@googlegroups.com, Frank Siebenlist
Interesting - you did the opposite of what I asked and still we found the issue ;-)

… which also confirms that there is something wrong with that Inconsolata font definition as it also garbles my readable text in Aquamacs to gibberish much worse than you showed - was blaming Aquamacs, but now the font may be the culprit - too bad because I love the design.

-FrankS.

thenwithexpandedwingshesteershisflight

unread,
May 16, 2012, 9:16:21 PM5/16/12
to clo...@googlegroups.com, seesa...@googlegroups.com, Frank Siebenlist
I get NoSuchMethodError org.apache.http.conn.ssl.SSLSocketFactory.<init>(Lorg/apache/http/conn/ssl/TrustStrategy;)V  clj-http.core/fn--5014 (core.clj:64)

Andy Fingerhut

unread,
May 16, 2012, 9:34:44 PM5/16/12
to clo...@googlegroups.com, seesa...@googlegroups.com, Frank Siebenlist
Did you use the instructions under "Install & Start-up" on this page?

https://github.com/franks42/clj-ns-browser

Also, what OS are you using (and if Windows, are you using Cygwin, too?), and what do you get as output of the command "lein version"?

Thanks,
Andy

thenwithexpandedwingshesteershisflight

unread,
May 17, 2012, 9:12:35 PM5/17/12
to clo...@googlegroups.com, seesa...@googlegroups.com, Frank Siebenlist
it's ok I found the problem: it was due to another dependency, Aleph 0.2.1-SNAPSHOT, which depends on Apache HTTP components which are older versions than those used by ns-browser

Lee Hinman

unread,
May 18, 2012, 7:39:48 PM5/18/12
to clo...@googlegroups.com, seesa...@googlegroups.com, Frank Siebenlist

On Thursday, May 17, 2012 7:12:35 PM UTC-6, thenwithexpandedwingshesteershisflight wrote:
it's ok I found the problem: it was due to another dependency, Aleph 0.2.1-SNAPSHOT, which depends on Apache HTTP components which are older versions than those used by ns-browser


I have a pull request in to fix this for aleph [1].

- Lee

Lee Hinman

unread,
May 18, 2012, 7:41:19 PM5/18/12
to clo...@googlegroups.com, seesa...@googlegroups.com, Frank Siebenlist

Roberto Mannai

unread,
May 19, 2012, 4:47:13 AM5/19/12
to clo...@googlegroups.com
I got the error:

user=>  (use 'clj-ns-browser.sdoc)
ClassNotFoundException com.fasterxml.jackson.core.JsonFactory
  java.net.URLClassLoader$1.run (URLClassLoader.java:366)

Should I add any jackson dependency? I followed these instructions on Windows / lein 1.7:

    ;; Leiningen version 1
    :dev-dependencies [[clj-ns-browser "1.2.0"]]

$ lein deps $ lein repl user=> (use 'clj-ns-browser.sdoc)


Reply all
Reply to author
Forward
0 new messages