Hacker News new | past | comments | ask | show | jobs | submit | _jayhack_'s comments login

Also worth checking out MultiLSPy, effectively a python wrapper around multiple LSPs: https://github.com/microsoft/multilspy

Used in multiple similar publications, including "Guiding Language Models of Code with Global Context using Monitors" (https://arxiv.org/abs/2306.10763), which uses static analysis beyond the type system to filter out e.g. invalid variable names, invalid control flow etc.


Yes this work is super cool too! Note that LSPs can not guarantee resolving the necessary types that we use to ensure the prefix property, which we leverage to avoid backtracking and generation loops.

If you are looking for an alternative that can also chat with you in Slack, create PRs, edit/create/search tickets and Linear, search the web and more, check out codegen.com


Related article from mid-pandemic: https://www.theinformation.com/articles/shaky-tech-and-cash-...

A friend asked me to do diligence on this company circa 2021 given my personal background in ML. The founder was adamant they had a "100% checkout success rate" based on AI, which was clearly false. He also had 2 other startups he was running concurrently (?)

Live and learn!


Codegen is an MCP client that you can trigger via Slack: codegen.com


This is true and is essentially a form of arbitrage. Anthropic is eating the cost of your elevated queries with their $20 flat fee subscription.

The "famously huge API token costs" you are referring to is Cline passing the Anthropic API cost through to you with no markup. You even input your own API token.


Codemodder has extensive Java support, which Codegen does not support at the moment. Otherwise, my understanding of Codemodder is that it is focused on AST-level syntactical modifications. Codegen computes a richer graph datastructure, and this can be used for sophisticated modifications that depend on inheritance hierarchies, function usages, cross-file references and more.

Codemodder is written in Java, whereas you can write Codegen in a jupyter notebook or anywhere you can run Python.


Unfortunately a lot of the things we want agents to interact with don't expose neat APIs. Computer use and, eventually, physical locomotion are necessary for unlocking agent interactivity with the real world.


If you think the purpose of pure math is to provide employment and entertainment to mathematicians, this is a dark day.

If you believe the purpose of pure math is to shed light on patterns in nature, pave the way for the sciences, etc., this is fantastic news.


Well, 99% of pure math will never leave the domain of pure math so I'm really not sure what you are talking about.


We also seem to suffer these automation delusions right now.

I could see how AI could assist me with learning pure math but the idea AI is going to do pure math for me is just absurd.

Not only would I not know how to start, more importantly I have no interest in pure math. There will still be a huge time investment to get up to speed with doing anything with AI and pure math.

You have to know what questions to ask. People with domain knowledge seem to really be selling themselves short. I am not going to randomly stumble on a pure math problem prompt when I have no idea what I am doing.


Interesting refactor!

This is trivial with codegen.com. Syntax below:

  # Iterate through all files in the codebase
  for file in codebase.files:
      # Check for functions with the pytest.fixture decorator
      for function in file.functions:
          if any(d.name == "fixture" for d in function.decorators):
              # Rename the 'db' parameter to 'database'
              db_param = function.get_parameter("db")
              if db_param:
                  db_param.set_name("database")
                  # Log the modification
                  print(f"Modified {function.name}")
Live example: https://www.codegen.sh/codemod/4697/public/diff


Consider indenting your code block, it's unreadable as it is now.


Good call, thank you


That's pretty sick. Super readable with python :)

Is each file getting parsed individually with tree-sitter or how is the codebase object constructed?


We do advanced static analysis to provide programmatic access to the type system, etc., based on tree-sitter and in-house tech.

This enables APIs such as `function.call_sites`, `symbol.usages`, `class.parent_classes`, and more!


Where can I learn more about this? You guys don't seem to have any docs available.


This is simple and configurable with Codegen - see the results on `renovate` here: https://www.codegen.sh/codemod/4553/public/diff

Most transformations like this are not possible with pure static analysis and require some domain knowledge (or repo-specific knowledge) in order to pull off correctly. This is because some code gets "used" in ways that are not apparent i the code.

Enjoy!


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

Search: