<beach>
Well, that's tricky stuff. Each person seems to have a different idea about how to make ASDF find your systems.
<cow_2001>
i have no idea and would take ANY idea
<beach>
I put links to my directories containing ASDF systems in ~/quicklisp/local-projects.
<beach>
But I have never heard of the technique you mentioned.
<beach>
Perhaps someone else can help.
<beach>
Oh, and you need to have the same name of the system and the file it is in.
<cow_2001>
same name of the system and the file?
<beach>
You can't have the system being farm.kaka.quad-tree and the file being quad-tree.asd
<cow_2001>
oh
zwr has joined #commonlisp
<cow_2001>
will sly recheck the contents of the directories or do i have to restart?
<cow_2001>
wait, maybe i don't have quicklisp?
<cow_2001>
no, that's not it
<beach>
With my method, you occasionally need to do (ql:register-local-projects) at the REPL.
admich1 has quit [Ping timeout: 276 seconds]
<cow_2001>
ooh
<beach>
But you shouldn't need to restart.
<cow_2001>
no completion for ql: hmmm
admich1 has joined #commonlisp
<cow_2001>
oh, i have to curl | sudo sh it
<cow_2001>
not a fan
pabs3 has joined #commonlisp
<beach>
You need to install Quicklisp and you need to load it in your .sbclrc (assuming you are using SBCL).
<cow_2001>
oh there's asdf:*central-registry*
<beach>
That's another method, yes.
<cow_2001>
and i just learned how to get the previous commands history in the sly mrepl!
<cow_2001>
M-p and M-n for the next
<cow_2001>
beach: thank you!
<cow_2001>
i'll be back
<beach>
Sure. I'm off for a break myself.
chomwitt has joined #commonlisp
admich1 has quit [Ping timeout: 248 seconds]
akoana has quit [Quit: leaving]
admich1 has joined #commonlisp
<cow_2001>
oh man, there's even an asdf info manual!
admich1 has quit [Ping timeout: 265 seconds]
_whitelogger has joined #commonlisp
random-nick has joined #commonlisp
LainIwakura has quit [Ping timeout: 272 seconds]
zxcvz has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
treflip has quit [Remote host closed the connection]
treflip has joined #commonlisp
admich1 has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<scymtym>
cow_2001: two random things: 1) you don't have be root for the quicklisp installation (or any common lisp stuff) 2) for nested functions, common lisp has the operators flet and labels, not defun or define. see https://novaspec.org/cl/f_flet
<ixelp>
flet, labels, macrolet | Common Lisp Nova Spec
leeb_ is now known as leeb
<beach>
Oh, I forgot to review the code.
<beach>
cow_2001: Top-level comments take three or four semicolons.
<beach>
cow_2001: You have many unnecessary blank lines, so you are wasting precious vertical space, for instance in the middle of an EXPORT list.
<beach>
cow_2001: There is a lot of code duplication. Perhaps try defining a macro to avoid that.
<beach>
cow_2001: Unless horizontal space is a problem, there is no reason to have a newline after (COND.
rgherdt has quit [Ping timeout: 244 seconds]
<beach>
cow_2001: It is generally a bad idea to use recursion on linear structures like lists. Use either iteration or, like with FOLD, some built-in function.
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
<cow_2001>
scymtym: i'm just being hyperbolic
<cow_2001>
beach: when things are on their own line they pop into my eyes
<beach>
cow_2001: What is the point of writing (list)?
<cow_2001>
beach: oh, it was part of the original scheme code
<cow_2001>
i didn't touch it because it didn't seem that important to change it
<beach>
That explains the recursion on lists too.
<beach>
... and the lack of macros.
<cow_2001>
i wrote a large part of it, but there was a lot that i didn't. the general structure of the algorithms was there already
rgherdt has joined #commonlisp
<beach>
cow_2001: Maybe you didn't mean to expose this code for remarks.
<cow_2001>
but it wasn't my original intention. i just wanted to profile it in common lisp using its superior tools
<cow_2001>
Fade: look what you've made me do D:<
<cow_2001>
beach: dangling parentheses of lists that may or may not change later help with a cleaner diff, i think
<cow_2001>
there was one style guide that said that's a good reason to dangle parentheses
<beach>
cow_2001: Your answers to the remarks make me more and more convinced you don't care about following conventions.
<beach>
And, if that's the case, there is no point in my giving you remarks about conventions.
<cow_2001>
i try to avoid dangling parentheses, but in some places i think they're bad
<cow_2001>
like the :export list, or lists of defstruct elements
<beach>
They are always bad, unless preceded by a line comment.
<beach>
But I think I have said all that I want to say, given your reactions.
<cow_2001>
i use recursion on linear structures because that's how i did it in scheme, but i could change it!
<cow_2001>
and duplication is bad. i need to deal with that
<cow_2001>
beach: why is it always bad? what do you mean by line comment?
<cow_2001>
oh, right. you cannot write a comment and then use a close parenthesis
<beach>
Right.
<cow_2001>
beach: i don't want to argue. my brain has a certain style that it finds easier to read and write, or at least has the subjective experience of an easier reading and writing, but maybe my other styles are better. i will change it and see how it goes!
decweb has joined #commonlisp
LainIwakura has joined #commonlisp
<beach>
cow_2001: Look, I am not here to argue about this or that convention. I am just telling you what they are. If you just want to develop for yourself, that's fine. You can respect those conventions or not, as you wish. But if you expose your code, it is essential to follow conventions. I understand you want to expose your code, yet not follow conventions. Then I am not going to make an effort.
<cow_2001>
i'll be a good citizen
<cow_2001>
will follow conventions
<beach>
Dangling closing parentheses are always bad because they waste vertical space, so the person reading your code can see less of it simultaneously, give that screens have limited height.
<beach>
Same reason for two blank lines in a row.
<beach>
Same reason for newline after (COND
<cow_2001>
last two commits fixed dangling parentheses and the cond on its own line
<beach>
You still have top-level comments with only two semicolons. This is even a conventions that is mentioned in the Common Lisp standard.
<beach>
The remark on (COND also goes for (AND and similar.
<beach>
In REGION-SUBSET-OF-REGION? (the convention for predicates is to end the name with P), for some reason, you have all the argument of <= on one line, but the arguments of >= on separate lines. This makes a reader like me wonder whether you process your code with some tool other than the compiler. Mystery!
<cow_2001>
pushed for top-level comments
<cow_2001>
oh, oops. i need to change those questionmarks
<cow_2001>
thank you, by the way
<beach>
Sure.
<beach>
The main problems now are overuse of recursion and lots of code duplication.
<cow_2001>
yeah, i use a lot of (let loop ...) in scheme
<cow_2001>
and i was just transliterating it at first
apac has joined #commonlisp
<cow_2001>
oh, yeah, region-subset-of-region is a joke. x axis is horizontal and y is vertical, so i laid it out according to that...
<cow_2001>
removing joke... rip
<cow_2001>
circle? should be circlep, right? it is only one word, so it shouldn't be circle-p
<beach>
I think that's correct.
yitzi has joined #commonlisp
<cow_2001>
fixed the weird REGION-SUBSET-OF-REGION-P layout
<cow_2001>
could you point at one duplication?
<cow_2001>
as an example
<beach>
REGION-NORTH-EAST, REGION-NORTH-WEST, REGION-SOUTH-EAST, and REGION-SOUTH-WEST, are almost identical.
<beach>
This resembles boilerplate code that is best handled by a macro.
<beach>
SET-BRANCH-NODE-.... are almost identical as well.
<cow_2001>
let's learn how to write lisp macros, then! :D
<beach>
There is a lot of duplication inside QUAD-TREE-INSERT-HELPER.
<beach>
Perhaps it is not a good idea to define separate functions REGION-NORTH-EAST, REGION-NORTH-WEST, REGION-SOUTH-EAST, and REGION-SOUTH-WEST but instead just have one function with a parameter. I am just guessing here, but that's one possibility.
<cow_2001>
oh, yeah
<beach>
Oh, and you are mixing the use of the function and the variable in those functions, like you have both X-LOW and (REGION-X-LOW REGION) in arguments to MAKE-REGION.
<beach>
At the very least, you can introduce a macro allowing you to say (WITH-CORNERS (X-LOW X-HIGH Y-LOW Y-HIGH) (MAKE-REGION ...)) to avoid four lines of duplicated code.
<beach>
Same remark for the lexical variables in SET-BRANCH-NODE...
<beach>
In locate-position-helper, you can put the name of the function locate-position-helper and its arguments on separate lines. Then all arguments will fit on one line.
<beach>
You have (let ((north-east ...) (north-west ...) ...) in several places. A macro will eliminate most explicit bindings and also make the code more clear.
<beach>
Anyway, you have lots of work to fix this up. And I must get some stuff done as well.
<cow_2001>
by the way, i am still confused about passing functions to functions
<mesaoptimizer>
what sort of data structures is cl-store unable to serealize or deserialize?
<cow_2001>
funcall, apply, when to use function quote, when to use just a simple quote
<mesaoptimizer>
cow_2001: I'm new to this but in essence, a simple quote passes a symbol, and a sharp quote passes the function object that the symbol points to. so funcall and apply would have sharp quotes because they take function objects, while if you are passing functions around, you'd just pass the quoted symbol around
<beach>
cow_2001: Yes, that looks better.
treflip has quit [Ping timeout: 260 seconds]
<beach>
mesaoptimizer: That's not quite true. If a function is the value of a variable, as when it is passed as an argument, then FUNCALL and APPLY would not use #'.
<beach>
mesaoptimizer: And if you pass a function around, it is best to pass it as... a function, so that you can pass anonymous functions and local function as well, and not just global functions.
olivial has quit [Read error: Connection reset by peer]
olivial has joined #commonlisp
<beach>
mesaoptimizer: Furthermore, function names can take the form (SETF <symbol>) so you can not assume global functions are always named by symbols.
<mesaoptimizer>
oh right, I forgot the setf form of functions. Sorry about this.
<mesaoptimizer>
I guess I'll make it through at least half of Steele's book before I consider answering a question here next time
<beach>
mesaoptimizer: Don't worry about it. This way you also learned something.
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
zxcvz has quit [Remote host closed the connection]
<beach>
cow_2001: Common Lisp has PLUSP. No need for POSITIVE-P.
<beach>
cow_2001: In several places you use LET to create a lexical variable that is then used only once. You might be able to skip the LET binding then.
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 276 seconds]
admich1 has quit [Ping timeout: 248 seconds]
admich1 has joined #commonlisp
bpanthi977 has joined #commonlisp
Lycurgus has joined #commonlisp
LainIwakura has quit [Quit: Client closed]
treflip has quit [Ping timeout: 260 seconds]
chomwitt has quit [Ping timeout: 265 seconds]
ingeniot has quit [Ping timeout: 260 seconds]
LainIwakura has joined #commonlisp
Lycurgus has quit [Quit: irc.renjuan.org (juan@acm.org)]
bpanthi977 has quit [Ping timeout: 260 seconds]
treflip has joined #commonlisp
rgherdt has joined #commonlisp
LainIwakura has quit [Ping timeout: 272 seconds]
treflip has quit [Ping timeout: 248 seconds]
treflip has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
ingeniot has joined #commonlisp
admich1 has joined #commonlisp
treflip has quit [Ping timeout: 252 seconds]
ingeniot has quit [Ping timeout: 240 seconds]
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 245 seconds]
<phil_bb>
Is there a mirror of cliki I can access somewhere? It's still down.
Lycurgus has joined #commonlisp
bpanthi977 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
Lycurgus has quit [Quit: irc.renjuan.org (juan@acm.org)]
admich1 has joined #commonlisp
meaty has joined #commonlisp
varjag has joined #commonlisp
grawlinson has quit [Ping timeout: 265 seconds]
<phil_bb>
So, a question. I'm trying to define the dependencies between all the files/ sources I have in my asd file, and I'm running into issues. I can't seem to figure out what I'm doing wrong here; SBCL keeps on complaining. Previously, I had all my files just named e.g. "world-classes", but I thought it'd be best if I split them up into directories, and now I'm running into strange errors.
<phil_bb>
Is it possible to use :depends-on in ASDF to refer to modules (subdirectories)?
grawlinson has joined #commonlisp
chomwitt has joined #commonlisp
TactfulCitrus has joined #commonlisp
yitzi has joined #commonlisp
<yitzi>
phil_bb: maybe you are missing :serial t?
<yitzi>
That is usually easier then using :dependency
spdegabrielle has joined #commonlisp
TactfulCitrus has quit [Ping timeout: 265 seconds]
g-gundam has quit [Remote host closed the connection]
g-gundam has joined #commonlisp
g-gundam has quit [Changing host]
g-gundam has joined #commonlisp
<phil_bb>
yitzi: let me see...
<phil_bb>
That throws an error... COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cl-human" "clim" "commands"> [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]
<phil_bb>
The issue there is that it needs things from another file to be defined before one of the functions there works.
<phil_bb>
But that file where the other function call is... needs yet other things to be defined.
<phil_bb>
So I'm running into a weird graph of dependencies between the files.