diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2026-11-14 16:48:21 +0100 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2026-11-14 16:48:21 +0100 |
| commit | f4d2fa3fb2f41a0231040f7e005c4bd467855620 (patch) | |
| tree | 0aa6d59bd467ed0bac1b3aae8d4ad6f02298cb8f /notes | |
| parent | ee7a205bd8235255b652038bfef779744f3d93f5 (diff) | |
s/zisp/xisp/g on notes
Diffstat (limited to 'notes')
33 files changed, 182 insertions, 182 deletions
diff --git a/notes/250210-cons.md b/notes/250210-cons.md index 1ce97b9..dfd6a8a 100644 --- a/notes/250210-cons.md +++ b/notes/250210-cons.md @@ -30,7 +30,7 @@ alternative: [A New Approach to Procedures with Variable Arity](https://legacy.cs.indiana.edu/~dyb/pubs/LaSC-3-3-pp229-244.pdf) Let's first summarize the paper, and then see how we can adapt its -ideas for Zisp. +ideas for Xisp. Long story short, rest argumenst are received through a parameter list such as `(arg1 ... argn & rest)` and the identifier `rest` is special @@ -62,7 +62,7 @@ combining this feature with what is today known as `case-lambda`: Though the paper proposes the use of `&` so as to differentiate it from the regular rest-argument mechanism of Scheme, I intend to make -Zisp use only this mechanism, so we can use the dot notation for it. +Xisp use only this mechanism, so we can use the dot notation for it. Rewriting the above examples in this style gives us: ```scheme @@ -99,7 +99,7 @@ Essentially, this means that the special rest-arg identifier is itself a representation of multiple values, or in other words, evaluating it results in multiple values even though it's just an identifier! -Demonstration, using Zisp notation for multiple-value rest args: +Demonstration, using Xisp notation for multiple-value rest args: ```scheme @@ -156,7 +156,7 @@ example, since the following s-expressions are equivalent: ``` -In Zisp, this will be solved by making `apply` a special-form where +In Xisp, this will be solved by making `apply` a special-form where the last operand is expected to evaluate to multiple values rather than a list: @@ -177,14 +177,14 @@ representing arguments in the first place; it should always have been multiple values! (The phrase "argument list" is probably going to stick around forever -though, even if it's technically wrong in Zisp.) +though, even if it's technically wrong in Xisp.) ## Grammar switch-up! _2026 January_ For [reasons](260106-grammar.html) I've decided to actually use the -ampersand in place of the dot in Zisp s-expressions. Not like in the +ampersand in place of the dot in Xisp s-expressions. Not like in the paper linked above; the ampersand simply replaces the dot in the representation of improper lists. diff --git a/notes/250210-equal.md b/notes/250210-equal.md index e81defb..515e843 100644 --- a/notes/250210-equal.md +++ b/notes/250210-equal.md @@ -230,7 +230,7 @@ record types were overlooked in its definition in R7RS-small. (I'm coining this as a new meme, in contrast to "why not both?") -I think I want Zisp to support the following: +I think I want Xisp to support the following: * `eq?`: As in Scheme, but maybe allowed to fail on procedures. * `eqv?`: As in Scheme. diff --git a/notes/250210-immutable.md b/notes/250210-immutable.md index e6e8d1e..b80af57 100644 --- a/notes/250210-immutable.md +++ b/notes/250210-immutable.md @@ -50,7 +50,7 @@ variables. Perhaps the syntax and semantics could be changed to: This is different in that passing around `x` will not actually pass around a box whose contents can be mutated; rather, it's a regular -variable like in Scheme, but mutable unlike normal Zisp variables. +variable like in Scheme, but mutable unlike normal Xisp variables. The `mutable` identifier would be part of the `let` syntax and not possible to use anywhere else. (Probably not even with `define`.) diff --git a/notes/250210-let.md b/notes/250210-let.md index 7fc27d4..2cb9088 100644 --- a/notes/250210-let.md +++ b/notes/250210-let.md @@ -18,11 +18,11 @@ powerful. (The only thing `let` can do that `letrec` can't, is to refer to the previous binding of a variable before shadowing it.) Further, the value of vanilla `letrec` is dubious when `letrec*` is -strictly more powerful. So, in Zisp, `let` is the ultimate binding +strictly more powerful. So, in Xisp, `let` is the ultimate binding form that does what `letrec*` does in Scheme. Except it does more! We haven't looked at the whole `let-values` -family yet. In Zisp, these are also merged into the ultimate `let`, +family yet. In Xisp, these are also merged into the ultimate `let`, using the SRFI 71 syntax: ```scheme diff --git a/notes/250210-nan.md b/notes/250210-nan.md index 107bdf7..adc939f 100644 --- a/notes/250210-nan.md +++ b/notes/250210-nan.md @@ -116,9 +116,9 @@ as unused, giving us another `2^52 - 2` bit patterns. In total, this gives us `2^53 - 4` definitely-unused NaN bit patterns. -## Representing Zisp values and pointers as unused NaN bit patterns +## Representing Xisp values and pointers as unused NaN bit patterns -Zisp wants to store two different things in unused NaN patterns: +Xisp wants to store two different things in unused NaN patterns: 1. Pointers (to anything in principle) @@ -252,7 +252,7 @@ that much play room, we can do some crazy things. ### Foreign pointers Firstly, let's introduce the concept of a "foreign" pointer. This means the -pointer doesn't necessarily point to a Zisp object, and may not be 8-byte +pointer doesn't necessarily point to a Xisp object, and may not be 8-byte aligned. As it may point to anything, there's no point in defining further bits as tagging additional information, so we have all 50 bits available. @@ -272,16 +272,16 @@ essentially defined another fixnum range of 50 bits. This can include the value zero, since the foreign bit being set ensures we don't step on the forbidden all-zero payload value. -### Zisp pointers +### Xisp pointers -Now let's look at what we can do with "native" Zisp pointers. +Now let's look at what we can do with "native" Xisp pointers. Wouldn't it be nice if our language had an explicit "pointer" data type and it didn't require any additional heap allocation? So let's decide that one bit is dedicated to distinguishing between an explicit pointer object, and regular pointers that stand in for the object being pointed to. -Perhaps it would be good to show some Zisp pseudo-code to explain what that +Perhaps it would be good to show some Xisp pseudo-code to explain what that means, since it may be a strange concept: ;; In memory, vec is represented as a regular/direct vector pointer. @@ -311,7 +311,7 @@ immediate value like an integer or double as well. A box would necessarily need heap allocation, whereas a pointer doesn't. It's *also not* the same thing as a foreign pointer, because those can be -anything, whereas these pointer objects definitely point to Zisp objects. +anything, whereas these pointer objects definitely point to Xisp objects. Pointers may or may not be mutable; I've not made up my mind yet. It may seem like a pointless data type, but it adds a little bit of expressive @@ -332,7 +332,7 @@ would fit perfectly since they can contain null. Direct or indirect makes no difference to the fact that the pointer value will be 8-byte aligned, so we still have 4 bits for more information about what's being pointed to. Also, since the actual pointer value can never be -zero (all non-foreign pointers must point to a valid Zisp object), we avoid +zero (all non-foreign pointers must point to a valid Xisp object), we avoid the forbidden zero pattern. Thus, we can indicate 16 different values with our 4 remaining bits. @@ -352,14 +352,14 @@ of an operation, after all.) The tag can be used to tell us what we're pointing to, so that type checks often don't require following the pointer. The memory location that's being pointed to may duplicate this information, since we may want to ensure that -any Zisp object on the heap carries its type information within itself, but +any Xisp object on the heap carries its type information within itself, but I'm not yet decided on that. In any case, let's list some common heap data types that our 4-bit tag can represent, making sure to have an "other" wildcard for future extensions. The right side shows the value of the type tag when it's acquired by masking -the 49-bit Zisp pointer payload. +the 49-bit Xisp pointer payload. 0. String (Symbol) ... 0x0000000000000 1. Pair (List) 0x0000000000001 @@ -408,12 +408,12 @@ missing, so we automatically avoid the forbidden zero payload. ### What the heck is a "short string"? -Remember that [strings are immutable](250210-symbols.html) in Zisp. This +Remember that [strings are immutable](250210-symbols.html) in Xisp. This allows us to use an amazing optimization where short strings can be represented as immediate values. We can't get to 56 bits (7 bytes), but 48 bits (6 bytes) fits perfectly into -our payload! So any interned string (equivalent to a Scheme symbol) in Zisp +our payload! So any interned string (equivalent to a Scheme symbol) in Xisp will in fact be an immediate value if 6 bytes or shorter, and doesn't need any heap allocation. Awesome! @@ -451,7 +451,7 @@ claim that you must avoid signaling NaNs or quiet NaNs, or they take a naive approach to the subdivision of the available bit patterns and end up wasting tons of bit real estate. -Stay tuned for the development of Zisp, because this is getting serious! +Stay tuned for the development of Xisp, because this is getting serious! <!-- ;; Local Variables: diff --git a/notes/250210-serialize.md b/notes/250210-serialize.md index bed28c8..4358cd7 100644 --- a/notes/250210-serialize.md +++ b/notes/250210-serialize.md @@ -14,7 +14,7 @@ again: ``` -(In Zisp, this would be executed at compile-time, so the lookup table +(In Xisp, this would be executed at compile-time, so the lookup table becomes part of the compiled program.) If you're familiar with Guile --and I suspect most implementations of @@ -51,11 +51,11 @@ the ELF file it's writing. (At least, this is the case as of February 2025, using Guile 3.0.10; who knows what the future will provide!) -In Zisp, I want absolutely everything to be possible to serialize, and +In Xisp, I want absolutely everything to be possible to serialize, and the compiler should simply be using this capability of the language to write out compiled binaries. -For example, given that any Zisp program has to declare a `main` entry +For example, given that any Xisp program has to declare a `main` entry point function, all the compiler would do is execute the file and then call `(write main)`. How elegant! diff --git a/notes/250210-sugar.md b/notes/250210-sugar.md index a9038b6..9d9bc5f 100644 --- a/notes/250210-sugar.md +++ b/notes/250210-sugar.md @@ -55,7 +55,7 @@ statically known. (And no we don't want to write `person.person-age`, we want `person.age` where `age` is not treated as an identifier but merely as a symbol for lookup.) -It may be that we want to add static typing to Zisp! +It may be that we want to add static typing to Xisp! We may also add OOP-style objects and only use the dot notation for their methods, but not fields. The reader syntax for `foo.bar` may diff --git a/notes/250210-symbols.md b/notes/250210-symbols.md index eeb516f..68bf851 100644 --- a/notes/250210-symbols.md +++ b/notes/250210-symbols.md @@ -12,7 +12,7 @@ manipulation, because they are constant-length. They are literally just vectors of characters. If you wanted a vector of characters, well, use a vector of characters! -Zisp won't differentiate between symbols and strings. All strings +Xisp won't differentiate between symbols and strings. All strings will be immutable, string constants will be automatically interned, and bare symbols will just be reader syntax for a string constant. diff --git a/notes/250210-zero-values.md b/notes/250210-zero-values.md index 7003b85..78fa908 100644 --- a/notes/250210-zero-values.md +++ b/notes/250210-zero-values.md @@ -10,4 +10,4 @@ return. It's a remnant from before we had the ability to return multiple values, and should be eliminated. Any operation that has nothing meaningful to return, will return zero -values in Zisp, and no more. +values in Xisp, and no more. diff --git a/notes/250219-reader.md b/notes/250219-reader.md index d331897..d114911 100644 --- a/notes/250219-reader.md +++ b/notes/250219-reader.md @@ -14,7 +14,7 @@ that are wildly explored here. See late addition at the bottom.* OK but hear me out... What if there were different reader modes, for code and (pure) data? -I want Zisp to have various neat syntactic extensions (see [syntax +I want Xisp to have various neat syntactic extensions (see [syntax sugar](250210-sugar.html) note) for programming purposes anyway, like the lambda shorthand, and these shouldn't apply to configuration files, either. (Although they seem unlikely to occur by accident.) @@ -244,7 +244,7 @@ the decompiler: values --[encode]--> values-data --[data-writer]--> data-file That gives you a file containing only data, but the data is the -encoded format of various data structures Zisp recognizes... +encoded format of various data structures Xisp recognizes... Actually, that may include compiled procedures as well. Now the simple config file case, being serialized: @@ -410,7 +410,7 @@ to allow arbitrary code execution to happen just when reading a data file and decoding it. So something exceptional would need to happen for this to work. Or maybe not. -Remember that [compilation is execution](250210-compile.html) in Zisp, +Remember that [compilation is execution](250210-compile.html) in Xisp, meaning that compiling a file looks like this in pseudo-Scheme: (define env (null-environment)) ;start out empty @@ -490,7 +490,7 @@ Just to summarize what I actually ended up implementing in the end: would be `'|foo bar|` that also parses into `(#QUOTE . |foo bar|)`. All three parse into the exact same data in memory. -- If you want to use Zisp expressions for something like config files +- If you want to use Xisp expressions for something like config files and want to type `"foo bar"` instead of `|foo bar|` but don't want to deal with `(#QUOTE . |foo bar|)` then just run a decoder on the data before using it. You'll need to run a decoder on it anyway if @@ -510,7 +510,7 @@ Just to summarize what I actually ended up implementing in the end: `(code (string-append foo x))` thus changing the meaning of the embedded code, you have two options: - 1. Make your entire config file be Zisp code written in a DSL. + 1. Make your entire config file be Xisp code written in a DSL. 2. Wrap code snippets in one layer of quoting like `'(...)` which will effectively protect nested uses of `#QUOTE` from the data @@ -524,7 +524,7 @@ Just to summarize what I actually ended up implementing in the end: config file could explicitly decode these super-quoted code snippets before evaluating them. -See here for full documentation of Zisp expressions as implemented: +See here for full documentation of Xisp expressions as implemented: -- [Informal docs](https://tkammer.de/zisp/doc/c1/1-parse.html) -- [Formal spec](https://tkammer.de/zisp/doc/c1/grammar/) +- [Informal docs](https://tkammer.de/xisp/doc/c1/1-parse.html) +- [Formal spec](https://tkammer.de/xisp/doc/c1/grammar/) diff --git a/notes/250228-macros.md b/notes/250228-macros.md index d9c946c..ca7ae7c 100644 --- a/notes/250228-macros.md +++ b/notes/250228-macros.md @@ -22,7 +22,7 @@ On one hand, sure: (vector '<element> ...))) Or something like that. You know what I mean? I mean, in Scheme you -can't return a vector from a macro, but in Zisp the idea is that you +can't return a vector from a macro, but in Xisp the idea is that you can very well do that if you want, because why not. It's very much possible that I will eventually realize that this is a @@ -31,7 +31,7 @@ a macro just returning objects, like a procedure, rather than having to return a syntax object that has a binding to that procedure. This may be similar to John Shutt's "vau calculus" from his language -Kernel. Maybe Zisp will even end up being an implementation of the +Kernel. Maybe Xisp will even end up being an implementation of the vau calculus. But I don't know; I've never fully grokked the vau calculus, so if I end up implementing it, it will be by accident. @@ -43,7 +43,7 @@ But then there's an issue with quoting. Consider the following: (define stuff '(foo #(0 1 2))) -In Zisp, this would first of all be parsed into: +In Xisp, this would first of all be parsed into: (define stuff (#QUOTE foo (#HASH 0 1 2))) @@ -59,7 +59,7 @@ macro expander, whoops: ;; => (bar #(0 1 2)) I mean... MAYBE that should happen, actually?! Probably not, though. -What Scheme does isn't gospel; Zisp isn't Scheme and it will do some +What Scheme does isn't gospel; Xisp isn't Scheme and it will do some things differently, but we *probably* don't want anything inside a quoted expression to be macro expanded. Probably. @@ -86,7 +86,7 @@ level of comprehensibility of code containing literals, I think it's good for there to be something that you just know will turn into an object of some type, no matter what; that's what a literal is. -(In Zisp, it's not the reader that immediately turns the literal into +(In Xisp, it's not the reader that immediately turns the literal into an object of the correct type, but the decoder still runs before the evaluator so it's almost the same.) @@ -96,7 +96,7 @@ more elegant if everything is a macro. Don't pile feature on top of feature, remember? Booleans, by the way, would just be identifier syntax then. Just -`true` and `false` without the hash sign. In Zisp, you can't shadow +`true` and `false` without the hash sign. In Xisp, you can't shadow identifiers anyway, so now they're like keywords in other languages, also a bit like `t` and `nil` in CL and Elisp. diff --git a/notes/250228-sr.md b/notes/250228-sr.md index c7658ff..2bc5cf1 100644 --- a/notes/250228-sr.md +++ b/notes/250228-sr.md @@ -367,4 +367,4 @@ special `:bind` syntax class id, assuming there isn't already a similar thing in Racket or elsewhere. Oh and this made me realize I should add `foo:bar` as reader syntax to -Zisp, turning it into `(#COLON foo . bar)` or such. +Xisp, turning it into `(#COLON foo . bar)` or such. diff --git a/notes/250317-fastcons.md b/notes/250317-fastcons.md index 57bb6a6..f87b7bb 100644 --- a/notes/250317-fastcons.md +++ b/notes/250317-fastcons.md @@ -7,7 +7,7 @@ with NaN packing; doesn't matter), and there's enough information on pointers to tell you that the destination is the contents of a pair, aka cons cell. -For example, Zisp uses NaN packing, and all values are represented as +For example, Xisp uses NaN packing, and all values are represented as a `Value` union, which is either a double, or a special kind of NaN value that may, among other possibilities, contain a pointer with a 3-bit type tag within it. One of the 8 possible types is a pair. @@ -28,7 +28,7 @@ elements, you have five `[2]Value` on the heap, i.e., ten values! Can't we improve on that, somehow? -In Zisp's NaN-packing strategy, there's an entire unused bit on heap +In Xisp's NaN-packing strategy, there's an entire unused bit on heap pointers. (There's also a whole other set of possible pointer values with a 50-bit payload, so really, we have a *ton* of unused pointer space.) diff --git a/notes/250329-boot.md b/notes/250329-boot.md index 37c3a48..ecd4046 100644 --- a/notes/250329-boot.md +++ b/notes/250329-boot.md @@ -1,4 +1,4 @@ -# Bootstrapping Zisp +# Bootstrapping Xisp _2025 March_ @@ -8,9 +8,9 @@ the Thompson Hack. The easiest way to do that is making sure that your language can be bootstrapped from an existing language, which itself has some solution to the problem. -Currently, I'm thinking of implementing Zisp in Zig. (That's not the -entire reason Zisp is called Zisp, and I might choose a different -language eventually, and/or rename Zisp, but anyway.) +Currently, I'm thinking of implementing Xisp in Zig. (That's not the +entire reason Xisp is called Xisp, and I might choose a different +language eventually, and/or rename Xisp, but anyway.) Zig, in turn, will *hopefully* be possible to bootstrap from C in the future, or some language implemented in C. For C, there are some ways @@ -23,11 +23,11 @@ _2025 December_ Currently thinking of the following strategy, which I believe is similar to how Guile does it: -* There will be a Zisp interpreter written in Zig, which is fairly +* There will be a Xisp interpreter written in Zig, which is fairly simple and naive in its implementation and, for example, ignores - static type declarations. It should support the full Zisp language + static type declarations. It should support the full Xisp language including hygienic macros, but be as easy as possible to maintain. -* The Zisp compiler will be written in Zisp. The interpreter can run - the compiler (since it can run any Zisp program) and will be used to +* The Xisp compiler will be written in Xisp. The interpreter can run + the compiler (since it can run any Xisp program) and will be used to compile the compiler. diff --git a/notes/250329-strings.md b/notes/250329-strings.md index 43cb869..23b4339 100644 --- a/notes/250329-strings.md +++ b/notes/250329-strings.md @@ -7,7 +7,7 @@ symbols one and the same. Then I realized this introduced ambiguity between bare strings meant as identifiers, and quoted strings representing a string literal in code. -After a bunch of back-and-forth, I came up with the idea of the Zisp +After a bunch of back-and-forth, I came up with the idea of the Xisp [decoder](250219-reader.html) with which I'm very happy overall, but I still decided to ditch the idea of using a representation for quoted string literals like `(#STRING . "foo")` after all. @@ -60,7 +60,7 @@ Here's how the parser uses these types: _2026 January_ -Currently, the Zisp parser does, after all, conflate strings and +Currently, the Xisp parser does, after all, conflate strings and symbols, with string literals simply being quoted symbols. There aren't going to be separate data types because it's unnecessary after all. The syntax `"foo bar"` parses into `(#QUOTE . |foo bar|)` and diff --git a/notes/250329-unread.md b/notes/250329-unread.md index 6f9b12c..ad00c32 100644 --- a/notes/250329-unread.md +++ b/notes/250329-unread.md @@ -25,7 +25,7 @@ any port without this feature can be wrapped in a port that adds it via a simple one-character buffer. If more than one character of look-ahead is needed, a small circular buffer could be used. -Thankfully, Zisp s-expressions are all self-terminating. This is +Thankfully, Xisp s-expressions are all self-terminating. This is because a datum followed immediately by another datum, without any blanks in between, is a "joined datum" expression. Any number of additional data can be joined like this, yielding a more and more diff --git a/notes/250920-goals.md b/notes/250920-goals.md index 0acdfa5..db70ece 100644 --- a/notes/250920-goals.md +++ b/notes/250920-goals.md @@ -1,11 +1,11 @@ -# What are the goals of Zisp? +# What are the goals of Xisp? _2025 September_ Today someone asked me to elaborate on what I mean when I say I'd really like a systems language with a garbage collector. -Although Zisp started out with a different intention (a modern +Although Xisp started out with a different intention (a modern re-invention of Scheme), I now actually want it to become that language I'm dreaming of. diff --git a/notes/250920-libgccjit.md b/notes/250920-libgccjit.md index 882b69a..5c55e88 100644 --- a/notes/250920-libgccjit.md +++ b/notes/250920-libgccjit.md @@ -8,48 +8,48 @@ The installed size of libgccjit varies from 18 MB (armhf) to 53 MB That's quite large. I wonder how much it could be stripped down if you linked to it statically and didn't use all parts of it? -If I did use it to implement Zisp, I suppose I could offer the choice -of generating binaries that don't actually link to the full Zisp +If I did use it to implement Xisp, I suppose I could offer the choice +of generating binaries that don't actually link to the full Xisp runtime. So, the final situation could be as follows, for example: -- The "meat" of Zisp would be a .so whose size is in the order of tens +- The "meat" of Xisp would be a .so whose size is in the order of tens of MBs. - A tiny wrapper executable linked to this .so would be the entry - point to both an AOT compiler and a REPL for Zisp. + point to both an AOT compiler and a REPL for Xisp. - Fully dynamic "lisp machine" applications (in the spirit of Emacs) - that are both written in Zisp and support dynamic Zisp evaluation + that are both written in Xisp and support dynamic Xisp evaluation would have this .so as a runtime dependency, or need pretty much all of it to be compiled in. -- However, the Zisp AOT compiler could also output binaries (dynlibs - and executables) that don't actually have zisp.so as a runtime +- However, the Xisp AOT compiler could also output binaries (dynlibs + and executables) that don't actually have xisp.so as a runtime dependency. -What if someone just wants to use a tiny script written in Zisp? If +What if someone just wants to use a tiny script written in Xisp? If you want to use a tiny script written in Perl, Python, etc. you still need the entire thing, so maybe it'd be acceptable for such scripts to -have full Zisp package as a runtime dependency. +have full Xisp package as a runtime dependency. -Alternatively, Zisp could be split into a number of dynlibs that -implement different parts of it: zisp-gc.so, zisp-parser.so, -zisp-intrpr.so, zisp-comp.so, and so on, where zisp-comp.so would -probably be the largest. There could be a "Zisp interpreter" package +Alternatively, Xisp could be split into a number of dynlibs that +implement different parts of it: xisp-gc.so, xisp-parser.so, +xisp-intrpr.so, xisp-comp.so, and so on, where xisp-comp.so would +probably be the largest. There could be a "Xisp interpreter" package that doesn't depend on that one. -Alternatively #2, there could be a ZispScript language that consists -of a strict subset of Zisp (e.g. no static typing, no eval) and an +Alternatively #2, there could be a XispScript language that consists +of a strict subset of Xisp (e.g. no static typing, no eval) and an interpreter for this language could simply be a program that happens -to be written in Zisp but doesn't depend on the full Zisp .so since it +to be written in Xisp but doesn't depend on the full Xisp .so since it doesn't use the native compiler. However, what if someone wants to -write a program that *includes* a Zisp interpreter... +write a program that *includes* a Xisp interpreter... -I think a combination of the two above ideas would be best: ZispScript -would be implemented by a library written in Zisp, zispscript.so, +I think a combination of the two above ideas would be best: XispScript +would be implemented by a library written in Xisp, xispscript.so, which can be linked to if you want to write a program that can execute -ZispScript at runtime, and also the ZispScript package would come with -a little wrapper executable that invokes zispscript.so to interpret -scripts with a #!/usr/bin/zispscript shebang or such. +XispScript at runtime, and also the XispScript package would come with +a little wrapper executable that invokes xispscript.so to interpret +scripts with a #!/usr/bin/xispscript shebang or such. diff --git a/notes/260102-full-stack.md b/notes/260102-full-stack.md index 3870bf5..4acaf06 100644 --- a/notes/260102-full-stack.md +++ b/notes/260102-full-stack.md @@ -3,7 +3,7 @@ _2026 January_ As I become more and more ambitious with my dreams about what I want -Zisp to become, it becomes less and less likely that I'll actually +Xisp to become, it becomes less and less likely that I'll actually create and finish the language, ever. But I just can't help it. The notion of a "full-stack programming language" was first widely @@ -52,7 +52,7 @@ write your code and having its own mind on how to actually do things at run-time, which tends to be the case with higher level languages. It would mean that the language is not for the faint of heart. Though -I want it to be possible to write high-level Zisp code without having +I want it to be possible to write high-level Xisp code without having to think of any of the more complex mechanisms, offering an experience comparable to writing Python or JavaScript -- or rather, Scheme -- the real power of the language would only show itself to those who are @@ -61,12 +61,12 @@ of languages. A seasoned developer could take control of the behavior of the garbage collector to fine-tune it for the allocation patterns of their application, or even write modules that entirely avoid GC, opting for less automatic memory management strategies such as pools -or totally manual alloc/free. They could have Zisp produce highly +or totally manual alloc/free. They could have Xisp produce highly optimized machine code (while remaining cross-platform) by providing all the static type declarations necessary to eliminate run-time overhead, and use a low-level record type system that allows defining the exact in-memory layout of data records so as to make the best use -of CPU cache lines and whatnot. A Zisp code-base could be as simple +of CPU cache lines and whatnot. A Xisp code-base could be as simple as a beginner-level Python code-base, or as complex as an advanced C code-base. @@ -74,7 +74,7 @@ In some sense, Emacs has a similar philosophy, but applied to making a text editor. At its core, it's a lisp machine, containing a bunch of primitives that are conductive to creating a text editor; and then the text editor is implemented on top of that and has a flexibility you -won't find in many other editors. Zisp would be something akin to a +won't find in many other editors. Xisp would be something akin to a set of tools useful to creating a programming language, and then kind of a "default" language constructed with those tools. It's like the language is telling you: "You can either give me a very simple high @@ -92,22 +92,22 @@ Could be a great source of inspiration though; I'll have to take a closer look one day. To finish off this note, I want to provide an example of how a little -Zisp snippet could look when written in the high-level "don't care" +Xisp snippet could look when written in the high-level "don't care" style, and then transformed into a lower-level style to take control of more details of its run-time behavior. This is an imaginary script that walks through a directory and creates HTML files from Markdown files. -Note that this is essentially pseudo-code. The Zisp parser that +Note that this is essentially pseudo-code. The Xisp parser that exists as of the time I'm writing this should be able to parse the snippets, but everything beyond that is fantasy and not necessarily -representative of what actual Zisp code will eventually read like. +representative of what actual Xisp code will eventually read like. ```scheme -(import (zisp base)) ;import Zisp base language & stdlib +(import (xisp base)) ;import Xisp base language & stdlib -(link (zisp regex)) ;dynamically link regex library +(link (xisp regex)) ;dynamically link regex library (link (de tkammer markdown)) ;dynamically link a Markdown library (define (md2html from to) @@ -154,17 +154,17 @@ libraries also provide sufficient type information at compile time, this program could be entirely statically type-checked, if I'm not mistaken.) -Some of the optimizations we will perform are not tied to any Zisp +Some of the optimizations we will perform are not tied to any Xisp specialty; any sane language would, for example, allow you to read `head.html` once and save the string for re-use. Nevertheless, the transformation of the program will provide some examples of what I -want Zisp to be capable of. +want Xisp to be capable of. Here's the transformed code: ```scheme -(import (zisp base)) ;import Zisp base language & stdlib -(import (zisp regex)) ;import regex library (compile-time) +(import (xisp base)) ;import Xisp base language & stdlib +(import (xisp regex)) ;import regex library (compile-time) (link (de tkammer markdown)) ;dynamically link a Markdown library @@ -234,8 +234,8 @@ All in all, I guess I've ended up demonstrating nothing more here than the possibility of adding some static types to a program written in a Scheme-like language to eliminate some dynamic type checks it would otherwise need to have. Big deal. I really hoped that this little -snippet would be conductive to demonstrating a bunch of other Zisp -features enabling "low-level programming" (imaginary Zisp features, +snippet would be conductive to demonstrating a bunch of other Xisp +features enabling "low-level programming" (imaginary Xisp features, that is) but I guess I should have come up with a better example. In fairness to me, it's easy to underestimate just how efficient a diff --git a/notes/260107-decoder.md b/notes/260107-decoder.md index 5fa3677..1595e45 100644 --- a/notes/260107-decoder.md +++ b/notes/260107-decoder.md @@ -5,7 +5,7 @@ _2026 January_ I've mulled over this quite a bit now, and I believe I've figured out what kind of design I want for the "decoder" component. -To recap: Zisp has a "parser" that implements an extremely bare-bones +To recap: Xisp has a "parser" that implements an extremely bare-bones s-expression format (though with some interesting syntax sugar baked in), with a lot of the features you would expect of a typical "reader" being offloaded into a second pass over the data. @@ -77,7 +77,7 @@ Macros in Scheme have a completely different "feel" to them. They're really part of the program logic. The whole point of hygienic macros is that they fit in seamlessly with the rest of your program, rather than being a disjoint pre-processor operating outside program logic. -That's valuable in a different way. (Zisp will also support hygienic +That's valuable in a different way. (Xisp will also support hygienic macros like Scheme.) Although the decoder is not as smart as a macro expander, I still @@ -109,7 +109,7 @@ intend to make it fairly powerful, supporting: These will be turned off by default, so a decoded file cannot run arbitrary code, or maliciously embed `/dev/random`! The standard -"Zisp code decoder" configuration used to read program and library +"Xisp code decoder" configuration used to read program and library files will then enable these features. Splicing could be used for the same effect as an import, but import @@ -118,14 +118,14 @@ decoder rules could also be compiled into a binary, which the import mechanism could locate and use, instead of parsing the source file again every time. -Here's some imaginary Zisp source files demonstrating decoder use: +Here's some imaginary Xisp source files demonstrating decoder use: ```scheme -;; a.zisp +;; a.xisp -(#IMPORT "ht.zisp") ;may load compiled code of ht.zisp from a cache +(#IMPORT "ht.xisp") ;may load compiled code of ht.xisp from a cache -(define my-hash-table #ht((a 1) (b 2))) ;#ht imported from ht.zisp +(define my-hash-table #ht((a 1) (b 2))) ;#ht imported from ht.xisp (#DEFINE (#foo x y) (import (de tkammer my-helper-module)) @@ -141,15 +141,15 @@ Here's some imaginary Zisp source files demonstrating decoder use: (#DEFINE #bar '(+ 1 2)) -(import (zisp io)) ;imports the print function +(import (xisp io)) ;imports the print function (print #bar) ;will print 3 -(#SPLICE "b.zisp") +(#SPLICE "b.xisp") ``` ```scheme -;; ht.zisp +;; ht.xisp (#DEFINE (#ht & entries) (define ht (make-hash-table)) @@ -159,7 +159,7 @@ Here's some imaginary Zisp source files demonstrating decoder use: ``` ```scheme -;; b.zisp +;; b.xisp (define (foobar) (let ((data (#STRING "example.data"))) @@ -174,7 +174,7 @@ only example above that actually makes some sense is the one defining hash table syntax. Actually, since I want to make it possible to serialize absolutely -anything in Zisp, a regular macro could also be used to construct +anything in Xisp, a regular macro could also be used to construct hash-table literals. See the [serialization](250210-serialize.html) note on that. @@ -197,7 +197,7 @@ want to output code, with hygienic bindings. ```scheme ;; Can't do this with decoder rules -(import (zisp base)) +(import (xisp base)) (import (de tkammer my-module)) (define-syntax (my-macro x y <body>) diff --git a/notes/260109-uninterned.md b/notes/260109-uninterned.md index 5d914b1..ec6dff8 100644 --- a/notes/260109-uninterned.md +++ b/notes/260109-uninterned.md @@ -6,7 +6,7 @@ Although it's become fairly normal these days to define grammars in terms of Unicode, there's a certain simplicity to just defining them in terms of bytes instead. -The Zisp s-expression grammar is defined in terms of bytes. Regular, +The Xisp s-expression grammar is defined in terms of bytes. Regular, unquoted strings, like identifiers, are defined as only accepting characters in the ASCII range. But within quoted strings, and line comments, *any* byte can appear so long as it doesn't terminate the @@ -39,7 +39,7 @@ But I think this is not only an acceptable price to pay for the ease of implementation (and just plain conceptual simplicity) but even arguably a benefit: -*It means you can use Zisp s-expressions to transmit binary data.* +*It means you can use Xisp s-expressions to transmit binary data.* Consider two simple programs that talk over the network, and want to exchange binary data in a structured fashion. @@ -66,7 +66,7 @@ be it built in or third-party.) It may not matter in many cases, but the base64 transform will add some processing overhead and bloat the size by 33%. Compare that to -Zisp s-expressions with binary data in strings: +Xisp s-expressions with binary data in strings: ```scheme ((key1 "<value 1 with backslash escapes>") @@ -99,7 +99,7 @@ Even if base64 were to have higher CPU throughput, however, it still has the higher data size issue (in most cases) and besides, a JSON parser would need to scan the entire string looking for backslash escapes anyway, even though base64 can't contain any, so the total -overhead of the Zisp parser would probably easily beat the combined +overhead of the Xisp parser would probably easily beat the combined JSON parsing and base64 decoding. On top of that, with base64 you typically want to compress before the @@ -110,7 +110,7 @@ gzip or brotli compression as part of that. I'm not saying this is some kind of killer feature, obviously. But I find it neat how the simplistic and "un-opinionated" nature of the -Zisp s-expression format (not coercing you into UTF-8) allows for +Xisp s-expression format (not coercing you into UTF-8) allows for little hacks like this. ```scheme @@ -144,7 +144,7 @@ much of an issue there: Just document the fact that this decoder rule results in an uninterned string, rather than an interned one. But back to the binary data example. Or to be more specific, the -general issue of massive strings appearing in Zisp data, whatever +general issue of massive strings appearing in Xisp data, whatever their content. There should be a way to avoid interning them. I think I might settle for a very simple rule: The parser has a hard @@ -159,17 +159,17 @@ would need to span an entire line to be rejected. What do I mean with rejected? The parser won't care (it will return uninterned strings silently) and the decoder probably won't see a difference either. But once the data begins actually being seen as -Zisp code, and an uninterned string appears in the position of an +Xisp code, and an uninterned string appears in the position of an identifier, it will raise an error. Generally, strings carry with them the information of whether they are interned or not, so that's not an issue. -In practice, this will mean that trying to run or compile Zisp code +In practice, this will mean that trying to run or compile Xisp code containing an identifier of length 80 or greater will cleanly display an error message saying you can't do that. No cryptic error message or silent failure or such. -If you're instead using Zisp s-expressions for data serialization and +If you're instead using Xisp s-expressions for data serialization and deserialization, then you need to be cognizant of the fact that long strings with equal content won't be pointer-equal, but that is not a common expectation of a deserialization procedure. For example, I'm @@ -177,7 +177,7 @@ not sure if JSON parsers typically offer such an option, but I think they probably don't, in the general case. The automatic interning of short to medium length strings actually -makes Zisp parsing inherently a bit slower. Perhaps the parser could +makes Xisp parsing inherently a bit slower. Perhaps the parser could offer an option to forego interning entirely, but I'm getting ahead of myself here. For now, let's just ensure that parsing data with tons of large strings doesn't lead to tons of redundant hashing. diff --git a/notes/260522-interpreter.md b/notes/260522-interpreter.md index cf87180..6beac10 100644 --- a/notes/260522-interpreter.md +++ b/notes/260522-interpreter.md @@ -3,16 +3,16 @@ _2026 May_ Last December, I wrote the following in the context of how one might -[bootstrap](250329-boot.html) Zisp even if it uses a self-hosting +[bootstrap](250329-boot.html) Xisp even if it uses a self-hosting compiler: -* There will be a Zisp interpreter written in Zig, which is fairly +* There will be a Xisp interpreter written in Zig, which is fairly simple and naive in its implementation and, for example, ignores - static type declarations. It should support the full Zisp language + static type declarations. It should support the full Xisp language including hygienic macros, but be as easy as possible to maintain. -* The Zisp compiler will be written in Zisp. The interpreter can run - the compiler (since it can run any Zisp program) and will be used to +* The Xisp compiler will be written in Xisp. The interpreter can run + the compiler (since it can run any Xisp program) and will be used to compile the compiler. After some pondering on a variety of topics, I've decided to stick @@ -20,7 +20,7 @@ with this, just with one significant added insight: The interpreter will not be some bootstrapping hack and then put in the dustbin until someone needs to bootstrap from scratch again. -Rather, the interpreter will be a first-class citizen of the Zisp +Rather, the interpreter will be a first-class citizen of the Xisp implementation. This is because a simple interpreter without any compilation overhead @@ -34,23 +34,23 @@ one might otherwise write in GNU Bash or the like (which is also quite slow) except GNU Bash doesn't even have proper data structures, so it becomes a terrible choice very quickly. The next consideration after Bash would typically be a language like Python, and although even the -CPython interpreter might beat the naive Zisp interpreter (because the +CPython interpreter might beat the naive Xisp interpreter (because the former at least uses bytecode and had a ton of engineering poured into it) this shouldn't really matter, since the kind of tiny application we're talking about typically wouldn't involve heavy computation. -(Besides, a Zisp script could choose to compile parts of itself; more +(Besides, a Xisp script could choose to compile parts of itself; more on this later.) Another example are build scripts. One of the first ideas I had when -pondering on Zisp's design is how [compilation](250210-compile.html) +pondering on Xisp's design is how [compilation](250210-compile.html) should automatically evaluate the top-level of a program, simply because this feels most natural to me. Furthermore, I've pondered about how it should be possible to [serialize](250210-serialize.html) everything in the language, so compiling a program would be a matter of calling something like `(write main)` after the main function is defined. Both of these fit naturally with the idea that a build -script for a Zisp program would essentially just be a Zisp script +script for a Xisp program would essentially just be a Xisp script which imports all the files in the codebase, compiles everything, and writes out the result. Such a build script would be interpreted, with the compiler being a shared library it loads. @@ -119,11 +119,11 @@ like Varnish, it ends up being somewhat limited. Varnish does make that jump and implements a whole DSL for per-request decisions, which is transpiled to C, compiled into a dynamic lib and loaded. -Imagine Nginx was written in Zisp, and distributed in source format. +Imagine Nginx was written in Xisp, and distributed in source format. You could have arbitrary code in your configuration, for per-request decisions, which would be compiled into native code and potentially inlined straight into Nginx's request handler. Imagine Varnish was -written in Zisp. It wouldn't need to invent a whole new language! +written in Xisp. It wouldn't need to invent a whole new language! (I just realized Varnish has been renamed to Vinyl Cache, but I suspect most people still know it as Varnish, like me just now.) @@ -169,9 +169,9 @@ Another reason, probably, is that many high-level languages are very dynamic and lack a serious static type system that would be needed to generate peak performance AOT compiled code. -Zisp is all about breaking norms, and giving the programmer maximum +Xisp is all about breaking norms, and giving the programmer maximum freedom. The interpreter might one day incorporate some lightweight -JIT, but my aim is to ensure that a Zisp programmer always has the +JIT, but my aim is to ensure that a Xisp programmer always has the ability to generate peak-performance native compiled binaries, through a combination of features such as: An optional but serious static type system, the ability to completely take control over memory management @@ -189,27 +189,27 @@ day now. Just to recap, here's the plan so far: 1. A code base in a low level language (probably Zig but not married - to it) implements the Zisp core, meaning interpreter, basic data + to it) implements the Xisp core, meaning interpreter, basic data types, and a slim standard library. Comparable to R7RS-small in complexity, give or take. The interpreter accepts but ignores advanced code constructs intended to help the compiler, such as declarations and directives related to static typing and explicit object lifetime management. (Simple bindings to libgccjit are exposed; libgccjit.so is an optional run-time dependency.) This - yields libzisp.so and the zisp executable, which are like liblua + yields libxisp.so and the xisp executable, which are like liblua and the lua executable. You *can* use just this if you need a - minimal Zisp interpreter with a barebones stdlib; OS package - repositories could deploy these in a "zisp-core" package. + minimal Xisp interpreter with a barebones stdlib; OS package + repositories could deploy these in a "xisp-core" package. -2. Richer standard library routines are written in Zisp, but the +2. Richer standard library routines are written in Xisp, but the sources are meant to stay in the source code repo; wait for it. 3. An advanced compiler, which actually understands the constructs - mentioned in point 1, is written in Zisp. The compiler infers + mentioned in point 1, is written in Xisp. The compiler infers static types where possible, and applies strategies to decrease GC pressure, such as escape analysis, even if compiled code offers no helpful declarations at all. But with full static typing and - manual memory management, Zisp can practically be used as if it's + manual memory management, Xisp can practically be used as if it's yet another low-level language front-end for GCC; it's up to the programmer how much effort they want to put into improving the performance of their code. The compiler implementation may use @@ -217,10 +217,10 @@ Just to recap, here's the plan so far: yet compiled, mind you. 4. The interpreter runs the compiler to compile the compiler; this - yields libzispcomp.so which Zisp can load dynamically so when - deploying Zisp you don't need to compile the compiler on every - end-user machine. (Zisp can load any .so dynamically really.) - Standard library routines written in Zisp are imported directly + yields libxispcomp.so which Xisp can load dynamically so when + deploying Xisp you don't need to compile the compiler on every + end-user machine. (Xisp can load any .so dynamically really.) + Standard library routines written in Xisp are imported directly from within the source code repo at this point, and are merely interpreted, since the compiler itself wasn't ready yet. (Actually, you could run the compiler with the interpreter to @@ -228,20 +228,20 @@ Just to recap, here's the plan so far: compiling the compiler. But this would probably be slower.) 5. The richer standard library routines are finally compiled, giving - us libzisputil.so, which contains goodies that interpreted Zisp - code can also load and use, so Zisp scripts aren't limited to the + us libxisputil.so, which contains goodies that interpreted Xisp + code can also load and use, so Xisp scripts aren't limited to the barebones stdlib anymore. -In OS package repositories, you'd have zisp-core which only contains -libzisp.so and the zisp executable, and then you'd have the standard -zisp package which also pulls in libzispcomp and libzisputil as two +In OS package repositories, you'd have xisp-core which only contains +libxisp.so and the xisp executable, and then you'd have the standard +xisp package which also pulls in libxispcomp and libxisputil as two additional packages. -Actually, libzispcomp itself would probably depend on libzisputil +Actually, libxispcomp itself would probably depend on libxisputil anyway, but if you're an absolute nerd you *could* manually install -only zisp-core and libzisputil, giving you an interpreter and rich +only xisp-core and libxisputil, giving you an interpreter and rich standard library, without a compiler. This would allow you to omit -libgccjit as well, which could be useful if you want to use the Zisp +libgccjit as well, which could be useful if you want to use the Xisp interpreter for simple scripts on some minimal systems. ## Closing up @@ -250,12 +250,12 @@ Funny, I had totally forgotten about this note: - [Using libgccjit?](250920-libgccjit.html) -Yes, I will most definitely be using libgccjit. If Zisp is to be a +Yes, I will most definitely be using libgccjit. If Xisp is to be a true [full-stack language](260102-full-stack.html) then it must be able to produce code rivaling C in efficiency, and that requires either GCC or LLVM. Some of the other considerations in the above linked note, like the -"ZispScript" idea, are obsolete. Unless I've totally goofed up and +"XispScript" idea, are obsolete. Unless I've totally goofed up and planned some illogical nonsense above, I'll be going with what I've written here, not in the previous note. diff --git a/notes/260524-gc-opt.md b/notes/260524-gc-opt.md index 6687520..858d705 100644 --- a/notes/260524-gc-opt.md +++ b/notes/260524-gc-opt.md @@ -3,7 +3,7 @@ I'm trying to flesh out a vague idea that keeps coming to mind. The basic motivation is to eliminate some or all of GC related overhead that's incurred even on regions of code that meticulously ensure not -to use any GC allocation. Part of Zisp's design will try to offer +to use any GC allocation. Part of Xisp's design will try to offer various memory management strategies to the programmer, defaulting to GC only when code is written in a "don't care" style. This brings us to the issue of "what if other parts of the code base, like a library @@ -25,7 +25,7 @@ use GC allocations: 2. The need to actually stop a thread and scan it, when it was busy doing some super high intensity hot loop stuff. -(This doesn't just apply to a design idea like that of Zisp where you +(This doesn't just apply to a design idea like that of Xisp where you can take control over memory management; it also applies to codebases where some functions do allocation-free but computationally heavy work, and thus would ideally be free of GC overhead.) diff --git a/notes/260608-fastcons2.md b/notes/260608-fastcons2.md index 541ee87..4a503e6 100644 --- a/notes/260608-fastcons2.md +++ b/notes/260608-fastcons2.md @@ -59,7 +59,7 @@ significantly reducing the burden of pointer chasing. ## 16-byte aligned heap -Furthermore, I've realized earlier today that Zisp heap objects could +Furthermore, I've realized earlier today that Xisp heap objects could be aligned to 16 bytes, since most things that can fit within 8 could as well be packed into a NaN, with few exceptions. One exception is interned strings of exactly length 7, which fit into exactly 8 bytes @@ -98,7 +98,7 @@ we're left with don't have enough information to walk back to the start of the array; they only tell how much longer it goes. A solution is putting a sentinel value at the head. This needs to be -an otherwise invalid bit pattern that cannot be any valid Zisp value, +an otherwise invalid bit pattern that cannot be any valid Xisp value, not even the all-zero 64-bit value, because that's just the IEEE 754 positive zero which could appear in a list. Fortunately, there's a great many unused bit patterns in our NaN packing strategy, so it's diff --git a/notes/260611-fastcons4.md b/notes/260611-fastcons4.md index 7c7ccd5..7144ec7 100644 --- a/notes/260611-fastcons4.md +++ b/notes/260611-fastcons4.md @@ -75,7 +75,7 @@ about it. Common Lisp and Emacs Lisp don't use improper lists in any part of their actual syntax, if I remember correctly. They use some special identifier to mark rest args, and I could do a similar thing. -Damn it: I spent so much time refining the documentation of the Zisp +Damn it: I spent so much time refining the documentation of the Xisp parser, and now I'll have to make massive revisions again. Serves me well for obsessing on one component without yet having a clear bigger picture in mind. diff --git a/notes/260625-optimize.md b/notes/260625-optimize.md index cdb9644..5895dda 100644 --- a/notes/260625-optimize.md +++ b/notes/260625-optimize.md @@ -32,10 +32,10 @@ simpler.) To further ensure minimal memory footprint of AST nodes, we make sure that they're allocated tightly in blocks, without any padding between -them. See `src/zisp/gc/ListPool.zig` for how I've implemented this. +them. See `src/xisp/gc/ListPool.zig` for how I've implemented this. Cache locality and memory density should now be perfect: -[ListPool.zig](https://git.tkammer.de/zisp/tree/src/zisp/gc/ListPool.zig) +[ListPool.zig](https://git.tkammer.de/xisp/tree/src/xisp/gc/ListPool.zig) (I like to refactor code and move around source files a lot, so if this link becomes a 404 and I forget to update, I'm sorry.) @@ -72,7 +72,7 @@ I've decided to dedicate some of them to "implicitly" quoted values. A two-value array is a two-value array. There will be fewer of them this way, and you'll be saving two 64-bit values per quoted object. -This isn't actually that bad considering Zisp conflates strings and +This isn't actually that bad considering Xisp conflates strings and symbols. Code with lots of string literals would otherwise end up with lots of quote forms (automatically emitted by the parser upon encountering a double-quoted string) if not for this optimization. @@ -109,7 +109,7 @@ the following works as well... ;; after (define (bar) 6) -Note: `(let (foo) ...)` is a local function definition in Zisp. Not +Note: `(let (foo) ...)` is a local function definition in Xisp. Not married to this syntax, but I think I like it. Actually, we may decide *not* to do this optimization for exported @@ -143,7 +143,7 @@ module, thus making the constants eligible for folding anyway! Now we're getting to the hot stuff. -Zisp won't allow capturing mutable variables by reference in closures; +Xisp won't allow capturing mutable variables by reference in closures; you'll need to copy the variable's current value into a non-mutable variable if you want to capture it. (There's precedent for this in other languages, like Java; nothing new invented here.) @@ -254,7 +254,7 @@ captures, changing our closure shape on the heap to: The `locals` array could be a thread local or implicit argument like the `lexicals` array, or it could actually just be based on the stack -pointer. (Referring to the Zisp stack, not the native stack.) +pointer. (Referring to the Xisp stack, not the native stack.) Oh, and function parameters are of course just the first few entries in this (conceptual) locals array (which may just be a stack pointer) @@ -360,7 +360,7 @@ Transforming to bytecode first may even act as obfuscation and end up worsening the work of GCC/LLVM on the code. Don't quote me on that, though. -In Zisp, I want to support what I've dubbed "manual JIT" meaning the +In Xisp, I want to support what I've dubbed "manual JIT" meaning the programmer is in control over what should be native-compiled and when. A performance-critical application could be shipped as source code, diff --git a/notes/260626-fastcons5.md b/notes/260626-fastcons5.md index b76f4ec..6d66fc1 100644 --- a/notes/260626-fastcons5.md +++ b/notes/260626-fastcons5.md @@ -84,7 +84,7 @@ design where list pointers are partitioned as 16/16/32, and regular heap pointers as 16/4/12/32, with a static 16-byte alignment allowing up to 64 GiB of regular (non-list) heap objects for now. -And if one day someone writes a program in Zisp (lol) that needs more +And if one day someone writes a program in Xisp (lol) that needs more heap data then that, we'll see. In most cases, having hundreds of GiB of data probably means you just have some enormous mapped files or so, for which you could just use handle objects and index values, so the diff --git a/notes/260727-alloc.md b/notes/260727-alloc.md index 98a4968..dfdb899 100644 --- a/notes/260727-alloc.md +++ b/notes/260727-alloc.md @@ -223,7 +223,7 @@ in use by another thread. A small amount of false sharing on Apple Silicon isn't too bad, but there's ways to mitigate it if we ever find it to be an issue. (This -would be ridiculously far in the future of Zisp.) +would be ridiculously far in the future of Xisp.) One could make the chunk size N dependent on the size class, so that small size classes reserve chunks of 128 or so, while huge classes diff --git a/notes/260817-release.md b/notes/260817-release.md index 433db1c..3c73882 100644 --- a/notes/260817-release.md +++ b/notes/260817-release.md @@ -5,12 +5,12 @@ _2026 August_ Allocators often face the issue of not being able to release virtual memory back to the operating system. -Here I describe a strategy through which Zisp's "Meta Allocator" as +Here I describe a strategy through which Xisp's "Meta Allocator" as I've decided to name it can solve this. The strategy may be applicable to more general-purpose allocators as well; I've not thought much about it and don't currently care. I'll -simply describe this strategy in terms of how it applies to the Zisp +simply describe this strategy in terms of how it applies to the Xisp Meta Allocator. ## Recap of the relevant parts of Meta Alloc diff --git a/notes/260821-overcommit.md b/notes/260821-overcommit.md index 69c566a..3d7143d 100644 --- a/notes/260821-overcommit.md +++ b/notes/260821-overcommit.md @@ -36,7 +36,7 @@ which kernels allow overcommit is as follows: * OpenBSD, MS Windows: Not allowed. -So, for Zisp to cover even just all POSIX systems, it will need some +So, for Xisp to cover even just all POSIX systems, it will need some way to reserve without committing. ## How to reserve without commit diff --git a/notes/260826-use-alloc.md b/notes/260826-use-alloc.md index f854556..17a79ab 100644 --- a/notes/260826-use-alloc.md +++ b/notes/260826-use-alloc.md @@ -6,9 +6,9 @@ _2026 August_ The design and implementation of Meta Alloc is mostly complete. -* [Documentation](/zisp/doc/0/A-meta_alloc.html) +* [Documentation](/xisp/doc/0/A-meta_alloc.html) -* [Implementation](https://git.tkammer.de/zisp/tree/src/zisp/gc/meta_alloc.zig) +* [Implementation](https://git.tkammer.de/xisp/tree/src/xisp/gc/meta_alloc.zig) Some tweaks needed to make it work across operating systems, but the basic principles, data structures, and algorithms, are all sound and diff --git a/notes/260923-green-tea.md b/notes/260923-green-tea.md index b8d3646..32fc799 100644 --- a/notes/260923-green-tea.md +++ b/notes/260923-green-tea.md @@ -11,19 +11,19 @@ GC design I have in mind, but realized it won't work for two reasons: so it can mark individual memory slots that may contain pointers. My bitmaps are more specialized, and only mark the position of an object of a certain size class within a Meta Alloc slab; this cuts - down bitmap memory use substantially. Besides, Zisp object fields + down bitmap memory use substantially. Besides, Xisp object fields may contain NaN-packed pointers as well as raw pointers, or other representations of an object address, so I really need "layout" information when scanning a heap object's memory. -2. Zisp heap objects don't have a fully generic object header telling +2. Xisp heap objects don't have a fully generic object header telling you what type it is / what the memory layout of the object on the heap is. Some types have a specific header format, like an array header encoding its length among other things, but the NaN-packed pointer to an object may already contain all its metadata, such that there's no metadata whatsoever on the heap. -So, unlike in Green Tea, the mark phase of the Zisp GC cannot simply +So, unlike in Green Tea, the mark phase of the Xisp GC cannot simply push memory spans onto the work stack. It has to push work objects that consist of the object's address and type. @@ -86,7 +86,7 @@ use all possible 8-bit values for the regular heap type tag; we can reserve two for the special types that use another 8 bits for their length, and another one to mean "invalid.") -If Zisp supports fully static typing one day, such that every single +If Xisp supports fully static typing one day, such that every single user-defined heap type needs a static type ID that the GC knows of, then we could use 32 or 64 bits instead, doubling or quadrupling the Work Table size in terms of memory use (but not entry count). @@ -226,7 +226,7 @@ However, it seems extremely unlikely that this would actually happen, given that the work-set of a tracing GC typically contains a small fraction of the live object graph at any given moment. -Still, imagine a humongous array of heterogeneous Zisp values, say a +Still, imagine a humongous array of heterogeneous Xisp values, say a billion, and every single one happens to point to an 8-byte object. That's about half of all 8-byte objects that can be allocated (the limit is exactly 2 Gi since a slab is 16 GiB) so when the GC traces @@ -235,11 +235,11 @@ this array it would really use a substantial portion of a slab. Honestly, the short answer to this problem is: Don't do that, then. Just to put things in perspective: A billion 64-bit values (which is -what a heterogeneous Zisp array is) consumes 8 GiB of RAM. If you're +what a heterogeneous Xisp array is) consumes 8 GiB of RAM. If you're wondering where in Meta Alloc that would even fit: Nowhere, since the Block Alloc / GC Alloc strategy will be to allocate any object beyond 256 KiB outside the Meta Alloc heap, and represent it with a handle. -So it *could* exist in Zisp, but if you're using 8 GiB just for that +So it *could* exist in Xisp, but if you're using 8 GiB just for that array, and another 8 GiB for the billion 8-byte objects it will hold, then hopefully your heap contains almost nothing else, and the GC can use a large portion of the 256 KiB or 512 KiB slab? diff --git a/notes/260929-color-bits.md b/notes/260929-color-bits.md index cd8b898..51062ca 100644 --- a/notes/260929-color-bits.md +++ b/notes/260929-color-bits.md @@ -289,4 +289,4 @@ If we add static typing, it's more annoying, since we need to strip off bits on every dereference. However, AArch64 has Top Byte Ignore. Intel and AMD are lagging far behind, but seem to have started adding similar features, like Intel LAM48/LAM57 and AMD UAI. Hopefully, by -the time Zisp is implemented, these will be universally available! +the time Xisp is implemented, these will be universally available! |
