Pseudo, a Common Lisp macro for pseudocode expressions

(funcall.blogspot.com)

70 points | by reikonomusha 4 days ago

7 comments

  • soegaard 8 hours ago
    Similar idea: https://www.youtube.com/watch?v=ueGC3xVcDlc William Bowman: First class Prompt Engineering with llm lang! (This is a bad idea.) (RacketCon)
  • tluyben2 10 hours ago
    I like it, and indeed neatly shows the power of Lisp. The JS variety (well the one that I could come up with) is far less elegant, but works [0] (well, mostly). It really shows how the different LLMs stack up; some really cannot get anything right, but something like openai/gpt-4o-mini seems to get it right mostly (8/10).

    [0] https://github.com/tluyben/pseudo-js

  • xigoi 11 hours ago
    After decades of research, we have finally come up with a way to make programs break in unpredictable ways on every compilation.
    • anonzzzies 11 hours ago
      ... and yet, the author will probably get an email soon with $500m VC offer for a revolutionary way of coding.
  • JonChesterfield 20 hours ago
    Passing the lexical information in and requiring s-expressions be returned is a good idea. Put a cache on it to remember what the llm came up with last time and you have a legitimate, if somewhat weird, language implementation.
    • anonzzzies 11 hours ago
      Cache it and give the user a tool to see the code and regenerate it when not happy and this is really quite a bit of fun.
  • cryptonector 15 hours ago
    Can't commit pseudo-code to prod like this :laugh: cause you might get different results once in a while!
  • jlarocco 22 hours ago
    That's kind of neat. I had an idea for a macro that would search GitHub for functions with the desired name and use their implementation, but this is probably more predicatable.
  • nurettin 1 day ago
    I see a bunch of 18+ ads.
    • hofrogs 1 day ago
      I see none, it's a regular blog post (no ads there, just some code) page with a few comments (no ads there either). I am using an adblocker.
      • wk_end 23 hours ago
        I get some ads (not using an ad blocker) but nothing NSFW.

        This is Blogspot, unless something real weird is going on you’re just seeing normal Google ads. I have found, in my travels, that Google (Meta too) doesn’t moderate its ads as well as you’d expect once you leave the US.

    • anonzzzies 11 hours ago
      I only see starlink ads.