Category C

Playing around with tokenizers

Been playing around with Flex(http://flex.sourceforge.net/ ). It’s a Tokenizer (Lexical Analysis, http://en.wikipedia.org/wiki/Lexical_analysis ), ie, it splits strings into tokens to interpret them. You add a configuration file and get c-code (the „scanner“ – parser would be, at least looking at theoretical computer science), too much. Closely related and often used in conjunction is Bison.exe (http://www.gnu.org/software/bison/manual/bison.html), […]

CImg – a template based image processing lib – read source, not manuals!…

If you are doing image processing on non-standard hardware, you’re probably cross-compiling, or at least cross-developing. I, for myself, am writing image processing algorithms in almost “pure” C/C++ (I know the distinction, and am deliberately using that / to signify that I’m using non-Ansi C with some C++ methods, but seldom library functions), and porting […]

Long(64) to Int(32) in C/C++

Just for me because I need this as a snippet: int leftbits = (int)(longvar>> 32); gives you the left bits, and long tlong= ((longvar>> 32) << 32); int rightbits= (int)(longvar- tlong); gives you to right bits of a 64 bit number. Consider turning this into a macro or a function, but I’m not sure how […]

via SOAP! via SOAP!

If you haven’t seen it yet- watch this great and hilarious video (slightly NSFW): Microsoft allows you to communicate via SOAP! 🙂   For those of you who haven’t heard of SOAP,  a) the Wiki article and b) a quick explanation:  SOAP is a network protocol, you can send XML-based messages to Web Services. Web Services […]