Category Archives: Programming

Programming – C/C++, Java, Ksh, Python, ML

crypto – use Linux kernel crypto API

Crypto is an important part of the Linux kernel source code. One can tell from the standalone crypto directory under the kernel source tree. Device drivers, file system and security all need crypto. This post does not help understand the … Continue reading

Posted in OS, Programming, Security | Tagged , , , , , | 3 Comments

vmrun – run your VMware VM without GUI

Virsh is my favorite cmdline for KVM management. You may wonder if there is sth similar for VMware or want to run VMware without GUI. Here is goes – vmrun. 0. VIX API VIX API allows users to automate the … Continue reading

Posted in Programming | Tagged , , | 8 Comments

Something about float point math – function call vs. operator

This post is triggered by a question of Python – “Is there any difference between pow() and ** operator?”. Similarly, this question applies to C and Java – “Is there any difference between pow(1, 2) and 1*1?”. The first thing … Continue reading

Posted in Programming, Stuff about Compiler | 1 Comment

A paper review – seL4: Formal Verification of an OS kernel

Paper review for – seL4: Formal Verification of an OS Kernel daveti@cs.uoregon.edu Dec 10, 2013 How could we guarantee the code we are running is right? Even after different and long-time testing, we have yet not been so sure that … Continue reading

Posted in Embedded System, OS, Programming, Security | Tagged , , , , | Leave a comment

cgpic – Calling GProlog in C

Prolog is a straight-forward way to implement simple logic rules and do the query of the system. GProlog(gprolog) is the GNU version of Prolog implementation. To leverage the power of gprolog into our system code (C/C++), there are usually 2 … Continue reading

Posted in AI/ML, Programming | Tagged , , | Leave a comment

create Linux kernel proc entry – some good-to-know tricky stuffs

It costs me 2 days to make a kernel module written few years ago back to work again. However, there is nothing fancy within the module except adding a new proc entry under /proc/sys/net/ipv4, which I would never know is … Continue reading

Posted in OS, Programming | Tagged , , | 1 Comment

timer queue – a way to handle multiple timers using one thread

This post introduces a general way to handle multiple timers using one thread using C. K.R.K.C. -daveti 1. what is timer? The essence of timer is eventually a thread (either Python or Java threads are actually mapped and executed as … Continue reading

Posted in Programming | Tagged , , , | 3 Comments

Something about dynamic lib – ldd, ld.so.conf, nm, dlsym()

Dynamic lib may be the widely used mechanism for code reusing and memory saving, both for Windows and UNIX/Linux systems. To better understand the dynamic lib, we will try to fix the famous error during linking and investigate the symbols … Continue reading

Posted in IDE_Make, Programming | Tagged , , , , , | Leave a comment

Use POSIX regex in C

There is no standard regex lib in glibc. However, almost all UNIXs, Linux and even Mac OS should support POSIX regex, which provides a way to do regex processing in C. Below is the real example under Linux. For Mac … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Parallel PAM – a PAM implementation using Parallel Python

pyCluster is a Python implementation for clustering algorithms, including PAM and CLARA, which are widely used in Data Mining. To better the performance of PAM, parallel PAM is designed and implemented using Parallel Python. The experiment shows that parallel PAM, … Continue reading

Posted in AI/ML, Dave's Tools, Programming | Tagged , , , | 1 Comment