freenode/#lisp - IRC Chatlog
Search
21:21:37
devon
rme: Yes, maybe SBCL CFFI wouldn't warn. Ah, fixed by (with-foreign-slots (#1# #2# #3#) ...) -> (with-foreign-slots (#1# #2# (:struct #3)#) ...)
21:39:18
kuwzre
is there a way to get company mode to support common lisp? I am using slime-company, but I wish that I could get the same sort of behavior when editing normal cl files
22:41:40
scymtym
then (setf (foo 2 3 4) 1) where new-value will be bound to 1 and more parameters to 2 3 4
22:43:44
ebrasca
I like to make someting like (read-short-name array) and (setf (read-short-name array) "")
22:46:49
scymtym
if i understand correctly, that would be (defun (setf read-short-name) (new-value array) ...)
23:10:23
jasom
there are some cases in which defun (setf ...) will not work, for those you can use define-setf-expander
23:18:41
jasom
the usual rule of "never use a macro when a function will do" applies. If you can think of a function that will work, you don't need a setf-expander
1:52:48
vtomole
Is there tool for seeing how objects are consed by read? e.g, an input of (+ 1 2) gives (cons '+ (cons 1 (cons 2 '())))?
2:02:12
Bike
also, it's traditional to name constants as +sempty+ to distinguish them from run of the mill variables.
2:06:07
Bike
i wouldn't phrase it as "surrounding", but (foo ...) is an operation, and if foo is a function it's a function call.
2:06:31
Bike
it could also be a macro form, like (defun ...) is, or a special operation, like (if ...)
2:07:30
k-hos
you will eventually come across things like; '(1 2 3) which isn't a function call, because of the single quote
2:10:15
Bike
if you want to understand the semantics in detail i recommend writing a simple evaluator
4:07:51
jasom
LdBeth: most lisp implementations provide a way to run a program. It is possible that uiop:run-program will do what you need
4:11:01
jasom
hmm (uiop:run-program "htop" :output :interactive) didn't work as I expected, so maybe not
4:11:02
PuercoPop
jasom: My knowledge of terminals is not very deep. But I would imagine that the REPL wouldn't play nice with a program that takes the whole screen for a while. Like htop or vim.
4:11:36
jasom
PuercoPop: the REPL is uninvolved until the form returns in most implementations, so I wouldn't think that would be a problem
4:12:11
jasom
(uiop:run-program "htop" :output :interactive :input :interactive) ;; works on sbcl on MyMachine(tm)
4:12:49
jasom
It does not work on CCL, which makes at least some sense because ccl has a separate REPL thread IIRC
4:17:09
jasom
PuercoPop: for fancy REPLs there is a good chance that the program won't return the tty to the same state as before it was run, so those might have a problem. SBCL's REPL is so minimal it's not a problem
4:17:42
jasom
LdBeth: this works on every lisp I tried except ccl: (uiop:run-program "htop" :output :interactive :input :interactive)
4:18:27
PuercoPop
I've ran into issues with two programs writing to the same terminal (webpacker and vis, the editor).
4:19:02
jasom
There's a patchset for CCL that doesn't spawn a separate thread for tty interactions, but it's not maintained anymore
4:20:14
jasom
ealfonso: there are several, each with different strengths and weaknesses. I usually just write directly on top of clack because I'm a control freak.
4:20:46
PuercoPop
LdBeth: you might be interested in cl:ed, http://www.lispworks.com/documentation/HyperSpec/Body/f_ed.htm
6:00:15
edgar-rft
iqubic: some mac-specific GUI stuff, see https://en.wikipedia.org/wiki/Cocoa_(API)