Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-12-02 Thread guns
On Mon 2 Dec 2013 at 12:42:46AM -0800, Patrick Kristiansen wrote:

 On Sun, Dec 1, 2013, at 05:16 PM, guns wrote:

  I hope you find this information useful. Exactly one year ago I
  became very unsatisfied with Vim for working with Clojure, and toyed
  with Emacs for a bit (evil-mode). It was nice, but I decided to stay
  with Vim and create the tools that I felt I was missing. Today, I am
  a very happy hacker!

 Well, I'm familiar with both your static Clojure files for Vim (which
 I know Meikel Brandmeyer is the original author of) and vim-sexp, and
 these make me a happy hacker too :-)

Ah, sorry for the lengthy ad for vim-sexp then :)

 Thanks for your work. I really appreciate it. Especially thanks for
 getting good enough to write VimScript, which I haven't had the
 courage for yet. ;-)

Yes, VimScript is pretty terrible; it actually reminds me quite a bit of
PHP. When Github used to list the supposed favorite languages of users,
my top language was listed as VimL, which was embarassing.

That said, there's still lots of low-hanging fruit as far as Vim/Clojure
plugins, so such projects are well-appreciated the dozens of us in the
community.

Thanks for trying Slamhound!

guns


pgpWCbf66WU2n.pgp
Description: PGP signature


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-12-01 Thread Ruslan Prokopchuk
Does it work with ClojureScript? If yes, how should I process? Anyway, 
thanks for the great tool!

On Saturday, November 30, 2013 6:14:36 AM UTC+2, guns wrote:

 Hello, 

 I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing 
 ns rewriting tool. 

 ;; ~/.lein/profiles.clj 
 {:user {:dependencies [[slamhound 1.5.0]]}} 

 This is a *major* bugfix release. If you've tried Slamhound in the past 
 and felt frustrated, now is a great time to give it another try. 

 If you're unfamiliar with Slamhound, I've posted a short screencast 
 here: 

 https://vimeo.com/80650659 

 Many thanks to Phil Hagelberg for allowing me to take the reins for this 
 release. 

 Enhancements since the last version include: 

 - Greatly improved detection and disambiguation of missing ns 
   references. Slamhound is now much better at DWIM. 

 - References in the existing ns form are always preferred over other 
   candidates on the classpath. 

 - Mass-referred namespaces (via :use or :refer :all) are preserved 
   as (:require [my.ns :refer :all]). Simply remove it from the ns 
   form to get a vector of explicit refers. 

 - File comment headers, ns metadata maps, docstrings, and :require 
   flags (:reload et al), are correctly preserved. 

 - Multiple options per require libspec are emitted correctly. 
   e.g. (:require [clojure.test :as t :refer [deftest]]) 

 - Classes created via defrecord/deftype etc are correctly found. 

 - Capitalized vars that shadow class names are no longer ignored. 

 A full changelog is available here: 

 https://github.com/technomancy/slamhound/blob/master/CHANGES 

 Finally, for Vim users there is a new plugin for Slamhound integration: 

 https://github.com/guns/vim-slamhound 

 It was always easy to use Slamhound from fireplace.vim, but now it's 
 just a Pathogen infect away. 

 Cheers, 

 guns 


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-12-01 Thread guns
On Sun 1 Dec 2013 at 01:24:15AM -0800, Ruslan Prokopchuk wrote:

 Does it work with ClojureScript? If yes, how should I process?

I'm sorry to say it does not.

However, as the CLJS compiler is more accessible than the Clojure
compiler, I imagine CLJS would be the first candidate for a hypothetical
future version of Slamhound that uses static analysis.

I hope to give this a try in the future, if someone else doesn't get to
it first!

guns


pgp9YKuS_RKFV.pgp
Description: PGP signature


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-12-01 Thread Patrick Kristiansen
Great work!

Regarding the screencast: I would be very interested to hear about your Clojure 
development setup with Vim, especially the plugins and configuration you are 
using. 

I see you are using some sort of split view with Vim on top and a REPL at the 
bottom. Is that GNU screen split in two or something?

Best regards,
Patrick

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-12-01 Thread guns
On Sun 1 Dec 2013 at 02:31:54PM -0800, Patrick Kristiansen wrote:

 Great work!

Thank you for the compliment :). Slamhound is a great tool, so I hope I
can convince more people to try it out.

 Regarding the screencast: I would be very interested to hear about
 your Clojure development setup with Vim, especially the plugins and
 configuration you are using.

 I see you are using some sort of split view with Vim on top and a REPL
 at the bottom. Is that GNU screen split in two or something?

The split view is a tmux feature. I typically run a headless nREPL in
one pane, then use the zoom feature to focus on the pane running Vim.

I was once a GNU screen user, but tmux is superior in most aspects, and
also sports some of the prettiest C I've ever seen.


As for Vim, version 7.3.803+ now ships with Clojure runtime files¹,
which I use together with fireplace.vim².

Many people don't know that fireplace exposes a generic eval function³
that makes writing Vim-nREPL plugins extremely easy. For instance,
vim-slamhound is essentially just this bit of VimScript:

```
function! slamhound#reconstruct(file, textwidth)
let file = escape(a:file, '')
let tw = a:textwidth  1 ? 80 : a:textwidth
call fireplace#eval(
\   (require 'slam.hound 'clojure.pprint)
\ . '(let [file (clojure.java.io/file ' . file . ')]'
\ . '  (binding [clojure.pprint/*print-right-margin* ' . tw . ']'
\ . '(slam.hound/swap-in-reconstructed-ns-form file)))'
\ )
edit
endfunction

command -bar Slamhound call slamhound#reconstruct(expand('%'), textwidth)
```

As Vim users we have to settle for building strings rather than
composing S-expressions, but this works quite well despite.


Finally, I use vim-sexp⁴ for manipulating code. I wrote this
plugin earlier in the year because I wanted to work with Clojure's
S-expressions as first-class text-objects.

The builtin bracket and string text objects are often lacking in subtle
ways, so I spent a bit of time making text objects for all three types
of compound forms, patterns and strings, comments, and a generic element
type. Combining these with Vim's operators makes hacking on Clojure a
very pleasant experience.

Vim-sexp also provides commands for wrapping, splicing, raising,
capturing, emitting, and moving S-expressions, as well as paredit-like
bracket and quote insertion (i.e. balanced insert, auto-insertion of
leading and trailing spaces).

Unlike paredit.el, however, vim-sexp does *not* try very hard at all to
keep brackets and quotes balanced, since that is not very Vim-like. IMHO
manipulating S-expressions in Vim should generally be done precisely
with operator + text-object, not sloppily with the backspace key.

I had hoped to release a screencast on vim-sexp months ago, but I never
did finish it. When I do complete it, I plan on announcing it to the
VimClojure mailing list⁵, which is recommend for discussions specific to
Vim and Clojure.


I hope you find this information useful. Exactly one year ago I became
very unsatisfied with Vim for working with Clojure, and toyed with Emacs
for a bit (evil-mode). It was nice, but I decided to stay with Vim and
create the tools that I felt I was missing. Today, I am a very happy
hacker!

Cheers,
guns


¹ Otherwise available at https://github.com/guns/vim-clojure-static
  courtesy of Meikel Brandmeyer, the primary author of these files.

² https://github.com/tpope/vim-fireplace

³ 
https://github.com/guns/vim-fireplace/blob/master/plugin/fireplace.vim#L525-L527

⁴ https://github.com/guns/vim-sexp

⁵ https://groups.google.com/forum/#!forum/vimclojure


pgpa87x6to9IW.pgp
Description: PGP signature


[ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Эльдар Габдуллин
Awesome work, man!

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread r0man
This is very cool. Thanks!

On Saturday, November 30, 2013 5:14:36 AM UTC+1, guns wrote:

 Hello, 

 I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing 
 ns rewriting tool. 

 ;; ~/.lein/profiles.clj 
 {:user {:dependencies [[slamhound 1.5.0]]}} 

 This is a *major* bugfix release. If you've tried Slamhound in the past 
 and felt frustrated, now is a great time to give it another try. 

 If you're unfamiliar with Slamhound, I've posted a short screencast 
 here: 

 https://vimeo.com/80650659 

 Many thanks to Phil Hagelberg for allowing me to take the reins for this 
 release. 

 Enhancements since the last version include: 

 - Greatly improved detection and disambiguation of missing ns 
   references. Slamhound is now much better at DWIM. 

 - References in the existing ns form are always preferred over other 
   candidates on the classpath. 

 - Mass-referred namespaces (via :use or :refer :all) are preserved 
   as (:require [my.ns :refer :all]). Simply remove it from the ns 
   form to get a vector of explicit refers. 

 - File comment headers, ns metadata maps, docstrings, and :require 
   flags (:reload et al), are correctly preserved. 

 - Multiple options per require libspec are emitted correctly. 
   e.g. (:require [clojure.test :as t :refer [deftest]]) 

 - Classes created via defrecord/deftype etc are correctly found. 

 - Capitalized vars that shadow class names are no longer ignored. 

 A full changelog is available here: 

 https://github.com/technomancy/slamhound/blob/master/CHANGES 

 Finally, for Vim users there is a new plugin for Slamhound integration: 

 https://github.com/guns/vim-slamhound 

 It was always easy to use Slamhound from fireplace.vim, but now it's 
 just a Pathogen infect away. 

 Cheers, 

 guns 


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Alex Baranosky
Hi Guns,

Nice to see you carrying the Slamhound torch forward.  Good work.


On Sat, Nov 30, 2013 at 2:03 AM, r0man roman.sche...@burningswell.comwrote:

 This is very cool. Thanks!


 On Saturday, November 30, 2013 5:14:36 AM UTC+1, guns wrote:

 Hello,

 I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing
 ns rewriting tool.

 ;; ~/.lein/profiles.clj
 {:user {:dependencies [[slamhound 1.5.0]]}}

 This is a *major* bugfix release. If you've tried Slamhound in the past
 and felt frustrated, now is a great time to give it another try.

 If you're unfamiliar with Slamhound, I've posted a short screencast
 here:

 https://vimeo.com/80650659

 Many thanks to Phil Hagelberg for allowing me to take the reins for this
 release.

 Enhancements since the last version include:

 - Greatly improved detection and disambiguation of missing ns
   references. Slamhound is now much better at DWIM.

 - References in the existing ns form are always preferred over other
   candidates on the classpath.

 - Mass-referred namespaces (via :use or :refer :all) are preserved
   as (:require [my.ns :refer :all]). Simply remove it from the ns
   form to get a vector of explicit refers.

 - File comment headers, ns metadata maps, docstrings, and :require
   flags (:reload et al), are correctly preserved.

 - Multiple options per require libspec are emitted correctly.
   e.g. (:require [clojure.test :as t :refer [deftest]])

 - Classes created via defrecord/deftype etc are correctly found.

 - Capitalized vars that shadow class names are no longer ignored.

 A full changelog is available here:

 https://github.com/technomancy/slamhound/blob/master/CHANGES

 Finally, for Vim users there is a new plugin for Slamhound integration:

 https://github.com/guns/vim-slamhound

 It was always easy to use Slamhound from fireplace.vim, but now it's
 just a Pathogen infect away.

 Cheers,

 guns

  --
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Bob Hutchison

On Nov 29, 2013, at 11:14 PM, guns s...@sungpae.com wrote:

 Hello,
 
 I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing
 ns rewriting tool.
 
;; ~/.lein/profiles.clj
{:user {:dependencies [[slamhound 1.5.0]]}}
 
 This is a *major* bugfix release. If you've tried Slamhound in the past
 and felt frustrated, now is a great time to give it another try.
 

This is a great idea… but I’m having an awful time getting it to work.

Two problems:

1) if I try it on junky experimental clojure programs, files that execute when 
loaded and don’t do anything serious but explore some feature of clojure, I’m 
getting this error when running from vim:

Error detected while processing function 
slamhound#reconstruct..fireplace#eval..fireplace#session_eval..SNR37_eval..86:
line   38:
E605: Exception not caught: Error running Clojure: Error: Could not 
find or load main class clojure.main^@

   And from the command line it silently does nothing.

2) most of my real code, maybe all since I can’t find anything else, uses 
ring/compojure and midge. Midje is used in-line (the facts are in the source 
file not in the test directory).
  — from inside vim, again since Slamhound never terminates, I’ve got to 
Control-C out of it, and consequently the buffer is never updated.
  — when I run Slamhound from the command line:
  — it never terminates
  — despite not terminating, it does update all but one of the files 
properly
  — it does not handle the file(s) that start ring servers and complains:
 Failed to reconstruct: #File src/jel/server.clj
 Address already in use
 This is even if the address really isn’t in use, I think it’s trying 
to ‘run’ server.clj a second time. And it doesn’t terminate either.

However, the changes it makes to the namespaces are excellent!

I tried updating both fireplace and clojure-static but that made no difference.

Cheers,
Bob

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread guns
On Sat 30 Nov 2013 at 09:29:30AM -0500, Bob Hutchison wrote:

 This is a great idea… but I’m having an awful time getting it to work.

Hello Bob,

I'm sorry to hear that setup is problematic. If it's trouble for you,
it's bound to be trouble for others. Would you be willing to open a new
issue on the bug tracker?

https://github.com/technomancy/slamhound/issues/new

Just copying and pasting your email would be very helpful. I suspect
there are a couple of hidden problems that are general to all users, so
I am eager to help you.

 However, the changes it makes to the namespaces are excellent!

I'm glad to hear there is some good news!

guns


pgpKzv1zuBJH4.pgp
Description: PGP signature


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Curtis Gagliardi
Great screencast, thanks.  Will definitely check this release out, I tried 
it a few months ago and failed to get it to run.  Looks really promising 
though.  

On Friday, November 29, 2013 8:14:36 PM UTC-8, guns wrote:

 Hello, 

 I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing 
 ns rewriting tool. 

 ;; ~/.lein/profiles.clj 
 {:user {:dependencies [[slamhound 1.5.0]]}} 

 This is a *major* bugfix release. If you've tried Slamhound in the past 
 and felt frustrated, now is a great time to give it another try. 

 If you're unfamiliar with Slamhound, I've posted a short screencast 
 here: 

 https://vimeo.com/80650659 

 Many thanks to Phil Hagelberg for allowing me to take the reins for this 
 release. 

 Enhancements since the last version include: 

 - Greatly improved detection and disambiguation of missing ns 
   references. Slamhound is now much better at DWIM. 

 - References in the existing ns form are always preferred over other 
   candidates on the classpath. 

 - Mass-referred namespaces (via :use or :refer :all) are preserved 
   as (:require [my.ns :refer :all]). Simply remove it from the ns 
   form to get a vector of explicit refers. 

 - File comment headers, ns metadata maps, docstrings, and :require 
   flags (:reload et al), are correctly preserved. 

 - Multiple options per require libspec are emitted correctly. 
   e.g. (:require [clojure.test :as t :refer [deftest]]) 

 - Classes created via defrecord/deftype etc are correctly found. 

 - Capitalized vars that shadow class names are no longer ignored. 

 A full changelog is available here: 

 https://github.com/technomancy/slamhound/blob/master/CHANGES 

 Finally, for Vim users there is a new plugin for Slamhound integration: 

 https://github.com/guns/vim-slamhound 

 It was always easy to use Slamhound from fireplace.vim, but now it's 
 just a Pathogen infect away. 

 Cheers, 

 guns 


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Bob Hutchison

On Nov 30, 2013, at 10:59 AM, guns s...@sungpae.com wrote:

 On Sat 30 Nov 2013 at 09:29:30AM -0500, Bob Hutchison wrote:
 
 This is a great idea… but I’m having an awful time getting it to work.
 
 Hello Bob,
 
 I'm sorry to hear that setup is problematic. If it's trouble for you,
 it's bound to be trouble for others. Would you be willing to open a new
 issue on the bug tracker?
 
 https://github.com/technomancy/slamhound/issues/new

I’ve split my email into two and have created issues 58 and 59.

 
 Just copying and pasting your email would be very helpful. I suspect
 there are a couple of hidden problems that are general to all users, so
 I am eager to help you.

The next week or so will be busy, but I’ll do what I can to help.

 
 However, the changes it makes to the namespaces are excellent!
 
 I'm glad to hear there is some good news!

Certainly was :-)

 
guns

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-29 Thread guns
Hello,

I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing
ns rewriting tool.

;; ~/.lein/profiles.clj
{:user {:dependencies [[slamhound 1.5.0]]}}

This is a *major* bugfix release. If you've tried Slamhound in the past
and felt frustrated, now is a great time to give it another try.

If you're unfamiliar with Slamhound, I've posted a short screencast
here:

https://vimeo.com/80650659

Many thanks to Phil Hagelberg for allowing me to take the reins for this
release.

Enhancements since the last version include:

- Greatly improved detection and disambiguation of missing ns
  references. Slamhound is now much better at DWIM.

- References in the existing ns form are always preferred over other
  candidates on the classpath.

- Mass-referred namespaces (via :use or :refer :all) are preserved
  as (:require [my.ns :refer :all]). Simply remove it from the ns
  form to get a vector of explicit refers.

- File comment headers, ns metadata maps, docstrings, and :require
  flags (:reload et al), are correctly preserved.

- Multiple options per require libspec are emitted correctly.
  e.g. (:require [clojure.test :as t :refer [deftest]])

- Classes created via defrecord/deftype etc are correctly found.

- Capitalized vars that shadow class names are no longer ignored.

A full changelog is available here:

https://github.com/technomancy/slamhound/blob/master/CHANGES

Finally, for Vim users there is a new plugin for Slamhound integration:

https://github.com/guns/vim-slamhound

It was always easy to use Slamhound from fireplace.vim, but now it's
just a Pathogen infect away.

Cheers,

guns


pgprTWW8hPLqL.pgp
Description: PGP signature