News for hackers. Stuff that matters.
Re:GitHub Copilot is now available for free by chmod775 on Thursday December 19, 2024 @12:35AM (#42458712)
Hilarious. The code "fix" Copilot suggests in their example[1] is wrong on some many levels. It's trying to use await in something that is not an async function. From the other examples it's clear this is likely React's useEffect. You could not even make that callback an async function if you wanted to - this naive fix for that leads to subtle bugs.

And last but not least: The issue here - if there's any - can already be caught by linter rules like no-floating-promises in eslint/by using TypeScript instead. You don't need a shitty AI linter confidently suggesting wrong code.

That's how you advertise the product? I'm guessing competent coders at GitHub have already been replaced by juniors+copilot.

[1] https://i.imgur.com/FHnsqyP.png

Re:GitHub Copilot is now available for free by TranquilMarmot on Thursday December 19, 2024 @01:42AM (#42459030)
> been replaced by juniors+copilot

More likely replaced by seniors who forgot how to write code by hand because they're relying so much on AI. I don't think juniors are a thing anymore.

Re:GitHub Copilot is now available for free by soco on Thursday December 19, 2024 @05:38AM (#42460221)
I've read enthusiastic reports about Cursor but my very short trial experience was quite similar to yours: refactoring by duplicating code, mixing up cases, server connection errors, to the point where I just gave up after one day. It might be me of course and my poor prompting skills but hey if it offers me "rename symbol" I kinda expect it to rename the symbol AND its occurences. Oh well. I'll check again in a year or something.
Re:GitHub Copilot is now available for free by heeton on Thursday December 19, 2024 @10:00AM (#42461983)
I personally love Cursor but never using prompts. I just use it's auto-complete and smart-tab features it saves me a tonne of manual typing. (I type fast, yet now find switching to a "manual" editor annoyingly slow).

I don't let it write blocks of code, but usually I'm ~5 keystrokes into a line change or addition and it can complete the rest. I also use a text-file todo in the same project to help it with context of what I'm trying to do.

Re:GitHub Copilot is now available for free by linhns on Thursday December 19, 2024 @12:36PM (#42463815)
Yep, for all the gloss of these AI tools, I only found myself using autocomplete and smart-tab daily. And GH Copilot is actually not bad at all, and have integration with nvim.
Re:GitHub Copilot is now available for free by TowerTall on Thursday December 19, 2024 @11:29AM (#42463048)
I have just complete as month long task of developing a highly complex library in C# (a parser that uses ANTLR) together with claude and cursor and it worked very well. For me trick was to do test driven development and write all the tests first. Then after each code change rerun the tests.

This made it very easy for claude to work out what to do and what needed to be corrected for things to work. Then you get your tests either to write debug statement to the terminal or json serialize something to disk you can paste into the claude chat that helps claude understand the flow of the code and where things goes wrong.

As an added bonus having all those test alse made it easy for claude to write the documentation.

I will not say it was fun because you are sitting doing copy paste all day but i couldn't have written this library with the assistance from clause. cursor just reduced the amount of copy paste actions since it can update the files.

Re:GitHub Copilot is now available for free by archon810 on Thursday December 19, 2024 @12:06PM (#42463456)
Can Cursor actually update the files? Because I've seen many examples and complaints, most recently from my developer, that it says it's changing the files, but nothing actually changes, and when pressed, says it can't actually change files.

I've found numerous threads about this issue on their forums too.

Re:GitHub Copilot is now available for free by TowerTall on Thursday December 19, 2024 @12:48PM (#42463931)
It can. It can modify the active document.

In the chat sidebar dialog there are two submit buttons. The one labelled "chat" cannot edit the active file and when you chat using that submit button it doesn't understand your code base.

The submit button labelled "Codebase chat" on the other hand can update the active document and has knowledge about your project.

In the codebase chat dialog it will print the suggested changes and then you must press the apply button next to the suggested change. then it will apply the changes to the file in a git compare kind of way with red and green colors. Finally you must accept each of the red/green changes and the file will be updated on disk.

Re:GitHub Copilot is now available for free by TowerTall on Thursday December 19, 2024 @01:11PM (#42464168)
An alternative is aider that can edit multiple files at once. It performs a git commit after each changes which drove me nuts and didn't fit into my workflow. With cursor you decide when to commit to git which i like better.
Re:GitHub Copilot is now available for free by d3vr on Monday December 23, 2024 @09:09AM (#42494472)
You can actually disable that default behavior through the config file .aider.conf.yml [1]: auto-commits: false

Or if you prefer in .env [2]: AIDER_AUTO_COMMITS=false

[1]: https://aider.chat/docs/config/aider_conf.html

[2]: https://aider.chat/docs/config/dotenv.html

Re:GitHub Copilot is now available for free by HeavyStorm on Thursday December 19, 2024 @07:54PM (#42467301)
Oh no, cursor _is_ very nice. To be fair I've not used it for refactoring,ore for code generation, but it's great at applying changes to the code when it identifies patterns. Makes everything easier!