Hacker News new | ask | show | jobs
by 2ro 602 days ago
Copilot is great at taking precise pseudocode, in this case a declarative constraint logic language I invented, and translating it from there - just explain your formal rules first:

<teach it your language here> .. I'm giving you quite a puzzle so try to figure this one out and translate to miniKanren in Scheme (you will notice the blank line between definitions which signifies the end of one definition and the beginning of the next - variables do not necessarily mean the same thing from one definition to the next - V(VS) is a way to update V within the second definition as the variegation of S before moving rightward with subsequent constraints that may use the new value of V):

   (VS)(US)=(UR)R
   VARIEGATE
   STORY
   S(U)MMARIZE
   RESULT.
   
   (HS)V(VS)(LV)<(LS)V
   S(H)ORTEN
   STORY
   VARIEGATE
   LENGTH
   
Challenge accepted! Let's translate your declarative constraint logic into miniKanren in Scheme. Here’s a step-by-step approach based on your constraints:

It actually works which completely floored me :))