<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.
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]
<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.