532 karma · joined March 13, 2016
Realtime forces people write less, writing only what actually matters, and all this in my opinion helps people to be better engineers (in-a-way). I just wish it looked more attractable for people - hacking your way out in time/resources constrained systems (like MCU's for example) can be as fun as hacking html/js to make your site behave as you want.
And another to be honest, very few programs on desktops/mobile are actually checking return values of malloc/calloc, because of amount of data that program operates is usually much smaller than amount of RAM available. It's sure a case for embedded, but you simply usually don't use malloc for embedded.
Indeed phone/desktop market might move to more one-chip-for-everything solution, but even then we need glue-ish logic to control something like screen backlight DC-DC converters, charging IC's, etc, which is much more easier done from FPGA/CPLD-like devices. On the other hand FPGA/CPLD's are essential in some classes of devices, for example test instruments: modern oscilloscopes usually have 3+ FPGA's in them, companies like Keysight usually only run custom ASIC's when they hit limitation of current silicon tech, like their N2802A 25GHz active probe (starting from 23500$) uses amplifier IC made with indium phosphide process (InP), which is kinda far away from whatever current consumer product companies are doing, you can check the teardown of this beast here https://www.youtube.com/watch?v=jnFZR7UsIPE
So in my opinion FPGA/CPLD market will live long and strong, players might change, but demand is enormous. The only problem in my opinion is that whole market is more B2B-like (FPGA's are usually just a humble IC's inside end customers products, you don't see stickers "Altera inside" or anything on products themselves), so it's kinda hard to get grasp what's going on.
For example I recently replaced libjpeg and libpng with one stb_image.h, it reduced 100kb of executable size, improved image loading speed by around 2x, reduced crashes on invalid image data for about 30% (we use american fuzzy lop fuzzer for testing).
> Many of the low level libraries in OS X and iOS are written in plain C for speed and simplicity.
And don't forget that OSX/iOS are based on Darwin BSD, where most of heavy lifting is done by programs written in C.
- [1] https://developer.apple.com/library/mac/documentation/String...
On OS X if OBJC_OLD_DISPATCH_PROTOTYPES is not defined, you will get this declaration with zero arguments: void objc_msgSend(void /* id self, SEL op, ... */ ), which is possible to call from C without cast by using implicit function declaration, but this call will fail if compiled as Objective-C code with error "too many arguments to function call", I've decided to write in a style that compiles as C and Objective-C code.
PS. Would be nice to be able to use functions from clang Objective-C runtime [1], but for some reason they are not exposed in the public headers.
- [1] http://clang.llvm.org/docs/AutomaticReferenceCounting.html#r...
> Files are represented by strings
I think it's especially true for make - looks like it was designed to efficiently express operations for transformations of the same type (like .cpp -> .o/.obj). So in different use case it may become a bit clumsy to use. Ninja should help a bit in this case - you can define a rule, and just use rule name when defining inputs and outputs of a build statement, though it still operates on files.
>[Problems with] combinatorial dependencies
Yes, partially this could be fixed with wildcards in make. Ninja doesn't have wildcard support, so I've created the buildfox [1] to fix it :)
>Non-representable dependency structures
I think it's a limitation of this type of build systems, their configuration language oriented on expressing "how" to achieve things, not "what" to achieve.
- [1] https://ninja-build.org/ - [2] https://travis-ci.org/ - [3] https://www.incredibuild.com/ - [4] http://fastbuild.org/ - [5] https://github.com/distcc/distcc
That said, I honestly don't understand why everyone only talks about GC and malloc+free abstractions, because they simply do not materialize in physical world at all (even if malloc needs a new page, it will call kernel for it), cpu/kernel do not have such mechanisms, so this is only abstract limitation in developers heads. So why not just talk (if we actually end-up in situation when we need to talk about memory, 'cause usually it's just work) and measure about what's actually real?
Edit: configuration-as-code feature is available in jenkins 1.x with job dsl plugin [1], I'm using it at work, because managing 50+ jobs by hand was just insane. Nowadays we just have few dsl files :)
[1] https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin
[1]: http://www.fmod.org/ [2]: https://github.com/fmod/ue4integration/blob/master/FMODStudi...