freenode/#lisp - IRC Chatlog
Search
2:47:03
aeth
So it should be phrased as: If the is just one set, use SETF. This sometimes has a useful return value, too. If there is more than one consecutive set, then unless you need the dependency between them, prefer one PSETF over one SETF (and especially over many SETFs in a row).
2:49:18
aeth
(setf x 42) (psetf x 42 y 53 z 64) (setf x 42 y (+ 11 x) z (+ 11 y)) ; extra caveat: always linebreak... this is one line just for IRC
3:40:46
antonv
hi, does anyone know how to use rowsell for Travis CI today? It fails to install using the install-for-ci.sh (https://github.com/roswell/roswell/issues/463)
3:44:14
ozzloy
Bike, i just did (length (let ((res (list))) (do-external-symbols (sym *PACKAGE*) (when (fboundp sym) (push sym res))) res)) and got 0
3:45:13
ozzloy
i read that it is the default. when i evaluate that, i get #<PACKAGE "COMMON-LISP-USER">
3:45:44
Bike
and is your method named by an exported symbol of cl-user? or, more likely, did you not export it, or define it in some other package?
3:46:52
ozzloy
i'm looking to find all defvar'd and defun'd things, not necessarily things that have been exported
3:47:47
ozzloy
i'm getting a feel for it. seems like it's analogous to a package in java, or a module in racket, etc
3:48:49
Bike
packages are namespaces, so it's similar to some other languages, yes. although you should keep in mind it's strictly a naming thing. for example functions don't "belong to" packages, only their names may.
3:48:49
ozzloy
hmm... when i do all symbols, i get 14150 things. is there a way to see just the ones i've made during a session?
3:49:26
Bike
anyway, so symbols are divided into these namespaces. the namespace you start out in, cl-user, is not something made for an external interface, it's more for messing around in the repl in.
3:49:46
Bike
do-all-symbols iterates over all symbols in all the packages. do-symbols and do-external-symbols only iterate through the symbols in one package.
3:50:14
Bike
(there are also symbols that are not in any package, but they don't usually name global variables or functions, so i'm skipping that)
3:51:00
Bike
there is no particular way to see just what you've defined. a problem with that is that functions newly defined since the lisp started up may include e.g. IDE stuff you didn't define yourself
3:52:34
Bike
(let (c) (do-symbols (s "CL-USER" c) (when (eq (symbol-package s) (find-package "CL-USER")) (push s c))))
3:52:58
Bike
this will collect symbols that are (a) accessible from the cl-user (repl) package, and (b) are not part of some other package
3:53:12
Bike
for example your do-symbols form will include every symbol in the CL package, which is accessible from the cl-user package
3:59:39
ozzloy
i mean, i guess the operator is named "1+" and so it is still prefix... but the "+" though!
8:28:53
moon-child
a slightly more sophisticated solution would also look for quotes inside the tag and ignore <> inside of those
8:30:42
moon-child
(I don't remember if you can escape single quotes in html, if not then the second branch can just be '[^']*')
11:07:59
beach
With FOR IN and FOR/AS arithmetic, you have to surround the body with a conditional. But with FOR THEN you can control everything.
11:09:40
VincentVega
"surround the body with a conditional" do I understand correctly that that would involve putting the whole body in a do clause?