I was experimenting with the language called Bend. It claims to be “A high-level, massively parallel programming language”. I was thinking of using it to validate a list of strings( 10 million phone numbers approx, the numbers are at most 13 and at least 10 char long). I was suggested to look into this language. I was playing with list type, and this function which simply iterates over and adds to a new list the list hangs when the element count becomes more than 11(weird). same thing happens with list comprehension.
def function(list):
match list:
case List/Cons:
return List/Cons {head: list.head, tail: function(list.tail)}
case List/Nil:
return List/Nil
def main:
list = [ "919250304226", "9152990323", "+919436148325", "9656978257", "9188950597", "+919497145470", "09236740079", "ab35g","919451504746", "9522566303", "9522566724","9696506183"]
return function(list)
The language uses HVM (higher order virtual machine). After waiting for some time (>5 min), I killed the hvm and I get,
Errors:
Failed to parse result from HVM.
I played with the length of the list and found out the upper limit was 11 for list of strings.
But that is not the case with a list of integers. I haven’t checked for a upper limit.
I have also written the same function with accumulator and the result was the same.
I am curious about this behaviour, and how to approach an issue like this. I don’t absolutely have to use Bend. As a person who likes to know about the things going on under the hood(compiler, OS etc) I will like to gain some understanding.
Thanks in advance.
Lord_help_me is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.