Lamp is just a hobby language I’m playing with. I got Cloak of Darkness running (reasonably complete I think), and I wanted to share it with y’all.
ETA: Here’s the source.
Lamp is just a hobby language I’m playing with. I got Cloak of Darkness running (reasonably complete I think), and I wanted to share it with y’all.
ETA: Here’s the source.
The initial commit is around (I guess) 1000 lines over a dozen or two files, was that code developed before creating the repository?
I am not an AI hater (though I prefer not to use it myself), however I think that when AI has been used in a significant amount to create something, that usage should be disclosed.
Writing 1000 lines before creating a repo doesn’t strike me as particularly odd, especially for something that started as an experiment. In any case, @rileypb was very transparent about using AI coding assistance to make fweep, so I don’t see any reason to expect him to be less transparent here.
@rileypb , can you tell us anything about the language? From skimming the samples it looks like a rules-based engine like I7 or Dialog, with a syntax that’s somewhat reminiscent of Gruescript?
Ahh I see. Sorry if I went off-topic.
No, you’re right. I neglected to say I used Claude to develop this project.
The goal is indeed to imitate Inform 7 as much as possible (rulebooks and relations for instance) but with a programmer-ish syntax. To which you might rightly say “well, why not I6 or Dialog?” I don’t really like the syntax of I6 and I find Dialog impenetrable. I also wanted to experiment with getting away from the Z-machine/Glulx – Lantern (the compiler) emits JavaScript which can be bundled into a web page or (on the roadmap) an Electron app by Lighthouse (the bundler).
The syntax is heavily Pythonic, but with type checking. My favorite bit of syntax is relation queries: connects foyer _ ?all selects all rooms that connect to the foyer in any direction.
Full disclosure: I’m not really all that knowledgeable about language design, so I’m letting this take me where it wants to go, which is why I’m describing it as a “hobby project” and not really something I’m pushing as an alternative to I7. But it would be nice to ship a game for IFComp 2027 using Lamp (the project name).
Me too. I really wish someone would make an “explain like I’m 5” tutorial for it.
I’ll probably stick to
either (a) Tads3
or (b) writing an IF from scratch
but Lamp’s syntax looks simple and powerful. Nicely done.
I’ll add it to the roadmap! That seems like something the documentation should include.
Back on-topic: I see a lot of parser-IF-specific features in the Cloak of Darkness source, like specifying a start room. How much of this comes from the standard library and how much is hard-wired into the compiler?
There are four layers actually – the compiler (Lantern), the JS runtime library (Lamplighter), and two libs written in Lamp itself: lib/sys, which exists mostly to declare native (JS) functions available to any Lamp program, and lib/advent, which is analogous to I7’s Standard Rules.
That said, there are currently a number of leaks between them that I’d really like to iron out. It’s difficult to keep IF from leaking into the compiler without allowing the compiler to be extended by libs, which I imagine could be done, but I haven’t explored the possibility. For instance, action (properly an IF concept) has leaked into the compiler for syntactical reasons – it’s a reserved keyword. Now I’m wondering if that’s necessary… let me think about it for a while.
So the answer is, most of it comes from lib/advent with some smelly bits that have sneaked over and keep me awake at night.
A couple data points on this:
So all three routes are viable. It’s up to you which route you want to take.