HNHacker News
TopNewBestAskShowJobs

simscitizen

417 karma · joined January 14, 2013

submissionscomments
simscitizen··on Gmail and Yahoo’s 2024 inbox protections and what they mean for email programs
Mandatory DMARC basically breaks all e-mail forwarding services (SPF doesn't survive forwarding due to modification of Return-Path). I think ARC/RFC8617 is supposed to be the fix for that, but it's not even standardized yet. This seems like a rather big issue?
simscitizen··on Meta pays £149M to break London office lease
Probably consolidating their London office space. The main UK office is actually at Rathbone.
simscitizen··on macOS Sonoma is available today
Hm I just checked again. I appear to be using:

- 1Password 7 desktop app

- 1Password 7 Safari extension, which seems to work fine (or at least the same way it always worked)

- The latest Chrome extension, which I believe does everything in the browser

So I don't know how well 1Password 7 works with Chrome.

simscitizen··on macOS Sonoma is available today
1Password 7 works fine for me on Sonoma.
simscitizen··on Math for kids outside of the Calculus Sequence
I ran into this issue. I took Calculus BC as a sophomore in high school and then ran out of math classes to take. So I basically didn't do math for two years until I took classes in college. By then my math skills had definitely atrophied and it definitely showed in various math and engineering courses that I took in college.
simscitizen··on I do not use a debugger (2016)
While we're appealing to authority, we should probably note that John Carmack has a pretty different opinion about debuggers: https://www.youtube.com/watch?v=tzr7hRXcwkw
simscitizen··on macOS command-line tools you might not know about
dtrace and the DTrace Toolkit scripts are also quite useful for understanding and debugging things, e.g. `opensnoop -a` to print the result of all open syscalls on the system.
simscitizen··on Oracle reclaiming some free tier compute instances
Looks like Oracle is going to shut down some compute instances for free tier users. From the announcement email:

"Your account has been identified as having one or more compute instances that have been idle for the past 7 days. These idle instances will be stopped 7 days from now. If your idle Always Free compute instance is stopped, you can restart it as long as the associated compute shape is available in your region. You can keep idle compute instances from being stopped by converting your account to Pay As You Go (PAYG). With PAYG, you will not be charged as long as your usage for all OCI resources remains within the Always Free limits."

simscitizen··on Build your own fast, persistent KV store
Depends on whether the author is pedantic about the use of GB vs. GiB.
simscitizen··on Setuid in Unix created to enable a game
No that's not the insane part. The insane part is that this is the only patent that came out of entire Research UNIX project [1].

[1] See the answer to question 25 on Rob Pike's blog: https://commandcenter.blogspot.com/2020/01/unix-quiz-answers....

simscitizen··on Go and SQLite in the Cloud
It doesn't strike me as the best language for embedding SQLite given the need to constantly cross the Cgo boundary. But I'm sure it still works fine.
simscitizen··on DWARF-Based Stack Walking Using eBPF
Frame pointers are enabled by default on macOS and iOS and I can't understand why they aren't enabled by default elsewhere. It just makes it so much easier to debug and profile things.

See for instance Apple's ARM64 calling convention: https://developer.apple.com/documentation/xcode/writing-arm6...

"The frame pointer register (x29) must always address a valid frame record. Some functions — such as leaf functions or tail calls — may opt not to create an entry in this list. As a result, stack traces are always meaningful, even without debug information."

simscitizen··on nvALT 2 (2021)
Lots of note taking apps mentioned here. FSNotes (for Mac and iOS) is another alternative that works pretty well for keeping plain-text Markdown notes.
simscitizen··on We're moving on from Firebase
> We plan to do more research on scalability, since column-based databases can’t grow as big as their NoSQL counterparts.

This one sentence makes me question this firm's expertise. "Column-based database" has a meaning, and Postgres definitely isn't one of them.

simscitizen··on Wails v2 Released
Are there ways to create cross-GC cycles with this framework (e.g. JS object pointing to Go object pointing back to a JS object), and if so, how does the framework handle this?
simscitizen··on iOS VPNs have leaked traffic for years, researcher claims
iOS has supported tcpdump for end users since...I can't remember, maybe iOS 4?

https://developer.apple.com/documentation/network/recording_...

simscitizen··on Let websites framebust out of native apps
This is an incorrect understanding of how web views are implemented.

For SFSafariViewController, all the API allows you to do is essentially to present a full screen view that loads a particular URL. You can also register for callbacks for when a user dismisses the view or clicks the action button. There are no APIs that allow you to inject JS or read website data out of the view. The actual browsing logic powering the view is implemented out of process and you cannot modify the network requests that the view makes. If all your app wants to do is to display an in-app browser view, this is definitely the recommended path for security reasons.

For WKWebView, again most of the browsing and networking logic is handled out of process. However, because the API is designed to allow you to do pretty much anything you'd want to do with a web view up to and including implementing an entire browser, you get more power over what the view does. So you can do things like inject JS into the view.

However, it would be possible for the platform vendor to restrict use of the web view such that only certain more powerful APIs can be used by browser-style apps, while other less sensitive APIs can be used by all apps. This is because pretty much all of the APIs involve an IPC from the embedding process (e.g. an app under third party control) to another process that actually powers the view under the control of the browser engine (usually the content/renderer process). The content process can check that the embedding process has the proper permissions for each operation.

There is already precedence for limiting the power of web views. See https://webkit.org/blog/10882/app-bound-domains/ for instance, which allows a responsible app owner to allow their embedded web view to only load requests from particular domains.

simscitizen··on Let websites framebust out of native apps
It looks like Twitter is using SFSafariViewController for their in-app browser. This is the system-recommended way of creating an in-app browser. It prevents the embedding app (Twitter in this case) from reading website data and injecting JavaScript into the view. You can also break out of the session into Safari pretty trivially by hitting the Safari button in the lower right corner.

Apps that implement a custom web browser using WKWebView (e.g. IG) are much worse and can do those nefarious things.

simscitizen··on Why Can't Database Tables Index Themselves? (2006)
So basically I realize there are ways to generate index suggestions (or even generate indices automatically) by observing query patterns, keeping stats on cardinality of various columns, etc. We actually did that at Parse; we would observe query patterns and generate indices (including compound indices) at runtime that seemed to benefit the application's query pattern. There wasn't an option for this, it was just enabled by default.

However we ran into the problem that users still made many queries which were essentially impossible to index. On many of the DB nodes, the resources used by these unindexable queries dominated the resources used by all of the easily indexed queries.

I left the experience thinking that there really wasn't any good solution to the problem for general users other than making the query language force users to only make queries that can be obviously satisfied by common index types.

simscitizen··on Why Can't Database Tables Index Themselves? (2006)
The 42 was meant to be a placeholder in the examples. Imagine it is a ? and bound at runtime instead.

In the second query, a composite index over (x, y) basically does the same job as an index over just x. The general query plan is to iterate over all values > x and keep the 10 smallest values around in memory to satisfy the ORDER BY.

The point is that there are many queries that seem deceptively simple but are actually extremely hard or even impossible to automatically index. Those queries which result in table scans, large index scans, and large sorts can easily dominate all the other queries which are easily indexable in terms of resource usage.

simscitizen··on Why Can't Database Tables Index Themselves? (2006)
The obvious answer is that there are certain queries that cannot be made fast with normal indices. What index would you suggest for these queries?

  SELECT * FROM Foo WHERE Bar != 42;
  SELECT * FROM Baz WHERE x > 42 ORDER BY y DESC LIMIT 10
The usual solution is to constrain the query language in some way to prevent users from issuing queries that can't be satisfied efficiently using an index. If you are disciplined enough to do that then you can probably pretty easily suggest (or even automatically generate) indices for your users based on query patterns.
simscitizen··on Raindrop: All-in-One Bookmark Manager
I use Raindrop but really wish they had support for share extensions in their macOS app. That way I could get rid of their toolbar button and just use the share button instead on Safari.
simscitizen··on Ask HN: Pros and cons of V8 isolates?
We did pretty much the same thing as Cloudflare does for workers in the Parse Cloud Code backend many years ago--when possible, we ran multiple V8 isolates in the same OS process. There are certain issues we ran into:

* Security-wise, isolates aren't really meant to isolate untrusted code. That's certainly the way Chrome treats them, and you would expect that they would know best. For instance, if you go to a single webpage in Chrome that has N different iframes from different origins, you will get N different Chrome renderer processes, each of which contain V8 isolates to run scripts from those origins.

* Isolation is not perfect for resources either. For instance, one big issue we had when running multiple isolates in one process is that one isolate could OOM and take down the all the isolates in the process. This was because there were certain paths in V8 which basically handled hitting the heap limit by trying to GC synchronously N times, and if that failed to release enough space, V8 would just abort the whole process. Maybe V8 has been rearchitected so that this no longer occurs.

Basically, the isolation between V8 isolates is pretty weak compared to the isolation you get between similar entities in other VMs (e.g. Erlang processes in the BEAM VM). And it's also very weak when compared to the isolation you get from a true OS process.

simscitizen··on Chris Lattner on garbage collection vs. Automatic Reference Counting (2017)
Maybe start with a good book or two to see if you're actually interested. Crafting Interpreters (https://craftinginterpreters.com/contents.html) might be a good intro--yes, it's about interpreters, but there's a lot of overlap between creating an interpreter and creating a compiler.
simscitizen··on Ask HN: Best hosted alternative to Google Workspace for email?
One way of getting consumer Gmail to work with a custom domain almost exactly like the way legacy Gsuite worked is to do something like this:

1. Tell your registrar to forward e-mails from john@doe.com to john.doe@gmail.com. Many registrars offer this service for free.

2. Set up john@doe.com as an alternate sender in Gmail (Settings > Accounts and Import > Send mail as).

For (2), you can use smtp.gmail.com to send mail on behalf of your domain. Example setup instructions: https://support.google.com/domains/answer/9437157?hl=en. You might also want to make sure "treat as an alias" is unchecked, so `john@doe.com` shows up as the From address (as opposed to `john.doe@gmail.com on behalf of john@doe.com`). You probably also want to edit your spf record for your domain to allow Google's mail servers to send mail on behalf of your domain, e.g. "v=spf1 include:_spf.google.com -all".

So this mostly all works...but the problem is that there doesn't seem to be any way of setting up the proper DKIM and DMARC records for your domain when using smtp.gmail.com. So I'm wary of deliverability issues with this setup. I already found one other user complaining about this: https://serverfault.com/questions/1092392/spf-dkim-dmarc-for....

Does anyone have any ideas here? Are there any reputable SMTP only hosts that cater to individual users? You could use Amazon SES but it seems like it might be a bad choice for individuals, as those SES hosts are generally used for bulk e-mail and you might get stuck sending mail on an IP with a bad reputation.

simscitizen··on Bell Labs' Plan 9 research project looks to tomorrow (1990)
This comes up constantly and is pretty easily refuted by opening pretty much any app on an Android or iOS phone and observing just how many pages of the system shared libraries are touched by even the most trivial apps. You can do this by e.g. purging the FS cache, disabling readahead, launching an app, and then observing how many code pages are resident.

All of that code would have to be brought into app binary itself, making mobile apps even larger in code size than they already are. Dead code elimination could eliminate some of that bloat, but I doubt it'd eliminate much of it, given that we're only measuring resident pages to begin with.

Only allowing static linking might make sense on servers (it certainly makes deployment a lot easier). But it wouldn't work on mobile devices without significantly changing the way mobile apps and OSes are architected.

simscitizen··on Ask HN: State of PHP at Facebook?
The PHP to C++ compiler hasn't been used for something on the order of 10 years.

At least as of two years ago, pretty much entire web-facing portion of Facebook was written in Hack (which descends from PHP, but has what feels like every syntax feature you could stuff into an Algol-like language). Hack is run on HHVM, which is a bytecode VM that can JIT compile to machine code.

simscitizen··on Chrome zero-day released on GitHub – fixed on V8 but still works on latest
I would be interested to hear a response to your V8 memory limit question. Years before Cloudflare workers we isolated Parse Cloud Code workers in exactly the same way, at least at the beginning (multiple V8 isolates in the same process). One of the big issues was not really being able to set a true memory limit in V8. There was a flag, but it was pretty advisory--there were still codepaths that just tried to GC multiple times and then abort if not enough space was freed up. Not ideal when running multiple tenants in the same process.
simscitizen··on Distribution of JVM Desktop Applications
Try running that analysis for iOS apps against the dyld shared cache or for Android apps against the Android system frameworks.
simscitizen··on CS193p: Developing Apps for iOS
It's an elective course.
← PreviousPage 2 of 4Next →