libera/#sicl - IRC Chatlog
Search
16:36:19
Bike
you could probably use perfect hashing, since it's pretty unusual to add external symbols after the fact... lots of internal symbols for user systems, though
16:51:47
beach
Sure. I was thinking for the CL package to have a big function that basically does a binary search for each character code.
16:53:41
beach
Like (if (< (char-code (char name 0)) 40 (if (< (char-code (char name 1)) 35 ...) ...) (if ...)))
16:54:42
beach
And the coefficients could be adapted to the frequency of use of Common Lisp symbols.
16:59:28
beach
Such a function would be constructed automatically from the list of symbol names, of course.
17:01:40
beach
And if a prefix such as ARR has been found, then it is mostly a matter of checking that the next two letters are R and Y. Stuff like that.
17:18:41
Bike
https://github.com/pkhuong/string-case/blob/master/string-case.lisp#L130-L168 yeah, and it doesn't just do prefixes, either
17:32:30
beach
I don't immediately see how the test is performed if there are many strings with the same length, like "foa", "fob", "foc"...
17:33:09
beach
If he emits a CASE for the third letter, that might be costly because of how CASE is implemented.
17:38:03
Bike
It does some sbcl hacks to do a bunch of tests in a row without branching, which are then or'd together into a result
17:38:18
Bike
i think with the actual branching the idea is to rely on the compiler to turn that into a multiway branch
17:47:20
beach
My (admittedly small) family just announced that dinner is served. I'll be back tomorrow.
21:42:09
Bike
it's a little silly since clasp is the only user, but i am planning on doing a release of Cleavir tomorrow. I think (hope) the IR is now in a place where I don't need to change it for every optimization I want to do, so it should be relatively stable, and versioning should help solidify that.
21:42:21
Bike
https://github.com/s-expressionists/Cleavir/blob/release-v2/RELEASE_NOTES.md here are my release notes. comments appreciated.
21:42:44
Bike
i'm making it version 2.0 even though there was no 1.0 to go along with beach calling it Cleavir2
21:43:45
Bike
I also deleted a bunch of bitrotted systems since people I guess tried to use them. The flow stuff (e.g. reaching definitions, Kosaraju) I'm less sure about, since it's not currently used, but probably ought to be at some point
21:45:25
Bike
doing the added/changed/release thing for this is also kind of silly, but you have to start somewhere
23:58:27
whereiseveryone
hayley: but are there CL projects that are made of many modules but don't use many asd files?
1:19:02
Bike
other (spun-off) parts are used in other projects, e.g. staple uses eclector-cst for marking up code.
1:19:48
Bike
and yes, cleavir has a million asds because the systems are independently loadable/not loadable.
1:29:23
Bike
for example someone might want to parse code into ASTs to do syntactic analysis, but isn't interested in the later IR stage.