will depue Profile picture
sora agi @ openai

Jun 22, 2023, 22 tweets

do you have any hobbies?
yeah making computers out of things that shouldn't be computers. watch me be the first to bring turing completeness to figma
(edit going to build this tonight so scroll for my live tweeting of a computer) https://t.co/a07l9Ib0Qntwitter.com/i/web/status/1…

ok simple clock working seems promising. add/sub/mult/div already implemented for numbers already by figma, seems like there might be more ops for other types which is great

ok time to test limits and max out these variables. numbers represented as signed 32 bit ints, and will overflow to min int. interesting

conditionals aren't superr powerful, can't nest them and can't do ops within the calls themselves (for example if x * -2 < y) isn't possible just (x > or < or = or != to y). still powerful tho

i can just do preprocessing before each step where i can do ops beforehand and then compare in the conditional but creating new variables is manual so can't dynamically do that.
but this is fine solved by a register system, since figma computers must be single threaded here

it seems "after delay" effects can only occur on top level components, somewhat interesting. maybe they can call overlays which can count as other top level components?
pretty much trying to make a display rn so i can start on bit ops

i am a genius. figma stops you from having multiple after delay effects for one frame and doesn't allow sub components but can call overlays which call their own after delay effects.

trying to figure out how to store my data. there's a pretty cool number type which already supports lots of ops but problem is that if i can't manipulate bits i'll have to resort only to booleans (maybe colors? need to see)
seems numbers are actually floats. if i can get a floor… https://t.co/9GxgfxNCRZtwitter.com/i/web/status/1…

okay so can convert ints to strings in a weird way by appending an empty string to an int and saving to a string var. possible bug.
can't find a way to cast int to string directly so going to go a different route

the reason why this matters btw is that now i can make a directed acyclic graph if you remember that from the cs class that i never went to. now we can make a real program
confused as i don't know to detect if a program is going to halt or not? strange...

ok the problem is that i was hoping i could do more with numbers but not going to work. now going with an 8bit computer (trying to see if it's easier to implement only in binary or using the int unary ops by converting/back).
interesting note: you can pass vars by ref with modes

ok ok i think it might be possible to make addressable memory with references and bit int conversions. gonna be epic if this works.
a big bottleneck here is having to individually create registers for each bit here. i can easily make number variables at 8x (and 32x later).
woah… twitter.com/i/web/status/1…

ok first test failed:
tried to use variable modes () to store different values in one, allowing me to build a doubly linked list for ex while passing by ref.
this would work if overlays would inherit their parent element when in auto mode but we're bit by… https://t.co/4dgu6eYAZo https://t.co/guSASpR6juhelp.figma.com/hc/en-us/artic…
twitter.com/i/web/status/1…

lol i might be the first to get this message haha. figma please i'm trying to build here.

damn ok so not going to work. changing refs is a deep copy and operating only on the mode that's currently enabled. will think about this again tomorrow after i'm rested.
i think i can do this with components in a non ugly way? goal is basically create a singly linked list

ok yep i didn't fully understand the figma state and variable system. i built a component-based linked list that with the current 8 bit system could store 256 vars of possible 32 bits each if packed optimally -> 8.192 kb possible?
looks great though

calling it for now, spent a bunch of time figuring out an algo that only uses subtraction to convert floats to 8 bit signed ints in binary that will work in this structure.
don't think that built in int unary ops will be faster if conversion process is so slow. must test tmr

ok coming back, progress on int -> bin conversion is good but just getting somewhat abstract. going to stop for now as i don't know if this is the right path.
here's the algo i'm building though, pretty solid

full adder donezo. going bit only now for simplicity.

ok big update is going along well now implementing memory system again, have about 4 of 16 operators done.
what's strange is that elements can run things in the background even after navigate to calls (i was trying to use them as a return statement) going to have to rewrite some… https://t.co/SlzT9foiGltwitter.com/i/web/status/1…

long day tomorrow so can't be staying up till 5am building this but addressable memory is 50% done, algos designed and partially implemented.
the float to binary int8 decomposition algorithm is pretty beautiful ngl. very cool tricks to get it to work simply.

ok so nice thing about figma computers is that they're pretty easy to prototype as you can just add more visual displays + make things only move by click and easily step through the 'code'
decomposition almost done (i am procrastinating by building this computer)

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling