bernhard Posted January 12 Share Posted January 12 Yesterday I had a chat with @gebeer and he showed me Cursor - The AI First Code Editor. It's based on VSCode, so if you are working with VSCode it will be a very similar experience. It can help you writing docs: It can help you refactoring code: And it can help you writing newsletters (testing that it understands the contest of the file for the prompt): I'm sure it can do much more great stuff. @gebeer mentioned a @docs feature - maybe you want to explain that? ? You can either access the AI with your own OpenAI API key or you can use their free tier or buy a subscription starting from 20$ per month. I'm testing it but so far it looks like a good companion. What it did not do for me is to translate all JSON files in the /de folder to spanish translations in the /es folder. It told me it can't do that directly but gave me a python snippet how I can achieve this. I'm in contact with @FireWire about that ? Have a good weekend! Ah, and if you are not subscribed to Rock Monthly here is the link: https://baumrock.com/rock-monthly/ ? 3 Link to comment Share on other sites More sharing options...
gebeer Posted January 12 Share Posted January 12 Good to hear @bernhard, that you like Cursor so far. Over the course of the last year, with all that AI hype going on, I have tried several AI assistants integrated into VsCode through extensions. Copilot, Codeium, Cody, Tabby, to name the major ones. Now about 10 days ago I stumbled across Cursor and have worked with it since. Guess, I'm a bit late to the party, seeing how well it is anticipated in the Dev community. Cursor is integrating AI, more specifically OpenAIs GPTs, exceptionally well into the IDE. It is available when you need it, but doesn't get into your way. The UX is extremely good, in my opinion. What makes it really stand out from other solution, is the ability to build indices of your code base and give them as meaningful context to the AI. While other tools can also do this, the process of indexing and referencing the index is very efficient in Cursor. This is great for onboarding to new code bases. Cursor indexes the code and you can ask questions and, in most cases, it will be spot on with it's answers. So you very quickly find your way to the relevant parts of the code for the task at hand. The killer feature that I like the most and that I have not seen in any of the other tools is called Docs. With a simple command '@Docs' you point Cursor to a URL, let's say https://processwire.com/blog/posts/pw-3.0.173/ (URL Hooks documentation) and it will create a vector based index of those docs in the background. You give these docs a custom name, pwUrlHooks. Now you can reference them inside your instructions to the assistant with @pwUrlHooks. This drastically reduces hallucinations and produces very good code suggestions in most cases. I's really fun to watch the AI writing code for you that you can actually use. Cursor itself is free. But you only get like 50 requests a month for free. If you need more, they ask 20$/month. But you can also use your OpenAI API key to have unlimited requests. Then you pay OpenAI, of course. But at least you have the choice. And 20 bucks a month isn't that much after all for the time that this can save you. I'm not affiliated with them in any way. Just find it a pleasure to work with. EDIT: Here's a link to the docs. I couldn't find that on the Cursor website but they seem to be the official docs: https://anysphere.mintlify.app/get-started/moving-from-vsc-to-cursor 4 Link to comment Share on other sites More sharing options...
da² Posted January 12 Share Posted January 12 JetBrains also added to PhpStorm (and other products) an AI assistant based on ChatGPT, I didn't try it yet. 1 Link to comment Share on other sites More sharing options...
cwsoft Posted January 13 Share Posted January 13 Hi, so far worked with Copilot and VSCode. As I have an OpenAI API key as well, I will try out Cursor this weekend. Thanks for sharing the info. 1 Link to comment Share on other sites More sharing options...
artfulrobot Posted January 21 Share Posted January 21 At risk of making myself unpopular, I'm a neovim user who has ethical aversion to AI. I get a great developer experience and I don't have to worry about Kernighan's law making my code buggy and hard to maintain. I am also concerned about climate change, and AI has huge carbon emissions - (re)training an LLM has been estimated to emit the equivalent CO2e as 125 round-trip flights between New York and Beijing [source]. I'm concerned that my open source code has been used against its license to train AI through github (find my stuff on codeberg or project owed gitlabs) and so now will be included in proprietary products. I'm also against having to pay subscriptions to a handful of big tech companies because this accelerates wealth inequality and erodes democracy, reducing our chances of turning the ship around before crossing the runaway climate change event horizon. I do not doubt AI's usefulness, or it's ability to charm and amaze or excite, I do not doubt that it can be used to save lives even (e.g. specific medical use such as identifying cancer early from scans). But I do remember how Nobel thought his invention of dynamite would be great and I'm not going to be taken in by another big tech lie about "don't be evil". We have very weak regulatory powers and a world teetering on the edge of unfathomable suffering. This is a post about a personal choice of text editor, and I'm not judging folx who choose Cursor (or ai plugins for neovim!) - I respect that opinions differ. But I wanted to share my opinions on my choice, too. 7 Link to comment Share on other sites More sharing options...
gebeer Posted January 23 Share Posted January 23 On 1/21/2024 at 4:29 PM, artfulrobot said: At risk of making myself unpopular, I'm a neovim user who has ethical aversion to AI. I get a great developer experience and I don't have to worry about Kernighan's law making my code buggy and hard to maintain. I am also concerned about climate change, and AI has huge carbon emissions - (re)training an LLM has been estimated to emit the equivalent CO2e as 125 round-trip flights between New York and Beijing [source]. I'm concerned that my open source code has been used against its license to train AI through github (find my stuff on codeberg or project owed gitlabs) and so now will be included in proprietary products. I'm also against having to pay subscriptions to a handful of big tech companies because this accelerates wealth inequality and erodes democracy, reducing our chances of turning the ship around before crossing the runaway climate change event horizon. I do not doubt AI's usefulness, or it's ability to charm and amaze or excite, I do not doubt that it can be used to save lives even (e.g. specific medical use such as identifying cancer early from scans). But I do remember how Nobel thought his invention of dynamite would be great and I'm not going to be taken in by another big tech lie about "don't be evil". We have very weak regulatory powers and a world teetering on the edge of unfathomable suffering. This is a post about a personal choice of text editor, and I'm not judging folx who choose Cursor (or ai plugins for neovim!) - I respect that opinions differ. But I wanted to share my opinions on my choice, too. Although I disagree with most of your views and opinions I want to thank you for sharing them. Good to have a diverse community. 3 Link to comment Share on other sites More sharing options...
szabesz Posted January 23 Share Posted January 23 10 hours ago, gebeer said: Good to have a diverse community. Sure! On 1/21/2024 at 10:29 AM, artfulrobot said: I am also concerned about climate change, and AI has huge carbon emissions It's fine to have a diverse community, as long as people aren't using the current global warming situation to convince others to commit suicide or avoid having kids, for example. Making people afraid of partially real or made-up problems, just so those causing the fear can act like they're saving you, is a sneaky way to control you. So, fear not, but be skeptical and read the opinions of others as well (eg.: https://angusmac.net/category/climate-models/), and not just what the mainstream is trying to sell so hard. Those in power are not there because they want what's best for you. If they wanted that, they would not be in power in the first place. 2 Link to comment Share on other sites More sharing options...
gebeer Posted January 24 Share Posted January 24 7 hours ago, szabesz said: It's fine to have a diverse community, as long as people aren't using the current global warming situation to convince others to commit suicide or avoid having kids, for example. Making people afraid of partially real or made-up problems, just so those causing the fear can act like they're saving you, is a sneaky way to control you. So, fear not, but be skeptical and read the opinions of others as well (eg.: https://angusmac.net/category/climate-models/), and not just what the mainstream is trying to sell so hard. Those in power are not there because they want what's best for you. If they wanted that, they would not be in power in the first place. Although I agree on most of what you are saying, I still respect other people's views on the subject. I know this is a subject where people have very strong opinions. Since this is a programming related forum, I would like to keep those discussions out of this thread as to not pollute it. Maybe something for the beergarden? 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 24 Author Share Posted January 24 Today I had to argue with a client about the use of tracking tools and loading external scripts from remote servers... I found the GDPR fulltext version, threw it to cursor chat and asked it: Quote @https://eur-lex.europa.eu/legal-content/en/TXT/HTML/?uri=CELEX:32016R0679&from=EN#d1e3037-1-1 where do I find infos about transmitting ip addresses to external parties? Its response: Quote To find information about transmitting IP addresses to external parties within the General Data Protection Regulation (GDPR), you should look for sections related to the processing of personal data and the transfer of such data to third parties, especially to countries outside the European Union. IP addresses can be considered personal data under GDPR if they can be used to identify an individual either directly or indirectly. Therefore, the relevant sections of the GDPR would include: - Article 4 - Definitions, to understand how personal data is defined. - Article 6 - Lawfulness of processing, which outlines the legal grounds for processing personal data. - Article 7 - Conditions for consent, if consent is the basis for processing IP addresses. - Article 13 and 14 - Information to be provided where personal data are collected from the data subject or not. - Article 15 to 22 - Rights of the data subject, which include the right to access and the right to erasure. - Article 44 to 50 - Transfers of personal data to third countries or international organizations, which provide the conditions under which personal data can be transferred outside the EU. For the specifics on transmitting IP addresses to external parties, focus on the sections about data subject rights, the lawfulness of processing, and international transfers. I double-checked the related articles and it looks quite accurate ? Ok I guess bard et al would have shown similar results, but cursor is always open ? 1 Link to comment Share on other sites More sharing options...
bernhard Posted February 4 Author Share Posted February 4 It really helps with all the little annoying time consuming tasks. Ever forgot what the chmod command is to set permissions to "-rw-r--r--" ? Or even faster: Just hit CMD+K and type this: Quote set all files to rw-r--r-- It will present you with this terminal command: Quote chmod 644 * Hit CMD+Enter and done ✅ Link to comment Share on other sites More sharing options...
da² Posted February 4 Share Posted February 4 3 hours ago, bernhard said: Hit CMD+Enter and done You have a lot of confidence in AI. ? I would replace with: check that the AI gave the correct command (using web or manual), then press Enter. ^^ Link to comment Share on other sites More sharing options...
cwsoft Posted February 4 Share Posted February 4 @da²Guess Bernhard still checks the generated code for stuff which may break things like rm -rf commands before blindly copying and pasting code to clients projects or executing it blindly on his system with root permissions ? 1 Link to comment Share on other sites More sharing options...
bernhard Posted February 4 Author Share Posted February 4 Of course you have to check. It's the same with any source... AI, web, manual, other devs... You always have to think about what they tell you and then you have to decide what you do and take the responsibility for your actions. Cursor gives you the option, it does not fire the command by itself. If it did I wouldn't use it. Link to comment Share on other sites More sharing options...
cwsoft Posted February 4 Share Posted February 4 Yepp. No big difference from copying code from Stackoverflow and executing it if you are not really understanding what it is doing or to clone and run stuff from Github repos you don‘t own or trust, or entering the NPM dependency hell for something which just pads a string with leading numbers loading other node packages to do the job for example. Link to comment Share on other sites More sharing options...
bernhard Posted February 4 Author Share Posted February 4 Yeah, with more complicated things stackoverflow is often still nicer, because you often see that some solutions are outdated and there are better solutions in 2024. You often don't see that in AI, as it just presents you the solution that it thinks is the best. But for things like "oh yes, 644, why did I even ask" it's a lot more efficient to ask the AI inside cursor and not Google. From my first month of using cursor I'm a little shocked how much I am using it and how much I must have been googling before ? Link to comment Share on other sites More sharing options...
cwsoft Posted February 4 Share Posted February 4 I do like to refine some of my code in little steps or to prompt the AI for specific questions on my own code, like I did in the past as part of a development team with my human colleagues. Thats where AI is really not so bad in my opinion, at least if you are working alone on projects and there are no human colleagues you could ask. 1 Link to comment Share on other sites More sharing options...
da² Posted February 4 Share Posted February 4 I was just joking about how you wrote the "Hit CMD+Enter" like if the answer is sure, don't take my message too seriously. ? I wouldn't event trust the answer about rw-r--r--, because very often ChatGPT is absurdly wrong and answers the exact opposite of the truth. Then I correct it and next answer is good. So if I need to check the AI answers on the web, it's faster not to ask the AI and directly go on the web/documentation. Most of the time I use AI when I can't find answer with traditional ways. 14 minutes ago, cwsoft said: I do like to refine some of my code in little steps or to prompt the AI for specific questions on my own code, like I did in the past as part of a development team with my human colleagues. Thats where AI is really not so bad in my opinion, at least if you are working alone on projects and there are no human colleagues you could ask. This part is more interesting IMO, discussing about architecture of your own code, things you can refactor, design patterns you can use... It can be a way to improve faster as a developer. I'm also working alone, and have worked in the past in a team that used to do regular code reviews. 3 Link to comment Share on other sites More sharing options...
Recommended Posts