HackerTrans
TopNewTrendsCommentsPastAskShowJobs

roriau

5 karmajoined 7 mesi fa
An experimental programming language exploring context-oriented execution, written in Rust. A personal learning project focused on unusual design ideas and clear semantics.

Submissions

Show HN: Agent Bus – IRC-style message bus for AI agents (MCP)

github.com
1 points·by roriau·7 giorni fa·0 comments

Show HN: SFX – A language where 0.1 and 0.2 = 0.3 and Context is first-class

github.com
11 points·by roriau·7 mesi fa·7 comments

comments

roriau
·7 giorni fa·discuss
[flagged]
roriau
·7 mesi fa·discuss
You're correct if Context is hidden or implicit (like Dependency Injection containers or ThreadLocals in Java), it becomes debugging nightmare.

To solve this, SFX treats the Context Stack as Explicit Data, not hidden magic.

1. Debugging: Because the runtime knows exactly what 'Reality' is active, we can print it. We are building a `Context.Trace()` tool that outputs something like: `[Base Reality] -> [HolidaySale] -> [AdminMode]` This tells you exactly why a method is behaving the way it is.

2. Layering: Yes, contexts are strictly layered (LIFO stack). If you activate `Situation A` then `Situation B`, the runtime checks `B` first, then `A`, then the Object itself. This allows for 'Behavioral Inheritance'—you can compose behaviors (e.g., `LoggingMode` + `SafeMode`) dynamically.

3. Scoping: Right now it is imperative (`Switch on/off`), but because SFX is indentation-based, we are working on block-scoped contexts for the next release:

    Using AdminMode:
       User.Delete()  # Admin context
    # Automatically reverts here
    
Thanks for the encouragement.
roriau
·7 mesi fa·discuss
Thanks — really appreciate you taking a look and sharing links.

Advent of Code is a great idea. I’ll try a few puzzles with SFX to exercise the stdlib and find awkward edges in the language and runtime.

Good call on the tooling approach. Emitting JSON for top-level names/types and scraping compiler errors sounds like a pragmatic first step before doing a full LSP. I’ll probably add that to the build output so editors can consume it easily.

I hadn’t thought to compare Situations to dynamic scoping/thread-locals that way — that’s a useful lens. My goal is to keep the behavior explicit enough that it doesn’t become mysterious, but your point about clarity is well taken; I’ll document the trade-offs more clearly.

1-based indexing has been a little surprising for folks (Lua vibes), and it does make some low-level tasks awkward. I’m keeping it because it simplifies some semantics, but I’ll watch for real usability problems and document where it trips people up.

About numbers — yes, FastNumber is available when you need IEEE performance. I want predictable defaults but not to lock users into one numeric model.

Thanks again for the pointers and the Discord link — I’ll check it out.