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).

Notice: Only Gecko based browsers prior to FF4 support the multipart/mixed "server push" method used by this log reader to auto-update. Since you do not appear to use such a browser, this page will simply show the current log, and not automatically update.

#rockbox log for 2020-10-05

00:33:37***Saving seen data "./dancer.seen"
01:00
01:16:34 Join ZincAlloy [0] (~Adium@ip5f5acf9f.dynamic.kabel-deutschland.de)
01:21:18 Quit ZincAlloy (Ping timeout: 260 seconds)
01:29:29 Join ZincAlloy [0] (~Adium@2a02:8108:943f:d824:c436:684b:28bf:595a)
01:34:11 Quit ZincAlloy (Ping timeout: 272 seconds)
01:36:30_bilgus__not sure why I hadn't thought to paste a sentinel on the buffers lua allocs from before this point
02:00
02:07:14braewoods_bilgus__: you mean like prepending magic bytes to know what allocated it?
02:07:35_bilgus__yeah like we do to check stack depth
02:07:49braewoodsso make it part of the stack frame then?
02:08:00braewoodsthough i can't see that being relevant there
02:08:20braewoodsstack and dynamic memory are different beasts...
02:08:26_bilgus__no just filling the buffer with a sentinel and later grab how much is still clean
02:09:09braewoodsi see. so C string style sentinel?
02:09:23braewoodswhere 0 denotes the end
02:09:39_bilgus__lua doesn't do a very good job of letting you know how much memory you have free just what it has allocd currently
02:10:00_bilgus__nah no point in that just deadbeefdeadbeefdeadbeef
02:10:34braewoodswouldn't that be rather slow, requiring you to manually scan it every time?
02:11:31braewoodsIOW it sounds like you'd be setting every 4 bytes to that pattern or so
02:11:44braewoodssince i assume most of these targets have 4 byte pointers
02:12:18braewoodsi can't see most of them using 64 bit pointers
02:12:21braewoodsor arithmetic even
02:12:40_bilgus__its not much slower than querying the lua garbage collector about its status especially since we are doing it from c
02:12:48braewoodsI see.
02:13:19_bilgus__that c/lua line has a lot of overhead
02:13:31braewoodsif the maximum memory available to lua is fixed, couldn't you just find it from basic subtraction?
02:13:52_bilgus__sorta
02:14:04braewoodsbut that's not accurate enough?
02:14:20_bilgus__only problem is you don't know what lua has done with the buffer
02:14:44braewoodsso why does that matter?
02:14:46_bilgus__it might say it has 100kb allocated but it shit on 150 kb and left blocks too small to use
02:14:55braewoodsOh.
02:14:57braewoodsFragmentation.
02:15:17braewoodsthe perils of dynamic allocatin
02:15:21_bilgus__yes lua is terrible for fragging the whole thing
02:15:32braewoodsso you're trying to devise a method of defragging your free memory?
02:15:34_bilgus__thats why a high watermark is useful
02:16:11_bilgus__nah I've tried stuff like that but the overhead is such you are better off off loading your data and restarting lua
02:16:41braewoodsyea. dynamic memory is a pain.
02:16:56braewoodsconvenient to use but...
02:17:44braewoods_bilgus__: i wonder if pool allocators could be useful
02:18:04braewoodsthough i don't know if lua is compatible with hybrid allocation strategies
02:18:17_bilgus__thats what our alloc is doing on the back end
02:19:18_bilgus__tlsf
02:19:25braewoodstlsf?
02:19:32braewoodsthread local ... ?
02:19:54_bilgus__two level segregated fit
02:20:02braewoodsah. never heard of it.
02:20:11_bilgus__its pretty good
02:20:22_bilgus__not great but pretty good
02:20:25braewoodsi only know of 2 things starting ith TLS
02:20:27braewoodswith*
02:20:35braewoodsthread local storage
02:20:41braewoodstransport layer security
02:20:42braewoodslol
02:20:44_bilgus__http://www.gii.upv.es/tlsf/
02:22:01braewoodsi've always tried to minimize reliance on heap memory because it's better to use stack or static allocations if appropriate
02:22:23braewoodsbecause of the potentially unbounded size and such
02:22:28braewoodserr time
02:22:30braewoodsrather
02:22:46braewoodsbut i sometimes am stuck with it because of the nature of data structures
02:24:31_bilgus__well on embedded you kinda get stuck with that but damn if it doesn't make the code so much better
02:33:41***Saving seen data "./dancer.seen"
02:51:13braewoods_bilgus__: heh. of course if you got a shitload of RAM available... these concerns seem rather moot.
02:51:27braewoodsi usually forget about fragmentation when i have gigabytes of RAM
02:51:51_bilgus__yeah it does seem that way a lot now a days and I'm like 1GB for a text editor WTF
02:52:03braewoodsah, that's because of JS.
02:52:21_bilgus__no thats because of 1993 :p
02:53:09_bilgus__I just remember when a 4 megs was very expensiver
03:00
03:53:03 Quit livvy (Ping timeout: 240 seconds)
04:00
04:01:11 Join pamaury [0] (~pamaury@rockbox/developer/pamaury)
04:12:22 Quit pamaury (Ping timeout: 246 seconds)
04:33:43***Saving seen data "./dancer.seen"
04:59:50 Join pamaury [0] (~pamaury@maths.r-prg.net.univ-paris7.fr)
04:59:50 Quit pamaury (Changing host)
04:59:50 Join pamaury [0] (~pamaury@rockbox/developer/pamaury)
06:00
06:33:44***Saving seen data "./dancer.seen"
07:00
07:26:10 Join petur [0] (~petur@rockbox/developer/petur)
07:36:55speachydoes its internal malloc() combine adjaent freed areas?
07:37:07speachylua, I mean
07:52:40 Quit sakax (Remote host closed the connection)
08:00
08:08:53braewoodsone thing i learned awhile ago of interest about heap allocations...
08:09:04braewoodsthe minimum allocation unit is the alignment size
08:09:13braewoodsfor most systems i use that's 8 bytes so
08:09:24braewoodsanything less than that is wasting space
08:09:39braewoodsthe closer to a multiple of this you get the less waste
08:10:46braewoodsalso was useful when analyzing whether to store strings inline or externally
08:11:09braewoodsreally short C strings may be better off being inline to their struct if they're small
08:11:34braewoods<= 8 bytes
08:12:01braewoodsotherwise... you need to allocate at least 16 bytes. 8 for the pointer and a min of 8 for the actual array
08:12:14braewoodsso i guess it's more like length of 15
08:12:56braewoodsassuming each string is not referenced more than once
08:18:31braewoodsjust how malloc works since it has to guarantee what it returns it suitably aligned for anything
08:18:46braewoodswhether it's for pointers, doubles, or w/e
08:30:36speachyit's worse than that, actually −− you also have the internal heap allocator per-allocation overhead.
08:33:09speachyso you're really looking at a minimum of two pointers+length for overhead.
08:33:33 Join tbaxter [0] (~Adium@pool-100-34-20-58.phlapa.fios.verizon.net)
08:33:45***Saving seen data "./dancer.seen"
08:43:18speachy_bilgus__: Ingenic fixed the DMA engine in the X1000 series; it does per-descriptor interrupts so circular, double-buffered audio operation will work.
08:45:13speachyits newer mips32r2 core also has an actual priority-driven interrupt controller. Nowhere near as awesome as the ARM Cortex-M NVIC, but a vast improvement over its predecessor
08:51:30braewoodsspeachy: ah i was just looking at from the application POV.
08:51:50braewoodsabout how best to utilize available storage
08:52:03braewoodswhether to use an array or pointer to store it
08:52:11speachyrockbox is the application and the operating system, so we try to optimize the overall usage. :)
08:52:36braewoodsfor small allocations it can make more sense to inline them with a larger one
08:52:42braewoodsis something i noticed
08:52:58speachySince I got my start in the days dinosaurs walked the earth and men wore onions on their belts (as was the fashion at the time) I've written more allocators than I care to count
08:53:51speachyyep. when you have known, fixed allocation needs that don't need to beyond the scope of the immediate function...
09:00
09:15:44 Join massiveH [0] (~massiveH@ool-18e4e82f.dyn.optonline.net)
09:32:16 Join amiconn_ [0] (jens@rockbox/developer/amiconn)
09:32:17 Nick amiconn is now known as Guest85356 (jens@rockbox/developer/amiconn)
09:32:17 Quit Guest85356 (Killed (wolfe.freenode.net (Nickname regained by services)))
09:32:17 Nick amiconn_ is now known as amiconn (jens@rockbox/developer/amiconn)
09:33:23 Join pixelma_ [0] (marianne@rockbox/staff/pixelma)
09:33:24 Nick pixelma is now known as Guest56388 (marianne@rockbox/staff/pixelma)
09:33:24 Nick pixelma_ is now known as pixelma (marianne@rockbox/staff/pixelma)
09:33:55 Quit Guest56388 (Ping timeout: 240 seconds)
09:46:03 Nick Oksana_ is now known as Oksana (~Wikiwide@Maemo/community/ex-council/Wikiwide)
09:48:55braewoodsspeachy: the only allocators i've written were for dynamic structs.
09:49:14braewoodsspeachy: have you ever found a use for C99 FAMs?
09:49:19braewoodsflexible array members
09:49:32braewoodswhere the last field is an array with no specified size.
09:49:45braewoodsit has to be dynamically allocated due to being an incomplete type
09:50:02speachyI use that construct a lot, but I don't think it's commonly found in Rockbox.
09:50:21braewoodsok.
09:50:53braewoodsi've rarely used it since it made resizes more expensive to perform
09:51:02 Join amiconn_ [0] (jens@rockbox/developer/amiconn)
09:51:02 Nick amiconn is now known as Guest5204 (jens@rockbox/developer/amiconn)
09:51:02 Quit Guest5204 (Killed (rajaniemi.freenode.net (Nickname regained by services)))
09:51:02 Nick amiconn_ is now known as amiconn (jens@rockbox/developer/amiconn)
09:51:06braewoodsit only really made sense for fixed-size but variable allocations
09:51:14braewoodsallocate once and don't resize.
09:51:56braewoodsat least that was my theory anyway...
09:52:03 Join pixelma_ [0] (marianne@rockbox/staff/pixelma)
09:52:04 Nick pixelma is now known as Guest48385 (marianne@rockbox/staff/pixelma)
09:52:04 Nick pixelma_ is now known as pixelma (marianne@rockbox/staff/pixelma)
09:52:14braewoodsif i kept the array separate the amount to resize would be less but with large enough arrays it may be enough to be irrelevant
09:52:23speachy(oh, when I say "allocators" I'm referring to the likes of a malloc() implementation)
09:52:25 Quit Guest48385 (Ping timeout: 240 seconds)
09:52:34braewoodsspeachy: oh. i guess i meant constructors then.
09:52:43braewoodsmalloc wrappers or so
09:53:06speachyFAMs pretty much reuqire use of dynamic allocation when they're instantiated/constructed
09:53:39braewoodsspeachy: "pretty much"? try always. they can't be used any other way. lol
09:53:39speachybut the FAM structure is quite useful as an abstraction as part of an API where you don't necessarily know how many elements are in the array.
09:54:05braewoodsthe only way i could use that with the stack is if i used the non-standard alloca
09:54:35speachybraewoods: there are plenty of situations where the structure and the number of elements is known at compile time.
09:55:01braewoodsspeachy: well... you'd need to create a custom type for that and you wouldn't be using a FAM anymore, no?
09:55:13braewoodsunless you're talking about abusing type punning or so
09:55:23speachyso you can just say something like struct foo = { .numelem = 5, .elem[0] = ..., .elem[1] = ... } etc
09:56:14speachyyou can't use sizeof(struct foo) of course
09:56:18braewoodsdirect usage of a FAM though is impossible without dynamic allocation... otherwise you need to abuse type casting from a type that can be resolved at compile time
09:56:29braewoodsor something like that
09:57:08braewoodsi usually tried to avoid such trickery since it can create issues
09:57:09speachyan example of what I mean: https://git.shaftnet.org/cgit/selphy_print.git/tree/backend_common.h (line 261)
09:58:00speachyand statically instantiated at: https://git.shaftnet.org/cgit/selphy_print.git/tree/backend_mitsu70x.c line 2337
09:58:03braewoodsok... that can't be statically allocated as it is...
09:58:23braewoodshm.
09:58:40speachy(hmm, I should have made that a const struct..)
10:00
10:00:59speachyI don't use that FAM element as something that can be resized. (reallocating/resizing thigns is nearly always the wrong approach anyway)
10:01:31braewoodsspeachy: i stand corrected. i just assumed it couldn't work because most structures are fixed size...
10:01:43braewoodsi didn't know you could use it for a dynamic sized static table.
10:02:41speachyIf you don't know in advance how many elements are going to be needed, then yes, you'll need to dynamically allocate the structure, and you definitely can't rely on sizeof(...) :)
10:05:00braewoodsspeachy: int x <:50:>;
10:05:05braewoodsspeachy: valid C or not? :)
10:06:01speachyI don't think it's valid C<=99, at least. might be valid C++ though.
10:06:15braewoodsspeachy: it's valid C.
10:06:35braewoodsspeachy: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C
10:06:49braewoodsa useless and esoteric feature first introduced in ANSI C
10:07:19speachycan't say I've ever seen that construct before.
10:07:19braewoodsnot surprised you wouldn't know about it per say
10:07:31braewoodsspeachy: i only know about it because I read the entire ANSI C book
10:07:52braewoodskinda like how the 'auto' keyword is technically a keyword but virtually no one uses it
10:09:14braewoodsi've actually considered making a macro for it
10:09:18braewoods#define auto __auto_type
10:09:26braewoodsto get C++ type inference in GNU C
10:09:29braewoodslol
10:09:58braewoodsspeachy: how about...
10:10:03braewoodsspeachy: int x = (3, 4, 5);
10:10:08braewoodsspeachy: what value is x?
10:10:21speachy5.
10:10:25braewoodsCorrect.
10:10:42braewoodsThis is stuff i use to test beginners to C in #learnprogramming
10:10:43speachy(that sort of construct is quite often used in loop evaluations
10:10:58braewoodsthere's not many places you'd want to use the comma operator
10:11:03braewoodsnot many realize it's even an operator
10:11:12speachymy favorite C question is: what does '++*x++;' do?
10:11:47braewoodswell i know *x++ increments the pointer not the underlying value
10:11:59braewoodsif i had to guess
10:12:05braewoodsthough...
10:12:21braewoodsi wouldn't know honestly.
10:12:34speachyit's a trick question; the correct answer is "gaaah, don't do that!"
10:12:35braewoodsi hate mixing dereference with ++ or −−
10:12:45braewoodsdue to how weird the precedence is
10:12:58braewoodsi often use [0] instead of * just for my sanity if i'm doing anything complex
10:13:17braewoodssince []s have precedence that's more intuitive
10:13:38braewoodsto get the same with * you need to do
10:13:41braewoods(*x)
10:13:42braewoodsor so
10:14:24speachythe dereference is the highest precedence.
10:15:10braewoodsspeachy: eh? in my experience * is pretty low though... if it was highest I wouldn't need to use ()s
10:15:50braewoodsah.
10:15:53braewoods2nd highest
10:15:59braewoods[]s are in the highest group
10:16:22speachybut the ++
10:16:37braewoodswhich is why it increments the pointer prior to dereferencing
10:16:51speachybut yeah, that expression is a doozey
10:17:37braewoodsok, another esoteric feature question
10:17:46braewoodswhat's this: int (*x)[50];
10:18:08braewoodsi think that's the right syntax
10:19:31braewoodsyep it is
10:20:02braewoodsspeachy: for a more complete example: https://dpaste.com/D7JGV7MU5
10:20:18braewoodscan you name it now?
10:21:03speachyit's a pointer to a pointer.
10:21:12braewoodsno, it's a pointer to an array.
10:21:20braewoodsbelieve it or not those are different
10:21:21speachy(well, arrays are pointers)
10:21:54amdjarrays can be treated as pointers but that doesn't mean they are pointers.
10:21:55speachyif you'd left off the * it would still be a pointer.
10:22:36speachyit would just point to the first element of the array insted of pointing at the pointer to the first element of the array.
10:23:03braewoodspointers to arrays are a different language construct. the compiler considers them different at least.
10:23:13braewoodstrue arrays decay to pointers
10:23:18braewoodsbut this is different..
10:23:18speachy(ie; int x[50]; int *y = x ; int **z = x;)
10:23:43braewoodsthough in practice it's kinda useless
10:23:54braewoodsno one uses the pointer to array construct
10:23:54speachyas a static construct it is useless
10:23:55amdjthe declaration like that (`int (*x)[50]` vs `int **x') carries array type information. you can treat both objects the same way, but the compiler won't.
10:24:14braewoodsindeed.
10:26:44braewoodshere's one of my favorite weird constructs C99 introduced
10:26:46braewoodshttps://dpaste.com/5C78HRKR4
10:26:53braewoodsarray parameters
10:27:02amdjI like static.
10:27:05speachyI'm not a fan of using array types as part of an API.
10:27:07amdj(in parameter context)
10:27:21braewoodsamdj: what use does it serve? i've only ran into once in stack overflow
10:27:23braewoodsbut not in real code
10:27:50braewoodsall APIs i've seen still do
10:27:56braewoodsvoid* s, size_t n
10:27:58braewoodsor so
10:28:12amdjif you put it in your declaration (as opposed to just your definition −− if it's in the definition only, it has no effect, unless the function is internal to that compilation unit), it signals to callers that the argument must be non-null and be an array of at least that many elements.
10:28:38braewoodsdoes it produce meaningful compiler messages?
10:28:44amdjso e.g. static void foo(int a[static 4]) { } int main(void) { int a[] = { 1, 2, 3 }; foo(a); /* warning: callee requires at least 4 elements, only 3 passed */ }
10:29:28amdjI brought this up a few weeks ago on an unrelated article
10:29:31amdjhttps://news.ycombinator.com/item?id=24459119
10:29:31braewoodsare you sure about that? GCC doesn't seem to warn at all.
10:29:43braewoodsusing GCC 7
10:30:12amdjI only build with `clang -Weverything` (which actually does what that implies). gcc may need `-Wall -Wextra`.
10:30:23amdj(which still doesn't enable all diagnostics)
10:30:42speachy... and also an appropriate -std=...
10:30:54amdjclang and gcc default to C99 these days unless you have some ancient version.
10:31:00amdjGCC 10 defaults to C11 I think.
10:31:43braewoodsnothing on gcc 7
10:31:46braewoodsi'll try Focal
10:32:57braewoodsjust uh thought the construct was useless since no warnings were ever produced
10:33:16amdjyeah looks like gcc doesn't diagnose it.
10:33:17amdjthat's annoying.
10:33:34amdjhttps://paste.debian.net/plainh/387d8d9d
10:33:48***Saving seen data "./dancer.seen"
10:34:03amdj(gcc 9)
10:34:09amdj10 might do it. I don't have it.
10:34:20braewoodsyou use debian?
10:34:27amdjlinux mint
10:34:31braewoodsthe debian edition?
10:34:34amdjno
10:34:34braewoodsor the regular?
10:34:41braewoodsok.
10:34:43amdjI have gcc-10 package
10:34:45amdjtrying that now
10:35:12amdjaaron@tornado:~$ gcc-10 -Wall -Wextra -Wpedantic demo.c -o demo
10:35:12amdjaaron@tornado:~$
10:35:12amdjnada.
10:35:16amdjhow useless.
10:35:19 Quit massiveH (Quit: Leaving)
10:35:23amdjlesson learned: just use clang.
10:35:23braewoodsweird.
10:35:40braewoodsi still prefer gcc but for some features...
10:35:45braewoodsit seems clang is better
10:36:00amdjworks even without any -W
10:36:13braewoodsapparently -Warray-bounds works differently
10:36:15amdjhttps://paste.debian.net/plainh/27a917b6
10:37:17amdjso anyway if you write some function that iterates over an array at least n times or writes at least n elements to an array argument, declaring it [static n] signals to the compiler to diagnose when it detects that a too-small array is passed, which can compile-time catch some things that would be a run-time buffer overrun.
10:37:39amdj(even across compilation units)
10:37:49amdj(and without LTO)
10:38:59braewoodsseems it was fixed...
10:39:01braewoodsin GCC 11
10:39:04braewoodshttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584
10:39:19amdjit also signals that the array argument should never be null which means the optimiser can elide a if (arg == NULL) { } branch.
10:39:32amdjwhether you consider this a feature or not is up to you ...
10:39:45braewoodsi can see one obvious use...
10:39:54braewoodsdeclaring what kind of pointer you're wanting
10:40:00braewoodsin terms of
10:40:09braewoodsnumber of elements and that it is non-null
10:40:16amdjyes it does that.
10:40:24braewoodse.g.,
10:40:28braewoodsint arr[static 1]
10:40:40amdjso for example as opposed to __attribute__((__nonnull__)) you can use ..... yes that instead of `int *arr'
10:40:53braewoodsand it's standard
10:40:55braewoodsso
10:41:01braewoodsno extensions required
10:41:04amdjwell gcc and clang both support the nonnull attribute.
10:41:08braewoodsindeed
10:41:11braewoodsbut in theory
10:41:13braewoodsportable
10:41:18braewoodsmore portable
10:41:27braewoodsi prefer standard features whenever possible myself
10:41:43braewoodsif you later need to port to a different compiler
10:41:46braewoodsit can make your life a lot easier
10:41:50amdjclang supports some pretty fantastic function attributes
10:42:01braewoodsthough i can't see anyone needing to use anything besides gcc / clang
10:42:06braewoodsespecially in C land
10:42:14braewoodslast I checked MSVC sucks at C anyway
10:42:22braewoodsthey prefer to focus on C++
10:42:34speachyisn't the current iteration of MSVC++ now an LLVM wrapper anyway?
10:42:39braewoodsno idea
10:42:44braewoodsif it is, why do they bother?
10:42:48amdjstatic void foo(int a)__attribute__((__diagnose_if__(!a, "bar", "error"))); /* ... */ int main(void) { foo(NULL); } -> error: bar (compilation terminated)
10:43:03amdj(clang only)
10:43:16speachybackwards compatibility with their cmdline syntax and "features"
10:43:29braewoodsspeachy: have you tried C99 variadic macros?
10:43:39braewoodsi've found them useful for replacing some types of variadic functions
10:43:46speachyyep, pretty sure we use them in rockbox too
10:44:14braewoodsi wrote a few hacks to use thm
10:44:18braewoodsthem
10:44:34braewoodslike a macro that counts the number of variable arguments you pass
10:44:45braewoodsit could support up to 63 arguments since the standard guarantees up to 127
10:45:51braewoodsit was an alternative to needing a sentinel value to terminate the argument list I had turned into an array thanks to compound literals
10:46:13braewoodsinstead i could pass the size eliminating the need for sentinel values
10:46:15speachyI try not to be terribly clever in my code constructs.
10:46:19braewoodslol
10:46:23braewoodsi understand
10:46:29speachybecasuse I'm by definition not going to be clever enough to debug them.
10:46:40braewoodsi just thought it was impressive what you could do with the CPP
10:46:56braewoodshow many layers of macro hacks you need to get certain stuff done
10:47:23amdjgcc's preprocessor is turing complete :)
10:47:24braewoodsP99 is amusing but i could never use it in a project.
10:47:33braewoodsQPL is a bad license
10:48:25 Quit kugel (Ping timeout: 240 seconds)
10:48:56braewoodsoh
10:49:00braewoodsthey've relicensed it
10:49:02braewoodsto Apache
10:51:33 Join kugel [0] (~kugel@ip5b40d8e6.dynamic.kabel-deutschland.de)
10:51:33 Quit kugel (Changing host)
10:51:33 Join kugel [0] (~kugel@rockbox/developer/kugel)
10:53:56amdjsorry, meant `int *a' in my example above. missed the *
10:54:19amdjthat would still work out though along with a diagnostic for converting a pointer to an integer.
10:58:13braewoodsamdj: lol. if i use '&' to get a pointer to a scalar the array check doesn't even run.
10:59:17braewoodsapparently pointers don't get checked
10:59:23braewoodsonly if it was an actual array
10:59:46amdjyeah but that just goes back to the whole "arrays aren't actually pointers" thing
10:59:53braewoodsindeed but in practice
11:00
11:00:06braewoodsa pointer to a scalar is no different from an array of 1 element
11:00:29braewoodsjust amusing more than anything i guess
11:00:36amdj:)
11:00:44braewoodsto use this i'd basically have to use an array for everything
11:01:05braewoodswhich is impractical... dynamic arrays always accessed through a pointer
11:01:24braewoodsso yea
11:01:27braewoodslimited utility
11:01:45braewoodsseems mainly useful for when you're writing to a fixed size array
11:01:52braewoodsof up to a certain size
11:02:05braewoodsi rarely need to do that
11:02:20braewoodsno wonder i never see this in real code
11:02:45amdjyeah, like, if you're writing a function to hash something, then you would want it to be e.g. [static 32] for SHA2-256. because if you pass a smaller buffer it will blow up. or run towers of hanoi. or any other undefined behaviour. so you'd want a diagnostic if you pass an unsigned char[20].
11:05:48 Quit petur (Quit: Connection reset by beer)
11:06:08amdj(if you don't get the reference: https://feross.org/gcc-ownage/ )
11:08:23amdja lot of people don't know you can also include all the other qualifiers inside the [] as well
11:08:31amdje.g. static void foo(int a[const restrict static 5])
11:08:47braewoods...
11:08:57braewoodsseriously? restrict isn't even valid for non-pointer types...
11:09:15amdjyeah but arrays as function parameters decay to pointers as I'm sure you know.
11:09:28braewoodsbut in that context it looks like it applies to the 5
11:09:39braewoodsnormally restrict is applied to the type
11:09:44braewoodsnot inside []s
11:10:04braewoodsfor that matter almost no one uses restrict either
11:10:13braewoodsthen again i can't see many places where it's useful
11:10:20amdjnah, in *practice* static void foo(int *restrict a, int *restrict b) is equivalent to static void foo(int a[restrict 1], int b[restrict 1])
11:10:49amdjI guess you could even take the 1 out.
11:11:22amdjlikewise static void foo(int a[const 1]) is in practice the same as static void foo(int *const a)
11:12:02braewoodsbut very few people use []s in array parameters
11:12:09braewoodssince they decay to pointers in most contexts
11:12:15amdjyou just get diagnostics for the array variety if you pass other sized arrays (again going back to how the compiler treats array declarations differently to pointers)
11:12:20braewoodsstatic is the only case where the compiler actually cares
11:12:28braewoodsthat i can tell
11:13:40amdjmagical funtime useless totally over-the-top edition: static void foo(int a[volatile const restrict static 5])
11:13:51amdj:D
11:16:44amdj(if you don't believe me: https://paste.debian.net/plainh/a6cdbe79 )
11:18:16amdjyeah not every qualifier will have an effect (e.g. restrict does nothing here because there's only one function parameter anyway) but they're all legal.
11:19:47amdjI guess it might be nice to get diagnostics for unused qualifiers ...
11:20:05braewoods_Generic is pretty fun
11:20:15braewoodsit has potential
11:20:29braewoodsbut PITA at times...
11:20:43braewoodsmakes me feel like it was intended to be used with some kind of generated headers
11:20:56braewoodse.g., to simulate overloading
11:21:07amdjI haven't played around with generics
11:21:27braewoodsit basically lets you return some type of value at compile time based on the type of an expression
11:21:36braewoodsit can be nearly anything
11:21:53braewoodsintegers (maybe mapping types to an enum)
11:22:08braewoodsstring literals too
11:22:17_bilgus__speachy lua doesn't use its own alloc it uses the implementation on device and yes pretty sure TLSF does some pooling but I'm not sure how sophisticated it is
11:22:57braewoodsbut i mainly see it used to map the type to the appropriate functions
11:23:26braewoodssince you can use it to choose a function by name
11:23:35braewoodsand then reconstruct the function call
11:23:41braewoodsvia macro substitution
11:28:28 Part bonfire ("Leaving")
11:52:20 Join livvy [0] (~livvy@gateway/tor-sasl/livvy)
12:00
12:01:28fs-bluebot_Build Server message: New build round started. Revision ef34126, 282 builds, 9 clients.
12:05:01 Join ZincAlloy [0] (~Adium@ip5f5acf9f.dynamic.kabel-deutschland.de)
12:09:25 Quit ZincAlloy (Ping timeout: 240 seconds)
12:12:15 Join _bilgus_ [0] (~bilgus@2605:a000:1301:89f6:1809:d12b:b118:9706)
12:13:38 Quit _bilgus__ (Ping timeout: 256 seconds)
12:14:28 Quit pamaury (Quit: Konversation terminated!)
12:16:22fs-bluebot_Build Server message: Build round completed after 895 seconds.
12:16:26fs-bluebot_Build Server message: Revision ef34126 result: All green
12:17:56 Join ZincAlloy [0] (~Adium@2a02:8108:943f:d824:7813:762c:b17e:d8ff)
12:22:43 Quit ZincAlloy (Ping timeout: 272 seconds)
12:23:11 Quit _bilgus_ (Remote host closed the connection)
12:25:08 Join _bilgus_ [0] (~bilgus@2605:a000:1301:89f6:1809:d12b:b118:9706)
12:33:49***Saving seen data "./dancer.seen"
12:40:43 Join MrZeus_ [0] (~MrZeus@2a02:c7f:70d0:6a00:fd9f:639a:c778:bcc1)
12:43:27 Join ZincAlloy [0] (~Adium@2a02:8108:943f:d824:759a:33c4:8b4:3a09)
12:55:38 Join sakax [0] (~r0b0t@unaffiliated/r0b0t)
13:00
13:17:29 Join lebellium [0] (~lebellium@89-92-69-66.hfc.dyn.abo.bbox.fr)
13:43:02 Quit logbot (Remote host closed the connection)
13:54:03 Join petur [0] (~petur@rockbox/developer/petur)
14:00
14:23:34speachyThe pine64 conversaion progressed further, btw. They're going to see if there's an existing case design they can purchase/reuse, and see what happens from there.
14:33:53***Saving seen data "./dancer.seen"
14:46:59_bilgus_cool with buttons?!
14:47:20speachywasn't explicitly stated but yes, I believe so.
14:50:05speachyfull conversation so far: www.shaftnet.org/~pizza/rb-p64.mbox
14:54:23 Quit asaba (Quit: Relay server offline)
14:54:46 Join asaba [0] (~asaba@103.113.159.184)
15:00
15:22:44_bilgus_sounds juicy :)
15:32:39speachyI'm cautiously optimistic. The odds are good they'll be able to source a suitable case. My main concern is that we'll end up with vast overkill for a SoC.
15:34:09speachyPersonally I'd prefer a modern MCU with a few megs of external DRAM over a multicore Cortex-A SoC with a couple hundred megs of DRAM. Though the latter is likely to be cheaper.
15:37:16speachythe overall HW design in that series of Zishan DSD players would be perfect; it only needs a couple of extra buttons and to swap that CPLD with external DRAM.
15:42:01 Nick mendelmunkis is now known as mendel_munkis (~mendelmun@65-128-170-32.mpls.qwest.net)
15:42:49mendel_munkisin theory I would love to help write that port, in practice I would probably cause more bugs than I fixed.
15:42:54 Join pamaury [0] (~pamaury@rockbox/developer/pamaury)
16:00
16:07:23 Quit livvy (Ping timeout: 240 seconds)
16:18:39 Join MrZeus__ [0] (~MrZeus@2a02:c7f:70d0:6a00:fd9f:639a:c778:bcc1)
16:23:28 Join tobbez_ [0] (tobbez@sagiri.wrya.net)
16:25:55 Quit sh4 (Ping timeout: 244 seconds)
16:25:55 Quit MrZeus_ (Ping timeout: 244 seconds)
16:25:55 Quit tobbez (Ping timeout: 244 seconds)
16:25:55 Quit ecs (Ping timeout: 244 seconds)
16:25:55 Nick tobbez_ is now known as tobbez (tobbez@sagiri.wrya.net)
16:26:34 Join ecs [0] (esawady@d2evs.net)
16:30:23 Join sh4 [0] (shapeless@unaffiliated/sh4)
16:33:56***Saving seen data "./dancer.seen"
17:00
17:10:55speachy_bilgus_: here's my rough list of desired HW features in a Rockbox DAP: http://www.shaftnet.org/~pizza/rb-wishlist.txt
17:11:11speachysuggestions/corrections/alterations welcome.
17:11:44mendel_munkisSpeachy: the first correction is not to 404.
17:12:09speachymoved into place, d'oh
17:17:43mendel_munkishas there been any work on bare metal bluetooth support?
17:17:43 Quit lebellium (Quit: Leaving)
17:18:21speachyno, because we have no suitable hardware platform for it.
17:19:05speachy(I'd like a native X1000 port to the Rocker/X3ii/etc, after which a native BT stack port would be worth undertaking)
17:19:16mendel_munkisI didn't think so.
17:22:04mendel_munkisYou say more than 64mb ram is wasted on a bare metal port. I once or twice hit ram exhaustion on Fuze+
17:23:10speachy... playing games or otherwise mucking about with plugins, I presume?
17:23:29mendel_munkisof course.
17:23:53speachyI mean, all else being equal more is better, but these MCUs tend to use older RAM types which are physically larger and more power hungry than more modern options.
17:23:53mendel_munkisI just think that a end user can be expected to use up to 128M
17:24:25speachyie double the RAM, it's going to have a noticable impact on size/price/battery life
17:26:40speachythe max depends on the exact MCU and memory controller, but I think the largest SDRAM part one can get is 512MBit (ie 64MB)
17:28:16speachyand if you try to shove two of 'em on there you're probably going to find it overall cheaper to use a DDR-capable "full CPU" SoC.
17:29:25mendel_munkismaybe I'm wrong. I don't know too many people who use rockbox and my build is heavily modified so something could have been sucking ram without my realizing
17:30:57speachy(I'd be shocked if the X1000E that has 64MB embedded into the package costs more than a high-end STM32F7 with 64MB SDRAM)
17:33:12speachythat 64MB SDRAM alone is $13.54 by itself.
17:33:51speachy(whereas the same thing in DDR2 is $5.41)
17:37:20speachyand what I think is the minimal STM32H7 part to drive what I'd want is $6.84.
17:38:59speachy(in large quantities the prices will go down, but nearly $20 for your MCU + RAM starts you off in a shitty position.
17:39:07mendel_munkisIf it's actually cheaper to get a better processor why go with a lower end one?
17:39:08 Quit MrZeus__ (Read error: Connection reset by peer)
17:39:28speachy(in 2500K quantities, you're looking at ~$13.50 for the pair)
17:39:55speachysoftware complexity, lack of hardware peripherals that do what you want, etc
17:40:37 Join MrZeus__ [0] (~MrZeus@90.203.212.4)
17:40:48mendel_munkisI guess I'll leave the design to people who actually have some clue what they are doing.
17:41:37speachyone of the reason the ingenic parts were so widely used is they embedded the DRAM into the package, enabling smaller pincount and PCBs.
17:41:46 Join ac_laptop [0] (~ac_laptop@186.2.247.129)
17:42:36speachywe don't truly need realtime performance, but consider the overall system responsiveness of the Rocker vs the X3ii. The latter is half the raw speed yet is far more responsive and capable.
17:42:58speachy(mostly due to really crappy OS integration and overhead in the former)
17:50:25 Quit sakax (Quit: Leaving)
18:00
18:00:43speachygoing through this exercise pretty much demonstrates that an MCU-based platform isn't economically viable.
18:01:43speachy(general-purpose MCU, that is. the various ASICs like the PPs or the AS3525 technically had pretty-high-end MCUs in them..)
18:10:31 Quit ZincAlloy (Quit: Leaving.)
18:13:26speachy_bilgus_: BTW, I don't know if I mentioned it but the Rocker is on its way to you. Post office said it will be there by Thursday.
18:18:37genevinofwiw don't start playing the untangle game on rockbox, it's highly addictive.
18:19:24genevino:)
18:24:25 Quit pamaury (Ping timeout: 240 seconds)
18:25:04 Join pamaury [0] (~pamaury@rockbox/developer/pamaury)
18:29:17 Quit petur (Quit: Leaving)
18:33:05 Quit pamaury (Ping timeout: 240 seconds)
18:33:59***Saving seen data "./dancer.seen"
18:54:57fs-bluebot_Build Server message: New build round started. Revision c6f66cf, 282 builds, 9 clients.
19:00
19:10:30fs-bluebot_Build Server message: Build round completed after 932 seconds.
19:10:44fs-bluebot_Build Server message: Revision c6f66cf result: All green
19:10:45fs-bluebot_Build Server message: New build round started. Revision 914114f, 282 builds, 9 clients.
19:23:50fs-bluebot_Build Server message: Build round completed after 786 seconds.
19:23:51fs-bluebot_Build Server message: Revision 914114f result: All green
19:34:08 Join bluebrother [0] (~dom@rockbox/developer/bluebrother)
19:35:23 Join fs-bluebot [0] (~fs-bluebo@55d418c6.access.ecotel.net)
19:37:24 Quit bluebrother^ (Ping timeout: 260 seconds)
19:37:25 Quit fs-bluebot_ (Ping timeout: 240 seconds)
19:41:07_bilgus_speachy I'll ask my mom to keep her eye out for it probably grab it sunday then
19:41:45speachytweaked the WPS keymap a little just now
19:42:06speachytbh the whole keymap really should be gone over. I'd intended to do that as part of the manual update
19:42:31speachybut for some reason I keep getting distracted with new hardware and their bugs..
19:49:54braewoodsspeachy: https://assets.amuniversal.com/e55eaa906d5001301d7a001dd8b71c47
19:49:55braewoodslol
19:50:54_bilgus_speach looks good at first glance at least hardware wise
19:56:29__builtingenevino: hehe :)
19:57:01__builtinthat one and cube are my favorites
20:00
20:13:30*__builtin has been meaning to clean up that SDL2 port eventually
20:13:56__builtinalthough my free time has all but dried up recently...
20:15:31braewoods__builtin: what's the benefit of SDL2 port?
20:15:47braewoodsmost of the time it's used for desktop stuff so...
20:16:03braewoodsbut why would i want to use rockbox there when there's plenty of native players?
20:16:38__builtinSDL is nice to quickly port over PC software
20:16:49__builtinwe have an SDL1.2 port that hosts Quake, Duke3D and Wolf3D
20:16:56__builtinbut most recent stuff runs on SDL2
20:17:20__builtin(I'm specifically looking at a port of SDLPoP, a prince of persia remake)
20:17:54__builtinalso, porting SDL2 was surprisingly easy because I'd already worked out most of the kinks with SDL1.2
20:19:01__builting#2634 if you're interested
20:19:58__builtinI've gotten SDLPoP to boot and start gameplay, but something's locking up at that point
20:22:28braewoodsi see
20:24:11 Quit MrZeus__ (Ping timeout: 240 seconds)
20:34:02***Saving seen data "./dancer.seen"
20:37:12speachy__builtin: what target?
20:37:25*braewoods paints a bullseye on the wall.
20:37:28braewoods"That target!"
20:37:37_bilgus_speachy re 2808 I'd as soon put it in the context menu
20:38:25speachy_bilgus_: pitch adjustment is already in the context menu
20:39:19speachy__builtin: well, there's your problem, you're trying to run PoP on a target that can't fight back
20:39:51braewoodslol
20:40:09__builtinipod6g
20:40:24__builtinI've only really tested sdl on the 6g, too
20:40:26speachyrestructured the wishlist a bit, added physical sizing and more comments
20:41:00mendel_munkisdoesn't bluebot usually callout gerrit links?
20:41:11__builtinit's supposed to
20:41:19braewoodsmaybe it's feeling blue today
20:41:22speachywish I could find pricing info on the ingenic SoCs.
20:41:36speachybluebot hasn't called this stuff out for at least a few days now
21:00
21:39:15_bilgus_-Weeks-
21:39:44_bilgus_well going on to weeks its been a little over a week
21:41:37 Quit kugel (Ping timeout: 264 seconds)
21:44:24 Join kugel [0] (~kugel@rockbox/developer/kugel)
21:53:57 Quit CommunistWitchDr (Quit: Fuck this, I'm out)
21:55:42 Join CommunistWitchDr [0] (quassel@024-217-039-226.res.spectrum.com)
22:00
22:34:05***Saving seen data "./dancer.seen"
22:36:11 Quit kugel (Ping timeout: 260 seconds)
22:49:01 Join kugel [0] (~kugel@ip5b40d8e6.dynamic.kabel-deutschland.de)
22:49:01 Quit kugel (Changing host)
22:49:01 Join kugel [0] (~kugel@rockbox/developer/kugel)
22:52:13 Quit ac_laptop (Ping timeout: 260 seconds)
22:55:52 Quit kugel (Ping timeout: 246 seconds)
22:59:22 Join kugel [0] (~kugel@ip5b40d8e6.dynamic.kabel-deutschland.de)
22:59:22 Quit kugel (Changing host)
22:59:22 Join kugel [0] (~kugel@rockbox/developer/kugel)
22:59:40speachy%#%#.. the Hifiwalker H2 purchase didn't go thorugh. But I found another seller that has three of 'em for only $50.
23:00
23:00:41speachy(2 available now, heh.. another has a open box model for $100, and still shrinkwrapped they're easy to find for $120.
23:05:55 Quit TheSeven (Ping timeout: 240 seconds)
23:06:16 Join TheSeven [0] (~quassel@rockbox/developer/TheSeven)
23:26:56 Quit kugel (Ping timeout: 258 seconds)
23:28:55 Join kugel [0] (~kugel@ip5b40d8e6.dynamic.kabel-deutschland.de)
23:28:55 Quit kugel (Changing host)
23:28:55 Join kugel [0] (~kugel@rockbox/developer/kugel)
23:29:10 Quit t0mato (Quit: Ping timeout (120 seconds))
23:40:30 Join t0mato [0] (~t0mato@193.32.127.158)

Previous day | Next day