freenode/#sicl - IRC Chatlog
Search
4:11:08
no-defun-allowed
(Also, for reference, the .NET platform further complicates the blocking kludge with the green thread hack, to maximise throughput in the presence of blocking, while minimizing the number of OS threads used, using hill climbing <https://mattwarren.org/2017/04/13/The-CLR-Thread-Pool-Thread-Injection-Algorithm/>. Eugh.)
4:12:26
beach
If you need information about the dynamic-extent stuff from me, you need to explain it a bit more.
4:43:21
Bike
the idea of cleavir providing tools for extended compiler analyses is interesting though.
4:44:06
Bike
i've heard people say before that they'd like a no-consing declaration, meaning that the compiler signals a warning if it can't prove that a given body of code doesn't cons. like for if you're writing a garbage collector
4:45:12
beach
I bet there is a host of "warn me if this isn't true"-type declarations that could be useful.
4:49:02
no-defun-allowed
What I would like is almost dynamic-extent, but there are certain kinds of escaping that are useful, and indeed safe. For example, if a mutex box contained a list, and then I updated it to store the CDR of that list, then there would be no problem with the CAR escaping. In this case, it's fine as long as nothing escapes which is still in the box.
4:50:17
no-defun-allowed
But then, another user might be okay with the CDR escaping, as that is also safe as long as the list structure isn't modified. (It could become stale, of course, as updates wouldn't touch that list structure, but that's fine.)
4:50:43
beach
I have no idea what it means for a mutex box to contain a list. I guess I don't know what a "mutex box" is.
4:51:10
Bike
i think it's a cell except you have to hold a lock around any reads from or writes to it?
4:51:28
no-defun-allowed
Thanks for reminding me. It's what Bike said; a structure with a lock and a value, and you can only get to the value by acquiring the lock.
4:53:16
Bike
for example, it seems to me that that while an atomic pop might be okay, if two thread non atomically popped a list they could get the same car, and then if that escaped you could end up simultaneously mutating the car object in multiple threads with no ordering
4:53:44
Bike
the relation is that certain operations are only supposed to take place within the dynamic extent of a with-lock-held kind of form
4:54:07
no-defun-allowed
"The ability to access the value" has dynamic extent in my opinion. My protocol has a WITH-UNLOCKED-BOX macro, just like that.
4:56:04
Bike
it's possible the compiler could help, but i'm not sure it would have much to do with analyzing the extents of values
4:57:17
Bike
i think tsan does this kind of thing in llvm land, but i don't know much of anything about it
5:01:19
Bike
if you want to detect data races there are a lot of things to know. you kind of want to track every value throughout the program and also get a complete graph of the happens-before, or whatever that's actually called, and both of those are hard to get (the first is obviously impossible to get precisely). but if you have it you can go, here, this operation here and this operation there can race
8:27:59
heisig
Oh, there is another naming discussion going on. 'Hucleberry' isn't so bad. A bit arbitrary, unless I missed something, but not bad.
8:29:00
heisig
And I also wonder where we'll put the code for the pretty printer. Will that be a separate project, too? Or will that be part of FORMAT?
8:44:19
heisig
Clostrum, Ecclesia, Cyclosis, Incless, Trucler, Eclector, CST, and Cleavir. Already more names than I can remember without looking them up.
8:46:23
heisig
A SICL homepage or wiki would be a great thing to lure in new developers. But it is not a pressing issue. Maybe something that could be looked at once SICL boots on its own.
8:47:12
beach
Yes, I am in no rush. I fear that I need to give more direction, or else people will work on things that I am not willing to incorporate.
8:49:24
beach
frodef: Do you have any plans to reuse any of the SICL code in order to create Fredman?
8:51:45
frodef
beach: but in general I don't want to duplicate work just for the sake of doing it, of course.
8:52:19
beach
Yes, that's also what I thought. And if Fredman can become an acceptable CLOSOS, that would save me a lot of work.
8:53:05
beach
no-defun-allowed: You need to know a bit about Scandinavian culture to get it. C.M. Bellman was an 18th century Swedish troubadour. Movitz and Fredman are recurring characters in his songs.
8:54:06
beach
frodef: It is not as ambitious as CLOSOS, but it exists, it runs, and it has lots of goodies like McCLIM.
8:55:07
frodef
I find Vreeswijk's and Åslund's "Movitz! Movitz!" to be the pinnacle of Bellman interpretation, btw.
9:02:51
beach
As I have said before, before I invented the technique for call-site optimization, I was convinced that SICL would not be among the fastest Common Lisp implementations around, so people might hesitate to make it the basis of an operating system. But now I am convinced it could be faster than any other Common Lisp implementation. But it won't happen without a lot of work.
9:04:21
beach
I would very much like to test my idea for a register allocator for instance, without which, things will be sluggish no matter what.
9:09:41
splittist
Why is register allocation so important? (You have taught me to be wary of any technique so established it is in every compiler textbook...)
9:10:54
lonjil
splittist: well, without allocating stuff to registers you can't actually do anything. What might be question is *how* registers should be allocated, I think.
9:12:19
beach
One well established technique is the global graph-coloring. It is pretty stupid in that it globally assigns a variable either to a register or to memory.
9:12:47
beach
Another one is linear scan, which is fast but presumably not as good as graph coloring.
9:13:30
frodef
beach: I have this vague inkling that there must be similar french music, but I haven't really gotten around to looking into it.
9:16:52
beach
The other idea I have is to base it on the paging algorithm OPT. Each program point would have an estimated distance to the next place each variable is used. When a variable is needed in a register and there are no registers available, evict the one that has the highest distance estimate.
9:18:13
beach
lonjil: A great popular composer is Jean-Jacques Goldman. It is not my favorite genre, but his stuff is good in that genre.
9:18:30
no-defun-allowed
There was one album Gnuxie and I enjoyed which is in French, but the musicians were from Quebec, so I don't think it counts.
9:23:18
beach
ralt: It was thanks to "Jack Allgood" who made a rule that radio must have 50% French music, that we finally got to get French quality music.
9:26:43
beach
ralt: I wish he would come back. I am working on a short story in French that contains almost 50% of English words that we hear daily on TV.
9:28:18
lonjil
frodef: Agner is probably one of the most knowledgable people in the world when it comes to what modern CPUs like or don't like.
9:28:54
ralt
language is spoken, for me, so whatever is deemed popular ends up being the language, by definition
9:29:46
beach
ralt: It is just that anglicisms in French sound very stupid, especially when they are pronounced the way they are.
9:32:36
beach
Il a monté un start-up pour acheter un cottage très cozy dans Center Parcs et c'est un véritable success-story.
9:36:09
frodef
https://www.agner.org/forum/viewtopic.php?f=1&t=41&sid=65636ac8be2a1901fcab6adb3bd0d08b stuff like this might have serious impact on run-time (and compiler) design.
9:46:52
beach
The problems with that kind of stuff are: 1. Since it is not documented, it may disappear in future processors. 2. It is specific to AMD and even to a particular processor family.
9:47:58
beach
So exploiting it in the compiler would mean some complex configuration scripts and/or run-time measures.
9:48:57
ralt
OTOH, as soon as you want to dive into assembly optimization, having per-processor branches is kind of a requirement
9:49:25
frodef
beach: he's elsewhere talking about how intel/amd compilers emit code that check for not only instruction-sets, but specific CPU models...
9:49:37
ralt
you can rely on features as much as you can, but at some point, you have buggy processors, some undocumented features on specific CPUs that are really worth it, etc etc.
9:50:41
frodef
ralt: ...and complaints that intel compilers intentionally run bad on AMD cpus, and so on and on.
9:52:53
heisig
One of my life goals is to get rid of the Intel compiler (or have it turned into an open source tool).
9:53:17
beach
I think I need to leave most of those detailed optimizations of SICL to people more competent than myself.
9:53:53
heisig
I don't grow tired of publicly shaming people in academia for using Intel's compiler. Everyone is talking about reproducible research, but then they use an obscure compiler that requires a revocable license from Intel to use it.
9:57:15
heisig
frodef: Not under my watch. But such papers are getting accepted at otherwise reputable conferences. And beach is right, I shouldn't get started.
9:58:09
beach
I suppose I could accept a kind of JIT that depends on intrinsic characteristics of the processor being used. What makes me queasy is to use JIT based on past executions of the application.
10:00:07
lonjil
Essentially, it must not be too difficult for someone else to replicate the environment in which you obtained your results.
10:00:25
frodef
lonjil: in order to qualify as "research", shouldn't it also relate in some sense to "eternal truths", as opposed to .. you know, "development"?
10:00:28
beach
frodef: Because I am scared of the complexity required in order to monitor the quality of the decisions made and to design a system for undoing those decisions, and make different ones.
10:01:30
beach
frodef: People like heisig and myself try (often in vain) to enforces some similar requirements.
10:02:42
lonjil
frodef: scientific research, certainly. But what about, let's say, novel new optimisation techniques? The author may provide benchmarks showing how it improves things. It should be simple for other people to replicate those benchmarks.
10:14:16
beach
So, I think we need to divide up the work here. I'll take care of inventing new techniques such as fast generic dispatch, call-site optimization, path replication, etc. And y'all can do processor-specific optimizations. OK? :)
10:38:35
beach
This discussion has convinced me that I should delete the directory containing timing experiments for the particular x86 processor I had at the time. The results are almost certainly outdated now, and I think I even changed some decisions about SICL object representation since I created those experiments.
10:39:51
frodef
shka_: it's a dilemma. you pretty much need to have decent performance now. And prospects of decent performance also in the future. While knowing that the tomorrow's performance model springs out of what is performant today.
10:41:21
lonjil
Perhaps a separate repo for benches. Something of the form "SICL commit XYZ on CPU ABC".
10:43:12
frodef
(erc just lost connection and made a lot of fuss about reconnecting... this technology is such a throwback to the 90s.)
14:53:43
beach
Before I started working on the paper about call-site optimization, I was able to load Alexandria into Ersatz (E5). Today, I continued that progress and I am able to also load Acclimation, Clostrum, and Trucler.
14:54:59
beach
Alexandria generates lots of warnings, mostly because we are not using file-compilation semantics, so there is a warning whenever a function is called before being defined.
14:56:02
beach
Clostrum generates two warnings that should be fixed by importing two functions from the host. Acclimation and Trucler generate no warnings.
15:31:55
beach
I think this latest progress is very encouraging. There is no profound reason why it shouldn't be possible to load CST, Cleavir, etc. The same way. The only potential problem I see is Eclector, because of the I/O involved.
15:33:46
beach
But for Incless, I actually go all the way to buffered binary output. I then fake the write() system call, but that's all the faking I do.
15:35:55
beach
So in fact, if I can come up with a nice way of writing system calls, I could produce an executable that writes something and then exits.