Stream: contributing

Topic: Compiler Explorer (aka godbolt)


view this post on Zulip Vanand Gasparyan (Nov 16 2026 at 08:17):

Sorry for the spam, this isn't a contribution to Roc, at least not a direct one.

I created this PR to add Roc in Compiler Explorer. https://github.com/compiler-explorer/compiler-explorer/pull/9589

I'd appreciate it if someone knowledgeable of the Roc toolchain could take a look at it. Here are some questions I have already:

  1. Since Roc is not included in Microsoft's Monaco editor list or whatever, there is no syntax highlighting. But there are a lot a lot of other languages there. Perhaps there's another language similar enough to Roc (by keyword set) to use as highlighting?
  2. The disassembled output with my change doesn't look as helpful as with other languages. In case of C++, for example, there is a code line to asm section mapping. Perhaps I'm missing some special compile flag.

view this post on Zulip Anton (Nov 16 2026 at 17:37):

Hi @Vanand Gasparyan,
Thanks for your PR :heart:

  1. coffeescript highlighting always seems to look pretty good for Roc at least here on zulip.

view this post on Zulip Anton (Nov 16 2026 at 17:49):

  1. roc build --debug adds a DWARF line table to the binary, so a disassembler can label each block of assembly with its Roc file:line. I did discover that the line offset is incorrect sometimes and function names are hashed so that's not ideal for reading. I am looking at those issues now.

view this post on Zulip Vanand Gasparyan (Nov 16 2026 at 19:46):

Yes, coffeescript looks good indeed. Thanks!

image.png


Last updated: Nov 26 2026 at 20:35 UTC