User Tools

Site Tools


blog:spring2016:ahoover3:journal

This is an old revision of the document!


HPC Experience ][ Journal

January 29th, 2016

Today, Chris and I humored the idea and checked out the possibility of coding an application for the Leap Motion. We share an idea for gesture control on computers for a more user-friendly control experience. The Leap Motion is a simple device that has an array of 3 infrared cameras. this allows it to see a large spectrum above the desk in front of the computer. It is small and compact, and is perfect for our needs on this project. Next Monday, I plan to begin setup and download the necessary sdk files, which they provide for free for developers online.

February 1st, 2016

New month, new things brewing. Today I began the installation and setup of the Leap Motion and its sdk. The sdk gives helpful example codes and libraries that will help with the understanding of how to code and use the data that the leap motion collects in order to provide output. I have decided to use javascript to code what I want, since I would like to learn the language, and it is also very easy to display in a browser and manipulate in real time.

I plan to make some simple programs first in order to understand the ins and outs of the data and manipulations, and then go from there. After I have garnered an acceptable understanding, I want to start using the leap motion to recognize gestures and translate them to key emulations. This will allow me to start making gesture controls for the computer, which is the main end goal.

Systems Programming Journal

January 21st, 2016

  • unistd equates to unix standard
  • header files are a good source of documentation
  • asm-generic/errno-base.h: gives error code names
  • apropos is really useful
  • man 3 getopt - play with it

Day 2: implementing cat2.c, the updated version.

We are using the read function instead of read, open for fopen, and write instead of printf for more universality. These are system calls.

posix standard allows for universal system error codes, among other things. It defines system behaviors.

fopen returns FILE* (which is a struct), but open returns an int, which is known as a file descriptor.

fdopen takes a file descriptor and creates a file pointer in order to cross between the two.

For next time

  • what does the system call to chmod do?
  • command line arguments
  • -e, -n, help and version implementation
  • user include directory
  • look at getopt; see above

January 26th, 2016

Continuing the making of cat2.c

implementing getopt so that we can use:

  • -n –number
  • -E –show-ends
  • –help
  • –version

January 28th, 2016

Moving on from cat into the “who” command!

/var/log/wtmp* → shows login data into lab 46.

apropos utmp → u stands for user. See section 5 for configuration items. The header files are located within this file. (man 5 utmp)

Manual page utmp(5) line 26: shows the ut_type translations.

when logging in, ssh calls the login command, and login makes note of the login.

POSIX

Portable Operating System Interface, a set of formal descriptions that provide a standard for the design of operating systems, especially ones that are compatible with Unix.

Origin

1980s: from the initial letters of portable operating system + -ix suggested by Unix.

Life before POSIX = madness.

BSD - Berkeley Standard Distribution (from UC Berkeley)

man gettimeofday, man ctime

February 2nd, 2016

Adjusted the time output to include month, day hour and min using the tm struct.

Chmod (change mode) section 2 . we are using the chmod files in order to implement the + & - in our own implementation of who. (who2)

%o prints out in octal

stat man page

including sys/types.h & sys/stat.h

Today we created who2.c as a more functional and closer looking version to the actual who command.

Our first project is to create a version of chmod command.

  • include sys/stat.h

February 4th, 2016

Today, we are taking on the program of “ls”.

In order to do this, we use man pages such as closedir, opendir, readdir, scandir.

When printing out, we use the attributes of the directory which are name, inode, type, etc.

In scandir, we begin to see the insane (yet still understandable) use of double and even triple pointers. woot.

Alphasort helps us put our results in alphabetical order. :

we are using the extra libraries of <sys/types.h> and <dirent.h>

Section 2 stat man page. displaying file permissions is tedious as all hell. At least in the way that we did it.

blog/spring2016/ahoover3/journal.1454690986.txt.gz · Last modified: 2016/02/05 16:49 by ahoover3