00:37:10 | | Quit m01 (Quit: Konversation terminated.) |
00:39:18 | | Join m01 [0] (~quassel@vps-b172b88b.vps.ovh.net) |
00:50:55 | __builtin | othello7: not too sure about your application, but if you care about variable font sizes, check out the puzzles plugin and its rockbox interface |
00:51:04 | __builtin | I remember I did some clever stuff with font sizing |
00:59:51 | __builtin | othello7: https://git.rockbox.org/cgit/rockbox.git/tree/apps/plugins/puzzles/rockbox.c#n68 |
01:00 |
01:00:17 | __builtin | https://git.rockbox.org/cgit/rockbox.git/tree/apps/plugins/puzzles/rockbox.c#n548 |
01:13:33 | *** | Saving seen data "./dancer.seen" |
02:00 |
02:32:21 | | Quit S|h|a|w|n (Read error: Connection reset by peer) |
03:00 |
03:13:35 | *** | Saving seen data "./dancer.seen" |
05:00 |
05:02:55 | | Quit JanC (Ping timeout: 268 seconds) |
05:13:39 | *** | Saving seen data "./dancer.seen" |
06:00 |
06:05:43 | | Join JanC [0] (~janc@user/janc) |
06:16:46 | | Join JanC_ [0] (~janc@user/janc) |
06:16:56 | | Quit JanC (Killed (mercury.libera.chat (Nickname regained by services))) |
06:16:56 | | Nick JanC_ is now known as JanC (~janc@user/janc) |
07:00 |
07:13:42 | *** | Saving seen data "./dancer.seen" |
07:23:28 | rb-bluebot | Build Server message: New build round started. Revision 0761532d09, 303 builds, 7 clients. |
07:48:34 | rb-bluebot | Build Server message: Build round completed after 1506 seconds. |
07:48:36 | rb-bluebot | Build Server message: Revision 0761532d09 result: All green |
07:50:25 | | Join amachronic [0] (~amachroni@user/amachronic) |
07:51:32 | amachronic | spork, I think I figured out why you had that problem on the M3K |
07:52:13 | amachronic | version: 5e7c34f5b3-221015 is before the yes no screen fix |
07:54:11 | amachronic | so... I'm pretty sure it was the same bug you had on the Q1 −− you just need to update your M3K build :) |
07:57:22 | rb-bluebot | Build Server message: New build round started. Revision e03bc66594, 303 builds, 7 clients. |
08:00 |
08:21:56 | spork | amachronic: i think i had the same error with my own build from after that fix |
08:23:46 | amachronic | i wasn't able to reproduce it with 55185277ba |
08:23:55 | rb-bluebot | Build Server message: Build round completed after 1594 seconds. |
08:23:57 | rb-bluebot | Build Server message: Revision e03bc66594 result: All green |
08:25:06 | amachronic | but I did build that locally |
08:25:23 | amachronic | maybe I should try it again from rb.org this time |
08:25:44 | amachronic | or better yet just compare the binaries |
08:33:04 | spork | i can try the latest from the site |
08:34:48 | _bilgus | amachronic is g#4694 more to your liking now? |
08:34:51 | rb-bluebot | Gerrit review #4694 at https://gerrit.rockbox.org/r/c/rockbox/+/4694 : font / screens add get_stringnsize by William Wilgus |
08:37:18 | _bilgus | i'm not totally sure about INTPTR_MAX being the best way to handle the case of -1 but I really don't want to invoke strlen to the mix |
08:38:15 | amachronic | it's ok but I still prefer size_t because surely strlen isn't a huge cost? |
08:38:45 | amachronic | I'm kind of iffy about UTF-8 substrings anyway |
08:39:19 | amachronic | re. getting the length the problem isn't finding the total length of the overall null terminated string |
08:39:42 | amachronic | it's how you know where the end of the non-null terminated substring is |
08:40:07 | amachronic | the caller is always going to have to do a utf8decode and count characters itself, wouldn't you think? |
08:40:17 | _bilgus | my concern there is the number of times the function gets called |
08:40:27 | _bilgus | its in loops throughout |
08:42:06 | amachronic | i doubt text rendering is a hot inner loop |
08:43:20 | _bilgus | in the case of font_getstringnsize sure they might have to get the len but you then make font_getstringsize have to as well |
08:45:00 | _bilgus | figure it gets the len in the decode loop in that case i'll duplicate the function rather than impose the overhead |
08:45:37 | | Quit JanC (Quit: 'k zien d'r mee weh zi) |
08:45:38 | _bilgus | unfortunately ssize_t and diffptr_t are not viable |
08:45:47 | | Join JanC [0] (~janc@user/janc) |
08:47:52 | amachronic | from a cursory look the only places I could see getstringsize getting used very often are gui/line.c and skin engine's write_line() |
08:50:36 | amachronic | still I find it hard to imagine 1 extra loop over the string is such a huge penalty vs. the weirdness of getstringnsize. |
08:50:54 | _bilgus | scroll engine uses it every update |
08:51:48 | amachronic | yes but even once every 10ms is not my definition of a hot loop |
08:52:22 | amachronic | anyway I don't care much about performance −− the main question is −− is there a sane use for getstringnsize? |
08:52:40 | _bilgus | i'm not even sure i'm going to use the function yet but it makes it possible to do text formatting without having an extra buffer well still going to have a list of offsets |
08:53:09 | amachronic | most of the time if you're working with UTF-8 except dumbly passing the string, you NEED to iterate over it. |
08:53:32 | amachronic | like if you were word wrapping you'd basically do getstringnsize by hand |
08:54:22 | amachronic | I'm just wondering what routine is going to split at a particular number of UTF-8 codepoints |
08:54:27 | amachronic | and then need to know the stringsize of that? |
08:54:50 | amachronic | RTL langs and diacritics would make that kind of silly no? |
08:56:16 | _bilgus | I think you are focusing on the utf8 part but it just happens that the get stringsize function is written that way core uses all ASCII AFAIK |
08:57:14 | amachronic | but this is not for core only −− this is for user visible text. |
09:00 |
09:01:23 | _bilgus | I could limit it to core but what would be the point? |
09:02:49 | amachronic | well that's my point, this isn't used for just ASCII strings thrown around internally. |
09:03:29 | amachronic | these are unicode strings |
09:03:33 | amachronic | for human consumption |
09:03:54 | amachronic | therefore you need to deal with the complexities of unicode if you want to properly layout text. |
09:04:25 | amachronic | I simply cannot see how it is useful to split a UTF-8 string after N codepoints and ask for the size of that. |
09:04:44 | amachronic | that might not even be a sensible unicode string at that point. |
09:05:09 | _bilgus | the way I see getstringsize used is to either check if a string fits in an area of the screen or to split it in a loop till it does fit |
09:05:36 | _bilgus | if you look in splash.c you see its done in a strtok loop |
09:06:24 | amachronic | well, that works but that's O(N^2). |
09:06:31 | amachronic | hardly efficient if you catch my drift. |
09:08:18 | amachronic | I guess in that case getstringnsize would be useful to avoid the memory overhead. |
09:08:30 | amachronic | but you're paying for it with CPU overhead instead. |
09:08:30 | _bilgus | my thought is to allow it to do it without splitting the string and instead save offsets |
09:09:23 | _bilgus | like I said I wasn't sure it would bear fruit |
09:09:43 | amachronic | what splashf is doing should probably be a utility function for general word wrapping. |
09:10:14 | _bilgus | yes but then you need to split on more than just <SPACE> |
09:10:29 | _bilgus | which was my thought as well |
09:10:33 | amachronic | why can splashf get away with splitting on spaces only? |
09:10:38 | amachronic | that's not correct re. unicode |
09:10:49 | amachronic | but obviously it's been good enough right? |
09:10:50 | _bilgus | IKR |
09:12:45 | _bilgus | I have splash scroller in lua that does a bit better |
09:13:44 | *** | Saving seen data "./dancer.seen" |
09:14:03 | _bilgus | that would be good enough but lua hides all that overhead in gobs of ram |
09:15:41 | amachronic | splash_scroller is hardly a lot of overhead but it's ascii-only. |
09:16:46 | amachronic | all you need for a generic word wrap function would be chars to split on, max pixel width, and a way to store the output. |
09:17:40 | amachronic | you could call a callback for each outputted line |
09:17:47 | amachronic | let the callback figure out how to store it |
09:18:12 | amachronic | then a simple version which uses a char *lines[] array like splashf and splash_scroller do now. |
09:19:12 | _bilgus | https://unicode.org/reports/tr29/ |
09:20:29 | _bilgus | its a can of worms |
09:20:36 | amachronic | tr29 could be left for later :) |
09:22:00 | amachronic | we're not doing it now so nobody will complain if we keep not doing it |
09:22:20 | _bilgus | lol |
09:27:42 | amachronic | https://www.unicode.org/reports/tr14/ is for line breaking specifically |
09:28:03 | _bilgus | so wordwrapfn(char* str, int max_w, int(*cb)(char* str) |
09:28:33 | amachronic | yeah exactly but stick a void* userdata for the callback in there |
09:28:43 | amachronic | global variables are evil |
09:29:23 | amachronic | and also pass the strlen(str) to the callback because str might not be null terminated |
09:30:06 | amachronic | allowing str to be modifiable to add nulls will only add headaches later |
09:33:37 | _bilgus | wordwrapfn(char* str, int len, int max_w, void (*cb)(void *userdata, int len))? |
09:34:29 | amachronic | wordwrapfn_ex(const char* str, int len, int max_w, void (*cb)(void *userdata, const char *str, int len), void *userdata) |
09:35:23 | amachronic | ...that's why I suggested having a simple version too, implemented using the complicated version. |
09:36:11 | amachronic | doing lambda functions in C sucks :( |
09:36:27 | _bilgus | still how does the end user actually split the string if we don't modify the source string? |
09:37:14 | amachronic | they have a (str, length) pair they can use |
09:37:35 | amachronic | if you allow the source to be modifiable you are generally imposing duplication of the string somehwere. |
09:38:08 | amachronic | you can get around that when you know the string is always being constructed dynamically and can be thrown out word wrapping |
09:38:49 | amachronic | i don't think there's a way to combine the modifiable string + non-modifiable string variants. |
09:39:21 | amachronic | i would prefer non-modifiable string simply because it's often more composable |
09:40:18 | _bilgus | I'll have a play with this see what I come up with |
09:40:41 | amachronic | plus, if the callback doesn't need to store the string for later it can use it right away. |
09:40:49 | amachronic | avoiding storage overheads entirely |
09:41:09 | _bilgus | that would be nice we have a lot of buffers lying around |
09:44:09 | rb-bluebot | Build Server message: New build round started. Revision 6e4c866756, 303 builds, 7 clients. |
09:47:18 | | Join massiveH [0] (~massiveH@2600:4040:a993:4900:51af:8bb0:76ed:6ceb) |
10:00 |
10:08:43 | rb-bluebot | Build Server message: Build round completed after 1475 seconds. |
10:08:47 | rb-bluebot | Build Server message: Revision 6e4c866756 result: All green |
10:21:51 | | Quit amachronic (Quit: amachronic) |
11:00 |
11:13:47 | *** | Saving seen data "./dancer.seen" |
11:59:03 | | Quit massiveH (Quit: Leaving) |
13:00 |
13:10:41 | | Join lebellium [0] (~lebellium@2a01cb040109a600fd1ac54062b4ea28.ipv6.abo.wanadoo.fr) |
13:13:51 | *** | Saving seen data "./dancer.seen" |
15:00 |
15:01:08 | | Quit hexadecagram (Read error: Connection reset by peer) |
15:10:10 | | Join hexadecagram [0] (~acc@user/hexadecagram) |
15:13:54 | *** | Saving seen data "./dancer.seen" |
15:37:23 | | Quit rb-bluebot (Ping timeout: 252 seconds) |
15:38:43 | | Quit bluebrother (Ping timeout: 248 seconds) |
15:50:19 | | Join bluebrother [0] (~dom@user/bluebrother) |
15:51:02 | | Join rb-bluebot [0] (~rb-bluebo@rockbox/bot/utility) |
17:00 |
17:13:58 | *** | Saving seen data "./dancer.seen" |
17:30:51 | | Join freon [0] (~user@c-73-210-167-38.hsd1.il.comcast.net) |
17:31:40 | freon | does the IDE controller in an ipod 3rd gen (pp5002) support LBA past 28 bits |
17:37:50 | freon | as in, >128GB |
18:00 |
18:22:25 | hactar|ant | i've only ever tried with 64gb |
18:37:29 | | Quit lebellium (Quit: Leaving) |
19:00 |
19:14:00 | *** | Saving seen data "./dancer.seen" |
19:21:43 | buZz | freon: i think i saw a 1TB ipod, but not sure what gen it was |
20:00 |
20:54:59 | | Quit rasher (Ping timeout: 248 seconds) |
20:55:07 | | Join rasher [0] (~rasher@user/rasher) |
21:00 |
21:14:01 | *** | Saving seen data "./dancer.seen" |
22:00 |
22:09:36 | | Quit Serke (Remote host closed the connection) |
23:00 |
23:14:04 | *** | Saving seen data "./dancer.seen" |
23:48:06 | | Quit q3k (*.net *.split) |
23:48:06 | | Quit tomato (*.net *.split) |
23:48:07 | | Quit Natch (*.net *.split) |
23:48:07 | | Quit gevaerts (*.net *.split) |
23:48:08 | | Quit kirvesAxe (*.net *.split) |
23:48:08 | | Quit Xeha (*.net *.split) |
23:48:08 | | Quit woffs (*.net *.split) |
23:48:08 | | Quit melmothX (*.net *.split) |
23:48:09 | | Quit rudi_s (*.net *.split) |
23:48:23 | | Join kirvesAxe [0] (kirvesaxe@user/kirvesaxe) |
23:48:24 | | Join gevaerts [0] (~fg@user/gevaerts) |
23:48:44 | | Join q3k [0] (q3k@boston-packets.hackerspace.pl) |
23:49:00 | | Join melmothX [0] (~marco@granada.amusewiki.org) |
23:49:15 | | Join tomato [0] (~tomato@user/tomato) |
23:49:44 | | Join Xeha [0] (~Xeha@user/Xeha) |
23:51:28 | | Join rudi_s [0] (~simon@user/rudi-s/x-7673890) |
23:53:29 | | Join Natch [0] (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |