freenode/#sicl - IRC Chatlog
Search
4:00:47
beach
I need to figure out the implementation of CLASS-OF and TYPEP. The two are intimately related.
4:01:58
beach
It should check whether the object is one with a special tag, such as FIXNUM, CHARACTER, SINGLE-FLOAT, or CONS.
4:04:21
beach
There are standard functions CHARACTERP and CONSP, but no such thing for FIXNUM or SINGLE-FLOAT.
4:06:11
beach
We would like for all these types to be worked on by the type inferencer. So they should result in a TYPEQ-INSTRUCTION.
4:08:08
beach
First, we need a compiler macro on TYPEP that turns it into a TYPEQ when the type descriptor is a constant.
4:10:18
beach
And then, after the type inferencer has done its job, we must turn TYPEQ-INSTRUCTION into either FIXNUMP-INSTRUCTION, CHARACTERP-INSTRUCTION, CONSP-INSTRUCTION, [I forget what the thing is for floats], or a call to TYPEP.
4:13:49
beach
That's fine, but we need to make sure that the (TYPEQ object fixnum) does not result in a call to TYPEP.
4:16:45
beach
Which means that after the type inferencer has done its work, if there is ever a type descriptor that is equivalent to FIXNUM, then the FIXNUMP-INSTRUCTION should be used, rather than a call to TYPEP.
4:18:56
beach
But depending on the context, that type may turn into something like (AND (INTEGER .. ..) FIXNUM).
4:22:51
beach
We might get away with the simpler version where we just check the equivalence of a type with FIXNUM.
4:24:29
beach
It is *possible* that we can identify a small number of cases that we can handle "manually".
4:26:51
beach
Now, as I recall, Jim Newton et al are working on such a thing, but I think it is still work in progress.
6:22:59
beach
Hmm. I should have spent more time proofreading the draft of the paper by Valais, Newton, and Verna. There is some stuff in there that is hard to understand.
10:05:43
no-defun-allowed
SICL doesn't compile to machine code currently, rather its IR used to be compiled back to a subset of Common Lisp, and now the IR is interpreted.
10:09:55
no-defun-allowed
I think code generation isn't too far away, but there are other things to implement like hash-tables which are also quite important.
10:11:24
ebrasca
I just like to test sicl in my talosII, but it gives error when load it with "(ql:quickload :sicl-boot)"
10:12:06
no-defun-allowed
Not likely it has to do with your machine's instruction set then. What's the error?
10:18:50
no-defun-allowed
Hmm. I think you should clone https://github.com/robert-strandh/Clordane into ~/quicklisp/local-projects and load that, then try again.
10:19:56
no-defun-allowed
Admittedly I don't know the SICL codebase too well, but I think the system definition for sicl-hir-interpreter should have it depend on Clordane, which it currently doesn't.
10:29:57
no-defun-allowed
Basically, that ^^. You cannot use it to run a decent amount of Common Lisp programs.
10:31:20
no-defun-allowed
ebrasca: Maybe Clasp (#clasp) would be useful then. It uses LLVM as a backend for SICL's Cleavir compiler, which should support PPC64LE.
10:36:59
Shinmera
People keep thinking "oh LLVM, It must run on wasm and my obscure architecture for sure!" It's not how that works. Clasp won't run anywhere except Linux and OS X x86_64
10:42:42
Shinmera
Clasp uses a lot more than just LLVM and has a lot of assumptions about the architecture built into its code.
10:43:59
no-defun-allowed
You can't build Clasp on anything other than x86_64 or i386 on FreeBSD, Linux or macOS.
10:45:42
no-defun-allowed
It says in https://github.com/clasp-developers/clasp/blob/master/src/core/corePackage.cc#L1255 "only x86_64 and i386 is supported" though.
10:46:52
Shinmera
Last I knew it didn't work on x86 and there was no interest in making it work either.
10:52:37
no-defun-allowed
I do have a laptop from 2006 which runs Void Linux pretty well. Surprisingly, you can do CL work on it as long as you can stand Emacs in a terminal emulator.
10:53:24
no-defun-allowed
Shinmera: You'd need PAE then, but I think that only extends the address space the whole OS can use and individual processes are still stuck with less than 4GiB?
12:31:34
beach
Appendix II of Baker's paper on SUBTYPEP must represent some of the most screwed-up Common Lisp code I have ever seen. He must have had a good laugh coming up with it.
12:36:03
jackdaniel
beach: it is quite likely you are already aware of this, but ECL type system implements the Baker's proposal