Live data from Hacker News

Bend: a high-level language that runs on GPUs (via HVM2)

github.com

11–20 of 269 posts

Re: Bend: a high-level language that runs on GPUs (via HVM2)

#11

I remember seeing HVM on here a year or two back when it came out and it looked intriguing. Exciting to see something being built on top of it! I would say that the play on words that gives the language its name ("Bend") doesn't really make sense... https://github.com/HigherOrderCO/bend/blob/main/GUIDE.md > Bending is the opposite of folding. Whatever fold consumes, bend creates. But in everyday language bending is n…

The first `fork` is from using bend and passing the initial state

  The program above will initialize a state (`x = 0`), and then, for as long as `x = 3`, it will halt and return a `Tree/Leaf` with `7`.
  When all is done, the result will be assigned to the `tree` variable:

Re: Bend: a high-level language that runs on GPUs (via HVM2)

#14

I remember seeing HVM on here a year or two back when it came out and it looked intriguing. Exciting to see something being built on top of it! I would say that the play on words that gives the language its name ("Bend") doesn't really make sense... https://github.com/HigherOrderCO/bend/blob/main/GUIDE.md > Bending is the opposite of folding. Whatever fold consumes, bend creates. But in everyday language bending is n…

The first `fork` is from using bend and passing the initial state The program above will initialize a state (`x = 0`), and then, for as long as `x = 3`, it will halt and return a `Tree/Leaf` with `7`. When all is done, the result will be assigned to the `tree` variable:

I would have described the logic in the exact same way, but I still don't see where initial tree = fork(0) state comes from

all the other "fork"s in the output are produced explicitly by:

    Tree/Node { lft: fork(x + 1), rgt: fork(x + 1) }

Re: Bend: a high-level language that runs on GPUs (via HVM2)

#15

Earlier quoted context omitted.

The first `fork` is from using bend and passing the initial state The program above will initialize a state (`x = 0`), and then, for as long as `x = 3`, it will halt and return a `Tree/Leaf` with `7`. When all is done, the result will be assigned to the `tree` variable:

I would have described the logic in the exact same way, but I still don't see where initial tree = fork(0) state comes from all the other "fork"s in the output are produced explicitly by: Tree/Node { lft: fork(x + 1), rgt: fork(x + 1) }

well, it seems fork is some kind of builtin function that is intimately related to the bend construct: https://github.com/HigherOrderCO/bend/blob/main/FEATURES.md#....

so presumably the initial fork(0) state is implicitly produced by the bend

Post reply on HN