Luanti logo

IRC log for #minetest, 2023-07-12

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Enable nick filtering
Time Nick Message
2 more elements. Show/hide.
14:53 sfan5 kyle56: fixed
10 more elements. Show/hide.
17:08 lissobone Hi.
17:08 lissobone I have noticed that non-ASCII characters are encoded weidrly in the server log file.
2 more elements. Show/hide.
17:09 lissobone I wanted to read what my friends had written, but I don't know what encoding is that.
17:09 lissobone What encoding does minetest use for logging?
17:12 lissobone For example, my friend wrote “ладна”.  I don't know how to interpret this.
17:12 lissobone Wait, Emacs converted it!
17:29 jonathan_doe joined #minetest
17:42 sfan5 utf-8
17:45 lissobone Thanks, I have already discovered that in Emacs.
17:58 mrkubax10 joined #minetest
18:08 dibesfer[m] Nice
18:08 dibesfer[m] Dont thank urself tho
18:09 dibesfer[m] Well I dunno xD
18:44 lissobone (decode-coding-region (point-min) (point-max) 'utf-8)
18:44 lissobone That's the thing that helped me.
18:48 lissobone It just so happens that ERC handles such cases automatically, converting unintelligible bytes to human-readable words.  And only because GNU Emacs and ERC are Free Software (and not “open source”, like some geeks like do describe it) I could study the source code, find out how it handles this task and share it with you.
18:50 lissobone left #minetest
19:12 MTDiscord <luatic> It's not like detecting encodings is exclusive to Emacs or free software. The most basic editors have it. It's as simple as trying a few common encodings (ASCII, Extended ASCII / Latin-1, the weird ISO ones, UTF-8, UTF-16). If you get invalid sequences, you can rule out encodings. Otherwise, simply compare character frequencies against expected character frequencies (say for English), and chose the most likely one based on that. Of course
19:12 MTDiscord editors will probably have more advanced approaches, but it's not that hard.
2 more elements. Show/hide.
20:51 fluxionary suppose i'm creating a mod, which other mods will register things with while mods are loading, and not change afterwards. is there some way to share that data with an async environment without passing it as an argument with every call? i guess i could write it to a temp file, and register that with register_async_dofile? that seems... a bit messy though.
21:21 sys4 joined #minetest
21:26 fluxionary can you even use `register_async_dofile` in an `on_mods_loaded` callback?
21:28 sfan5 no idea
21:35 muurkha ugh
10 more elements. Show/hide.

| Channels | #minetest index | Today | | Google Search | Plaintext