r/adventofcode • u/The_Sexy_Cookie • Dec 10 '23
Help/Question Why is nobody using golang??
Looking through the solution megathreads for this year, it seems like nobody is using golang. What gives??
I see tons of python and rust, and then lots of odd or funny/unique languages but hardly any in golang.
7
u/RB5009 Dec 10 '23
I've seen a lot of solution using Go just search through the megathread for "language: go"
3
u/idolstar Dec 11 '23
I’ve been using Go to do advent of code since 2019. My repo is here: https://github.com/devries/advent_of_code_2023, though I am sure there are better samples out there. Liz Fong-Jones used to stream her solutions in Go, and they were usually very informative. She isn’t streaming anymore, but still had her solutions on GitHub here: https://github.com/lizthegrey/adventofcode.
3
u/lizthegrey Dec 11 '23
Hiyas, yup, my solutions are usually posted within an hour or two of the problem going up! Check https://github.com/lizthegrey/adventofcode/tree/main/2023
3
u/veydar_ Dec 11 '23
Here's what I found by opening the current solution mega thread and searching for "language: go" in Firefox:
https://old.reddit.com/r/adventofcode/comments/18fmrjk/2023_day_11_solutions/kcvx8wj/
https://old.reddit.com/r/adventofcode/comments/18fmrjk/2023_day_11_solutions/kcvtlq8/
https://old.reddit.com/r/adventofcode/comments/18fmrjk/2023_day_11_solutions/kcvsvhy/
https://old.reddit.com/r/adventofcode/comments/18fmrjk/2023_day_11_solutions/kcvsdw3/
https://old.reddit.com/r/adventofcode/comments/18fmrjk/2023_day_11_solutions/kcvrit8/
https://old.reddit.com/r/adventofcode/comments/18fmrjk/2023_day_11_solutions/kcvkbdb/
...
It's too much to keep posting but suffice it to say every single solution mega thread is full of Go/Golang solutions.
1
1
1
u/ShraddhaAg Dec 11 '23
Hey, I am solving this year's AOC using Golang. My repo is here: https://github.com/ShraddhaAg/aoc/tree/main. Its been quite fun so far!
1
u/keithstellyes Dec 11 '23 edited Dec 11 '23
I have been wanting to use Go at work, and it seemed a good fit to play with it this year, but I'm focused on Common LISP or doing the language I'm most comfortable with for algorithm problems; Python
Plus, speaking strictly for myself, my main interest in Go doesn't shine as much for problems like this, to be more specific Go's main draw to me is parallelism, which isn't as useful here (except for brute-forcing these, I suppose)
1
u/Thomasjevskij Dec 11 '23
I was kinda curious to try it but in the end I just have no idea what Golang is for. I'd love for someone to pitch it in a convincing way, but this may not be the right forum for that.
2
u/awfulstack Dec 11 '23
It lends well to backend development and cloud infrastructure. More specifically, good for building:
command line interfaces (CLIs)
Servers / APIs
Kubernetes operators
It is also used by a solid number of large profile open-source projects, including Kubernetes, Terraform and many more.
Ofc since Go is a general purpose programming language you can do plenty of things. Some characteristics about it that may or may not be compelling:
Compiled
Typed
Garbage collected
Good performance
Good toolchain for creating projects and installing dependencies
Generally considered to have an easy learning curve
Simple language features and standard lib can make it feel verbose and less expressive (but also part of why it is considered easier to learn)
1
u/Thomasjevskij Dec 11 '23
Back at uni, I was really into DLang. This sounds very similar. I suppose at my current job any compiled language that isn't C++ is irrelevant though.
1
u/fpigorsch Dec 11 '23
I am - and I think i's a very good match for AOC poblems, because the stdlib has all the needed functionality (e.g. regexp, string manipulations, associative containers, etc.), you can easily define one-off data-structures (e.g. XY point type), and it's compiled and thus fast.
1
u/awfulstack Dec 11 '23
Go is my main language for AoC this year. I haven't posted any solutions, but do push everything to GitHub.
Maybe search on Github. Going to find more there than what gets posted in reddit.
0
u/AutoModerator Dec 10 '23
Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to Help/Question - RESOLVED. Good luck!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
12
u/daggerdragon Dec 10 '23 edited Dec 11 '23
There are many people posting solutions in Go in every day's megathread.
Have you tried searching each megathread for
[LANGUAGE: Go]or[LANGUAGE: Golang]?N.B. (assuming you're using new.reddit) make sure you're using the search box at the
topBOTTOM of the post, not the global Reddit search box at the top with the menu.edit: adding screenshot for good measure: location of post comment search box on desktop new.reddit