10 ms·
1972 Unix V2 "Beta" Resurrected
- digitalsushi 2y agoSpock levels of fascinating from me. I want to learn how to compile a pdp11 emulator on my mac.
- snovymgodym 2y agohttps://opensimh.org/ https://opensimh.org/ Works great on Apple Silicon
- haunter 2y agoWhat’s the difference between an emulator and a simulator in this context?
- bityard 2y agoThere is LOADS of gray area, overlap, and room for one's own philosophical interpretation... But typically simulators attempt to reproduce the details of how a particular machine worked for academic or engineering purposes, while emulators are concerned mainly with only getting the desired output. (Everything else being an implementation detail.) E.g. since the MAME project considers itself living documentation of arcade hardware, it would be more properly classified as a simulator. While the goal of most other video game emulators is just to play the games.
- deleted 2y ago[deleted]
- anthk 2y agoNot the case at all. Tons of emulators are near 100% accurate.
- bityard 2y agoHuh? I didn't mention anything about accuracy. And "accuracy" (an overloaded and ill-defined term on its own) doesn't have anything to do with the differences between simulators and emulators.
- Imustaskforhelp 2y agoexactly. makes you wonder , is it all just philosophical. Calling the same thing a different name.
- Brian_K_White 2y agoIrrelevant to the concept being expressed, and does not invalidate. The goals merely overlap, which is obvious. Equally obviously, if two goals are similar, then the implimentations of some way to attain those goals may equally have some overlap, maybe even a lot of overlap. And yet the goals are different, and it is useful to have words that express aspects of things that aren't apparent from merely the final object. A decorative brick and a structural brick may both be the same physical brick, yet if the goals are different then any similarity in the implimentation is just a coincidense. It would not be true to say that the definition of a decorative brick includes the materials and manufacturing steps and final physical properties of a structural brick. The definition of a decorative brick is to create a certain appearance, by any means you want, and it just so happens that maybe the simplest way to make a wall that looks like a brick wall, is to build an actual brick wall. If only they had tried to make it clear that there is overlap and the definitions are grey and fuzzy and open to personal philosophic interpretation and the one thing can often look and smell and taste almost the same as the other thing, if only they had said anything at all about that, it might have headed off such a pointless confusion...
- Imustaskforhelp 2y agoI don't want to offend you , but this has made me even wonder more what the difference is. It just feels that one is emulator if its philosophy is "it just works" and simulator if "well sit down kids I am going to give you proper documentation and how it was built back in my days" but I wonder what that means for programs themselves... I wonder if simulator==emulator is more truer than what javascript true conditions allow.
- kragen 2y agoIt's fuzzy.
- o11c 2y agoIn theory, an emulator is oriented around producing a result (this may mean making acceptable compromises), whereas a simulator is oriented around inspection of state (this usually means being exact). In practice the terms are often conflated.
- codr7 2y agoThe difference is about as crystal clear as compiler/interpreter.
- Imustaskforhelp 2y agocompiler creates a binary in elf format or other format which can be run given a shared object exists. Intepreter either writes it in bytecode and then executes the bytecode line by line ? Atleast that is what I believe the difference is , care to elaborate , is there some hidden joke of compiler vs intepreter that I don't know about ?
- dpassens 2y agoI assume GP meant that a lot of compilers also interpret and interpreters also compile. For compilers, constant folding is a pretty obvious optimization. Instead of compiling constant expressions, like 1+2, to code that evaluates those expressions, the compiler can already evaluate it itself and just produce the final result, in this case 3. Then, some language features require compilers to perform some interpretation, either explicitly like C++'s constexpr, or implicitly, like type checking. Likewise, interpreters can do some compilation. You already mentioned bytecode. Producing the bytecode is a form of compilation. Incidentally, you can skip the bytecode and interpret a program by, for example, walking its abstract syntax tree. Also, compilers don't necessarily create binaries that are immediately runnable. Java's compiler, for example, produces JVM bytecode, which requires a JVM to be run. And TypeScript's compiler outputs JavaScript.
- codr7 2y agoThank you!
- amszmidt 2y agoI think it is more about design, emulation mimics what something does. A simulator replicates what something does. It is a tiny distinction, but generally I'd say that a simulator tries to accurately replicate what happens on an electrical level as good one can do. While an emulator just does things as a black box ... input produces the expected output using whatever. You could compare it to that an accurate simulator of a 74181 tries to do it by using AND/OR/NOT/... logic, but an emulator does it using "normal code". In HDL you have a similar situation between structural, behavioral design ... structural is generally based on much more lower level logic (eg., AND/NOR/.. gates ...), and behavioral on higher logic (addition, subtraction ...). "100%" accuracy can be achieved with both methods.
- thequux 2y agoCompiling an emulator is quite easy: have a look at simh. It's very portable and should just work out of the box. Once you've got that working, try installing a 2.11BSD distribution. It's well-documented and came after a lot of the churn in early Unix. After that, I've had great fun playing with RT-11, to the point that I've actually written some small apps on it.
- colechristensen 2y agoFrom the link: > It's somewhat picky about the environment. So far, aap's PDP-11/20 emulator (https://github.com/aap/pdp11 https://github.com/aap/pdp11) is the only one capable of booting the kernel. SIMH and Ersatz-11 both hang before reaching the login prompt. This makes installation from the s1/s2 tapes difficult, as aap's emulator does not support the TC11. The intended installation process involves booting from s1 and restoring files from s2.
- aap_ 2y agogood luck though. my emulator is not particularly user friendly, as in, it has no user interface. i recommend simh (although perhaps not for this thing in particular).
- colechristensen 2y agoSo what mechanism do you have set up to reply 4 minutes after being mentioned? :)
- nonrandomstring 2y agoYep, this is a metal-detectorists finding religious relic moment.
- boznz 2y agoToo easy! Going to build one with NAND gates.
- wglb 2y agoOr you could go the way of this quite impressive project: http://fpgaretrocomputing.org/ http://fpgaretrocomputing.org/
- mycall 2y agoHave fun with that https://hackaday.com/2017/01/03/make-logic-gates-out-of-almost-anything/ https://hackaday.com/2017/01/03/make-logic-gates-out-of-almo...
- ForOldHack 2y agoYou can make logic gates out of almonds???
- dataf3l 2y agoI love this! first time I see people use 'ed' for work!!! I wonder who else has to deal with ed also... recently I had to connect to an ancient system where vi was not available, I had to write my own editor, so whoever needs an editor for an ancient system, ping me (it is not too fancy). amazing work by the creators of this software and by the researchers, you have my full respect guys. those are the real engineers!
- ajross 2y agoInterestingly it's actually a sort of degenerate use of ed. All it does is append one line to an empty buffer and write it to "hello.c". It's literally the equivalent of echo 'int main(void) { printf("hello!\n"); }' > hello.c ...EXCEPT... It's not, because the shell redirection operators didn't exist yet at this point in time. Maybe (or maybe not?) it would work to cat to the file from stdin and send a Ctrl-D down the line to close the descriptor. But even that might have been present yet. Unix didn't really "look like Unix" until v7, which introduced the Bourne shell and most of the shell environment we know today.
- wpollock 2y agoI remember using an ed-like editor on a Honeywell timeshare system in the 1960s, over a Teltype ASR-33. I don't remember much except you invoked it using "make <filename>" to create a new file. And if you typed "make love" the editor would print "not war" before entering the editor.
- skissane 2y agoThe “MAKE LOVE”/“NOT WAR” easter egg was in TECO for DEC PDP-6/10 machines. But DEC TECO was also ported to Multics, so maybe that was the Honeywell machine you used it on. But, for a whole bunch of reasons, I’m left with the suspicion you may be misremembering something from the early 1970s as happening in the 1960s. While it isn’t totally impossible you had this experience in 1968 or 1969, a 1970s date would be much more historically probable
- flyinghamster 2y ago
- doublerabbit 2y agoCool. Can we enter that time portal and live in that alternate reality?
- IgorPartola 2y agoWhen gasoline was leaded, cigarette smoke was normal everywhere, and asbestos was used for everything you can think of? It is a fascinating decade but also quality of life likely has skyrocketed since.
- oguz-ismail 2y ago> quality of life likely has skyrocketed since it hasn't
- azinman2 2y agoDepends on the specifics of your life. As a gay man, I’m much happier in 2025.
- Cthulhu_ 2y agoIs that an objective truth or rose-tinted nostalgia speaking? (I wouldn't know, I wasn't alive then.)
- msla 2y agoI survived cancer because of modern medical advances. I'll take the world with Rituxan and CAR T-cell therapy, thank you.
- smeeger 2y agoit is fascinating to consider that this might not be true even though it seems true
- msla 2y agoNo? Thinking the world has gotten worse is classic old person chuntering from time immemorial.
- typeofhuman 2y agoSoftware archeology
- joquarky 2y agoIt's not as glamorous as it sounds.
- api 2y agoOne of the many things I dislike about the SaaS era is that this will never happen. Nobody in 2075 will boot up an old version of Notion or Figma for research or nostalgia. Like the culture produced and consumed on social media and many other manifestations of Internet culture it is perfectly ephemeral and disposable. No history, no future. SaaS is not just closed but often effectively tied to a literal single installation. It could be archived and booted up elsewhere but this would be a much larger undertaking, especially years later without the original team, than booting 1972 Unix on a modern PC in an emulator. That had manuals and was designed to be installed and run in more than one deployment. SaaS is a plate of slop that can only be deployed by its authors, not necessarily by design but because there are no evolutionary pressures pushing it to be anything else. It's also often tangled up with other SaaS that it uses internally. You'd have to archive and restore the entire state of the cloud, as if it's one global computer running proprietary software being edited in place.
- EfficientDude 2y agoNobody will care what Notion or Figma are in the future. I don't know what they are, nor do I care to find out. Saas simply doesn't exist for many people, it's not a software model that all people are comfortable with.
- pjmlp 2y agoAnd since many applications are basically plugging SaaS with each other via APIs and webhooks, not even those. We're living the SOA dreams, but it will be an hefty price.
- kragen 2y agoA lot of software in 01972 was also effectively tied to a literal single installation. Most of the software people ran under Unix at the time was only present on one of the ten Unix installations and has consequently been lost. The shrink-wrapped mass-distribution software epoch was still ten years in the future.
- WhyNotHugo 2y ago1328 bytes for a hello world? BLOAT!
- ramon156 2y agoTime to rice my unix!
- yjftsjthsd-h 2y agoHm. I wonder how hard it would be to write a neofetch (...er, "oldfetch"?) for v1 Unix. Maybe hardcode some of it? Should work.
- ptspts 2y agoMy https://github.com/pts/minilibc686 https://github.com/pts/minilibc686 can do printf-hello-world on i386 in less than 1 KiB. write-hello-world is less than 170 bytes.
- kragen 2y agoVery nice!
- runlevel1 2y agoThat reminded me of the compiler that used to include a large poem in every binary, just for shits and giggles. You've heard of a magic number, it had a magic sonnet. I thought it was early versions of the Rust compiler, but I can't seem to find any references to it. Maybe it was Go? EDIT: Found it: 'rust-lang/rust#13871: "hello world" contains Lovecraft quotes' https://github.com/rust-lang/rust/issues/13871 https://github.com/rust-lang/rust/issues/13871
- starspangled 2y agoI love browsing the tuhs mailing list from time to time. Awesome to see names like Ken Thompson and Rob Pike, and a bunch of others with perhaps less recognizable names but who were involved in the early UNIX and computing scene.
- unit149 2y agoRecovering RF tapes, even a simple text file demonstrates buffer space that is not being used by the dos, or .iso file. Even in a 2.11 BSD distro, a default tiling and window manager has to be installed on the native OS. So yes, going with KDE or the X11 wm.
- deleted 2y ago[deleted]
- m4r1k 2y agoI once saw a talk from Brian Kernighan who made a joke about how in three weeks Ken Thompson wrote a text editor, the B compiler, and the skeleton for managing input/output files, which turned out to be UNIX. The joke was that nowadays we're a bit less efficient :-D
- pinoy420 2y agoOtoh: I got react to run my tests without any warnings today.
- 9dev 2y agoIf I write a bunch of tests for new code, and all of them pass on the first attempt, I'm immediately suspicious of a far more egregious bug hiding somewhere…
- noisy_boy 2y ago// Todo: remove return true;
- kps 2y ago/bin/true used to be an empty file. On my desktop here, it's 35K (not counting shared libraries), which is an asolute increase of 35K and a relative increase of ∞%.
- deleted 2y ago[deleted]
- throwanem 2y agoWhere feasible, I like to start a suite with a unit test that validates the unit's intended side effects actually occur, as visible in their mocks being exercised.
- 2y ago
- JeffTickle 2y agoCan anyone provide a reference on what those file permissions mean? I can make a guess but when I searched around, could not find anything about unix v2 permissions. ls output looks so familiar, except for the sdrwrw!
- b0in 2y agoSomeone in the mailing list thread linked the man pages that they were able to extract out https://gitlab.com/segaloco/v1man/-/blob/master/man1/stat.1?ref_type=heads https://gitlab.com/segaloco/v1man/-/blob/master/man1/stat.1?... for sdrwrw: - column 1 is s or l meaning small or large - column 2 is d, x, u, -; meaning directory, executable, setuid, or nothing. - the rest are read-write bits for owner and non-owner.
- Postosuchus 2y agoPretty interesting. I guess it was way later, when they came up with the SUID semantics and appropriated the first character for symlinks (l) or setuid binaries (s)...