Angort

1 program Added 2026-02-28T12:51:27Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit f70d5f982c · authored 2026-02-28T13:52:17+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Anglican (0.20)Andl (0.17)Anko (0.17)Ante (0.17)Tart (0.17)

LLM-contributed programs

File Locator DSL

Provenance: commit f70d5f982c · authored 2026-02-28T13:52:17+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.ang · added: 2026-02-28T12:51:27Z
#!/usr/local/bin/angort

# Helpful file locator/scanner DSL. Currently uses locate to generate
# an initial list from the string given on the command line, then
# permits one to filter it in various ways. Use "h" for help.


[`time, `regex, `sys, `io] each { i library drop}
#`future nspace [`slice] import

# 1 sys$debug

require "util.ang" drop

# generate the main list - a file list consists of a list of tuples,
# tuples are [filename,stathash]. Input is a list of filenames.
# The stathash is either a io$stat hash, `nodata (initial value)
# or `none (we checked and the file doesn't exist)
:genlist |input:|
    "Generating master list..".
    [] ?input each {
        [i,`nodata], # no stat data initially
    }
    nl
;

# sets the stat data in the file tuple passed in, if it has not
# been set, and returns it. If the file doesn't exist, sets to none.
# The initial value is `nodata.
:getstat |t:|
    ?t snd `nodata = if # only stat if not done
        ?t fst io$stat # might be none
        1 ?t set
    then
    ?t snd
;

:runlocate |term,icase:|
    "Running locate...".
    "" [
        ?icase if "-i" , then
        ?term] "/usr/bin/locate" sys$execpipe "\n"
    split dup pop drop genlist !MasterList
    "Found " p ?MasterList len p " files".
;

# list of filter functions, of the form [descstring,(string -- bool)]

[] !Filters

:mkaddfilter |term:rx|
    ?term regex$compile !rx
    (fst ?rx regex$match len);

:mkaddfilteri |term:rx|
    ?term regex$compileicase !rx
    (fst ?rx regex$match len);

:mksubfilter |term:rx|
    ?term regex$compile !rx
    (fst ?rx regex$match len not);

:mksubfilteri |term:rx|
    ?term regex$compileicase !rx
    (fst ?rx regex$match len not);

:mkcontentfilter |term:|
    (|a:|
        "" ["-l",?term,?a fst]
        "/bin/grep"
        sys$execpipe len
);

:rmfilter |s:|
    ?s len if
        ?s toint !s
        ?s 0 >= ?s ?Filters len < and if
            ?s ?Filters remove drop
        then
    then
;

:repchar |char,ct:| "" 0 ?ct range each {?char+};

:runfilters |:oldcur|
    "Filtering..".
    ?MasterList ?Filters each {
        i snd filter
    } !List
;

Contribute — propose a file extension

Tell us where to find evidence about Angort (mapped to pl/angort). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Angort/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Anglican angr →