This commit is contained in:
Ty Dunn 2023-11-10 09:19:01 -08:00
parent 77179ed89b
commit 8c84cb8865
2 changed files with 50 additions and 1 deletions

48
docs/docs/languages/go.md Normal file
View file

@ -0,0 +1,48 @@
# Go
Go is the #14 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
## Benchmarks
✅ Go is one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
✅ Go is one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
✅ Go is one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
✅ Go is one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
## Datasets
✅ Go makes up 118.37 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
✅ Go makes up 19.28 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
✅ Go makes up 19.8 GB of the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
✅ Go makes up 21.4 GB of the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
✅ Go makes up 15 GB of the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
## Stack Overflow & GitHub presence
Go has 71,541 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
Go projects have had 2,642,302 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
Go projects have had 1,815,979 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
Go projects have had 4,859,219 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
Go projects have had 7,318,078 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
## Anecdotes from developers
[u/vEncrypted](https://www.reddit.com/r/golang/comments/16cs5md/comment/jzl928k/?utm_source=share&utm_medium=web2x&context=3)
> Personally for me this is the completely wrong approach. Having the ai write it for you and then understand what it wrote is less than optimal. You should use chatgpt to ask questions, not write code if you don’t understand it. Use it as a mentor who can’t be busy to answer your questions. Not as someone who will complete your homework and then maybe you’ll try and understand it afterwards. If a student actually wants to learn a subject, do they get someone to complete their homework? You get what I mean? If your goal is to just complete a project in anyway. Then maybe might work but most likely won’t. You should understand and come up with the logic behind everything you write before letting ai write it for you. Copilot is good for predictable sequences, but most things logic wise it fails as it does not know implementation.
[u/DarkCeptor44](https://www.reddit.com/r/golang/comments/17okcs8/comment/k7zl74p/?utm_source=share&utm_medium=web2x&context=3)
> ChatGPT (mainly the UI) set a bad example, AI has been way more helpful to me for learning Go than going on Google or reading official docs, but not ChatGPT and rather Forefront, which can use GPT 3.5/4 or their own models but regardless they have a Internet Search function that uses the model to simply summarize dozens of actually real pages it found in a way that is easier for me to understand compared to the original, specially since I can keep chain-asking "what is this/what is that", and all from me explaining step-by-step with "janky" English and the full code. It also lists the pages it used so I can just click them and check it myself, (spoiler alert) it doesn't make as many mistakes as people think, even without search it does a great job understanding code, it won't usually solve more than basic problems and just keeps giving you different snippets to try but most of the time I end up fixing the issue because of the answers, even if the code doesn't work, I don't know how else to explain it. Of course my first language isn't English but I also learn almost entirely by example and docs don't usually have snippets for every little thing the code can do, it also sounds a bit advanced to me because it's just a lot of text with (programming/Go) terms that I usually don't use.
[u/Prestigiouspite](https://www.reddit.com/r/golang/comments/153pahy/comment/jsmdut2/?utm_source=share&utm_medium=web2x&context=3)
> When I ask ChatGPT about it, it suggests model.go, view.go, controller.go etc. but says itself that the MVC concept does not exist in Go. So I'm interested how developer with some more experience than I in desktop apps would struct it.

View file

@ -22,4 +22,5 @@ Dart,N/A,✅,N/A,N/A,6.02%,19,"91,732","171,518","230,340","241,706","264,888",U
Lua,✅,✅,N/A,N/A,6.09%,18,"22,413","139,939","717,566","166,471","366,575",6.58,2.81,2.9,0,0,19.0k,https://www.reddit.com/r/lua/,"First of all, don't use ChatGPT if you want to learn Lua. Refer to the well-written resources such as the ""Programming in Lua"" book instead.",u/appgurueu,https://www.reddit.com/r/lua/comments/11dkwdl/comment/jacqn3z/?utm_source=share&utm_medium=web2x&context=3,Ask chatGPT to convert java / concepts into language to Lua... works surprisingly well,u/gluecat,https://www.reddit.com/r/lua/comments/12wj39f/comment/jhhg8qi/?utm_source=share&utm_medium=web2x&context=3,"Do you not find Copilot frustrating? I cannot stand it, it's the worst thing for me. Whenever I've actually needed help with something, it's either: Gave me absolute garbage code. Missed the point entirely. Maybe I'm just bad at giving it instructions, who knows 😅",u/VitexHD,https://www.reddit.com/r/lua/comments/13tfqs2/comment/jlytud8/
Ruby,8,N/A,✅,N/A,6.23%,17,"228,663","2,482,982","5,645,881","1,204,510","2,905,832",23.82,10.95,11.6,0,4.1,81.5k,https://www.reddit.com/r/ruby/,"Note that the failure mode for ChatGPT is that it will gaslight and lie to you. If you don't give it enough context, or the method names are ambiguous, there's a potential for it to make up explanations that sound plausible, but are dangerously incorrect. I'd advise talking to your team about the things that confuse you germane to your codebase, and only using ChatGPT for general Ruby content.",u/throwaway-aso2fb,https://www.reddit.com/r/ruby/comments/16y3bxq/comment/k36os5n/?utm_source=share&utm_medium=web2x&context=3,"Not using copilot for the controversy around it stealing source code. Manager gave me a license however to use tabnine at the moment. In...basic scaffolding code it helps me speed up a bit by generating the blocks for example to write specs quickly, providing about 75% of the structure needed to get the spec fleshed out, e.g faster let declarations and do blocks. But for writing actual code I'm fighting it more than its helping me, since it simply doesn't understand what I am trying to write. Documentation is....hit&miss depending on whether it gets the meaning behind the variable names.",u/OlivarTheLagomorph,https://www.reddit.com/r/ruby/comments/zq847a/comment/j0yy2y8/?utm_source=share&utm_medium=web2x&context=3,"I use Github copilot (which uses openai's codex) and occasionally throw some questions to ChatGPT. Currently I use it for Ruby and Kotlin. I committed to Copilot after trying it for five minutes. Total game changer. Time spent doing grunt work, writing repetitive tests etc, has dropped by 90% and I'm left with a lot more time to implement elegant solutions rather than throwing in quick fixes to meet tight deadlines. Sometimes it almost seems like it can read my mind. You still need to have the experience and expertise to ensure it hasn't missed the point - it doesn't always have the full context of the problems you're working on - but I would wholeheartedly recommend it to any developer as a way to increase productivity.",u/onionionion,https://www.reddit.com/r/ruby/comments/11usmxs/comment/jcqdd8q/?utm_source=share&utm_medium=web2x&context=3
Kotlin,N/A,N/A,✅,N/A,9.06%,16,"92,664","346,824","816,744","174,810","545,403",Unspecified,0,0,0,0,73.8k,reddit.com/r/kotlin,"chatgpt doesn't know that Kotlin can use java libraries, which makes sense since it knows nothing. Chatgpt doesn't know that you target older Android versions with new languages. The reason why there are more java programs for old reasons is just historical and doesn't benefit java in any way. But chatgpt will never understand this since it can't understand anything. Here chatgpt is correct. It's amazing how it can produce a correct answer without having any idea what it's doing.",u/Feztopia,https://www.reddit.com/r/Kotlin/comments/zo6jpo/comment/j0lv16b/?utm_source=share&utm_medium=web2x&context=3,"If you want solid foundation, don't. ChatGPT is known for inventing things and confidently state it as if that's true, if you don't have knowledge to judge its output, you can't fully trust the answer.",u/duongdominhchau,https://www.reddit.com/r/Kotlin/comments/10tzne0/comment/j79pkls/?utm_source=share&utm_medium=web2x&context=3,"Not mentioned yet, but I really believe ChatGPT and Copilot (and whatever is coming down the pike) really reduces the “learning a new language” hump for EVERY language, and definitely for Kotlin. Asking it to do idiomatic Kotlin usually produces quite good results, and asking it how to do a Java thing best in Kotlin definitely does well also. So every new Java developer will be adept at Kotlin even faster than before.",u/LoveSpiritual,https://www.reddit.com/r/Kotlin/comments/14bpuym/comment/jokay83/?utm_source=share&utm_medium=web2x&context=3
Rust,✅,✅,N/A,N/A,13.05%,15,"39,147","400,875","947,751","239,196","941,468",40.35,2.68,2.8,0,3.5,256k,https://www.reddit.com/r/rust/,"I think programming is heading the same way as translation - a machine can give you a first draft, but experience is needed to verify and fix the resulting code. In the case of translation, many tools exist that will translate text from one language to another, but the results may be slightly or wholly inaccurate: knowledge of both the source and target languages is needed to verify the result. The same is applies to code generation by GPT. The combination of a human and machine will probably give better results, faster. But unsupervised code generation in a general sense is still a way off.",u/remontantcoprology,https://www.reddit.com/r/rust/comments/zgkuq6/comment/izi6p21/?utm_source=share&utm_medium=web2x&context=3,"The issue is that most of the time the code wont compile or have UB so... It could be blazingly fast to give you text but if need 5 or 10 minutes per try to check is doing what i want i prefer to do the code myself and then i am sure is doing what i want. In other langs like Python maybe but in complex langs like C++ or Rust is not as good because of it complexity, i havent tried but in Rust you cant make a buble sort loop without swap(i, j) and GPT could try the usual aproach of array[i] = array[j] which wont work at all",u/JuanAG,https://www.reddit.com/r/rust/comments/zgkuq6/comment/izhfvi3/?utm_source=share&utm_medium=web2x&context=3,I searched the huggingface hub for some LLM to help Rust coding. But most of them just for python. does anyone knows some LLM for just for Rust. Or how to build one. thanks,u/AbleEstablishment155,https://www.reddit.com/r/rust/comments/16iz3fj/is_there_a_specific_llm_for_rust_coding/?utm_source=share&utm_medium=web2x&context=3
Rust,✅,✅,N/A,N/A,13.05%,15,"39,147","400,875","947,751","239,196","941,468",40.35,2.68,2.8,0,3.5,256k,https://www.reddit.com/r/rust/,"I think programming is heading the same way as translation - a machine can give you a first draft, but experience is needed to verify and fix the resulting code. In the case of translation, many tools exist that will translate text from one language to another, but the results may be slightly or wholly inaccurate: knowledge of both the source and target languages is needed to verify the result. The same is applies to code generation by GPT. The combination of a human and machine will probably give better results, faster. But unsupervised code generation in a general sense is still a way off.",u/remontantcoprology,https://www.reddit.com/r/rust/comments/zgkuq6/comment/izi6p21/?utm_source=share&utm_medium=web2x&context=3,"The issue is that most of the time the code wont compile or have UB so... It could be blazingly fast to give you text but if need 5 or 10 minutes per try to check is doing what i want i prefer to do the code myself and then i am sure is doing what i want. In other langs like Python maybe but in complex langs like C++ or Rust is not as good because of it complexity, i havent tried but in Rust you cant make a buble sort loop without swap(i, j) and GPT could try the usual aproach of array[i] = array[j] which wont work at all",u/JuanAG,https://www.reddit.com/r/rust/comments/zgkuq6/comment/izhfvi3/?utm_source=share&utm_medium=web2x&context=3,I searched the huggingface hub for some LLM to help Rust coding. But most of them just for python. does anyone knows some LLM for just for Rust. Or how to build one. thanks,u/AbleEstablishment155,https://www.reddit.com/r/rust/comments/16iz3fj/is_there_a_specific_llm_for_rust_coding/?utm_source=share&utm_medium=web2x&context=3
Go,✅,✅,✅,✅,13.24%,14,"71,541","2,642,302","4,859,219","1,815,979","7,318,078",118.37,19.28,19.8,21.4,15,224k,https://www.reddit.com/r/golang/,"Personally for me this is the completely wrong approach. Having the ai write it for you and then understand what it wrote is less than optimal. You should use chatgpt to ask questions, not write code if you don’t understand it. Use it as a mentor who can’t be busy to answer your questions. Not as someone who will complete your homework and then maybe you’ll try and understand it afterwards. If a student actually wants to learn a subject, do they get someone to complete their homework? You get what I mean? If your goal is to just complete a project in anyway. Then maybe might work but most likely won’t. You should understand and come up with the logic behind everything you write before letting ai write it for you. Copilot is good for predictable sequences, but most things logic wise it fails as it does not know implementation.",u/vEncrypted,https://www.reddit.com/r/golang/comments/16cs5md/comment/jzl928k/?utm_source=share&utm_medium=web2x&context=3,"ChatGPT (mainly the UI) set a bad example, AI has been way more helpful to me for learning Go than going on Google or reading official docs, but not ChatGPT and rather Forefront, which can use GPT 3.5/4 or their own models but regardless they have a Internet Search function that uses the model to simply summarize dozens of actually real pages it found in a way that is easier for me to understand compared to the original, specially since I can keep chain-asking ""what is this/what is that"", and all from me explaining step-by-step with ""janky"" English and the full code. It also lists the pages it used so I can just click them and check it myself, (spoiler alert) it doesn't make as many mistakes as people think, even without search it does a great job understanding code, it won't usually solve more than basic problems and just keeps giving you different snippets to try but most of the time I end up fixing the issue because of the answers, even if the code doesn't work, I don't know how else to explain it. Of course my first language isn't English but I also learn almost entirely by example and docs don't usually have snippets for every little thing the code can do, it also sounds a bit advanced to me because it's just a lot of text with (programming/Go) terms that I usually don't use.",u/DarkCeptor44,https://www.reddit.com/r/golang/comments/17okcs8/comment/k7zl74p/?utm_source=share&utm_medium=web2x&context=3,"When I ask ChatGPT about it, it suggests model.go, view.go, controller.go etc. but says itself that the MVC concept does not exist in Go. So I'm interested how developer with some more experience than I in desktop apps would struct it.",u/Prestigiouspite,https://www.reddit.com/r/golang/comments/153pahy/comment/jsmdut2/?utm_source=share&utm_medium=web2x&context=3
1 language multiple babel mbxp humaneval_x so_2023_language_percent so_2023_language_rank so_tags github_prs github_pushes github_issues github_stars stack_gb codeparrot_gb alphacode_gb codegen_gb polycoder_gb subreddit_members subreddit_url anecdote_1_content anecdote_1_author anecdote_1_url anecdote_2_content anecdote_2_author anecdote_2_url anecdote_3_content anecdote_3_author anecdote_3_url
22 Lua ✅ ✅ N/A N/A 6.09% 18 22,413 139,939 717,566 166,471 366,575 6.58 2.81 2.9 0 0 19.0k https://www.reddit.com/r/lua/ First of all, don't use ChatGPT if you want to learn Lua. Refer to the well-written resources such as the "Programming in Lua" book instead. u/appgurueu https://www.reddit.com/r/lua/comments/11dkwdl/comment/jacqn3z/?utm_source=share&utm_medium=web2x&context=3 Ask chatGPT to convert java / concepts into language to Lua... works surprisingly well u/gluecat https://www.reddit.com/r/lua/comments/12wj39f/comment/jhhg8qi/?utm_source=share&utm_medium=web2x&context=3 Do you not find Copilot frustrating? I cannot stand it, it's the worst thing for me. Whenever I've actually needed help with something, it's either: Gave me absolute garbage code. Missed the point entirely. Maybe I'm just bad at giving it instructions, who knows 😅 u/VitexHD https://www.reddit.com/r/lua/comments/13tfqs2/comment/jlytud8/
23 Ruby 8 N/A ✅ N/A 6.23% 17 228,663 2,482,982 5,645,881 1,204,510 2,905,832 23.82 10.95 11.6 0 4.1 81.5k https://www.reddit.com/r/ruby/ Note that the failure mode for ChatGPT is that it will gaslight and lie to you. If you don't give it enough context, or the method names are ambiguous, there's a potential for it to make up explanations that sound plausible, but are dangerously incorrect. I'd advise talking to your team about the things that confuse you germane to your codebase, and only using ChatGPT for general Ruby content. u/throwaway-aso2fb https://www.reddit.com/r/ruby/comments/16y3bxq/comment/k36os5n/?utm_source=share&utm_medium=web2x&context=3 Not using copilot for the controversy around it stealing source code. Manager gave me a license however to use tabnine at the moment. In...basic scaffolding code it helps me speed up a bit by generating the blocks for example to write specs quickly, providing about 75% of the structure needed to get the spec fleshed out, e.g faster let declarations and do blocks. But for writing actual code I'm fighting it more than its helping me, since it simply doesn't understand what I am trying to write. Documentation is....hit&miss depending on whether it gets the meaning behind the variable names. u/OlivarTheLagomorph https://www.reddit.com/r/ruby/comments/zq847a/comment/j0yy2y8/?utm_source=share&utm_medium=web2x&context=3 I use Github copilot (which uses openai's codex) and occasionally throw some questions to ChatGPT. Currently I use it for Ruby and Kotlin. I committed to Copilot after trying it for five minutes. Total game changer. Time spent doing grunt work, writing repetitive tests etc, has dropped by 90% and I'm left with a lot more time to implement elegant solutions rather than throwing in quick fixes to meet tight deadlines. Sometimes it almost seems like it can read my mind. You still need to have the experience and expertise to ensure it hasn't missed the point - it doesn't always have the full context of the problems you're working on - but I would wholeheartedly recommend it to any developer as a way to increase productivity. u/onionionion https://www.reddit.com/r/ruby/comments/11usmxs/comment/jcqdd8q/?utm_source=share&utm_medium=web2x&context=3
24 Kotlin N/A N/A ✅ N/A 9.06% 16 92,664 346,824 816,744 174,810 545,403 Unspecified 0 0 0 0 73.8k reddit.com/r/kotlin chatgpt doesn't know that Kotlin can use java libraries, which makes sense since it knows nothing. Chatgpt doesn't know that you target older Android versions with new languages. The reason why there are more java programs for old reasons is just historical and doesn't benefit java in any way. But chatgpt will never understand this since it can't understand anything. Here chatgpt is correct. It's amazing how it can produce a correct answer without having any idea what it's doing. u/Feztopia https://www.reddit.com/r/Kotlin/comments/zo6jpo/comment/j0lv16b/?utm_source=share&utm_medium=web2x&context=3 If you want solid foundation, don't. ChatGPT is known for inventing things and confidently state it as if that's true, if you don't have knowledge to judge its output, you can't fully trust the answer. u/duongdominhchau https://www.reddit.com/r/Kotlin/comments/10tzne0/comment/j79pkls/?utm_source=share&utm_medium=web2x&context=3 Not mentioned yet, but I really believe ChatGPT and Copilot (and whatever is coming down the pike) really reduces the “learning a new language” hump for EVERY language, and definitely for Kotlin. Asking it to do idiomatic Kotlin usually produces quite good results, and asking it how to do a Java thing best in Kotlin definitely does well also. So every new Java developer will be adept at Kotlin even faster than before. u/LoveSpiritual https://www.reddit.com/r/Kotlin/comments/14bpuym/comment/jokay83/?utm_source=share&utm_medium=web2x&context=3
25 Rust ✅ ✅ N/A N/A 13.05% 15 39,147 400,875 947,751 239,196 941,468 40.35 2.68 2.8 0 3.5 256k https://www.reddit.com/r/rust/ I think programming is heading the same way as translation - a machine can give you a first draft, but experience is needed to verify and fix the resulting code. In the case of translation, many tools exist that will translate text from one language to another, but the results may be slightly or wholly inaccurate: knowledge of both the source and target languages is needed to verify the result. The same is applies to code generation by GPT. The combination of a human and machine will probably give better results, faster. But unsupervised code generation in a general sense is still a way off. u/remontantcoprology https://www.reddit.com/r/rust/comments/zgkuq6/comment/izi6p21/?utm_source=share&utm_medium=web2x&context=3 The issue is that most of the time the code wont compile or have UB so... It could be blazingly fast to give you text but if need 5 or 10 minutes per try to check is doing what i want i prefer to do the code myself and then i am sure is doing what i want. In other langs like Python maybe but in complex langs like C++ or Rust is not as good because of it complexity, i havent tried but in Rust you cant make a buble sort loop without swap(i, j) and GPT could try the usual aproach of array[i] = array[j] which wont work at all u/JuanAG https://www.reddit.com/r/rust/comments/zgkuq6/comment/izhfvi3/?utm_source=share&utm_medium=web2x&context=3 I searched the huggingface hub for some LLM to help Rust coding. But most of them just for python. does anyone knows some LLM for just for Rust. Or how to build one. thanks u/AbleEstablishment155 https://www.reddit.com/r/rust/comments/16iz3fj/is_there_a_specific_llm_for_rust_coding/?utm_source=share&utm_medium=web2x&context=3
26 Go ✅ ✅ ✅ ✅ 13.24% 14 71,541 2,642,302 4,859,219 1,815,979 7,318,078 118.37 19.28 19.8 21.4 15 224k https://www.reddit.com/r/golang/ Personally for me this is the completely wrong approach. Having the ai write it for you and then understand what it wrote is less than optimal. You should use chatgpt to ask questions, not write code if you don’t understand it. Use it as a mentor who can’t be busy to answer your questions. Not as someone who will complete your homework and then maybe you’ll try and understand it afterwards. If a student actually wants to learn a subject, do they get someone to complete their homework? You get what I mean? If your goal is to just complete a project in anyway. Then maybe might work but most likely won’t. You should understand and come up with the logic behind everything you write before letting ai write it for you. Copilot is good for predictable sequences, but most things logic wise it fails as it does not know implementation. u/vEncrypted https://www.reddit.com/r/golang/comments/16cs5md/comment/jzl928k/?utm_source=share&utm_medium=web2x&context=3 ChatGPT (mainly the UI) set a bad example, AI has been way more helpful to me for learning Go than going on Google or reading official docs, but not ChatGPT and rather Forefront, which can use GPT 3.5/4 or their own models but regardless they have a Internet Search function that uses the model to simply summarize dozens of actually real pages it found in a way that is easier for me to understand compared to the original, specially since I can keep chain-asking "what is this/what is that", and all from me explaining step-by-step with "janky" English and the full code. It also lists the pages it used so I can just click them and check it myself, (spoiler alert) it doesn't make as many mistakes as people think, even without search it does a great job understanding code, it won't usually solve more than basic problems and just keeps giving you different snippets to try but most of the time I end up fixing the issue because of the answers, even if the code doesn't work, I don't know how else to explain it. Of course my first language isn't English but I also learn almost entirely by example and docs don't usually have snippets for every little thing the code can do, it also sounds a bit advanced to me because it's just a lot of text with (programming/Go) terms that I usually don't use. u/DarkCeptor44 https://www.reddit.com/r/golang/comments/17okcs8/comment/k7zl74p/?utm_source=share&utm_medium=web2x&context=3 When I ask ChatGPT about it, it suggests model.go, view.go, controller.go etc. but says itself that the MVC concept does not exist in Go. So I'm interested how developer with some more experience than I in desktop apps would struct it. u/Prestigiouspite https://www.reddit.com/r/golang/comments/153pahy/comment/jsmdut2/?utm_source=share&utm_medium=web2x&context=3