Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> for which no real good syntax exists for doing that

Up to you, but several editors have established syntax which any code-trained model will likely have seen plenty of examples

vim (set foldmethod=marker and then {{{ begin\n }}} end\n ) https://vimdoc.sourceforge.net/htmldoc/usr_28.html#28.6>

JetBrains <editor-fold desc=""></editor-fold> https://www.jetbrains.com/help/idea/working-with-source-code...

Visual Studio (#pragma region) https://learn.microsoft.com/en-us/cpp/preprocessor/region-en... (et al, each language has its own)



The great thing about my agent, which I left out, is that it extracts out all the named blocks using just pure Python, so that the prompt itself has them embedded directly in it. That's faster and more efficient than even having a "tool call" that extracts blocks by name. So I needed a solution where my own code can get named block content out of any kind of file. Having one syntax that works on ALL types of files was ideal.

UPDATE: In other words it's always "block_begin" "block_end" regardless of what the comment characters are which will be different for different files of course.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: