HNHacker News
TopNewBestAskShowJobs

dietrichepp

4,384 karma · joined October 29, 2012

http://www.moria.us/
submissionscomments
dietrichepp··on Why did the Motorola 68000 processor family fall out of use in PCs?
Definitely agreed.

Digging through Usenet archives, I found a post from John Mashey discussing the RISC-CISC spectrum. I found a copy here:

https://userpages.umbc.edu/~vijay/mashey.on.risc.html

The M68K gets called out as having some really complicated instructions in it,

> We thought that adding more addressing modes was the way you made a machine more powerful

https://www.computerhistory.org/collections/catalog/10265816...

People get caught up in intuitive notions of “complex” or “reduced” when talking about RISC and CISC, so it’s very helpful to have specific ideas about what of problems you’re creating for yourself years down the line, when you’re designing an architecture in the 1970s or 1980s. The M68K has instructions that can do these complicated copies from memory to memory, through layers of indirection, and that creates a lot of implementation complexity even though the instruction encoding itself is orthogonal. Meanwhile, the x86 instructions are less orthogonal, but the instructions that operate on memory only operate on one memory location, and the other operands must be in registers. That turned out to be the better tradeoff, long-term, IMO.

dietrichepp··on How fast are Linux pipes anyway? (2022)
The way that shell builtins behave differently here is that SIGPIPE can take out the whole shell on the left side when echo is built-in.

When you /bin/echo red, then it's a subprocess, and its parent shell continues on, so you always get green somewhere in the output.

dietrichepp··on How fast are Linux pipes anyway? (2022)
> It's because 'echo red' is supposed to block,

It is not actually supposed to block. Pipes block when they are full, but there's not enough data here to fill a pipe buffer. When pipes are broken, SIGPIPE is sent to the writer. Pipes do not block just because nobody is reading from the read end--as long as the read end is still open somewhere, a process could read from it, and that is enough.

When you see "blue", what happened is the left-hand side of the pipe got killed because the right-hand side already finished before "echo red", which closed the read end completely, and then "echo red" got killed with SIGPIPE. That takes out "echo green" with it, because "echo" is a built-in, and so "echo" is not a subprocess. If you use "/bin/echo red" instead, then "green" will always be printed (because SIGPIPE is going to /bin/echo, and not the entire shell).

In other circumstances, the "echo blue" will never read stdin, but the kernel doesn't know or care. As far as the kernel is concerned, "echo blue" could possibly read from stdin, as long as stdin is open.

dietrichepp··on Demo of megatextures running on n64 hardware
I do think there are a few things that make the N64 kinda "special" for going back and squeezing more performance out of it. The 3D hardware is remarkably modern in some ways, but there are a couple very thorny resource limitations that you have to work within, and the system complexity is higher than you would probably like.

The main resource limitations you deal with are the main RAM banwidth and the TMEM size. The complexity comes from the division of work between the CPU and a coprocessor called the RSP, which is basically a stripped-down MIPS CPU core that has a SIMD unit and some scratch RAM. You can come up with cool ways to use the RSP, but if you eat up more of the main RAM bandwidth, you'll hurt performance.

The demo here is focused on working around the TMEM size limitation, but it looks like it also reduces the RAM bandwidth use by drawing in Z order rather than using the Z buffer... which is an overall solid approach for improving graphics performance on the N64.

The PS3 has some striking similarities to the N64, in that both consoles have coprocessors with SIMD units that operate on scratch RAM. Both consoles have a reputation for being difficult to program for. The PS3 takes things a bit farther in that the Cell SPEs can only access main memory through DMA. I can only imagine how hard it was to effectively use the SPEs.

dietrichepp··on Streaming is changing the sound of music
While you might edit a long song down to a radio-friendly length, I think most songs start out short enough to be radio-friendly in the first place. 3 minutes is about the natural for a typical verse-chorus-bridge structure song. Cut out the bridge and the song will probably clock in closer to 2 minutes.

These longer songs, like Foreplay / Long Time, have a lot more going on. More ideas. More sections. Dramatic crescendos. Extended instrumental parts. They're harder to write.

The standard verse-chorus-bridge structures are popular because it's a really damn good way to write a song.

dietrichepp··on Streaming is changing the sound of music
Whenever I've done analysis of classic popular songs, songs that I like, I'm always a bit shocked by how quick they tend to be. If there's an intro, the intro is often super short, like 4 or even 2 bars. Like you said, having a hook early in the song was always a good idea.

Some of the iconic classical pieces start with a "hook" too. Or, at least, a very compelling motive.

dietrichepp··on How to Get into Film Photography (and Why You Should)
> Does film generally look better than a pre-processed raw digital photo?

Under typical circumstances, no. Even digital JPEG is better than film, most of the time.

There are some exceptions. Negative film retains details even when overexposed, unlike digital. Medium format or large format film is a lot less expensive that medium format digital, but you need to take pictures carefully and use slow film to take advantage of the difference. Slides still look amazing in-person—they have better contrast than typical monitors, and typical side projectors / light boxes can get pretty bright.

Professional photographers back in the day would deliver slides as their finished product. In one workflow, you don’t do any post-processing on the slide at all—you scan it in, you print it out, and you make sure that the colors in the print match the colors on the slide. You have to get the picture right in-camera, and then you’re done.

dietrichepp··on How to Get into Film Photography (and Why You Should)
> This is a bunch of retro-grouch reverse-snobbism hogwash.

The advice isn’t bullshit, but neither is it some technique that will “improve your photography significantly.”

People who draw will do all sorts of weird exercises to develop their skills. This includes targeted practice, and yes, digital artists will sometimes practice with pen and paper. I see that practice as being kindred with the photographers who shoot on film as an exercise.

Mostly, it just encourages you to spend more effort visualizing the end result before you press the shutter release on your camera. It’s not some powerful technique to unlock your skills, but neither is it snake oil or hogwash. It’s easy to get stuck in habits, and one of the habits you can get into in photography is to just take a ton of pictures, hoping that one of them will look good. Maybe you just keep taking pictures and making adjustments until you get the right picture. Spending some time with film just forces you to break the habit. It would be nice if you could just tell somebody to slow down and think about what they’re doing, but we’ve got these messy human brains which don’t always follow our instructions as well as we’d like.

> Even the most serious, dedicated, methodical beginner will find it all exhausting unless they're practically autistic.

We used to teach film photography to ordinary high school students, maybe age 15 or so. I don’t think our current generation of high school students is substantially different.

> Film has terrible dynamic range…

This depends on the type of film you use. B&W film has phenomenal dynamic range. Color negative film has excellent dynamic range. Color positive film has narrow dynamic range.

If you shoot slides, you have to be damn precise with your shots. B&W negatives are very forgiving as long as you don’t underexpose them too much†. The dynamic range of B&W film is probably higher than the capacity of your lens to produce a high-contrast image. If you took pictures pointing your camera into a laser beam, or pointing into the sun, your picture would get overwhelmed by flare.

†Likewise, digital is very forgiving as long as you don’t overexpose.

dietrichepp··on Show HN: MonoDevelop
Apropos of Microsoft discontinuing Visual Studio for the Mac.

My perspective is as someone who mainly used C# on the Mac with Unity. I was a professional C# developer at one point, but not on the Mac.

MonoDevelop, long ago, shipped with Unity on the Mac, and you'd use it for all your C# development. Xamarin Studio was the proprietary counterpart, and the selling point was that you could develop cross-platform mobile apps in C#. When Microsoft purchased Xamarin, Xamarin Studio was rebranded as Visual Studio, which is confusing.

So we are back to MonoDevelop if you want a free IDE for C# you can use on the Mac, with good C# support. VS Code has C# support through a plugin but it's not as good as MonoDevelop.

dietrichepp··on Source code for Quake 2 rerelease
You can see places in the Q2 code where it has been incrementally tweaked a bunch. The player movement code got a bunch of changes, and you can see blocks of it that are commented out or have #if 0. There are some comments explaining the thought process, but it’s not very clear.
dietrichepp··on Source code for Quake 2 rerelease
Quake II was my first experience writing C.

The code is clear, coherent, and straightforward. I’m not going to say it’s the best source code I’ve ever read, but it set a high bar. I’ve read source code to games since then, and I’ve seen all sorts of weird stuff… I’ve seen functions with nesting levels that go past the right side of the screen, I’ve seen functions a mile long that do a million things, you know. It was an early lesson that you could do cool things with simple code.

We used Quake and Quake II to teach a VR class to kids in the late 1990s and early 2000s. You got a VR headset, you got a half-dozen PCs with Q.E.D. or Qoole, and you taught a room of 12-14 or 14-18 year-old students how to make their own virtual reality game.

“Make your own virtual reality game” was, essentially, making your own Quake or Quake II level, without any monsters or guns in it. The story for the game could be told through on-screen messages triggered in the level. Students made all sorts of levels. One group made a level with slime you had to cross, and a button that turned on pumps to drain the slime (very much like what you would see in a standard Quake II level). Another group made a 3D maze out of water that you had to swim through, floating in space. I still have some of these student-made levels on my hard drive, after all these years, although I have trouble getting some of them to work.

For the class, I made a mod that gave the players a flaregun instead of the blaster. Basically, it was still the blaster, but with a different sound effect and no weapon model. I modified the blaster bolt to be affected by gravity, bounce off of things, and go out after a certain amount of time.

(If you were in that class—you may not have gotten the headset. We couldn’t always get it to work.)

dietrichepp··on Tetris Max 2.9.1 and Macintosh System 6.0.8 Bugs
That’s a good suggestion—I decided not to use MPW because the CodeWarrior compilers are better, the CodeWarrior UX is better, etc. For now, I’d rather drop 128K support and keep using CodeWarrior. The binaries work just fine on Macs with the 128K ROM (like the Mac Plus), and there are a number of additional difficulties you face when developing for 64K ROMs.

Some of the other difficulties—no MaxApplZone, the segment manager behaves differently, and if you really want Mac 128K support, you have to copy to an MFS formatted disk. Some versions of the OS ship with broken MFS implementations, presumably because nobody cared whether it worked. I suspect that the segment manager behavior is a particularly thorny issue because it affects the location of code segments in memory, and you have to be careful when you only have 128K.

dietrichepp··on Tetris Max 2.9.1 and Macintosh System 6.0.8 Bugs
CodeWarrior ships with the source code for the startup code, but it is unfortunately somewhat long.
dietrichepp··on Tetris Max 2.9.1 and Macintosh System 6.0.8 Bugs
I’ve been doing some dives into Mac 68K programming recently, and ran into the same question—what about color on System 6? Like the author, I don’t have a Mac which is both color and runs System 6.

The old Inside Macintosh volumes are sometimes difficult to follow. New features got added to newer system software versions, and new features got added to newer ROM versions, and if you want to support older Macs, then you sometimes have to search through the volumes until you find when a particular feature was introduced. (The original Inside Macintosh volumes are organized in chronological order, corresponding to major ROM or system software updates.) If you just look at the description of one of the functions in the OS or toolbox, there’s no mention of when it was introduced.

I also discovered that despite my efforts to make a program compatible with the Mac 128K and 512K, my programs won’t run on those systems. The 128K and 512K have the very first ROM version, with the 64K ROMs, and I suspect that the application startup code which ships with CodeWarrior checks for a 64K ROM and aborts the program. So even if I’m careful to only use functions that are available in the 64K ROM, my program won’t run on a 64K ROM unless I use a different toolchain or rewrite the startup code.

dietrichepp··on Unicode Character “𝕏” (U+1D54F)
I’m very well acquainted, too, with matters mathematical.
dietrichepp··on Unicode Character “𝕏” (U+1D54F)
It sounds similar to the division between “math” and “maths”. It looks wrong depending on where you grew up.
dietrichepp··on Unicode Character “𝕏” (U+1D54F)
My experience with 𝔽 is “vector space over a field 𝔽”, which is not a concrete object, but I have probably seen F written in a normal italic style more often.
dietrichepp··on Unicode Character “𝕏” (U+1D54F)
The bird is a lot more recognizable, no? Maybe even beautiful?
dietrichepp··on Unicode Character “𝕏” (U+1D54F)
Thanks! I am always a little curious about how these symbols are used. That makes perfect sense to me.
dietrichepp··on Unicode Character “𝕏” (U+1D54F)
This is for math.

In Latex, you get these symbols with \mathbb{}. They are most commonly used to represent to represent number sets, like the set of all integers Z (from the German), set of all natural numbers N, set of complex numbers C, set of all real numbers R, rationals Q (for “quotient”), set of quaternions H (named after Hamilton), or an unknown set F (for “field”). This explains why many of the letters in this series exist in the basic multilingual plane—because R is very commonly used, but A is not. You can find ℝ in the basic multilingual plane at U+211D.

I don’t know why people are interested in the X symbol. It’s just there to complete the alphabet. There are many other ranges like this used for writing mathematical formulas, like the range of bold letters, fraktur, script, etc.

dietrichepp··on Learning to Touch Type Again
I had the same experience switching to Dvorak. It forced me to relearn how to type, and when I was relearning, I made sure to learn properly. The switch, and relearning to type, 95% solved my RSI problems.
dietrichepp··on Learning to Touch Type Again
> We’ve got voice input that’s getting much better.

Voice input for tasks like writing has been “solved” for at least twenty years now, you just need to get your software set up to use it. As I understand it, the improvements to speech recognition these days are making it easier to handle noisy environments, different accents, more languages, that sort of thing, but if you just care about accuracy and productivity in a controlled environment, then we’ve had good solutions available for a long time now. If you travel back in time to 2003 and decide to write a novel using speech recognition, it will still be a pleasant experience—you shell out some cash for a system like Dragon NaturallySpeaking, train it to recognize your voice, and get working. Your accuracy and productivity will improve over time as you get in the habit, and as the system adapts to your voice.

If you can do a portion of your 60 hours using voice, I recommend it. Take some load off your hands.

dietrichepp··on What is the numerical range of a matrix?
Note that this concept can extended to linear operators, which are the generalization of matrixes. Since it’s a generalization, some results for matrixes (finite dimensional operators) don’t hold for infinite dimensional operators.
dietrichepp··on Owner of Symbolics Lisp machines IP is interested in a non-commercial release
Keep in mind that the information is old.

http://www.paulgraham.com/carl.html

I’ve read other stories, and seen presentations, but the information is getting harder to find.

dietrichepp··on Owner of Symbolics Lisp machines IP is interested in a non-commercial release
To be clear, I’m not describing “editing live in production” as the workflow. The workflow is editing code live on your development machine, committing the changes, and going through the normal code review + CI/CD pipeline you’d set up for any other project.

Something like Fix & Continue in Visual Studio is good for testing out smaller changes. By comparison, something like SLIME + Lisp is powerful enough to use for developing new features. The running system on your developer workstation is mostly synchronized with the source code on disk because the interface you use for making changes is the editor. This synchronization is not perfect, but that’s why you have your unit tests and CI/CD pipeline.

dietrichepp··on Owner of Symbolics Lisp machines IP is interested in a non-commercial release
I’ve used that before, but the Lisp stuff still feels a lot better. I’m not just running a program and swapping out a function, but I’m using a REPL, some powerful introspection capabilities, a compiler, and a running system all together in a way that just works really nicely. I can add new files, import new libraries, and redefine structures. Objects that I print out in the REPL can be copied out and pasted directly into code. Rather than running the program and fixing the problems, you keep the system running the entire time you’re working on it. And the condition system provides a lot of help when you screw something up.

To be clear—I’m not making the argument that people should be writing programs in Lisp. Just that there are some things to learn from the way Lisp development works.

In the past, when I’ve used the various edit-and-continue tools, it felt it was just cutting some time out of the edit-compile-run cycle. The Lisp system feels more like a workbench, where you create fixtures to try things out while you are building the system.

dietrichepp··on Owner of Symbolics Lisp machines IP is interested in a non-commercial release
ITA software is an acquisition, and I’m sure most of the Lisp development at Google is just done by engineers tweaking their .emacs files.

The problem of parsing data from airlines is fiendishly hard. There are a ton of different rules for how to calculate prices, and all sorts of deals and promotions that may affect a particular route on a particular day. If you have a system which can parse this data, then you wouldn’t want to rewrite it. I’ve read a number of articles about ITA Software’s Lisp code and it’s really interesting.

Lisp may be a critical part of ITA’s success, but “good enough for Google” is probably the wrong take here—Google, I’m sure, purchased a company to add its working product to their portfolio. I doubt that Google’s processes would allow someone to ale a new product in Lisp.

dietrichepp··on Owner of Symbolics Lisp machines IP is interested in a non-commercial release
Maybe not of commercial value.

But I took the time to get SLIME set up, with SBCL, and it seems like a completely different world. I’ve used languages with dynamic loading and REPLs before, and it seems like we still have something to learn from Lisp. Like, the experience is far from ideal—Lisp has its own problems. But it is just so damn nice to redefine a function in a running system, without having to then get the system back into the state that I need. I’ve used IDEs with dynamic code patching, and I’ve used Python systems that reload modules, but there have always been problems with the ergonomics.

dietrichepp··on Tell HN: People forget that you can stick any data at the end of a bash script
Yes. You can load the decompressed code into memory, mprotect() it to give it execution permissions, then jump in. Hard to do in a shell, though.
dietrichepp··on Tell HN: People forget that you can stick any data at the end of a bash script
Pipes are not temp files, they’re more like kernel buffers associated with no file. When I think of temp file, I think of something that is at least associated with a filesystem.

The reason that running a binary needs a file is because execve() takes a path as an argument. But, as you said, there are other ways to load code into memory.

← PreviousPage 3 of 32Next →