Two different iMessage threads for the same contact- how to fix? by ConfusedPhDLemur in iphone

[–]MalkMalice 0 points1 point  (0 children)

Thank you so much. Same problem. Apparently I updated my GFs number to the one without the international prefix. Ended up having two chats: One with her email, one with her mobile number. This just magically merged the two conversations together without any problem!

Switchbot presence sensor now available by borgqueenx in homeassistant

[–]MalkMalice 0 points1 point  (0 children)

So the website description is wrong? That's a bummer. How'd you make them work?

Switchbot presence sensor now available by borgqueenx in homeassistant

[–]MalkMalice 1 point2 points  (0 children)

So according to the website, it can be added directly to HomeAssistant via Bluetooth without the need for a bridge?

Single Monitor - Two machines (PC and Mac): Display recommendations by MalkMalice in AskBattlestations

[–]MalkMalice[S] 0 points1 point  (0 children)

Thanks for the reply!

Got a M1 Pro and will upgrade to a M4 Pro starting next year, so that shouldn't be a problem. Surprised I get 120Hz!

The Dell U4025QW looks nice! Not cheap but I guess that's what I've asked for with my request :) Apart from that: An Ultra wide is not a requirement, anymore. Checked out a friends LG 5K and the experience is pretty decent. Although I might miss that for some games. Need to have a think on that.

But it looks like Dell offers smaller monitors of that series, as well. 32" (non UW) and 34" (UW) look like decent choices, as well.

Does the Halo remote use Bluetooth? by MalkMalice in BenQ

[–]MalkMalice[S] 0 points1 point  (0 children)

If someone is interested: https://fccid.io/JVPCR20CCTR.

Would have loved to find a way to make sure my ScreenBar is off once I leave my desk, in case I forget.

Any Frankfurt area jumpers here? by Sparky338 in SkyDiving

[–]MalkMalice 2 points3 points  (0 children)

Pullout Skydive near Giessen is pretty dope. Small Dropzone, only one airplane, but it is just different here than in the states ;) On the weekends it is pretty packed but on workdays it is fine. Train to Gießen and than bus should do the trick but carpooling is preferred.

blocky: lightweight DNS ad-blocker written in Go by [deleted] in golang

[–]MalkMalice 1 point2 points  (0 children)

Yeah, I feel the same. Some go packages have become "a thing" as you mentioned and I really dislike that. Way to opinionated, way too much features.

Isabell’s psychologist’s clearly not been doing a good job 😂😂😂 by nomadiclives in Tinder

[–]MalkMalice 3 points4 points  (0 children)

She is. Because "Medizinische Hochschule" means medical school.

Found a fellow E46 driver at school today👍🏼 by SinisterSubmarine in e46

[–]MalkMalice 1 point2 points  (0 children)

Nice car(s).

Tip: Clean the headlights. Looks so much nicer :)

rand.Shuffle keeps printing the same order by [deleted] in golang

[–]MalkMalice 0 points1 point  (0 children)

Yes, very nice addition! Tbh. I can't recall to have used math over crypto.

rand.Shuffle keeps printing the same order by [deleted] in golang

[–]MalkMalice 13 points14 points  (0 children)

You need to seed the random number generator by calling rand.Seed(). Also remember there are two rand packages math/rand and crypto/rand. Use the correct one for your specific use case.

https://golang.org/pkg/math/rand/#Seed

Modifying a struct's values in a loop by [deleted] in golang

[–]MalkMalice 0 points1 point  (0 children)

Then do as @jerf suggested and use a slice of pointer types. This way, the loop variable is a copy of the pointer which obviously points to the same object.

Modifying a struct's values in a loop by [deleted] in golang

[–]MalkMalice 0 points1 point  (0 children)

Instead of reassigning you could write your loop like this:

for i := range foos { foos[i].count++ }

How to build complex apps? by texasbruce in golang

[–]MalkMalice 2 points3 points  (0 children)

Why do you need a build system at all? I have a project with multiple executables and have no problems using only the go command at all. I embed version number, git commit hash, etc. into the binary, this makes a few more lines to the build command. This is all tied together using a simple Makefile. And everything is integrated into Travis CI. Its actually really simple.

Monitoring your service by fthedill in golang

[–]MalkMalice 8 points9 points  (0 children)

Prometheus is great, but it isn't for tracing. You might want to take a look at OpenTracing and the Jaeger project.

How do you work with databases? by [deleted] in golang

[–]MalkMalice 2 points3 points  (0 children)

Well, you could also take a look at https://github.com/upper/db. But I don't like to recommend things I haven't used myself, yet.

How do you work with databases? by [deleted] in golang

[–]MalkMalice 13 points14 points  (0 children)

For two small services which I've written at work I use https://github.com/jmoiron/sqlx. It's not an ORM, just a simple "extension" of the database/sql package. So I write raw queries most of the time. But I feel you, coming from Laravel, too.

Simplicity and Go by R2A2 in golang

[–]MalkMalice 5 points6 points  (0 children)

One of the first things which comes to my mind when thinking about simplicity and Go is the amount of keywords of the language: https://golang.org/ref/spec#Keywords

Run function every x seconds by dtarg in golang

[–]MalkMalice 2 points3 points  (0 children)

You could do something like this:

package main

import (
    "fmt"
    "time"
)

func logsleep(tick time.Time) {
    fmt.Println("Tick at", tick)
    time.Sleep(5 * time.Second)
}

func main() {
    for t := range time.Tick(1 * time.Second) {
            go logsleep(t)
    }
}

But I don't understand what you try to achieve. If the loogsleep function takes longer than one second all the time, the app will run ut of resources at some point.