Archive for May 25, 2023

Thursday, May 25, 2023

Kaleidoscope 4

Leitmotif:

  • Syntax coloring, with multiple built-in themes.
  • Transform any comparison into a merge document that can be edited inline.
  • Text filters to clean up diffs by removing irrelevant data, such as time stamps, object addresses and unique identifiers.
  • Kaleidoscope Prism, a new helper app in the menu bar to quickly launch comparisons even if Kaleidoscope is not running.
  • Debugger integration for Python developers.
  • File properties show metadata, including size, file type, dates, and encoding.
  • A welcome window that speeds up the processes of creating new comparisons or finding recent ones.

The syntax coloring is nice. The most interesting feature for me is the text filters, which have a nifty interface that reminds me of BBEdit pattern playgrounds. I expect that they will prove useful when comparing Xcode debug or test output.

It’s not available from the Mac App Store.

Previously:

Update (2023-05-30): Florian Albrecht:

While the new version is very much a continuation of what we started 2.5 years ago with Kaleidoscope 3, we modernized many aspects of the app. This screenshot of a simple text comparison shows off some of the changes[…]

Update (2023-06-01): Florian Albrecht:

Kaleidoscope 4.0 comes with 7 predefined [text] filters. Most of them are designed for immediate real-world use. To illustrate how to use them, I am just going to run a simple and unfinished SwiftUI app to create license files from Xcode, twice, and copy the log output into Kaleidoscope.

[…]

While this result is not hard to understand, it contains a lot of “noise”, i.e. data that is not relevant to finding important differences. Let’s go ahead and clean this up a little.

Update (2023-07-25): Florian Albrecht:

The small square window in Kaleidoscope Prism is a great new target for dropping files and content. In addition to being a convenient visible drop area, the window has a button in the top right that provides another way to access the Kaleidoscope Prism menu. This has the benefit of making the menu available even when the menubar item is set to toggle the window (more about that below).

[…]

In order to be useful as a drop target, the window needs to be visible at the right moment. So let’s talk about how to configure this to fit your needs.

[…]

While it’s a rather tiny drop target, you can also drop content onto the Kaleidoscope Prism menu bar icon itself. Initially, it may feel a little odd to drop stuff onto the menu bar, but it is extremely convenient and space-saving.

Viewing Large Text Files

I recently needed to view and search a 20 GB log file and realized that I don’t know of any Mac text editors that are disk-based, i.e. that don’t load the entire file into RAM. Wikipedia has a list of editors with Large File Support, but it seems to be more about not having artificial RAM limits rather than supporting files that don’t fit in memory.

What I ended up doing in the moment, because I knew it would work, was to use split to break the file into smaller chunks. I then did a multi-file search with BBEdit.

I considered Hex Fiend, which is disk-based. It’s fast and has a find feature, but it’s less than ideal for this use case because it doesn’t support UTF-8 or show line breaks.

For short tasks in the future, I will probably use less, because it can directly open and search large UTF-8 files. But for longer tasks I don’t want to be working in Terminal.

Disk Utility in macOS 13.4

Howard Oakley:

Yet for those few years, Disk Utility’s First Aid feature has frequently failed to perform checks on APFS volumes, reporting various errors that are the result not of file system problems but bugs in Disk Utility. These boil down to the fact that fsck_apfs requires the volume to be unmounted, and Disk Utility has been unable to do that reliably. This has left users having to manually unmount volumes before using the First Aid tool.

[…]

Apple has at long last responded, and Disk Utility in Ventura 13.4 reaches new heights in version 22.6. I’m delighted to report that you can now check and repair almost every APFS volume you might wish. I’ve tried it on a wide range, including Time Machine backups, and on both internal and external disks.

[…]

What then appears to happen is that, because that Data volume is joined to the System volume using firmlinks, and mounted at a different path, Disk Utility can’t unmount the Data volume alone, so fails with the original error. The workaround is to select the Data volume, click the Unmount tool, which will then unmount both System and Data volumes, and you can then run First Aid without error.

Previously: