IT, hacking, coding, software engineering and Unix

i++ vs ++i in a for loop in C

Is there any performance difference between i++ and ++i in a for loop in C? Let’s know! Prerequisites For the examples I used FreeBSD 12.1-RELEASE-p2 and its default C compiler (clang) version 8.0.1 Let’s go! Let’s write a simple code for the postfix increment: Compile it: cc -O0 inc.c, and then use objdump(1) to disassemble... » read more

In memory of Dennis Ritchie
In memory of Dennis Ritchie

I created the GitHub repo to save for our descendants the code written by Dennis Ritchie using GitHub Archive Program. At least, I hope so. I found it on Dennis Ritchie’s home page in Bell Labs.

How to use the FreeBSD code style in Emacs?

The recommended code style for FreeBSD source code described in the style(9) man page. In FILES section provided the Emacs Lisp file /usr/src/tools/tools/editing/freebsd.el with bsd function for using the recommended style. To use this function in Emacs open your Emacs init file and add the following code: Save the init file and (if you used... » read more

Whats is a Roughtime?

Roughtime is a new secure UDP-based time synchronization protocol. It intended to replace the NTP protocol. For more info, please, read the actual IETF draft: https://tools.ietf.org/html/draft-roughtime-aanchal-04.

Upcycle Windows 7

FSF published the petition to Microsoft to open the source code of Windows 7. If you support this initiative, please, sign the petition.

FreeBSD device drivers

Now I reading the greatest book “FreeBSD device drivers” by Joseph Kong. The book covers FreeBSD version 8, but now versions 12.1, 12.0 and 11.3 are actual (I use the version 12.1) and some code aren’t compile. For example, the pointless driver (section “Implementing sysctls, Part 1”, chapter 3 on page 41). Because I testing... » read more

pkg-config and OpenMotif

Hi all! I’m now learning how to develop Unix GUI applications using Motif Widget Toolkit. Later I’ll write a series of posts on this theme. But I noticed that in my OS (I use FreeBSD 12.1) don’t exists the pkg-config .pc file for this toolkit. So I wrote it using xt.pc as an example and... » read more