HNHacker News
TopNewBestAskShowJobs

thought_alarm

5,145 karma · joined April 6, 2010

submissionscomments
thought_alarm··on The Apple IIGS Megahertz Myth
> So I wonder why it wasn't added. It wouldn't have been hard, exactly

The answer to the question "Why didn't Apple add X/Y/Z to the Apple II?" is that they did add those features, starting with the Apple III in 1980, and continuing with the IIc and IIgs.

The problem is that there was a 2-year window between the release of the III and the explosion of the home/education market that Apple ignored the II and assumed sales of that quirky, obsolete system would dry up.

The IIe was designed within that window, and the skeleton crew of engineers who worked on the IIe did not have the green light to add significant new features. The only goal was to reduce manufacturing costs and maintain compatibility.

It wasn't until after the IIe was locked in that the Apple leadership began to realize the importance of the II within the suddenly booming home/education market, and only then did they put any significant resources back into the platform.

The IIc (1984) and IIgs (1986) were the result of those renewed efforts, but by that time the cat was already out of the bag. The IIe remained the most popular machine of the platform, and the "modern" features added to the IIc and IIgs were left unused by most developers and users.

thought_alarm··on The Apple IIGS Megahertz Myth
> I believe the //e and the //c could generate interrupts on vertical blanking

VBlank interrupts were only available through the Mouse Firmware, which was built into the IIc but a rarely-installed option on the IIe. As a result, there were no interrupt-driven games for the 8-bit Apple II machines.

The complete lack of consistent frame rates and timing is a hallmark of Apple II gaming.

thought_alarm··on Objective-C is like Jimi Hendrix (2014)
I started learning Obj-C and AppKit in the mid 2000s. During that process I had a moment of zen when I realized that everything I had learned and done with C++ and COM in the late 90s was completely wrong.
thought_alarm··on NSCopyObject, the griefer that keeps on griefing
Historical fun fact:

In the original version of Objective-C and NextStep (1988-1994), the common base class (Object) provided an implementation of `copyFromZone:` that did an exact memcpy of the object, a la NSCopyObject. In other words, NSCopyObject was the default behavior for all Obj-C objects.

It was still up to each subclass to ensure that copyFromZone: worked correctly with its own data (not all classes supported it).

AppKit's `Cell` class provided this implementation:

    - copyFromZone:(NXZone *)zone
    {
        Cell *retval;
        retval = [super copyFromZone:zone];
        if (cFlags1.freeText && contents) 
            retval->contents = NXCopyStringBufferFromZone(contents, zone);
        return retval;
    }
Here it needs to make a copy of its `contents` string, using NXCopyStringBufferFromZone, when the copy of Cell is expecting to free that memory (cFlags1.freeText).

OpenStep introduced reference counting and the NSCopying protocol, and removed the `copyWithZone:` implementation in NSObject.

So the equivalent implementation in OpenStep's NSCell class could be:

    - (id)copyWithZone:(NSZone *)zone
    {
        NSCell *retval;
        retval = NSCopyObject(self, 0, zone);
        [retval->contents retain];
        return retval;
    }
thought_alarm··on The Origins of DS_store (2006)
> Those files should only be created if the user actually makes adjustments to the view settings or set a manual location for icons in a folder. That’s unfortunately not what happens and visiting a folder pretty much guarantees that a .DS_Store file will get created

This is my number one frustration with the Finder.

You can customize the look and size of individual folder windows in many interesting ways, al a the Classic Mac OS Finder, which is a really great feature. But if you blow through that same folder in a browser window then most of those customization are lost, overwritten with the settings of that browser window, even if you never change anything.

What's the point of allowing all of these great customizations when they're so easily clobbered?

I have a global hot key to bring up the Applications folder. I'd love to customize the look of that window, but it's pointless. Whenever I hit that hot key I have no idea what I'm going to get. It's always getting reset.

By the way, the reason it does this is because the Finder has no way to set a default browser window configuration. So instead, it just leaves behind the current browser settings in each folder it visits. Super frustrating.

thought_alarm··on Apple II graphics: More than you wanted to know
> "Randomly reading from various memory addresses might give the modern programmer some concern about security holes, maybe somehow reading leftover data on the bus an application shouldn't be able to see. On the Apple II, there is no protected memory at all though, so don't worry about it!"

Funnily enough, protected memory (sort of) arrived with the Apple III a couple of years later in 1980 and it was met with complete disdain from the developer community ("Stop trying to control my life, Apple!").

Apple III ROM, hardware, and kernel memory wasn't meant to be directly accessible from the application's address space. The purpose was to increase system stability and to provide a backward-compatible path for future hardware upgrades, but most users and developers didn't see the point and found ways around the restrictions.

Later, more-successful systems used a kinder, gentler approach (please use the provided firmware/bios interfaces please).

thought_alarm··on Ask HN: What's the oldest file on your computer?
Things from 30 years ago:

    mdfind 'kMDItemContentCreationDate < $time.iso(1994-06-23)' > out.txt
Highlights include:

* Castle Wolfenstien for MS-DOS (1983-6-29)

* Lisa OS Source Code (1983-6-29)

* Classic Mac Disks from the Boston Computer Society (1984-12-24)

* Atari 7800 Ms. Pac Man Source Code (1988-12-24)

* Pyroto Mountian BBS files (1990-10-5)

* Jumpman Lives Source Code (1991-04-13)

* Delightful AU sound files and TIFF images from Sun and NeXT systems (1992-2-29)

* Tim Berners-Lee's WWW Browser Source Code for NeXT (1993-6-21)

* C64 Disk Images (1994-6-17)

thought_alarm··on Safari 18 can automatically transition users to passkeys [video]
From the perspective of the security experts who designed the system, it's a feature and a requirement.
thought_alarm··on Safari 18 can automatically transition users to passkeys [video]
The inability to move them is a feature, not a bug. If you can't move them you can't accidentally give them to the wrong person.

A passkey only authenticates a device (or group of devices). All passkey providers must provide secondary methods for validating the identity of their users so that additional passkeys can be issued when a device is lost.

But if that secondary validation is garbage then the passkey is also garbage, but that problem is not unique to passkeys. (Strong passwords have the same problem, they're only as strong as the reset mechanism).

thought_alarm··on Steve Albini has died
This news hits like a ton of bricks.

I can't think of another single person more influential and important to my own musical journey than Steve Albini. Guys like him are supposed to live to a ripe old age telling stories. It's just a horrible loss.

thought_alarm··on Ask HN: How many of you Apple developers still use Objective C?
I'm comfortable in C, C++, ObjC, and Swift. I like Swift, but I'm not going to contort myself to use it exclusively.

I have some stuff that has zero Swift and likely never will. Most other things are a mix.

If I'm writing any ObjC code in a new app today it's probably because either I'm working with some funky low-level API designed for C, my Swift code triggered some kind of compiler bug, or I got pissed off at the way Swift mangles the AppKit or UIKit APIs. Otherwise, I'm probably using Swift for most other things.

thought_alarm··on EU to hit Apple with first ever fine in €500M penalty over music streaming
Microsoft gave discounts on Windows licenses to companies that agreed to stop purchasing Netscape client and server software, thereby choking off Netscape revenue streams. It forced Netscape to sell to AOL.

Microsoft controlled 95% of the personal computer market, and they abused that position to put a competitor out of business because that competitor was a threat to their monopoly.

How does that compare to Apple Music?

thought_alarm··on Show HN: Apple II clock using interrupts from physical pendulum clock
The problem with the original firmware was that its interrupt handler used a zero-page location to store the accumulator. AppleSoft BASIC uses the same zero-page location for its own use, which makes BASIC incompatible with interrupts.

Another problem was with in the original Apple IIe. Its firmware interrupt handler was not updated to handle the new auxiliary memory and 80-column video configurations.

ProDOS provided proper support for interrupts, even on older Apple IIs (needed for mouse-based GUI apps and realtime clocks), and the firmware was eventually updated in the IIc and Enhanced IIe.

thought_alarm··on The History of Windows NT 3.1
NT wasn't ready for general consumers until XP in 2001. It took Apple a similarly long time to whip NextStep OS into shape.
thought_alarm··on Eighty Shades of Option Key
The switch symbol dates back to the very first international Lisa keyboards from 1983. They needed a language-independent symbol for the "Option" key in 1983, that's what someone chose, and it stuck.

Some other keyboard trivia:

- The 1983 Lisa used the Apple logo for its command key. The 1984 Mac used the cloverleaf symbol instead because Steve Jobs didn't like seeing so many Apple Logos in the main menus.

- The command key has been around since 1983, but is was never labelled "Command" on the US-English keyboard, nor was that key referred to as "Command" in the documentation. It just lore that this strange cloverleaf key was called "Command", and passed down through oral tradition. Apple finally labelled the key in the late 2000s.

- Apple has been very conservative about its keyboard layouts and symbols. The original Mac and Lisa had separate Enter and Return keys. The separate "Enter" key survived will into the 2000s iBook and Powerbook keyboards. It was finally removed with the MacBook in 2006.

- Likewise, the Apple Logo was added to the command key in 1986, for compatibility with the Apple II. It wasn't removed until the late 2000s.

- The Apple Extended Keyboard from 1987 was Apple's first keyboard to use a PC-style 104 key layout. This keyboard includes all of the PC-specific text such as Alt, Scroll Lock, Print Screen, etc. This is how the Option key came to be knows as "Alt" on non-US keyboards.

thought_alarm··on Is Design Dead? (2004)
Everybody's dropping C++ and learning Ruby.
thought_alarm··on Appler: Apple ][ emulator for IBM PC, written in 8088 assembly
Yes, that's right. This page has more info: https://nerdlypleasures.blogspot.com/2021/10/apple-ii-compos...

The PAL color circuit was initially an expansion card for the Apple II+ in 1979. The same circuit was built-in to the later Apple IIe and IIc models.

A novel part of the design is that the TCA650 is actually a PAL decoder chip that is meant to split a composite video signal into YPbPr components. The Apple II drives the TCA650 in reverse to generate the composite signal.

thought_alarm··on Appler: Apple ][ emulator for IBM PC, written in 8088 assembly
> Might not actually be RGB, did not look at the schematic. But having RGB before modulating into NTSC's color difference signals is not uncommon

The standard NTSC Apple II does not generate color this way, but the European PAL models do.

The native Apple II video signal is 560x192 1-bit monochrome pixels. The PAL video circuit converts video signal into a digital stream of color pixels, 4 bits per pixel. It then converts the digital pixels into analog YPbPr signals by attaching various resistors to each of the 4 bits. The YPbPr signals are then fed into a PAL encoder chip.

Presumably, the original authors used these YPbPr resistor values to determine the colors sent to their Bulgarian PAL/SECAM encoder.

This is a schematic of the PAL color encoder for the Apple IIe: https://imgur.com/CQH7vNS

1. The native monochrome video signal is SEROUT in the top-left of the schematic. It is fed into the LS164 shift register.

2. The LS175 buffer captures each 4-bit color pixel from the shift register.

3. The output of the LS175 is then fed through a various resistors to generate the YPbPr signal which are fed into the TCA650 PAL encoder.

thought_alarm··on Apple I operation manual (1976) [pdf]
64K of random access memory, plus 1K of linear access (shift register) memory.

The 1K shift register was used as the 40x24 screen buffer. This is the biggest limitation of that machine; you can't modify the screen directly, you can only push characters on to the end like a serial terminal.

https://www.righto.com/2022/04/inside-apple-1s-shift-registe...

thought_alarm··on Atari 2600 hardware design: Making something out of almost nothing
I haven't read _Racing the Beam_, but the impression I get is that while the 2600 looks crazy, it actually wouldn't be that difficult or insane to write a graphics kernel to generate the screen layout you need. It's just a matter of keeping track of what line you're on and feeding in the correct data. It seems tedious, but that's what computers are for.

Once the graphics kernel is written, it just a matter of playing with the data that's fed into it.

The real challenge, it seems, it simply that there are so few cycles left over to implement the actual game logic.

thought_alarm··on When is a PC not a PC? The PC-98
The TI-PC was released around the same time that Compaq was ushering in the era of the 100%-compatible PC clone.

Compaq, of course, created the first 100% compatible clean-room implementation of the BIOS, modified MS-DOS to work with it, ran an extensive compatibility lab to ensure existing PC software worked correctly with their BIOS/MS-DOS combo, and gave their changes back to Mircosoft to encourage the growth of a standardized platform.

Unsurprisingly, Compaq was founded by ex-TI engineers who became disillusioned with the TI's management.

thought_alarm··on Ventura Issues
OS X 10.7 (Lion) was the first post-iPhone version of MacOS, released in late 2011.

It was a bumpy release and it's not remembered fondly, but it introduced a number of fundamental features that modern iOS/Mac users depend on, like iCloud.

The previous version from 2009, OS X 10.6, was essentially a maintenance/refinement release with few new features while the rest of Apple was heavily focused on launching the iPhone and the App Store. Many people consider 10.6 to be the strongest OS X release, but it feels positively retro by today's standards.

thought_alarm··on Xcode 14 unintentionally increases app size
Seems to be a Swift problem; an oversight with the default Xcode settings, perhaps?

I tried running `strip -rSTx` on an ad-hoc binary that contained only C/C++/ObjC code (no Swift) and it had no effect.

It does have an effect on binaries with Swift code.

thought_alarm··on An Apple II Tale
For those who aren't familiar with this particular chapter in Apple II history:

- "Copy-2-Plus" was the ubiquitous disk copier/disk utility software for Apple II computers in the mid to late 80s. The makers of Copy-2-Plus, Central Point Software, had a distribution deal with VTech, makers of a popular legal Apple II clone, the "Laser 128".

- The Laser 128 was a legal clone because because VTech provided a clean-room implementation of the Apple II firmware that was, for the most part, not super buggy. They also legally licensed Microsoft BASIC. The Laser became very popular in the late 80s as VTech was able to undercut Apple's pricing while extending the hardware in ways that Apple was unwilling to do.

- At some point in the late 80s, the source code to Copy-2-Plus went missing. In order to keep the lights on, Central Point Software had to re-implement their premier product from scratch.

- In the early 90s, a dead hard drive shows up in dumpster of a hardware recycler. This hard drive apparently contained a copy of the Copy-2-Plus source code that went missing in the late 80s, as well as the code for VTech's Laser 128 firmware and Microsoft BASIC.

- By fluke, a worker at this recycler happens to notice something about this dead hard drive, fixes it, and discovers all of this missing and/or notable Apple II source code.

thought_alarm··on Cpm65: CP/M for the 6502
Building it on top of ProDOS might be fairly doable.

ProDOS provides an API for block-based file I/O that's fairly simple and supports multiple different drive types. On a 128k system you'd get a 64k RAM disk for free. It might fit nicely with the current code.

And ProDOS already lives in the bank-switched Language Card area, so there would be good chunk of main RAM to work with, a little under 46K from $0800 to $BF00.

thought_alarm··on Xerox PARC – Office Alto Commercial (1979) [video]
The lesson of Xerox PARC is this: Even if you're 10 years ahead of everyone technologically, it's still impossible to predict how the market will unfold.

The arrival of Visicalc transformed the toy personal computers into legitimate business tools and set Apple on its course for what would be the largest IPO in US history up to that point. No one saw it coming until it happened.

Once it happened, the Xerox brass in New York question how they missed it, and start to demand a return on the money they've been pouring into PARC. This is what led them to seek a partnership with Apple and the infamous Alto demos for Steve Jobs.

Meanwhile, the PARC folks start to realize that the rest of this now exponentially expanding industry is going to catch up to what they're doing faster than they can scale down their stuff into a commercially viable product.

Xerox takes a huge swing with the Xerox Star. It's a market failure for a number of reasons. IBM takes a little swing with the PC, and it's a huge success, but they don't control the software. The PARC folks leave to join the rest of the industry, taking what they learned with them.

thought_alarm··on Ask HN: Xcode users – how do you make it more usable?
This is great advice for people who don't know how computers work.
thought_alarm··on YouTubePluginReplacement.cpp: YouTube-specific code in WebKit
A-list apps have always received special treatment.

MacOS and Windows are both full of app-specific hacks to ensure that misbehaving but popular apps continue to work between system versions.

thought_alarm··on YouTubeDrive: Store files as YouTube videos
That's how digital audio was originally recorded to tape back in the 1970s and 80s: encode the data into a broadcast video signal and record it using a VCR.

In the age of $5000 10 MB hard drives, this was the only sensible way to work with the 600+ MB of data needed to master a compact disc.

That's also where the ubiquitous 44.1 kHz sample rate comes from. It was the fastest data rate could be reliably encoded into both NTSC and PAL broadcast signals. (For NTSC: 3 samples per scan line, 245 scan lines per frame, 60 frames per second = 44100 samples per second.)

thought_alarm··on The 0.5 MB of nothing in all Apple Music files (2020)
I always edit the genre so that the tracks work correctly with my various different smart playlists. In rare instances I'll also need to tweak the artist name to fit with the existing tracks in my library.

Sometimes the album or track names have extra info that I don't care about and will delete.

And TV show metadata is usually a mess and needs quite a bit of editing.

← PreviousPage 2 of 28Next →