| <<<Back 1 day (to 2020/02/25) | Fwd 1 day (to 2020/02/27)>>> | 20200226 |
yulin724 | hi, guys, can we use "https://github.com/mujs/task" in mujs? | 02:38.42 |
sebras | yulin724: hi! you need to stay around here until ator wakes up. he's the one that knows mujs the best. | 03:03.52 |
yulin724 | ok. no problem. let me install a standalone freenode client. | 03:08.59 |
| thank you. | 03:09.01 |
sebras | yulin724: you're welcome. how are you using mujs if I may ask? in some open source project? | 03:11.08 |
yulin724 | yes. I am working a z-wave smart home handler. | 03:13.11 |
| i am comparing different lightweight JS engine. | 03:13.51 |
ator | yulin724: those have nothing to do with mujs (despite the naming) | 11:27.05 |
| avih: allowing embedded U+0000 characters was fairly easy, just use modified utf-8 for them | 15:56.21 |
avih | ator: i have a fairly (i think fully) complete utf8 api support. will post a patch in few mins. just verifying the iterator code changes (that's the last thing which needed explicit handling of utf8 returned values) | 15:58.45 |
| ator: that's nice. maybe pushlstring should handle it automatically? | 15:59.45 |
| (U+0000) | 15:59.53 |
ator | my current patch works with \u0000 in string literals, and js code behaves as it should | 16:01.54 |
| but the strings coming in and out must use modified utf-8 encoding | 16:02.03 |
| combined with your patch for 'strict utf8 wrapper' then that could be handled in the same way as going to/from surrogate pairs maybe? | 16:02.33 |
avih | well, pushlstring should probably handle it, and tolstring should probably too, once it's added | 16:02.49 |
ator | i.e. taking embedded 0 in js_pushlstring (and adding a js_tolstring that also returns the length) | 16:02.55 |
avih | aye | 16:03.09 |
| ator: it's only strict wrapper for the most part. some things needed changes internally, mostly fixes of existing bugs, like js_loadfile needs to convert the content to utf8, dump uses printf so it should print utf8, etc | 16:04.20 |
| (all done in my patch) | 16:04.40 |
ator | right. | 16:04.41 |
| might make sense to just always do the wrapping. I think you may have me coming around on the issue :) | 16:05.26 |
avih | my biggest pain with this patch is mujs.h. the rest is quite simple, really | 16:05.29 |
ator | yeah, it's finding all the odd little corners in the code that can trip you up | 16:05.57 |
| like the string concatenation in jsstring.c etc | 16:06.11 |
avih | this pain can be remedied with a generated mujs.h like i posted previously, though in my current patch it's not generated. just copy-paste of the declarations etc | 16:06.29 |
ator | but if we always store "modified" CESU-8 in the strings, should be fine | 16:06.37 |
| I'll have a look at your patch when I get some time over. we have a staff meeting coming up soon, so I can't justify spending too much time on mujs right now. | 16:07.26 |
avih | ator: exactly. my initial approach of virtual cesu8 SMPs bumped into lots of corner cases where the abstraction broke, like in regex etc | 16:07.36 |
| ator: https://0x0.st/ib-q.txt | 17:28.38 |
| (it's a git diff -> curl ... | git apply) | 17:29.11 |
| ok, one bug detected already: free(vmem) should be js_free(J, vmem) | 20:29.09 |
| <<<Back 1 day (to 2020/02/25) | Forward 1 day (to 2020/02/27)>>> | |