Transpose query table and pipe operator

Hi,

I'm learning SLIQ while thinking how I'll teach it soon to undergrad/post-grad students and co-workers at the university and workshop attendees at HackBo, our local hackerspace and I was thinking two possible additions, one easier and the other maybe implying some major modifications that Space Lua will not be willing to do, but still worth to be discussed.

The first one is just to transpose a query table result, so columns become rows and viceversa, which could improve table readability while looking results. For example, consider the following SLIQ:

${query[[from p = index.pages() where p.name:startsWith("Space") limit 5]]}

which produces this table:

name size contentType created lastModified perm ref tag tags itags
Space Lua 3881 text/markdown 2026-10-05T12:21:36.582 2026-10-30T09:28:04.925 rw [[Space Lua]] page {} page
Space Syles 98 text/markdown 2026-10-30T09:08:48.357 2026-10-30T09:08:48.357 rw [[Space Syles]] page {} page

that creates the horizontal scrolling pattern for having just a simple glimpse of the data. I would like to have instead:

name Space Lua Space Syles
size 3881 98
contentType text/markdown text/markdown
created 2026-10-05T12:21:36.582 2026-10-30T09:08:48.357
lastModified 2026-10-30T09:28:04.925 2026-10-30T09:08:48.357
perm rw rw
ref [[Space Lua]] [[Space Syles]]
tag page page
tags {} {}
itags page page

Is there something like a transpose(luaTable) function for doing that? and if not, Where I should start to look for to implement it?

This bring me to my second question: would be possible to have in Space Lua something like the pipe operator (|>) found in Julia, Elixir and (Lua compatible) YueScript, so progressive data transformations can be done using the previous result as input of the next function? This would make the previous transformation something like:

${query[[from p = index.pages() where p.name:startsWith("Space") limit 5]]
  |> transpose()
}

I have found that teaching programming and computational thinking to novices, this helps them a lot to express and understand data transformations. Also there is a good precedence of its use in Unix shell and even projects that attempt that with Lua in the shell, like LunaCMD:

1 Like