Remix.run Logo
nicoritschel 7 hours ago

This is neat. I do wish there was a way for this to gracefully degrade in contexts without support for the grammar, though.

I devised a similar in spirit (inside SQL, very simplified vs GoG) approach that does degrade (but doesn't read as nice): https://sqlnb.com/spec

thomasp85 6 hours ago | parent [-]

I'm not quite sure I understand what you mean by "degrade in context" - care to elaborate?

nicoritschel 6 hours ago | parent [-]

If you're familiar with the percent format for jupyter notebooks, something like that— so things gracefully degrade in a more "basic" execution context.

# %%

foo = 1

# %%

print(foo)

Above is notebook with two "cells" & also a valid Python script. Perhaps it matters less with SQL vs Python, but it's a nice property.

thomasp85 5 hours ago | parent [-]

Ah - I don't think it really matters here, but if you find yourself in need then you can open a GitHub issue and we can discuss