HN user

mofle

1,217 karma

[ my public key: https://keybase.io/sindresorhus; my proof: https://keybase.io/sindresorhus/sigs/f2efA_W7FvEyw55qXGSw6k9Oj3heHIAmU0gwhaGhW9I ]

Posts152
Comments146
View on HN
sindresorhus.com 8mo ago

Show HN: Menu Bar World Clocks

mofle
2pts0
sindresorhus.com 9mo ago

Show HN: Drag to AirDrop

mofle
3pts3
github.com 9mo ago

Show HN: CSS Extras

mofle
104pts63
sindresorhus.com 11mo ago

Show HN: Run Shortcuts

mofle
1pts0
sindresorhus.com 11mo ago

The Micro-Benchmark Fallacy

mofle
2pts0
github.com 1y ago

Show HN: Simple Color Palette

mofle
2pts0
sindresorhus.com 1y ago

Show HN: Switch Default Browser

mofle
1pts0
sindresorhus.com 1y ago

Show HN: Supercharge Your Mac

mofle
27pts20
sindresorhus.com 1y ago

The Micro-Benchmark Fallacy

mofle
1pts0
sindresorhus.com 2y ago

Show HN: Customize the gap between macOS menu bar items

mofle
2pts0
sindresorhus.com 2y ago

Paste as Plain Text by Default

mofle
2pts4
apps.apple.com 2y ago

Show HN: Run Stable Diffusion Directly on iPhone

mofle
162pts42
sindresorhus.com 2y ago

Show HN: Second Menu Bar Clock

mofle
2pts1
github.com 2y ago

Show HN: Supercharge Shortcuts

mofle
4pts0
twitter.com 2y ago

Modernizing DOM APIs

mofle
3pts0
chat.openai.com 2y ago

Show HN: SamoyedGPT

mofle
3pts0
twitter.com 2y ago

Show HN: SindreGPT

mofle
1pts0
apps.apple.com 2y ago

Show HN: Get stuff done by focusing on one task at a time

mofle
5pts6
apps.apple.com 2y ago

Sketch is back on the Mac App Store

mofle
3pts1
old.reddit.com 2y ago

Swift Is the Future of AI

mofle
6pts0
sindresorhus.com 2y ago

Show HN: One Task – A single task on your Mac desktop

mofle
2pts0
sindresorhus.com 2y ago

Show HN: Use ChatGPT API from Shortcuts

mofle
2pts0
sindresorhus.com 2y ago

Show HN: Menu Bar Calendar on macOS

mofle
107pts83
sindresorhus.com 3y ago

Show HN: Day Progress

mofle
3pts0
sindresorhus.com 3y ago

Empathy in Open Source

mofle
2pts0
twitter.com 3y ago

App Icons Generated with Midjourney

mofle
1pts0
sindresorhus.com 3y ago

Show HN: Instant access to your Mac's camera

mofle
1pts0
twitter.com 3y ago

Show HN: Use ChatGPT from the Shortcuts App

mofle
2pts0
github.com 3y ago

Show HN: Awesome OpenAI Whisper List

mofle
7pts0
github.com 3y ago

Everything ChatGPT

mofle
3pts0

Why not just use the Paste and Match Style menu item or ⌥⇧⌘V?

- This app can make it the default behavior. - That menu item is not available in all apps. - The keyboard shortcut is hard to remember and type. - In some apps, like Chrome, the keyboard shortcut is different. - This app can exclude certain apps, preserve links, and also remove tracking parameters from URLs.

TypeScript had years to prepare for ESM, but they did not. Same with Jest. ESM was developed in the open and anyone could participate, including the TypeScript team. You are talking like ESM just happened overnight. It had been in development for 10 years.

Node.js released initial ESM support [1] in Node.js 12.17 in May 2020, 2 years later (!), TypeScript finally added support for ESM [2].

Here's a straight forward guide on how to use TypeScript with ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3...

[1] https://nodejs.org/en/blog/release/v12.17.0

[2] https://devblogs.microsoft.com/typescript/announcing-typescr...

You are reading the wrong spec. That is `Array#slice`, not `TypedArray#slice`.

Correct spec: https://tc39.es/ecma262/multipage/indexed-collections.html#s...

Steps 14.g.i to 14.g.ix detail the transfer of data from the original TypedArray (O) to the new TypedArray (A). It involves reading values from the original and writing them to the new array's buffer, effectively duplicating the data segment. The process ensures both arrays are distinct with separate memory spaces.

No one is forcing you to use it. You can choose to reimplement the code yourself or you can choose to copy-paste the code. I made the package for my own convenience as I need to transition a lot of packages from `Buffer` and I don't want to maintain duplicates of the code in every package. Others are free to use the package or not.

Completely different behavior is not an implementation detail.

Changing method behavior in subclasses is part of inheritance, but it shouldn't confuse or mislead. In the case of Buffer and Uint8Array, the altered `.slice()` functionality isn't a mere implementation detail; it's a significant deviation. This inconsistency can lead to unexpected bugs, especially for those who assume similar behavior based on the inheritance hierarchy. It's crucial for reliability that such fundamental behaviors remain predictable across subclasses.

- Blob: Immutable raw data container with a size and MIME type, not directly readable.

- File: Like a Blob, but with additional file-specific properties (e.g., filename).

- ArrayBuffer: Fixed-length raw binary data in JavaScript, not directly accessible.

- Uint8Array: Interface for reading/writing binary data in ArrayBuffer, showing them as 8-bit unsigned integers.

- Buffer: Readable/writable raw binary data container in Node.js (subclass of Uint8Array)

I can't think of many use cases in JS land were Uint8Array, Uint16Array, Uint32Array, Int8Array would be absolutely necessary.

Buffer is a subclass of Uint8Array.

`Uint8Array.prototype.isPrototypeOf` and `instanceof Uint8Array` do not work across realms (frames, Node.js VM, etc).

Feel free to copy-paste the function to your own code base if you don't want the dependency:

``` const objectToString = Object.prototype.toString;

export function isUint8Array(value) { return value && objectToString.call(value) === '[object Uint8Array]'; } ```

Uint8Array has this too, but it's called `.subarray()`. The problem is that Buffer is a subclass of Uint8Array, but changes the behavior of the `.slice()` method.

In the next update, there will be a "Paste Tasks" button. So you could then select some tasks in Reminders, copy, and then simply paste them into One Task.

Even if I wanted to integrate with Reminders, it wouldn't work that well. The app would have to be running to synchronoize with Reminders. This means the widget would not update if you made changes in the Reminders app and One Task was not running.

There is simply not enough demand to justify spending double the time on publishing every update (one build for App Store and one build for Homebrew). There are very few people that use Homebrew and cannot use the App Store. The non-App Store version is intended for users on locked down corporate computers.

Until recently, all by hand in Photoshop and Sketch. Now I use AI generation as an initial base in icons, but still tweak a lot. This icon was fully made in Sketch though.

macOS hides menu items if they don't fit and nothing can be behind the notch. Apps have no control over this. The app has a setting for maximum length. You could also move the menu item closer to the right to make sure it's not hidden when there's less space in the menu bar.