HackerPapers

arXiv:2505.14690cs.PL

SGL: A Structured Graphics Language

Jon Chapman

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

This paper introduces SGL, a graphics language that is aesthetically similar to SQL. As a graphical counterpart to SQL, SGL enables specification of statistical graphics within SQL query interfaces. SGL is based on a grammar of graphics that has been customized to support a SQL aesthetic. This paper presents the fundamental components of the SGL language alongside examples, and describes SGL's underlying grammar of graphics via comparison to its closest predecessor, the layered grammar of graphics.

arXiv comments
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 2 threads, from Apr 2026 to Jun 2026.

Comments linking this paper, per year.

Discussed in comments2 threads

    • If you're interested, this isn't an alternative implementation of ggsql's syntax (I published this last year and it is based on a slightly modified layered grammar), but the SGL language is a similar take on the grammar of graphics + SQL idea: https://arxiv.org/pdf/2505.14690.…

      jochapjoView on HNParent context

    • ggsql looks great for Posit's ecosystem (ggplot2 and plotnine). However, you can make the language more "SQL-like" by making some adjustments to the underlying grammar of graphics. I wrote a paper about a SQL-like language based on the grammar of graphics awhile back that…

      jochapjoView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.