triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
occ has quit [Ping timeout: 240 seconds]
pranavats has left #commonlisp [Error from remote client]
occ has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
_cymew_ has quit [Ping timeout: 260 seconds]
_cymew_ has joined #commonlisp
pve has joined #commonlisp
igemnace has joined #commonlisp
varjag has joined #commonlisp
euandreh has quit [Ping timeout: 240 seconds]
_cymew_ has quit [Ping timeout: 240 seconds]
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
Krystof has joined #commonlisp
<phantomics>
Hi beach, had some questions about Cluster if you're around
attila_lendvai_ has joined #commonlisp
LW has joined #commonlisp
LW has quit [Client Quit]
NicknameJohn has joined #commonlisp
<beach>
I am.
<phantomics>
I'm looking over the docs and code and it's not immediately clear to me how to assemble instructions, say "MOV RAX, 10". Is there an sexp syntax like SBCL's vops?
<beach>
I don't now about vops. What you need to do is create a list of instances of the standard classes that are defined by Cluster.
<phantomics>
Ok, so each instruction is a class instance?
<beach>
No, I think there is one instruction class, and it has a mnemonic MOV.
<beach>
Well, yes, you are right.
<beach>
Each instruction and each label is an instance of a standard class.
<phantomics>
It's the code-command class?
<beach>
It's not fresh in memory. Let me look.
<beach>
I guess so. But I am surprised by the name.
<beach>
It looks like there is a MAKE-CODE-COMMAND function.
<phantomics>
Ok, I tried using (assemble (list (make-instance 'code-command :mnemonic "ADD" :operands ...))) and got an error:
<phantomics>
No candidate instruction for command #<CODE-COMMAND {100C3A1703}>
<beach>
Then you must have specified the operands in a way that we don't support.
<beach>
The operand are also instances of standard classes.
pranavats has joined #commonlisp
<phantomics>
Ok, I tried adding with a plain number
<phantomics>
That needs to be an immediate operand I guess
<beach>
Yes.
<beach>
In operand.lisp you have your classes.
kevingal has quit [Ping timeout: 240 seconds]
<phantomics>
I tried these operands: (make-instance 'cluster:gpr-operand :code-number 0 :size 64) (make-instance 'cluster:immediate-operand :value 10)
<phantomics>
And got the same error
<beach>
I could take some time to debug that for you, but I am a bit busy at the moment. May I suggest you look at code in SICL that has the cluster: package prefix? Then you will find several examples.
<phantomics>
Ok thanks, I'll take a look at SICL
X-Scale has quit [Ping timeout: 260 seconds]
<phantomics>
My eventual goal is to process some instructions for another architecture, just as a hello world at first. The instructions will be fixed-width so it will be easier
<beach>
Yes, that's much easier.
<beach>
The main complication of Cluster for x86 is instruction selection based on instruction arguments.
<phantomics>
What would an extension for another architecture look like? It's a complicated question of course so may best be answered later if you're busy
<beach>
There would not be much to it. You would need instruction descriptors for that architecture, but there will be way fewer of them.
<phantomics>
I see the x86 instruction database, the existing classes like gpr seem coupled to x86
<beach>
Yes, those may very well disappear.
<beach>
And the instruction selection will likely be very simple, just a single opcode for a particular mnemonic.
<ixelp>
SICL/utilities.lisp at 2aca333a25f1ff34bf4f06214be7d9a9e246de68 · robert-strandh/SICL · GitHub
<beach>
Things that might slightly complicate things are what RISC-V does in that they introduce mnemonics for instructions that don't exist, and that have an encoding as other instructions.
<phantomics>
Seems like a direct analog of what I'm doing, *RAX* is 0 here
<beach>
So you are saying that you don't understand the reason for your error?
<phantomics>
Yes, what I'm doing seems to be the same as what's happening in the code at that line, I'm trying to create MOV RAX, 10
<phantomics>
That code is moving a syscall-number into rax
<beach>
Sure.
<beach>
I see. Let me have a look.
<beach>
Did you build the x86 database?
<beach>
That's a separate system.
<beach>
If not, you will get that kind of error.
<phantomics>
I didn't, that makes sense
<phantomics>
There, it built
<phantomics>
Thanks
<beach>
Pleasure! Good luck!
<beach>
I would be delighted to have Cluster extended to other architectures, if you feel like doing that.
<phantomics>
I get it now, next step is to make a proof of concept of building a different instruction
<beach>
Great!
<phantomics>
What classes would I use as the basis for such a system? I suppose what I'm asking is: where is the boundary between arch-neutral classes and x86-specific ones? You mentioned gpr-operand is intended for x86
<beach>
I am not sure. It is clear that there are classes in Cluster that should be in a separate system for a particular architecture. I suspect you will need a class like GPR anyway, and one for MEMORY.
<beach>
And IMMEDIATE.
<beach>
But they will probably look different from the x86 ones.
<beach>
Memory operands in x86 are quite complicated.
<phantomics>
Yes, it may begin with creating classes for fixed-length instruction architectures and then specifying further for a given architecture
<beach>
Sounds good.
<phantomics>
I can poke around, if you can take a look later and have suggestions on where to start it will help
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
prxq has quit [Ping timeout: 248 seconds]
<beach>
Sure. Things are a bit complicated at the moment. I have family visiting, and Friday, I go to Amsterdam for ELS, so I won't have my desktop environment for a while.
<beach>
If I remember, I'll have a look at the Cluster code to see whether some better structure comes to mind.
Bocaneri has joined #commonlisp
Bocaneri is now known as Guest2454
Sauvin has quit [Ping timeout: 276 seconds]
jathd has joined #commonlisp
Guest2454 is now known as Sauvin
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
prxq has joined #commonlisp
Brucio-61 has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
uddipiggu has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
shka has quit [Quit: Konversation terminated!]
Gleefre has joined #commonlisp
uddipiggu has joined #commonlisp
<phantomics>
Appreciate it, beach, no rush
uddipiggu has quit [Read error: Connection reset by peer]
uddipiggu has joined #commonlisp
shka has joined #commonlisp
uddipiggu has quit [Changing host]
uddipiggu has joined #commonlisp
Cymew has joined #commonlisp
NicknameJohn has quit [Ping timeout: 252 seconds]
NicknameJohn has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
akoana has joined #commonlisp
euandreh has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
occ has quit [Ping timeout: 265 seconds]
pranavats has joined #commonlisp
Cymew has quit [Ping timeout: 240 seconds]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
tibfulv_ has joined #commonlisp
tibfulv has quit [Ping timeout: 240 seconds]
pranavats has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
<splittist>
But I'm amazed anything works at all. So I'm very pleased.
<beach>
Very important work, and great progress.
cmack has quit [Ping timeout: 240 seconds]
* splittist
blushes
<splittist>
(or perhaps it's the sunburn)
phantomics has quit [Ping timeout: 276 seconds]
phantomics has joined #commonlisp
skin has quit [Ping timeout: 240 seconds]
zxcvz has joined #commonlisp
Inline has joined #commonlisp
drainpipe has joined #commonlisp
skin has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
jeosol has quit [Quit: Client closed]
NotThatRPG has quit [Remote host closed the connection]
tibfulv_ has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
dcb has joined #commonlisp
czy has joined #commonlisp
Catie has joined #commonlisp
Catie has quit [Changing host]
skin has quit [Ping timeout: 250 seconds]
<czy>
if i am generating symbols (variables) in a package using 'eval and macros, should i put the symbol-generating routine in a (eval-when (:compile-toplevel) (variables-init))?
jeosol has joined #commonlisp
lucasta has joined #commonlisp
skin has joined #commonlisp
<czy>
it seems to be :load-toplevel, i figured it out
dcb has quit [Quit: MSN Messenger v2.16.1]
dcb has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<contrapunctus>
splittist: is the source published anywhere?
tyson2 has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
jathd has quit [Ping timeout: 248 seconds]
karlosz has joined #commonlisp
NotThatRPG has joined #commonlisp
<splittist>
contrapunctus: I'm slowly putting it up at https://github.com/splittist/pdfreader , not so much for public sharing (because it's still very much in the exploratory phase) as because I have already deleted my working directory at least once...
<ixelp>
GitHub - splittist/pdfreader
Gleefre has joined #commonlisp
Devon has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
waleee has joined #commonlisp
<pjb>
cpli: yes, a reader macro on #\( can parse a token, and determine how to further parse the following text depending on this token.
<pjb>
czy: it really depends on when you use (or reference) it. You may also put it in a separate file, compiled and loaded before compiling the file using it at compilation (macroexpansion) time.
<pjb>
czy: I would use (:compile-toplevel :load-toplevel :execute) situation for those functions, if you want to put them in the same file.
<pjb>
czy: you need execute if you load the source, and :compile-toplevel if you compile it…
tyson2 has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
drainpipe has joined #commonlisp
drainpipe has quit [Ping timeout: 276 seconds]
pjb has quit [Ping timeout: 246 seconds]
doyougnu has quit [Ping timeout: 255 seconds]
drainpipe has joined #commonlisp
zxcvz has joined #commonlisp
drainpipe has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
johnjaye has joined #commonlisp
drainpipe has joined #commonlisp
drainpipe has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
skin has quit [Quit: Leaving.]
skin has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
mgl has joined #commonlisp
zabow has joined #commonlisp
tyson2 has joined #commonlisp
lucasta has quit [Remote host closed the connection]
hrberg has quit [Ping timeout: 276 seconds]
igemnace has quit [Quit: WeeChat 3.8]
tyson2 has quit [Remote host closed the connection]
drainpipe has joined #commonlisp
zabow has quit [Quit: Leaving]
_cymew_ has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Ping timeout: 255 seconds]
drainpipe has quit [Quit: WeeChat 3.8]
<czy>
pjb: put all of them there?
<czy>
pjb: i will give that a try, thank you
mgl has quit [Quit: Client closed]
<johnjaye>
i knew i saw the cl cookbook somewhere.
pve has quit [Quit: leaving]
shka has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
kevingal has quit [Ping timeout: 250 seconds]
NotThatRPG has quit [Ping timeout: 240 seconds]
dasyatidprime has joined #commonlisp
_dcb_ has joined #commonlisp
dcb has quit [Remote host closed the connection]
<dasyatidprime>
Hey, folks. Anyone know off-the-cuff what's considered acceptable for get-setf-expansion to return if given a compound form with a special operator that isn't normally setf-able? Like (get-setf-expansion '(block nil oops)) or (get-setf-expansion ''oh-no).
<dasyatidprime>
I've found a place where I think CFFI is unconditionally get-setf-expansion'ing something that might not be setf-able, but I'm not sure if this is _also_ a CL impl bug/misfeature. Both SBCL and CCL treat the quote case as though it were a funcall, which results in a garbage quote-of-gensym getter form.
rgherdt has quit [Remote host closed the connection]
skin has quit [Ping timeout: 276 seconds]
<semz>
czy: https://fare.livejournal.com/146698.html might be helpful. You basically never need anything other than (:compile-toplevel :load-toplevel :execute).
<ixelp>
EVAL-WHEN considered harmful to your mental health - Cybernethics / Cybernéthique — LiveJournal
cognemo has quit [Ping timeout: 252 seconds]
monoidog has joined #commonlisp
occ has quit [Ping timeout: 250 seconds]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Client Quit]
NotThatRPG has joined #commonlisp
Posterdati has quit [Ping timeout: 248 seconds]
prokhor has quit [Ping timeout: 265 seconds]
Posterdati has joined #commonlisp
lucasta has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]