HNHacker News
TopNewBestAskShowJobs

jayrhynas

353 karma · joined February 8, 2013

[ my public key: https://keybase.io/jayrhynas; my proof: https://keybase.io/jayrhynas/sigs/9TnNcLmaXnv01lsuzwO0Ptol003uOfs3HXF3XbTh2LE ]
submissionscomments
jayrhynas··on Show HN: Run – a CLI universal code runner I built while learning Rust
It's definitely a blurry line, this `run` tool invokes your Swift file with `swift file.swift` which runs it in immediate mode. Technically it is compiling your code to memory and and immediately executing it, but is it that different from JIT in Python or Node scripting?
jayrhynas··on Meta Ray-Ban Display
CTRL-Labs themselves acquired the wristband tech from North/Thalmic, who pivoted into smart glasses for a few years before being acquired by Google.

> In an interesting twist, CTRL-Labs purchased a series of patents earlier this year around the Myo armband, a gesture and motion control device developed by North, formerly known as Thalmic Labs. The Myo armband measured electromyography, or EEG, to translate muscle activity into gesture-related software inputs, but North moved on from the product and now makes a stylish pair of AR glasses known as Focals. It now appears the technology North developed may in some way make its way into a Focals competitor by way of CTRL-Labs.

jayrhynas··on Type-safe and user-friendly error handling in Swift 6
I don't really see what advantage typed throws are giving him in this article, since he just wraps arbitrary errors and then uses his lookup function - isn't that basically the same as `catch let error as DecodingError`?
jayrhynas··on What are OKLCH colors?
I was going to point that out too until I realized that the author updated the article based on the parent comment!

https://news.ycombinator.com/item?id=45013291

jayrhynas··on New tool from curl creator – trurl – for URL parsing and manipulation
> We say "trurel". As if there was an 'e' between the r and l at the end.

From https://curl.se/trurl/

jayrhynas··on Hardcoded Folder Icons in macOS
I used to "collect" icon sets, even though I only ever used about 1% of them
jayrhynas··on Apple announces ‘upgrade’ to App Store pricing, adding 700 new price points
They introduced 15% for apps < $1M/year two years ago.
jayrhynas··on Ntfy.sh – Send push notifications to your phone via PUT/POST
It looks like you could add ntfy.sh as a backend for dschep/ntfy, but just imagine trying to document that!
jayrhynas··on Ntfy.sh – Send push notifications to your phone via PUT/POST
I don't think ntfy.sh does that, but are you talking about https://github.com/dschep/ntfy?
jayrhynas··on First look: adding type annotations to JavaScript
As far as I understand it, this is allowing TS types to be valid JS syntax that are just ignored by vanilla JS engines. So it is intentionally identical to TS, it just won’t have any affect on the execution of your code.
jayrhynas··on Facebook apologizes to users for Apple’s monstrous efforts to protect privacy
Not quite. If you offer 3rd party logins you must also offer SIWA, but if you only have email/password you don’t have to.

https://developer.apple.com/app-store/review/guidelines/#sig...

jayrhynas··on Kotlin 1.4
Swift calls it trailing closure syntax
jayrhynas··on Mac keyboard shortcuts
This doesn't work globally like the other shortcuts, but Ctrl+left/right will move the cursor to word boundaries in camelCasedWords, which is great for programming. I quickly tested it and it worked in Xcode and Sublime Text but not in TextEdit. (You also have to disable the system shortcuts for moving between spaces)
jayrhynas··on Gravity: An embeddable programming language without any external dependencies
Apparently they're "completely optional"[1] but they chose to use them in all the examples ¯\_(ツ)_/¯

[1]: https://marcobambini.github.io/gravity/#/syntax

jayrhynas··on Apple will host WWDC virtually, beginning June 22
> Developers are encouraged to download the Apple Developer app where additional WWDC20 program information — including keynote and Platforms State of the Union details, session and lab schedules...

Sounds like there's going to be some sort of interactive lab, I wonder what format it will be.

jayrhynas··on Zoom iOS app sends data to Facebook even if you don’t have a Facebook account
There are two identifiers: Identifier for Advertisers (IDFA) and Identifier for Vendors (IDFV).

IDFA is the same across all apps on a device. However, it can be reset by the user or disabled (in which case it returns all 0s). Also, apps have to disclose (to Apple) that they use the IDFA - not sure if that's visible to the user in the App Store anywhere.

IDFV is unique per vendor - that is, each app has a different ID, but two apps from the same developer will have the same ID. I believe this is also reset when resetting the device.

The FBSDK doesn't require developers to enable the IDFA, so the unique identifier in the phone home request is either the IDFV (effectively unique) or just a UUID that the FBSDK generates and stores on launch.

jayrhynas··on Little Snitch and the deprecation of kernel extensions
"we are working closely with Apple to fill the remaining gaps" - definitely sounds like it. I think Apple has made the right call tightening security around kernel extensions but I'm glad they're working with 3rd party developers (even if it's only big ones) to ensure the functionality is still there. They also mentioned the existing version will still work, it will just need to be explicitly enabled.
jayrhynas··on Swift Playgrounds for macOS
They recently released it on macOS (via a Catalyst port of the iPad app)
jayrhynas··on Swift Playgrounds for macOS
Quick note about your functional examples - there's already a built-in version of `take` called `prefix` available on all Sequence types.
jayrhynas··on Swift Crypto
I think the point he's trying to make is that the CK implementation of the APIs common to CK and SC may (or may not) make use of the secure enclave, and that's one reason to have different implementations.
jayrhynas··on Dropbox ignore file or folder in beta
This is kind of the opposite. With Selective Sync, the file exists on Dropbox.com and 0 or more client devices, and each device can choose whether or not to sync the file. The new ignore feature allows a file to exist on one device without being uploaded or synced to other devices.
jayrhynas··on The Unison language
This [1] seems to be the "head pointer", and I assume it would conflict when merging. In fact, would it not conflict on every merge even if unrelated code was changed, since it hashes on the value of the entire codebase?

Edit: After thinking some more, it wouldn't conflict on a file-level, since the file itself has a different name. But there would be now two files in the _head folder, and I assume the `ucm` tool would detect that and present the user with merging options?

[1]: https://git.io/Jvfen

jayrhynas··on Which answer in this list is the correct answer to this question? (2017)
I think it's A=5 D=1 G=2 O=0

102 x 51 = 5202

jayrhynas··on Stupid Unix Tricks
You can also hide all the desktop icons with a defaults setting:

    defaults write com.apple.finder CreateDesktop false
jayrhynas··on Stupid Unix Tricks
I just use ~/Developer - with tab completion it's not really any harder to type. (And on macOS ~/Developer automatically gets a unique icon in Finder)
jayrhynas··on Miller Columns
I know that some people still prefer a button, but cmd-up on your keyboard will go up a level in both Finder and in file dialogs.
jayrhynas··on CLI: Improved
You should be able to pass `--paging always`. The default `auto` will only page if the file contents is bigger than your screen.
jayrhynas··on Ancient “su – hostile” vulnerability in Debian 8 and 9
As far as I understand it:

A background subshell is started that waits 10 seconds and then runs a program with the input "id". That program uses ioctl to send characters to the current TTY.

Since the user exited back to the root shell before the program executed, the `id` command is typed and executed on the root shell.

jayrhynas··on Console.table()
CONsole, the noun, vs conSOLE, the verb (to comfort at a time of grief or disappointment)
jayrhynas··on Console.table()
That's due to a shorthand added in ES2015 that lets you construct an object where keys are equal to the name of the variable. So that's short for

    console.log({ a: a, b: b })
and then the console just prints out the new object.
Page 1 of 4Next →