#LearningGo

CJ :Polymaths: πŸ‘¨β€πŸ’»roguefoam@polymaths.social
2025-01-15

In other news, I also continued my path towards #LearningGo a bit today with a bit of Bash tacked on.

I did a few of the projects on Exercism’s course, which I enjoyed because they are typically problems I’ve previously solved in other languages that I now get to tackle with a fresh set of tools. Still on easy difficulty but getting better.

I think I should, at some point in the coming weeks, revisit my core programming concepts. I found myself fumbling towards solutions that could have been solved with a much simpler one-liner, and I was shocked that I hadn’t seen it sooner.

I also, with some help from @rl_dane @joel and @dusnm, made a function in my terminal config to make submitting project iterations much easier. With an argument of project name, it will check for a download and if it is setup locally, submit the latest file save. Otherwise, download the project and get started. It was fun but I am really not great or experienced at all with bash scripting so it took some trial and error :neocat_confused:

CJ :Polymaths: πŸ‘¨β€πŸ’»roguefoam@polymaths.social
2025-01-14

Well, I've done the concepts track on Exercism...now it's all projects from here. #LearningGo

A cartoon owl with a graduation cap on a trophy. Below reads:
"Fundamental
Awarded on 13th Jan 2025
Congratulations on completing Learning Mode in Go"
CJ :Polymaths: πŸ‘¨β€πŸ’»roguefoam@polymaths.social
2025-01-10

I've given Exercism's Go track that @rl_dane shared yesterday a shot, and I'm about 15% through. Some brief thoughts:

  • Slices are weird. It reminds me a lot of how arrays work in MATLAB, but slightly off and it's been tripping me up a lot.
  • Go is a strict language, more than I've ever done. I appreciate it because it's helping me become more mindful of my code, but I've encountered more errors in the past 24 hours than I think I have at any other point in my programming career.
  • I really suck at Regex. That was the hardest lesson and the Go wasn't the part I was struggling with... :BlobCatItIsFine:
  • I really love that all the modules are project based in some fashion, even if it is really simple. I learn more by doing than I do reading the docs, so I usually just scroll down to the instructions, start, and learn as I go which is nice.
  • I like the online editor, but doing it in VS Code is so much nicer...I need an IDE to feel sane lol.

#LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-10

Sorry, forgot to give credit to @dolanor for pointing me to that site!

#LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-10

@RadioAzureus

That's a really good one. They just don't have a complete #Golang course (yet).

#LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-10

Hey #LearningGo peeps, I found a great new (free) course online for Go. I'm checking it out now:

https://exercism.org/tracks/go

I was going to do the #Coursera course, but their TOS had a binding arbitration clause. THE GALL! :BlobFoxAngry:

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-09

@dolanor

Thank you so much!! I will check both of those out!

#LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-09

@gareth

Go by example looks really good. Thanks for that!!

#LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-09

Well, I just ran headfirst into another wretched #BindingArbitration agreement.

I created a #Coursera account to take a #Go programming course, and of course their bloody TOS has a #BAA.

Jerks. :(

I guess I'm back to just reading a book, as the online courses are either too brief, don't have much in the way of exercises, are expensive, or are hiding behind stupid BAAs.

#Golang #LearnGo #LearningGo #VeryFrustrating

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-05

Just in case anyone's curious, my go shebang handler, "gorun" is here: https://codeberg.org/rldane/scripts/src/branch/main/gorun

#Go #GoLang #LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-04

@joel

Incorrect. Some things work beautifully, and are fully resplendent in their functional derpiness.

Take, for example, Go's date strings.

That is peak derpiness. Yet functional.

#Go #GoLang #LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-04

Hey Go peeps...

Is this cursed?!? XD

$ cat ~/bin/gorun
#!/usr/bin/env bash

set -u   #treat undeclared variables as errors

if [[ ${1:-} ]]; then
    tempfile=$(mktemp).go
    grep -v "^#!/.*gorun*" "$1" > "$tempfile"
    go run "$tempfile"
    rm "$tempfile"
else
    echo "Please specify a file to \"go run.\" You may use this script as the shebang"
fi
$ cat tmp.go
#!/usr/bin/env gorun
package main

import "fmt"

func main() {
    fmt.Println("Hello world!!!")
}
$ chmod +x tmp.go
$ ./tmp.go
Hello world!!!

#Go #GoLang #LearningGo

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-04

Using backticks (` `) for multi-line strings in Go is... odd.

I rather prefer Python's solution: """ """ or ''' '''

Of course, in bash, nearly any string can be a multi-line string. :BlobCatHappie:

#LearningGo #Go #Golang #Issue9 #Python #Bash

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-03

Hey #LearningGo friends,

What do people think of the Coursera course, "Programming with Google Go Specialization?" >link<

#Go #GoLang #Issue9

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-02

@willprogramforcookies

Nice, how are you liking the book so far?

I'm going to use the hashtag #LearningGo to toot about my adventures, so you're welcome to use it too.

R.L. Dane :Debian: :OpenBSD: 🍡 :MiraLovesYou:rl_dane@polymaths.social
2025-01-02

@thestrangelet

Great! How about a hashtag, like #LearningGo?

cc: @kirby

2024-02-14

We're all set for our next event.

@jonbodner will be joining us and will be speaking about testing and fuzzing. Jon and #OReillyMedia have teamed up and are providing ebook copies of #LearningGo to raffle away to 5 lucky attendees.

Ardan Labs is also joining in the fun.

Join us tomorrow (Feb 15) at 7:00 CET.

meetup.com/stuttgart-gophers/e

See you there!

#go #StuttgartGophers #meetup

2024-01-25

@royalrex
#OReillyMedia just published the second edition of Learning Go by Jon Bodner

You can get the Kindle version now or pre-order the paperback at Amazon.

oreilly.com/library/view/learn

#go #LearningGo

2023-01-13

Learning Go 2E update:

Several people volunteered to review the draft and their feedback has been tremendous. Thanks so much!

I've also started updates for chapter 5 (functions). There aren't any implementation changes since the first edition, so my edits will be light. There had been a request for more examples explaining how closures work, and I'm adding exercises to every chapter. In a week or so, I should have it done, and then on to revising the pointers chapter!

#golang #learninggo

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst