Posts by dabeaz@mastodon.social
(DIR) Post #B4hqaYlqi4wnHaKllY by dabeaz@mastodon.social
0 likes, 0 repeats
Anyways, while all of this is going on, a more diminutive, yet still kind of cool looking SGI shows up in the corner of the post-doc/grad student bullpen. A mere $250K machine. It too can play Driving Simulator.It sort of works but a) you now had to FTP gigabytes of data from the computer center to local storage over 10Mbit ethernet. b) There's never enough local storage. c) Visualization takes forever. d) Nobody else can use it while it churns. It kind of sucks. 10/n?
(DIR) Post #B4hqaZPuJ8zRHp4lCi by dabeaz@mastodon.social
0 likes, 0 repeats
But, the resulting pictures look kind of awesome. Bad ass really. Realistic lighting. Anti-aliasing. All of the molecules look spiffy--like rendered billiard balls. Stuff, you'd definitely want in a PowerPoint presentation to be shown on the big screen at a Supercomputing conference. Why, what are we talking about again? Oh yeah, xv. Let's get back to xv... 11/n?
(DIR) Post #B4hqaaPaboKWN7w1Lc by dabeaz@mastodon.social
0 likes, 0 repeats
Actually, before I do that, let me add that this "big SGI in the machine room thing" eventually morphed into a "let's make a holodeck for doing VR!" thing. Yeah, because that's exactly what scientists want. Freaking VR! To use when you're able to sneak in sessions between the HS student tours and you're prepared to take the afternoon off afterwards to sooth the resulting migraine.Dear metaverse, 1996 called and wants its dumb idea back. Thanks. I digress. 12/n?
(DIR) Post #B4hqabLj7epnHR8Rxw by dabeaz@mastodon.social
0 likes, 0 repeats
This is getting kinda ranty. Fortunately, I have to drive someone to O'Hare. So, I'm going to calm down while I do that and then I'll be back to say more about how xv fits into this whole story. Stay tuned. 13/n?
(DIR) Post #B4hqacHVep3UAeAb20 by dabeaz@mastodon.social
0 likes, 1 repeats
So, xv had a special "polling" mode that you could use to make it continuously watch a file. If you were viewing the file and the file changed, then xv would update the displayed image.This was the secret sauce for making real-time dashboards.You'd have your physics code dump some kind of output file every so often. Then, you'd stick pgplot or some other tool on a crontab to make an image. Have xv poll the output file.It worked great and involved almost no coding. 14/n?
(DIR) Post #B4hqad8KURJ2oSsmMS by dabeaz@mastodon.social
0 likes, 0 repeats
It was generally understood that no workstation would ever be idle in the group--someone was always solving differential equations somewhere. Usually for tens to hundreds of hours at a time.So, when I say you'd sometimes see someone running 20 copies of xv, they were often running it as a dashboard. Spin up your physics code on 20 machines and then spin up 20 copies of xv to monitor progress. It was pretty hacked together, but it worked decently well. 15/n?
(DIR) Post #B4hqae7eoQMXsfZkx6 by dabeaz@mastodon.social
0 likes, 0 repeats
In light of this, we got to thinking... "what if we could just make our big supercomputing code directly produce output images?" If we could do that, maybe we could wire up xv on the back-end of it and turn it into a cheap "visualization platform."The only problem with this is that we were working on the Connection Machine. I wasn't aware of a vis/graphics library that we could use for this. And whatever we used, it would have to be extremely lightweight due to memory concerns. 16/n?
(DIR) Post #B4hqafCenJxLESvGNs by dabeaz@mastodon.social
0 likes, 0 repeats
In physics, you often see people making "crazy" approximations. For example, "sin(x)" is basically the same as "x" for certain values of "x". A trick you can sometimes use to simplify some gnarly integral. In terms of graphics, we were mostly making rendered spheres. A first-order approximation to an antialiased rendered fancy sphere is a plain 2D solid-colored circle with a single pixel black outline around it.So, maybe we should just do that. 17/n?
(DIR) Post #B4hqag3TcwCtsHdRiK by dabeaz@mastodon.social
0 likes, 0 repeats
About 5 years earlier, I had done a senior thesis project where I explored the Bresenham ellipse drawing algorithm (and also circle-drawing algorithm). I even presented this in my first ever conference talk as a student paper at a math conference in Topeka, KS.So, I had that code laying around. I figured I could adapt it into something where I rendered flat 2D circles into a 3D z-buffered 8-bit pixel array. This could be easily coded in C using just basic arrays. 18/n?
(DIR) Post #B4hqagr6ePuEMCr54S by dabeaz@mastodon.social
0 likes, 0 repeats
So, I add that to our physics code. The problem is how do I turn that into an image? I don't know anything about image formats. However, there it was, xv. We had the source code for xv. xv could write GIF images. So, I simply copied the GIF encoder out of xv, tweaked it a bit, and dropped it in our physics code. A bit of code reuse. 19/n?
(DIR) Post #B4hqaiTmc6RDORxTzk by dabeaz@mastodon.social
0 likes, 0 repeats
Now, maybe I should feel kind of bad about doing that. But, xv lifted its GIF encoding code from somewhere else too. The original source had comments crediting it to Michael Mauldin and David Rowley from 1989. But, then there was another comment below that where they credit it to an IEEE Computer Article from 1984. So, it's not really the same as installing a dependency, but definitely in the spirit of early open source. 20/n?
(DIR) Post #B4hqajVEoBCCZFe9tw by dabeaz@mastodon.social
0 likes, 0 repeats
With the physics code now able to render "spheres" and make images, we just need to solve a certain transport problem. The Connection Machine was physically in a different building and on a different network. You couldn't really log into it in the traditional sense.However, you could open up socket connections. So, the physics code was modified to open a network socket that was connected to a small "server" program running on your desktop machine. 21/n?
(DIR) Post #B4hqakM3dnRlD4MLEO by dabeaz@mastodon.social
0 likes, 0 repeats
The idea is that the server program running on your desktop would watch for images coming from the CM-5 and write them to a file. Behind that, you'd have xv running in polling mode. Suddenly, we've slapped together this visualization dashboard. The whole thing was coded up in about a week. Nothing super fancy. Mostly standard parts with a bit of cut/paste. 22/n?
(DIR) Post #B4hqalDES5ytrzEo76 by dabeaz@mastodon.social
0 likes, 0 repeats
Now, you might ask how well something like this worked?In the SGI era, producing a single image from simulation data might take 5-10 minutes. You'd first have to FTP the data to the SGI. Then, you'd need to launch the vis tool. And it would render for awhile. And you'd sit there. Assuming that you could even get access to the machine of course.This new approach reduced all of that time down to about 5 seconds. And it worked from the comfort of your office. 23/n?
(DIR) Post #B4hqam6X8UDWdV6yJM by dabeaz@mastodon.social
0 likes, 0 repeats
People looked at this arrangement and didn't quite know what to make of it. Was it the dumbest coding project ever? Maybe. But, it was hard to argue with the results.We started adding more visualization capabilities into the physics code. This included a minimal "interactive" CLI mode where you could drive the visualization in more interesting ways.Essentially you could type various commands and as long as you were willing to wait about 4-5 seconds, xv would update its output. 24/n?
(DIR) Post #B4hqan31d10NYuTgTw by dabeaz@mastodon.social
0 likes, 0 repeats
The "interactive" mode grew more features over time and eventually turned into something that looked a bit like a scripting language interpreter.I demoed this setup to all sorts of people including, at one point, the US Deputy Secretary of Energy--who honestly had no idea that were probably looking at some extremely primordial incarnation of a computational notebook. They were unimpressed. 25/n?
(DIR) Post #B4hqaoHx10XRPUT7Nw by dabeaz@mastodon.social
0 likes, 0 repeats
Anyways, around this time I read a short blurb about Python that Paul Dubois had written in "Computers in Physics.""Oh, that sounds cool. Maybe I should use that for my CLI!"And that was that... a small little thing that started by hacking around with xv. Anyways, thanks for xv, John. 26/end.
(DIR) Post #B5Yw1qJSOV78eil6TQ by dabeaz@mastodon.social
0 likes, 1 repeats
It seems that I have a small bug in my ed(1) written version of Lox. Naturally, this means that I'll have to bring ed(1) back out to fix it--when I have some more time. Which is not now.
(DIR) Post #B6Cf86aMsXczxrSxuq by dabeaz@mastodon.social
1 likes, 0 repeats
Sure, you don't have to use cocaine, but all of your students are using cocaine. They'd probably be more engaged if you were a bit more culturally sensitive and also used cocaine.
(DIR) Post #B6wDbTYVAu2fWJiVtY by dabeaz@mastodon.social
2 likes, 2 repeats
I used ed(1) as my copilot when implementing an entire programming language from scratch and it only consumed about 4 seconds of total CPU time.