.g

2 claimants 2 primary 0 secondary shared primary (2)

SWH popularity

From the SWH-MSR-ARV dataset (Desmazières, Di Cosmo, Lorentz, MSR 2025; file nb_extensions_alphanum.csv) — one row per (ext, year) in the full SWH archive. Case-aggregated. citation.

815.3K
total occurrences
319.1K
since 2019 (39.1%)
1970–2023
years active

Case variants in archive: .g (806.3K), .G (8.9K) — aggregated above.

Attribution status

This extension is attributed to G-code; GAP; GAP; GAP as primary by 4 authoritative claims.

Authoritative sources: ✓ Linguist ✓ Pygments ✓ Wikidata · Q677161 ✗ Wikipedia · no claim

Disagree or have a correction? Open a labelling issue.

Claimants (4)

Languages that list .g among their extensions. Strength reflects whether the upstream source treated it as their primary extension.
LanguageSourceStrength
G-codelinguistprimary
GAPlinguistprimary
GAPpygmentsprimary
GAPwikidataprimary

Wikidata says… (5)

File formats, image formats, audio codecs and other non-PL entities that claim .g on Wikidata (property P1195) or in the Wikipedia infobox. Source: data/derived/external_extension_index.csv. Click Use as new PL on any row to open the Add-PL form pre-filled with that entry's name, Wikipedia/Wikidata URL, and this extension — one submission creates the PL + claim.
Right entry isn't listed? Add manually ↗
FormatClass (Wikidata P31)Suggested labelMIMENotesAction
Applause Graph/Chart Q105856792
file format
file formatapplication/octet-streamUse as new PL ↗
BRL-CAD geometry Q28049691
file format
file formatapplication/octet-streamUse as new PL ↗
Img Software Set Green Component Q28206332
file format
file formatUse as new PL ↗

Disambiguation rules (2)

Linguist heuristics that decide, by content, which language a .g file actually is.
RulePredictsKindPredicates (truncated)
h/linguist/.g/0GAPpredicates[{"kind": "any", "regexes": ["\\s*(Declare|BindGlobal|KeyDependentOperation|Install(Method|GlobalFunction)|SetPackageInfo)"]}]
h/linguist/.g/1G-codepredicates[{"kind": "any", "regexes": ["^[MG][0-9]+(?:\\r?\\n|\\r)"]}]

SWH-mined examples (1)

Real archived programs with this extension, byte-verified against the SWH archive. Useful for deciding what this extension actually is when the attribution is uncertain.
charsetParser.g · 6429 B · seen 17× in SWH
predicted: unclassified via fallback
swh:1:cnt:891fb3aaa01ac367761a572a0b9bd67fc9f1afda;origin=https://github.com/r91987/cpdetector;anchor=swh:1:rev:8b705d900964d3bab90b951c6529f65dc12aed5d;path=/src/info/monitorenter/cpdetector/io/parser/charsetParser.g
Open in SWH · Raw bytes
Request more SWH-mined examples
If the examples above don't disambiguate what .g is, request a fresh mining run.
(or open the pre-filled issue directly)