Hacker Newsnew | past | comments | ask | show | jobs | submit | comagoosie's commentslogin

I was skeptical of X-Pipe at first, but after setting it up to access a remote docker container running Postgres that wasn't listening on a publicly accessible port, I can say that no other tool gets out of my way as fast as XPipe so I easily manage my machines and databases.


One nuance missing from the article is that since branded / tagged types extend from the base type, callers can still see and use string methods, which may not be what you want.

Equality can be problematic too. Imagine an Extension type, one could compare it with ".mp4" or "mp4", which one is correct?

Opaque types (that extend from `unknown` instead of T) work around these problems by forcing users through selector functions.


Isn't there a risk with this approach that you may receive input with a repeated prefix when there's a variable of type `string` and the prefix is prepended to satisfy the type checker without checking if the prefix already exists?


Thanks for sharing, very inspiring. I love Rust for parsing video game replays / save files. I've authored a Rocket League replay parser (boxcars) and an entire suite of web visualizations (via Webassembly) for EU4 called pdx.tools https://pdx.tools

It's not easy to work with proprietary formats, but they've both become pretty popular, so I would 100% recommend sinking more time into this project as long as it scratches your itch. Gamers are always looking for more stats and deeper insights


Have you seen rerun.io? Also web assembly, sharing again the link from above https://sebosp.github.io/swarmy/public/0.5.1/2023-GSL-S1-RO1... Maybe you can use it too in your project! The guys from rerun are amazing and super helpful, had a call with them to discuss questions and possible uses too


No joke, rerun seems perfect for visualizing a game like rocket league. Thank you for the recommendation!


I'm collecting a bit of a benchmark for rust bitstream libraries inside my own library[1], and I wasn't aware of yours, so I'll add it to the list this afternoon!

[1]: https://github.com/nickbabcock/bitter


Awesome! I'll be interested to see how my (extremely naive) implementation stacks up.


Updated the benchmark with your implementation! You can see the results here: https://github.com/nickbabcock/bitter#comparison-to-other-li...


I think this is an excellent suggestion (I'm OP / author), and one one can add just a dash to this for typechecking. Minimal setups are appreciated, especially when one has many small projects.


Glad I could help! Esbuild won't do the actual type-checking for you, but your editor will (hopefully also without configuration)

I'll put it this way: I've spent enough time with Webpack and Babel and TSC at this point that I can troubleshoot most issues without too much difficulty. But despite that I reach for esbuild every time I possibly can, because I just don't want to mess with all that stuff if I don't have to.


Yeah it's a bummer that a highwayhash is only cryptographically strong (but not cryptographically secure) as it can be significantly faster (3x).

But BLAKE3 does seem to offer the best compromise when a cryptographically secure hash is required.


> a highwayhash is only cryptographically strong (but not cryptographically secure)

Can you let me know what you mean by strong vs. secure? When would you use one vs. the other? I've heard both of these terms used but they seem almost interchangeable[1].

I've also heard things like "this would be suitable for encrypting a password which is stored at rest" vs. "this could be suitable for a short lived one-time key", but I don't know what the correct terminology is there.

[1] https://en.wikipedia.org/wiki/Strong_cryptography


It's weird terminology. highwayhash aims to be cryptographically secure for its problem domain. But it's designed by (afaik) non-cryptographers, has weird security claims (they gauge security from statistical tests) and hasn't (afaik) received any formal peer review; it can also be instantiated in sub-secure hash sizes. You shouldn't use it to protect secrets, beyond the kind of incident secrecy you'd ask from something like SipHash.

It would be better if people would be clear about this stuff; you see the same thing from the PCG RNG people, who say that their generator isn't a CSPRNG, but is somehow more secure than other non-CSPRNGs.


Without intending to endorse the wording, I suspect what's being communicated might be something related to the difficulty for an attacker to derail your system by cheaply predicting hashes. IIRC, the standard Java runtime HashMap implementation was susceptible to this at one point - an attacker could easily and cheaply force all values into only a few buckets.

The idea being, you might not care about actual cryptographic security but instead only the feasibility of some sort of cheap online collision attack.


Right, that's what SipHash tries to do too (SipHash was designed by two very reputable cryptographers).


In layman's terms, sounds like it's something which is difficult to guess but not necessarily difficult to crack?


I reverse engineered Paradox's binary format for their save files. Part of this process is extracting a table of 16 bit ids to text representations. I asked Paradox if I could open source this table, but they replied that I was already breaking the ToS. The solution I've come up with is to open source the logic but commit the table as a gpg encrypted payload (for which only I have the key).

So you could say that Paradox is sensitive when it comes to people poking around or pushing boundaries.


ToS are irrelevant and you should have published it anyways, under a name different from the one you use on the forums and in-game.

Open knowledge is important, especially in video game scenes where elitism is a real issue, stopping people from getting into great hobbies that I'm sure many only got into due to that one person that didn't give in to elitism and bothered to listen and to answer questions.


> ToS are irrelevant

That's some bad advice. ToS are irrelevant only if you don't expect retaliation from ToS owner, or the costs are trivial.

> Open knowledge is important, especially in video game scenes where elitism is a real issue

Open knowledge? This is reverse engineering someone's cash cow. Kinda like claiming Win 10 code is open knowledge.

Video game scenes? Elitist? It's just a silly option in some medieval sim. There are other games that allow these kinds of things. Massive chalice for example.

By that stretch, why not complain Hearts of Iron don't allow you to create a third Furry side in WW2?

Or if you really want to be part of video game scene make your own. But I doubt you'd open source it. It takes monumental effort.

Did you see indie games? It's veritable farmers market of small games.


> Or if you really want to be part of video game scene make your own. But I doubt you'd open source it. It takes monumental effort.

I have minted a few very active video game scenes with a good culture, open codebases and devs that are happy to help and introduced many people to reverse engineering that wouldn't otherwise have gotten into it, and it's really not as hard as you make it seem. Good resources are easy to write when you're passionate.

You just don't have to be so bitter all the time :)

> Kinda like claiming Win 10 code is open knowledge.

It arguably is and you can plop any Windows binary into Ghidra or IDA and learn from it. There's a huge amount of books and free information on NT internals on the internet.

It's the same with games, just that you might be more invested in your favorite game than in NT internals.


> I have minted a few very active video game scenes with a good culture,

Sure. Nice of you to assume I haven't made any games, and put words in my mouth.

So to repay the kindness, I'm going to assume your games weren't on scale of Paradox games. Because those games shave man decades. That means collaborative effort on a longer timescale. That means people sacrificed their time to make this. And people need to eat.

> It arguably is...

Arguably you could open a beer bottle with your eye. That doesn't make your eye a bottle opener.

In same vein, just because you can reverse engineer something doesn't make it open source.

I'm not bitter, just realistic. Poking a sleeping lion isn't guaranteed to kill you, it's just a stupid thing to do. Especially when you are way weaker than a lion and within his claw's reach.


[flagged]


> "good culture"

I didn't meant that I'm interested in making a demo scene around "good culture", whatever that is. I meant I made games before. Alone and as part of team.

If people come to me with stupid ideas, I'm going to shoot them down. Or at least offer mitigations.

And in my original post I implied:

- Are you rich enough to take Paradox to court? Disregard my advice.

- Are you in a jurisdiction Paradox can't sue you? Disregard my advice.

If neither of these apply, you ARE running a risk of getting sued by them. Which while probably low enough, isn't zero, and might changed based on popularity of your leak.


You may wish to reevaluate your approach to participation at Hacker News.

When I encountered this thread and your insult here, I checked your profile and found many antagonistic and low-value comments over the past few days alone. Your history considerably weakens your position and suggests that I can skip reading your other comments in this thread, and your future comments and posts, without being likely to miss anything curious or interesting.

This does your cause no favors, and will diminish and devalue the weight of your words here at HN over time. Please reconsider your approach going forward.

(I'm not an admin, so you can of course ignore my recommendation if you choose to.)


This comment comes late, but I've recently learned that "just curious" without qualification is a fair indicator of hubris.

A self-described "curious" person will seek out connections where none exists, force others to entertain their "great ideas", and eventually arrive at what looks like knowledge but is merely an illusion borne of their pride.

If curiosity is not balanced by humility, anyone could end up like the GP. Wanting to know, but unable and unfit to know because all their inquiries are perverted by their own unerring, unconscious self-love.


You may wish to bring that up to the site admins, who invoke curiosity as a primary purpose of Hacker News in various places. While it’s legitimate to wonder if it’s a sound direction, doing so here is unlikely to reach their attention. Consider dropping a note to them using the footer Contact link to let them know you’re concerned.


The code runs on your machine. You do not own the game, the idea behind the game or the logic, but you do own the copy of the game on your machine.

You can read and change your copy, regardless of what the ToS says. The owner of the game can retaliate, this is not law after all.


Sure, but if you do it alone, on your computer and not tell anyone, no one from Paradox is going to harass you about it.

Moment you start open sourcing someone's game behind their back, is when they get defensive.


I believe this might be forbidden by the DMCA


IIUC, changes that circumvent encryption intended to control access to copyrighted materials would be forbidden by the DMCA; other changes would not. I suppose we could say the game itself envisions the rules by which we're intended to access its content, but if there's no encryption being circumvented I think the DMCA still doesn't apply. That said, I'm now curious how it defines encryption.


> ToS are irrelevant and you should have published it anyways, under a name different from the one you use on the forums and in-game.

Not right after you were refused permission though, that's too obvious.


"Ask for forgiveness, not permission"


Dont ask. Do. Exploration is a right, not a sin to be forgiven.


I'll try that line with my wife but I have that feeling that she won't like it


The obvious caveat is that with people consent comes into the picture.


So we are back where we started, no?


Code is not people.


There's a philosophical discussion here longer than a comment can afford but the bottom line isn't "code is not people". While I took GP's "wife" remark as a joke, I feel like you're implying that as long as it's "not people" it's a free for all. Like someone "exploring" how it feels like to spend your money, wear your watch, and drive your car.

Since this is a digital world, hacking doesn't have to lead to a loss for the creator. It can be done for your own intellectual pleasure and exploration. But making it available online to the general public is no longer exploration. So depending on the case you no longer have the moral cover of "I was just exploring".


> But making it available online to the general public is no longer exploration.

Why not? I'd argue the opposite: that making something available online to the general public is the first step toward maximizing exploration - in particular, enabling exploration beyond the limits of your own imagination/ability.


But the time and effort put into writing that code was a significant part of their lives, and that code was only shared with those who agreed with their rules.


>>and that code was only shared with those who agreed with their rules.

This is the point of contention though. In EU courts have ruled over and over and over again that you cannot be bound by terms set AFTER the purchase of any software. As a result, EULAs are pretty much worthless, because they are presentented post-purchase.

If you went to a store and bought a copy of this game then that's it, you haven't agreed to anything, and you own a copy of it and you can do almost whatever you wish with it. You cannot make further copies and sell those because that's governed by copyright law, but modifying the binaries to do what you want them to do? Absolutely fine.

It's like with cars - obviously someone put a huge amount of work into making them, they contain a huge amount of software in them, yet the idea that the manufacturer tells you what you can or cannot do with it after purchase is ridiculous(and yes, I know some companies like Tesla are already trying).


We're getting into legal details here, but in principle one can construct a contract where software use plus onerous rules are exchanged for money.

Thanks for the European perspective. Not a big fan of EULAs myself, especially ones where the cost to properly analyze by your own lawyer is likely much greater than the value of the software itself, which is the case for most consumer software.


I've definitely seen discussions of the binary format on the forums in the past. I wrote my own script for figuring out what the table for the 16-bit IDs was, but I've never committed the result anywhere.


If one is interested in parsing the CK3 scripts / game files (briefly showed in the post) to dissect the wonderful world of PDS games, there's a js library for parsing these files:

https://github.com/nickbabcock/jomini.git

disclaimer: author


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

Search: