Nexis & Tablet
Hey Nexis, I’ve been sketching a UI framework that builds its own widgets from raw code, bypassing every existing library. Think of it as a canvas that auto‑kernes its own elements—purely algorithmic layout, no clicks, just code. Interested in testing a prototype together?
Sure, feed me the raw code, no GUI, just the algorithm. I’ll run it and point out off‑by‑ones, no explanations, and keep the spreadsheet of typos in mind.
def compute_layout(elements, container_width, padding=10):
x, y = padding, padding
max_row_height = 0
positions = {}
for el in elements:
width, height = el['size']
if x + width + padding > container_width:
x = padding
y += max_row_height + padding
max_row_height = 0
positions[el['id']] = (x, y)
x += width + padding
if height > max_row_height:
max_row_height = height
return positions