hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

Anders Eknert

When Regal was just a linter, its code was roughly 60% and 40% . Making it also be a language server has shifted that balance to 40/60. And while it was the right call at the time — we didn’t know the protocol, and no one else had done anything for that in Rego —I wasn’t too happy about it. So I’m now looking at rewriting parts of the LSP implementation in Rego too. So far so good! Expect to hear more on this next week 🤓

@anderseknert Wow! That seems really interesting, I'd love to hear more about your experience doing this

@jawnsy Thanks! I'll make sure to post regular updates here :) Ultimately the language server protocol is JSON in -> logic -> JSON out... and well, that's pretty much exactly the Rego model! There are other challenges to tackle though, like providing almost instantaneous feedback from the server (e.g. completion suggestions) as the user types. Rego is fast, but a lot more consideration required than the Go implementation, where even naive code tend to be quite performant. Just one aspect tho!

@jawnsy I shouldn't make it sound like it's all in favor of Go though! Some things that I've started to port are already so much better described in declarative Rego compared to imperative Go. I'll follow up with some examples later :)