dice - more practice with signal and clog
backquote - first practice with @,a splicing
macros - some news of common errors:
- capturing outer symbols, so caller expects them to be used, but
invisible internal values take their place
- evaluating "pass by name" forms too many times
- evaluating them in surprising order
using cond, which is ok (destructuring would be nice)
and signaling errors, copying definitions of errors
and not quite proficient with writing code that has guards against errors
so, there's advice qualifiers for DEFMETHOD
and they have "standard combination"
http://www.lispworks.com/documentation/HyperSpec/Body/07_ffb.htm
:around and primary methods can call CALL-NEXT-METHOD can be used to
invoke a less specific method for the class
:before and :after are all always called as a onion with most specific
on the outside
objects similar to structures, but can have "generic" setters and creators
generic methods can have methods with qualifier :before :after :around
that in a way I don't fully understand registers them to be launched
with original function?
- types are complicated, not sure how to look up documentation for it
would they show up in apropos all?
- list formatted types - like array vector can specify type of element,
rank / dimentions
(not sure there's variancy over the element type?)
- clos - similar to structure
for structured you get separate functions to get slots, use setf to set
generalized variables
with classes, I can use generic function to create #'make-instance
and access slots with (#'slot-value instance 'slot-name)
but there could be defined accessor, reader, writer,
and :initarg to name slot to have handle to set value in constructor
now that's a lot
- loops can be "ON" a list, then iterate over structure, and can be BY 'cddr and such
- looping over hashtables seems painful
- during coding didn't think about getting debugger,
couldn't figure out how to do it without BREAK, and in DO loop didn't
see separate frames
- again remembered MAKUNBOUND for if I try to set values during debugger
- characters are # and non-excape, #\a
- i am way to quick to judge pairwise operations from left with #'reduce
- iteration can be actually simple with dotimes, dolist.
i'm quite afraid of #'loop but #'do seems cool and inviting
- key params are after &rest, and get put into &rest in order of call
appearance
- can have closure around same place / generalized varialbe, holy cow
- apply takes list, but can also take several arguments with last one
being a list
(values 1 2 3) at the tnd of funtion fill make funciton return 1, 2, 3
and I can either treat function as returning single value,
or use functions like multiple-value-list or multiple-value-[bind|setq]
to get secodary return values
so not quite like a tuple
arrays have #'array-dimentions and #'array-rank (as a matrix)
and there's cool (row-major-aref my-arr index) for indexing array with
single index, going throug all elements
vectors have literal notation #(1 2 4 1),
they are one dimentional
have :element-type key in constructor, not quite sure how to use that
and we can try to #'coerce list to something else by providing symbol
for type, which we could get from (type-of my-vector)
also literal notation for byte vectors, cool #*110011001