top | item 33242734 Ask HN: What'd be your preferable syntax style for a modern embeddable language? 1 points| dvnguyen | 3 years ago What would be your favorite syntax style for a modern embeddable language - a.k.a. a 2022 Lua or elisp? 1 comment order hn newest pizza|3 years ago Here is a mini-dsl that I think has a really neat syntax: einopse.g. how to upsample an image 2x from einops import rearrange, repeat rearrange(repeat(img, 'h w c -> h w r1 r2 c', r1=2, r2=2), 'h w r1 r2 c -> (h r1) (w r2) c') there is something that is just so elegant to me about einops. I wish there were even more operations, but it's simplicity is nice too.
pizza|3 years ago Here is a mini-dsl that I think has a really neat syntax: einopse.g. how to upsample an image 2x from einops import rearrange, repeat rearrange(repeat(img, 'h w c -> h w r1 r2 c', r1=2, r2=2), 'h w r1 r2 c -> (h r1) (w r2) c') there is something that is just so elegant to me about einops. I wish there were even more operations, but it's simplicity is nice too.
pizza|3 years ago
e.g. how to upsample an image 2x
there is something that is just so elegant to me about einops. I wish there were even more operations, but it's simplicity is nice too.