8 ms·
What's buried under the lede: this harness is using Cordis v4 (the paper that dropped today). Cordis has already been used for four years in a different project
by ef2k 1mo ago
What's buried under the lede: this harness is using Cordis v4 (the paper that dropped today). Cordis has already been used for four years in a different project called Koishi that uses v3. Cordis itself is a way of hot loading and unloading plugins without restarting a running process. The cool part is that when it unloads it can revert any state and side effects it created, cleaning up its connections, memory allocations, registered handlers, etc. and it can also deactivate any dependencies it relied on without disturbing other plugins.
- shostack 1mo agoCould memories and blocks of context be made pluggable and unpluggable in this manner to "hot swap" context?
- roywiggins 1mo agoNot without nuking your cache, I figure.
- ziofill 1mo agoSounds very cool! What do you mean by “revert side effects it created”?
- ef2k 1mo agoAnythign that needs to be cleaned up or undone goes in ctx.effect. It returns the "inverse" (the cleanup function) when the plugin loads. Cordis then stores it and runs it when the plugin unloads. Take a look at 5.1.1 in the paper.
- deleted 1mo ago[deleted]
- JHonaker 1mo agoAs far as I can find, Cordis didn't exist before they shared it with this harness. It is very likely that its because I didn't search in Chinese (as I don't know it). Can you explain the evolution of it from the different versions?