jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
nij- has joined #commonlisp
<nij-> Bike I see, that makes sense.
<dbotton> ccregor btw that macro takes the place of your defvar in the loop, it creates the symbol and sets its value
jolby has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
<dbotton> if it already exists is not created
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
jolby has quit [Quit: Client closed]
ec has quit [Quit: ec]
ec has joined #commonlisp
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
lottaquestions has quit [Ping timeout: 244 seconds]
<mathrick> why does METHOD-QUALIFIERS sometimes return the method's name as well in SBCL?
<mathrick> I don't fully understand when that happens
<mathrick> it seems to be related to having * as the only method group specifier in the method combination, but it isn't reliable either
<mathrick> I have code that worked fine and now a couple SBCL restarts later, it breaks
<mathrick> ie. (method-qualifiers method) => (TEST-PACKAGE::SIMPLE-HOOK :TEST1 :SEQUENCE 0)
waleee has quit [Ping timeout: 264 seconds]
<mathrick> oh, I see, it's actually when it's called with the method object received by ADD-METHOD
ec has quit [Quit: ec]
ec has joined #commonlisp
causal has joined #commonlisp
<mathrick> and even then it's not always
jolby has joined #commonlisp
jolby has quit [Client Quit]
jolby has joined #commonlisp
edgar-rft has joined #commonlisp
nij- has quit [Ping timeout: 250 seconds]
jolby has quit [Quit: Client closed]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
hashfunc has joined #commonlisp
sjl has quit [Quit: WeeChat 3.6]
lottaquestions has joined #commonlisp
chipxxx has joined #commonlisp
taiju has quit [Ping timeout: 268 seconds]
azimut has quit [Ping timeout: 258 seconds]
taiju has joined #commonlisp
<gendl> Hi how can I make Swank print something (a startup banner in this case) in the *slime-repl ...* upon connection.
<gendl> I'm looking through swank.lisp and see some promising looking things but just not yet getting it
ec has quit [Remote host closed the connection]
nij- has joined #commonlisp
ec has joined #commonlisp
SR-71 has joined #commonlisp
jeosol has joined #commonlisp
igemnace has joined #commonlisp
jeosol has quit [Quit: Client closed]
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
enzuru has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
jeosol has joined #commonlisp
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
prokhor has joined #commonlisp
chip_x has joined #commonlisp
chipxxx has quit [Ping timeout: 252 seconds]
frgo has quit [Ping timeout: 265 seconds]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
hashfunc has quit [Ping timeout: 264 seconds]
chip_x has quit [Read error: Connection reset by peer]
_cymew_ has joined #commonlisp
Posterdati has joined #commonlisp
thuna` has joined #commonlisp
irfan has joined #commonlisp
_cymew_ has quit [Ping timeout: 250 seconds]
ttree has quit [Ping timeout: 265 seconds]
<prokhor> good morning :)
<beach> Hello prokhor.
<prokhor> question: i want to make a list, whith each term occuring once - but is is always pushed onto the list
<prokhor> (unless (member table-name *microtheories*)
<prokhor> (pushnew table-name *microtheories*))
<beach> PUSHNEW does the test for you. No need to do it "manually".
<hayley> You might need to provide a different :key function. And you don't need to test for MEMBER beforehand.
<prokhor> is it maybe because of how member test for equality?
<beach> Both MEMBER and PUSHNEW take keyword arguments for the equality test.
<beach> clhs member
<prokhor> slo (pushnew term list) would do?
<prokhor> exciting!
<beach> I don't know. I don't know what your TABLE-NAME is.
<beach> chls pushnew
<beach> Eh,
<beach> clhs pushnew
<prokhor> table name shall be the element added
<hayley> (pushnew term list :test <some test function>) with your favourite test function.
<hayley> Darnit, :test not :key.
<beach> prokhor Yes, but the nature of that element is what matters here.
<beach> prokhor: Is it a standard object, a list, a symbol, a struct, an array?
<beach> prokhor: And how do you compare two of those objects for equality?
<beach> Stuff like that.
cosimone has joined #commonlisp
razetime has joined #commonlisp
<beach> prokhor: You need to start to acknowledge that you have seen the advice you were given. It is very frustrating to try to help you and then not even know whether you saw what was uttered.
<prokhor> sry, was in at the other pc
<prokhor> thx for the help!
<prokhor> turned out:
<beach> Please use a paste site for code that is more than one line.
<prokhor> the members of the list somehow turned into capitals, the strings to test for membership werent
<prokhor> i will try my best to improve my nettiquette,thx
<beach> Nothing turns into capitals automatically.
<prokhor> *meaning not knowing how i did that*
<beach> But you still haven't told us the nature of those elements.
<prokhor> the break through was, when i specified string-equal as testing method...
<prokhor> table-name is a string
<beach> It sounds to me that symbols are somehow involved as well.
<beach> s/that/like/
<prokhor> i am playing around with a dump of a cyc kb, i wanted to compose unique table names as i try to migrate those rules to mysql
<prokhor> yes, youre right:
<prokhor> when i extract the microtheory name out of the expression, its an atom
<beach> A symbol you mean?
<prokhor> yes
shka has joined #commonlisp
<prokhor> as i modify, it becomes a string..
<beach> By default, the reader turns symbol names into upper-case strings.
<prokhor> do you have advice for a good paste site?
<beach> It's in the channel subject: plaster.tymoon.eu
<beach> I think your issues may be better discussed in #clschool. These are very basic Common Lisp things.
<prokhor> thx :)
<beach> ywlcm
<prokhor> how about the progresses of closos?
<beach> Still working on SICL, which is the basis for it.
<hayley> How do you fit Cyc facts into SQL?
<prokhor> oh, i dont want to transform the cycl terms themselves: they simply get stored in a record along with metadata in the same row...
<prokhor> so i can sort/select the rules i need...
<prokhor> right now i am building a who-calls db, like open genera has one...
<prokhor> i intend to play with the rulebase on other systems, so i thought it would be neat to have a central storage from where i can import/translate..
makomo has joined #commonlisp
<beach> What information do you use in order to build that database?
taiju has quit [Ping timeout: 244 seconds]
<prokhor> what do you mean by "information" ? the source of the data?
<prokhor> the data itself?
<beach> I assume who-calls refers to what functions call what other functions, yes?
<prokhor> correct
<beach> Then, how do you determine whether a function FOO calls a function BAR? As, in what do you examine to determine that? The source code of FOO?
irfan has quit [Ping timeout: 250 seconds]
irfan has joined #commonlisp
<prokhor> if you have eg. the source code of fun FOO, its easy to determine what it calls (look at the code). i then made a hash table where the callee BAR is the key, and all callers Foo, Foo' etc. are in the list,which is BARs value...
<prokhor> how i determine? in this case:
<beach> So if you have (defun foo (...) (some-macro (bar ...) ...)) how do you whether BAR refers to a function or a lexical variable?
<prokhor> i simply flatten the list, as everything (for now) is not an argument...
<prokhor> its cycl code, not lisp
<beach> Ah, OK.
<prokhor> *now wondering how they did at symbolics
<prokhor> how about: try to evaluate, as symbols have different slots??
<beach> In Common Lisp, you require a code walker to determine that. The best code walker for the job is the compiler.
<prokhor> can you determine, which slot is used in an evaluation? (value, functioj)
<prokhor> maybe by comparing the results
<beach> Not without a code walker.
<prokhor> ah, ok
<prokhor> does the code walker then build a table with all valid functions?
razetime has quit [Ping timeout: 265 seconds]
<beach> I don't know what existing tools like that do, but what I would do is I would have the compiler add an entry to a table whenever it sees a function call to a named function, whether that function exists or not when the compiler sees it.
<prokhor> a question came up to me right now: does a code walker always have to interpret the whole code?
<beach> It has to do macro expansion, and it has to know what forms are special forms.
<prokhor> *sometimes having problems with crashes when examinig stuff form other implementations
<prokhor> i once tried to match "(defun XXX" , then adding XXX to a table, but there every basic command was defined as well somewhere...
<beach> Simple strategies like that typically don't work.
<prokhor> as a simple noob: how would you make the modifications to the compiler?
<beach> For the compiler, it is fairly simple. It compiles the code, handles special forms, expands macro calls. Ultimately, it reaches a form such as (foo ...) where foo is neither a macro nor a special operator. Then, it enters foo as one of the callees of the function currently being compiled.
razetime has joined #commonlisp
orestarod has joined #commonlisp
epony has quit [Ping timeout: 252 seconds]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
yitzi has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
Helmholtz has quit [Quit: Bridge terminating on SIGTERM]
kakuhen has quit [Quit: Bridge terminating on SIGTERM]
hayley has quit [Quit: Bridge terminating on SIGTERM]
Duuqnd has quit [Quit: Bridge terminating on SIGTERM]
jryans has quit [Quit: Bridge terminating on SIGTERM]
acma has quit [Quit: Bridge terminating on SIGTERM]
torhex-pasmul[m] has quit [Quit: Bridge terminating on SIGTERM]
char[m] has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
infra_red[m] has quit [Quit: Bridge terminating on SIGTERM]
ecocode[m] has quit [Quit: Bridge terminating on SIGTERM]
iceman[m] has quit [Quit: Bridge terminating on SIGTERM]
AadVersteden[m] has quit [Quit: Bridge terminating on SIGTERM]
sp has quit [Quit: Bridge terminating on SIGTERM]
bitspook[m] has quit [Quit: Bridge terminating on SIGTERM]
drdrjacobs[m] has quit [Quit: Bridge terminating on SIGTERM]
makomo has quit [Quit: WeeChat 3.5]
Mrtn[m] has joined #commonlisp
hayley has joined #commonlisp
<hayley> I'm thinking of using Cleavir to implement a portable type inferencer (since, say, SBCL won't attempt to do much inter-procedural inference, possibly as it can't help optimisation) but I'm not sure what a good approach to getting code to the inferencer is.
<beach> What level would it be working on? IR?
Gnuxie has joined #commonlisp
yitzi has joined #commonlisp
kakuhen has joined #commonlisp
hayley has quit [Changing host]
hayley has joined #commonlisp
sp has joined #commonlisp
Duuqnd has joined #commonlisp
ecocode[m] has joined #commonlisp
char[m] has joined #commonlisp
bitspook[m] has joined #commonlisp
torhex-pasmul[m] has joined #commonlisp
iceman[m] has joined #commonlisp
jryans has joined #commonlisp
AadVersteden[m] has joined #commonlisp
loke[m] has joined #commonlisp
Helmholtz has joined #commonlisp
acma has joined #commonlisp
infra_red[m] has joined #commonlisp
drdrjacobs[m] has joined #commonlisp
rgherdt_ has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
irfan has quit [Quit: leaving]
analogsalad has joined #commonlisp
attila_lendvai has joined #commonlisp
waleee has joined #commonlisp
epony has joined #commonlisp
euandreh has quit [Ping timeout: 248 seconds]
anticomputer has quit [Quit: quit]
anticomputer has joined #commonlisp
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
orestarod has quit [Read error: Connection reset by peer]
random-nick has joined #commonlisp
pve has joined #commonlisp
makomo has joined #commonlisp
genpaku has quit [Remote host closed the connection]
genpaku has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
euandreh has joined #commonlisp
thuna` has quit [Remote host closed the connection]
jeosol has quit [Quit: Client closed]
euandreh has quit [Ping timeout: 265 seconds]
euandreh has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
euandreh has quit [Ping timeout: 250 seconds]
euandreh has joined #commonlisp
euandreh has quit [Ping timeout: 265 seconds]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
euandreh has joined #commonlisp
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
tyson2 has joined #commonlisp
lisp123 has joined #commonlisp
zachel has quit [Quit: DIsconnected: v7+nano]
zachel has joined #commonlisp
OlCe has quit [Ping timeout: 265 seconds]
cosimone has joined #commonlisp
euandreh has quit [Ping timeout: 244 seconds]
azimut has joined #commonlisp
euandreh has joined #commonlisp
waleee has quit [Ping timeout: 268 seconds]
zachel has quit [Quit: DIsconnected: v7+nano]
cosimone has quit [Remote host closed the connection]
lispm has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lispm has quit [Client Quit]
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
frodef_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
drakonis has quit [Quit: WeeChat 3.4]
drakonis has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest7984
ebrasca has joined #commonlisp
Colere has joined #commonlisp
Furor has quit [Ping timeout: 265 seconds]
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
ldb has joined #commonlisp
taiju has joined #commonlisp
Lord_of_Life has joined #commonlisp
Colere has quit [Ping timeout: 252 seconds]
ritchie101 has joined #commonlisp
ritchie101 has quit [Remote host closed the connection]
Colere has joined #commonlisp
nij- has joined #commonlisp
mxben has joined #commonlisp
Furor has joined #commonlisp
Colere has quit [Ping timeout: 265 seconds]
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
szkl has joined #commonlisp
eddof13 has joined #commonlisp
frgo has joined #commonlisp
taiju has quit [Ping timeout: 244 seconds]
ldb has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
cosimone has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nij- has quit [Read error: Connection reset by peer]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
Cymew has quit [Ping timeout: 265 seconds]
eddof13 has joined #commonlisp
comatory_ has quit [Ping timeout: 268 seconds]
<Josh_2> Good morning COOOO people
analogsalad has quit [Quit: bye]
_cymew_ has joined #commonlisp
<mathrick> gendl: SLIME comes with a connection startup banner already, which I believe is a contrib, have you looked at that?
<gendl> mathrick: I have not seen that, I will look for it, thanks.
Noisytoot has quit [Excess Flood]
makomo has quit [Ping timeout: 250 seconds]
orestarod has joined #commonlisp
luna-is-here has quit [Ping timeout: 250 seconds]
luna-is-here has joined #commonlisp
Noisytoot has joined #commonlisp
_cymew_ has quit [Ping timeout: 265 seconds]
_cymew_ has joined #commonlisp
<susam> gendl: (add-to-list 'slime-contribs 'slime-banner)
_cymew_ has quit [Ping timeout: 264 seconds]
szkl has quit [Quit: Connection closed for inactivity]
cage has joined #commonlisp
pieguy128_ has quit [Ping timeout: 265 seconds]
pieguy128 has joined #commonlisp
makomo has joined #commonlisp
tane has joined #commonlisp
tane has joined #commonlisp
tane has quit [Changing host]
makomo_ has joined #commonlisp
morganw has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
jeosol has joined #commonlisp
pjb has joined #commonlisp
frgo has quit []
frgo has joined #commonlisp
epolanski has joined #commonlisp
razetime has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
jeosol has quit [Quit: Client closed]
thuna` has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
tane has quit [Quit: Leaving]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
cosimone has quit [Ping timeout: 268 seconds]
jmes has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
_cymew_ has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyson2 has joined #commonlisp
_cymew_ has quit [Ping timeout: 265 seconds]
tyson2 has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
SR-71 has quit [Ping timeout: 244 seconds]
eddof13 has joined #commonlisp
causal has quit [Quit: WeeChat 3.6]
perrierjouet has quit [Quit: WeeChat 3.6]
Guest7984 has quit [Quit: WeeChat 3.6]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
perrierjouet has joined #commonlisp
livoreno has joined #commonlisp
perrierjouet has quit [Client Quit]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
thuna` has quit [Ping timeout: 265 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
tyson2 has joined #commonlisp
perrierjouet has joined #commonlisp
shka has quit [Ping timeout: 265 seconds]
makomo_ has quit [Quit: WeeChat 3.5]
makomo_ has joined #commonlisp
epolanski has quit [Quit: Connection closed for inactivity]
zyni-moe has joined #commonlisp
akoana has joined #commonlisp
zyni-moe has quit [Quit: died]
tyson2 has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyson2 has joined #commonlisp
shka has joined #commonlisp
eddof13 has joined #commonlisp
jeosol has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shka has quit [Ping timeout: 244 seconds]
ec has quit [Ping timeout: 258 seconds]
orestarod has quit [Ping timeout: 268 seconds]
<gin> (setf (gethash key table) value) ; <-- does it have a chance of one key overwriting the value of another key due to hash collision?
<pjb> No.
<pjb> There's no hash collision with gethash.
<pjb> gin: but you must ensure that the key is unique, with respect to the test of the hash-table.
<gin> I have unique keys but doesn't gethash do a traditional computer science hash computation from the given key?
<pjb> gin: eg. (let ((h (make-hash-table :test 'EQUALP))) (setf (gethash "foo" h) 42) (setf (gethash "FOO" h) 33) (gethash "foo" h)) #| --> 33 ; t |#
<pjb> gin: internally, possibly. But it presents a sane API!
<gin> what does it do to ensure that the gethash of two separate keys (unique keys) are different?
<pjb> At least, the name strongly suggest that a hash value is computed…
<pjb> gin: whatever it takes.
<pjb> (It's an implementation question; have a look at the sources of your implementation).
<Bike> gin: one conventional solution is to map each hash to a set of key/value pairs rather than necessarily just one. so you compute the hash, check that bucket, and then check which of the keys in the bucket your key is actually equalp/whatever to.
<pjb> http://clhs.lisp.se/Body/f_gethas.htm says nothing about such hash collision, because it's an implementation detail.
zyni-moe has joined #commonlisp
<gin> thanks Bike, pjb
<gin> it is really good that gethash eliminates the possibility of a collision
zyni-moe has quit [Client Quit]
<pjb> Yes.
<pjb> Also, this is a demonstrate of the difference between an algorithm school exercise, and an actual industry-strength library.
phadthai has quit [Ping timeout: 268 seconds]
perrierjouet has quit [Quit: WeeChat 3.6]
morganw has quit [Remote host closed the connection]
waleee has joined #commonlisp
luna-is-here has quit [Ping timeout: 268 seconds]
karlosz has quit [Quit: karlosz]
eddof13 has joined #commonlisp
luna-is-here has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
epony has quit [Quit: QUIT]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ttree has joined #commonlisp
luna-is-here has quit [Ping timeout: 264 seconds]
taiju has joined #commonlisp