hikari_no_yume

Results 417 comments of hikari_no_yume

Since strings could be thought of as just lists of codepoints, functions that operate on lists should work on strings too, where it makes sense.

Sure, typeclasses are sort of a prerequisite.

For one of my other projects I've been using Haskell again, but initially I was going to go for PureScript. While looking into PureScript, I found out about problems it's...

See: https://en.wikipedia.org/wiki/Template:List_data_structure_comparison

Ideally you implement `array` as a ring buffer, so prepend can also be O(1). But with compiling to JS you're at the mercy of the implementation. I'm not sure, but...

See: https://github.com/TazeTSchnitzel/Firth/blob/217a4a044792b79101e867d23e7b66bef3c06e4f/src/utils.js#L5

Seems like overkill. That's an arbitrary-base, arbitrary-precision _floating-point_ library. What we need is a fast arbitrary-precision integer library. What you've suggested is certainly workable, but it's not ideal.

To be useful you need at least three number types, unfortunately: - 64-bit (or bigger) integers, if you're going to interact with anything with large integer IDs - 64-bit IEEE...

JS has a single number type, `Number`, which is an IEEE 754 double-precision float. This works okay most of the time, but unfortunately integers larger than 54 bits lose precision...

We should have Haskell-style typeclasses in order to be able to implement operators properly.