TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Spritely Goblins v0.13.0: Object persistence and easier IO

62 点作者 paroneayea大约 1 年前

7 条评论

kgeist大约 1 年前
Reminded me of a game engine of mine. Years ago I was experimenting with a time travel game concept. It had a virtual machine with green threads whose state could be suspended and serialized into a single binary blob at any time. I basically repurposed the GC's reachability analysis to find all objects reachable from the roots (VM's stack and global variables). IIRC it had also some sort of topological sort when serializing so that most references could be restored in one pass. It also serialized the stack itself and the current instruction pointer. "Manual persistence" they mention is actually quite straightforward to do if you're in full control of the VM. Additionally, it also serialized the physics engine's state as well, so that the forces applied were fully restored (important in a game). The concept was about being able to return to any point in time and have N versions of yourself working together to solve a problem. NPCs and objects had running scripts attached and that's why I needed the whole thing. It also allowed to have proper game saves out of the box. Oh, those were the fun times, and now I'm writing boring enterprise stuff :)
评论 #40137992 未加载
dang大约 1 年前
Surprisingly little discussion in the past! But I found these two:<p><i>Spritely Goblins v0.11.0, time travel distributed debugger and more</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35864365">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35864365</a> - May 2023 (1 comment)<p><i>Growing a Networked Garden with Spritely Goblins</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34031136">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34031136</a> - Dec 2022 (2 comments)<p>Maybe we should convert this thread to a discussion of the project as a whole, rather than of a point release?
评论 #40137944 未加载
waldrews大约 1 年前
Why don&#x27;t we see more general purpose computing environments where the whole interpreter state is persistent and serializable by default? The only ones I&#x27;m aware of is R&#x27;s .RData mechanism, some Smalltalk environments, and solutions at the container&#x2F;VM level.<p>What if an interpreter wrote every event down to a variable change to a database-like WAL, making it resumable after a crash? Downside: it would be slow, and there would need to be provision for transaction boundaries and for access to network sockets and other non-serializable resources. Upside: develop incrementally in the Smalltalk REPL style, never worry about the data layer at all, backup or give developers a copy of the whole application state - for utilities or LOB apps of limited scope or complexity, why not?
评论 #40141659 未加载
评论 #40155155 未加载
评论 #40140949 未加载
ryukafalz大约 1 年前
This is great! I&#x27;ve been following the Spritely project on the sidelines for a while now and have built a couple toy applications with Goblins; persistence and IO were often my biggest pain points. Looking forward to giving this a try soon!
cxr大约 1 年前
This blog post commits the common sin of showing a screencapture of a terminal emulator session that moves at the speed of thought of the creator rather than presenting things in a reasonable way for the person actually consuming it (i.e. the one in the audience who&#x27;s trying to work out, without the creator&#x27;s a priori understanding of what they&#x27;re doing, the relative significance&#x2F;insignificance of whatever&#x27;s flashing on the screen).<p>This happens constantly with software demos. It shouldn&#x27;t. It&#x27;s such a silly thing to mess up and takes more effort than just not including a screencapture whatsoever.
评论 #40138130 未加载
traverseda大约 1 年前
I know that guile&#x2F;scheme is uniquely well suited to this, but I&#x27;d be interested in hearing why you&#x27;re using it instead of, say, writing a python library? Is it like a smalltalk thing with really good message-passing, are you getting some guarantees about serializability that are impossible in a more mainstream language? Do you just like it?
评论 #40148578 未加载
cooljoseph大约 1 年前
How fast is Goblins? I&#x27;ve been considering using it for a project, but I&#x27;m worried that it would be too slow. Would it, e.g., be fast enough to serve as a database?
评论 #40141669 未加载