Skip to main content

Ralsina.Me — Roberto Alsina's website

Wanted: C programmer

Check­ing on my semi-dead pro­ject­s, I found that one was al­most fin­ished but I had for­got­ten about it: rater

In or­der to make it re­al­ly use­ful, how­ev­er, I need a C pro­gram­mer that can turn this python pro­gram:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
from socket import *
serverHost = 'localhost'
serverPort = 1999

s = socket(AF_INET, SOCK_STREAM)
s.connect((serverHost, serverPort))
print "Sending: ",' '.join(sys.argv[1:])
s.send(' '.join(sys.argv[1:])+"\n")
data = s.recv(1024)
sys.stderr.write(data)
sys.stderr.flush()
sys.exit(int(data.split(' ')[0]))

In­to a nice func­tion that nev­er fails and nev­er leaks mem­o­ry (of course, it should re­turn in­stead of ex­it, this is just ex­am­ple code ;-).

If that's done, I can re­lease rater as a use­ful tool, which should find a home in many qmail in­stal­la­tions (and maybe oth­er us­es).


Contents © 2000-2024 Roberto Alsina