#Golang
Explore tagged Tumblr posts
heart-ghost-studyblr · 9 months ago
Text
Tumblr media Tumblr media Tumblr media
Definitely this counts as productive night of studies.
I arrived early, grabbed my seat, and dive into another incredible Golang SP event at Microsoft Reactor.
During the event, we discussed the simplicity of error handling in Go, which was practically reinforced by creating a CSV file parser, ensuring that any issues encountered are well identified and handled.
35 notes · View notes
pilosophos · 3 months ago
Text
Tumblr media
One thing I like about Go (the programming language) is that it has a really funny little mascot, which I think more programming languages should have. So here is the Go Gopher Playing Go, which is now a sticker you can get!
9 notes · View notes
mozarting · 4 months ago
Text
I haven't written a single line of code since last year's November when I was going through the Rust book. Now, I'm not feeling as motivated about Rust as I used to be. Instead, I'm suddenly interested in programming in Go, which is ironic because when I was trying Go before Rust, I felt like learning Rust instead.
10 notes · View notes
nixcraft · 11 months ago
Text
sttr – Awesome Linux & Unix tool for transformation of the string
Tumblr media
-> Read more: sttr – Awesome Linux & Unix tool for transformation of the string
30 notes · View notes
ferrety-lixciaa · 5 months ago
Photo
Tumblr media
Commission - Golang!
A cute lil commission finished for Sveken of his dragon sporting golang merch. So cute <3
Posted using PostyBirb
8 notes · View notes
freerange-binaries · 7 months ago
Text
Simple boid simulation
Tumblr media
Hello! over the past weekend I made a very quick flocking simulation in ebitengen. Each little boid follows a few simple rules - defined here: https://en.wikipedia.org/wiki/Boids plus an extra rule of my own to flee from the mouse cursor. Longer blog/discussion under the cut
I'm still trying to dip my toes into the gamedev world (most of my experience is in web technologies) and this was a fun little afternoon project to get to know things a bit better. I chose ebitengine for a couple reasons: first, I feel a little more comfortable with the code-only or code-first engines/frameworks coming from a non-gamedev coding background, and second, I've really been liking Go/Golang from what I've tried so far. A fun, but perhaps overboard, fact about this little demo is each boid calculates its next move in a go function, so the 'game' is multi-threaded. Also on my list of frameworks to try is monogame since C# is the language I've worked with the most professionally and it has a good reputation. I still have some hang-ups about tying myself to a Microsoft product, though - every time I look at the naming conventions of different versions of .NET I want to rethink my career choices, for example.
I'm not sure how far I'll take this idea, but I did have a loose plan to expand this little simulation into a prototype for a sheep herding game. However, spending more time thinking about what it would take to bring this into a full game makes me a little hesitant to fully commit to using a tool like ebitengine. Essentially, once I need a level editor I'm a bit worried if it would be a better use of time in the long run to just use a full fledged engine like Godot. Still, other big projects have gotten by on tools without built-in level editors in the past, so maybe its not as big of a downside as I think.
That's it for this first update post! I'm hoping to post little summaries like this of my future hobby projects, as well as maybe some older things I've done. If you've read this far, thanks a ton! If you're curious about how I made this feel free to ask away
12 notes · View notes
guzscode · 4 months ago
Text
I'm coding so much lately, 4000 lines changed just in one project this last week. Creating a blog system from scratch is being fun.
I feel unstoppable
5 notes · View notes
quanyails · 7 months ago
Text
The Google programming language gopher *hands down* wins the award for best/worst/scrunkliest mascot:
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Source: [1] [2] [3] [4]
4 notes · View notes
plleonart · 4 months ago
Text
3 notes · View notes
pilosophos · 3 months ago
Text
Tumblr media
I couldn't stop giggling while drawing Lain in Go Gopher PJs instead of her usual classic bear PJs.
You can get my drawing as a sticker!
6 notes · View notes
guzsdaily · 6 months ago
Text
Good Code is Boring
Daily Blogs 358 - Oct 28th, 12.024
Something I started to notice and think about, is how much most good code is kinda boring.
Clever Code
Go (or "Golang" for SEO friendliness) is my third or fourth programming language that I learned, and it is somewhat a new paradigm for me.
My first language was Java, famous for its Object-Oriented Programming (OOP) paradigms and features. I learned it for game development, which is somewhat okay with Java, and to be honest, I hardly remember how it was. However, I learned from others how much OOP can get out of control and be a nightmare with inheritance inside inheritance inside inheritance.
And then I learned JavaScript after some years... fucking god. But being honest, in the start JS was a blast, and I still think it is a good language... for the browser. If you start to go outside from the standard vanilla JavaScript, things start to be clever. In an engineering view, the ecosystem is really powerful, things such as JSX and all the frameworks that use it, the compilers for Vue and Svelte, and the whole bundling, and splitting, and transpiling of Rollup, ESBuild, Vite and using TypeScript, to compile a language to another, that will have a build process, all of this, for an interpreted language... it is a marvel of engineering, but it is just too much.
Finally, I learned Rust... which I kinda like it. I didn't really make a big project with it, just a small CLI for manipulating markdown, which was nice and when I found a good solution for converting Markdown AST to NPF it was a big hit of dopamine because it was really elegant. However, nowadays, I do feel like it is having the same problems of JavaScript. Macros are a good feature, but end up being the go-to solution when you simply can't make the code "look pretty"; or having to use a library to anything a little more complex; or having to deal with lifetimes. And if you want to do anything a little more complex "the Rust way", you will easily do head to head with a wall of skill-issues. I still love it and its complexity, and for things like compiler and transpilers it feels like a good shot.
Going Go
This year I started to learn Go (or "Golang" for SEO friendliness), and it has being kinda awesome.
Go is kinda like Python in its learning curve, and it is somewhat like C but without all the needing of handling memory and needing to create complex data structured from scratch. And I have never really loved it, but never really hated it, since it is mostly just boring and simple.
There are no macros or magic syntax. No pattern matching on types, since you can just use a switch statement. You don't have to worry a lot about packages, since the standard library will cover you up to 80% of features. If you need a package, you don't need to worry about a centralized registry to upload and the security vulnerability of a single failure point, all packages are just Git repositories that you import and that's it. And no file management, since it just uses the file system for packages and imports.
And it feels like Go pretty much made all the obvious decisions that make sense, and you mostly never question or care about them, because they don't annoy you. The syntax doesn't get into your way. And in the end you just end up comparing to other languages' features, saying to yourself "man... we could save some lines here" knowing damn well it's not worth it. It's boring.
You write code, make your feature be completed in some hours, and compile it with go build. And run the binary, and it's fast.
Going Simple
And writing Go kinda opened a new passion in programming for me.
Coming from JavaScript and Rust really made me be costumed with complexity, and going now to Go really is making me value simplicity and having the less moving parts are possible.
I am becoming more aware from installing dependencies, checking to see their dependencies, to be sure that I'm not putting 100 projects under my own. And when I need something more complex but specific, just copy-and-paste it and put the proper license and notice of it, no need to install a whole project. All other necessities I just write my own version, since most of the time it can be simpler, a learning opportunity, and a better solution for your specific problem. With Go I just need go build to build my project, and when I need JavaScript, I just fucking write it and that's it, no TypeScript (JSDoc covers 99% of the use cases for TS), just write JS for the browser, check if what you're using is supported by modern browsers, and serve them as-is.
Doing this is really opening some opportunities to learn how to implement solutions, instead of just using libraries or cumbersome language features to implement it, since I mostly read from source-code of said libraries and implement the concept myself. Not only this, but this is really making me appreciate more standards and tooling, both from languages and from ecosystem (such as web standards), since I can just follow them and have things work easily with the outside world.
The evolution
And I kinda already feel like this is making me a better developer overhaul. I knew that with an interesting experiment I made.
One of my first actual projects was, of course, a to-do app. I wrote it in Vue using Nuxt, and it was great not-gonna-lie, Nuxt and Vue are awesome frameworks and still one of my favorites, but damn well it was overkill for a to-do app. Looking back... more than 30k lines of code for this app is just too much.
And that's what I thought around the start of this year, which is why I made an experiment, creating a to-do app in just one HTML file, using AlpineJS and PicoCSS.
The file ended up having just 350 files.
Today's artists & creative things Music: Torna a casa - by Måneskin
© 2024 Gustavo "Guz" L. de Mello. Licensed under CC BY-SA 4.0
4 notes · View notes
sabbha20 · 9 months ago
Text
2 notes · View notes
mualice · 10 months ago
Text
Figuring out how to get the average color of an image...
I could just loop through the image and average out the RGB values like this:
Tumblr media
But it'll iterate through every single pixel. It will struggle with 500x200 images (100,000 pixels). Another solution is to select 50 random pixels from the image and get the average of that, but I don't know how accurate that will be.
So, stuck with a problem I am incapable of solving by myself... I searched for a path that other people that have traversed before.
Turns out, if you get the average color of an image, it turns into the color of vomit.
From that information, my goal changed from getting the average to getting the most dominant color.
I could do this using a histogram to count every color, but it only works when there are a few colors (less than 50) to avoid inaccurate results.
What I could do is somehow flatten the entire image into base colors. A palette of some sorts.
...
PalettedImage.
I do have the palette!
Tumblr media
All I need to do is count the pixels that are similar to it and see what the dominant color is.
But how can I define "similar colors"?
Update soon-ish.
(This problem might be related to nearest-neighbor search)
6 notes · View notes
7bits · 2 years ago
Text
codeblr update: i decided to try learning go again by making things harder for myself and building my next college assignment with it. and it's been pretty cool actually. go is like a cooler and easier C, you can do most of the same things but it is not a pain all the time
17 notes · View notes
guzscode · 9 months ago
Text
Dislate DevLog 2: Refactoring, and Premature Optimization
Daily Blogs 288 - Aug 19th, 12.024
It has been a while since I made a dev log of this project, personal life got in the way and somehow in the meantime of the last one, I actually was hired to my first ever job. This project is being somewhat hard to me, it has been a while since I've done a Discord bot, the API changed a lot, and now I'm using discordgo instead of discord.js.
Being totally honest, I'm kinda stuck on it, making some refactors in the last commits. However, while preparing to write this log, I may have found why: I'm making optimizations and thinking too much about a project that is just a Minimal Viable Product, again. Premature Optimization is something that I struggle a lot, maybe because of anxiety, but probably more because of the lack of experience to know when I'm optimizing too prematurely, which makes me find myself becoming stuck into a problem because I want to make it "perfect" instead of "good enough" in the first draft. In this project specifically, it's even dumber since the only one who will use it is myself on my own internal Discord server, and most of the commands are admin tools that just me will have access to. Even though I want to in the future make this bot something for everyone to use, it's not the focus, and should have been something that would take just some weeks or so to make.
So yeah, I should probably stop overthinking and trying to be fancy. Write the feature first, make it work, and then you consider refactoring.
Today's artists & creative things Music: UNDO UNDO - by Rolobi
© 2024 Gustavo "Guz" L. de Mello. Licensed under CC BY-SA 4.0
2 notes · View notes
bizarre-furry-bastard · 1 year ago
Text
do you think that ferris the crab and the Go Gopher kiss when no one’s looking
6 notes · View notes