Away for a week
by Zef Hemel- Published:April 29th, 2004
- Comments:4 Comments
- Category:General
My grandparents are married 50 years so we’ll be spending the coming week on Terschelling (one of our country’s islands).
My grandparents are married 50 years so we’ll be spending the coming week on Terschelling (one of our country’s islands).
I’ve moved again! This time to my very own VPS (Virtual Private Server). A host offering VPSes has a server with a load of memory in which it runs multiple virtual machines, each VM has it’s own memory, CPU power, partitions and files. That means that from the user perspective it seems like you’re hiring a dedicated server. You get root access and can install any software you like. Of course, that’s very cool. I can now install mod_python, java, mono, CVS, Subversion and any other application I like. I just moved ZefHemel.com to the new server and my mail is hosted there too.
Drawback is that you have to install everything yourself, I started with a clean Debian install and had to get apache, ftp and the mail servers to work myself (which wasn’t easy). But I did it
I got 3gb of space (but remember I have to store all my system files there too), 128mb of RAM and unmetered traffic (upto 1tb/month I believe). It’s hosted at JVDS which I heard lots of positives stories about (at webhostingtalk.com).
We’ll see how it goes and let’s see what I’ll host here, unmetered traffic, that opens a lot of perspectives. ![]()
MSDN:
The Microsoft Visual C++ Toolkit 2003 includes the core tools developers need to compile and link C++-based applications for Windows and the .NET Common Language Runtime:
- Microsoft C/C++ Optimizing Compiler and Linker. These are the same compiler and linker that ship with Visual Studio .NET 2003 Professional!
- C Runtime Library and the C++ Standard Library, including the Standard Template Library. These are the same static-link libraries included with Visual Studio.
- Microsoft .NET Framework Common Language Runtime. Visual C++ can optionally build applications that target the Common Language Runtime (CLR).
- Sample code. The toolkit includes four samples designed to showcase the powerful new features of the 2003 version, including new optimization capabilities, features to improve code-security and robustness, enhanced ISO C++ standards support, and the ability to use the .NET Framework library and target the CLR.
For those still programming in C++, now you can get the best C++ compiler for Windows for free.
Download it now.
One of the things I liked in C# is its event-system. Although you need quite a lot of code to define an event. When I saw Python supports operator overload, I thought I’d try to implement such an event system in Python, and I did in 12 lines of code:
class Event:
def __init__(self):
self.listeners = []
def __call__(self, *params):
for l in self.listeners:
l(*params)
def __add__(self, listener):
self.listeners.append(listener)
return self
def __sub__(self, listener):
self.listeners.remove(listener)
return self
This is how you can use it:
class MyClass:
def __init__(self):
self.Clicked = Event()
def click(self, button):
self.Clicked(self, button)
def onClick(sender, button):
print 'Button clicked: %s' % button
o = MyClass()
o.Clicked += onClick # subscribe to event
o.click('Right') # Trigger the event from outside
Cool huh? ![]()
A couple of days ago I got Python in a nutshell. I’ve been playing with Python a bit (trying to write a threaded server).
What I like:
for n in range(0,10): print n
for i in range(10):
for j in range(10):
print i, j
And this won’t:
for i in range(10): for j in range(10): print i, j
What I don’t like: