libera/#commonlisp - IRC Chatlog
Search
2:54:20
MCSH
Hi everyone, I have an issue with running clog on sbcl. After running (ql:quickload :clog) I get the error: Symbol "MAKE-SEMAPHORE" not found in the BORDEAUX-THREADS package. I'm not sure how to proceed, can anyone give me any pointers on what I should be checking?
2:59:56
Bike
https://github.com/sionescu/bordeaux-threads/commit/466284f3ab2b3a76141e83641df9487843b04d9e it added semaphores quite a while ago
3:01:05
MCSH
Bike, how do I check the version? I'm pretty sure it's newer than that but it wouldn't hurt to double check
3:07:58
MCSH
I see, I tried that already but it keeps saying "1 dist to check. You already have the latest version of "quicklisp": 2022-04-01." Is that the right command to update packages?
3:13:10
mrcom
Anybody aware of recent changes in Alexandria or SBCL which could result in compile-file "don't know how to dump" errors?
3:16:03
mrcom
No... some details--I've got a FOO structure, and one compilation unit creates a constant of that type with (alexandria:define-constant FOO-CONST (make-foo blah blah)).
3:16:53
mrcom
A second file has a form (make-array howmany :elment-type 'FOO :initial-element FOO-CONST).
3:17:32
mrcom
compile-file on it results in "error: don't know how to dump #<FOO :MYID 0> (default MAKE-LOAD-FORM method called)."
3:18:01
Bike
might have been sbcl. you should probably define a make-load-form method there regardless.
3:19:12
Bike
there's "optimization: fasls containing standard object literals are now smaller and load more efficiently." in the news
3:20:06
mrcom
But I tend to specify types for everything; it's often let SBCL complain about something dumb I did.
3:23:09
mrcom
Hmm. Maybe it's now pulling the literal into the second fasl at compile time and used to use the symbol?
3:27:52
MCSH
Alfr, Ah! It seems like no, it's loading another version from /usr/share, I have no idea which package installed it though, but that should give me a good lead
8:08:11
zacque
Hi, can I define the QUOTE special operator with either DEFUN or DEFMACRO from the CL package?
8:09:56
zacque
I tried but I don't think it can be done, since DEFUN evals its argument and DEFMACRO evals the expanded form
8:11:37
rotateq
I mean it reminds me again about the metacircular semantics paper from Baker, for example writing LABELS with FLET.
8:15:08
zacque
rotateq: > "Please try before that some more simple things." <= Huh? What do you mean?
8:24:41
Nilby
it's very enlightening to read the original one page lisp eval function, where quote is implemented in one short line
8:28:55
zacque
But instead of importing the "seven primitive" from CL package, I try to redefine them with functions from CL package
8:29:34
Nilby
i think the one in the lisp 1.5 manual is easier to read, but how to quote is there on page 7
8:59:04
jackdaniel
you just replace {}[]()begin,end with uniform pair (), and pull the operator inside the list (instead of leaving it in front of the expression)
9:19:17
horroar
Let's make it simple. dbotton: Did you figure my use of the term "the jew in charge" was hostile?
9:22:16
jackdaniel
if you ever wondered, password managers do wonders with recalling, ehm, passwords
9:27:01
rotateq
Thank you jackdaniel, as I've seen it similar. But maybe more operator effort is now needed.
9:28:48
jackdaniel
either way, in my expierience, trolls after a few bans got bored; the thing that feeds them is attention
9:36:35
jackdaniel
I don't think that there is such strong negative correllation between knowing math and behaving unacceptable, but that's offtopic either way
9:39:21
rotateq
When I use the :type option to specify another type than T for a slot and then again in a DEFCLASS form that inherits this slot, the two types are connected by AND.
9:42:23
jackdaniel
great; I have a thing to say about auxiliary methods and code maintainability - having them greatly increases a risk of non-obviosu bugs ,p
9:42:33
rotateq
And how a slot can be defined and behaves is defined via standard-effective-slot-definition and generic functions like slot-value-using-class, right?
9:43:33
rotateq
auxiliary methods are some that are needed in some other that are visible to the outside? just that i get it right
9:43:58
jackdaniel
you have primary methods and auxiliary methods. the latter are :after, :before and :around
9:44:29
jackdaniel
probably there could be more if you are really interested in more esoteric method combinations
10:51:30
jackdaniel
wasn't uiop advertised as a stand alone library that you may pull from quicklisp? ,p
10:52:08
jackdaniel
I'm not planning to update asdf since 3.2 release (and forward) broke too many things - afaik these are still not fixed
10:53:13
shka
jackdaniel: well, i feel like i miss something, you mean that uiop/launch-program is actually implemented for ECL?
10:54:12
jackdaniel
last time I've checked launch-program and run-program in uiop had some horrible indirection ingrained
10:59:44
jackdaniel
contrapunctus: yes, there were some problems with gather-op on recompilation too
11:00:18
jackdaniel
(because it tried to pack .so files in a single archive), but I think that this one is ifxed
13:06:37
jackdaniel
fourt and fourthmost, cursory glance at this code is enough for me to feel compelled to give you an advice - don't bother with macros until you get a good grasp of programming without macros
13:09:45
flip214
jackdaniel: but confusion is the best way to realize how much there's still to learn!
13:10:39
flip214
Got me a good one when I wrote a macro that declares a class and a WITH-macro for that class
13:10:55
flip214
jackdaniel: well, how would you see that you don't understand something - unless you feel confused?
13:12:02
jackdaniel
I don't feel confused about rust, but I'm aware that I don't know anything about it ,)
13:12:46
jackdaniel
also, there is a difference between being confused by something new and confusing oneself with going too deep into the water
13:13:32
zacque
> "what makes you think that an atom doesn't need evaluation" <= Oh, makes sense! I'm being naive here. I thought simply comparing the symbol to NIL will do...
13:14:32
jackdaniel
if you want to check whether something has a known value at compilation time, you may do (when (constantp <foo>) (eval foo))
13:16:36
rotateq
zacque: But did you learn the basics by now? Or that the lambda list of CL:IF is (test then &optional else).
13:22:16
rotateq
What would make a bit more sense can be to think about how to write IF with COND or COND with IF if this level is yet achieved. Or how WHEN and UNLESS are written.
13:24:46
jackdaniel
(defmacro if (test true false) `((lambda () (or (and ((lambda () ,test)) ((lambda () ,true))) ((lambda () ,false))))
13:25:09
zacque
Thanks! My confusion comes from me thinking that special operators in Lisp have to be defined as macros...
13:25:49
jackdaniel
special operators may be defined by a wizard inside the implementation, they don't have to follow rules
13:26:16
rotateq
zacque: No, you can view them as elementary, we have 25 special operators. Macros are programs that generate other programs.
13:27:34
zacque
With that realisation, I think I can define it easily as a function wrapper around CL:IF, see: https://paste.debian.net/1240695/
13:28:10
zacque
Since NIL is not yet defined to evaluated to itself, I'll simply check (EQ <FOO> 'NIL)
13:30:01
jackdaniel
perhaps you are in a situation, when the value of <foo> is not known to be nil at compilation time?
13:30:31
zacque
Oh, maybe the first thing I should do is define NIL to evaluate to NIL and T => T...
13:30:34
Bike
IF as a function does not work. with your if, (if t (print "a") (print "b")) prints both.
13:32:09
_death
one could define a FIF function.. it would receive test, consequent, and alternative functions, and pick which of the latter two to call based on the result of calling the first