Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by AmalgatedAmoeba on Wednesday June 19, 2024 @06:33AM
(#40726888)
The conversion is between two testing libraries for React. Not to be too cynical (this sort of works seems to me like a pretty good niche for llms), but I don’t think I’d be that far off of 80% with just vim macros…
[ Parent
| on HN ]
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by stefan_ on Wednesday June 19, 2024 @07:23AM
(#40727188)
Not to mention the possible savings if you just don't switch to whatever the latest testing framework is your resume driven developers want. 100% time savings!
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by hermanradtke on Wednesday June 19, 2024 @08:10AM
(#40727498)
Enzyme is abandoned and doesn’t work on newer versions of React. Many teams are doing this conversion for their React apps.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by stefan_ on Wednesday June 19, 2024 @02:49PM
(#40731250)
Gee, if "many teams" want to spend their time migrating their unit-test framework and unit tests because their frontend framework hit version 18 I suppose that's their prerogative.
Not me to applaud Teams but it seems Slacks lunch is being eaten by people who are busy building things on the corpse of Skype, not churning through churn incarnate.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by cyclotron3k on Thursday June 20, 2024 @07:16PM
(#40744535)
If Enzyme was at all popular (which it sounds like it was) I'm surprised no one from the community has taken over maintenance.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by rottc0dd on Wednesday June 19, 2024 @07:13AM
(#40727120)
I agree, once I had to write a groovy conf out of java library constructors and setters and vim macros were really good for that.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by dgan on Wednesday June 19, 2024 @06:44AM
(#40726943)
You really think you could achieve 80% success rate with just syntaxic transformations, while the article says they only reached 45% success rate with fine grained ast transformations?
I am no vim hater, but allow me to cast a large, fat doubt on your comment!
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by AmalgatedAmoeba on Wednesday June 19, 2024 @08:15AM
(#40727533)
Fair enough :) It was very much an exaggeration. But, I do wonder how far would “dumb” text editing go in this scenario. And, more importantly, whether it wouldn’t be faster overall than writing a tool that still requires humans to go through its output and clean/fix it up.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by Dr_Birdbrain on Wednesday June 19, 2024 @06:54AM
(#40727008)
You might be underestimating vim ;)
Key point is that vim macros are interactive. You don’t just write a script that runs autonomously, you say “ok, for the next transformation do this macro. Oh wait, except for that, in the next 500 lines do this other thing.” You write the macro, then the next macro, adjust on the fly.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by gray_-_wolf on Wednesday June 19, 2024 @07:30AM
(#40727233)
Out of curiosity, can you drop into edit session during the macro? It is some time since I last used vim, so I do not recall, but in emacs you can record a macro along the lines of "do A, do B, drop to edit session letting user do whatever, do C, do D". Is that possible with vim macros?
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by suplix on Wednesday June 19, 2024 @08:24AM
(#40727590)
Just use —- calculating… —- 2 macros.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by slaymaker1907 on Wednesday June 19, 2024 @01:30PM
(#40730429)
I don't think so since you need to leave edit mode to terminate the macro.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by rlupi on Wednesday June 19, 2024 @07:26AM
(#40727208)
From the article:
> Our initiative began with a monumental task of converting more than 15,000 Enzyme test cases, which translated to more than 10,000 potential engineering hours
That's a lot of editing.
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by pqb on Wednesday June 19, 2024 @07:10AM
(#40727102)
That sounds interesting! Would you mind sharing some links to the articles or videos that focus on this possibility?
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by duffmancd on Wednesday June 19, 2024 @07:27AM
(#40727216)
This Vimcast (http://vimcasts.org/episodes/converting-markdown-to-structur...) recording is an example of a quite complex macro for converting (a specific file's) markdown to HTML. At the beginning of the video you see that they save the macro to the "a" register. You can record macros of similar complexity to each of the other letters of the alphabet, to get some idea of the maximum complexity (though I tend to stick to about 3 or less in a single session).
Re:Slack Combines ASTs with LLMs to Automatically Convert 80...
by morgante on Wednesday June 19, 2024 @09:03AM
(#40727899)
I think you're significantly underestimating the complexity of automatic transforms. It's not like they didn't try writing codemods first, and vim macros aren't more powerful than codemods.