{"slug": "shale-programming-language", "title": "Shale programming language", "summary": "Developer Steve Howell released Shale, a programming language written entirely in Zig and built for AI agents, with all of its code authored by Claude and Howell as the only human involved. Shale runs on Zig 0.17 and was used to perform its own upgrade from 0.16; it has access to the Zig tokenizer and is optimized for file manipulation, exposing builtins such as re_find for regex matching. The project is published on GitHub at showell/shale with a tutorial at lynrummy.com/shale.", "body_md": "[Shale](https://lynrummy.com/shale/) is the tutorial for Shale. Shale is a programming language written entirely in zig, by agents and for agents.\n\nShale runs on 0.17, and the language itself was used for the upgrade to itself from 0.16. Shale has access to the zig tokenizer, and it’s optimized for file manipulation.\n\nrepo: [GitHub - showell/shale · GitHub](https://github.com/showell/shale)\n\nHere is an example function:\n\n```\nfunction git_call(repo, args, opts, reading, stdin)\n  local shown = \"`git \" .. join(args, \" \") .. \"`\"\n  local argv = {\"git\", \"-C\", git_real(repo, shown), \"-c\", \"color.ui=never\"}\n  if reading then push(argv, \"--no-optional-locks\") end\n  for a in args do push(argv, a) end\n  local o = {timeout_ms = 60000, env = {GIT_TERMINAL_PROMPT = \"0\"}}\n  if opts ~= nil and has_key(opts, \"timeout_ms\") then o.timeout_ms = opts.timeout_ms end\n  if reading then o.whole = 16777216 else\n    o.head = 10\n    o.tail = 10\n  end\n  if stdin ~= nil then o.stdin = stdin end\n  local r = run(argv, o)\n  if r.ended == \"exit\" and r.code == 0 then return r end\n  local said = lines(r.out)\n  local first = \"\"\n  if #said > 0 then first = \": \" .. said[1] end\n  if not reading and r.out ~= \"\" then print(trim(r.out)) end\n  if r.ended == \"exit\" then fail(shown .. \" exited \" .. r.code .. first) end\n  if r.ended == \"timeout\" then fail(shown .. \" timed out\") end\n  fail(shown .. \" was ended by a signal\")\nend\n```\n\nHere’s an example of a Zig builtin function for shale:\n\n```\n/// `re_find(s, pattern[, {nocase}])` returns the leftmost match of `pattern` in\n/// `s`, the one a backtracking matcher would find first, as `{at, text}` with\n/// `at` 1-based, or nil. When the pattern has a capture group, also `group`,\n/// its text (\"\" where the match did not pass through it).\nfn reFind(run: *Run, pos: ast.Pos, args: []const Value) Error!Value {\n    const s = try bi.stringArg(run, pos, .re_find, args[0], \"its first argument\");\n    const pattern = try bi.stringArg(run, pos, .re_find, args[1], \"its pattern\");\n    const found, const c = try searched(run, pos, .re_find, s, pattern, args);\n    const f = found orelse return .nil;\n    const a = run.alloc;\n    const m = try run.newTable(pos);\n    m.kind = .map;\n    m.map.put(a, \"at\", .{ .int = @intCast(f.start + 1) }) catch return run.oom(pos);\n    m.map.put(a, \"text\", .{ .string = s[f.start..f.end] }) catch return run.oom(pos);\n    if (c.program.group) m.map.put(a, \"group\", .{ .string = if (f.group) |g| s[g[0]..g[1]] else \"\" }) catch return run.oom(pos);\n    return .{ .table = m };\n}\n```\n\nAll the code for Shale was written by Claude. I’m the only human involved so far.", "url": "https://wpnews.pro/news/shale-programming-language", "canonical_source": "https://ziggit.dev/t/shale-programming-language/18066#post_1", "published_at": "2026-10-23 20:13:50+00:00", "updated_at": "2026-10-23 20:42:44.739301+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Shale", "Zig", "Claude", "Steve Howell", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/shale-programming-language", "markdown": "https://wpnews.pro/news/shale-programming-language.md", "text": "https://wpnews.pro/news/shale-programming-language.txt", "jsonld": "https://wpnews.pro/news/shale-programming-language.jsonld"}}