freenode/#sicl - IRC Chatlog
Search
10:25:15
no-defun-allowed
I guess it's likely CFFI will not let you overwrite the foreign code loaded, so using sb-alien might be the better choice.
10:26:00
heisig
The crucial part is that of atomically exchanging part of the code of the caller (the snippet address being jumped to). It will be interesting to see how modern CPUs cope with that.
10:56:10
heisig
shka_: That wouldn't be so bad. These addresses are only mutated when the callee is redefined.
11:12:47
heisig
shka_: I use mmap to allocate new pages that are both writable and executable, and I store my code there. So that should work.
11:13:20
no-defun-allowed
I think some operating systems don't allow WX pages, which makes modifying code a bit trickier.
11:14:07
no-defun-allowed
Not impossible, eg Java (I think) has some code to handle it on OpenBSD and macOS on AArch64 - it came up on #sbcl while porting some time ago.
11:39:58
no-defun-allowed
If you were a C programmer, I would say "that sounds like a _you_ problem..."
15:13:47
heisig
beach: I plan to measure the cost of various kinds of function calls, using different techniques.
15:14:20
heisig
One technique would be via a classical calling convention like that of SBCL, the other would be using the default snippet, the last one using the optimized snippet.
15:15:17
heisig
And then I want to measure these costs for a call with one mandatory argument, one optional argument, or one keyword argument.
15:23:13
heisig
Honestly, I just want to see all the machinery in action, and I'm not patient enough to wait for the full thing :)
15:48:27
beach
Now, if you do a good job, I'll include the results in the paper, and then you can't reject it for lack of benchmarks. :)
16:18:32
beach
I think I'll introduce an AST class and an instruction class NAMED-CALL. They would store the name of a global function to call, and there won't be an associated FDEFINITION.
16:19:35
beach
For the benefit of the HIR interpreter, I will CHANGE-CLASS that instruction so that it also contains a function cell. Then the HIR interpreter will take the CAR of that cell and call it with the arguments.
16:20:37
beach
Instead of hoisting FDEFINITIONs, the `tie' function will populate the function cells.
16:21:47
beach
Instead of hoisting FDEFINITIONs, AST-to-HIR will find the NAMED-CALL instructions and store them in the TOP-LEVEL-ENTER instruction.
16:22:52
beach
So instead of finding function cells and storing them in the static environment of the top-level function, the `tie' operation will populate the NAMED-CALL instructions with function cells.
16:24:15
beach
This change will likely speed up compilation and bootstrapping, because there will be a lot fewer shared variables, so processing shared variables at compile time will be faster, and creating static environments at run time will be faster as well.
20:58:06
scymtym
s-expressionists is a collection of modules for building common lisp implementations. SICL is a separate project and repository: https://github.com/robert-strandh/SICL/
20:59:57
scymtym
the modules are/will be used in SICL but are also explicitly intended to be used for other purposes
21:09:49
clothespin
I have discussed with beach before about first class environments, but I'm working on something that sicl might be useful for and i'm wondering if i might be on the right track
21:11:05
clothespin
one thing is I would like to have a database of source code which can either be edited by hand or changed by a program