In order to clean up fasls you can run on the Sly REPL the following command:
(slynk-asdf:delete-system-fasls :package-name)
I am using Slime and SBCL. How would you achieve the same using SLIME?
Thanks.
M-x slime-delete-system-fasls
or
(swank:delete-system-fasls :package-name)
edit: a third way, from the REPL, is to type a "comma" command: type , then delete-system-fasls (completion is available).
Related
Can this be done in R? where am R script can be run without interruption by any function.
This Do you want to proceed? [y/N]: was generated from renv::restore(), but regardless, can all promotes be ignored.
Any input is helpful, Thanks.
Afaik all renv commands (restore() definitely) have the prompt argument:
prompt
Boolean; prompt the user before taking any action? For backwards compatibility, confirm is accepted as an alias for prompt.
Use prompt=FALSE (default is interactive()) to turn off the prompting.
(ql:quickload "aserve") fails
I'm trying to install AllegroServe. According to http://quickdocs.org/portableaserve/ and to this SO thread the simplest way to get aserve would be to get it with quicklisp: (ql:quickload "aserve")
But (ql:quickload "aserve") fails yielding the following error in the debugger buffer:
COMPILE-FILE-ERROR while compiling
#<IRONCLAD-SOURCE-FILE "ironclad" "src" "digests" "digest">
[Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]
Whereas in the REPL it says:
; Loading "aserve"
; caught ERROR: READ error during COMPILE-FILE: Symbol "BIGNUM-TYPE"
; not found in the SB-BIGNUM package. Line: 53, Column: 52,
; File-Position: 2151 Stream: #<SB-INT:FORM-TRACKING-STREAM for
; "file
; C:\\Users\\user\\AppData\\Roaming\\quicklisp\\dists\\quicklisp\\software\\ironclad_0.33.0\\src\\digests\\digest.lisp"
; {25AFCD91}>
What I've tried so far
Apparently ironclad is another package, a "cryptographic toolkit written in pure Common Lisp". I downloaded ironclad-v0.34 from http://quickdocs.org/ironclad/ and even found digest.lisp and digests.lisp in the ironclad folder which made me think that I am on the right track.
My problem is I don't no where to go from here. How and where do I "install" ironclad?
Quickdocs says
[ironclad] comes with an ASDF system definition, so (asdf:oos 'asdf:load-op
:ironclad) should be all that you need to get started. The testsuite
can be run by substituting asdf:test-op for asdf:load-op in the form
above.
but since I'm not familiar with asdf I don't know what to make of it.
Am I even on the right track? Is installing the ironclad package the right way to make the error COMPILE-FILE-ERROR while compiling #<IRONCLAD-SOURCE-FILE "ironclad" "src" "digests" "digest">go away? If so what do I do with the ironclad-v0.34 folder?
(I'm using sbcl on a windows 10 machine.)
Thanks to #jkiiski leading me down the right path I was able to install aserve. The problem was indeed an old version of ironclad which, as #jkiiski pointed out, was using SB-BIGNUM:BIGNUM-TYPE which had been removed from SBCL.
However, the way I updated ironclad is probably NOT(!) a good way because I did it all manually (error prone).
Not knowing how quicklisp works exactly I searched for every occurence of ironclad-0.33.0 and replaced it with ironclad-v0.34, which meant replacing
the .../dists/quicklisp/software/ironclad-0.33.0 folder with .../dists/quicklisp/software/ironclad-v0.34
the irconcladd-0.33.0 tgz in .../dists/quicklisp/archives/ with ironclad-v0.34.tgz
the entry dists/quicklisp/software/ironclad-0.33.0/ in .../dists/quicklisp/installed/releases/ironclad.txt with dists/quicklisp/software/ironclad-v0.34/.
I also updated ironclad.txt and ironclad-text.txt in .../dists/quicklisp/installed/systems/
Well, it worked, but I only did it this way because I don't know any better (but am sure there has to be a better way).
I am trying to run the following command from Julia:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/.julia/v0.3/Smile/deps/downloads
When I run it as-is it tries to replace $LD_LIBRARY_PATH with a local variable.
When I escape the $, it puts quotes around the command, which invalidates it.
julia> cmd = `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/tim/.julia/v0.3/Smile/deps/downloads`
ERROR: LD_LIBRARY_PATH not defined
julia> cmd = `export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/home/tim/.julia/v0.3/Smile/deps/downloads`
`export 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/tim/.julia/v0.3/Smile/deps/downloads'`
I would like to run the command in a form similar to:
run(`export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$newpath`)
How do I properly handle the dollar sign?
Thank you
*note: pasting the command directly into terminal and running it does work
In Julia, backticks are not completely equivalent to running the corresponding command at the shell. You can't interpolate environmental variables with $ (although $(get(ENV, "varname", "") should match the shell's behavior), and export is a shell built-in, not a command, so I don't think you can run it. Also, even if backticks shelled out, export would only change the environment of the subshell, not the calling process.
You should be able to set LD_LIBRARY_PATH from Julia as:
ENV["LD_LIBRARY_PATH"] = "$(get(ENV, "LD_LIBRARY_PATH", "")):$newpath"
but you should avoid this if possible. If your intent is to ccall a specific library, you can pass the library path directly to ccall, perhaps using find_library as you indicated in a comment if you don't know the full path advance. If you need to set LD_LIBRARY_PATH because the library needs to load other libraries, I'm not sure if there's a better way, but note that LD_LIBRARY_PATH is platform-specific. You might be able to dlopen the dependent libraries first, but I haven't tested that.
I understand from the following resources:
http://www.emacswiki.org/emacs/ESSAuto-complete
http://www.emacswiki.org/emacs/AutoComplete
Emacs autocomplete-mode extension for ESS and R
Is it possible to get code completion for R in Emacs ESS similar to what is available in Rstudio?
...that I should have access to tooltips for auto-complete help in emacs when using ESS for R development. The last link additionally specifies that it should work out of the box with the latest ESS, and:
From version 12.03 ESS integrates out of the box with auto-complete
package.
Three sources ‘ac-source-R-args’, ‘ac-source-R-objects’ and
‘ac-source-R’ are included in ESS distribution. The latest combines
previous two and makes them play nicely together.
I know that in general, my emacs tooltips are possible because they appear correctly with my python jedi setup in emacs.
However, my emacs auto-complete does not work. Instead, there is a buffer at the bottom:
instead of this, with the help superimposed on the working buffer:
And I have the following in my init.el:
(require 'auto-complete)
(setq ess-use-auto-complete t)
(ess-toggle-underscore nil)
I have the following versions of:
ess 20131207.1141 installed No description available.
ess-R-data-view 20130509.458 installed Data viewer for GNU R
ess-R-object-popup 20130302.336 installed popup description of R object
auto-complete 20140208.653 installed Auto Completion for GNU Emacs
What am I missing?
UPDATE 1
Here's my init for ESS stuff. This produces completions in a buffer, but not in a tooltip, where some configuration options from the manual have been added. (I have now tried all permutations of commenting and not commenting all of these):
(require 'auto-complete)
(global-auto-complete-mode)
(require 'auto-complete-config)
(ac-config-default)
(require 'ess-site)
(setq ess-use-auto-complete t)
(setq ac-auto-start 2)
(setq ac-auto-show-menu 0.2)
(ess-toggle-underscore nil)
UPDATE 2
Similar question here, but the same solution is suggested which did not actually result in tooltips on my setup. But it suggests to me this might be a platform issue? The poster there was also on Ubuntu 12.04 as I am---is it possible the solutions that worked for VitoshKa, Alex Vorobiev, and Iqbal Ansari were on a different platform? Are you guys using OS X?
UPDATE 3
Maybe other diagnostics:
ac-source-R is a variable defined in `ess-r-d.el'.
Its value is ((prefix . ess-ac-start)
(candidates . ess-ac-candidates)
(document . ess-ac-help))
Documentation:
Combined ad-completion source for R function arguments and R objects
ac-source-R-objects is a variable defined in `ess-r-d.el'.
Its value is ((prefix . ess-symbol-start)
(candidates . ess-ac-objects)
(document . ess-ac-help-object))
Documentation:
Auto-completion source for R objects
ac-source-R-args is a variable defined in `ess-r-d.el'.
Its value is ((prefix . ess-ac-start-args)
(candidates . ess-ac-args)
(document . ess-ac-help-arg))
Documentation:
Auto-completion source for R function arguments
[back]
where the variables for ess-ac[TAB] are only...
Click <mouse-2> on a completion to select it.
In this buffer, type RET to select the completion near point.
Possible completions are:
ess-ac-R-argument-suffix
ess-ac-sources
So maybe the problem is my ESS install is lacking all ess-ac-* things defined above, like ess-ac-args, etc?
My auto-complete configuration also has
(require 'auto-complete-config)
(ac-config-default)
and after that setting ess-use-auto-complete makes ESS show the popup menus.
So as per your comments it turned out that auto-complete was not enabled in your emacs config. So just enable auto-complete by adding something like this in you init file
(load "auto-complete")
(global-auto-complete-mode)
Also for ESS you will need to set ess-use-auto-complete to t something like following would do
(setq ess-use-auto-complete t)
EDIT: ess-use-auto-complete is by default set to t so this step is not really needed.
Also since you found this option confusing I would recommend you to open an issue on the github repo so that the maintainers can improve the documentation (or code) whichever can reduce the confusion.
Auto-complete has a lot of configuration options do read the manual when you get time.
Glad I could help
Don't confuse eldoc with auto-completion. Eldoc is what you have in your screenshot, it shows all arguments of a function without being intrusive. Auto-completion pops up when you start typing stuff and activates after ac-auto-start characters.
I have some problems to call a command line program called molconvert from R using system() in Windows. molconvert is located in "C:\Program Files\ChemAxon\MarvinBeans\bin"
I would then like to invoke system() or shell() to mimick what I would achieve by typing
molconvert pdb "C:\molecule conversions\cembrene A.mol"
at the command prompt and collect the resulting output back to R as in
out=system(...,intern=T)
I seem to have trouble though with the backslashes and the spaces in the paths.
I tried with
dirmolconvert="C:\\Program Files\\ChemAxon\\MarvinBeans\\bin"
shell(shQuote(paste(dirmolconvert,"\\molconvert pdb "C:\\cembrene A.mol",sep="")))
but that gives me "Error: unexpected symbol in ..." and escaping the " also doesn't help. Any thoughts on how I should resolve this?
or
system(paste(dirmolconvert,"\\molconvert pdb \"C:\\cembrene A.mol\"",sep=""), intern=T)
but that gives me
'C:\Program' not found
Any thoughts?
Edit:
Based on the answer below the right way to do this apparently is
inputdir="C:/Users/Ento/Documents/GCMS/molconvert test"
molconvertdir="C:/Program Files/ChemAxon/MarvinBeans/bin"
molecule="cembrene A.mol"
out=system(paste(shQuote(file.path(molconvertdir, "molconvert.bat")),
"pdb",
shQuote(file.path(inputdir,molecule))),intern=T)
You want to use shQuote to quote the path to the executable, not the entire command line. Depending on what your molconvert program expects, you may also want to quote paths that are arguments to it.
system(paste(shQuote(file.path(dirmolconvert, "molconvert.exe")),
"pdb",
shQuote("C:\\molecule conversions\\cembrene A.mol"))
the easiest way to fix this is to use short paths:
for %%a in ("C:\molecule conversions\cembrene A.mol") set "sh_path=%%~dpfnxsa"
or
for %%a in ("C:\Program Files\ChemAxon\MarvinBeans\bin") do set "pf_sh_path=%%~dpfnxsa"
and then to pass %sh_path% and %pf_sh_path% as parameter.