Category Archives: c++

The Ceedy World of Message Serialization

Look, I’ve been there too. First the project just prints debug information for a human in nice descriptive strings that are easy to understand. Then some tool needs to log a sensor value so the simple debug messages gain structure. Now your debug messages {{look like : this}}. This is …read more

Continue reading

Posted in c++, communication, cwpack, data encoding, Decode, decoding, encode, encoding, Engineering, jsmn, json, marshall, marshalling, messagepack, messaging, Microcontrollers, msgpack, nano-pb, Network Hacks, Original Art, protobuf, protocol, protocol buffers, schemafull, schemaless, wire protocol | Leave a comment

Writing Android Apps in C, no Java Required

Older Android devices can be had for a song, and in many cases are still packing considerable computational power. With built in networking, a battery, and a big touch screen, they could easily take the place of a Raspberry Pi and external display in many applications. As it so happens, …read more

Continue reading

Posted in android, Android Hacks, app development, c++, java, Software Development | Leave a comment

C#, The Language For All Platforms – Now Including Windows 3.11 And DOS

The Microsoft .NET framework has been with us in one form or another since the millennium, and though it has remained largely the preserve of the Microsoft universe, it has found its way since then through a variety of implementations to other platforms including MacOS and GNU/Linux. In Microsoft terms …read more

Continue reading

Posted in .NET, c++, dos, retrocomputing, software hacks, Win32, windows, Windows 3.11 | Leave a comment

Little Hex Tricks Make Little Displays a Little Easier

Depending on the device in hand and one’s temperament, bringing up a new part can be a frolic through the verdant fields of discovery or an endless slog through the grey marshes of defeat. One of the reasons we find ourselves sticking with tried and true parts we know well …read more

Continue reading

Posted in 7 segment, bit manipulation, bit twiddling, c++, computer hacks, excel, how-to, ISSI, led, Microcontrollers, registers, spreadsheet | Leave a comment

Asynchronous Routines for C

[Sandro Magi] noted that the async/await idiom has become more prevalent in programming recently. According to him, he first encountered it in C# but has found examples of it in JavaScript and Rust, too. The idea is simple: allow a function to return but come back later to complete something …read more

Continue reading

Posted in async, asynchronous, c++, protothreads, software hacks | Leave a comment

Linux Fu: Shell Scripts in C, C++, and Others

At first glance, it might not seem to make sense to write shell scripts in C/C++. After all, the whole point to a shell script is to knock out something quick and dirty. However, there are cases where you might want to write a quick C program to do something …read more

Continue reading

Posted in bash, c++, gcc, Hackaday Columns, linux, linux hacks, scripting, Skills | Leave a comment

Lambdas for C — Sort Of

A lot of programming languages these days feature lambda functions, or what I would be just as happy to call anonymous functions. Some people make a big deal out of these but the core idea is very simple. Sometimes you need a little snippet of code that you only need …read more

Continue reading

Posted in c++, Featured, gcc, lambda, lambda function, Original Art, Skills, software hacks | Leave a comment

Add Scripting To Your C++ Programs With ChaiScript

If you are writing a program that has a technical user base, it is a nice touch to make the program scriptable. In fact, you might want to do the hard work in a programming language and then use your scripting language to build out features. In theory, this should …read more

Continue reading

Posted in c++, script language, scripting, Software Development | Leave a comment

The No-CPU Computer Gets A C Compiler

C is the most perfect language and it will run on anything. It will even run on a computer without a CPU.

The computer in question here is the Gigatron, a fully-functional ‘home computer’ the likes of which you would find in the late 70s and early 80s, complete with …read more

Continue reading

Posted in c compiler, c++, classic hacks, gigatron, LCC | Leave a comment

A Compiler in Plain Text Also Plays Music

As a layperson reading about some branches of mathematics, it often seems like mathematicians are just people who really like to create and solve puzzles. And, knowing that computer science shares a lot of its fundamentals with mathematics, we can assume that most computer scientists are also puzzle-solvers as well. This latest project from [tom7] shows off his puzzle creating and solving skills with a readable file which is also a paper, which is also a compiler for C programs, which can also play music.

[tom7] started off with the instruction set for the Intel 8086 processor. Of the instructions …read more

Continue reading

Posted in 8086, c++, compiler, computer, computer hacks, computer science, instruction, intel, puzzle, readable | Leave a comment