HigherOrderCO / Bend

A massively parallel, high-level programming language
https://higherorderco.com
Apache License 2.0
17.72k stars 436 forks source link

"Hello world" example fails with error: "HVM output had no result (An error likely occurred)" #740

Open jaredkrinke opened 1 day ago

jaredkrinke commented 1 day ago

Reproducing the behavior

hello.bend (copied from GUIDE.md):

def main():
  return "Hello, world!"

Command: bend run hello.bend -s

Expected: Prints "Hello, world!". Actual: "HVM output had no result (An error likely occurred)" (same for run, run-c)

System Settings

Additional context

I'm brand new to Bend, so it's possible I'm doing something wrong. I didn't see any similar-looking bug reports, or anything in the FAQ. I tried running with -v, but I didn't see any obvious errors getting logged (just lots of transpiled code?).

jaredkrinke commented 1 day ago

I found a thread on Discord where someone ran into a similar problem, and they were able to resolve it by increasing the amount of memory available to their VM. I tried increasing the VM's memory to 4 GB, to no avail, but increasing the VM's memory to 8 GB got things working.

Is it expected to have a "hello world" require gigabytes of memory?

jaredkrinke commented 1 day ago

I found an HVM bug that makes it sound like this is known: https://github.com/HigherOrderCO/HVM/issues/332

Feel free to close this bug if that's correct.

jaredkrinke commented 1 day ago

Well, the "hello world" program runs on my 4 GB laptop, so maybe this is something specific to VMs (I was using Hyper-V), or possibly Debian stable (my laptop is running something newer).

Regardless, I have a working setup now.

developedby commented 12 hours ago

HVM currently always preallocates about 6GB of memory, so that's likely what's causing your issue.