Applications/tools

Journal entries about applications and tools.

The more things change the more they stay the same...

Submitted by Greg Buchholz
on December 13, 2006 - 10:25pm

After we correct for the algorithmic differences, is there really that much difference between...

fibo 0 = 1 
fibo 1 = 1 
fibo x = fibo (x-1) + fibo (x-2)

first post

Submitted by zhaoke
on December 5, 2006 - 11:14am

Here is a good place for the referenceable kernel information, such as news, articles, etc. and the forum seems like not bad. ok, i will constantly come back here. :)

For more information about me, u can surf this:
My personal web: http://zhaoke.com
and Community Project: http://iventor.org

Setting up a Primary Domain Controller (PDC) with SAMBA

Submitted by UMBRO
on November 21, 2006 - 8:46pm

firewall settings on server and client side

port 137,138,139 and 445 needs going through the firewall. You can easisy get the port information of NETBIOS over TCP/IP by google.

Server Side (Asianux 1.0)
1. Edit smb.conf

The attatched file named smb.txt is a working example configuration file of SAMBA for me. Change the file name to 'smb.conf' before using it. You may just change the following part:

How to process (such as 'chmod' and 'rename') all files or sub directories in a directory

Submitted by UMBRO
on November 21, 2006 - 3:09am

quick 'chmod' examples:
1. 'chmod' all files in a directory:

find DIRECTORY_NAME -type f -exec chmod 644 {} \;
or
find DIRECTORY_NAME -type f | xargs chmod 644

2. 'chmod' all sub directories in a directory:

find DIRECTORY_NAME -type d -exec chmod 755 {} \;
or
find DIRECTORY_NAME -type d | xargs chmod 755

Blub is the language you know.

Submitted by Greg Buchholz
on November 20, 2006 - 12:02pm


Pascal Costanza wrote:


But in the general case, dynamic typing and static typing are not compatible. In Common Lisp, there are a lot of cases where you can very conveniently change types at runtime. So a static check of types would be a great burden. Here is my standard example for this:

(defclass person () 
    ((name :initarg :name))) 
 
(let ((p (make-instance 'person :name "Pascal"))) 
    (eval (read)) 
    (setf (slot-value p 'address) "Brussels")) 


There is no chance to see up front whether this program will fail or not, since the user can redefine the class person when (eval (read)) is executed. At that time, the slot 'address could be added to the class person.

I don't see any reason why that's not amenable to static typing...

Memoizing fixed point combinator in C++

Submitted by Greg Buchholz
on November 14, 2006 - 10:41am

Over on comp.lang.c++ they're discussing memoization of functions. Here's my version of a memoized fix point combinator...

#include<iostream>
#include<map>

std::map<int,int> memo_table;

struct Fix
{
    int (*f)(int,Fix);

    int operator()(int x, Fix g)
    { 
        return (memo_table.find(x) != memo_table.end()) 
               ? memo_table[x]
               : memo_table[x] = g.f(x,g);
    };
};

int fib(int n, Fix f) { return n < 2 ? n : f(n-1,f) + f(n-2,f); }

int main(int argc, char *argv[])
{
    Fix g = {fib};
    std::cout << g(40,g) << std::endl;
    return 0;
}

Qt programming

Submitted by jh
on November 12, 2006 - 3:38pm

Started to learn Qt 4.x programming. I'm actually GNOME guy, but Qt 4.x feels extremely nice. I'm sure that KDE 4.x will be awesome.

Some EJB3/Mugshot hacking and testing. Finally my Eclipse works 100% well with Mugshot's SVN repository. Eclipse 3.2 feels really good development platform. Much faster than previous versions also...

Type system computation

Submitted by Greg Buchholz
on November 8, 2006 - 12:03pm

Over on comp.lang.lisp we have a comparison of between the type systems of lisp and ML. I don't know enough about ML to know whether it is or isn't up to the challenge, but here's a teaser of how you could go about it in Haskell. First off, we need a data type that knows about the range of possible values for its integral argument. And then we need to be able to exponentiate the range...

More Efficient Bytecode Interpreters Instead of Just-in-Time Compilation

Submitted by bluefoxicy
on November 7, 2006 - 2:52pm

I just noticed an article on Slashdot about Adobe giving Mozilla a new piece of code. This is an ECMAScript interpreter, which can lay the basis for a complete JavaScript engine. Unfortunately, I also noticed a rather disturbing reference in the comments:

On compilers, the current SpiderMonkey engine can convert JavaScript to byte code, but does not have the ability to convert byte code to native machine instructions; this is a major feature that Tamarin provides. I don't know enough to comment on relative code quality; I'll leave this to others who've actually had experience with both code bases.

This is getting out of hand. Just-in-Time compilation in Gecko? So far it's just a suggestion; but compiling to native code Just-in-Time is unportable and has security implications on high security systems. Perhaps it would be more worthwhile to spend time improving the state of interpretive execution (bytecode interpreters)?

Dual Core and Games

Submitted by bluefoxicy
on November 5, 2006 - 7:38pm

Seems these days there's loads of chatter about dual-core systems and how they're going to be so much better than single core systems. On the other hand, there's a large amount fo chatter about how much dual core is useless and the benchmarks show you don't get any more FPS but 1 or 2 from dual core. We all know the only thing games do is pump FPS, so obviously games can't take advantage of dual core processors right? WRONG. Maybe if these people knew anything about computers besides that they play Halflife 2 they'd know how stupid this notion is.

Turlock

Submitted by Jeremy
on November 1, 2006 - 11:56pm

I hurried down I-5 as that seems to be what you do on Interstates, only not hurrying as I passed through Sacramento where I got stuck in traffic. That's the third time I've passed through Sacramento, and the third time I got stuck in a traffic jam there. Further south I nearly detoured to Lodi just so I could sing a little CCR and complain about being stuck in Lodi again, arriving in Turlock just in time for a tasty sushi dinner with my friend Donald and his six year old daughter Emmie. I hung out with them for a couple of days, playing guitar, playing with Emmie (whom I immediately fell in love with), and catching up with Donald.

Lassen Volcanic National Park

Submitted by Jeremy
on November 1, 2006 - 10:50pm

My intention had been to head south when I left Chico, but after looking over my California map I became curious about a National Park only a few miles away. So I headed out from Chico in the exact opposite direction as I had intended, greatly enjoying driving north on Highway 32 which immediately leads through some beautiful canyons, then up over a mountain pass and into Lassen National Forest where it begins to wind dramatically. The road had numerous "deer crossing" signs for good reason, though not all heeded them as I saw multiple road kills as I winded along. From highway 32 I turned onto Highway 89 and followed it up into Lassen Volcanic National Park.

At the entrance gate an attractive park ranger provided me with a collection of pamphlets and kindly waved the $20 entrance fee as it was getting late in the day with only a couple hours of daylight left. The road winds up the volcano to a maximum elevation of 8,512 feet, twisting back and forth with some amazing vistas and cliffs. Sadly as there was only enough daylight to drive through the park, I didn't get to enjoy any of the area's hikes, though in a couple of false starts I did find that the high elevation left me breathless quite quickly. I exited from the far end of the park as the sun was setting, enjoyed a final view of Mount Lassen, then headed across highway 44 into Redding for the night.

"Microkernel" X11?

Submitted by bluefoxicy
on October 30, 2006 - 7:56pm

I've noticed a lot of people I've talked to (mainly self-proclaiming X11 experts--some of them respected Xorg devs, others just users who think they have a clue) say it's technically infeasible or not useful to do a number of things, like threaded X or reloading of config files without restarting X. I've noticed a few problems (on Linux) and I'm thinking there may be some use to rewriting X in a 'microkernel' style (yes I know it doesn't make sense; just force the connection). This was also posted to comp.os.minix, if anyone cares.

Compiling Omega with GHC 6.6

Submitted by Greg Buchholz
on October 24, 2006 - 7:59am

Here are the changes I needed to make in order to get Omega to compile with ghc-6.6.

Changlog entry:

18Oct2006  Greg Buchholz 

  * DepthFirstSearch.hs : Changed from using the ST module to Control.Monad.ST
                          and Data.Array.ST
  * Infer2.hs : Modified to use Data.Map instead of deprecated Date.FiniteMap
  * Toplevel.hs : Modified to use Data.Map 
  * Makefile : Get rid of ghc-6.4 specific "-package lang", let "-make"
               figure it out for us.

...and the diffs.

Lake Tahoe

Submitted by Jeremy
on October 15, 2006 - 10:36pm

With the arrival of another weekend, it seemed like a good plan to do a little more exploring. This time I set out for Lake Tahoe, as several people had raved about it to me. As it turns out, it was well worth the trip. I didn't get ouf of San Francisco until late, so it was already getting dark when I rolled into Tahoe City. I claimed the last room in a hotel on the main drag, then wandered around town for a while. Didn't find much beyond supper, the town seemed to shutdown relatively early.

The following day I asked around for good hiking trails, and without any solid leads decided to just start driving around the lake until something presented itself. The lake itself was worth the drive, and I nearly decided to just spend my whole day on its edge. But crossing into Nevada I ended up in the Lake Tahoe State Park and ended up doing a five mile hike into the "backcountry". A very beautiful trip, and one that showed me I'm starting to get out of shape -- though maybe I can blame my tiredness on the 8,000 foot elevation.