November 12, 2019 5:45 PM, "Chris Ross" <cross+open...@distal.com> wrote:

>> On Nov 12, 2019, at 00:25, Stuart Henderson <s...@spacehopper.org> wrote:
>> 
>> sparc64 isn't on upstream's list of supported architectures
>> (https://golang.org/doc/install/source).
>> 
>> There's a third party fork adding this for an old version of go 
>> (https://github.com/4ad/go) but
>> even with this it's going to be a lot of work to get something usable, and 
>> even then there will be
>> problems building many programs that bundle a "vendored" copy of standard go 
>> libraries that will
>> need updating before they can be used.
>> 
>> It's likely to be much easier to rewrite the tools you want in C than it is 
>> to get go working.
> 
> Well, I don’t know how easy that would be either. These were both, I believe, 
> written by Gilles. I
> would appreciate your input Gilles. I see both of these particularly tools, 
> opensmtpd filters, are
> Golang only and require nothing beyond the standard library. It would be 
> ugly, but I might be able
> to hack them into my system with the go fork you mention above. Whether or 
> not I _want_ to is more
> complicated. :-/
> 

I don't know what input to provide here :-)

Any language can be used to write a filter, they're essentially reading stdin / 
writing stdout, with
the only constraint that operations should not block.

I wrote filters in C, Golang, Python & shell, some Linuxer wrote one in Awk, 
another in Rust, ...

The API was designed so that it is very easy to write filters using tools you 
know, so if you wonder
if you should hack an old go fork or use an existing filter as a model to write 
your own, my take is
to go the second option as you will avoid having to maintain a huge hack and 
might just have a thing
working in an hour or so.

There is a C library by martijn@ that can ease writing a C filter btw.

Gilles

Reply via email to