NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
How devtools map minified JS code back to your TypeScript source code (polarsignals.com)
zb3 4 days ago [-]
Tangentially related, but last year I've made a tool to recover original sources from web apps which expose source maps (with the sourcesContent value present), including enumerating all lazily loaded chunks:

https://github.com/zb3/getfrontend

pseufaux 4 days ago [-]
Recent related post where Apple seemingly forgot to disable source maps for the App Store

Apple's App Store Full Front End Source Code

https://news.ycombinator.com/item?id=45804664

edit: formatting

kayson 4 days ago [-]
I love it when things are displayed so nicely on mobile. This could've been a pain to read and get through but it was actually quite pleasant.
tantalor 5 days ago [-]
> Notice how the decoded values give relative positions, each value represents the difference from the previous position, not absolute coordinates. This is crucial: instead of encoding large column numbers like 27698 in minified files, source maps only store small deltas like +7 or +15, making the encoded strings much more compact.

Wouldn't "offset" be a more apt term?

manojvivek 5 days ago [-]
To me, “offset” sounds more like the distance from the start, whereas here the values are relative to the previous segment. Not a native english speaker, so I could be wrong.
tantalor 5 days ago [-]
Offset is difference from a starting point or a previous position
jagged-chisel 4 days ago [-]
“Offset” is not enough on its own. Offset from what? Start of file? Absolute offset. Previous offset? Relative offset.
willrshansen 4 days ago [-]
2nd order offset. The offset from the <offset from the start of the file>
eat_veggies 4 days ago [-]
perhaps the delta between offsets
jagged-chisel 2 days ago [-]
We’re gonna need the delta of deltas
hanikesn 4 days ago [-]
Delta Encoding is the common term
tracker1 4 days ago [-]
Agreed... Delta Encoding, or even Delta Offset would work together.
accrual 4 days ago [-]
In this case I feel it's like six of one and a half-dozen of the other.

Delta definition 4: (mathematics, physics, engineering) The symbol Δ; A change in a quantity, likely from "d" for "difference"

Offset definition 7: The distance by which one thing is out of alignment with another.

Got these from Wiktionary:

* https://en.wiktionary.org/wiki/delta

* https://en.wiktionary.org/wiki/offset

recursive 4 days ago [-]
It sounds equally apt to my ear. I've used both words for this concept in the past.
4 days ago [-]
paulddraper 4 days ago [-]
Delta and offset mean the same thing — the difference between two amounts.

Delta is perhaps slightly more obscure outside of a math setting. Perhaps.

saghm 4 days ago [-]
I feel like choosing the synonym that happens to be one letter shorter when the operation is literally intended to track things in a way that's more conscise is about as "apt" as it could be!
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 04:15:10 GMT+0000 (Coordinated Universal Time) with Vercel.