zlacker

[parent] [thread] 2 comments
1. a1371+(OP)[view] [source] 2023-05-19 23:05:23
I really hope that takes off because you are correct. Python though has such a fluid syntax that I'm not sure TS can match. For example when you want to sum two Numpy arrays, you just need the + operator, while that sort of thing is notoriously unpredictable in JS.
replies(2): >>srouss+I3 >>saiojd+j9
2. srouss+I3[view] [source] 2023-05-19 23:43:09
>>a1371+(OP)
I wonder if you could not do some operator overloading on the TS side to do some rewriting to get things like tensor addition on tensor types.

Heck, if you are doing that, maybe convert to webgpu automatically as well.

Someone very enterprising might do this in bun using zig.

3. saiojd+j9[view] [source] 2023-05-20 00:48:20
>>a1371+(OP)
Three.js works just fine with functions like `.add`, it sure is ugly though. It kind of blows the mind that javascript has had so many syntactic additions over the years but still has no operator overloading.
[go to top]