You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I've been using CalcTape on my phone for a while and was looking for something similar to use on my desktop, and stumbled upon QwikTape. Seeing that CalcTape was one of the inspirations, it's exactly what I was looking for! The variable assigning in results is quite handy. So here's a brief story of my first experience:
Today I went grocery shopping with my mom and sister and I was paying, but we're splitting the bill, so I used a couple variables to see the total of stuff for each of us and also check it against my bank balance to see if I'll still make ends meet. In this process, I was using descriptive variable names like sister_total, mom_total, house_total, and also doing compound calculations (e.g. foo / bar = baz / qux = foobar), until suddently QwikTape froze on me.
Here is a small snippet that triggers it (but doesn't freeze completely):
fee_fo_fum_fam_foo_bar_baz_qux_leeroy_jenkins = 100
Do any operation with the variable below to trigger a freeze:
fee_fo_fum_fam_foo_bar_baz_qux_leeroy_jenkins
This is an exaggeration of course, the variables I was using weren't that long, but using them together had the same effect as using a single long one, and the more calculations you have the longer it freezes. It seems that long variables break the document evaluation to such a degree that changing the variable value doesn't even update the calculation anymore. This happens in the latest release and also in the latest commit. A workround is just to use small/single character variables, but that makes things less readable.
Here's the stack trace (from the latest commit):
InternalError: stack overflow
at tg (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at cg (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at pT (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at Mb (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at dM (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at ALT (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js)
at call (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:742)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at ALT (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js)
at call (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:655)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:639)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:614)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:601)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:594)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:576)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at ALT (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js)
at call (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:247)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at apply (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:232)
at call (native)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at <anonymous> (file:///home/manokara/Downloads/QwikTape/src/parser/tape-embedded.js:234)
at apply (native)
at s (file:///home/manokara/Downloads/QwikTape/src/chevrotain/chevrotain.min.js)
at parseTape (file:///home/manokara/Downloads/QwikTape/src/components/editor.js:153)
at evalTokens (file:///home/manokara/Downloads/QwikTape/src/components/editor.js:186)
// The line above repeats around 380 times!
at on ^change at :root (file:///home/manokara/Downloads/QwikTape/src/components/editor.js:454)
Looking at the stack trace and with my limited understarding of the source code, it's almost as if it's considering each character in the editor as a token, causing a stack overflow.
The text was updated successfully, but these errors were encountered:
Hey, I've been using CalcTape on my phone for a while and was looking for something similar to use on my desktop, and stumbled upon QwikTape. Seeing that CalcTape was one of the inspirations, it's exactly what I was looking for! The variable assigning in results is quite handy. So here's a brief story of my first experience:
Today I went grocery shopping with my mom and sister and I was paying, but we're splitting the bill, so I used a couple variables to see the total of stuff for each of us and also check it against my bank balance to see if I'll still make ends meet. In this process, I was using descriptive variable names like
sister_total
,mom_total
,house_total
, and also doing compound calculations (e.g.foo / bar = baz / qux = foobar
), until suddently QwikTape froze on me.Here is a small snippet that triggers it (but doesn't freeze completely):
This is an exaggeration of course, the variables I was using weren't that long, but using them together had the same effect as using a single long one, and the more calculations you have the longer it freezes. It seems that long variables break the document evaluation to such a degree that changing the variable value doesn't even update the calculation anymore. This happens in the latest release and also in the latest commit. A workround is just to use small/single character variables, but that makes things less readable.
Here's the stack trace (from the latest commit):
Looking at the stack trace and with my limited understarding of the source code, it's almost as if it's considering each character in the editor as a token, causing a stack overflow.
The text was updated successfully, but these errors were encountered: