6 ms·
12-minute Mandelbrot: fractals on a 50 year old IBM 1401 mainframe
- fractallyte 12y agoWay back in 1985, a seminal 'Computer Recreations' column in Scientific American featured the Mandelbrot set: https://www.scientificamerican.com/media/inline/blog/File/Dewdney_Mandelbrot.pdf https://www.scientificamerican.com/media/inline/blog/File/De... (A K Dewdney's columns were always fantastic - a whole new world of wonder for early 'home computer' users!) After careful study, my brother coded it in assembly on a C64. We both had the idea to double the display resolution (from 320x200 to 640x400) by 'extending' the screen into RAM. After leaving the computer running overnight (often longer), we eagerly came the next day to check progress, and dump the output to a dot matrix printer. We couldn't use color or even grayscale, so black and white stripes were the only option to reveal the glories of the Mandelbrot set. Result: stunning, finely detailed, black and white images! I still have the printouts...
- guru_meditation 12y agoI loved AK Dewdney's columns. The Core War [1] columns influenced me profoundly. Would love to see the mandelbrot printout scans :) [1] http://www.koth.org/info/akdewdney/ http://www.koth.org/info/akdewdney/
- jacquesm 12y agoIf you liked his columns check out 'The Planiverse'.
- fractallyte 12y agoOK, just off the scanner: http://imgur.com/gallery/8z7zP http://imgur.com/gallery/8z7zP Generated with a Commodore 64, output on an Epson RX80 dot matrix printer, circa 1986. All coding credit to my genius brother!
- guru_meditation 12y agoGorgeous! :)
- dang 12y agoAbsolutely marvelous. Do you and your genius brother still write code?
- dansari 12y agoThanks for posting this fractallyte! We're separated by an ocean, so I'm glad I can see this digitised. To answer you dang (first, I don't consider myself that), I work as a consultant currently writing C#/.NET code for a large corporation. But hopefully one of my side projects (using various other technology stacks) will pan out one day, and I'll be able to escape, like many of us here dream about (and many have already achieved) :)
- dang 12y agoI hope you do and also that you continue to participate on Hacker News. Between kens outdoing himself with the wonderful OP, and all the other historical contributions here, this has my vote for the best HN thread in quite a while.
- dekhn 12y agoI learned about the set in '87 or '88 and wrote a BASIC program to calculate it on my Apple IIe using the "obvious" algorithm. I left my computer on overnight (I had no idea if it would overheat). However, even after a day, it hadn't even got to the interesting parts of the set- it was still off in the big bands of constant color around the set. When I got to college I had a PC (a 286 with no floating point hardware) so I ran FRACTINT. It was great, fast, and fun. Eventually PCs got hardware floating point but by that time, few people were really exploring fractals.
- keithpeter 12y agoYup: 36 hours on a BBC B+ micro for monochrome mandelbrot. I used to leave it running over the weekend, and tried zooming into various parts of the set over some weeks. I used to photograph the monitor, and I'm now searching for the negatives... "(Up until 1971, British currency was expressed in pounds, shillings, and pence, with 12 pence in a shilling and 20 shillings in a pound. This makes even addition complicated, as tourists often discovered.)" Just after I had learned to add and subtract pounds shillings and pence, they went decimal! Ha!
- tlb 12y agoI wrote something similar in Apple ][+ Basic. It had a cool optimization: it would scan 16 points around the boundary of each 64x64 pixel block, and if they were all-black (in the set) or all-white, it would assume the rest of the block was the same and finish quickly. My dot-matrix printer had something like 2000 pixels of width and limited-only-by-patience height, so the printouts were amazingly detailed. I wish I'd had similarly inclined peers at the time. We could have totally geeked out. But I was the only one I knew.
- ska 12y agoEdit: the wording "assumed" led me to interpret that you didn't know about this mathematical property, but perhaps you did! You almost hit upon a real property of the set, namely that if you can find a closed contour of the interior, all the enclosed points are in the set... A common variant of your approach, then, was to quad tree the area of interest and evaluate the boundary of each square, if it was consistent you just fill in the block, otherwise subdivide. This is a massive speed up for locations like the canonical initial view with large areas of the set shown... ... Of course the problem with this is you are sampling discretely, so inferring that the boundary is closed because a sampling of it is doesn't really work. Your filling in of the white blocks like this is particularly problematic, as that can easily cut off "children" in the set. You can do this sort of approach properly, but it is a bit more complicated.
- mikeash 12y agoPix or it didn't happen. Sorry, what I mean to say is: if you happen to have those printouts somewhere convenient, I would love to see what a 1980s assembly language generated, dot matrix printed Mandelbrot set looks like.
- fractallyte 12y agoSee my post above! ;-)
- mikeash 12y agoThat's wonderful. Those look a lot better than I imagined from how you described it. It must have been exciting to pull that out of the printer.
- e12e 12y agoI recall writing a mandelbrot program on my Casio (in the awful Casio basic) in the late 90s, after reading Ivar Peterson's "The Mathematical Tourist" (actually started with Sierpinski Gasket variations, as that is much easier, not to mention faster). I was wondering how he managed to do it in 12 minutes on such an old machine -- until I realized he only checked 24 iterations. I believe I started at a 100... and it took ~6 hours to run (more than the time from lunch until I got home, anyway...).
- dansari 12y agoI haven't been active here, but have an account so I thought I'd chime in (being "the brother"!)... That was great fun back then and I was (and still am) a total geek. I called the various programs "routines" back then, as they were commonly known. There was a "plot routine" which would plot points in monochrome or colour, either on screen or on the virtual screen (i.e. the 32Kb of memory that included and went "past" the screen in RAM). The plot routine used fixed point math, which I coded in a separate portion, so was as precise as I wanted it to be. I forgot what that precision was now, but it was something like 4 or 8 bytes. Then there was the "print routine" which took that memory and output it to the printer. Finally, the main Mandelbrot/Julia routines were done using a direct translation of the A K Dewdney articles. All the assembler code was written in a notebook and debugged by hand before even entering it, which was done in the Zeus Assembler. Would be cool if we could locate the notebooks. At least we have the 6510 source code.
- guru_meditation 12y agoThe footnotes in this article are fantastic. I used the inflation calculator [1] to convert 1960s prices to today's dollars: - Rental price: ~$20,000 / month - Purchase price: ~$1,000,000 (yes, a million dollars). So what you're looking at is what used to be a million dollar computer. You could buy a car for every month you pay to use this machine, so you better had really useful programming ideas or it's back to pen & paper :) As the author points out, this was considered the model T of computers because of how affordable it was compared to what sold before. The attention to detail is tremendous. I never paid much attention to the design of old IBM mainframes, but now I can see how profoundly it influenced our perception of computing. I love the author's phrase "inherent drama of computing." and how it became a trope. The IBM industrial design book [2] he recommends is now going on my to-read list.. [1] http://www.usinflationcalculator.com/ http://www.usinflationcalculator.com/ [2] The Interface: IBM and the Transformation of Corporate Design http://www.amazon.com/gp/product/0816670390/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0816670390&linkCode=as2&tag=rightocom&linkId=UK7DS5UBJVT5HIAG http://www.amazon.com/gp/product/0816670390/ref=as_li_tl?ie=...
- kens 12y agoI'm glad someone reads my footnotes :-). About the rentals - most customers rented instead of buying. This had a huge effect on computer companies. Starting a competitor was extremely capital intensive since you had to build the computers up front and then you got revenue monthly, rather than from big sales. Rentals also made IBM conservative since they didn't want to introduce a new machine that would obsolete all the old ones they were still renting out. As for the design book, I only recommend it about 50% - it has a lot of academic theory that HN readers may find uninteresting. It also goes into great detail of the architecture of IBM buildings. Not to discourage you but just set expectations.
- Shivetya 12y agoWe employ z, i, and p, series systems from IBM currently. The biggest costs these days have become licensing software and site costs; power, cooling, site to site comm, and space. The number of languages used across all platforms is varied and well represented. There will always be a lot of business use for large hardware and even languages I thought long past their prime have had enough enhancements they blend the best of the old coding with the newest.
- krylon 12y agoThis is fascinating. While I have a soft spot for old computers, I don't think I would put that much time into such a project. I do admire the author's determination, though! I imagine it must have been a lot of fun and thoroughly enjoyed reading about it. Just the other day, I was talking to one of our automation engineers on the phone, and while waiting for his computer to reboot, we talked about old hardware. He told me how, as a student, he sometimes had to write programs in FORTRAN, and how punched cards were kind of, eh, expensive[1], so the students were all kind of happy when somebody hooked up a paper tape reader to the university computer. Until, that is, they realized that paper tape - at least the paper they were using - was kind of prone to tear, and sometimes students would get their programs back in pieces. I feel nostalgic about this era I did not see for myself, but I also appreciate today's computers being cheap and - for most intents and purposes - mind-bogglingly fast. EDIT: Also, it is fascinating how the 1401 was simple enough that one could get to know each part of it so intimately, from the software running down to the individual pieces making up the processor. On today's computers, where even the keyboard controller is probably more complex than the entire 1401, this has become pretty much impossible. [1] This engineer is from Eastern Germany, and I know that, for example, audio tape was fairly expensive over there. But punched cards, made out of paper? And keep in mind, this must have been at least around 1980!
- ams6110 12y agoPaper tape was also oily, so it lubricated the punch as it moved through it. It had a certain tendency to spontaneous combustion.
- tomcam 12y agoThis article and its footnotes constitute the best summary of an IBM mainframe computing environment I have ever encountered. Have occasionally tried to read the old reference materials but they were never remotely this cogent. He also makes good use of modern context, since we have now settled on fundamentals such as word length, binary encoding, and so on. A masterpiece in miniature.
- GnarfGnarf 12y agoI worked as a paid programmer on card systems in 1970. I'm not saying things were better then. Give me C++ and Python any day over Assembler. However, there was something magical about being able to step through your program one instruction at a time using a switch on the control panel, or being able to display and modify the memory with lights & toggle switches. It was like you were reaching right into the soul of the machine, in a mysterious world. Compilations were so expensive (40 min. for a 4,000-card program) that we would often patch the binary card decks to squeeze one more test. We had to segment our programs into "overlays" that would load consecutively, and re-use the same limited memory locations. What a pain :o) Having dealt with index registers in Assembler, C pointers were a cinch.
- woofyman 12y agoIt was an awesome feeling when my card deck compiled and produced the correct output the very first time !
- nitrogen 12y ago"patch the binary card decks" Is this the origin of the word "patch" in CS usage? As in, literally patching paper? Or does it trace further back to patching clothing?
- Johnythree 12y agoNo, I don't think so. Originally you programmed by plugging "Patch Cords" into field of jacks. So to edit a program, you would swap around a bunch of Patch cords. The term "patch cord" comes from old Telephone switch boards.
- e12e 12y agoReminds me of: http://www.columbia.edu/cu/computinghistory/fisk.pdf http://www.columbia.edu/cu/computinghistory/fisk.pdf
- scrollaway 12y agoThat was an incredibly moving and insightful story. Really well written. I feel like I'm one of today's ten thousand :)
- wglb 12y agoVery nicely done article. However, I think the 029 keypunch didn't overlap the lifetime of the 1401, but I could be wrong. The other marvel of the day was the 1403 printer, which had a lifetime that went long beyond the 1401. It was a bit noisy, and the cover you see in the photos there did serve as a pretty good damper. However, when I did a co-op at IBM in Portland Oregon during my engineering studies, they had a 1403 printer hooked to a 360/30 printing library catalog cards. There was a roll of card stock feed by an automatic feeder that set perhaps 5 feet from the printer. It would feed more stock from the three-foot diameter roll when the printer pulled the paper out. The length of card stock between the printer and the feeder served as a very effective sound amplifying board causing quite a racket.
- kens 12y agoObviously the 029 keypunch overlaps the lifetime of the 1401 since they are both still working :-) But seriously, the 029 was introduced in 1964 along with the IBM 360 mainframe, while the 1401 wasn't withdrawn until 1971, and some were used long after that, so they had plenty of overlap. You're right that the 1403 printer is pretty cool. One interesting thing is it has a hydraulic pump running the paper feed, so it can skip lines very rapidly.
- wglb 12y agoThanks for the clarification. The 1403 was quite an engineering marvel. Lower case, Upper case, many odd characters. There is in fact a book published that was masterd by 1403 by David Grau, I believe.
- DonGateley 12y agoAnd the disk drives on that 360 had hydraulic actuators to move the heads. Was that the 2301 or 2311 disk, or something else? Where I was in IBM Poughkeepsie we kept our programs on removable disks of somewhere around 16 in. in diameter. I don't remember the capacity but it was in MB. At the end of the line of disk drives sat our 029 card punch. I spent way too many hours at that punch because my fingers were so inept. There was no backspace 'cause you can't unpunch holes. We used a card based program to modify the code that accumulated on our personal disk as ISAM data sets. I set that up for my department after dropping and bursting open a very long portable card carrier (of mostly unsequenced cards) that was used before my 1967 "innovation." :-) What shocks me at the moment is the incredibly clear 50 year old mental map and images I have of that machine room and the computers in it. A 360 model 50 that I primarily used. Beside that a model 40, down the isle a model 67, behind that a 7094 and further on a big ol' model 85. Across the hall a honking model 91. No 1401's in that room, however, but lots of 1403 printers.
- usman002 12y agonice http://newstoday45.blogspot.com/2015/03/nail-care.html http://newstoday45.blogspot.com/2015/03/nail-care.html