mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
Add info about stack overflows
This commit is contained in:
parent
0cd288f623
commit
414f3a0438
@ -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
|
||||
|
2
examples/false-interpreter/examples/copy.false
Normal file
2
examples/false-interpreter/examples/copy.false
Normal file
@ -0,0 +1,2 @@
|
||||
{ This will stack overflow if the input is too large }
|
||||
[^$1_=~][,]#
|
5003
examples/false-interpreter/examples/test.false
Normal file
5003
examples/false-interpreter/examples/test.false
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user