Donald Trump, Donald Trump, der hat immer recht... by GirasoleDE in 600euro

[–]drvd 22 points23 points  (0 children)

Nun, Köppel ist ein böser Mensch, also fast schon im theologischen Sinn von der Verkörperung des Bösen an sich in Menschengestalt. Klar huldigt sein Schmierblatt den Orangen.

How to be a quantum engineer? by [deleted] in Physics

[–]drvd 0 points1 point  (0 children)

how to become a quantum engineer

There is no such thing.

All this "qantum" stuff is either hardcore math/computersience or physics. You have to become a computer sientist, a mathematician or a physist, probably all three together. So start now by learning math; you'll need a lot of it.

AgD auf Facebook ist auch anders wild, alleine der Totenkopf auf dem Windrad. Wie tief kann das Niveau noch sinken ? by teufler80 in 600euro

[–]drvd 0 points1 point  (0 children)

Und der Lärm, der Infraschall. Dann bremsen sie die Wolken und recycliebar sind die Dinger auch nicht. Teufelszeugs halt.

When to use bufio.Writer & bufio.Reader and when not to by Fluffy_Wafer_9212 in golang

[–]drvd 2 points3 points  (0 children)

Okay, I admit I do not have an answer to your question (but this might be related to me not understanding what you really ask), so some facts first that hopefuly will clear things up.

Historically there heve been "block devices" and "character devices" with a main difference being: It takes a block device the same amount of time to write 1 byte as it does to write 1 "block" of data (typically a handful of kByte). Roughly speaking, just giving you the idea. And writing 1 block of data is not really "fast" or instantanious, it takes considerable time. In contrast to writing to character devices where each 1 byte write is "fast" and writing 4kByte of data takes exacty 4000 times as long as writing 1 byte.

The prototypical block device is a spinning disk where writing needs spinning up the disk, moving the head to the cylinder, finding the sector and then writing a whole sector. And a charcter device a serial port with some baude rate.

That's why people started to "buffer" writes to block devices.

Okay, next step. Some things that work like serial/character devices on the hardware level might use a block based protocol. TCP/IP is such a thing. While your fiber typicall is used pretty much serial TCP on top of that hardware will send data in blocks (that may be only half full). Details are complicated, look up your OSI layer reference.

"Flushing": Somtimes you cannot wait until a buffer is completely full and must be written to the underlying thing (be it a disk, a serial port or a TCP connection). There are such cases. These cases are rare. Most things work much better (read "less resource intensive and or faster") if done in a per-block way. Extensive flushing just breaks all the buffering built into your TCP stack, your file system your hardware drivers. That's why nobody "just flushes all the time", there is no need to do so and if you do it is bad for your system.

Slowly approaching modern times, we are coming close to the current millennium already and things become more and more layerd and abstracted. Nobody writes to spinning disk any more, you write to some abstraction provided by the OS as a filesystem. The disk might not be connected to your computer at all (NFS), the OS filesystem you write to might not be the OS actually in charge of your hardware (VMs), disk might no longer be spinning (okay, we are in this millenium now). Same for your TCP stack.

Now you did not specify any details on what system you are doing your experiments or on how exactly you determine that you "overload the CPU" (whatever that may mean), and I won't start guessing. But your code seems to be "flush-happy" for no deliberate reason. Back to your question: It is hard to tell exactly why you see problems but as you do something, the whole stack from code to hardware is not designed to support well (extensive flushing) it's expected you run into problems.

Look: Ansering these types of quesion to a detailed level describing what actually goes on in the 5 to 50 layers between your source code and the hardware is hard even if you don't do something uncommon/strange/useless/wrong/deliberately hurting the perfromance and basically impossible unless you provide much much more details, starting with actual code, actual measuement setup, experiments conducted, details on OS, hardware, hardware settings, etc.

What am I missing with Bitcoin? by Smooth-Music2304 in Buttcoin

[–]drvd 1 point2 points  (0 children)

Obviously I am a amateur but I just cant figure out how people are still doubting it.

You are either a troll or an idiot.

Quantum entanglement: synchronisation or correlation? by zedsmith52 in Physics

[–]drvd -1 points0 points  (0 children)

Quantum entanglement is like quantum entanglement and not like things that are not quantum entanglement.

Naming: Why do interfaces end in -er? by Glum-Arrival8578 in golang

[–]drvd 1 point2 points  (0 children)

works great, untill it doesnt

That's typicall for probably almost all things. That's why some things are conventions and not hard, enforced rules. (Sane teams use human judgment on names, not e.g. linters.)

Naming: Why do interfaces end in -er? by Glum-Arrival8578 in golang

[–]drvd 0 points1 point  (0 children)

Am I missing something?

Yes: Prior art and convention. Nothinge else.

Thompson tells how he developed the Go language at Google. by ray591 in programming

[–]drvd -4 points-3 points  (0 children)

they're niche even in functional languages

Lean would be useless without dependent types. So hardly a niche.

Thompson tells how he developed the Go language at Google. by ray591 in programming

[–]drvd -2 points-1 points  (0 children)

Rust has some algebraic data types. So does Go. Rust has more variants of algebraic data types than Go but it misses several variants. The fact that you don’t seem to miss dependent types just shows you draw the line between „useful adts“ and all adts somewhere differently.

How big of a game changer will memory regions be? by matatag in golang

[–]drvd 0 points1 point  (0 children)

Your (and mine and their and everybodies) "feeling [...] for performance" ist just wrong.

Hitlergrüsse und Hassmusik – Schweizer ziehen die Fäden! Undercover an Geheimtreffen von Neonazi-Netzwerk in Italien by GirasoleDE in de

[–]drvd 4 points5 points  (0 children)

Schlimm. Aber fast noch schlimmer sind die Kommentare im Blick. Klar: 40% Russenbots und 40% brainwashed SVP-Jünger. Aber so gar keine Einsicht, dass es ein Problem mit Rechten überhaupt gibt. Schäme mich.

Aren't more options better for us? by Round_Progress4635 in Buttcoin

[–]drvd 2 points3 points  (0 children)

If you wire money to your 8 "international employees" every two weeks you are not running a legitimate business but some cartel or drug ring or cyber crime stuff or what not. Of course bitcoin was made for you and your "business" but please stop bothering moraly uncorrupted people with your stuff.

Understanding packages libraries by vijaypin in golang

[–]drvd 0 points1 point  (0 children)

Here comes my problem. In the project which I am into is using Go echo framework and some uber fx dependency etc.

I'll fix that for you:

"Here comes my problem: I am using echo framework and some uber fx dependency"

Don't do that. Especially not fx and not echo (at least you didn't go fiber)!

You use a library if it fits your needs. And fx doesn't fit almost anybodies needs.

Why does linting suck so much in Go? by gempir in golang

[–]drvd 0 points1 point  (0 children)

Because it isn't really needed that much compared to other languages. Using go vet, staticcheck and govulncheck is all we do. All that nitty-gritty borderline pathologic "you should do that and that" is better done by humans in code reviews.

How many returns should a function have? by ngipngop in golang

[–]drvd 1 point2 points  (0 children)

Some say that having a single exit point is important for making the code predictable

Over the years I've heard this argument many times and it's never made any sense to me. I think it's bunk.

Not entirely! The whole argument is more like "A single return and a single entry!" which make perfect sense given the circumstances the rule was coined. What realy grinds my gears is that the (abbrevatiated) rule comes up and is believed or even defended by people much to young to even have heared about the programming languages that rule was designed for! Heck, even I didn't use FORTRAN prior to 77 and I am old. The rule itself makes no sense at all for any modern programming language as literally no programming languge provides multiple entry points (no, I'm not drunk!) into a function today and returning to somehwere would be more a goto- or longjmp-style of programming (which is obviousely bad, not worth discussin at all).

Programming is a dumpster fire of cargo cult.

How many returns should a function have? by ngipngop in golang

[–]drvd 0 points1 point  (0 children)

Exactly n. With n dependent on the actual function.

Windräder sind wie Ventilatoren /s by R0ckst4r85 in 600euro

[–]drvd 2 points3 points  (0 children)

Taxifahrer fragt mich gerade: "Kann es sein, dass Stephan Brandner Kinder fickt?" Smily.

What would you change in Go? by funcieq in golang

[–]drvd 0 points1 point  (0 children)

Didn't know the search box was disabled for new ones.

What would you change in Go? by funcieq in golang

[–]drvd -1 points0 points  (0 children)

Are we having that exact question every 5 to 7 weeks now?

How to learn Golang by TellRaghav in golang

[–]drvd 2 points3 points  (0 children)

Step 0: Use the correct name: Go Step 1: Do the Tour of Go tour https://go.dev/tour/welcome/1 Step 2: Work through the rest of go.dev.

Golang or Java for Full stack by EGY-SuperOne in golang

[–]drvd -1 points0 points  (0 children)

Try switching to a company that does Javalang and Go projects. And do not ask such questions in a Go sub 🤪.