Blog

Written words that are often helpful

FindYOTTADB.cmake Example

Posted by chathaway on Aug. 22, 2018, 7:58 p.m.

To use libraries with CMake, its much easier if there is a package for it. Below is a script which can be used to locate YottaDB using CMake, and make it much easier to build with.

In your CMakeLists.txt, add:

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(YOTTADB REQUIRED)

In cmake/FindYOTTADB.cmake:

# This is free and unencumbered software released into the public domain.
# 
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means ...

Read more...


Using Eclipse with CMake Projects

Posted by chathaway on Aug. 9, 2018, 3:14 p.m.

For a long time, I was using the cmake CDT generator to make cmake projects. I started getting very strange errors in the most recent version of Eclipse, and stumbled upon this thread which explained the CDT generator was super old.

To do this with a modern Eclipse version, you basically want to:

  1. File -> New -> New C/C++ Project
  2. Select "Empty or Existing CMake Project"
  3. Uncheck "Use default location", and navigate to your project

Then things should magically work.

Pictures for those who need them:

Select New C/C++ Project

Uncheck

Read more...


Performance Testing: Threads vs. Processes

Posted by chathaway on April 22, 2018, 9:30 p.m.

Recently, I spotted a line in Distributed Systems: Principles and Paradigms that caught my interest because it ran counter to my understanding of thread performance on a Linux system.

Instead of using processes, an application can also be constructed such that different parts are executed by separate threads. Communication between those parts is entirely dealt with by using shared data. Thread switching can sometimes be done entirely in user space, although in other implementations, the kernel is aware of threads and schedules them. The effect can be a dramatic improvement in performance. (Tanenbaum, A. S., & Van Steen, M. (2007 ...

Read more...


Doing Elixir Development in Windows using Docker

Posted by chathaway on April 12, 2018, 2:23 a.m.

This guide documents the steps I took to setup my Elixir/Phoenix/Docker environment on my Windows 10 machine. It might be worth nothing that I'm running Windows 10 Educational, which includes the Hyper-V supervisor; this is required for Docker.

Install Docker

Rather than repeat stuff here: go search Google, and follow the official guide.

This will probably require a restart.

Setup a Dockerfile and docker-compose file

To get started, we need a Dockerfile to build the web host. In addition to elixir, we will need NodeJS and some extras. This should do it:

FROM elixir
ADD . /code
WORKDIR ...

Read more...


dex auto start search list

Posted by chathaway on March 29, 2018, 5:39 p.m.

This doesn't seem to be documented anywhere, but just a quick tadbit; the dex autostart program (https://github.com/jceb/dex) looks in:

  • $XDG_CONFIG_HOME/autostart or $HOME/.config/autostart
  • for dir in $XDG_CONFIG_DIRS; $dir/autostart or /etc/xdg/autostart/

For things to run. You can look for yourself at github link

Read more...


Getting Started with GT.M

Posted by chathaway on Jan. 24, 2018, 11:01 p.m.

GT.M is a high performance, NoSQL database coupled with a MUMPS runtime. In this guide, we will install it on a fresh Ubuntu system, verify that it works, and build a sample database.

Installing GT.M through the package manager

The easiest way to install GT.M is using the Ubuntu package manager; apt.

chathaway@blaze:~$ sudo apt install fis-gtm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fis-gtm-6.3-000a gcc-6-base icu-devtools libasan3 libatomic1 libc-dev-bin
  libc6 libc6-dbg libc6-dev libcilkrts5 libgcc-6-dev libicu-dev libitm1
  liblsan0 libmpx2 libquadmath0 libstdc++-6-dev libtsan0 libubsan0 ...

Read more...


arXiv, Arch Linux, biblatex, biber

Posted by chathaway on Nov. 24, 2017, 5:30 p.m.

For the first time in years, an update was published to the biblatex package. This is quite exciting, but presents a problem for those of us who use "bleeding edge" software, like Arch Linux, and need to submit our papers to sites like arXiv, which use more stable packages. This is a quick work around.

The Problem

At the time of writing, there is a new version of biber and a new version of biblatex on my Arch system, which produces a .bbl file a version of "2.9". arXiv emits an error message, informing me that the bbl was ...

Read more...


When Visiting India

Posted by chathaway on Oct. 1, 2017, 6:04 a.m.

  1. Do NOT plug an American power strip into the wall using an adapter; they power strip is made for 120 VAC, the wall outputs 240VAC, and cheap adapters just change the shape of the plug. It will go PZZT and the magic smoke will escape.
  2. DO bring toiler paper
  3. DO expect spicy food; it's delicious, but not what we eat in the US
  4. Dress well; button down shirts and blue jeans. When I was visiting, relatively few people wore t-shirts or other such garments

Read more...


Compiler Development 101

Posted by chathaway on Sept. 2, 2017, 9:33 p.m.

Many sites offer tutorials on how to use things like flex, bison, and LLVM. However, these sites give code examples, with no links to the source documentation. Below I explain what each of these tools does, and explain how to access the documentation (which, with the exception of LLVM, is fairly well written).

flex

Documentation can be accessed via "info flex" on a system with the flex-doc package installed. On ubuntu, run:

sudo apt install flex-doc
info flex

To get this documentation

A fast lexer, flex (https://github.com/westes/flex) reads an input stream and breaks into tokens. Tokens ...

Read more...


Using Git to files outside the repo

Posted by chathaway on Sept. 1, 2017, 1:29 a.m.

I decided that I wanted to keep a few files in my home directory in version control (.vimrc, .bashrc, .config/awesome), but don't like making that directory a git repo because then the shell prompts always say I'm in a branch. To fix this, I init'd a repo in my normal place then ran:

git config --local --add core.worktree $HOME

And now I can add things like "git add ~/.bashrc" without having to keep that repo in my home directory.

Huzzah!

Read more...



Page 1 of 4. next
Banner Image © 2017 Ranjani Hathaway | Content © 2017 Charles Hathaway PDF