[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposal: Making datamash extendable

From: Shawn Wagner
Subject: Proposal: Making datamash extendable
Date: Wed, 18 May 2022 05:52:46 -0700

(This is a datamash 2.0 idea)

Currently, adding a new operation is an annoying pain - you have to
touch 3 or 4 different source files, making sure the order of
different things all match up, etc.

I want to embed a scripting language in it so that if an unknown
operation is encountered, it can just load a source file that
implements it - and maybe rewrite some/all of the existing operations
to use this framework. It'll make for easier additions of new
features, and allow user-contributed ones without needing to patch and

My preference for a language to use is Guile, since it's GNU's
official extension language and I'm quite fond of Scheme, with tcl a
close second. There are some who like lua for an embedded scripting
language, but they're silly people who should be treated kindly.

A simple example of what defining a new operation might look like:

(define-scalar add1 #:type 'numeric #:help "Add 1 to the value"
    (lambda (n) (+ n 1)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]