Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,278 karma · joined Nov 23, 2012 (14y ago) · 6,746 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 2y ago · link · parent

I'm really not a fan of TLA+'s tooling, but I do really love the temporal logic. I've always kinda wanted that stuff in other proving languages, but I don't know how possible it is.

Would it be actually possible to write something like an "a la carte temporal logic library" for other proving languages that could get you some of the confidence you can get from TLA+'s modeling?

(Aside: I have a TLA+ book, but it's notably missing really much in terms of exercises or anything. If anyone has any recommendations for a large set of exercises to play around in the space I'd love to hear about it!)

EDIT: turns out just searching for "temporal logic in X language" gets you papers, found this one paper for axiomatizing temporal logic that seems to be a good starting point for anyone looking at this [0]

[0]: https://lim.univ-reunion.fr/staff/fred/Enseignement/Verif-M2...

comment 2y ago · link · parent

I've had an idea for a while of a site... kinda like letterboxd, where you could log "learning paths" for textbooks and the like (for example to log what chapters you've gone through, exercises and the like).

I've built out some of it but would always get a bit lost in the weeds. I think there's a big challenge with self-learning in that you do kind of want feedback from people about whether you're going about some material the right way or not.

This sort of stuff looks fun though.

comment 2y ago · link · parent

So some of this stuff is "communicate with an external process", and I feel like many things in that space do the right thing (if only because if you don't it's immediately visible).

I have a lot of issues with "pure elisp" plugins though. Things where these plugins are doing a lot of string munging, and it's fast in testing because the tests aren't that big. But you can easily hit some edge case where suddenly you're looking for occurrences of `e` in Moby Dick so now each letter press takes a second (fortunately computers are still fast!)

If completion frameworks were async-by-default, at least that stuff wouldn't hang everything for me. At least that's my theory.

comment 2y ago · link · parent

Often the database structure that is amenable for running the app or billing system isn't the one that is ammenable for generating a graph of historical MRR over your company's lifetime (or future expected revenue!)

And when you get into cohort analysis, it gets a bit messier. Your cohort calculations might be cheap on one user but not across your entire system.

This is often just a question of some very simple data engineering. But you get queries that are "good enough" and "basically are right". So you use them. And they get slower and slower until they take like 10 minutes to run because you're calculating historical app usage data for your bespoke cohort. And then they start taking hours. And then they're just timing out constantly. And then you start fundraising and you do "MRR/ARR vs actual money in/out", and find weird discrepencies (yes you included one-time purchases. Or did you? And your rebates done through the stripe dashboard definitely were captured in your app database right?)

Oh and of course your top sales person has been giving people discount coupons but they were doing it in Stripe instead of in your bespoke system and you weren't properly flowing the data back into your system because of webhooks and now you realize that your MRR is 5% less than it actually is (and it's been like this for 2 years so now you have lied to investors consistently for 2 years).

Nothing is really hard, but it's too easy to get a "close enough" answer and the activation energy to doing this stuff right is just high enough to where people put it off for way too long.

comment 2y ago · link · parent

> Certain points like the fact that Emacs isn't multithreaded are thrown around by people who don't have the intuition that multithreading isn't the right thing for a lot of applications. The added complexity that multithreading would add to Emacs would seriously outweigh the usefulness it would provide. Emacs already has a decent process model, and having to deal with only a single shared state makes programs much cleaner.

I theoretically understand this but having to deal with company-mode providers that, when they start performing badly, start hanging everything is not fun!

Obviously thread-count and async-codestyle-ease are not the same thing, but given the world of LSPs and plugins that do I/O on the main thread (this is a big enough reason to have async interfaces that are actually used) it would be good to have some effort spent there

comment 2y ago · link · parent

If you thought "I had to publish any code changes I make to my object storage server" was bad, wait until you find out that you're not even allowed to make code changes to S3 servers!

Obviously the fully-managed nature of S3 is very valuable compared to MinIO but the licensing issues seem neither here or there. Or is there some extra part of the AGPLv3 that I'm not aware of?

comment 2y ago · link · parent

This seems really neat! I'm a huge proponent of incremental CI for any project that gets big enough to care about test speed.

I'd be pretty worried about an abstraction ceiling on the caching here relative to something like Bazel, though. Like would Mint get mad if I generated 4000 dynamic tasks?

comment 2y ago · link · parent

So many Australian sites use some data source that has an old name for the building I'm in, and sites are so convinced their address databases are right that I can't do anything about it! Mildly frustrating

comment 2y ago · link · parent

People aren’t writing new package managers for rust every other week. JavaScript still sees some but less.

Perhaps people are trying to solve real pain points, and by getting closer to solving them things feel nicer!

comment 2y ago · link · parent

To put a finer point on this idea, even if one could be against even this idea of an “installation flow”, work done to improve uv or rye would also likely flow into alternative strategies.

The more we invest into all of this and get it right in at least one way, the easier it will be for alternatives (like pyoxidizer!) to also “just work”. At least that’s my belief.

There are tactical reasons to focus on one strategy, and even if it’s not your favorite… everything being compatible with _something_ is good!

comment 2y ago · link · parent

In the universe in which I "know" what index to use (an assumption that can be contested!), you saying "well silly you, the planner is too stupid to figure this out" is not a great defense of the system!

My serious belief is that all the SQL variants are generally great, but I just want this to be incremented with some lower-level language that I can be more explicit with, from time to time. If only because sometimes there are operational needs.

The fact that the best we get with this is planner _hints_ is still to this day surprising to me. Hints! I am in control of the machine, why shouldn't it just listen to me! (and to stop the "but random data analyst could break thing", this is why we have invented permission systems)

comment 2y ago · link · parent

My honest experience in a skilled team has been that people more or less start off thinking "OK, what indices do we need to make this performant", work off of that, and then in the end try to have queries that hit those ones.

I understand the value of full declarative planning with heuristics, but sometimes the query writers do in fact have a better understanding of the data that will go in.

And beyond that, having consistent plans is actually better in some ideologies! Instead of a query suddenly changing tactics in a data- and time-dependent way, having consistent behavior at the planning phase means that you can apply general engineering maintenance tactics. Keep an eye on query perf, improve things that need to be improved... there are still the possibility of hitting absolutely nasty issues, but the fact that every SQL debugging session starts with "well we gotta run EXPLAIN first after the fact" is actually kind of odd!

comment 2y ago · link · parent

I agree! I don't think these actions need to be bundled together. I'm mainly just saying that curation is helpful, IMO.

comment 2y ago · link · parent

it's "absurdly simple", but then you get presented with a bunch of weird things that look like abstraction ceilings like "oh you can't refer to the select clause alias you made in the filter because despite that showing up first lexicographically the ordering is different" and "oh you don't have to refer to the table name except when you do because of ambiguity issues".

I think there's a beautiful space for some SQL-like language that just operates a bit more like a general-purpose language in a more regular fashion. Bonus points for ones where you don't query tables but point at indexes or table scans and the like (resolving the "programmer writes query that is super non-performant because they assume an index is present when it's not").

I think it's still super straightforward to sit down and learn it, but it's really unfortunate that we spend a bunch of time in school learning data structures and then SQL tries really hard to hide all that, making it pretty opaque despite people intuitively understanding B-Trees or indexes.

comment 2y ago · link · parent

I don't think it's just about storage and retrievel being efficient. Sometimes it _is_ easier to think in terms of tables.

I have a bunch of posts, written by various authors, on various sites. Store that in some OOP way, with ownership going in some direction (For example, sites own posts). Now look up the most recent posts for authors. Look up the most recent posts per site. Look up the most prolific authors. Do the authors work cross-site? Maybe they don't but people use the same name across sites.

There are plenty of times I have put things into a database not for perf reasons but simply because it's easier to do queries that way than to write a bunch of bespoke logic at each variant of certain queries, simply due to ownership arrows being all over the place

comment 2y ago · link · parent

Curation is, theoretically, a value-add that doesn't magically disappear with the internet. "This paper is not utter garbage" is a nice signal, if it's true.

comment 2y ago · link · parent

Counterpoint: toasts offer a great pressure release valve, are easy to have a single standard implementation of for a system, and avoid having to tackle high-level design questions when the feature in question doesn't really ask it.

Youtube has a lot of people on payroll to naval-gaze the problem described. Most systems don't. Having the GUI-equivalent to logging be easily available is a win for system usability.

comment 2y ago · link · parent

Serious q: what was the basis for that being thrown out? I am anti-"blanket uncompensated non-competes signed by everyone making over 60k", but it would be nice to know what particulars might have helped you out

comment 2y ago · link · parent

We would run stuff in repl.it, you get the shared codespace and also don't waste time on the ops issues (which are maybe interesting and you really want devs to be able to handle but also entirely incidental complexity for most devs).

In abstract I think it's great to have people use tools their comfortable with, but I dislike dinging people because they write good code but are not good at unborking Python venvs (less of a problem now) (yes you can be a good programmer and still lose time on dumb environment stuff)

comment 2y ago · link · parent

At one place there was a bug squash interview like this. Rough idea was we wrote a very small version of a system we had in our app (some data-syncing-then-displaying service), with a handful of bugs and a very simple feature request.

It was very helpful for sanity checking if a person was able to be in front of a computer. There's a bit of a challenge because I think there's a pretty low ceiling of performance (strace on a Python program is fun, but our bugs are not that deep!), but we could use it to also talk about new features on this mini-system and whatnot.

General feeling on it was "this is a great filter", because ultimately we needed people to just pass above a minimum skill bar, not be maximally good at coding. And having the exercise really helped to communicate the day-to-day (which can be tedious!)

comment 2y ago · link · parent

Ah that's unfortunate, I had a pretty OK time with Dramatiq (coming off of Celery especially). But I imagine this is dependent on your scale.

I think most people reading this site are working on relatively small systems (that still need background tasks!) and the fixed costs of background tasks can be reasonable. But I could be totally offbase

comment 2y ago · link · parent

To be honest my impression is that any "loud" VC is firmly in the Musk camp. And maybe just disagrees with Musk on a tactical level but generally would like for a lot of discussions to stop happening. There's probably a bit of a "intellectual dark web" silliness going on where they all think they are being oppressed for their opinions, despite probably being the silent... plurality I guess in their cohort.

Of course when they talk about this in public fora, many people outside their cohort[0] will react negatively to them.

[0]: glibly, outside their bubble.

comment 2y ago · link · parent

Another thing I appreciate about this in the Python world is it avoids an issue I've seen in node a lot, which is people being too clever by a half and pre-emptively adding major version bounds to their library. So foo depends on "bar<9", despite bar 9, 10, 11, 12, 13, and 14 all working with foo's usage of bar.

The end result of this is that you end up with some random library in your stack (4 transitive layers deep because of course it is) holding back stuff like chokadir in a huge chunk of your dep tree for... no real good reason. So you now have several copies of a huge library.

Of course new major versions might break your usage! Minor versions might as well! Patch versions too sometimes! Upper bounds pre-emptively set help mainly in one thing, and that's reducing the number of people who would help "beta-test" new major versions because they don't care enough to pin their own dependencies.

comment 2y ago · link · parent

Well for example, lots of queueing libraries have an "eager task" runtime option. What does that do? Instead of putting work into a backend queue, it just immediately runs the task in-process. You don't need any processing queue!

How many times have you shipped some background task change, only to realize half your test suite doesn't do anything with background tasks, and you're not testing your business logic to the logical conclusion? Eager task execution catches bugs earlier on, and is close enough to the reality for things that matter, while removing the need for, say, multi-process cordination in most tests.

And you can still test things the "real way" if you need to!

And to your other point: you can use Dramatiq with Postgres, for example[0]. I've written custom backends that just use pg for these libs, it's usually straightforward because the broker classes tend to abstract the gnarly things.

[0]: https://pypi.org/project/dramatiq-pg/

comment 2y ago · link · parent

I am going to go the other direction on this... to anyone reading this, please consider using a backend-generic queueing system for your Python project.

Why? Mainly because those systems offer good affordances for testing and running locally in an operationally simple way. They also tend to have decent default answers for various futzy questions around disconnects at various parts of the workflow.

We all know Celery is a buggy pain in the butt, but rolling your own job queue likely ends up with you just writing a similary-buggy pain in the butt. We've already done "Celery but simpler", it's stuff like Dramatiq!

If you have backend-specific needs, you won't listen to this advice. But think deeply how important your needs are. Computers are fast, and you can deal with a lot of events with most systems.

Meanwhile if you use a backend-generic system... well you could write a backend using PgQueuer!

comment 2y ago · link · parent

This is a fair point. I imagine in a stricter environment you could (for example) have tests before implementations even to avoid huge feedback loops

comment 2y ago · link · parent

That’s a good point for things with certain kinds of specs, but it seems a hell of a lot more straightforward for the person who is writing an implementation to also be in a testing mindset (if only to be writing testable code)

Perhaps people in these environments are made of different stuff but touching both sides feels almost essential to me.

comment 2y ago · link · parent

I'm shocked that there are places in 2024 that have a separate set of devs writing test code. What decade is this?
1
363738
225