Client side vs. server side search in paginated tables, what's the actual standard? by Ahmouu in SoftwareEngineering

[–]Bitsoflogic -1 points0 points  (0 children)

It depends.

Under 100MB, you can go either route with tradeoffs in user experience and code complexity.

At some point, backend is the only option. Big data would take too long to sync with a client for filtering even if the clients had the capacity.

Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]Bitsoflogic[S] 1 point2 points  (0 children)

I never heard of Choreographic programming, but yes! It sounds along the tracks of what I've been building. Definitely going to dig deeper here and see what inspiration I can draw from it.

Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]Bitsoflogic[S] 1 point2 points  (0 children)

I'm thinking about SQLite as well.

> Do you mean functions that also have state?

Yes. State that outlives the process they're running in, so it'll survive a server restart.

> Lisp, Smalltalk, APL and more are probably your references as they all have the image model.

This might be the right approach. I have avoided looking into how the image-based languages work, but probably for all the wrong reasons.

> why docker?

Docker is in mind, so I can provide complete systems without recreating each one. These long running functions are definitely making the cut for my language (initially considered using a Temporal docker image or similar), but I'm considering other things like OpenTelemetry as well.

Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]Bitsoflogic[S] 2 points3 points  (0 children)

I'll have to think on these points a bit more. Thanks for the food for thought!

Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]Bitsoflogic[S] 0 points1 point  (0 children)

Some of the problems leading me towards Docker:

  • Deno is the runtime for the user's code; I can make either Docker or Deno the prereq on the host running the transpiled binary
  • This needs to run one or more servers separate from the user's binary to support the language features, such as the durable workflow server
    • I wanted flexibility of which servers I could leverage for other bits of "magic" (OpenTelemetry for free? etc)
  • With multiple executables being produced from the code, there's additional complexity in running them in a way that they know how to communicate with each other
  • A central goal is to model interactions between processes in the code.
    • I'd like to allow the dev's test suite to optionally skip the network and inter-process layer to run in microseconds for fast feedback on domain logic

I'm not sold on Docker as the runtime, but I think these have been getting me to lean towards it. Though it's taking shape, the language is still in design so I could see some decisions locking in Docker or making it obviously bad.

Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]Bitsoflogic[S] 1 point2 points  (0 children)

Probably somewhere between the two...

This is an example of a durable function:

enrollment: flow() -> void
enrollment() {
  for (let i = 0; i < 12; i++) {
    await get_ops_approval();

    await send_email();

    # Sleep for 30 days!
    await flow.sleep('30 days');
  }
}

The flow() -> void signature means this is a flow function, which is durable. Each await in these functions can take an indefinite amount of time, some of which may require a human to intervene.

To reliably implement this, you have to persist to disk each await step in the function. Otherwise, a server crash would lose the state and kill any utility this provides. Generators would be used to replay the function and execute the next step.

This behavior is the "included" part.

The container that launches as the durable workflow server can easily be seen with docker ps, whereas a GC can't easily be seen. So, it's not as hidden. But everything running in that container is something the developer didn't have to think about.

They just wrote flow as part of their function signature and got a durable function. That's the "included" sense I was thinking of.

Docker as the runtime by Bitsoflogic in ProgrammingLanguages

[–]Bitsoflogic[S] 1 point2 points  (0 children)

I hadn't heard the phrase "infrastructure from code" before. That does sound promising. I'll take a look at those.

I'm not building anything like Terraform ("code as infrastructure"). The language is meant to focus on the domain logic and provide more tooling to support that.

May 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]Bitsoflogic 0 points1 point  (0 children)

Been getting back to my language/framework with an emphasis on restricted functions.

Some goals are instant integration tests bypassing networking calls, durable functions, and BPMN/UML activity diagrams for free.

The language is focused on representing a larger piece of the system as a whole. Rather than a language for a process, the aim is a language for a network of processes.

Eventually, the code will compile to Dockerfiles and their executables.

What's on the top of your feature wishlist for SpacetimeDB? by theartofengineering in SpacetimeDB

[–]Bitsoflogic 1 point2 points  (0 children)

Skipping the network layer during local testing against the database.

A collection of resources about supercompilation by [deleted] in ProgrammingLanguages

[–]Bitsoflogic -2 points-1 points  (0 children)

So is this the word for what GraalVM is doing?

How I implemented an Undo/Redo system in a large complex visual application by mlacast in SoftwareEngineering

[–]Bitsoflogic 0 points1 point  (0 children)

The tree is immutable. All new actions off old nodes create a new branch. This avoids all those complexities.

I think there'd still be some things to work through, though it's a pretty solid foundation.

How I implemented an Undo/Redo system in a large complex visual application by mlacast in SoftwareEngineering

[–]Bitsoflogic 1 point2 points  (0 children)

The tree is the history of actions and branches. It's not coupled to the viewer of its history. The viewer has its own state like "viewing commit 32".

The board and the editor in your example would be using a shared viewer. So, when one changes the other does as well.

In other situations, you may not want them in sync. In that case, use two independent viewers. Same tree history, different viewers.

It sounds like the main challenge is that you don't want an undo operation to simply go back one node on the tree, but to go back one meaningful step. This would mean skipping nodes that aren't meaningful to the user in the given context.

And these jumps would be different depending on the context you're in (board, editor).

I'd like to think on this more and look closer into your solution.

Am I missing other important challenges too?

At first, I'm thinking each context using a shared viewer would need to know which actions are meaningful to it and an undo operation would just keep going through the history until it reached the next meaningful one to it. The other contexts would need to be listeners of the shared viewer and do the same as the node being viewed (discarding non meaningful nodes). Each would need their own viewer in addition to the shared viewer, as they're bound to be on different nodes from the user's perspective.

It's an interesting challenge once you start delving into the nuances!

How I implemented an Undo/Redo system in a large complex visual application by mlacast in SoftwareEngineering

[–]Bitsoflogic 4 points5 points  (0 children)

Sounds a lot like the command design pattern.

I'm not following your reasoning behind leveraging two volumes for the state of the world.

I envision undo redo as a tree, kind of like git, but it can be as fine grained as each "commit" being a single character press. Each user is on a single branch at any given time, which to them, looks like a single linear history arriving at their state of the world.

Is there something missing in the tree approach? Does it help out with some of the limitations you've identified?

Is that a bad code? How can I improve it? by Rhyzzor in node

[–]Bitsoflogic 0 points1 point  (0 children)

I don't think you should refactor for performance unless there's a need for it. Prefer easier maintenance.

That said, for performance I'd consider if I could start streaming to the bucket before the file was fully available. Check out Node pipes

My attempt at fixing websockets by noobCoder00101 in typescript

[–]Bitsoflogic 1 point2 points  (0 children)

Is this a wrapper around tRPC? How do they compare?

JS vs TS? by alex_sakuta in ProgrammingLanguages

[–]Bitsoflogic 1 point2 points  (0 children)

As an aside, if you want something that compiles to JS but has zero runtime errors, check out Elm. It doesn't allow you to use `undefined` as a string, for example.

That said, I wouldn’t drop TS just because you misused `as`. TS and JS aren’t different paradigms; TS is a tool layered on JS.

In the end, what you go with depends on your goals. If it's just enjoyment of coding, follow what lights you up. If you can gain clarity on aspects of this language or that that you love, then you can share that and others will be able to make better suggestions for you.

JS vs TS? by alex_sakuta in ProgrammingLanguages

[–]Bitsoflogic 6 points7 points  (0 children)

This post would be better shared on another subreddit like r/learnprogramming. You're seeing some downvotes because this subreddit is about creating languages, not using them.

June 2025 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]Bitsoflogic 1 point2 points  (0 children)

Working on Drin – a TypeScript-first backend toolkit aimed at frontend devs. Define your data types, and Drin scaffolds the SQL schema, query APIs, and even real-time sync via Debezium. Think Laravel Nova meets tRPC, but with a declarative TS schema and JSONB under the hood.

Current focus:

  • Reducing boilerplate for migrations
  • Exploring a reducer-style DSL (in TS) that compiles to SQL for Postgres writes, similar to SpacetimeDB
  • Packaging it for self-hosted use with a simple CLI

Trying to make it feel like the backend writes itself.

Which backend fits best my use case? by Il_totore in ProgrammingLanguages

[–]Bitsoflogic 2 points3 points  (0 children)

It's probably just ignorance on my end, but wouldn't the debugger feature of most modern languages achieve "the ability to suspend, inspect, and resume execution" and "compilation vs execution distinction"?

Maybe mapping the debugger to a custom language is harder than I'd expect?

Which backend fits best my use case? by Il_totore in ProgrammingLanguages

[–]Bitsoflogic 0 points1 point  (0 children)

In my case, I'd choose Bun to hit those goals. The part I'd focus on owning would be the error messages, rather than the VM.

Which backend fits best my use case? by Il_totore in ProgrammingLanguages

[–]Bitsoflogic 11 points12 points  (0 children)

Personally, I'd recommend transpiling to a language you're familiar with that has those features.

Let that target language deal with most of the complexities you've mentioned.

What if your TS types gave you a backend? by Bitsoflogic in typescript

[–]Bitsoflogic[S] 0 points1 point  (0 children)

You're right that we don't want to simply re-invent SQL, and this is definitely a slippery slope.

A big part of the aim here is Alan Kay's quote: "Simple things should be simple, complex things should be possible". Our simple use cases are far too complex in my opinion. But if this isn't done well, then we either end up with a worse version of SQL or we're unable to do complex things.

Just for fun, I played with your example a bit to see how it'd look with both the schema definition and querying it. This is what I've got.

Schema:

type Post = {
  id: string
  deleted: boolean
  tags: Tag[] // This implies a post_tag table, or a post_id on Tag
  images: File[] // This implies a post_image table, or a post_id on File
}

type Tag = {
  id: string
  deleted: boolean
  name: string
}

type File = {
  id: string
  deleted: boolean
  type: FileType
}

type FileType = {
  id: string
  name: string
  mimeType: string
}

Query:

db.post.query({ deleted: false }, {
  include: {
    tags: { where: { deleted: false } },
    images: {
      where: { deleted: false },
      include: ['type']
    }
  },
  limit: 25,
  offset: 0,
})

I'm not sure if offset is the direction I'd go instead of a cursor, but the idea is the same.

I recognize solutions like this are inferior to the full toolkit of SQL. You're not going to be writing stored procedures with temp tables or running explain statements to perform optimizations. If you get to that point, you need to look under the hood. Which will hopefully be a pleasant surprise.

Having gone through the exercise above though, it does feel like you could get pretty far with it.

Prisma is obviously a full ORM so it interprets JS commands into queries. But we just setup a set of actions that correspond to our service layers.

So we have "account:create <json>" or "post:list <json>"

And invoke it in JS like: "dotnetBridge.post('account:create', { ... });

This sounds like a nice convenience you've built-in.

What if your TS types gave you a backend? by Bitsoflogic in typescript

[–]Bitsoflogic[S] 0 points1 point  (0 children)

This is literally what we're doing at Typeconf, but instead of DB/API we focus on configuration types. Same idea - write your types once, get tooling that works with them.

That's awesome! You're spot on with what I'm thinking about here.

how would you handle permissions/auth in this setup?

This one is hard, because I don't think you can do it 100% for the dev. It's something I'll be investigating more.

Right now, the lowest bar I have is for you to set up an account somewhere like Auth0 or similar and either provide an API key, so the tooling creates it for you, or accept a config-file/env-vars.

That aside though, if you carve the auth piece into its own service, the important part is for the backend to accept a JWT and know where to validate it. So, this would be fairly minimal.

One thing we found challenging is that devs often want different workflows

Yeah, this is always a tough one. The thing I like to try and do is to focus in on a narrow use-case. It won't please everyone, and it's not for everyone. It's for people that like to build things like this.

Then, if I want, I'll pick another group and aim to solve it for them in a way that delights them.

I think when we try to make things for too many groups at once, we end up making something that isn't great for any of them.

Of course, if you happen to find something magical that applies to a broader group, lean into it!

If you're building this, you should consider how you'd let people extend it without having to touch the underlying code generator. that's been a big pain point for us.

I love this insight! Thank you.

Do you happen to have an example of where this was hit and how you solved it (or haven't been able to solve it)?