Newsletter # 8 - Making a C library available in Swift using the Swift Package Manager Nov 8 2019

Hello,

So glad that the weekend is here, time to relax. I found this post that you might find interesting. It is about the reason that 80x25 became the standard display.

There are many things we do out of habit and end up forgetting why we started doing them in the first place. One example in my case is that I try to always keep my commit messages in under 72 characters per line. I don't claim to be 70 years old and got used to it by using IBM's 3270. What happened is that I read this Tpope's article on writing good git commit messages, where he explains the reason why 72 characters per line is the ideal. The relevant reason is this:

1
git log doesn’t do any special special wrapping of the commit messages. With the default pager of less -S, this means your paragraphs flow far off the edge of the screen, making them difficult to read. On an 80 column terminal, if we subtract 4 columns for the indent on the left and 4 more for symmetry on the right, we’re left with 72 columns.

Ha! see, again 80 column terminal. Now we can go full circle and know why the 80 column terminal became so popular. That made my week :)

This week's post was about making a C library available to Swift using the Swift Package Manager. This method is quite useful. You can make any system library accessible to Swift using it. I also show an example using SQLite3 (a small Data Base Manager contained in a C-Library). If you want to learn more, you can find the article here:

https://rderik.com/blog/making-a-c-library-available-in-swift-using-the-swift-package/

Ok, that's it for this week. Enjoy your weekend.

Derik

Tip of the week

I wrote this tip a long time ago, but I still find it useful, so sharing it again.

To keep your bash history clean, you can make use of the HISTIGNORE environment variable.

This is my current setting:

1
export HISTIGNORE="history:ls:[bf]g:exit:pwd:clear:cd -:vi:[ \t]*"

I list the commands I want my history command to store in the .bash_history file. In my case:

You can define your own rules to keep your history files smaller :).


** If you want to check what else I'm currently doing, be sure to follow me on twitter @rderik or subscribe to the newsletter. If you want to send me a direct message, you can send it to derik@rderik.com.