3 ms·
FWIW, I'm working in C for my day job (and resisting calls to move up to C++), as my day job involves shuffling bytes around rather than particularly complex co
by alaricsp 17y ago
FWIW, I'm working in C for my day job (and resisting calls to move up to C++), as my day job involves shuffling bytes around rather than particularly complex code; it's ~20KLOC. Then we build the tools to manage it in Python with a bit of shell scripting here and there. However, I code Scheme in my spare time, and would do the lot in that if I didn't then have to justify training new developers in Scheme! C's the right tradeoff for commercially developing a high-performance database kernel, IMHO.
I've done plenty of C++ in past jobs... which is why my day job is in C :-)
- eru 17y agoIs there an easy way to shuffle bytes and bits in Scheme? I was quite delighted when I found Data.Binary (http://code.haskell.org/binary/ http://code.haskell.org/binary/) for Haskell.
- alaricsp 17y agoYes... sort of. SRFI-4 (http://srfi.schemers.org/srfi-4/srfi-4.html http://srfi.schemers.org/srfi-4/srfi-4.html) provides a standard interface for dealing with 'homogenous vectors' (eg, arrays of unboxed integers or floats), which is great for shuffling bytes. For bits, there's the usual bitwise-or and all that. However, both could be improved somewhat; what the Factor folks have done with their struct arrays is IMHO superier.