News for hackers. Stuff that matters.
Re:JavaScript PDP11 emulator running Unix V6 by angusgr on Tuesday April 19, 2011 @08:51PM (#2464820)
The source code is quite readable as well. pdp11.js has cases for stepping each instruction. 2Mb hard disk image loaded into an array via an ajax request (rk05.js)

Is it possible to benchmark this on a modern PC/browser, against a real PDP-11?

Re:JavaScript PDP11 emulator running Unix V6 by enf on Tuesday April 19, 2011 @07:41PM (#2464685)
Pretty amazing. My tips to anyone else trying this out:

* Remember that cd was spelled chdir in v6

* "stty -lcase" will make it stop putting everything in caps

Re:JavaScript PDP11 emulator running Unix V6 by Maci on Tuesday April 19, 2011 @08:29PM (#2464773)
chdir usr

chdir games

wump

edit: fixed.

Re:JavaScript PDP11 emulator running Unix V6 by dman on Tuesday April 19, 2011 @09:03PM (#2464836)
Just tried it - its wump and not wumpus - and at least in google chrome amd64 linux it segfaults.
Re:JavaScript PDP11 emulator running Unix V6 by angusgr on Tuesday April 19, 2011 @09:08PM (#2464846)
Strange, I'm on the same config as you and apart from 'wump' I was in nostalgia-wumpus heaven. :) Chrome 10.0.648.204 (amd64 linux.)
Re:JavaScript PDP11 emulator running Unix V6 by dman on Tuesday April 19, 2011 @09:29PM (#2464888)
Sorry my bad. Its firefox4 :) Apparently I am still getting used to the firefox 4 UI where the tabs take up most of the screen.
Re:JavaScript PDP11 emulator running Unix V6 by bzbarsky on Thursday April 21, 2011 @01:10AM (#2469511)
Did you end up with a crash report for this? Or was this a distro build?

I've been trying to get this to crash with a 64-bit build on Mac, but mostly falling into holes in cave floors...

Re:JavaScript PDP11 emulator running Unix V6 by jws on Tuesday April 19, 2011 @09:47PM (#2464935)
The question is, how do I mount my RL02 pack with the software I saved?

(That's a 14" removable platter drive that stored 5 million bytes! Amazing. A couple decades and the media is essentially unreadable. I suppose someone with a STM could work it out.)

Re:JavaScript PDP11 emulator running Unix V6 by unwind on Wednesday April 20, 2011 @02:31AM (#2465515)
I haven't looked at the physical interface at all, but if you have any interest whatsoever in electronics, that might be something you can whip up yourself with e.g. an Arduino for instance. Of course, that probably requires quite a lot of time invested. And be careful when you write your driver so you don't overwrite the tracks with bogus data, that would be ironic (or something).
Re:JavaScript PDP11 emulator running Unix V6 by caf on Tuesday April 19, 2011 @10:19PM (#2465008)
I'm sure you can find someone online with a working RL02 who'd be happy to create an image of your disk for you.
Re:JavaScript PDP11 emulator running Unix V6 by st3fan on Tuesday April 19, 2011 @09:10PM (#2464850)
Pretty awesome. I compiled HELLO.C. Took a minute, but it works.
Re:JavaScript PDP11 emulator running Unix V6 by wtracy on Tuesday April 19, 2011 @08:48PM (#2464814)
This emulator and this codebase need to get together: http://github.com/qrush/unix
Re:JavaScript PDP11 emulator running Unix V6 by olegp on Wednesday April 20, 2011 @12:19AM (#2465227)
Would be awesome to see someone try this on Node or Akshell (http://www.akshell.com/ide/) and see how it performs on server side V8. Could even add a real time, multi-user console to it.
Re:JavaScript PDP11 emulator running Unix V6 by tectonic on Tuesday April 19, 2011 @10:00PM (#2464964)
# date

Fri Oct 10 12:33:34 EDT 1975

Re:JavaScript PDP11 emulator running Unix V6 by angusgr on Tuesday April 19, 2011 @09:50PM (#2464945)
It'd be extra awesome if it also emulated a front panel http://en.wikipedia.org/wiki/File:Pdp-11-70-panel.jpg
Re:JavaScript PDP11 emulator running Unix V6 by lloeki on Wednesday April 20, 2011 @05:47AM (#2465944)
Or a way to stuff it into Cathode: http://www.secretgeometry.com/apps/cathode/
Re:JavaScript PDP11 emulator running Unix V6 by cygwin98 on Tuesday April 19, 2011 @11:16PM (#2465111)
# pwd

/usr/ken

# vi

vi: not found

Wow, it's like I was traveling in a time machine back to 70's and saw Ken Thompson hacking. One thing that has always taken for granted is that vi is the ubiquitous editor in Unix world, it's NOT true, :)

Re:JavaScript PDP11 emulator running Unix V6 by mitchty on Wednesday April 20, 2011 @12:38AM (#2465268)
I think this is when you learn that ed is truly the ubiquitous editor. None of these fancy visual editors like vi, also if the date is to be believed, this predates vi by a year (1976 is when Joy created it if I remember right).

Also, I just realized its been a long time since I had to use ed, but this is fun. Its like a more civilized age of unix, ls -l doesn't print groups. So much fun to be had here.

Re:JavaScript PDP11 emulator running Unix V6 by SingAlong on Wednesday April 20, 2011 @01:38AM (#2465397)
I tried vi and edit commands and they didn't work. Thanks for this hint about ed. Works in the this pdp emulator.

Out of curiosity I also tried ed on my Ubuntu and it works here too. Shouldn't obsolete tools like these be removed from the newer linux kernels? Or is there a significant population that still uses it directly or indirectly (using some tools that use ed)?

Re:JavaScript PDP11 emulator running Unix V6 by mnwcsult on Wednesday April 20, 2011 @08:51AM (#2466367)
I think I first started using UNIX around 1986. Always thought that DOS was a poor mans rip off of UNIX. Needless say this emulator is a major treat. I actually used to play "Hunt the Wumpus" with a buddy of mine way back when.

As for "should obsolete tools be removed" no! Everything in UNIX is built upon something else. You could and still can build the most useful shell scripts to support whatever task. Treat UNIX commands like any computer programming langaue commands and you have tools.

Just a week ago I'm using dd to convert old IBM mainframe from "EBCDIC" to "ASCII" data. Followed that up by writing some C language code to process packed decimal data.

All in All *NIX is the most useful command line platform there is!

Website scraping anyone, start with "wget".

Bye now.

Re:JavaScript PDP11 emulator running Unix V6 by beza1e1 on Wednesday April 20, 2011 @02:54AM (#2465577)
There are a lot of these ancient tools around. For example, you probably have "rcs", which is a precursor of cvs. Rumors are, there are tools (wikis), which use it.
Re:JavaScript PDP11 emulator running Unix V6 by lloeki on Wednesday April 20, 2011 @05:45AM (#2465936)
ed can be useful at times when writing scripts, because you can do things with it that sed can't do (at least not easily).
Re:JavaScript PDP11 emulator running Unix V6 by derleth on Wednesday April 20, 2011 @03:13AM (#2465615)
> Shouldn't obsolete tools like these be removed from the newer linux kernels?

It isn't in the kernel. That's the point: It's just one small file on the hard drive, which barely takes up anyone's resources. It's trivial.

> Or is there a significant population that still uses it directly or indirectly (using some tools that use ed)?

We don't know. What we do know is that if an established distro suddenly released a version without any tools older than a certain date, it would result a political mess that would be a lot worse than any benefits the distro maintainers could get from removing a few files from their distro.

Re:JavaScript PDP11 emulator running Unix V6 by brazzy on Wednesday April 20, 2011 @08:29AM (#2466301)
ed is the standard text editor - used to say so in its manpage, too.

I own a Unix book in which the authors dismiss vi as too bloated to be usable ("you need a large PDP-11 for it to fit into memory and still have room for an actual text to edit") and having too many features for anyone to need.

Re:JavaScript PDP11 emulator running Unix V6 by tectonic on Tuesday April 19, 2011 @10:01PM (#2464969)
It sure isn't happy about `rm-rf /`
Re:JavaScript PDP11 emulator running Unix V6 by silon on Wednesday April 20, 2011 @02:05AM (#2465451)
Complete with non working backspace, just like in Linux early days.
Re:JavaScript PDP11 emulator running Unix V6 by com on Wednesday April 20, 2011 @07:19AM (#2466128)
Early days? Still happens for me with odd terminal apps here and there on things like Windows.
Re:JavaScript PDP11 emulator running Unix V6 by mnwcsult on Wednesday April 20, 2011 @08:55AM (#2466379)
Hyperterminal?
Re:JavaScript PDP11 emulator running Unix V6 by exit on Wednesday April 20, 2011 @07:10AM (#2466107)
i don't understand where the file system / hard disk content is store.
Re:JavaScript PDP11 emulator running Unix V6 by angusgr on Wednesday April 20, 2011 @08:32AM (#2466315)
Take a look at rk05.js. It makes a background AJAX request for a URL with the 2Mb hard disk image, then loads it into a plain javascript array and emulates the hard disk accesses to it.