News for hackers. Stuff that matters.
Re:Don’t Think, Just Defunctionalize by tempodox on Wednesday December 23, 2020 @10:19AM (#25518422)
On a Unix-like OS you can do

  ulimit -s <stack-size-in-KiB>
At least you only have to set it once per shell instance; put it in your shell init file (bashrc or whatever).
Re:Don’t Think, Just Defunctionalize by CJefferson on Wednesday December 23, 2020 @10:33AM (#25518608)
The problem is, it's hard to distribute libraries which want lots of stack space, because not everyone will do that.

In Rust (where threadsafety is easy and cheap), I tend to just spin up a thread of known (large) stack size, and do computations there.

Re:Don’t Think, Just Defunctionalize by tempodox on Wednesday December 23, 2020 @10:47AM (#25518776)
I see. And the end user might not even know that library is built into the tool they use, or know how to alter the stack size limit on their machine. So I can't think of a better solution either.
Re:Don’t Think, Just Defunctionalize by ufo on Wednesday December 23, 2020 @04:20PM (#25522343)
Can a process increase their own stack limit or do they need to spawn a child process with a higher limit?