Tuesday, June 21, 2011

Entropy Key to work with Fedora

If you don't know what this device is, it is a small USB key that is inexpensive TRNG (True Random Number Generator) device. If you decide to get one of these things and you are not computer, programmer, linux savvy you may have a little trouble getting it up and running without some clear guidance, so I have put together some reproducible steps for installing:


1) I didn't bother trying the provided RPM packages since none were packages specific to fedora

2) Lua is already installed on most systems but you will also need lua-socket, an add on for lua that provides sockets support. You can't just install the lua-socket from yum- you have to make small changes to lua-socket and install manually. The changes required will (a) install lua to the correct place for fedora, (b) add configuration for UNIX domain sockets for lua, which are not enabled in the fedora package.

I did a google search to find the changes I needed (google: lua socket unix diff). The result I found was for FreeBSD but it works the same:
[1] on freebsd-8 (CURRENT):
/src/localcode/lua/luasocket-2.0.2
0 # hg diff
diff --git a/config b/config
--- a/config
+++ b/config
@@ -51,7 +51,7 @@
# Compiler and linker settings
# for Linux
CC=gcc
-DEF=-DLUASOCKET_DEBUG
+DEF=-DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic
LDFLAGS=-O -shared -fpic
LD=gcc
diff --git a/makefile b/makefile
--- a/makefile
+++ b/makefile
@@ -10,6 +10,8 @@
INSTALL_SOCKET_LIB=$(INSTALL_TOP_LIB)/socket
INSTALL_MIME_SHARE=$(INSTALL_TOP_SHARE)/mime
INSTALL_MIME_LIB=$(INSTALL_TOP_LIB)/mime
+#
+INSTALL_UNIX_LIB=$(INSTALL_SOCKET_LIB)

all clean:
cd src; $(MAKE) $@
@@ -45,6 +47,8 @@
#cd src; $(INSTALL_DATA) $(TO_MIME_SHARE) $(INSTALL_MIME_SHARE)
cd src; mkdir -p $(INSTALL_MIME_LIB)
cd src; $(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_LIB)/core.$(EXT)
+ cd src; mkdir -p $(INSTALL_UNIX_LIB)
+ cd src; $(INSTALL_EXEC) $(UNIX_SO) $(INSTALL_UNIX_LIB)/$(UNIX_SO)

#------
# End of makefile
diff --git a/src/makefile b/src/makefile
--- a/src/makefile
+++ b/src/makefile
@@ -47,7 +47,7 @@
usocket.o \
unix.o

-all: $(SOCKET_SO) $(MIME_SO)
+all: $(SOCKET_SO) $(MIME_SO) ${UNIX_SO}

$(SOCKET_SO): $(SOCKET_OBJS)
$(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS)

3) Install the patched lua-socket (command: make && make install )

4) Follow the rest of the original instructions for generating a key and running the provided daemon.

To test that your key is working you can run one of the stat tools or just cat /dev/random..

Tuesday, June 8, 2010

Frontier Airlines "Upgraded Seating"

I recently spent a long weekend in California hiking around in the parks and was completely exhausted by the time we were leaving. At check-in the kiosk asked if I wanted to upgrade seating to a 'stretch' row seating. I elected yes, put in my card for the charge, and was on my way to be seated in the plane.

The row they placed me in was one that the seats had LESS leg room due to the position in front of the exit row and the seats did not recline!

I called Frontier Airlines customer service that said: because there was no charge on my card that they could not reimburse me, and that for whatever reason they moved my seating at that time- probably because I elected to have my seating moved.

Frontier Airlines has a horrible policy to rearrange their seating by calling them "upgrades", and then do nothing for customer service. If anyone else had a similar experience or knows how to be reimbursed or compensated for this shady behavior, please let me know.

Wednesday, June 3, 2009

XBox 360: Project Natal

Project Natal aims to be pretty much everything I was working on with cameras and stereoscopic vision in college. The setup is eerily the same too, with dual fixed cameras negotiating the 3D scene. Youtube video here. Since I have walked this path, however short it was for myself, I do have some thoughts about this project and potential limiations:

Camera speed and synch:
Both camera's have to synch frames (ideal) or do some extra processing to negotiate and calibrate themselves for the difference. This is a bit processor intensive to have a perfect synch of the scene and to negotiate the differences if they are not hardware synched.

Camera resolution:
I am hoping that Microsoft realizes how much money thay can make from this type of system and invest some real money to help offset the costs for the consumer on the hardware. High quality (resolution/fps) cameras don't come cheap and are what is needed to have this system accurate.

Camera auto focus/ auto brightness and color calibration:
The operating space for these cameras will likely be in very bright rooms with constantly changing lighting situation- between daylight with constant change in brighness due to clouds, to directional and poorly lit indoor lighting. I have a feeling infrared light projection may be ok for motion and object detection and tracking, but change in lighting situation or ambient artifical light may cause innaccuracies.

Processor intensive, highly parallelizable:
I am guessing this system will not be on xbox 360 considering hardware limitations, and will likely instead be on some platform that can take full advantage of the latest in parallelizable technologies and stream computing- such as nvidia CUDA or OpenCL. I can see this being the ideal application for next generation hardware consisting of hundreds of processor cores chugging away at image processing.

I really really hope this hardware comes out because it is exactly the setup i had been playing with years ago and it would be a dream come true to see it in its final/finished form the way I had designed it.

Saturday, May 23, 2009

Terminator Salvation (I give it a 4 out of 10)

I went to see terminator salvation the other day. If you go to see this movie you will notice that Christian Bale is a horrible actor in the very first scene. You will also hate whomever decided to make a terminator movie with seemingly little consideration for the previous terminator movies. The moview is worth watching if you are into unrealistic action sequences. The mile thick coating of plot flaws and poor acting combined with atrocious acting across the board will make you wonder why they decided to further ruin the Terminator franchise. The only redeeming points of this movie were some mildly entertaining (yet unrealistic) action sequences and (spoiler) some old school songs from the soundtrack from T2 are notable.

What I hated most (spoiler): In previous Terminator movies the mood of the film was always a constant chase from almost certain death. In salvation it seems that the terminators won't really hurt you if they get their hands on you, only throw you through some walls and punch you. What I liked most about the Terminator movies was that you knew with absolute certainty that if the terminator got close enough then the people would die- except with salvation where the worst that will happen if they catch you is throw you through some walls. By far the worst plot flaw was that the terminators big plan was to capture Reese (John's father who goes back in Terminator 1) to lure John to save him. Why didn't they just kill him?

Tuesday, May 19, 2009

Stitched tabs? Mozilla ( my mozconcept )




I can't think of a good name for it but the idea is simple: all tabs are stitched together at the seams and allows for viewing more than one web page at a time and to scroll through open pages. Here are the core concepts:

Watch the VIDEO here which explains it much better:
http://vimeo.com/moogaloop.swf?clip_id=4723419


      1. All tabs are stitched together. The open pages are visible from one to the other and parts of adjacent pages may or may not also be visible.


      2. Borders between pages are adjustable to reflow the layout of the page.


      3. Scaling of each page independently from eachother so the user can work with them completely separately.


      4. Bottom horizontal scroll bar is the default scroll for moving between tabs.


      5. Scrolling for each is independent from the rest


      6. Sidebars can be used to export parts of selected text from one of the browser panes to perform complex actions- like perform a google search in the pane when it is selected or dragged.


      7. Dragging from favorites on sidebar creates new tab- dragging action defines width of the page (as it is loading).


      8. New tabs created in the center with default width, pushing contents to left and right.


      9. Colors flash when the default page changes (the one that has focus in the center) to illuminate which pages are which and which one has focus on the address bar.


      10. Tab labels become editable or accept new addresses.


      11. Border between pages AND border between sections of horizontal scroll bar can be used to adjust widths of the pages.


      12. Width of the tab on the bottom width relative to the page that is being displayed.

      Update: I just saw a video about weave- a new feature targeted at mobile synching of tabs. I think my idea would be a good fit for use in a mobile browser and would make weave more powerful. See the video I saw here: http://vimeo.com/2569344



      Mozilla Labs Design Challenge - Official Concept

      Tuesday, May 12, 2009

      Me using Windows 7 RC1 on my Lenovo T61p

      This week when I bought my X25-E I spent an entire day playing around with different configurations of software: XP, vista, and Windows 7 were all at my finger tips. I started by installing XP from the Lenovo recovery disks. I figured to get the driver support and all the IBM drivers I would want to stick with this setup. After running the restore and trimming the fat I went through installing a bunch of crap and then realized the install was messed up. The security manager for Lenovo had the wrong password and I would need to restore again to fix this. I decided to play with the drive briefly and then looked over to my shelf with Windows 7. Why not.

      After installing windows 7 (straight forward) i was worried I wouldn't be able to have acceleration for the onboard video. I had trouble in the past obtaining drivers because the nvidia drivers don't always work if they don't come from the manufacturer (I have no idea why they do this). Luckily it just worked out of the box. Windows update found all the drivers for my hardware and I was good to go! Of course, I hadn't realized at the time that I was wrong. I still have no microphone which I have not yet looked into. I realized this when trying to skype a conference call today and had to resort to using the macbook.

      So far- I like it. Windows 7 seems to be snappy and fast. The interface is nicer than vista (yet familiar) and the UAC settings are easier to access and adjust. The distinct feeling is that microsoft realized with this releas that they could not go down that road they tried with Vista- which was to make software inately incompatible in an effort to try to force all developers to write software for it. The only things I dislike are moving files on a remote share gives a warning each time with no visible way to disable this. I have also noticed some hickups- where the mouse seems to stick for a moment or the keyboard keys keep pressing by themselves. It seems almost daily that there are updates for the system and I can't actually remember the last time the sticking happend (this morning maybe?). I had updated earlier today, and for all I know It could be fixed by now.

      Me and my Intel X25-E

      This week I purchased and installed an obscenely expensive 64 gb drive for my laptop ($800). I had read an article from Joel Spolsky about the 160gb X25-M drive that he test drove. He was looking to see if he could cut down his compile times by using a faster drive- which didn't happen. His description of how snappy things ran on the solid state disk drove me to thinking I had to have one. I looked into the specs and found that the X25-E had a considerable performance lead on the X25-M. The E also did not exhibit slowness as the drive filled as the M does which is common with Solid State disks. The E is also more reliable for top speed being sustained over the ownership of the drive and was much more likely to last longer. All that being said I just went for it.

      Performance? This thing is great! My main purpose for buying this drive was to quickly be able to index and perform queries on development databases for data mining projects I am working on. I noticed a tremendous speed increase here. Unfortunately, no numbers- but I did notice that when I was running a very large query that took several minutes the CPU was 50% (100% load on a core) and my system was still extremely fast and snappy. Finally I can run my machine into the ground with work without having usability issues with other apps. I was able to open a very large VS9 solution in les than 2 seconds even after high CPU load, as well as all my other apps.

      For a long time I have been resisitant to using FireFox since it became as bloated as it is today. It would take a considerable time to start so I opted for running chrome instead. Now that firefox starts under 1 second, I can again use firefox as I did back in teh early days of its existence.

      To anyone who may be reading this that is not sure if it is worth it: it is. At least get the X25-M drive which is considerably less expensive. I am not sure if the E really makes all that much of a difference (read Joel's blog post).