Hacker Newsnew | past | comments | ask | show | jobs | submit | vscode-rest's commentslogin

A bit of a stretch, but does anyone have a good way of running an FFT on a pcap?

You mean like converting packet timestamps into a (uniformly) sampled time series (e.g., bytes or packets per ms) and run a NumPy/SciPy FFT on that series?

Something like Lomb–Scargle would possibly be a better fit I suppose. But yes that sort of flow, I could do it as a one off with a Python script as you state, but my interest is more if anyone has sunk their teeth into network packet analysis in the frequency domain from the ground up and wrapped up all the learnings into a thoughtfully designed interface.

I was searching for a Wireshark type plugin to do this but I couldn’t find anything.

Alternatively, equally useful would be learning about anyone who has started to do something like this and then realized that it didn’t actually help them analyze anything.


Jake VanderPlas also has an article on Understanding the Lomb-Scargle Periodogram [1] which I can recommend if you want to get into the details (it also includes a treatment of fourier-pairs + convolution to explain the 'artifacts' in DFT). There's a module for it in scipy, so it should be rather straightforward to try your analysis using timestamps for x and an array of ones for y. That algorithm is essentially a least-squares fit with sinusoids at pre-selected frequencies.

I've tried to use Lomb-Scargle to reduce the number of sampling points in magnetic resonance experiments, but had another dimension to take into account (similar to doing the analysis for each network port separately in your case). I got some spikes on some of the 'ports' which I couldn't reason about or reproduce when I did the same with periodic sampling and FFT. But the individual periodograms looked reasonable, if I remember correctly. Maybe we have a more regular user of LS around, who can point out common pitfalls. Otherwise you could generate some data from known frequencies to see what kind of artifacts you get.

You could maybe also take a look at the auto-correlation of the packet timestamps to see whether you can extract timescales on which patterns arise.

[1]: https://iopscience.iop.org/article/10.3847/1538-4365/aab766


> Understanding the Lomb-Scargle Periodogram [1]

Thank you, this points me at a solution to a different problem I have.


Writing like this is frankly so exhausting. I don’t think anyone not already in the choir could make it through.

Some people really need shit spelled out to them. This does a great job of doing that in a small package.

I doubt this sort of rhetoric will convince a modern audience. Reads like “Sinners in the Hands of an Angry God”.

It's not the rhetoric that should convince you, it's the logic. The rhetoric here is purely to liven it up.

Same could be said for SITHOAG. Yet, modern preachers have found far more success with other approaches.

Consider: if the tone of your writing will put off anyone who disagrees with you, what’s the value in “livening it up”? Again, it’s preaching to the choir.


Annoying that there’s no “Made In X” declaration of origin on that site. Isn’t that required by law?

My strategy with pretty much everything I can is to deeply research to find any Made In USA variant of whatever it is I’m trying to purchase, and buy whatever that is regardless of price. I’ve never had that fail me.

For backpacks, my Waterfield pack has held up fantastically across several years of regularly absolutely stuffing it with gear for my work travel.


Simple enough. Say, could you fabricate some new time, pressure, and laws of physics for me? Oh, and don’t forget the matter!

So many people carry this dull heavy just in their pockets to fend off all attempts to revive the sense of wonder they buried deep in their childhood.

For me, just the very fact that there exist time, space, laws of physics, enormous complexity stemming from deceptive "simplicity", is absolutely awe-inspiring.


Don't be curmudgeonly.

The Cubes are the most captivating to me. Organic mishmash of polyhedra and assorted blobs is one thing, but perfect cubes is uniquely striking.

True, but among the minerals with cubic crystal structure it is not unusual for them to be found as crystals that are perfect regular or semiregular polyhedra, with a shape characteristic for the mineral, for instance octahedron (e.g. spinel, diamond), rhombic dodecahedron (e.g. garnet) or cube (e.g. pyrite).

I suppose that the crystals from the picture are of pyrite, which frequently looks like this.

In the antiquity, when what are now called diamonds (the Romans and the Greeks called them "Indian adamants", because they were first encountered by Europeans during the expedition in India of Alexander the Great; "adamant" meant something else in Europe) were very difficult to cut and polish, they were normally used as gems in their natural shape of regular octahedra.

Cutting diamonds from their natural octahedral shape into polyhedra with more facets, e.g. brilliant, was invented much later.



Sodium chloride will grow cubes but probably not trivial to get big ones.

I did that with my kids and it was pretty cool !

Pyrite or fool's gold, lovely mathematical perfection and a great etymology to match!

Regarding etymology, for many centuries the substances that are now called "sulfides" were called "pyrites", after the "iron pyrite" i.e. the iron (II) disulfide, which is the most abundant sulfide mineral.

At the end of the 18th century, Lavoisier together with a few other French chemists have created the modern systematic chemical nomenclature, so the old term "pyrite" was replaced by "sulfide" (like also "vitriol" was replaced with "sulfate").

For who does not know, "pyrite" comes from "fire", i.e. from the pronunciation in Ancient Greek of the corresponding word that was cognate with English "fire" (Ancient Greek or Latin "p" corresponds with English "f").

Striking pyrite produces sparks, which can be used to start a fire.


> Ancient Greek or Latin "p" corresponds with English "f"

Similarly, ancient Greek "p" corresponds with modern Greek "f", and ancient Greek "b" corresponds with modern Greek "v".

We may have done it first, but the sound change is pretty common. "B" -> "v" is arguably in process in Spanish. Something similar had already happened in Latin; compare Latin "frater" to English "brother" or Latin "fero" to Greek "phero".


I agree. Here are a few more nice images for the GP: https://www.google.com/search?q=pyrite+cube&tbm=isch Remove "cube" from the reach, to see the not cubic samples too.

Especially since it's an exception that breaks the rule that straight lines are not found in nature. Not only is it a straight line, but a cube. They just look unnatural. Very cool stuff

You can buy pyrite cubes on Etsy—I know because I also love them :)

They’re not expensive


Sodium chloride also grows cubes but hard to make perfect and large.

And Galena! Another wonderful metallic mineral that forms cubes.

What about organic mishmashes that are shaped into cubes?

https://www.science.org/content/article/how-do-wombats-poop-...


That pyramid shape in the amethyst is what grabbed me. Looks like something straight out of a video game. Incredible.

Should Income Security for Vets count as income security? And Healthcare for Vets, healthcare?

It’d be interesting to see how different political factions might rack and stack these line items in different ways.


Hash mining asics don’t work well for AI

"don't work well for AI" is a hell of an understatement, the Application they are Specific to is literally just sha256(sha256(x)), what AI are you going to do with that?

GP probably didn't mean that hardware though, but rather the facility, electricity supply, cooling, etc.


Why double sha256?

The disappointing truth is that we simply don't know. Satoshi never explained it. For SHA-2 it can be used as a mitigation against length-extension attacks¹, and this seems like the most likely explanation, but it's just speculation.

¹ https://en.wikipedia.org/wiki/Length_extension_attack


Would length extension impact bitcoin? The messages aren’t secret afaik.

a that’s the botcoin hashing algorithm.

I figured that part out, I wonder why it's being doubled.

That was the way satoshi wanted it. No other explanation is known.

This is true, but large miners also have beneficial electricity contracts and data center capacity, both suitable for AI workloads.

You’d be surprised – take a Backgammon board to a table in at a cafe in a popular area and chances are someone will sit down to play with you. Can be a good way of meeting people in a new area. (or new people in an old area!)

It was a good way to while away the time at jury duty back in the days when you had to physically be there until you were called. I encountered a tournament player who beat me maybe 4 times out of 5. I also played in a chess tournament where my opponent was considerably stronger and faster and quickly put me in a position where I had to think long and hard to try to avoid disaster (fruitlessly in the end). She would make her move, wait a few seconds to see if I would reply, and then get up and disappear into a back room where, I found out later, she was playing backgammon. I looked her up and learned that she was a rapidly rising women's chess star but was better known as a semi-pro backgammon player.

Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: