Login
You're viewing the assemblag.es public feed.
  • Oct 21, 2026, 5:19 PM

    @cpsdqs Like the complexity pre-calculation doesn't need to be bounded.

    As a simple e.g., having just `INCLUDE <>` gives you a naive
    ~"max include-path length" * "max filepath length" bound for the state-space of a deterministic process of generating the output,

    and a naive ~"max include-path length" * "max filesize" bound for the max time/output.

    With validation makkng sure that "max include-path length" is a finite number -- no loops. (I guess, also that none of your files are /dev/urandom or something and have inifinite length, too.)

    💬 1🔄 1⭐ 0

Replies

  • Oct 21, 2026, 5:34 PM

    @gaditb I think if complexity is knowable, a smaller (probably configurable) bound is still a good idea, because finite can be very big… I encounter this a lot when I’m making cursed rust macros, which *are* primitive recursive, but my complexity turns out to be like some really bad n⁹ or something and it just hangs forever :(

    then again, maybe the template can just be assumed-nice. because that macro nonsense was definitely capital-c Computation, which could be said to just not belong in a template

    💬 1🔄 0⭐ 0
  • Oct 21, 2026, 6:16 PM

    @cpsdqs I'm not talking complexity bounds as a function of some N, I'm talking specifically computing a numerical bound for the given template-system, and storing that as input to inform execution or validation.

    e.g. pre-allocating all necessary memory at start of runtime, not validating when checking, if the number is above a threshold, timeouts that error as a fatal "report this upstream" bug in the tooling if hit.

    💬 1🔄 0⭐ 0
  • Oct 21, 2026, 6:21 PM

    @gaditb ohh huh. so basically turning it into an embedded programming sort of thing… that could be neat. …“(s?)sg that compiles to a program with exactly one malloc” lol

    💬 1🔄 1⭐ 1
  • Oct 21, 2026, 6:23 PM

    @cpsdqs With exactly one malloc and... forward jumps only? Not sure what the computational restriction is to ensure measured, bounded, time as well.

    💬 2🔄 0⭐ 0
  • Oct 21, 2026, 6:36 PM

    @gaditb <del>compile it to glsl</del> forward jumps only would make the program really big so maybe it’s okay to trust the system on that one. and have a pre-emptive multitasking os

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Oct 21, 2026, 6:49 PM

    @gaditb essentially, you can only use for-loops with a statically-ish known upper bound. combined with the statically known memory size and storage buffers, it would be possible to compile this as a massively parallel gpu-based website template renderer. now, whether this makes any sense,

    💬 0🔄 0⭐ 0
  • Oct 21, 2026, 6:40 PM

    @cpsdqs EDIT:
    Maybe "one single jump target at a time (which must be the active instruction when set), with a monotonically-decreasing-without-rollover jump-if-non-zero counter, which can't be forward-jumped over"? (EDIT2: forward-jumps clear the target&counter? no, 'cause we want IFs to be able to conditionally drop the counter /further/... hm.)
    Then max time is naively "number of back-jump targets"*"max length before jump"*"max counter of jumps",
    but can be more narrowly SUM("length from target to jump"*"counter set at target" OVER "back-jumps")

    💬 0🔄 0⭐ 0