Hacker Newsnew | past | comments | ask | show | jobs | submit | dqbd's commentslogin

A tuple does have a upper limit of 10 000 elements, which means that with this approach we can count to 10 000 at most.

Another approach which I tried is to do arithmetics on digits directly, storing digits in a tuple instead, but the code is not as elegant as the tuple one

https://github.com/dqbd/ts-math-evaluate/blob/main/src/math/...


Author here, you are correct! The issue here is due to the fact that a single user-perceived character might span into multiple tokens. This should be fixed now.


Hey. Thank you! However has the fix not been deployed yet? Still shows broken UTF-8.

> a single user-perceived character might span into multiple tokens

Is this the way it works as designed or is this a bug?


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: