13 ms·
Source Code for SunOS 4.1.3 (1992)
- jsrcout 4y agoThis brings back memories! My first job out of school was with a mostly SunOS shop. After 8-bit micros and then the very first Macintoshes, plus the various oversubscribed machines they had at school, it felt so "big league"! Good times.
- phendrenad2 4y agoIt would be interesting to see how this compares to early BSDs from the same year (say, 4.3BSD). Was SunOS better/worse in terms of code quality?
- stefan_ 4y agoI was looking at the login [1] code and thinking "hah, surely it must be full of stack overflows", but no, it seems they were well aware of the pitfalls there. Not so much for the heap data, but oh well. 1: https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/bin/login.c#L527 https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/bin/log...
- cdiamand 4y ago"These are the Version 6 sources for trek. They must be modernized before trek will compile. Everything is under SCCS ready for some willing person to come along. Documentation is in ./doc. Kirk McKusick 3/25/83" Who's going to step up?
- trycommunism 4y ago
- Maursault 4y ago> Who's going to step up? I don't know for sure because I can't find any information about SunOS licensing, but I think it goes something like, Oracle has acquired Sun Microsystems, Inc. ("Sun"), you acknowledge that in all cases where the reference is Sun, Oracle will fulfill these obligations as successor in interest to Sun.
- abudabi123 4y agoThe get out of jail card in the court ruling for the Google, Oracle, Java was transformational change.
- tedunangst 4y agohttp://cvsweb.openbsd.org/src/games/trek/ http://cvsweb.openbsd.org/src/games/trek/
- yjftsjthsd-h 4y agoAnd SunOS was a BSD-derived system, so that could even be the same program:)
- 6502nerdface 4y agoI appreciate the implementation of /bin/true.sh.
- valleyer 4y agoSee also: http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html
- yjftsjthsd-h 4y agoSo where did this come from? The readme says, > This is the SunOS 4.1.3 SUNSRC CD-ROM which almost sounds like it was an officially distributed archive, somehow? I mean, I can't personally think of any reason for Sun to make a CD distribution of SunOS (was it called the OS/net gate yet?) for purely internal use, although maybe I'm just missing perspective, but the https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/Copyright https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/Copyrig... looks to my very-non-lawyer eyes like all-rights-reserved and 4.1.3 was well before opensolaris, so... leak of some kind? Edit: Looking at the copyright file again, it has a part number. Did Sun license sunos? That certainly feels like it was meant for use outside of Sun, but doesn't really explain why/how
- hapless 4y agoSun licensed SunOS and Solaris source to pretty much anyone who asked (and wanted to pay for it) All of the proprietary unix vendors would sell source licenses to a greater or lesser extent. There's IRIX and AIX source trees out there if you go looking, licensed for university use back in the day.
- nocoiner 4y agoWow, had no idea that was the case for IRIX. Learn something new every day.
- kanwisher 4y agowould be fun to find the Iris source and try to port it to some newer hardware
- coredog64 4y agoPort it to the ultra fast MIPS CPU in your router.
- drdebug 4y agoIs anyone aware of IRIX source code actually available somewhere?
- hankman86 4y agoI miss the days of commercial UNIX workstations. Perhaps that’s because this happens to be when I was young.
- Dig1t 4y agoWhat is the difference between a commercial UNIX workstation and a Mac? Genuinely asking, I've never used a commercial UNIX workstation like you're describing.
- hapless 4y agoIn the 80s and 90s, they were significantly faster and more capable than their PC / Mac analogues. Double or triple the speeds and feeds, ten times the price ;) By the 2000s the advantages had more or less vanished and the workstation SKUs were discontinued one by one.
- KerrAvon 4y agoPC’s were stuck with awful hardware for a long time, but the Mac story is a bit more complicated — once they became available, higher-end 68020/68030 Macs were sometimes competitive with workstations.
- ajross 4y agoNo. Mac II's showed up in the late 80's just as the workstation vendors were moving off 68k hardware and onto SPARC and MIPS. PA and POWER came along a few years after that, then Alpha a bit later still. Motorola never got back in the game, really, though Intel caught up with the release of the P6 in 1995.
- hulitu 4y ago> Motorola never got back in the game I though POWER was born as a child of IBM and Motorola.
- Snelius 4y agoCoding culture is very impressive.
- neilv 4y agoIf anyone wanted to keep a museum piece Sun workstation running SunOS 4.x, but patching security vulnerabilities, maybe this is one way. For `sun4c` kernel architectures (most SPARCs before multiprocessing), I'd try to get the source for 4.1.4. At least some of the older Sun-3 might need an older version, and I recall our Sun-386i systems were stuck at 4.0.x.
- sgt 4y agoWhy patch for vulnerabilities though? Is it connected to the Internet?
- technothrasher 4y agoI recently fired up my old Sun 3/80 to see if it would still boot. It wouldn't. The battery backed config RAM was dead. Of course I couldn't quit, could I? I was able to find a modern replacement for the chip, order it from Mouser, get it programmed correctly (after a few tries) and hey look, it started to boot. Then, unsurprisingly, the old Quantum SCSI disk was only happy enough to make grinding noises and no more. I found a guy making SATA to SCSI adapters meant for these old Suns and paired that to an SSD I had lying around. Hey, look, that now works too. Finally, by setting up tftp, bootp, and NFS on a FreeBSD VM I was able to net boot the machine and install SunOS 4. My goodness, I had forgotten how slow the thing is, and how much has changed since the 1990s. I was able to get a bunch of more modern stuff to compile, but it was a fight every time. Next I was going to drag out the old SGI Indigo, but haven't found the energy yet.
- benreesman 4y agoSome code ages really, really well. When you think about the fact that it’s a log scale what we have now? It’s fucking impressive what people did with orders of magnitude less.
- ldjkfkdsjnv 4y agoSome string operations written in C from the lib, funny to see these and how ubiquitous they still are: /* * @(#)strops.c 1.1 92/07/30 Copyr 1985 Sun Micro * Assorted string operations / / * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0 / strcmp(s1, s2) register char s1, s2; { while (s1 == s2++) if (*s1++=='\0') return (0); return (*s1 - *--s2); } /* * Returns the number of * non-NULL bytes in string argument. / strlen(s) register char s; { register int n; n = 0; while (*s++) n++; return (n); }
- trycommunism 4y ago
- gonufer 4y agoRelated 1991 CERT advisory: https://vuls.cert.org/confluence/display/historical/CERT+Advisory+CA-1991-07+SunOS+Source+Tape+Installation+Vulnerability https://vuls.cert.org/confluence/display/historical/CERT+Adv... Sun Bug ID: 1059621 Synopsis: security hole created by installing sunsrc ... This makes it possible for users on that system to become root.
- winrid 4y agohttps://github.com/Arquivotheca/SunOS-4.1.3/blob/413/sys/sparc/copy.s#L1602 https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/sys/spa... and here I am lazily blowing cache lines with `new Object()` in Java
- xbar 4y agoSuch gluttony!
- pjmlp 4y agoYeah, but you should use something like JITWatch as well, not all news turn into heap allocations. Unfortunately value types are years away, if they ever land.
- shagie 4y agoThe "if you want to get into it..." - Escape Analysis in the HotSpot JIT Compiler - https://blogs.oracle.com/javamagazine/post/escape-analysis-in-the-hotspot-jit-compiler https://blogs.oracle.com/javamagazine/post/escape-analysis-i... If you can prove that that a particular value never escapes the scope, it may be possible to allocate it on the stack instead which also reduces the amount of garbage collection needed later. And other related reading: https://web.archive.org/web/20120214195433/http://www.ibm.com/developerworks/java/library/j-jtp09275/index.html https://web.archive.org/web/20120214195433/http://www.ibm.co... https://www.javaadvent.com/2020/12/seeing-escape-analysis-working.html https://www.javaadvent.com/2020/12/seeing-escape-analysis-wo...
- winrid 4y agoCorrect. I had to make it concise for the joke, though. :)
- andirk 4y agoIt even looks funny in words. Like "equals a new thing!"
- deleted 4y ago[deleted]
- marcodiego 4y agoBe careful: looking at leaked or unlicensed code may taint you for a long time to work or contribute on other projects.
- Eleison23 4y agoI think it was a Usenix LISA conference once where Unix wonks were handing out "Mentally Contaminated" buttons to anyone who'd seen AT&T source code and, on the basis of that experience, wouldn't be allowed to work on a "free" codebase. One of the silly but meaningful battles in the Unix wars.
- colordrops 4y ago> silly but meaningful So much depth in that statement
- abudabi123 4y agoNeeds to be decided by a judge at court presented with those lawyering claims. One tip you hear is to require a lawyer to be sworn in before a judge before you trust their claims.
- rootbear 4y agoI had one of those buttons. I got it at one of the regular Usenix conferences, as I recall, or perhaps at LISA.
- captainmuon 4y agoLegally, yes, but how is anybody going to find out?
- badsectoracula 4y agoThat is not correct and most likely comes from scary FUDs of yesteryear between GPL and anti-GPL crowds (e.g. Microsoft who used to disallow people look at GPL'd code). In reality looking at this (or any other leaked on unlicensed code) "taints" you pretty much the same as looking at any other code, including -e.g.- GPL/MPL/Apache2, etc code, but you don't see anyone[0] nowadays saying to not look at such code (it used to be a thing back when people were cluelessly afraid of GPL though, but that was decades ago). The "taint" isn't inherent, it comes from the possibility that you'd rewrite code you've seen so that it is mostly identical and be sued for it (and if that is the case is something that will only be decided by a court). If anything, IIRC when GNU was making their Unix replacement utilities back in the day they recommended people to implement them in as different from Unix a way as they could, but they didn't forbid people who were "tainted" by Unix to contribute to GNU (which, if you think about it, makes perfect sense considering the people who would contribute to it were most likely already Unix programmers). This sort of remains in the current GNU Coding Standards[1] In fact you are "tainted" the same way by read and/or participating in any codebase that isn't fully owned by yourself - but if that was an actual problem in practice, no programmer would be able to join another company unless what they did there had absolutely nothing to do with any of the companies they worked at previously as experienced programmers would actually be liabilities[2]. Meanwhile in reality programmers jump between companies all the time with their experience being seen as an asset. [0] don't take that literally, i'm certain some people would recommend against reading GPL/MPL/etc code, but they'd be a very tiny minority - and almost certainly driven by the same old FUDs [1] https://www.gnu.org/prep/standards/standards.html#Reading-Non_002dFree-Code https://www.gnu.org/prep/standards/standards.html#Reading-No... [2] Yes, you can find anecdotes where that happened - John Carmack being sued by ZeniMax would be such a case - but those are very rare exceptions from litigious sue-happy companies and there are literally millions of professional programmers out there
- DeathArrow 4y agoIs this legal or warez?
- ranger_danger 4y agowarez
- tppiotrowski 4y agoI remember reading fortune a lot as a kid. This file contains the quotes, I think. https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/games/fortune/scene https://github.com/Arquivotheca/SunOS-4.1.3/blob/413/games/f...
- cr4nberry 4y agoJust out of curiosity, does anyone know a place where solaris is still used? What's the use case?
- lastdong 4y agoTelcos (and I would expect water and energy companies) support legacy systems whose software only runs in Solaris.
- rvense 4y agoProbably some trains, planes and ships from the 90's. At least I remember Cory Doctorow describing airplanes as "flying Solaris boxen with badly-secured SCADA controllers" in his "The upcoming war on general purpose computation".
- cr4nberry 4y agoI watched that presentation earlier today. Interesting how he gave the presentation in 2011 right when smartphones were taking off. I feel like what he's talking about has in part already happened (somewhat) with smartphones, tablets, and chromebooks so ubiquitous now
- hapless 4y agoI know a few places. The answer is, 100% of the time, "legacy code." One of my former employers has millions of lines of code that just assume a bigendian architecture and play fast and loose with byte order as a result. They are probably not gonna port that code off SPARC any time soon. Eventually. But not soon.
- hestefisk 4y agoIt’s pretty cool to see that an entire OS can be built with a ~250 line Makefile. Yes, of course there are sub Makefiles etc, but perhaps it indicates that we could make today’s technology simpler (e.g. the Linux kernel).
- sgt 4y agoFreeBSD kernel is still simple to configure and compile. At least last time I checked.
- hestefisk 4y agoVery true. This is an entire OS, however. FreeBSD prob comes closest in terms of elegance. That’s why it’s my main OS for a reason.
- m000 4y agoIf you only support a single platform and a single compiler, Makefiles are perfectly adequate. The extra baggage (autotools and such) are the extra baggage for building on any platform, with different compilers.
- hestefisk 4y agoThere’s also a copy of an ancient version of AIX. Incredible this person hasn’t been sued yet…
- squarefoot 4y agoHe already got a couple DMCA takedowns however (WinNT5 and SCO UnixWare-7). It's better for those interested to mirror (locally and offline) before it's too late.
- DoneWithAllThat 4y agoThis really takes me back, wow. As an anecdote, this os and version was what Kevin Mitnick hacked at Netcom, leading to his eventual capture as detailed in “Takedown”.
- js2 4y agoAbout 20 years ago, Lenny DiCicco's resume came my way. He was interviewing for a Unix sys admin position. Having read Takedown, I recognized his name immediately. We didn't hire him. That's my Kevin Mitnick story. http://www.takedown.com/coverage/mitnick-timeline.html http://www.takedown.com/coverage/mitnick-timeline.html
- guerrilla 4y agoIn case you want boot disks or other formats[1]. There's Sun386 and m68k there too but afaik require very specific machines. [1] https://winworldpc.com/product/sunos/4x https://winworldpc.com/product/sunos/4x
- natas 4y agoI wish it was portable to ultrasparc (sun4u) or x86_64.... it would be quite amazing.