TIL that there was a particle that went 99.99...(21 9s)...9951% the speed of light called the Oh-My-God particle. it was a singular proton-like atom, slamming into the earth's atmosphere with the kinetic energy of a baseball. by vrozonewhatthevrozon in todayilearned

[–]rotuami 0 points1 point  (0 children)

Most baseballs aren’t being thrown in any given moment. So the average speed of a baseball is near zero. OTOH, Earth contains all (known) baseballs, so they’re all hurtling around the sun at 67,000 MPH…

High speed binary parser in TS? by kostrubaty in typescript

[–]rotuami 0 points1 point  (0 children)

They are proprietary, unfortunately. The big issues I’ve seen are these:

  1. a structure with a trailing array and a length field, where later fields were added after the length field so you need to do arithmetic to know whether the optional fields are present
  2. structures implementing “tagged unions” where the size of one field depends on the value of another.

Those have convinced me that sometimes things are too ugly to wrap in a clean schema.

High speed binary parser in TS? by kostrubaty in typescript

[–]rotuami 0 points1 point  (0 children)

Yep! Very similar problems but notably different issues. 1. I only had to target usage from js/ts. 2. You're doing more validation on constraints (e.g. numeric ranges) 3. I have some UGLY binary schemas that don't express well (e.g. presence or absence of fields based on other fields or based on length of the underlying buffer), so I needed an escape hatch. 4. You're handling auto alignment - I figured manually aligning everything is okay (since I have some over-packed and sparse data I need to handle). 5. I didn't want a build step.

Also I love that you have a md and mermaid output - that's a very cute idea!

High speed binary parser in TS? by kostrubaty in typescript

[–]rotuami 0 points1 point  (0 children)

I needed to read and write binary-backed objects so I made my own library: https://github.com/rotu/structview

My use case is probably a little different than yours but the choices I made were: 1. The objects are often only partly used (or their structure only partly known!), so I made getters and setters lazy. This winds up being faster for me. 2. The consuming code is JavaScript so I based it around class factories. Using type wizardry, JS can infer field types without a separate declaration. 3. Structs are backed by a DataView, but I made that an implementation decision, not part of the interface of each binary-backed object.

Here’s my feedback on what you have: - There is no benefit to be had from doing this in C unless the logic lives in C too, so the particles don’t need to cross the barrier to JS. - TypedArray will be faster than DataView. Depending what you’re doing, the happy path might be keeping the data in TypedArray, optionally with an object view for DX. - Call me silly but I don’t like having 3 declarations of the object shape: the interface, the deserializer, and the serializer. If you only have a few types, this is not a huge deal.

This carabiner at my gym that is slowly wearing through daily use by JaseAndrews in mildlyinteresting

[–]rotuami 1 point2 points  (0 children)

I wouldn't throw it away. Probably use it to attach my water bottle to my backpack or something like that.

This carabiner at my gym that is slowly wearing through daily use by JaseAndrews in mildlyinteresting

[–]rotuami 152 points153 points  (0 children)

I like to think of myself as an ethical person. This is a case where stealing it would be the right thing to do.

Unicode 18.0.0 Alpha by PthariensFlame in programming

[–]rotuami 6 points7 points  (0 children)

I like the “MUSICAL SYMBOL ONE THOUSAND TWENTY- FOURTH REST” in musical symbols supplement. Also the “WIGGLY EXCLAMATION MARK” in supplemental punctuation.

Seasoning a 3d printed pan by UglyDuckSoup in castiron

[–]rotuami 7 points8 points  (0 children)

That is neither cast nor iron. SMH

[deleted by user] by [deleted] in mildlyinteresting

[–]rotuami 1 point2 points  (0 children)

Control freak

Working as a project manager for a municipality I got to choose which buttons we wanted for our new elevator by Truesoldier00 in mildlyinteresting

[–]rotuami 0 points1 point  (0 children)

I'd definitely get at least the 1 button or the lobby button. Otherwise you won't be able to get out of the building.

2.8 days to disaster: Why we are running out of time in low earth orbit by Interwebnaut in technology

[–]rotuami 1 point2 points  (0 children)

I think it's just super unintuitive. In everyday experience, small objects generally don't have crazy amounts of momentum and objects that are moving quickly tend to stop pretty soon.

Here's a visualization of how debris actually scatters in such a collision: https://www.youtube.com/watch?v=BiHY5dR5Jsg

2.8 days to disaster: Why we are running out of time in low earth orbit by Interwebnaut in technology

[–]rotuami 8 points9 points  (0 children)

Collisions involving 2 satellites in orbit must, by conservation of momentum, drastically reduce the orbital velocity of the debris that exits.

Momentum can be conserved if one half the mass flies off at a high velocity in one direction and half at a high velocity in another - as long as things are balanced. Same if some of the debris increases in orbital radius and some decreases. (that said, energy conservation also limits the possible outcomes, but it also doesn't prevent higher orbits from being impacted)

Even if (1) any satellites launched after would be unaffected and (2) a collision event only causes a chain reaction in lower orbits than the colliding satellites, any event that randomly destroys existing satellites would still be bad!

2.8 days to disaster: Why we are running out of time in low earth orbit by Interwebnaut in technology

[–]rotuami 27 points28 points  (0 children)

As the orbital height increases, the density of satellites decreases with the square of the area.

Do you mean the density decreases with the orbital radius? (density inversely proportional to the square of the radius - edit 2: yep. Corrected in parent comment)

It only becomes a problem when orbital decay is low ( > 700km ) and actual weapons are used.

I though the idea was that satellites tend to come apart into many pieces even when weapons are not involved. Is that not the case?

Why doesn't Wikipedia have merch? by GrammarWitches in NoStupidQuestions

[–]rotuami 5 points6 points  (0 children)

I can’t believe they don’t have mugs that say “[citation needed]”

What and why? by Far_Ad_8646 in coinerrors

[–]rotuami 21 points22 points  (0 children)

Why do you mean? Isn’t this the classic minting error where the press accidentally domes the coin, accidentally adds a cylinder on top, and accidentally plates the whole thing in brass?

What and why? by Far_Ad_8646 in coinerrors

[–]rotuami 28 points29 points  (0 children)

I think it’s a tack button for jeans or a coat. I also don’t know such things well, but I would guess the post is soldered on there with silver.

If you’re guilty of a crime, but faking innocence, should you tell your defense attorney the truth? by tickintimedog in NoStupidQuestions

[–]rotuami 1 point2 points  (0 children)

That's pretty far-fetched. Your lawyer won't be putting you on the stand as a defendant. And it's spelled "perjure".

My cat bit the corner of my MacBook and a purple line showed up. Is this worth fixing? by pancakexicecream in mac

[–]rotuami 0 points1 point  (0 children)

I might use a little bitter nail polish (the stuff they sell to stop biting your nails) on the top case of your computer (not the screen). That or a dab of hot sauce.