Previous day | Jump to hour: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | Next day

Seconds: Show Hide | Joins: Show Hide | View raw
Font: Serif Sans-Serif Monospace | Size: Small Medium Large

Click in the nick column to highlight everything a person has said.
The Logo icon identifies that the person is a core developer (has commit access).

#rockbox log for 2022-10-18

00:37:10 Quit m01 (Quit: Konversation terminated.)
00:39:18 Join m01 [0] (
00:50:55__builtinothello7: 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__builtinI remember I did some clever stuff with font sizing
01:13:33***Saving seen data "./dancer.seen"
02:32:21 Quit S|h|a|w|n (Read error: Connection reset by peer)
03:13:35***Saving seen data "./dancer.seen"
05:02:55 Quit JanC (Ping timeout: 268 seconds)
05:13:39***Saving seen data "./dancer.seen"
06:05:43 Join JanC [0] (~janc@user/janc)
06:16:46 Join JanC_ [0] (~janc@user/janc)
06:16:56 Quit JanC (Killed ( (Nickname regained by services)))
06:16:56 Nick JanC_ is now known as JanC (~janc@user/janc)
07:13:42***Saving seen data "./dancer.seen"
07:23:28rb-bluebotBuild Server message: New build round started. Revision 0761532d09, 303 builds, 7 clients.
07:48:34rb-bluebotBuild Server message: Build round completed after 1506 seconds.
07:48:36rb-bluebotBuild Server message: Revision 0761532d09 result: All green
07:50:25 Join amachronic [0] (~amachroni@user/amachronic)
07:51:32amachronicspork, I think I figured out why you had that problem on the M3K
07:52:13amachronicversion: 5e7c34f5b3-221015 is before the yes no screen fix
07:54:11amachronicso... I'm pretty sure it was the same bug you had on the Q1 −− you just need to update your M3K build :)
07:57:22rb-bluebotBuild Server message: New build round started. Revision e03bc66594, 303 builds, 7 clients.
08:21:56sporkamachronic: i think i had the same error with my own build from after that fix
08:23:46amachronici wasn't able to reproduce it with 55185277ba
08:23:55rb-bluebotBuild Server message: Build round completed after 1594 seconds.
08:23:57rb-bluebotBuild Server message: Revision e03bc66594 result: All green
08:25:06amachronicbut I did build that locally
08:25:23amachronicmaybe I should try it again from this time
08:25:44amachronicor better yet just compare the binaries
08:33:04sporki can try the latest from the site
08:34:48_bilgusamachronic is g#4694 more to your liking now?
08:34:51rb-bluebotGerrit review #4694 at : font / screens add get_stringnsize by William Wilgus
08:37:18_bilgusi'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:15amachronicit's ok but I still prefer size_t because surely strlen isn't a huge cost?
08:38:45amachronicI'm kind of iffy about UTF-8 substrings anyway
08:39:19amachronicre. getting the length the problem isn't finding the total length of the overall null terminated string
08:39:42amachronicit's how you know where the end of the non-null terminated substring is
08:40:07amachronicthe caller is always going to have to do a utf8decode and count characters itself, wouldn't you think?
08:40:17_bilgusmy concern there is the number of times the function gets called
08:40:27_bilgusits in loops throughout
08:42:06amachronici doubt text rendering is a hot inner loop
08:43:20_bilgusin 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_bilgusfigure 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_bilgusunfortunately ssize_t and diffptr_t are not viable
08:45:47 Join JanC [0] (~janc@user/janc)
08:47:52amachronicfrom 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:36amachronicstill 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_bilgusscroll engine uses it every update
08:51:48amachronicyes but even once every 10ms is not my definition of a hot loop
08:52:22amachronicanyway I don't care much about performance −− the main question is −− is there a sane use for getstringnsize?
08:52:40_bilgusi'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:09amachronicmost of the time if you're working with UTF-8 except dumbly passing the string, you NEED to iterate over it.
08:53:32amachroniclike if you were word wrapping you'd basically do getstringnsize by hand
08:54:22amachronicI'm just wondering what routine is going to split at a particular number of UTF-8 codepoints
08:54:27amachronicand then need to know the stringsize of that?
08:54:50amachronicRTL langs and diacritics would make that kind of silly no?
08:56:16_bilgusI 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:14amachronicbut this is not for core only −− this is for user visible text.
09:01:23_bilgusI could limit it to core but what would be the point?
09:02:49amachronicwell that's my point, this isn't used for just ASCII strings thrown around internally.
09:03:29amachronicthese are unicode strings
09:03:33amachronicfor human consumption
09:03:54amachronictherefore you need to deal with the complexities of unicode if you want to properly layout text.
09:04:25amachronicI 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:44amachronicthat might not even be a sensible unicode string at that point.
09:05:09_bilgusthe 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_bilgusif you look in splash.c you see its done in a strtok loop
09:06:24amachronicwell, that works but that's O(N^2).
09:06:31amachronichardly efficient if you catch my drift.
09:08:18amachronicI guess in that case getstringnsize would be useful to avoid the memory overhead.
09:08:30amachronicbut you're paying for it with CPU overhead instead.
09:08:30_bilgusmy thought is to allow it to do it without splitting the string and instead save offsets
09:09:23_bilguslike I said I wasn't sure it would bear fruit
09:09:43amachronicwhat splashf is doing should probably be a utility function for general word wrapping.
09:10:14_bilgusyes but then you need to split on more than just <SPACE>
09:10:29_bilguswhich was my thought as well
09:10:33amachronicwhy can splashf get away with splitting on spaces only?
09:10:38amachronicthat's not correct re. unicode
09:10:49amachronicbut obviously it's been good enough right?
09:12:45_bilgusI have splash scroller in lua that does a bit better
09:13:44***Saving seen data "./dancer.seen"
09:14:03_bilgusthat would be good enough but lua hides all that overhead in gobs of ram
09:15:41amachronicsplash_scroller is hardly a lot of overhead but it's ascii-only.
09:16:46amachronicall 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:40amachronicyou could call a callback for each outputted line
09:17:47amachroniclet the callback figure out how to store it
09:18:12amachronicthen a simple version which uses a char *lines[] array like splashf and splash_scroller do now.
09:20:29_bilgusits a can of worms
09:20:36amachronictr29 could be left for later :)
09:22:00amachronicwe're not doing it now so nobody will complain if we keep not doing it
09:27:42amachronic is for line breaking specifically
09:28:03_bilgusso wordwrapfn(char* str, int max_w, int(*cb)(char* str)
09:28:33amachronicyeah exactly but stick a void* userdata for the callback in there
09:28:43amachronicglobal variables are evil
09:29:23amachronicand also pass the strlen(str) to the callback because str might not be null terminated
09:30:06amachronicallowing str to be modifiable to add nulls will only add headaches later
09:33:37_bilguswordwrapfn(char* str, int len, int max_w, void (*cb)(void *userdata, int len))?
09:34:29amachronicwordwrapfn_ex(const char* str, int len, int max_w, void (*cb)(void *userdata, const char *str, int len), void *userdata)
09:35:23amachronic...that's why I suggested having a simple version too, implemented using the complicated version.
09:36:11amachronicdoing lambda functions in C sucks :(
09:36:27_bilgusstill how does the end user actually split the string if we don't modify the source string?
09:37:14amachronicthey have a (str, length) pair they can use
09:37:35amachronicif you allow the source to be modifiable you are generally imposing duplication of the string somehwere.
09:38:08amachronicyou can get around that when you know the string is always being constructed dynamically and can be thrown out word wrapping
09:38:49amachronici don't think there's a way to combine the modifiable string + non-modifiable string variants.
09:39:21amachronici would prefer non-modifiable string simply because it's often more composable
09:40:18_bilgusI'll have a play with this see what I come up with
09:40:41amachronicplus, if the callback doesn't need to store the string for later it can use it right away.
09:40:49amachronicavoiding storage overheads entirely
09:41:09_bilgusthat would be nice we have a lot of buffers lying around
09:44:09rb-bluebotBuild 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:08:43rb-bluebotBuild Server message: Build round completed after 1475 seconds.
10:08:47rb-bluebotBuild Server message: Revision 6e4c866756 result: All green
10:21:51 Quit amachronic (Quit: amachronic)
11:13:47***Saving seen data "./dancer.seen"
11:59:03 Quit massiveH (Quit: Leaving)
13:10:41 Join lebellium [0] (
13:13:51***Saving seen data "./dancer.seen"
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:13:58***Saving seen data "./dancer.seen"
17:30:51 Join freon [0] (
17:31:40freondoes the IDE controller in an ipod 3rd gen (pp5002) support LBA past 28 bits
17:37:50freonas in, >128GB
18:22:25hactar|anti've only ever tried with 64gb
18:37:29 Quit lebellium (Quit: Leaving)
19:14:00***Saving seen data "./dancer.seen"
19:21:43buZzfreon: i think i saw a 1TB ipod, but not sure what gen it was
20:54:59 Quit rasher (Ping timeout: 248 seconds)
20:55:07 Join rasher [0] (~rasher@user/rasher)
21:14:01***Saving seen data "./dancer.seen"
22:09:36 Quit Serke (Remote host closed the connection)
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] (
23:49:00 Join melmothX [0] (
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] (

Previous day | Next day