freenode/#lisp - IRC Chatlog
Search
15:02:18
ogamita
beach: that said, person has two subclasses: moral-person and physical-person, so it'd be better if tax-payer was an OPTIONAL mixin… Just saying.
15:03:07
ogamita
or even, a reified association between a thug organization and a person, since a single person will often have to pay several thug organisation to avoid being molested.
15:04:36
ogamita
Some people, in particular biologists have used UML to modelize real systems (like, cell metabolism). Perhaps it'd be useful to study those models to give them as real-life examples :-)
18:28:13
pjb
So you could take the Molecule superclass, and its two direct subclasses Protein and Macromolecule.
19:03:44
asarch
Yesterder, TMA told me: "asarch: that does not mean that a function defined by DEFUN is unable to accept arguments of the desired type. it is just that there is no discrimination on the type of the passed argument, unless you write the discrimination yourself". In this context, what does "discrimination" mean?
20:05:58
dim
another term used for this concept is “dispatch”, in the context of generic functions and their methods
20:07:18
dim
asarch: maybe it's time for you to read http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html and http://www.gigamonkeys.com/book/object-reorientation-classes.html
21:35:22
pfdietz
In asdf, would it be considered better form to write a method for around-compile-hook, or call-with-around-compile-hook?
21:57:46
pfdietz
Does this combinator have a name: (c f g) ==> (lambda (x) (funcall f (lambda () (funcall g x))))
21:59:09
pfdietz
f and g are hook functions. They have no return value that matters. They're executed to set up an environment in which to call their arg, which is a thunk.
22:01:23
jackdaniel
back at the question about sequence copies: subseq guarantees a copy of the same type
22:11:05
xsperry
pfdietz, g has no return value that matters, yet you are passing the return value of g as a second argument to f?
22:12:04
pillton
xsperry: The function f may invoke the function argument to obtain the return value.
23:09:19
asarch
In fact, I wrote a shell script to render it into PDF: https://github.com/asarch/pcl
2:13:39
hectorhonn
what is the difference between (in-package "abc") and (in-package :abc) and (in-package #:abc)?
2:15:25
White_Flame
oh, and "abc" is probably wrong, because :abc and #:abc imply the string name "ABC"
2:17:35
aeth
hectorhonn: all of the non-string ways, including potentially some others you didn't list, will (probably, it depends on your settings but by default) translate to "ABC"
2:19:25
aeth
The only time you ever want to modify stuff like that is if you're implementing a case-sensitive language within CL, which, of course, can have issues at the interface between the two.
2:20:11
aeth
For all practical purposes, CL is a case-insensitive language that upcases unless you escape with || like '|foo| because you'd break too much code if you switched modes.
2:22:09
hectorhonn
aeth: not sure if you are replying to me, i meant this as in "abc" vs :abc vs #:abc
2:22:38
aeth
hectorhonn: "abc" will produce the package "abc" aka :|abc| or #:|abc| whereas :abc and #:abc will produce the package "ABC"
2:22:52
White_Flame
btw, are you learning for the first time, or digging into some of the edge case specifics? For the former, #clschool is probably more appropriate
2:23:29
aeth
hectorhonn: The way CL does its (mostly) case insensitive behavior is by upcasing, so if you want to literally refer to something you either have to upcase the string manually or you have to do (symbol-name 'foo)
2:34:57
pillton
hectorhonn: The reason for all the "don't go here talk" is because of readtable-case, *print-case* and the specification of the COMMON-LISP package. (in-package #:abc) gives the illusion of writing case insensitive code but you end up in a world of hurt anyway because the COMMON-LISP package and all of its exported symbols are specified to be upper case.
2:35:31
pillton
hectorhonn: Things become even worse when you consider multiple users and using libraries written using different non default readtable-case and *print-case*.