Remix.run Logo
rhdunn 11 hours ago

Text editors/IDEs have simple autocomplete and the ability to do some expansion, e.g. a for loop with placeholders to fill in. Those work and are still useful.

JetBrains also has local line-based LLM models for various languages.

With the LLM-based autocomplete it a) generally autocompletes more code at once, and b) will often pick up on patterns in the existing code. E.g. if you have a similar method, list of print/string buffer write statements, or other repetitive code in the file it will often use that as a model for the generated code.

meheleventyone 7 hours ago | parent | next [-]

The JetBrains local autocomplete is hilarious but occasionally useful. I find it really hit and miss in terms of when it will decide to autocomplete and whether it will exhastively complete all elements, miss some out or get itself into a loop over several.

bandrami 11 hours ago | parent | prev [-]

That sure sounds like you're describing customizable snippets, which AFAIK every major editor supports?

rhdunn 8 hours ago | parent | next [-]

Customizable snipping is a feature editors support (which I mentioned as they are related/similar to what the AI is doing), but is different to the AI autocomplete behaviour.

If I have a JSON structure, I can paste that into the file as a comment, e.g.:

    # {"foo": 1, "bar": "test", "baz"}
    @dataclass
    class FooBar:
        foo:
and the AI will/can autocomplete/generate that to:

    @dataclass
    class FooBar:
        foo: int
        bar: str
        baz: int
using the JSON example. Then if you type:

        def __str__(self):
the AI could then contextually generate, e.g.:

    return f'Foo(foo={self.foo}, bar={self.bar}, baz={self.baz})'
Or if you have a SQLAlchemy model:

    class Foo(Base):
        __tablename__ = 'foos'

    bar_id: Mapped[int | None] = mapped_column(ForeignKey('bars.id'), default=None)
typing `bar:` the AI can autocomplete:

    bar: Mapped[Optional['Bar']] = relationship()
picking up that you have a `Bar` class in the file. Especially if you have other similar id/object definitions in the file.
bandrami 7 hours ago | parent [-]

Right, it's a less-flexible paste macro you don't actually have control over. shrug

bubblewand 8 hours ago | parent | prev [-]

Sitting here on the sidelines having never configured snippets or macros or any of that in any of my editors, which I could have done like 30 years ago but never bothered in all this time, doing quizzical-dog look at all these people thrilled about LLMs.

I guess they might finally get me to use those things since they take the “configuring” and “remembering shortcuts” part out, but so much of this doesn’t look new at all. Super old, actually.