<_death>
they could fail in the rare case where the two calls of get-universal-time return different values
Posterdati has quit [Server closed connection]
<Shinmera>
mh
Posterdati has joined #commonlisp
phileasfogg is now known as rand0mApplicativ
anticrisis has quit [Read error: Connection reset by peer]
b00p has joined #commonlisp
<phoe>
how can I instruct ASDF to ignore all systems found in /usr/share/common-lisp/ and only use those loaded through quicklisp?
b00p has quit [Quit: Leaving.]
<_death>
asdf:*default-source-registries* ?
dino_tutter has joined #commonlisp
<phoe>
_death: thanks; binding this to NIL and calling ASDF:INITIALIZE-SOURCE-REGISTRY works well enough for me
dtman34 has quit [Ping timeout: 248 seconds]
<_death>
may want to just remove asdf/source-registry:default-system-source-registry
mehbark has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 246 seconds]
avocadoist has joined #commonlisp
pawa2 has quit [Quit: leaving]
b00p has joined #commonlisp
<phoe>
yep, that's cleaner
yitzi has joined #commonlisp
pyooque has joined #commonlisp
puke is now known as Guest8306
Guest8306 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
pyooque is now known as puke
rgherdt has quit [Ping timeout: 264 seconds]
rtypo has quit [Ping timeout: 245 seconds]
b00p has quit [Quit: Leaving.]
rgherdt has joined #commonlisp
dtman34 has joined #commonlisp
AetherWind has quit [Ping timeout: 240 seconds]
Lycurgus has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]
wonko-the-sane has joined #commonlisp
rand0mApplicativ is now known as cayley5
b00p has joined #commonlisp
Lycurgus has quit [Quit: Tschüss]
pranavats has joined #commonlisp
mgl has joined #commonlisp
iska has joined #commonlisp
jdz has quit [Server closed connection]
jdz has joined #commonlisp
herjazz has quit [Quit: leaving]
jjnkn has joined #commonlisp
<jjnkn>
hi, i'm having trouble with (subst 1 0 '(0) :test #'=); tracing = shows that it calls (= '0 '(0)); why would it pass the whole list as 2nd argument? omitting :test works fine though; i'm on GNU CLISP
<_death>
so that it can replace any part of the tree.. if you're just working with sequences you can use substitute
<jjnkn>
omitting :test works fine because by default eql is used i guess; but it still doesn't make sense to compare the whole tree when SUBST is made for replacing elements of the tree...
<ixelp>
CLHS: Function SUBST, SUBST-IF, SUBST-IF-NOT...
<beach>
jjnkn: SUBST must compare every node of the tree, and CONSes are nodes as well.
<jjnkn>
_death: thanks for suggesting substitute, it indeed is better suited to my needs
<jjnkn>
beach: CLHS says "subst, subst-if, and subst-if-not perform substitution operations on tree. Each function searches tree for occurrences of a particular old item of an element or subexpression that satisfies the test."
<beach>
Yes, and the CONSes are candidate items as well.
<beach>
It does not just compare leaves of the tree.
<jjnkn>
doesn't this imply that the whole tree is an item of itself
<beach>
I wanted to illustrate that not just leaves are candidates.
<_death>
right
<jjnkn>
tree n. 1. a binary recursive data structure made up of conses and atoms: the conses are themselves also trees
<beach>
jjnkn: Right, so now do you see why you get the result you did with =?
<jjnkn>
well, with = it's obvious because it works only with numbers
<jjnkn>
but i'm still trying to understand the logic behind considering the whole tree a candidate
<beach>
jjnkn: Every node of the tree is a candidate, including the root, so that you can have a tree where your items are CONSes, as in the example I gave you.
b00p has quit [Quit: Leaving.]
<_death>
suppose you want to rewrite all (+ 1 x) into (1+ x).. (defun rewrite (tree) (subst '(+ 1 x) '(1+ x) tree :test #'equal)) (rewrite '(+ (+ 1 x) (+ 1 x))) => (+ (1+ x) (1+ x)) but you'd also expect (rewrite '(+ 1 x)) => (1+ x)
<beach>
jjnkn: Maybe a better example would be (subst-if 234 (lambda (x) (typep x '(cons number number))) '((1 . 2) (3 . a)))
<beach>
jjnkn: If it compared only atoms, then (1 . 2) would not be a candidate here.
<beach>
Though the example shown by _death is of course more realistic.
<jjnkn>
beach: aha! that's a good example, now it makes sense. i hadn't considered that it compared the whole trees, i was thinking only of comparing atoms.
tyson2 has quit [Remote host closed the connection]
b00p has joined #commonlisp
attila_lendvai_ has joined #commonlisp
blop_ has quit [Remote host closed the connection]
blop_ has joined #commonlisp
b00p has quit [Quit: Leaving.]
<Josh_2>
I am trying to build my project and its failing because ; caught WARNING: ; <package> also exports the following symbols:
<Josh_2>
It then lists a bunch of symbols. I am using defclass* to define and export class/accessor names
mgl has quit [Quit: Client closed]
<Josh_2>
I dont know why this would cause SBCL to fail to build..
<Josh_2>
Fail to build my system*
<beach>
Because when it sees the DEFPACKAGE form again, there are fewer symbols exported in that form than what is currently exported from the package. And SBCL decides to warn about that.
attila_lendvai_ has quit [Ping timeout: 264 seconds]
<beach>
It is conforming behavior, but often very annoying. That said, it is not obvious what it should do then.
<Josh_2>
defclass* has an (export <syms> ..) wrapped around the (defclass ..)
<beach>
Yes, that's why.
<Josh_2>
This is only a problem when the asdf:make is evaled after quickloading my system
<Josh_2>
What do I do about this :skull:
<beach>
Like I said, it has to do with the DEFPACKAGE form being re-evaluated, and it contains fewer symbols that what is currently exported.
<Josh_2>
Hmm
<beach>
It is hard to know what it should do, because if it unexported the other symbols, then the explicit calls to EXPORT would not have any effect unless evaluated again. And if it left the remaining symbols exported, you could not remove an exported symbol from the DEFPACKAGE form and expect it to no longer be exported.
<Josh_2>
Right
<Josh_2>
The defclass* (export.. ) form is also wrapped in an eval-when
<Josh_2>
I have never had this problem before which is odd
<beach>
I think you need to handle the warning and use the right restart for your situation.
<Josh_2>
I think that may be the case
jmdaemon has quit [Ping timeout: 240 seconds]
<_death>
you could rethink the decision to use the export function and instead just maintain the list explicitly in defpackage
<Josh_2>
I could also do that
tyson2 has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
<Josh_2>
I dont know which asdf operation I need to specialize
<_death>
that would be very bad.. instead you should specialize for your own class(es)
<Josh_2>
Hmm
<Josh_2>
How do I specify my own class for asdf:cl-source-file
<Josh_2>
Well how do I tell asdf to use that class rather than the standard?
<_death>
for example, defsystem has a :default-component-class option
<Josh_2>
Cool that worked :)
<Josh_2>
Thanks
b00p has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
tyson2 has quit [Remote host closed the connection]
<jmercouris>
beach: I have been meditating on what you have said about bootstrapping languages for years
<jmercouris>
beach: I am finally ready to write another language, and this time I will bootstrap it from Common Lisp, specifically using the SBCL compiler
amb007 has quit [Ping timeout: 240 seconds]
<jmercouris>
I have had a lot of trouble thinking about what to include in the bootstrap process, when do I begin writing the standard library in my new language? when do I write a feature in CL?
<jmercouris>
well, it is not a straightforward question, I guess it will have to be iterated upon, many times
<jmercouris>
this is therefore the formal announcement of my new language called, Uranus
<jmercouris>
what does this have to do with Common Lisp? Well, it is Common Lisp + the informal standards that are quite popular, formalized
<jmercouris>
so, for example, in Uranus, ASDF is a requirement
<jmercouris>
perhaps a pedantic exercise, but it is what I am doing
<Josh_2>
Uranus :smirk:
<jmercouris>
Josh_2: thank you for your feedback :-D
AetherWind has quit [Remote host closed the connection]
<jmercouris>
How to make a lisp binary drop me into the SBCL REPL?
<jmercouris>
is there a function like (REPL)? or something?
<Josh_2>
Mark it executable
<Josh_2>
:executable p
<Josh_2>
something like that
<Josh_2>
Actually just ignore me :thumbsup:
<jmercouris>
I don't think it is :executable p
<Josh_2>
:joy:
<Josh_2>
Silly mistake
<beach>
jmercouris: I see. You know, already writing the code for a system and a compiler for it is a major undertaking even when the language specification is known and relatively good. Designing your own language is significantly more difficult.
<Josh_2>
(handler-bind ((SB-INT:PACKAGE-AT-VARIANCE (lambda (c) (invoke-restart 'muffle-warning)))) .. maybe this actually fix my problem
<beach>
jmercouris: Though, I guess if it is just Common Lisp with more required operators, then that part is not too hard.
<beach>
jmercouris: But if it is "just" that, then no new language specification is required.
<beach>
jmercouris: And if you are changing the semantics compared to Common Lisp, then that's when the additional difficulty comes in, especially if you want to preserve performance.
<beach>
Josh_2: That's basically what I suggested before.
<phoe>
still, I remember that there was (possibly some other) reason why :AROUND methods on SHARED-INITIALIZE are not portable; does it ring a bell, or is the aforelinked method portable?
<beach>
I don't know of any other restrictions.
<phoe>
OK - thanks!
<beach>
Well, I mean other than the usual one...
wonko-the-sane has quit [Ping timeout: 246 seconds]
<phoe>
...which is?
<beach>
That the method must not be applicable when given only instances of standardized classes.
<phoe>
oh, yes
<phoe>
I have a class I own as a specializer there, so I should be safe
<beach>
Absolutely.
cage has joined #commonlisp
notzmv has joined #commonlisp
b00p has quit [Quit: Leaving.]
wonko-the-sane has joined #commonlisp
<beach>
jmercouris: I guess I don't understand why you need any bootstrapping at all if your language is just Common Lisp plus some libraries that exist already.
<jmercouris>
It will get more complicated with time
<jmercouris>
that's just the first version
<beach>
So ultimately you want your language to have different semantics from Common Lisp?
<jmercouris>
not really no
<jmercouris>
but I will change some minor things like the file extension for example
<jmercouris>
instead of ".lisp" it'll be something else
NicknameJohn has joined #commonlisp
<beach>
That's a minor change that you can just stick in an existing implementation and rebuild.
<jmercouris>
semantically it'll be backwards compatible
<jmercouris>
well, it's an experimental project, maybe i'll never need any bootstrapping
<jmercouris>
it's just something i'm thinking about