r/ProgrammingLanguages • u/akomomssim • Mar 08 '26
Introducing Eyot - A programming language where the GPU is just another thread
https://www.cowleyforniastudios.com/2026/03/08/announcing-eyot/
95
Upvotes
View all comments
Show parent comment
2
u/akomomssim Mar 09 '26
I don't have an example in the playground, but that is totally possible right now. If you want to capture global state in a worker you can partially apply a function and use that when creating a worker.
If you had an
inference_functionthat takes the job as a first parameter, and the weights as a second parameter, you could write:The
inferfunction captures the weights.let worker = gpu inferwould transfer that state to the GPU, where it stays, so each inference would just transfer the job specific data.That GPU memory would be freed when
workeris garbage collected.The
partialkeyword is honestly a little odd, so a longstanding TODO for me is to implement proper lambdas instead (and improve the playground so I can share examples more easily!)