News for hackers. Stuff that matters.

bywaterstreet

Re:Does Apple really log every app you run? A technical look on Sunday November 15, 2020 @05:56AM (#25100123)
Good write-up.

I write a lot of Go on my Mac at home. The first run is _always_ slow, but I've never measured it or bothered to find out why. This is a real "lightbulb moment" for me.

I just built a Go executable and timed it: 0.194 for the first, and ~0.018 for subsequent. I haven't signed code on Mac platforms before, so I figured I'd give it a go using the Apple code signing guide [0]. So, I created a self-signed certificate using Keychain, changed and built a Go project, signed the executable [1], and ran it: ~0.400 for the first run, and ~0.018 for subsequent. It... doubled? Will this happen on every first run still? Is there a way to exclude executables?

[0] https://developer.apple.com/library/archive/documentation/Se...

[1] codesign -s <cert_id> <path>

Re:Ask HN: Are you depressed? on Sunday November 15, 2020 @05:06AM (#25099820)
I used to do a commute of around 1.5 hours each way, every day, for years. This was justified by my (at the time) reasonable salary, and all the self-reflection and podcast listening I could do. This was foolish in hindsight (speaking personally of course, I have no doubt that some people enjoy their commute). I didn't appreciate this was 3 hours, every day, of the prime years of my life. I will never get that time back. And what's more is that I didn't factor this into my salary justification. I saw salary as compensation for my hours _in_ work: this is wrong. It's also your time getting there. That's the comparison you should make, which may make that local job more appealing.
That's pretty cool. How much is that? "Costa Coffee" (a UK chain) machines are in lots of petrol stations nowadays, but I'm not aware of any kind of subscription.
Re:Personal Data Warehouses: Reclaiming Your Data on Saturday November 14, 2020 @06:38AM (#25091675)
Great work, Simon, and a very interesting talk too. Off to read the linked Wolfram article: https://writings.stephenwolfram.com/2019/02/seeking-the-prod...
Re:Your Computer Isn't Yours on Friday November 13, 2020 @12:37PM (#25084973)
> It turns out that in the current version of the macOS, the OS sends to Apple a hash (unique identifier) of each and every program you run, when you run it.

Hang on, this only happens on first run of the binary, right? It caches the hash afterwards? This statement is incorrect unless Apple are sending logs to the server (i.e. of every cache hit). Can somebody confirm?

Re:Pyston v2: Faster Python on Wednesday October 28, 2020 @05:42PM (#24924448)
Go has nothing on Python in this regard. I write Go every day, and come from a Python background. I often describe Go as the strongly-typed, more performant version of Python. I say this mostly because my Go code isn't too dissimilar from my Python code (structure, naming, packages). But I still drop into Python if I want to do something quickly. I don't really know why. Maybe it's the Go tooling, e.g. unused variables cause compilation errors, so things like this slow me down. Or maybe it's because Python just offers _so_ much out of the box, e.g. all the data structures you'll ever need (list, set, dict, tuples), and all small things you take for granted (like writing "is a in list", which would require a function in Go). The REPL is Python's killer feature.
Re:We chose Java for our high-frequency trading application on Monday October 26, 2020 @04:51PM (#24901242)
Thanks for the ref. I'll bring this up the next time somebody questions my "let's clean up these flags in prod".