oblomov, to programming
@oblomov@sociale.network avatar

I have a question for people with better theoretical background on and especially for developers.

Is the following pattern known and does it have a name?

I have a number of classes (call them C1, C2, etc) that all derive from the same class B. I have a superclass (template, actually) D that derives from C1, C2 etc. To have a single B, the standard solution is to go with virtual inheritance to close the diamond (so far, so good).

1/n

omalley,
@omalley@fosstodon.org avatar

@oblomov most of the newer languages (eg. or ) don’t support inheritance between classes/structs. They only support implementation of traits, which only define interface and not implementation. In general, using inheritance for implementation reuse is brittle and I like to avoid it.

freeformz, to golang
@freeformz@hachyderm.io avatar

In one of these areas?

  • Denver, CO
  • NY, NY
  • Los Angeles, CA
  • San Francisco, CA

Write #golang and/or #kotlin?

Come be a teammate of mine!

https://www.fastly.com/about/jobs/apply/?gh_jid=5999732&gh_src=7908755b1us

(May open to all of the USA if we don’t find someone in a few weeks)

frankel, to architecture
@frankel@mastodon.top avatar

I continue to work on my #OpenTelemetry demo. Its main idea is to showcase traces across various technology stacks, including #asynchronous communication via an #MQTT queue. This week, I added a couple of components and changed the #architecture. Here are some noteworthy learnings; note that some of them might not be entirely connected to @opentelemetry

https://blog.frankel.ch/even-more-opentelemetry/

#Observability #DistributedTracing #ApacheAPISIX @graalvm #Golang #Ruby

thomastospace, to random
@thomastospace@phpc.social avatar

I just started a plain typescript project, and was too lazy for a docker setup so I just installed Node with apt and went on my way.

I installed Typescript, that went fine, but when trying to use it it gave a vague error.

Quick search fixed it, but... I'm amazed by the cause: Typescript didn't support the version of Node I had installed, which sure.. That's okay. But why didn't NPM tell me this? NPM does not have node version constraints?!?

🤯

lukasrotermund,

@jaapio While composer is useful, it's not always the bee's knees, especially during major updates involving multiple packages.

Some of the error messages are completely useless and I have spent hours trying to find the problem. I have often wished I could switch to another language because I was stuck in composer update hell.

For example, I have fewer problems with Go modules and rust dependencies via rusts cargo. Both update more smoothly.

preslavrachev, to Java
@preslavrachev@mastodon.social avatar

Java’s records are a bit like Go’s interfaces. You think you’d be using them for everything, while in reality, they’re good for like 2-3 cases. Indeed, in those 2-3 cases, they’re really saving the day, but using them everywhere “just because” will result in an incomprehensible mess.


khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

Should the #dotnet community read this list in an order of priority?

rockylhotka,
@rockylhotka@fosstodon.org avatar

@khalidabuhakmeh @elan @redzimskidev @KirillOsenkov @bradwilson I also think it is important to separate #wasm from #dotnet. Using (for example) #golang in wasm doesn't require all the runtime downloads and other dotnet stuff.

Personally I'd very much like to see some #blazor competitors show up from places like the Go community, because that could be quite amazing!

themagpi, to random
@themagpi@mastodon.social avatar

Good morning, folks! Hope you had a great weekend.

Once again we come to you to ask... are you working on any Raspberry Pi or Pico projects? If so, we'd love to see a photo

jtruk,
@jtruk@mastodon.social avatar

@themagpi I'm early stage coding...
The server is written in #golang, and will receive RGB values (and more) from a web form.
The #pimoroni Plasma Stick 2040W is long-polling those values from the server.
I'm hoping it should all come together for @emf 🙂

A web panel on a laptop. It lists LEDs and RGB values. As the values are changed, LEDs on the wall behind change colour.

linus, to random
@linus@donotsta.re avatar

Anyone remember /cgi-bin? I brought it back, but using a Bash webserver and my own JS engine instead of Perl scripts :blobcat3c:

https://linus.dev/posts/kiesel-devlog-8/

lil5,
@lil5@fosstodon.org avatar

@famfo @linus

#golang is able to do so too, and much faster then JS

http://stackoverflow.com/questions/43701302/ddg#43711864

carapace, to golang
@carapace@mastodon.social avatar

Is this a bug in Go's regexp package? This program should print false instead it prints true:

package main

import (
"fmt"
"regexp"
)

func main() {
r := regexp.MustCompile("^1|0$")
fmt.Printf("%v\n", r.MatchString("00"))
}

I checked against Python's re module and it works as expected:

>>> import re
>>> r = re.compile('^1|0$')
>>> print(r.match('00'))
None

preslavrachev, to golang
@preslavrachev@mastodon.social avatar

When people ask me why I like #golang so much ...

preslavrachev, to golang
@preslavrachev@mastodon.social avatar

I hacked together a small service in #golang It allows me to post youtube links, which it would then parse, and add autio streams to a private #RSS feed. Works like a charm, so I am happy 😊

For obvious reasons (legal, etc.), I don't plan to open-source the code and can't make a service out of it. However, if anyone is interested, let me know, I may eventually share the code on a per-request basis.

https://mastodon.social/@preslavrachev/112428014490517462

erinc, to python
@erinc@mastodon.social avatar

After an 8-year break from web development, I evaluated modern tech stacks to build my personal projects in 2024. This post chronicles my journey in selecting the perfect combination of backend, frontend, database, and hosting.

https://erinc.ca/tech-stack-2024

alyx, to golang French
@alyx@3615.computer avatar

Je vais ptete reprendre un peu le stream pour des jeux vidéos et du développement en . Je vais essayer Owncast en rentrant, ça peut être sympa et moins me faire peur que Twitch. Des conseils pour utiliser Owncast ?

kellogh, to random
@kellogh@hachyderm.io avatar

the #gpt4o news is cool, but now i want to see an embedding model that i can use with a streaming interruptible conversation

kellogh,
@kellogh@hachyderm.io avatar

also, now with #gpt4o, latency is going to be critical if you’re doing streaming audio/video, so #python may start looking less appealing. what’s the new #LLM language? #rust? #go? #cpp? #fortran?

#rustlang #golang

ankit, to emacs
@ankit@emacs.ch avatar

I ran into some go code that use build tags. My existing test functions didn't work. To handle build-tags, I defined go-build-tags in .dir-locals.el and used the variable in my functions.

((go-ts-mode . ((go-build-tags . "device,json1"))))

https://git.argp.in/ankit/dotfiles/commit/c5c165c830f9f61c88d366b8a01efb083ea4c97a

#emacs #golang

cdrmack, to cpp
@cdrmack@fosstodon.org avatar

After 10 years of commercial experience in #cpp I think I’m ready for a new chapter. I have played around with #rust #golang #zig and #clojure but most job offers that I see are for people with at least X years of commercial experience in this exact languages. Do you have any hints how to approach this? I would think that my previous experience as a #software engineer would matter. Especially since I do not expect to move to another senior role, I’m checking junior positions too. #jobsearch

kali, to golang
@kali@cyberpunk.lol avatar

hey @vantablack are bots allowed on cyberpunk.lol? like if i wanted to host a fork of @yuribot that posts femboys... would that be allowed?

im open to slowing down the time between posts and stuff like that, and it wont be ready immediately coz i know jack about #GoLang and im no expert at bot development

if not all good, im already in the process of making a BotsIn.Space account

outsidecontext, to golang
@outsidecontext@fosstodon.org avatar

As part of some side project using #golang I implemented the musicbrainzws2 package. It wraps the #MusicBrainz web service and search API into a Go friendly interface.

The package is I think rather feature complete, but likely there are bugs and in the current state I reserve the freedom to change the interface at any time as I see fit. But maybe you want to give it a try if you need to access the MB API with Go.

https://pkg.go.dev/go.uploadedlobster.com/musicbrainzws2

ks982579, to golang
@ks982579@techhub.social avatar

Level up your programming skills with Go! ⏫

My main focus for my Master's in Computer Science has been on Rust, but I'm always looking to expand my skillset. That's why I'm excited to dive into the Golang Programming bundle by hashtag #Packt on Humble Bundle. This bundle offers a great opportunity to learn Golang, a powerful open-source language gaining traction in the tech industry. I'm particularly interested in the "Go Programming - Beginner to Professional" book, which seems like a perfect starting point for anyone new to Go, like myself.

Is anyone else exploring Golang?

Feel free to share your experiences or learning resources in the comments below!

#Golang #GoProgramming #Programming #HumbleBundle #PacktPub

https://www.humblebundle.com/books/golang-programming-packt-books

khalidabuhakmeh, to golang
@khalidabuhakmeh@mastodon.social avatar

Doing some #golang today.

gopher dancing GIF

wyri, to php
@wyri@haxim.us avatar

Kinda forgot how much fun it was to write code stitching map tiles together, and also how easy it was. Currently at 82 lines of . Once finished it will be a new package, as the has some massive glaring bug in it that took me 6 years to find. Sprinkling some threads and over this once it's done. The home clusters fans will sing once more

buherator, to golang
@buherator@infosec.place avatar

This latest writeup by @joern mentions the #documentation of Go’s filepath.Clean is “not really obvious” when dealing with relative paths.

I think this is something all #golang devs should be aware of to avoid similar vulnerabilities.

The language is kind of amazing:

  • Step 3. only applies if there is a parent path to be eliminated together with the subsequent “..” (“/foo/..” -> “/“)
  • Step 4. only applies to “rooted” (absolute) paths, so “/../foo” would become “/foo”, but “../“ is left untouched (as there is no relative parent path to eliminate either).

This makes the docs technically correct (“the best kind of correct!”), but even with the solution at hand it took some head scratching to figure out the true meaning.

excds, to golang
@excds@berlin.social avatar

For a work project it seems we will have to implement a #golang library for building/evaluating ODRL statements. Since I haven't previously started such a parser library project, I would like suggestions on projects I could look at for inspiration in

  • Ease of use in interfaces
  • Test structure
  • Generally nice code

Please post links to projects you think are nice to use. Oh, and please boost for bigger reach.

dusnm, to golang
@dusnm@fosstodon.org avatar

Writing a spec compliant implementation of a server that receives webmentions in #golang.

Making sure I cover all edge cases is so time consuming...

#webmention

mort, to Kotlin
@mort@fosstodon.org avatar

I can't deal with languages with optional semicolons! I like languages without semicolons, but when they're optional, especially if they feel "C-like", I always end up adding semicolons to some lines even when I try to write in a semicolon-less style. I'm writing some #kotlin now and I decided to just use semicolons consistently because the alternative is seemingly to use them inconsistently.

Strangely, this isn't an issue I have in #golang. I do have it in #rust however.

#programming

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines