swank

Equivalent of 'lein swank' to other Lisp/Scheme implementations with emacs/slime

别等时光非礼了梦想. 提交于 2020-01-02 05:42:06
问题 I've been using emacs/slime for coding lisp, but with Clojure I found 'lein swank'. I must say that it's pretty useful, as I can connect to a server that runs clojure. How about the other Lisp implementations? What Lisp implementations provide the equivalent of 'lein swank' in Clojure? I mean, is there any other Lisp implementations that provide server connectivity so that I use 'M-x slime-connect', not just 'M-x slime'? 回答1: Non-clojure swank backends don't need a lein swank equivalent since

How to reconnect to slime/swank-clojure session?

╄→尐↘猪︶ㄣ 提交于 2019-12-23 12:48:13
问题 It seems that whenever I disconnect from clojure slime session, I cannot reconnect again. I am using leiningen to start the swank session (with lein-swank plugin). So, every time I quit emacs (I know I shouldn't) or reboot/logout I have to restart both slime and swank. Is there a way to re-connect to a slime/clojure-swank session? 回答1: Yes, but you have to tell swank not to close the connection: lein swank 4005 "localhost" :dont-close true Note that you have to supply the port and host name

How can I define the address that swank server should listen to?

点点圈 提交于 2019-12-22 05:53:18
问题 There is no argument for setting the address to bind to when starting swank server: * (describe 'swank:create-server) => ... Lambda-list: (&KEY (PORT DEFAULT-SERVER-PORT) (STYLE *COMMUNICATION-STYLE*) (DONT-CLOSE *DONT-CLOSE*) (CODING-SYSTEM *CODING-SYSTEM*)) ... How can I do it? 回答1: Bind swank::*loopback-interface* to a string containing the ip address for the swank server. It defaults to the localhost ("127.0.0.1"). For security, take care that the swank address is not wide open to the

What does #+#. mean in lisp?

久未见 提交于 2019-12-21 06:56:52
问题 It is almost impossible to google, hence my understanding is limited to contextual clues from reading through the slime source code: perhaps it is part of the object system in common lisp? Something like 'self'? snippet: (cond #+#.(swank-backend::sbcl-with-new-stepper-p) Perhaps this will make it more googleable : pound plus pound // hash plus hash symbol // octothorp plus octothorp 回答1: That's pretty rare to see. #+clim clim:+red+ #-clim mygraphics:+red+ above means that the reader returns

What does the 'swank-clojure' do exactly, and do we have 'swank-SOMETHING_ELSE'?

妖精的绣舞 提交于 2019-12-20 09:56:26
问题 My superficial understanding is that 'swank-clojure' makes 'M-x slime-connect' possible. I mean, it gives a connection to a clojure server something like 'lein swank'. Is my understanding correct? If not, what's the purpose of swank? Then, is there any 'swank-SOMETHING_ELSE' for other lisp like implementations? For example, swank-clisp? Do I need 'swank-clojure' for using SLIME/Clojure with 'M-x slime'? ADDED I found this link pretty useful. 回答1: SLIME and swank form a client server

Workflow for hacking on Clojure libraries using swank-clojure

╄→гoц情女王★ 提交于 2019-12-10 16:11:53
问题 Is there a typical workflow for hacking on Clojure libraries? Say I have my application "Foo" which relies on a third-party library "Bar", which was obtained from a repository, and included in project Foo via lein deps . Then, say I want to hack on library "Bar", so I clone it from github. Now, I would like to hack on my local clone "Bar" while at the same time working on application "Foo" that depends on it. I would like all of the source files for "Bar" to open in Emacs along with all the

Interact with a locally long-running Common Lisp image, possibly daemonized, from the command line

☆樱花仙子☆ 提交于 2019-12-09 10:13:51
问题 How could one interact with a locally long-running Common Lisp image, possibly daemonized, from the command line? I know it is possible to run a Common Lisp function from a Terminal command prompt, I am also aware of this. I would need to do a similar thing, but with a local, already long-running Common Lisp image, being able to poll available functions from the CLI or shell scripts. Is there a way to do that from a CLI, for example calling a function from a bash script, and receiving back

How can I define the address that swank server should listen to?

≡放荡痞女 提交于 2019-12-05 07:34:16
There is no argument for setting the address to bind to when starting swank server: * (describe 'swank:create-server) => ... Lambda-list: (&KEY (PORT DEFAULT-SERVER-PORT) (STYLE *COMMUNICATION-STYLE*) (DONT-CLOSE *DONT-CLOSE*) (CODING-SYSTEM *CODING-SYSTEM*)) ... How can I do it? Bind swank::*loopback-interface* to a string containing the ip address for the swank server. It defaults to the localhost ("127.0.0.1"). For security, take care that the swank address is not wide open to the world as it would leave the computer vulnerable for intrusion. If the goal is to access swank from another

Can an embedded swank-clojure repl access the program it is embedded in?

做~自己de王妃 提交于 2019-12-04 12:56:45
I'm trying to embed a swank-clojure repl into my application for the purpose of connecting while the app is running to muck around with things. However, I'm having trouble figuring out how to access the enclosing environment after starting the repl. Embedding the swank-clojure REPL is easy enough: (ns mytest (:use [swank.swank :exclude [-main]]) (:gen-class)) (defn -main [& args] (let [x 123] (swank.swank/start-repl))) Run the program.. then over in emacs: M-x slime-connect That works fine and I am connected. Now, what I hoped was that this would work: (println x) ;; 123 (what I was hoping for

Embedding swank-clojure in java program

Deadly 提交于 2019-12-04 12:01:18
问题 Based on the Embedding section of http://github.com/technomancy/swank-clojure, I'm using the following to test it out. Is there a better way to do this that doesn't use Compiler? Is there a way to programmatically stop swank? It seems start-repl takes control of the thread. What would be a good way to spawn off another thread for it and be able to kill that thread programatically. import clojure.lang.Compiler; import java.io.StringReader; public class Embed { public static void main(String[]