Wenliang

Results 70 comments of Wenliang

The `v = math.bound(0, int(v), 10)` is pretty readable. As for the default value of `int()`, let's take a look at other languages: - `parseInt()` in JavaScript returns `NaN` by...

I'm looking at these PRs.

Indeed, and I find some interesting uses of range: ``` berry > [1, 2, 3, 4][0 .. -1] [1, 2, 3, 4] > [1, 2, 3, 4][0 .. 0] #...

> The other option would be to use the Python equivalent `[0:5]` I agree with this.

This may be possible. Considering: ``` berry # if operator : has the following rules: a : b # => range(a, b) if `a`, `b` is integer a : b...

> Revisiting some old issues. Are you still in favor of this syntax for excluded last value? It doesn't seem like a big deal?

It is not recommended to use 64-bit integers on STM32, as this can be very slow.

If you hope to use popular scripting languages on the MCU, I recommend QuickJS, but it is much larger than the Berry interpreter (RAM and ROM). In contrast, Berry’s syntax...

> As things have become now, it looks like people wanting to get started with some language (or whatever) are increasingly turning to ChatGPT (or another LLM), which struggles to...