Pluto

1 program Added 2026-02-27T06:34:33Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: PlutoLang
Provenance: commit 5987c04a9e · authored 2026-02-27T07:34:54+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

Go (0.28)Pixilang (0.28)Pocketlang (0.25)Slang (0.25)Plato (0.24)

LLM-contributed programs

Built-in Operators Implementation

Provenance: commit 5987c04a9e · authored 2026-02-27T07:34:54+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.pluto · license: MIT · added: 2026-02-27T06:34:33Z
-- lparser.cpp's builtinoperators

local Pluto_operator_new <const> = function(mt, ...)
  if not mt then
    error("attempt to construct a nil value")
  end
  if mt.new then
    return mt.new(...)
  end
  local t = {}
  setmetatable(t, mt)
  if not rawget(mt, "__index") then
    mt.__index = mt
  end
  if mt.__construct then
    mt.__construct(t, ...)
  end
  return t
end

local Pluto_operator_extends <const> = function(c, p)
  if (p_type := type(p)) != "table" then
    error("expected a class or class-like table to extend, got " .. p_type)
  end
  for {
    -- luaT_eventname
    "__index", "__mindex", "__newindex",
    "__gc", "__mode", "__len", "__eq",
    "__add", "__sub", "__mul", "__mod", "__pow",
    "__div", "__idiv",
    "__band", "__bor", "__bxor", "__shl", "__shr",
    "__unm", "__bnot", "__lt", "__le",
    "__concat", "__call", "__close",
    -- misc
    "__tostring", "__pairs"
  } as mm do
    if p[mm] and not c[mm] then
      c[mm] = p[mm]
    end
  end

  setmetatable(c, { __index = p })
  c.__parent = p
end

local Pluto_operator_instanceof <const> = function(t, mt)
  t = getmetatable(t)
  while t do
    if t == mt then
      return true
    end
    t = t.__parent
  end
  return false
end

local Pluto_operator_spaceship <const> = function(a, b)
  return a ~= b ? a < b ? -1 : +1 : 0
end

local Pluto_operator_ipow <const> = function(x, p)
  local res = 1
  while p > 0 do
    if p & 1 ~= 0 then
      res *= x
    end
    p >>= 1
    x *= x
  end
  return res
end

Contribute — propose a file extension

Tell us where to find evidence about Pluto (mapped to pl/pluto). 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/Pluto/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← PlusOrOutput Plutus →