freenode/#lisp - IRC Chatlog
Search
9:28:17
elderK
At least, as far as I care to go with it. I don't really need to read stuff from file.
10:17:34
elderK
The idea is, you are given a world of some configuration. Find out how to add to that such that after simulation, the entire world is infected. The goal is to use the minimum number of infected individuals.
11:11:30
flip214
luis: https://github.com/phmarek/slime/commit/e3c3540786a000d7afee1cd420b99c3ba3c5f7f7 instead of the old version
11:11:42
flip214
minion: memo for dougk: https://github.com/phmarek/slime/commit/e3c3540786a000d7afee1cd420b99c3ba3c5f7f7 is a newer version
11:59:05
luis
flip214: found the e-mail where Stas outlines what a proper API should look like: https://sourceforge.net/p/sbcl/mailman/message/33102884/
13:58:50
beach
I think I may have gotten Quicklisp confused with an incorrect ASDF file. Is there a way to clear the idea that Quicklisp has of local projects, so that I can do the register-local-projects from scratch?
13:59:45
jdz
beach: have you tried removing the system-index.txt from local-projects? Or is it something else you're after?
14:27:41
ecraven
RFC 1459: Because of IRC's scandanavian origin, the characters {}| are considered to be the lower case equivalents of the characters []\, respectively. This is a critical issue when determining the equivalence of two nicknames.
14:36:45
ecraven
luis: I've found comments that imply that freenode did implement this years back, but that might have changed
17:39:45
dhis
Hello. I'm using CFFI and I'm able to load some shared libraries, but I sometimes get an error that the library is dependent on another library. I'm not clear on how to use the library designator in define-foreign-library. Is there a CFFI example for this? I'm thinking if I give a complete list of libraries it will load the library.
17:45:56
TMA
dhis: I have been bitten by that already. the solution is to load the depended-on library first. there is some dependency autoloading, but it fails too often to be reliable
17:48:30
dhis
TMA: Yes I did try loading some libraries first (that didn't depend on anything else) and that is ok. I guess some of my libraries depend on each other, in a cyclical way.
18:23:39
pjb
it would be nicer if the block were cut vertically under the opening parenthesis, instead of being flushed to the left margin. (As long as no printing character in the list are present between those two columns of course).
18:26:37
kuwze_
pjb: well it's definitely possible to highlight only part of it... at least I know evil c-v seems to imply that
19:16:38
kristof
in my DIY understanding of implementing lisp I continually run into things that make me go "oof, how do I even make that fast?"
19:18:30
kristof
reader functions generated by a defstruct form are guaranteed to work correctly on any struct that includes its parent. in a statically typed language this is a simple matter because the offsets are the same
19:19:21
kristof
however... typechecking is now this ugly overhead on struct access when the type is unknown.
19:20:49
kristof
a simple eq check on the part of the data structure that holds the type is insufficient because I need to check ancestors now, too.
19:22:02
kristof
So I'm thinking I... first check if the type is what I expected. And if it isn't, I check the type object's ancestor. And I keep following that chain until I hit T. Right?
19:22:37
kristof
yeah, that's not the slow part, it's the typecheck when I don't have type information through inference or declare
19:22:48
kristof
but I guess the old advice remains the same. If you want it to be fast, declare declare declare.
19:28:14
bike
yeah, typep with a class basically means checking the class precedence list of the class of the object.
19:41:02
pfdietz
Ancestry queries in trees can be done with two comparisons (compare pre and post order traversal numbers).
20:10:24
anamorphic
API design question: I have a function (origin foo) => x, y (i.e two values) and I'm writing a corresponding (defun (setf origin) (new-value foo) ..) Would it be a better design if new-value was an array of two numbers, or would it be better if it were a list?
20:12:50
anamorphic
or a cons, or a (defstruct point (x y) ...) I guess a struct would make the get and set congruent
20:15:52
heisig
anamorphic: Unless your API is used from the innermost loop of an HPC application, you should use generic functions and (defclass origin () ...).
20:17:55
heisig
CLOS is surprisingly fast and makes your code much more maintainable in the long run.
20:34:41
sjl_
For the record: you can define a setf function that can set multiple things at once without an extra datastructure: (setf (origin foo) (values 1 2))
20:35:39
sjl_
But if you want to represent something with a data structure, then yeah a class is generally a good choice. Only use a struct if you've benchmarked and it's a bottleneck.
20:40:20
pjb
macros and special operators may do something else than mapping input to outputs. It's not "operator" in the mathematical sense.
20:41:08
anamorphic
sjl_, so something like (defun (setf origin) (new-values foo) (multiple-value-bind (x y) new-values ...)?
20:46:46
theseb
if anyone has any experience with large lisp dev teams......i'm curious how they maintain *readability* if the gurus start using lots of macros
20:47:45
sjl_
The docstrings for my hairier macros are often as long or longer than the macros themselves
20:48:33
White_Flame
and they don't even have to be separate .asd files, just collected and documented together
20:48:43
pjb
theseb: readability comes from the fact that all operators have nice names, such as WITH-OPEN-FILE or CHAR-CODE, and that the name of the opertor is the first element of each sexp = symbolic expression = list.
20:49:55
pjb
theseb: everything in C is hard, even obfuscation. This is why there is a C obfuscation contest. But there's no lisp obfuscation contest, because it's too easy to obfuscate lisp code.
20:50:48
theseb
pjb: seems to me ....a lisp dev team couldn't risk hiring average people....for what you said
20:51:07
White_Flame
using Lisp should be exercising your skills of abstraction, because anything can be done at the source code level. Thus, it's reasoanble to assume that Lispers will experience good & bad abstraction consequences and git gud at it
21:03:18
pjb
For example, in the expendables, everybody in the team is old and muscular. If there was a baby, you could make N old muscular men and a coffin, but not the expendables.
21:03:25
theseb
pjb: hmm..not sure how we could control the more clever impulses of the 3 comma programmer
21:05:09
theseb
pjb: The minute a team lead says..."OK we are going to limit what you are allowed to do for readability".....then they are moving towards Python
21:07:10
pjb
What can be said against 3-, is that it shows a lack of abstraction. The 3-, programmer has more capabilities, to be able to understand, write and read 3-, expressions. This allows him to use them, instead of introducing abstractions.
21:07:50
theseb
pjb: it is sort of like a reverse Greenspun's rule..."Every large enough lisp dev team contains a half baked spec of a Pythonic language"
21:08:48
pjb
I don't think. I feel that lisp allows you to write more complex software using fewer brain cells.
21:09:35
pjb
You don't need to remember a lot, since the syntax is simplier and clearer. And you don't need to understand a lot, because of the abstractions used in lisp programs. 3-, goes against that.
21:10:51
pjb
LdBeth: Your question is whether ecl is ported to avr. Again, I don't know, but if not, it should be easy to define avr as a target of ecl, AFAIK.
21:15:11
anamorphic
You might be interested in https://ferret-lang.org/ though. I was just reading about it. It supports AVR boards