libera/#commonlisp - IRC Chatlog
Search
1:35:37
rumbler31
ok, so someone help me understand. I am under the assumption that functions can't make *particular* changes to their arguments that survive the function call's termination. I don't know exactly what can and can't be done, but for instance, I can change records in an alist inside a function and those changes persist, but adding new records to an alist isn't as easy. I suspect that if I setf the cdr of the alist to be a new alist consisting
1:35:37
rumbler31
of the cdr of the original with the new record appended, that might work, but appending a new record to the head of the list doesn't seem to
1:38:18
rumbler31
so is it fair to say that a copy of *something* is made somewhere that is somehow local to the function, but the copy isn't of the entire structure?
1:40:47
Bike
within the body of the function there is a binding, a lexical binding, from the symbol 'alist' or whatever to the uncopied cons that was passed in. (setf alist ...) only alters that binding.
1:44:23
Bike
it sounds like you're familiar with C++'s copying. it's basically like, if you have void* assoc(cons* alist, ...) { ... alist = cdr(alist); ... }, would you expect that to alter the actual pointed-to object? no.
1:47:47
rumbler31
sometimes I get caught up in details like this, I suspect there is a better way for a function to modify an alist (or any cons) than to (setf (cdr alist) (cons '(a . 1) (cdr alist))
1:48:42
rumbler31
like acons makes a new alist, but inside a function I don't see how to modify the original binding unless that is available in some way, via global or
1:49:47
Bike
if you want to have a function to an alist, usually you'd have a nondestructive function, (defun add (alist ...) (list* ... alist)), and then callers do (setf alist (add alist ...))
1:52:01
rumbler31
raydeejay: what I was originally thinking was that I would be recording results of method calls on objects into an alist, and let the inner function worry about adding a new record if one hadn't been found yet. I suppose I could simply preload the alist with all of the keys, and later remove ones for which no data was found
1:56:07
rumbler31
in the simple case a loop collect will do, but in this case I want to make a framework such that an arbitrary number of collect clauses would fire, but its complicated
3:30:23
pillton
loke__: That is an apt description given the biological warfare occurring inside my family.
3:38:15
loke__
pillton: Biological warfare in the family? That happens at my house too. Plenty of gas attacks happening.
4:26:59
loke__
beach: remember we discussed a few days abo about clim documentation, and how it was difficult to find information on how to build a basic "application" (in the traditional sense)
4:27:43
loke__
Let's say I simply want to create a windows containing a scrolling list of "things" that I can click on. In my case, I wanted to create a UI for potato.
4:28:11
loke__
How would you suggest that I get started. My first attempt was a complete failure because I still don't undersdtand how wuch thing is suppsoed to be built.
4:30:02
beach
The class of your "things" then needs a DEFINE-PRESENTATION-TO-COMMAND-TRANSLATOR if you want them clickable as commands.
4:45:01
beach
It is a fully functional accounting system. The entire thing is 500 lines of code, 200 of which is the CLIM GUI.
4:47:05
beach
If you execute it from the directory of the source, you can then issue the command Read Organization Default (using completion, of course).
5:01:09
loke__
beach: When I do a command, say "new account", I get a prmpt for the name of the account with an OK and Cacnel button below.
5:01:22
loke__
Is there some way to click OK using the keyboard, without having to read for the mouse?
5:43:04
edgar-rft
loke__: lispkit is either <https://github.com/AeroNotix/lispkit> or <https://en.wikipedia.org/wiki/Lispkit_Lisp> or Lisp for kits (in descending order)
9:41:34
Leupold
Has anybody got a link to a guide explaining how to configure the emacs that comes with Lisp in a Box?
9:58:33
jackdaniel
gko: it may conflict with swank from the quicklisp, it is best to use quicklisp package for that: (ql:quicklisp 'quicklisp-slime-helper)
10:02:26
jackdaniel
gko: you put in .emacs.d/init.el: '(load (expand-file-name "~/quicklisp/slime-helper.el"))'
10:06:42
gko
jackdaniel: Oh OK... I'll try that... but why does it work better? Because of the integration with Quicklisp?
10:08:52
jackdaniel
gko: in general slime and swank are two sides of the same coin (developed together)
10:09:03
jackdaniel
but getting slime from melpa may cause, that your slime and swank are out of sync
10:10:05
jackdaniel
slime and swank on quicklisp are guaranteed to be from the same version of the software, so they are in sync
10:12:01
gko
by the way, what's the closest thing to Clojure's Leiningen's "uberjar" in Common Lisp? Is there a tool that would read the .asd file and make a kind of package to ease deployment?
10:13:53
jackdaniel
gko: my favourite solution is "clon" https://github.com/didierverna/clon , there is also buildapp (popular, but limited to sbcl and ccl), cl-launch, uiop has something I think
10:15:05
jackdaniel
if you want to reach the implementation-specific options, you'll have to find it in the appropriate manuals
10:17:08
gko
Typically, I'd develop the stuff on my PC, then deploy on servers that don't have access to the Internet...
10:18:21
jackdaniel
sounds reasonable, quicklisp has a functionlity to create bundles, so you don't need quicklisp to distribute the source code. if you just want to create an executable, as I already said, clon is a good pick imho
10:21:37
Leupold
Does anybody have a good guide for getting a common lisp environment set up in Windows 7?
10:22:41
Leupold
gko: I've been having trouble getting all of that set up on my Windows machine - could you help me troubleshoot it?