freenode/#lisp - IRC Chatlog
Search
3:17:36
charles`
It has for me too, but in this one situation, it continues to pull form latest quicklisp release
3:22:48
thermo
i'm using sbcl, and i'm struggling to diagnose a slow OOM. i was hoping to get some related info by setting sb-kernel:gc-logfile and inspecting the output --- but nothing seems to be being written. are there further flags i'm meant to set?
3:28:26
thermo
i'd also be happy to just hear generic tips about diagnosing memory problems. if there's a way to see statistics what's still alive and where it was allocated, that'd be amazing
3:31:15
no-defun-allowed
If you break and evaluate (room t), SBCL provides a list of object types which have instances which occupy the most memory.
4:10:06
charles`
beach, no-defun-allowed: I'm not sure 😁. I would really appreciate a you taking a look. It works perfectly on sbcl. Let me write a test that displays what is wrong. Then I will share a link.
4:58:43
minion
charles`: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
5:02:00
charles`
that would be when you need to do some operations, how to decide which registers to put the data in?
5:02:20
beach
It is based on the OPT (imaginary) paging algorithm in that it estimates the distance to the next use of lexical variables, and when it needs to spill, it spills the one with the greatest estimated distance.
5:02:45
beach
More like deciding which register to spill to the stack when there are not enough of them.
5:15:44
beach
Registers are typically grouped into (overlapping) categories like general-purpose, caller saves, callee saves, floating point. Usually, any register in the right category will do for an operation.
5:15:45
beach
But when there are not enough registers, but you need for a lexical variable to be in a register even though right now it is not, you need to "steal" a register from some other lexical variable. Performance depends crucially on that choice.
5:16:37
beach
If you steal a register from a lexical variable that is going to be needed in a register fairly soon, you waste load/store operations.
5:23:10
no-defun-allowed
Yes, all of the compiler is written in Lisp. (This is also the case for SBCL and Clozure at least.)
5:32:53
charles`
I know that is the idea, but I just can't wrap my head around how you would manipulate registers like that.
5:34:32
aeth
Effectively, via custom "inline assembly" except it's syntactically just s-expressions so it's not really "inline assembly".
5:34:42
beach
Oh, you write a "code generator" in Common Lisp. You turn the Common Lisp code into machine code, and the program doing the turning is just another Common Lisp program. It is that program that inspects the instructions that are needed and makes decisions about what registers to use.
5:34:55
no-defun-allowed
You generate assembly in the end with any compiler. But the code manipulating the assembly is written in Common Lisp, yes.
5:37:04
charles`
hmm, so even though you aren't writing a compiler in assembly, there is some assembly written as output (maybe in a string). I got that it is at compile time.
5:39:19
no-defun-allowed
ACTION remembers "assembly" is the text form of machine code with labels and instruction names. Oops.
5:40:22
beach
charles`: As no-defun-allowed says, there is no particular reason for a compiler to generate assembly code. Assembly code was invented so that humans would have less trouble writing machine code. But a compiler does not need that human-friendly aspects that assembly provides.
5:43:18
moon-child
White_Flame: for the assembly representation, 'label' is more useful because it enforces an ordering, which you need to compute offsets (and decide when to generate short jumps, for supported platforms)
5:44:12
no-defun-allowed
I had generated acceptable assembly output from Cleavir's LIR once (which was used to make verifying it by eyeball somewhat easier).
6:17:21
charles`
Could someone help me understand how complex asdf are supposed to work. Ones with multiple systems defined in a single file, and stuff like cl-unicode/base
6:25:40
fiddlerwoaroof
charles`: I tend to find it's nice to group related systems into a single .asd
6:26:01
fiddlerwoaroof
ASDF now has some logic to complain if the system names don't follow a specified format, though
6:26:04
White_Flame
probably because they're intimately related. Broken out components of the same library for organization purposes, as well as tests & examples