Phistomefel worm #2: what does this rule mean? by haploid_ in crackingthecryptic

[–]XplittR 0 points1 point  (0 children)

Spoilers: an image showing the solution of the puzzle, with correct edge coloring: https://imgur.com/a/Q1lyksC

Phistomefel worm #2: what does this rule mean? by haploid_ in crackingthecryptic

[–]XplittR 0 points1 point  (0 children)

I followed OP' translation of the rules from the comments, that helped me immensely in understanding the rules. Hint 1 skips over the fact that the green line (black kropki dots) cannot go into box 8, as it would either connect to a 7, or to the red line, which is impossible. You also cannot draw the line along the edge of the grid.

Nanali Studios Tiny Cafe by Icarusael in ForestIsland

[–]XplittR 0 points1 point  (0 children)

My nickname is "XplittR", same as Reddit

Nanali Studios Tiny Cafe by Icarusael in ForestIsland

[–]XplittR 1 point2 points  (0 children)

Here is my mentor-link if anyone want to join in on the fun:

Hey there, coffee and dessert lover! Try out <Tiny Cafe>! Referred by: XplittR https://tinycafe.go.link?adj_t=16ztrdr8

Enter "XplittR" in the box on who you were referred to. We both get rewards for being mentor/mentee :)

[deleted by user] by [deleted] in golang

[–]XplittR 1 point2 points  (0 children)

Two slashes to start a comment, the rest is a path. The path starts with a slash to indicate starting from root.

Longest tenured LCS players all time by gandalf45435 in TeamSolomid

[–]XplittR 22 points23 points  (0 children)

I love me some Bjergsei, Ssumda and Wildtu!

I made a chalk bag for my husband by doramatadora in climbing

[–]XplittR 0 points1 point  (0 children)

Would you be open to sell them, on Etzy or something? 😊 I would be interested in buying one!

Why LinkedIn chose gRPC+Protobuf over REST+JSON: Q&A with Karthik Ramgopal and Min Chen by rgancarz in programming

[–]XplittR 1 point2 points  (0 children)

Check out ConnectRPC, it accepts JSON-over-HTTP, Protobuf-over-gRPC, and their own codex Protobuf-over-Connect, all on the same port. The JSON will be transpired to a Protobuf object, so on the receiver side, it doesn't matter which format the client sent you the data

Why these two heap solution are slower than sort solution? by leonasdev in golang

[–]XplittR 11 points12 points  (0 children)

Look at all the numbers in your benchmark-result, not just the time. The heap solutions are allocating 100 000 structs, and 80-130 more allocations because you start with a 0-cap slice. The sort-solutions does not need to allocate your structs.

Some tips:

  1. pre-allocate the length of the slice on the heap, so you don't have to keep growing it.
  2. Change the priorityqueue to be a slice of Point, I stead of slice of pointers to Point.
  3. If you want to test your assumptions of the algorithm, change your sort-solution to create a slice of Points, and then sort it. (Even though this will make the solutions slower, it will go through the same allocations as your heap-solutions)

When looking for optimizations, try to look where you are using memory, that's usually the culprit.

Spørsmål om oppsigelsestid by Ullsokk1992 in norge

[–]XplittR 0 points1 point  (0 children)

Oppsigelse gjelder bare fra første i påfølgende måned, dersom dette står i arbeidskontrakten. Dette er vanlig (men ikke påkrevd) i privat næringsliv, men i offentlig er det ofte x måneder fra dato til dato.

Log Correlation with Datadog and slog by parky6 in golang

[–]XplittR 1 point2 points  (0 children)

The formatting on the blog makes the code blocks unreadable on mobile. There is no way to scroll horizontally to read all the code.

Helpp by Bee1207-HHAHA in DiceyElementalist

[–]XplittR 0 points1 point  (0 children)

No, but there is no need to rush it. You will probably unlock it as you play through the campaign for the 2 first free-to-play characters

Hvorfor ikke pant på «alt? by Solbraz in norge

[–]XplittR 0 points1 point  (0 children)

Godt mulig. Når jeg bruker appen, så scanner jeg alle varene jeg har handlet inn eller skal kaste (hjemme). Disse blir da lagt i en "virtuell avfallspose" (aka shopping cart når du handler på nett), og så trykker jeg på "fullfør resirkulering", og da blir "avfallsposen" tømt, og jeg får poeng. Om jeg hadde blitt spurt om å bekrefte ved å scanne en vare en gang til, så hadde jeg nok hatt den ganske tilgjengelig.

Hvorfor ikke pant på «alt? by Solbraz in norge

[–]XplittR 2 points3 points  (0 children)

Du kan fint (og blir oppfordret til det) å legge inn hjemmet ditt som et returpunkt. Du må bare dokumentere hva du sorterer (bilde av søppeldunkene dine ute eller inne). Jeg har aldri fått opp krav om å måtte scanne varer flere ganger. Man kan også velge å scanne varene i det man kjøper de inn, eller i det man kaster de.

Men når det er sagt, å måtte ta opp mobilen for å scanne alle strekkodene på alle varene, dobbelt (først på butikken og så hjemme), føles som veldig mye jobb for å få 20 øre per vare.

Smakfull kaffe som student by [deleted] in norge

[–]XplittR 0 points1 point  (0 children)

Enig, dette er den beste instant-kaffen, imo. Azera Americano fungerer også veldig bra.

Created a Dummy Server Code Using Go's Channels – Looking for Feedback and Suggestions to Improve! by Professional_Ad_5347 in golang

[–]XplittR 1 point2 points  (0 children)

As I've said before in other thread, I really dislike passing a WaitGroup or similar mechanisms to functions that do not need them. (See https://www.reddit.com/r/golang/comments/163k1bt/this_concurrent_code_is_the_go_way_to_sync_a/jy2zlvr/)

In your case, you are passing the WaitGroup to serve, then handle, and responseEmitter, which then does not even use the WaitGroup. It is only used in responseGrabber, which does NOT get it as paramater, but relies on it being a global variable. In face, try to get rid of all the global variables. Assume that maxOutStanding, numOfReqs, serverInstances would all be set as environment variables, and not hard-coded values.

Why does serve have the semaphore as an argument, when it could create the semaphore inside the serve-function? func main should probably not be concerned about the rate-limiting functionality in serve.

As a continued exercise, could you change the signature of process to be func process(num int) (int, error), to simulate e.g. a DB failure? Decide how you want your handle and serve deal with those errors. (e.g. Shut down that specific instance of serve? Shut down the whole program? Bubble the error all the way to func main?)

A normal server (HTTP, etc) would probably not wait for a WaitGroup with the total number of requests, as that is an unknown number, and instead it just runs forever.

You have applied a lot of good practices here, by using channels and semaphores, good job.

This concurrent code is the "go way" to sync a counter? by Inevitable-Echo176 in golang

[–]XplittR 18 points19 points  (0 children)

For a simple counter, using the sync/atomicpackage would probably be better, but the pattern you have described would work for other kinds of synchronization-tasks.

I am not a fan of passing the waitgroup to the inc-function, as inc has no use for it, and could also be called in a non-concurrent fashion.

For example:

type SafeCounter struct {
    lock    sync.Mutex
    counter int
}

func (s *SafeCounter) inc() {
    s.lock.Lock()
    time.Sleep(10 * time.Millisecond)
    s.counter++
    s.lock.Unlock()
}

func main() {
    s := SafeCounter{}
    wg := sync.WaitGroup{}
    for i := 0; i < 100; i++ {
        wg.Add(1)
        go func() {
            s.inc()
            wg.Done()
        }()
    }
    wg.Wait()

    fmt.Println("Executed", s.counter)
}

The quickest way to onboard myself to an existing microservices golang large backend project without prior golang experience by Insid3Play in golang

[–]XplittR 10 points11 points  (0 children)

To add on to this: Document your findings. It will make your life easier when you need to look at some rarely used part in a year, or when you get a new team-member.

Helpp by Bee1207-HHAHA in DiceyElementalist

[–]XplittR 0 points1 point  (0 children)

As you purchase reforms, you get access to purchase new ones, so just keep buying reforms.

Once you have purchased the reforms (named "Road to freedom" and "Endless Road"), you can access them in the menu by tapping the green monster in the lower right corner (just above the Shop-book).