5 ms·
Dr.Mario 64's gzip implementation is taken almost verbatim from gzip source code
- relativitypro 6y agoScreenshot displayed seems generic coding style.
- edu 6y agoThe style might be generic, but the comments are exactly the same too. For me this creates a reasonable suspicion.
- saagarjha 6y agoAnd variable names as well. It seems to me that you can get from one to the author with an automatic formatter.
- aspenmayer 6y ago>And variable names as well. It seems to me that you can get from one to the author with an automatic formatter. Author = other Autocorrect Freudian slip? The rights of the author are key to the licensing issues this tweet raises.
- saagarjha 6y agoYes, I meant other ;)
- frob 6y agoAs someone who has taught and graded multiple coding courses, I've had students try to pull things like this off where they just change the formatting a bit and think they've pulled a fast one. This has resulted in many hard conversations and decisions. The code above would absolutely warrant an investigation in any course I taught.
- dharmab 6y agoVariable names and code comments are character-for-character identical. Highly unlikely for two programmers in different industries in different countries who speak different languages.
- FartyMcFarter 6y agoThe zlib license [1] is very permissive, so I'm not sure there's any real issue here. [1] https://en.wikipedia.org/wiki/Zlib_License https://en.wikipedia.org/wiki/Zlib_License
- saagarjha 6y agoI'm unsure why the tweet author thinks this would be a GPL violation?
- gfodor 6y agoIs this zlib source code or gzip source code? gzip is GPL isn't it? Also, if this is GPL code, does that mean Dr. Mario would need to be licensed under the GPL? And would that mean any other distributed software by Nintendo which uses any code from Dr. Mario 64 would need to be licensed under the GPL? If so, isn't that... kind of a big deal?
- masklinn 6y agogzip is GPL but zlib is not. However since zlib's license is GPL-compatible it's just fine to e.g. vendor zlib inside gzip. That does not make it gzip code, the zlib code is not relicensed and it keeps its original license. Furthermore, both gzip and DrMario64 having merged in zlib's code does not give gzip any claim upon DrMario64.
- gfodor 6y agoThat wasn't my question, my question was if the posted code is from gzip or zlib. It looks like it's probably zlib.
- masklinn 6y ago> That wasn't my question But it's the answer. > my question was if the posted code is from gzip or zlib. It looks like it's probably zlib. It's zlib code living inside gzip, so it's not an either / or question.
- AdmiralAsshat 6y agoAn interesting historical curiosity, but I doubt anything actionable would come of it. Also, damn, Nintendo was still releasing N64 games in 2001? The release date would've been mere months before the Gamecube launch and Luigi's Mansion.
- Ashanmaril 6y agoIt was within the final 10 games released for the N64
- kevinmchugh 6y agoA contemporaneous review said it was budget-priced ($30 usd)
- meddlepal 6y agoConker's Bad Fur Day came out in 2001. There were a few last minute games.
- jbarberu 6y agoIf you check the file in GZip from 1999 (1.2.4a) it is not licensed with GPL: inflate.c -- Not copyrighted 1992 by Mark Adler version c10p1, 10 January 1993 You can do whatever you like with this source file, though I would prefer that if you modify it and redistribute it that you include comments to that effect with your name and the date. Thank you. [The history has been moved to the file ChangeLog.] EDIT: Changed formatting
- deleted 6y ago[deleted]
- monocasa 6y agoDoes that file contain GPLed changes from the gzip project? I know linux's copy is effectively GPL2 because of that. Wouldn't be surprised if gzip's is the same. It's sort of how bringing BSD code into a GPL project is a bit of a one way street.
- est31 6y agoMaybe they used an older version of the file before it was GPL licensed? E.g.: https://opensource.apple.com/source/gnuzip/gnuzip-13/gzip/inflate.c.auto.html https://opensource.apple.com/source/gnuzip/gnuzip-13/gzip/in...
- masklinn 6y agoThat's correct. You can retrieve the gzip 1.2.4a source from https://ftp.gnu.org/gnu/gzip/ https://ftp.gnu.org/gnu/gzip/ and what looks to be this exact file.
- lhorie 6y agoKinda sad that the state of discourse these days is to induce pitchforks first, and it falls on readers on a news aggregator site to dig up the sources for themselves.
- legulere 6y agoAccording to stack overflow gzip is based on BSD licensed infozip https://stackoverflow.com/questions/20762094/how-are-zlib-gzip-and-zip-related-what-do-they-have-in-common-and-how-are-they https://stackoverflow.com/questions/20762094/how-are-zlib-gz...
- chrismeller 6y agoAs someone who has written userland implementations of several crypto algorithms in the past (parts of PKCS5: PBKDF2 and PBES2), I’m positive you could say this about my code as well. If you were both following the same spec, they should be very similar. Intentionally renaming things would just make it more confusing for the next guy and more difficult for anyone to validate your code. EDIT: and of course that’s not to say they didn’t “steal” it, just saying that similarity in this kind of code is to be highly expected.
- Jaruzel 6y agoDoes that include creating comments in the code that are the same too? :)
- chrismeller 6y agoYes, actually. For instance if section 3 of the spec says to pad the hash... my comment will be exactly (or 90%) the same as several other implementations I saw because we’re all literally reading from the same playbook. There are only so many ways to say something like: // step 2: figure out how many blocks of hash length will be in the derived key, rounding up
- hinkley 6y agoMy first assignment as a developer was porting some common formats to Java, mostly PNG and MD5 (weird combo I know, but there were reasons). I spent a week banging my head against the FFI for Java to get MD5 C code wrapped, and then in a fit of pique tried to do an all-Java implementation. Since Java is a C-family language, transcribing the code from the specification was a cakewalk, and I had something working within a day. Because of the PNG work (and a fascination with compression) I've also spent some time in the zlib code, and the zlib code is... unusual. Among other things, it has longjmp support built in so you can do cooperative multitasking in single-threaded systems. That and some aggressive work to assert that there is sufficient free memory to run zlib properly, makes the code a bit more novel. I don't think you or I would write the code that way, so it's implausible that someone would accidentally replicate the code, in this scenario or any other.
- shadowgovt 6y agoDoes anyone know how someone got their hands on the source code for Dr. Mario 64?
- Ashanmaril 6y agoThere's been a bunch of Nintendo source code leaked recently. It's how they found an old unused Luigi model for Mario 64!
- jhfdbkofdcho 6y agoThere were two major source code leaks. https://www.retroreversing.com/gigaleak2 https://www.retroreversing.com/gigaleak2
- gowld 6y agoWhy are uninvestigated Twitter allegations still being reposted to HN and upvoted, causing distraction and confusion?
- klyrs 6y agoI think such cases are interesting. One result is that the allegation got investigated here: HN isn't just regurgitating the news, its readers are making news. Sometimes, misinformation is the result of an honest confusion. Better to discuss it out in the open, than cover it up. The other result is that it's a teaching moment for people who have incomplete understanding of related licensing issues.