tag:blogger.com,1999:blog-34519220195878757002024-02-20T11:48:17.303-08:00Try to make things easy.Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.comBlogger130125tag:blogger.com,1999:blog-3451922019587875700.post-80963523367365209752018-07-26T19:38:00.001-07:002018-07-27T04:32:35.606-07:00Where Things go - Unix bin/ series<h2>
Where things go when packages are installed?</h2>
<div>
<br /></div>
<h3>
/bin, /usr/bin, /usr/local/bin</h3>
<br />
Unix shell script is all about "executing a program". In general, program is designed to do a certain thing very well with versatile option switches. For example, "-l" switch for "/bin/ls". "Executing a program" is not limited to CLI or shell activity. In heart of Unix, a system is composed by a unit of "Process", which is a memory image of an executable program.<br />
The executables are placed in many places. The standard locations are /bin, /usr/bin, and /usr/local/bin. Each are just conventions. For example, if we install firefox on a Linux system, usually it will be placed in /usr/bin/firefox. If someone decided to put it in /bin, that's okay. This doesn't break the system. The search path is defined in a shell variable called "PATH". Most programming languages will have similar config variable for searching. For example, Java has CLASSPATH and Golang has GOPATH. Python has PYTHONPATH, which will be prepended to sys.path list when an interpreter initiates. Unix PATH usually contains minimum "/bin" and "/usr/bin". There are also /sbin, /usr/sbin, and /usr/local/sbin. But, sbin directory is only for privileged purpose. Normal user might be able to execute this in read-only fashion.<br />
<br />
Why so many "bin" (binary) directories? As a matter of fact, the distinction between these directories became blurred. For example, modern Fedora symlinks /bin to /usr/bin. But, let's visit what was the "intention" of each bin/ directories.<br />
<br />
<h4>
/bin</h4>
<br />
/bin is core executable of a unix operating system. The biggest role of /bin is to provide minimum binaries for boot and recovery mode. Therefore, the convention of /bin is part of "/" partition where boot is mounting. The binary files in this directory will be always available in whichever environment the process is in. The best example is /bin/ls. We can always assume that "ls" command is available in any situation. Usually, packages named binutils and coreutils will deploy binaries into /bin.<br />
<br />
<h4>
/usr/bin</h4>
<br />
/usr/bin is for distribution's binary files. When a distro organizes packages, the binaries part of OS distro will be placed into /usr/bin directory. So, from our first questions specific to my favorite editor Emacs, "yum install emacs" will place Emacs binary into /usr/bin as /usr/bin/emacs, and other parts (libraries, elisp files) into different directories, called /usr/lib. We will visit this soon.<br />
<br />
<h4>
/usr/local/bin</h4>
<br />
This directory is for local system. This directory is for any software which are not part of distro. For example, if we download a source code of tmux, patch something on our own for unknown feature, and install on the system, then most likely it will be placed into /usr/local/bin. The GNU build system assumes "--prefix" config to "/usr/local" if not specified. Doing so, we can distinguish tmux binary from our source compilation and distro installed tmux binary. The former binary will be /usr/local/bin/tmux, and the latter binary will be /usr/bin/tmux. <br />
<br />
<h4>
/lib, /usr/lib, and /usr/local/lib</h4>
<br />
We only handled /bin series. But an executable file commonly comes with multiple files for many reasons. /lib supports other files for an executable. <br />
<br />
/lib directories are for supporting files for executables in /bin.
Anything which makes executable file useful, but which is not executable
by itself, will be placed in /lib series directory. The convention is,
executable files for /bin will find libraries from /lib or /lib64. The
same convention applies to /usr/bin searching /usr/lib or /usr/lib64.
And, the same rule for /usr/local/bin.<br />
<br />
To complete the conversation, let me mention more directories. There are even more important directories in Unix system. <br />
The first level is the top level, which is '/'. For '/' level, /bin, /sbin/, and /lib are the main directories for binary files. As modern systems become 64 bit CPU, modern systems include /lib64 directory. We know /bin and /sbin. These are for executable files. /lib and /lib64 are library binary files, or linkable binary files. Most of them are C libraries, which other languages will stub-in with their libc interfacing. There are two important special directories, /etc and /var. In my opinion, /etc/ is named incorrect. /etc is one of the most important directory in the system, which contains all config files for the OS. These are mostly text files. /var is variable content directory. The most popular directory is /var/log, which contains system logs. /var contains mostly data files, either in plain text or binary format. /proc, /dev, /sys won't be covered here.<br />
<br />
The next level is the /usr level. On this level, /usr/include, /usr/bin, /usr/sbin, /usr/lib, /usr/lib64, and /usr/share will be placed. We know /usr/bin and /usr/sbin. These are for executable files. /usr/lib and /usr/lib64 can be guessed from previous level. These are linkable C libraries. (Some are written in assembly, but both asm/c are ended up elf/elf64 kind of binary format, which are treated as the same way. ) /usr/include is where C header files are placed. /usr/share will have other stuff like man pages, fonts for Graphics system, etc.<br />
The next level is /usr/local. This is similar to /usr level. /usr/local/include, /usr/local/bin, /usr/local/sbin, /usr/local/lib, /usr/local/lib64, /usr/local/share. They behave the same as /usr level, but these directories are from my local system installation, not from the distro.<br />
<br />
<br />
<h4>
Back to our question: Where things go?</h4>
<br />
At this point, we can dig a further detail about file layout laid by yum package manager. When we want to install mysql server, (thanks to Oracle, opensource group had to rename/fork mysql to mariadb), we issue "yum install mariadb-server" on RHEL or CentOS server. In Fedora system, dnf is used instead of yum. "dnf install mariadb-server".<br />
To look what files were installed, we can use following command. "rpm -ql" will list files in a given package. As we can see, mysql server provided /etc config, /usr/bin/ executables including the MySQL server itself(/usr/bin/mysqld_safe), mysql libraries (*.so files) under /usr/lib64 directory, document and manpages under /usr/share, and /var/lib/mysql directory for run-variable (such as mysql.sock socket file), and logs in /var/log/mariadb.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">$ rpm -ql mariadb-server</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/etc/logrotate.d/mariadb</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/etc/my.cnf.d/mariadb-server.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/run/mariadb</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/aria_chk</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/aria_dump_log</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/aria_ftdump</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/aria_pack</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/aria_read_log</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/innochecksum</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/mariadb-service-convert</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/my_print_defaults</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/myisam_ftdump</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/myisamchk</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/myisamlog</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/myisampack</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/mysql_install_db</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/mysql_secure_installation</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/mysql_tzinfo_to_sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/mysqld_safe</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/replace</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/resolve_stack_dump</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/resolveip</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_common</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_mariabackup</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_mysqldump</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_rsync</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_rsync_wan</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_xtrabackup</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/wsrep_sst_xtrabackup-v2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/07</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/07/69bc37f26a1a41c25db627ca6e741f3674283d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/0d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/0d/5e64382cb9d8547a4f39e7ecb6e9230c15d2a4</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/13</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/13/9d378f787c7458ed20cca0f08725a4b46d95d6</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/18</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/18/6a7a4263fdddaa04c6d56d8fc53bbadc0b222b</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/1a</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/1a/330e5f506700544e7e83f80a006fbea60f0b44</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/2a</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/2a/1c3ed5bbdcfa8f3c59a8b1b05deabbce96299d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/2b</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/2b/4e76a3395d841de367654ab85a917279544eae</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/33</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/33/b4f714be5c7263f95fecefca2dd38310698abe</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/3c</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/3c/57f6bbf6229fec7b31309f410cfa59d7beb437</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/40</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/40/9a5555811260c669ea0b31a058f8d30f4efb16</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/44</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/44/82b8a2fb5bccca1933b4b8fa880ca073101afe</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/46</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/46/82dfb2855b2eb003064b83670d826fbde6e81b</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/47</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/47/90d0a4ca19e94d3e78ad02eeb05bc4089e6516</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/47/d6829933e751e57b260bc4d97967a31c087627</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/4d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/4d/31eee35b4eee0d8227a1dafa9fadc288664e02</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/4e</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/4e/cc3b0a86f73a81a3e3d5830e77b502bed91d31</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/5d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/5d/ac50185e31b8abc7c6f16327c3672bf26d88e4</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/6f</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/6f/2c3669f8fdace052898056be49ab6c71204d38</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/71</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/71/feb118b050b1cc5f0877c1baa52c1b2334a04d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/7e</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/7e/4b4db940f84e46030047474fa1f41aec479005</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/80</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/80/566468a3aff5645b767a5e33c01b23f5dafff1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/81</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/81/465a1473bca6964e37b113a65a36ba8e36b127</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/85</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/85/9c4e8b5a76fc8634e47fb6e1a29daf8852ae80</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/8c</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/8c/e93602c48bc7741dc2bdd55e951c3410acf828</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/92</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/92/af0abffd118bcf996c2c4e481ec1c4c6755887</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/98</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/98/111fa7869cde6147379b588e1498956107c978</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/99</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/99/1d896e56841cdc26a4e298a131bd52567d8a0d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/99/f16a0e66d86dc25ea303fbed84c35e4adc2183</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/9a</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/9a/b2090934eb1d9bd032bb94d9098619e5cd1442</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a0</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a0/2bfc59270525407437f5bf547729ba373ba177</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a1/9445b256e54f196a3829aac58bf4f49139ea15</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a5</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a5/9c430c85514065863c75479fe59da1c94a06f5</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a6</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a6/c8a9ef59973e71c7a29615e08c4e1fdd5b70e4</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a9</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a9/4e72d1427370d03a8e109a63b6e6140ce0ab18</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/a9/58baafa7fe7f982ad021ce48ee35bde00d8563</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/b7</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/b7/130c3f36369abcd1d75842fc4ebbece80e03fa</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/b7/753b47f584a4983191b630d200a334074b682e</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/cc</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/cc/87a3e8c2f36c89c280d2692062aae3411a542e</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/cc/d75921ce1f4dd7ac4b3ac66ca1c1cf2c609474</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/d0</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/d0/067e264e038dbb9c4d3bbee4ca72dd12903e57</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/d7</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/d7/b5038105ded94b48755e280d81555617958a1a</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/d7/ba029b8a789fcca13d63bdda97756101892879</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/dd</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/dd/078cf99fab7a9691a9a1a101b21cfc5a2ad29d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/de</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/de/7ae341fae7425fb1b8978b2449f6e50d205ac2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/e0</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/e0/9cb5aceb9840b18587045be3cf8ee3d77b452d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/e2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/e2/ec917cfe902b2fe429a888116bbed6b52cfcca</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/e5</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/e5/fe58c64cd71b7a2fcd04abe029645073fd1cc0</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/ef</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/ef/f1f5c65d204ca96466a4e233456a6b91e2fd89</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f1/b465d2f347bd8337da0ee4312435d4da89ad82</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f1/fb93f74645872fdd9e36870cd0848f5df2f62c</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f3</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f3/8547cd11777ed1603839ed0d10c25033f95ba7</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f5</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/f5/4fa57dad5a3e13acc200e9b4a8b0f7cded62f1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/fb</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/fb/6af65f1e7ad9b6654a40a58f904541c49d0dee</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/fe</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/fe/890bedf4a0381a9ab37a38af7a4c1704f06452</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/ff</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/ff/c16ecade55664771bf1e11541a0aaee5ad73ac</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/.build-id/ff/c1ae2e0dbf80dc1715863264d7c328c106a93c</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/systemd/system/mariadb.service</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/systemd/system/mariadb.service.d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/systemd/system/mariadb.service.d/tokudb.conf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/systemd/system/mariadb@.service</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/systemd/system/mariadb@bootstrap.service.d</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/sysusers.d/mariadb.conf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib/tmpfiles.d/mariadb.conf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/INFO_BIN</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/INFO_SRC</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/adt_null.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/auth_0x0100.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/auth_ed25519.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/auth_gssapi.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/auth_pam.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/auth_socket.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/auth_test_plugin.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/client_ed25519.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/daemon_example.ini</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/debug_key_management.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/dialog_examples.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/disks.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/example_key_management.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/file_key_management.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/ha_example.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/ha_federated.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/ha_mroonga.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/ha_spider.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/ha_test_sql_discovery.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/handlersocket.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/libdaemon_example.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/locales.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/metadata_lock_info.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/mypluglib.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/qa_auth_client.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/qa_auth_interface.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/qa_auth_server.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/query_cache_info.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/query_response_time.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/semisync_master.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/semisync_slave.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/server_audit.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/simple_password_check.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/sql_errlog.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/lib64/mariadb/plugin/wsrep_info.so</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/libexec/mysql-check-socket</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/libexec/mysql-check-upgrade</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/libexec/mysql-prepare-db-dir</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/libexec/mysql-scripts-common</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/libexec/mysqld</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/doc/mariadb-server</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/doc/mariadb-server/README.mysql-cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/groonga-normalizer-mysql/README.md</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/groonga-normalizer-mysql/lgpl-2.0.txt</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/groonga/COPYING</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/groonga/README.md</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/aria_chk.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/aria_dump_log.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/aria_ftdump.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/aria_pack.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/aria_read_log.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/galera_new_cluster.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/galera_recovery.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/innochecksum.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mariadb-service-convert.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/my_print_defaults.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/myisam_ftdump.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/myisamchk.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/myisamlog.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/myisampack.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mysql.server.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mysql_install_db.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mysql_secure_installation.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mysql_tzinfo_to_sql.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mysqld_safe.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/mysqld_safe_helper.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/replace.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/resolve_stack_dump.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/resolveip.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/wsrep_sst_common.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/wsrep_sst_mysqldump.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/wsrep_sst_rsync.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/wsrep_sst_xtrabackup-v2.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man1/wsrep_sst_xtrabackup.1.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/man/man8/mysqld.8.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/fill_help_tables.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/install_spider.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/maria_add_gis_sp.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/maria_add_gis_sp_bootstrap.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mroonga/AUTHORS</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mroonga/COPYING</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mroonga/install.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mroonga/uninstall.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/my-huge.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/my-innodb-heavy-4G.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/my-large.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/my-medium.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/my-small.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mysql_performance_tables.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mysql_system_tables.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mysql_system_tables_data.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mysql_test_data_timezone.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/mysql_to_mariadb.sql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy/selinux</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy/selinux/README</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy/selinux/mariadb-server.fc</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy/selinux/mariadb-server.te</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy/selinux/mariadb.pp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/policy/selinux/mariadb.te</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/systemd/mariadb.service</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/systemd/mariadb@.service</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/wsrep.cnf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/mariadb/wsrep_notify</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/var/lib/mysql</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/var/log/mariadb</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/var/log/mariadb/mariadb.log</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<br />
<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-3768901051920696662018-07-26T17:59:00.004-07:002018-07-27T04:21:42.571-07:00Where Things go - Intro<h2>
Where things go when packages are installed?</h2>
<h3>
</h3>
<h3>
Introduction</h3>
<br />
When we issue "yum install package-name", before we know the inside, these look magic. With the magic "install" command, nice things happen without our understanding of "what just happened." That's the purpose of package manager software such as yum, apt, brew, or even language specific pip. Thanks to the open source developers' hard works and great contributions, we can just enjoy the magic they designed. <br />
Sometimes, we wonder the details of what these package managers do. Where do thing go after magic? How these things available like magic after just one simple command? Knowing about this is also useful sometimes. For example, when libraries conflicted, or packages are installed, but libraries are not found, the details of packages will help to resolve the situations.<br />
In summary, packages are composed of files, and package manager places them to be visible by convention or provided config. The convention starts from old Unix convention. This convention evolved while Linux has been modernized. The conventions are not only for OS distro, but also languages set up their own. Here Distro means the community packaging the OS. For rexample, Fedora Linux and Ubuntu Linux are the two most popular Linux distro. Python pip has certain rules to search libraries, for instance. Each package manager will lay out package files differently, but they resemble each other.<br />
<br />
This topic will be covered in multiple posts. We will start with Unix executable paths and library paths. Then, we will case study several package managers, and conclude with summary.<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-57887789706145844522014-12-31T05:31:00.001-08:002022-01-04T05:42:49.137-08:00Maze Generating in C (like Lumosity Penguin Pursuit)Playing lumosity is fun. Among one of their games, there is a cute maze game. <br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLXdi3HpXQGS2MKinTdDXgy89q4SGWnTAomAgqIW2L5Xzr50qmQEM77ullpcHjdhe5QIGVvMC7d0bvXnNmMF1kyXNHNYxekg9vVqVm4KvasLGBFlCTtMaVaEnYSCpAA-fJCUO6fG83H8Q/s1600/LumocityPenguin.png" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLXdi3HpXQGS2MKinTdDXgy89q4SGWnTAomAgqIW2L5Xzr50qmQEM77ullpcHjdhe5QIGVvMC7d0bvXnNmMF1kyXNHNYxekg9vVqVm4KvasLGBFlCTtMaVaEnYSCpAA-fJCUO6fG83H8Q/s1600/LumocityPenguin.png" width="133" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">lumosity game</td></tr>
</tbody></table>
<div>
In that game, however, the goal is not about solving the maze, but about adjusting the direction when the screen flips or rotates. The point is, generating this kind of maze has computer science theories. Wikipedia has a great reference (<a href="http://en.wikipedia.org/wiki/Maze_generation_algorithm">Maze_generation_algorithm</a>). This fun algorithmic problem is implemented using C. I used back-trace method, and here it is.<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4VOu0egff0eUgHSLofzUulu5D5UMBeCcOH7bO_gSfZ4yktpz7AM0S_Bo-5xkpyi_yoM_Urb4ESdM6DPaHXDQMoy8B3SsNO56wqHEQeIohgvggs_6ThnuC1So-2GsJpF2YfPMsCglOAcI/s1600/maze-output.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4VOu0egff0eUgHSLofzUulu5D5UMBeCcOH7bO_gSfZ4yktpz7AM0S_Bo-5xkpyi_yoM_Urb4ESdM6DPaHXDQMoy8B3SsNO56wqHEQeIohgvggs_6ThnuC1So-2GsJpF2YfPMsCglOAcI/s1600/maze-output.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">sample output</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
<div>
<br /></div>
<!--HTML generated using hilite.me--><br />
<div style="background: rgb(255, 255, 255); border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;"><span style="color: #557799;">#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#define WIDTH 6
#define HEIGHT 6
struct node {
int north_wall;
int west_wall;
int visited;
int x;
int y;
};
void printMaze(int cnt, struct node *cells)
{
int y,x;
for (y=0; y<HEIGHT; ++y) {
for (x=0; x<WIDTH; ++x) {
struct node *c = cells + ( x + y*WIDTH );
printf("+");
if (c->north_wall) {
if (c->x == 0 && c->y == 0)
printf(" ");
else
printf("--");
}
else
printf(" ");
}
printf("+\n");
for (x=0; x<WIDTH; ++x) {
struct node *c = cells + (x + y*WIDTH) ;
if (c->west_wall)
printf("| ");
else
printf(" ");
}
printf("|\n");
}
for (x=0; x<WIDTH-1; ++x) {
printf("+--");
}
printf("+ +\n\n");
}
// rtn is a pointer array. NWES.
int neighbor(struct node *cells, struct node *cur, struct node **rtn)
{
int x = cur->x;
int y = cur->y;
rtn[0] = rtn[1] = rtn[2] = rtn[3] = NULL;
if (y-1 >= 0) rtn[0] = cells + (x + (y-1)*WIDTH);
if (x-1 >= 0) rtn[1] = cells + ((x-1) + y*WIDTH);
if (x+1 < WIDTH) rtn[2] = cells + ((x+1) + y*WIDTH);
if (y+1 < HEIGHT) rtn[3] = cells + (x + (y+1)*WIDTH);
return rtn[0] != NULL || rtn[1] != NULL ||
rtn[2] != NULL || rtn[3] != NULL;
}
void shuffle(struct node **array, size_t n) {
struct timeval tv;
gettimeofday(&tv, NULL);
int usec = tv.tv_usec;
srand48(usec);
if (n > 1) {
size_t i;
for (i = n - 1; i > 0; i--) {
size_t j = (unsigned int) (drand48()*(i+1));
struct node *t = array[j];
array[j] = array[i];
array[i] = t;
}
}
}
void punchWall(struct node *node1, struct node *node2)
{
int x1 = node1->x;
int y1 = node1->y;
int x2 = node2->x;
int y2 = node2->y;
if (x1 < x2 && y1 == y2)
node2->west_wall =0;
if (x2 < x1 && y1 == y2)
node1->west_wall =0;
if (y1 > y2 && x1 == x2)
node1->north_wall =0;
if (y2 > y1 && x1 == x2)
node2->north_wall =0;
}
void genMaze(struct node *cells, struct node *cur)
{
int i;
if (cur->visited == 0) {
struct node *nei[4];
cur->visited = 1;
if (neighbor( cells, cur, nei)) {
shuffle(nei, 4);
for (i=0; i<4; ++i) {
if (nei[i] && nei[i]->visited==0) {
punchWall(cur, nei[i]);
genMaze(cells, nei[i]);
}
}
}
}
}
int main(int argc, char **argv) {
int i;
struct node cells[ WIDTH * HEIGHT ];
// Initialize Cells
for (i=0; i < WIDTH*HEIGHT; ++i) {
cells[i].north_wall = cells[i].west_wall = 1;
cells[i].visited = 0;
cells[i].x = i % WIDTH;
cells[i].y = i / WIDTH;
}
genMaze(cells, &cells[0]);
printMaze(WIDTH * HEIGHT, cells);
return 0;
}
</span>
</pre>
</div>
Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-34740016847459477102014-12-25T13:14:00.001-08:002014-12-25T13:19:34.627-08:00Quick Example of Red Black Tree.In previous articles, FreeBSD AVL tree is ported to Linux and a usage example is presented.<br />
Linux uses red-black tree instead of AVL. Just searching for rbtree.h in Linux kernel returned so many components such as ext4. But, rbtree can't be used in user space in kernel source form. Luckily there is user-space ported rbtree <a href="https://github.com/forhappy/rbtree">in here.</a><br />
<br />
That code contains a test code. Here, I post one more example. My example is the same test written in AVL test code (<a href="http://litdream.blogspot.com/2014/12/sample-usage-of-avl-quick-and-dirty.html">here</a>).<br />
<br />
By the way, using these codes have advantage of efficiency. <br />
Enjoy.<br />
<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #557799;">#include <stdio.h></span>
<span style="color: #557799;">#include <stdlib.h></span>
<span style="color: #557799;">#include <unistd.h></span>
<span style="color: #557799;">#include <errno.h></span>
<span style="color: #557799;">#include <string.h></span>
<span style="color: #557799;">#include "rbtree.h"</span>
<span style="color: #557799;">#include "rbtree_test.h"</span>
<span style="color: #333399; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">printTree</span>(RBRootType <span style="color: #333333;">*</span>root)
{
<span style="color: #333399; font-weight: bold;">int</span> count <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">0</span>;
Person <span style="color: #333333;">*</span>data, <span style="color: #333333;">*</span>rootdata;
RBNodeType <span style="color: #333333;">*</span>cur;
rootdata <span style="color: #333333;">=</span> container_of( root<span style="color: #333333;">-></span>rb_node, Person, node);
printf(<span style="background-color: #fff0f0;">"Root node: %s</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>, rootdata<span style="color: #333333;">-></span>name);
cur <span style="color: #333333;">=</span> rb_first(root);
<span style="color: #008800; font-weight: bold;">while</span> (cur) {
data <span style="color: #333333;">=</span> container_of( cur, Person, node);
printf(<span style="background-color: #fff0f0;">"%d : %s(%s)</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>, count, data<span style="color: #333333;">-></span>name, data<span style="color: #333333;">-></span>phone);
cur <span style="color: #333333;">=</span> rb_next(cur);
count<span style="color: #333333;">++</span>;
}
printf(<span style="background-color: #fff0f0;">"Total nodes in tree: %d</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>, count);
printf(<span style="background-color: #fff0f0;">"---------------------------------------------------------------------</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>);
}
Person<span style="color: #333333;">*</span> <span style="color: #0066bb; font-weight: bold;">searchPerson</span>(RBRootType <span style="color: #333333;">*</span>root, <span style="color: #333399; font-weight: bold;">char</span> <span style="color: #333333;">*</span>name)
{
RBNodeType <span style="color: #333333;">*</span>curnode <span style="color: #333333;">=</span> root<span style="color: #333333;">-></span>rb_node;
<span style="color: #008800; font-weight: bold;">while</span> (curnode) {
Person <span style="color: #333333;">*</span>data <span style="color: #333333;">=</span> container_of(curnode, Person, node);
<span style="color: #333399; font-weight: bold;">int</span> result;
result <span style="color: #333333;">=</span> strcmp(name, data<span style="color: #333333;">-></span>name);
<span style="color: #008800; font-weight: bold;">if</span> (result <span style="color: #333333;"><</span> <span style="color: #0000dd; font-weight: bold;">0</span>)
curnode <span style="color: #333333;">=</span> curnode<span style="color: #333333;">-></span>rb_left;
<span style="color: #008800; font-weight: bold;">else</span> <span style="color: #008800; font-weight: bold;">if</span> (result <span style="color: #333333;">></span> <span style="color: #0000dd; font-weight: bold;">0</span>)
curnode <span style="color: #333333;">=</span> curnode<span style="color: #333333;">-></span>rb_right;
<span style="color: #008800; font-weight: bold;">else</span>
<span style="color: #008800; font-weight: bold;">return</span> data;
}
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #007020;">NULL</span>;
}
<span style="color: #333399; font-weight: bold;">int</span> <span style="color: #0066bb; font-weight: bold;">insertPerson</span>(RBRootType <span style="color: #333333;">*</span>root, Person <span style="color: #333333;">*</span>data)
{
RBNodeType <span style="color: #333333;">**</span>new <span style="color: #333333;">=</span> <span style="color: #333333;">&</span>(root<span style="color: #333333;">-></span>rb_node), <span style="color: #333333;">*</span>parent <span style="color: #333333;">=</span> <span style="color: #007020;">NULL</span>;
<span style="color: #008800; font-weight: bold;">while</span> (<span style="color: #333333;">*</span>new) {
Person <span style="color: #333333;">*</span>cur <span style="color: #333333;">=</span> container_of(<span style="color: #333333;">*</span>new, Person, node);
<span style="color: #333399; font-weight: bold;">int</span> result <span style="color: #333333;">=</span> strcmp(data<span style="color: #333333;">-></span>name, cur<span style="color: #333333;">-></span>name);
parent <span style="color: #333333;">=</span> <span style="color: #333333;">*</span>new;
<span style="color: #008800; font-weight: bold;">if</span> (result <span style="color: #333333;"><</span> <span style="color: #0000dd; font-weight: bold;">0</span>)
new <span style="color: #333333;">=</span> <span style="color: #333333;">&</span>((<span style="color: #333333;">*</span>new)<span style="color: #333333;">-></span>rb_left);
<span style="color: #008800; font-weight: bold;">else</span> <span style="color: #008800; font-weight: bold;">if</span> (result <span style="color: #333333;">></span> <span style="color: #0000dd; font-weight: bold;">0</span>)
new <span style="color: #333333;">=</span> <span style="color: #333333;">&</span>((<span style="color: #333333;">*</span>new)<span style="color: #333333;">-></span>rb_right);
<span style="color: #008800; font-weight: bold;">else</span>
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #0000dd; font-weight: bold;">0</span>;
}
<span style="color: #888888;">// New node</span>
rb_link_node(<span style="color: #333333;">&</span>(data<span style="color: #333333;">-></span>node), parent, new);
rb_insert_color(<span style="color: #333333;">&</span>(data<span style="color: #333333;">-></span>node), root);
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #0000dd; font-weight: bold;">1</span>;
}
<span style="color: #333399; font-weight: bold;">int</span> <span style="color: #0066bb; font-weight: bold;">main</span>(<span style="color: #333399; font-weight: bold;">int</span> argc, <span style="color: #333399; font-weight: bold;">char</span> <span style="color: #333333;">**</span>argv)
{
RBRootType mytree <span style="color: #333333;">=</span> RB_ROOT;
Person a;
memset(<span style="color: #333333;">&</span>a, <span style="color: #0044dd;">'\0'</span>, <span style="color: #008800; font-weight: bold;">sizeof</span> a);
strncpy(a.name, <span style="background-color: #fff0f0;">"Micheal Smith"</span>, <span style="color: #0000dd; font-weight: bold;">14</span>);
strncpy(a.phone, <span style="background-color: #fff0f0;">"1112223333"</span>, <span style="color: #0000dd; font-weight: bold;">11</span>);
insertPerson(<span style="color: #333333;">&</span>mytree, <span style="color: #333333;">&</span>a);
Person b;
memset(<span style="color: #333333;">&</span>b, <span style="color: #0044dd;">'\0'</span>, <span style="color: #008800; font-weight: bold;">sizeof</span> b);
strncpy(b.name, <span style="background-color: #fff0f0;">"Jack Stuart"</span>, <span style="color: #0000dd; font-weight: bold;">12</span>);
strncpy(b.phone, <span style="background-color: #fff0f0;">"2223334444"</span>, <span style="color: #0000dd; font-weight: bold;">11</span>);
insertPerson(<span style="color: #333333;">&</span>mytree, <span style="color: #333333;">&</span>b);
Person <span style="color: #333333;">*</span>srch <span style="color: #333333;">=</span> <span style="color: #007020;">NULL</span>;
printTree(<span style="color: #333333;">&</span>mytree);
<span style="color: #008800; font-weight: bold;">if</span> ( (srch <span style="color: #333333;">=</span> searchPerson(<span style="color: #333333;">&</span>mytree, <span style="background-color: #fff0f0;">"Micheal Smith"</span>)) <span style="color: #333333;">!=</span> <span style="color: #007020;">NULL</span> )
printf(<span style="background-color: #fff0f0;">"Micheal found: %s</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>, srch<span style="color: #333333;">-></span>phone);
<span style="color: #008800; font-weight: bold;">else</span>
printf(<span style="background-color: #fff0f0;">"Micheal not found.</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>);
<span style="color: #008800; font-weight: bold;">if</span> ( (srch <span style="color: #333333;">=</span> searchPerson(<span style="color: #333333;">&</span>mytree, <span style="background-color: #fff0f0;">"Jack Stuart"</span>)) <span style="color: #333333;">!=</span> <span style="color: #007020;">NULL</span> )
printf(<span style="background-color: #fff0f0;">"Jack found: %s</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>, srch<span style="color: #333333;">-></span>phone);
<span style="color: #008800; font-weight: bold;">else</span>
printf(<span style="background-color: #fff0f0;">"Jack not found.</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>);
printf(<span style="background-color: #fff0f0;">"--------------------------------------------------</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">"</span>);
<span style="color: #888888;">/**</span>
<span style="color: #888888;"> * Mike</span>
<span style="color: #888888;"> * / </span>
<span style="color: #888888;"> * Jack</span>
<span style="color: #888888;"> */</span>
<span style="color: #888888;">// If I add Andrew, it's unbalanced.</span>
Person c;
memset(<span style="color: #333333;">&</span>c, <span style="color: #0044dd;">'\0'</span>, <span style="color: #008800; font-weight: bold;">sizeof</span> c);
strcpy(c.name, <span style="background-color: #fff0f0;">"Andrew Kudos"</span>);
strcpy(c.phone, <span style="background-color: #fff0f0;">"3334445555"</span>);
insertPerson(<span style="color: #333333;">&</span>mytree, <span style="color: #333333;">&</span>c);
<span style="color: #888888;">//traverse!! root must be Jack.</span>
printTree(<span style="color: #333333;">&</span>mytree);
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #0000dd; font-weight: bold;">0</span>;
}
</pre>
</div>
Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-1121906113104388342014-12-08T23:01:00.000-08:002014-12-25T13:16:00.744-08:00Sample Usage of AVL, quick and dirty.So, previous article ported FreeBSD AVL into Linux AVL. (<a href="http://litdream.blogspot.com/2014/12/avl-tree-in-c.html">AVL Tree in C</a> )<br />
Here is quick and dirty way of how to use it. <br />
It will be straightforward, except one thing.<br />
<br />
Your data struct must be divided into two pieces. Data part and avl_node_t part. The Data part size must be multiple of 8. If not, there will be a puzzling assert((offset & 0x7) == 0). Here is the usage. For convinience, I put the link part the first. This will easy to cast type between (avl_node_t) and (struct person) with the same pointer.<br />
<br />
<br />
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #557799">#include <stdio.h></span>
<span style="color: #557799">#include <stdlib.h></span>
<span style="color: #557799">#include <unistd.h></span>
<span style="color: #557799">#include <errno.h></span>
<span style="color: #557799">#include <string.h></span>
<span style="color: #557799">#include <stdint.h></span>
<span style="color: #557799">#include "avl.h"</span>
<span style="color: #557799">#define NAME_LEN 36</span>
<span style="color: #557799">#define PHONE_LEN 10</span>
<span style="color: #888888">// assuming dtype has a link member as node type (avl_node_t)</span>
<span style="color: #557799">#define OFFSETOF(data) 0</span>
<span style="color: #008800; font-weight: bold">typedef</span> <span style="color: #008800; font-weight: bold">struct</span> person {
<span style="color: #333399; font-weight: bold">avl_node_t</span> my_link;
<span style="color: #333399; font-weight: bold">char</span> name[ NAME_LEN <span style="color: #333333">+</span> <span style="color: #0000DD; font-weight: bold">1</span>];
<span style="color: #333399; font-weight: bold">char</span> phone[ PHONE_LEN <span style="color: #333333">+</span> <span style="color: #0000DD; font-weight: bold">1</span>];
} Person;
<span style="color: #333399; font-weight: bold">int</span> <span style="color: #0066BB; font-weight: bold">comparePerson</span>(<span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">void</span> <span style="color: #333333">*</span>a, <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">void</span> <span style="color: #333333">*</span>b)
{
Person <span style="color: #333333">*</span>_a <span style="color: #333333">=</span> (Person <span style="color: #333333">*</span>)a;
Person <span style="color: #333333">*</span>_b <span style="color: #333333">=</span> (Person <span style="color: #333333">*</span>)b;
<span style="color: #008800; font-weight: bold">if</span> ( strncmp(_a<span style="color: #333333">-></span>name, _b<span style="color: #333333">-></span>name, NAME_LEN) <span style="color: #333333"><</span> <span style="color: #0000DD; font-weight: bold">0</span> )
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #333333">-</span><span style="color: #0000DD; font-weight: bold">1</span>;
<span style="color: #008800; font-weight: bold">else</span> <span style="color: #008800; font-weight: bold">if</span> ( strncmp(_a<span style="color: #333333">-></span>name, _b<span style="color: #333333">-></span>name, NAME_LEN) <span style="color: #333333">></span> <span style="color: #0000DD; font-weight: bold">0</span> )
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #0000DD; font-weight: bold">1</span>;
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #0000DD; font-weight: bold">0</span>;
}
Person<span style="color: #333333">*</span> <span style="color: #0066BB; font-weight: bold">searchByName</span>(<span style="color: #333399; font-weight: bold">avl_tree_t</span> <span style="color: #333333">*</span>tree, <span style="color: #008800; font-weight: bold">const</span> <span style="color: #333399; font-weight: bold">char</span> <span style="color: #333333">*</span>name)
{
Person <span style="color: #333333">*</span>cur <span style="color: #333333">=</span> AVL_NODE2DATA(tree<span style="color: #333333">-></span>avl_root, tree<span style="color: #333333">-></span>avl_offset);
<span style="color: #333399; font-weight: bold">avl_node_t</span> <span style="color: #333333">*</span>p;
<span style="color: #008800; font-weight: bold">while</span> (cur) {
<span style="color: #008800; font-weight: bold">if</span> (strcmp(cur<span style="color: #333333">-></span>name, name) <span style="color: #333333">==</span> <span style="color: #0000DD; font-weight: bold">0</span>)
<span style="color: #008800; font-weight: bold">return</span> cur;
<span style="color: #008800; font-weight: bold">else</span> <span style="color: #008800; font-weight: bold">if</span> (strcmp(name, cur<span style="color: #333333">-></span>name) <span style="color: #333333"><</span><span style="color: #0000DD; font-weight: bold">0</span>) {
p <span style="color: #333333">=</span> AVL_DATA2NODE( cur, tree<span style="color: #333333">-></span>avl_offset );
p <span style="color: #333333">=</span> p<span style="color: #333333">-></span>avl_child[<span style="color: #0000DD; font-weight: bold">0</span>];
}
<span style="color: #008800; font-weight: bold">else</span> {
p <span style="color: #333333">=</span> AVL_DATA2NODE( cur, tree<span style="color: #333333">-></span>avl_offset );
p <span style="color: #333333">=</span> p<span style="color: #333333">-></span>avl_child[<span style="color: #0000DD; font-weight: bold">1</span>];
}
cur <span style="color: #333333">=</span> p <span style="color: #333333">?</span> AVL_NODE2DATA( p, tree<span style="color: #333333">-></span>avl_offset) <span style="color: #333333">:</span> <span style="color: #007020">NULL</span>;
}
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #007020">NULL</span>;
}
<span style="color: #333399; font-weight: bold">void</span> <span style="color: #0066BB; font-weight: bold">printTree</span>(<span style="color: #333399; font-weight: bold">avl_tree_t</span> <span style="color: #333333">*</span>tree)
{
<span style="color: #333399; font-weight: bold">int</span> i <span style="color: #333333">=</span> <span style="color: #0000DD; font-weight: bold">0</span>;
Person <span style="color: #333333">*</span>cur;
printf(<span style="background-color: #fff0f0">"Total nodes in tree: %ld</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>, avl_numnodes(tree));
printf(<span style="background-color: #fff0f0">"Root: %s</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>, ((Person <span style="color: #333333">*</span>)(AVL_NODE2DATA( tree<span style="color: #333333">-></span>avl_root, tree<span style="color: #333333">-></span>avl_offset)))<span style="color: #333333">-></span>name);
cur <span style="color: #333333">=</span> avl_first(tree);
<span style="color: #008800; font-weight: bold">while</span> (cur) {
printf(<span style="background-color: #fff0f0">"%d : %s(%s)</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>, i, cur<span style="color: #333333">-></span>name, cur<span style="color: #333333">-></span>phone);
cur <span style="color: #333333">=</span> AVL_NEXT(tree, cur);
i<span style="color: #333333">++</span>;
}
printf(<span style="background-color: #fff0f0">"---------------------------------------------------------------------</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>);
}
<span style="color: #333399; font-weight: bold">int</span> <span style="color: #0066BB; font-weight: bold">main</span>(<span style="color: #333399; font-weight: bold">int</span> argc, <span style="color: #333399; font-weight: bold">char</span> <span style="color: #333333">**</span>argv)
{
<span style="color: #333399; font-weight: bold">avl_tree_t</span> avl;
Person a;
memset(<span style="color: #333333">&</span>a, <span style="color: #0044DD">'\0'</span>, <span style="color: #008800; font-weight: bold">sizeof</span> a);
strncpy(a.name, <span style="background-color: #fff0f0">"Micheal Smith"</span>, <span style="color: #0000DD; font-weight: bold">14</span>);
strncpy(a.phone, <span style="background-color: #fff0f0">"1112223333"</span>, <span style="color: #0000DD; font-weight: bold">11</span>);
avl_create(<span style="color: #333333">&</span>avl, comparePerson, <span style="color: #008800; font-weight: bold">sizeof</span>(Person), OFFSETOF(<span style="color: #333333">&</span>a));
avl_add(<span style="color: #333333">&</span>avl, <span style="color: #333333">&</span>a);
Person b;
memset(<span style="color: #333333">&</span>b, <span style="color: #0044DD">'\0'</span>, <span style="color: #008800; font-weight: bold">sizeof</span> b);
strncpy(b.name, <span style="background-color: #fff0f0">"Jack Stuart"</span>, <span style="color: #0000DD; font-weight: bold">12</span>);
strncpy(b.phone, <span style="background-color: #fff0f0">"2223334444"</span>, <span style="color: #0000DD; font-weight: bold">11</span>);
avl_add(<span style="color: #333333">&</span>avl, <span style="color: #333333">&</span>b);
<span style="color: #888888">//traverse </span>
printTree(<span style="color: #333333">&</span>avl);
<span style="color: #888888">/**</span>
<span style="color: #888888"> * Mike</span>
<span style="color: #888888"> * / </span>
<span style="color: #888888"> * Jack</span>
<span style="color: #888888"> */</span>
<span style="color: #888888">// If I add Andrew, it's unbalanced.</span>
Person c;
memset(<span style="color: #333333">&</span>c, <span style="color: #0044DD">'\0'</span>, <span style="color: #008800; font-weight: bold">sizeof</span> c);
strcpy(c.name, <span style="background-color: #fff0f0">"Andrew Kudos"</span>);
strcpy(c.phone, <span style="background-color: #fff0f0">"3334445555"</span>);
avl_add(<span style="color: #333333">&</span>avl, <span style="color: #333333">&</span>c);
<span style="color: #888888">//traverse!! root must be Jack.</span>
printTree(<span style="color: #333333">&</span>avl);
<span style="color: #888888">// Searching.</span>
Person <span style="color: #333333">*</span>search;
search <span style="color: #333333">=</span> searchByName(<span style="color: #333333">&</span>avl, <span style="background-color: #fff0f0">"Jack Stuart"</span>);
<span style="color: #008800; font-weight: bold">if</span> (search)
printf(<span style="background-color: #fff0f0">"Jack found: %s</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>, search<span style="color: #333333">-></span>name);
<span style="color: #008800; font-weight: bold">else</span>
printf(<span style="background-color: #fff0f0">"Jack not found</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>);
search <span style="color: #333333">=</span> searchByName(<span style="color: #333333">&</span>avl, <span style="background-color: #fff0f0">"lalalalala"</span>);
<span style="color: #008800; font-weight: bold">if</span> (search)
printf(<span style="background-color: #fff0f0">"lala found:</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>);
<span style="color: #008800; font-weight: bold">else</span>
printf(<span style="background-color: #fff0f0">"lala not found</span><span style="color: #666666; font-weight: bold; background-color: #fff0f0">\n</span><span style="background-color: #fff0f0">"</span>);
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #0000DD; font-weight: bold">0</span>;
}
</pre></div>
Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-58169271540223038932014-12-08T22:43:00.001-08:002014-12-31T05:58:00.962-08:00AVL Tree in CI ported FreeBSD avl implementation into Linux users pace version.<br />
Code is here(<a href="https://github.com/litdream/avl_linux">github link</a>).<br />
<br />
Practically speaking, we don't need AVL tree these days in high level languages like Python. There are good alternatives in general. In algorithm perspective, there is a Red Black Tree, the rival of AVL tree. They mostly serve for the similar purpose. RBTree is easier to implement, but size is factor of 2 vs. AVL is 1.4. Linux uses RBTree internally, and FreeBSD had AVL. (<a href="http://lwn.net/Articles/184495/">Linux RBTree article</a>)<br />
<br />
Well, in day to day life, modern languages provide their own version of "List". In Python case, we just stuff data into the list, and later call it by index. For efficient search, we use bisect module. If we need sort, Python list takes very "Intelligent" approach to be efficient. I will discuss this later, but listsort.txt in Python source can be referenced.<br />
<br />
But, then, why bother AVL tree?<br />
First, it's mentioned more in different algorithm books probably thanks to BST (Binary Search Tree). And, AVL is a good subject to introduce concepts of algorithm, "let's cover the weakness of a given algorithm." Second, it's personal. I just like it with no reason.<br />
<br />
When I searched AVL written in C, I found many pages. First, GNU libavl is an overkill. Other small projects are not mature enough. Either it's "not generic", or data allocation logic is "malloc". This will cost performance. Modern days, C is chosen by performance in many cases. So, too many or individual malloc is a bigger penalty.<br />
<br />
Interestingly, FreeBSD has avl implementation and they still include it even today. Probably, former SunOS used avl for kernel data. This is small. This only implements AVL algorithm, but comparator is a function pointer which I can attach. AVL node does not bother the data, but my data suppose to embed avl_node_t. And, AVL algorithm doesn't do high-level search. So, I have to provide the high level search, like searchByName(const char *key). I liked the design because it is more flexible. Unfortunately, it's not directly usable in Linux. So, I tweaked and made it usable in Linux. There are two files (avl.h and avl.c). Enjoy.<br />
<br />
<br />
<h4>
</h4>
Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-45975304686005724142013-12-27T22:19:00.004-08:002013-12-27T22:19:26.371-08:00Bach, again.My youtube #12,<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/LSJBddnMSkc?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-13732063263128915852013-10-30T09:22:00.002-07:002013-10-30T18:19:03.560-07:00Pushing scale practice doesn't help improvising.I used to have this problem in my first year playing guitar. My first ultimate goal was "Far beyond the sun" by Yngwie Malmsteen. Pretty ambitious for a beginner. Accomplishing song by song, picking speed went up, left finger maneuver became fluent. However, Yngwie Malmsteen style is pretty challenging. If I remember that time, I practiced different scales in metronome. One day, I could play "far beyond the sun." However, the speed I play for Yngwie Malmsteen didn't help other songs. I was puzzled.<br />
<br />
Big Question. "I could cover fastest genre of the music, but other than his music, I am still struggling with other pieces. Why? "<br />
<br />
Having 10 years of gap without playing guitar, I can't play Yngwie Malmsteen as I did. But, I can enjoy more music than back then I used to play. Here is my answer about the question.<br />
<br />
Improvising has two modes. "Controlled progression" and "Shredding". Controlled progression relies on current musical context. What is the key signature/main scale? What is the beat signature/and main rhythm? More importantly, controlled progression much relies on the brain, the most important tool for music. Muscle movement works together with the brain. Do you see that the limiter is "the brain"?<br />
On the other hand, shredding depends less on the brain. It heavily relies on muscle memory. Brain just sets up basic information like "what code/what sclae" and "what major beat", then finger works all. In here, detail is less important, such as order of notes as long as notes are in scale, and diatonically working.<br />
<br />
When playing in band, these come out somewhat mixed. For example, Yngwie Malmsteen, many phrases are roughly 20% controlled, 80% shredded. So, brain tells "From now, 4 measures will be diminished rooted 20th fret C down." Then, during 4 measures fingers improvise without help of brain. In the meanwhile, brain accepts the next phase, "stop at 8th C vibration, for the 4 beats, and then the last half beat will Bm harmonic minor in pulling manner." After executing 4 measure, this should end at C, and pulling Bm harmonic scale comes up. Sure while this finger is working, Brain just thinks the next, not the one fingers are playing.<br />
<br />
When in shredding mode, accidentals are not common. Because accidental is a big brain work. "We make irregular note X, which is not in scale, but produces effects of A,B,C, and some alpha of tention. It will be resolved by in scale tonic Y or 5th of Y, etc. " These need lots of controlled work. Fingers can't just dance on their own. They will pay attention to the brain.<br />
<br />
Now the key point here. Increasing maneuverability in controlled work is the foundation to play variety of music. At the same time, brain should have more tools to provide good signals to the fingers. I will explain this further.<br />
Here is a simple test how fast I can maneuver in controlled.<br />
Simply pentatonic through 6 strings.(Low A(5th fret 6th string) to high C(8th fret 1st string). Try beginning with down picking. Change the same play with beginning with up picking. This is one example of controlled picking.<br />
There are different patterns of controls like 3rd down (C-A, B-G, A-F, G-E, F-D, .... ), alternate/3 string sweep, etc.<br />
If these maneuver is fluent, many things will be easier. Plus, shredding speed will also increase.<br />
<br />
At the same time, don't forget to listen to more good musics. And catch ideas from the music. Eventually, collection of these ideas will make brain lucrative to utilize, and improvising will be cool and sound.<br />
<br />
<br />
<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-53374035785021408572013-10-28T17:04:00.001-07:002013-10-28T17:04:34.933-07:00Guitarists...So, my favorite instrument is the guitar. Practically, I only can play the guitar. Many great musicians inspires me, but due to my limited time, when I get a chance to play it, I have to concentrate for just one thing.<br />
<br />
Anyway, my favorite guitarist is "Jason Becker." He is the god and the most fluent guitarist. At the same time, he had many brilliant ideas. Considering all of his work, which ended at his age of 29, he didn't have his best time, unfortunately.<br />
<br />
Then, my favorite "active" guitarist is "Guthrie Govan". He is very special, to tell the truth. Most of guitarists have own color, specializing handful of genre, Guthrie doesn't have specialty. He is really all-rounder. Rock, Blues, Jazz (Classic, Beebop, fusion, plus some brilliant covers with different colors), and Country. Picking, finger style, slap, tapping, arpegio, ... He also plays very good acoustic. His theory is very strong.<br />
<br />I recommend his videos in youtube. None have disappointed me, so far.Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-84626402597778618682013-08-21T15:51:00.001-07:002013-08-21T15:52:47.927-07:00Virtual Fighter 4 title musicMy youtube #11. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Cq5XDivo4pY?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<br />
<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-85769075312929985882013-04-30T21:23:00.002-07:002013-04-30T21:24:57.205-07:00My youtube #10.<br />
<br />
Time What is Time - Blind Guardian.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/OvONMnPeUZg?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-43922245462730498932012-10-22T22:13:00.001-07:002012-11-12T21:27:35.384-08:00Audacity slow-down calculator<b>*Note: this article is out-dated. Or, no-worth. I found that audacity fixed noise problem with tempo change.</b><br />
<br />
If you play music, audacity is an essential tool for many useful things. Copying music, Ear training, etc. When slowing down original source using "change tempo", annoying noise mixes with proper output. I walk two step to avoid noise. "change speed" and "change pitch".<br />
<div>
<br /></div>
<div>
How much parameter to give to slowdown but no noise, no pitch change is calculated.</div>
<div>
<div>
<br /></div>
<div>
#!/usr/bin/env python</div>
<div>
<br /></div>
<div>
import os</div>
<div>
import sys</div>
<div>
<br /></div>
<div>
a = raw_input("slow down percent (50% half speed): ")</div>
<div>
target_speed = float(a)</div>
<div>
target_pitch = ( 100.0 - target_speed ) / target_speed * 100</div>
<div>
<br /></div>
<div>
print "target pitch change: %2.2f" % target_pitch</div>
</div>
<div>
<br /></div>
Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-60858505966236662782012-10-03T08:04:00.001-07:002012-10-03T08:04:31.267-07:00About Enthusiasm<span style="background-color: white; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; line-height: 24px;">I read a Korean article (<a href="http://wangsy.com/blog/2012/10/passion/">http://wangsy.com/blog/2012/10/passion/</a>), and One made me think for a while is this:</span>
<br />
<span style="background-color: white; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; line-height: 24px;"><br /></span>
<span style="background-color: white; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; line-height: 24px;">요즘 드는 또 다른 생각이 열정이란 만들어 내는 것도, 지켜내는 것도 아닌 주어지는 것 같습니다. 마치 천부적 재능이, 말 그대로 주어진 것이듯 ,열정도 주어지는 것인 것 같습니다. 뭔가 매우 비관적이고 운명론적 사고관이지만, 요즘 드는 생각이 그렇습니다. 열정을 가져 보아라, 열정이 꺼지지 않도록 잘 지켜라는 조언은 천부적 재능을 받아 보아라, 왜 예쁘게 태어나지 않았니 라고 하는 것과 같은 부질없는 이야기 인 것 같습니다.</span><br />
<span style="background-color: white; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; line-height: 24px;"><br /></span>It's very difficult to argue or practically apply this sentence. But, I want to say that the author is so brave to tell this, because this is hard to say or hard to find an answer in practical world. After a while, I somewhat agreed.<br />
<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-18980311645578493712012-08-03T11:14:00.000-07:002012-08-03T11:19:48.708-07:00Software Design, or not?During my career, I saw many people who write good pieces of software. My goal has always been pursuing this. To write a good software like these people. But, here is an interesting thing to bring up.<br />
<div>
<br /></div>
<div>
So many of great software developers don't prepare separate time for designing!</div>
<div>
In my case, I need time to design what I will write. My design process is roughly like this:</div>
<div>
<br /></div>
<div>
1. Gather requirements. And list what should happen.</div>
<div>
2. Divide out inputs and outputs. This eventually determines "interface".</div>
<div>
3. Organize internal or intermediate data that I will handle in my system. And see if I have to store anything. (Store in memory for session, or store in DB for persistence). These will contribute a lot to concrete functions or classes. And key to the solutions.</div>
<div>
<br /></div>
<div>
Yep.. No UML, but my own way of listing and diagrams to represent. And this takes time. So much time, actually.</div>
<div>
I saw, and I am working with many great and smart developers. And I know they write close to flawless codes in a shot. My conclusion is "They also design, but they all do in their brain. Therefore, design process is fast, and sometimes it looks missing from outside." To be thorough, I need to check one by one through paper. So, I am solving problem case by case. This is inefficient, but so far this brings out my best quality. I wish I could do these check step in brain so that I can produce software faster. <br />
The key skill here is "memory", which is very hard to improve.</div>
<div>
<br /></div>Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-14822596742426092042012-08-02T14:36:00.002-07:002013-05-06T17:08:29.392-07:00Passing by a bird<b id="internal-source-marker_0.18498014472424984"><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">On the way to work this morning, I was driving my truck on 400 south at 60 mph. I saw a bird from a distance. He was flying -- entering low to cross the road from the right. This bird, interestingly, tried to turn the direction, right in front of my lane. While approaching to him(or her?), I recognized that it was </span></b><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">an eagle</span><b id="internal-source-marker_0.18498014472424984"><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> by his slow but strong wing flap. Since he just began to take off, he couldn’t fly high enough to clear height of my truck. Initially, I wasn’t bothered slowing down because birds are quick to fly away. But, the </span></b><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">eagle</span><b id="internal-source-marker_0.18498014472424984"><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> seemed to stay still in front of me trying to turn around. I put on a break a little bit and paid big attention to the distance to him. After my second slow down for the elevated alerting level, the </span></b><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">eagle</span><b id="internal-source-marker_0.18498014472424984"><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> finally finished turning.</span><br /><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">When we were close, the </span></b><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">eagle</span><b id="internal-source-marker_0.18498014472424984"><span style="font-family: Arial; font-size: 15px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;"> made a big wing-flap. I saw him very close through the top right corner of my front windshield. He missed me. Although, it was an alerting situation, his final wing flap (flying away) looked beautiful. He made total of 4 or 5 strong flaps during this incident, but 60 mph was a fast speed for natural creatures. I felt so relieved that I didn’t harm this beautiful bird.</span></b>Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-2169494374667155772012-06-25T20:52:00.003-07:002012-06-25T20:52:19.190-07:00Several drafts...I decided to use blog more to improve my writing skill. <br />
Still writing a blog post is a hard thing. I read somewhere to encourage blog posting saying "Invest a little more time writing facebook/twitter to write a blog post." (translated from Korean)<br />
<br />
So, here I am.<br />
My method to accomplish this was to use draft. I write freely and save as draft.<br />
I review my drafts and edits until I am satisfied to publish one.<br />
<br />
The reality is only having several drafts so far. Not one makes me happy to publish.<br />
The trend will be only having more drafts, but very few will be published. :)<br />
I really envy people who write fluently and describe one's thought on writing.<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com1tag:blogger.com,1999:blog-3451922019587875700.post-87510627132950275872012-05-18T21:49:00.004-07:002012-05-18T21:49:45.346-07:00my youtube #7<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/3bbcYveGCPw?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-9538115234203751912012-05-11T05:16:00.001-07:002012-05-11T05:16:25.411-07:00Back to Gentoo for one of my guestConfessing that I gave up FreeBSD, but came back to Gentoo.<br />
But not for my desktop. My desktop is Windows 7, although I don't like this.<br />
Running Gentoo as a guest with Enlightenment windows manager.<br />
<br />
Feel home!<br />
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-44475850508658106812012-04-04T19:43:00.002-07:002014-12-25T13:19:47.427-08:00Experience with FreeBSDI use Windows Vista on my laptop, but I miss Linux a lot. <br />
<div>
Maybe I am not the only one to see these days problems of popular Linux distros. "Bloated."</div>
<div>
My best featured machine is 5-year-old Dell Inspiron 1521 (AMD, 2G mem, 120G disk). This barely runs modern FC15 without visual effects. My choice of Desktop, KDE turned down my love with their broken nepomuk indexer. </div>
<div>
<br /></div>
<div>
I feel like, my laptop is ruled out. When I found myself disabling default stuffs just to make my user experience not terrible, a question came up. Aren't there any other distro for small boxes?</div>
<div>
Well, there are DamnSmallLinux. But that's not a major distro.</div>
<div>
How about Gentoo? I used to be a big fan of Gentoo, but now I don't like compiling unless I have to do so. If Gentoo supports binary packages a little better, that will be the perfect distro.</div>
<div>
<br /></div>
<div>
Then, FreeBSD came.</div>
<div>
1. FreeBSD is a major distro, and actually a traditional unix than Linux.</div>
<div>
2. FreeBSD supports not only source compilation, but also does binary packages. Very strong and convenient.</div>
<div>
3. If the software works on both FreeBSD and Linux, then most likely its compatibility level is very high already.</div>
<div>
<br /></div>
<div>
However, I just realized that #3 is self-torturing, too much. </div>
<div>
I was about to develop my own patch for screen-4.0.3 on FreeBSD, I ran into a different issue.</div>
<div>
Complaint of "sys/stropts.h".</div>
<div>
I didn't know what that header file supposed to be... But, well, elite programmers like screen developers use this, and there should be a reason to be used. So, I searched and learned about how FreeBSD organize compatibility header files. But, when I looked at binary patch file, disappointed a little bit.</div>
<div>
<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoKetBsxc2rVdA3s81oXd-hyeKtjfedhKbJz_XTr3hwGEyCMLYfsyXHsIB4e3fvb9pTV0ux-MmjLsDDuygpwGKXYtQBcaPYfC0TazuO0KsuKoovHraYxbsKm1tatq4Ne8fx-i-qmNytwUP/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"> <code style="color: black; word-wrap: normal;">
--- process.c
+++ process.c
@@ -37,7 +37,7 @@
#include "config.h"
/* for solaris 2.1, Unixware (SVR4.2) and possibly others: */
-#ifdef SVR4
+#if defined(SVR4) && !defined(__FreeBSD__)
# include sys stropts.h
#endif
</code>
</pre>
<code style="color: black; word-wrap: normal;">
</code></div>
<code style="color: black; word-wrap: normal;">
</code>
<div>
<code style="color: black; word-wrap: normal;"><br /></code></div>
<code style="color: black; word-wrap: normal;">
</code>
<div>
This happens three times in different files. </div>
<code style="color: black; word-wrap: normal;">
</code>
<div>
In other words, FreeBSD doesn't use this header. Reading a little more from stackoverflow, surely this is for Sun. Main source tree not having this patch means, FreeBSD isn't major enough, and I will run into this situations in the future.. This is self-torturing. </div>
<code style="color: black; word-wrap: normal;">
</code>
<div>
Fine! Close to 10 years of Development life won't give up this obstacle. It's tedious, but not difficult. So, I prepared seperate header directory from /usr/src/sys/compat/svr4/, and renamed its contents. (svr4_ was prefixed, DAMN!!). Modified Makefile and compiled. The next "make" command passed "sys/stropts.h", but another complaint.</div>
<br />
<code style="color: black; word-wrap: normal;">
</code>
<div>
<code style="color: black; word-wrap: normal;"><code style="color: black; word-wrap: normal;">utmp.c:731: error: 'struct utmpx' has no member named 'ut_xtime'</code></code></div>
<code style="color: black; word-wrap: normal;">
</code>
<br />
<div>
<code style="color: black; word-wrap: normal;"><code style="color: black; word-wrap: normal;"><br /></code></code></div>
<code style="color: black; word-wrap: normal;">
</code><br />
<div>
struct is difined differently?? From BSD and Linux??</div>
<div>
And again, from binary patch file (patch-os.c, patch-utmp.c) read about how to work around utmp problem (the patch was describing how to replace some sections of code, not just lines), I realized that "ENOUGH!!!" Having compatibility by paying this torturing is costly. I accepted that "FreeBSD isn't popular enough."</div>
<div>
<br /></div>
<div>
Now, I am not sure if I want to try out Arch Linux.</div>
<div>
<br /></div>
Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-77195767124733840882012-02-03T07:04:00.000-08:002012-02-03T07:10:04.160-08:00subversion can't roll back source file.<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 18px;">Hmm.. If I misunderstand, please someone correct me.</span><br style="background-color: white; line-height: 18px;" /><span style="background-color: white; line-height: 18px;">Subversion doesn't support "clean" way to roll back source code!! Again, delta based VCS is broken from the concept. This is not an issue with "git".</span></span><br />
<span style="background-color: white; line-height: 18px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="background-color: white; line-height: 18px;"><span style="font-family: Arial, Helvetica, sans-serif;">If I messed up codes, but they are not checked in, then simply subversion rolls back happily.</span></span><br />
<span style="background-color: white; line-height: 18px;"><span style="font-family: Arial, Helvetica, sans-serif;">"svn revert [filenames]"</span></span><br />
<span style="background-color: white; line-height: 18px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">I happily checked in a source change, and found out that I messed up later, merge comes into play.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">From svn book, </span><a href="http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo">http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo</a></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Command is simply this.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">"<span style="background-color: white;">svn merge -c -303 http://svn.example.com/repos/calc/trunk"</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif;">Now this is troublesome. What if the revision 303 check-in is huge, with many other files checked-in together?</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif;">In other words, revision 303 contains my mess-up, but all other check-ins from other files are fine, what should we do? We kill good changes simply exchange for roll back my bad change?</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Does anyone know if merge can work in file level?</span><br />
<br />
<span style="font-size: 12px;"><br /></span>Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-38432788859635477272012-01-31T15:31:00.001-08:002012-01-31T15:31:40.018-08:00My Youtube #6my youtube #6<br />
<br />
<a href="http://www.youtube.com/watch?v=CzdT-YY3J8k">http://www.youtube.com/watch?v=CzdT-YY3J8k</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/CzdT-YY3J8k?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-19201934042075087832011-12-31T21:08:00.001-08:002011-12-31T21:10:38.837-08:00youtube #5<a href="http://www.youtube.com/watch?v=0-xWadhoWKE">My youtube #5</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/0-xWadhoWKE?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-11677799525717462472011-12-26T18:55:00.000-08:002011-12-26T18:57:55.334-08:00youtube upload #4This time, it is Korean heavy metal.<br />
<br />
Kim Kyungho, "Judgement Day"<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/EwMlPOALm3s?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-20461584942021456152011-10-27T05:23:00.000-07:002011-10-27T05:23:48.148-07:00Hard to keep up the blog, thanks to twitter, G+, facebook.Thanks to those easy to use social media, I forget my blogs more often. I hope to get something interesting to post. These days, I don't have any specific subjects. Other than work and music, I don't run my side projects and researches.<br />
<br />
Maybe I can put my "type slow" practice. I definitely get benefit from that practice.<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0tag:blogger.com,1999:blog-3451922019587875700.post-79528361039196847992011-09-08T05:07:00.000-07:002011-09-08T05:07:16.703-07:00My third youtube upload.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/2FRXDvM05e0?feature=player_embedded' frameborder='0'></iframe></div>
<br />Raymondhttp://www.blogger.com/profile/12590881589757651877noreply@blogger.com0