Add info about stack overflows

This commit is contained in:
Brendan Hansknecht 2021-09-29 18:59:49 -07:00
parent 0cd288f623
commit 414f3a0438
3 changed files with 5013 additions and 0 deletions

View File

@ -11,6 +11,14 @@ app "false"
# 1) The input files are considered too large to just read in at once. Instead it is read via buffer or line.
# 2) The output is also considered too large to generate in memory. It must be printed as we go via buffer or line.
# I think one of the biggest issues with this implementation is that it doesn't return the the platform frequently enough.
# What I mean by that is we build a chain of all Tasks period and return that to the host.
# In something like the elm architecture you return a single step with one Task.
# The huge difference here is when it comes to things like stack overflows.
# In an imperative language, a few of these peices would be in while loops and it would basically never overflow.
# This implementation is easy to overflow, either make the input long enough or make a false while loop run long enough.
# I assume all of the Task.awaits are the cause of this, but I am not 100% sure.
main : List Str -> Task {} *
main = \filenames ->
filenames

View File

@ -0,0 +1,2 @@
{ This will stack overflow if the input is too large }
[^$1_=~][,]#

File diff suppressed because it is too large Load Diff