• Aceticon@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 day ago

    I started programming as a kid way back in the ZX Spectrum days, and that one had even less memory than that.

    You can do a surprising large amount of functionality if you’re hand-coding assembly (I actually made a mine-sweeper clone for the Spectrum like that).

    Even nowadays, there is the whole domain of microcontrollers, some of which are insanelly tiny (for example, the ATTiny202 which has 2KB flash and 128 Bytes of RAM) and you can do a surprising amount of functionality even in C since modern C compilers are extremelly efficient.

    (That said, that 202 is the extreme low end and barelly useful, but I do have an automated plant watering system I designed - complete with low battery detection and signalling - running on an ATTiny45, an older chip with twice as much flash and RAM).

    In my experience, if there is no UI on a screen (graphical elements tend to use quite a bit of memory plus if you’re doing animation you need an in-memory buffer the size of the video memory to get double-buffering for smoothness and just that buffer can add up a lot of memory depending on resolution and bytes per pixel), using a compiled language which can optimize for size (like C) and not dragging in a ton of oversized libraries as dependencies, you can do a ton of functionality in very little memory - there are quite complex functional elements out there (like full TCP/IP stacks) that fit in a few KB of memory.