Better HN
topnewbestaskshowjobs
Log inSign up

pjungwir

4,196 karma · joined Mar 18, 2011 (15y ago) · 1,283 submissions

https://illuminatedcomputing.com/

pj@illuminatedcomputing.com

[ my public key: https://keybase.io/pjungwir; my proof: https://keybase.io/pjungwir/sigs/18RLNIH6b2Dlda44UTBZU_M50U7MmWCTjBKoF813ZOA ]

Submissions

comment 1w ago · link · parent

Nearly a year ago I asked ChatGPT to show me a proof of the Goldbach Conjecture, just to see what it did. Of course it said no such proof exists. But after a couple turns of pressing, it gave me two or three proposed outlines for a proof, with a several-pages-long research program for how you could attempt to solve the gaps still needed. I couldn't understand any of it, but it was pretty impressive. At that level it probably wasn't nonsense: I bet it was half-copied from some grad student blogs. If you asked it to dig into the details and keep updating the status of the outline, you could probably make a lot progress.

I think AI will become more autonomous as it becomes able (or just willing) to think more abstraction levels deep. Each level can be expressed in language, so it should be able to engage with it. It reminds me of a chess program being able to think many moves deep. For a while grandmasters like Kasparov could still see big-picture things the computer couldn't (e.g. with a locked-up pawn formation and an eventual piece sacrifice to promote a queen, where the kings can run in circles forever). AI seems like that now.

comment 1w ago · link · parent

That seems likely, but maybe it was being actively exploited so several people started investigating.

comment 2w ago · link · parent

Same with my open source projects and blog posts. I just woke up this morning to two spam messages:

  > Hi Paul, I saw you run Claude Code on manpj,
  > which is exactly who I built Tokenade for.
and

  > Hi Paul, I read your Claude Code setup post,
  > . . . That's exactly why I built Grafizum.
Gmail doesn't seem able to recognize that these are spam (or the incessant business loan offers). But I keep flagging them. I hope it hurts their delivery rates.

comment 1mo ago · link · parent

Pretty funny to look at Saturday & Sunday. The hackers decided to start working weekends?

comment 2mo ago · link · parent

I was wondering last night: are any of the fundamental forces "blocked" by an intervening object? I assume not, since there is nothing like that in the equations. But that is kind of interesting, since sometimes you hear talk of hypothetical particles like gravitons.

6.

TQuel Paper: Implementing Temporal Operators in Postgres(illuminatedcomputing.com ↗)

1 points · by pjungwir · 4mo ago · discuss

comment 4mo ago · link · parent

When I was still much more skeptical of AI, I asked ChatGPT to write me a proof of the Goldbach Conjecture. Of course it didn't, but it gave me a several-screens-long research program for how one might get there, with a few alternate paths and what pieces are still missing from each one. Maybe it cribbed that all from some grad student's blog, but it was still pretty impressive.

A week or two ago I asked Claude Code to write a comprehensive testing plan for a new Postgres feature I wrote, UPDATE/DELETE FOR PORTION OF. I was a bit anxious about how many bugs were discovered as soon as it was merged this spring. Claude found some untested areas, then it wrote more tests for them. I'm not talking about LOC covered, but feature combinations. (I've been meaning to submit this as a followup patch. . . .) Fortunately it didn't find any more bugs.

I sense that testing plan has affinity with the findings in the OP, even though it is far more humble than research mathematics. Even better would be if we knew good ways to express invariants about Postgres's behavior, and then we could ask LLMs to violate them. I'm sure there are good ways already, and the "we" who is not knowing is not "all humans" but "the Postgres team" or just "me".

As a counterexample to the article (heh): even though Claude didn't uncover any new bugs, a human did, just a few days ago. Alas!

comment 5mo ago · link · parent

I think yes. You're saying that the invoice is generated from other data in separate tables, and it should be immutable even if that data changes. So today you are copying everything used by the invoice.

That's exactly why I started learning about temporal tables. I had a customer whose app used questionnaires to measure the effectiveness of government social services, and they let people change the questions (and multiple choice options) even after there were answers! Obviously the data was trashed.

I've seen this bug over & over again, where you have a foreign key relationship, and the referenced table changes, but the referencing table needs the old data. Another example is a sale that doesn't capture the product's current price.

Temporal tables mean that you can run your 2022 financial reports and get the same answer you got before.

My own time-tracking and invoicing app has to solve this problem. I also "copy everything" when something changes. I just gave a talk about migrating it to temporal tables: https://illuminatedcomputing.com/pages/pgdata2026-migrating-...

You'll have to decide if your use-case is more "system time" (history of the database) or "application time" (history of the entities). The features here are for application time. I want to make sure Postgres gets system time too, but it's not in v19.

If you want system time today, there are several widely-adopted Postgres extensions that can do that already. I cover them here: https://illuminatedcomputing.com/posts/2017/12/temporal-data...

And actually, application time is managed by you (while system time is managed automatically by the database), so really you can use it for whatever you want.

comment 5mo ago · link · parent

In the Postgres version, you can use a rangetype or multirangetype over any base type (integers, inets, frammishes, etc). This is a generalization of SQL:2011, where PERIODs have to be on date/timestamp/timestamptz columns. I have ambitions to support non-range/multirange types as well, even user defined types, but I'll need to add a way for them to communicate a few things to core Postgres, like how to do intersect/contains/overlaps. I talked about that in my "roadmap" talk linked here if you're interested in details.

comment 5mo ago · link · parent

For application time, everything lives in one table (although you could partition it). The biggest performance hit, I suspect, will come from GiST indexes instead of B-Trees. Some general GiST improvements are on my TODO list, and I learned at PGConf.dev that several other people already have patches for cool perf-related GiST enhancements.

For system time, a separate history table is a common implementation, sometimes also with partitioning. Here is what other vendors are doing: https://illuminatedcomputing.com/posts/2019/08/sql2011-surve...

comment 5mo ago · link · parent

Hey I worked on this!

Thank you to everyone here saying they are excited about it. I often hear doubts that anyone wants this. Perhaps that's why vendors have been so slow to add it. And thank you 'bonesmoses for writing about it!

We are still missing system time, but if no one else wants to work on it, I hope to tackle that soon.

I have a lot of other ideas for improvement beyond SQL:2011, too. Here is a talk I gave last month about my personal roadmap:

https://illuminatedcomputing.com/pages/pgconf2026-temporal-r...

I've also been vibecoding a lisp REPL to play with the algebra of temporal relational operators (important for the planner): https://github.com/pjungwir/relsim

That overlaps with my attempt to write implementations for temporal semi/anti/outer-join and other relops: https://github.com/pjungwir/temporal_ops

If anyone has comments about what you'd like to see, I'm happy for feedback!

12.

My Claude Code Setup(illuminatedcomputing.com ↗)

11 points · by pjungwir · 5mo ago · 1 comment

comment 5mo ago · link · parent

Yes, I su to the user. Typically I have it run a tmux session for each "project". That makes it easy to get more windows without su'ing over and over. Also its tmux sessions all get a yellow status bar (in ~claude/.tmux.conf), so they are easy to recognize.

To me it is more convenient than a VM, since everything is on the host. And it can launch its own VMs without an extra layer.

I don't really know which is more secure. There are hypervisor escape vulns too. And shared folders seem like footguns. For instance in vagrant, guests get `/vagrant` to read/write the host's folder, so you have to be careful what you put where.

The biggest annoyance with an OS user so far is running docker containers. I don't want to add claude to the docker group or give it sudo privileges. I've read that you can set up rootless docker for a user, and even that you can run it side-by-side with a normal system-wide docker, but I haven't tried doing that yet.

comment 5mo ago · link · parent

I know there are VM solutions, but I've been happy with a separate OS user (named `claude`).

He has similar dotfiles to mine, but no secrets. My own home directory is 0700. He has his own ssh key that I added to my github profile, but it's password-protected, and I push/pull for him. He has his own Postgres (non-superuser!) {development,test} {users,databases}.

It's as if he were another developer on the project. If he needs something run with sudo, he asks me. Often we can both work on something in parallel. Unix was supposed to be a multi-user system after all.

A trick I use a lot is that many of his git repos have an extra remote, like this:

    paul  ssh://paul@localhost/~/src/example (fetch)
    paul  ssh://paul@localhost/~/src/example (push)
That makes it easy to collaborate on things I'm not ready to share.

I'm pretty comfortable with this setup.

I do worry about Linux privilege escalation bugs. I don't trust an AI to understand that exploiting vulns is not acceptable. (I can't help but recall that at my first job I may have misused vim's :! feature to broaden my sudo powers, which were officially limited to editing httpd.conf, when I needed something in a hurry. . . .) I find myself manually upgrading packages more often these days, despite automatic security updates. I don't think Opus would go to the trouble of looking up security vulns, but maybe Fable would, and there have been a lot lately. Maybe some future model will just take it upon itself to find new ones. Or install a keylogger to learn the ssh key password.

But a separate user is nearly the most paranoid setup I've heard of, excepting only a separate machine. So I also question whether I'm sacrificing too much speed/convenience. But really it's still very convenient. I think it's a good way of being efficient but responsible.

If other people see holes, I'd be happy to hear about them.

15.

Autonomous Software Maintenance Has Arrived(tembo.io ↗)

2 points · by pjungwir · 1y ago · discuss

comment 1y ago · link · parent

Does this scheme give a way to progressively load slices of an array? What I want is something like this:

    ["foo", "bar", "$1"]
And then we can consume this by resolving the Promise for $1 and splatting it into the array (sort of). The Promise might resolve to this:

    ["baz", "gar", "$2"]
And so on.

And then a higher level is just iterating the array, and doesn't have to think about the promise. Like a Python generator or Ruby enumerator. I see that Javascript does have async generators, so I guess you'd be using that.

The "sort of" is that you can stream the array contents without literally splatting. The caller doesn't have to reify the whole array, but they could.

EDIT: To this not-really-a-proposal I propose adding a new spread syntax, ["foo", "bar", "...$1"]. Then your progressive JSON layer can just deal with it. That would be awesome.

comment 2y ago · link · parent

I've seen this a lot when someone wants to add "workflow automation" or "scripting" to their app. The most success I'd had is embedding either Lua or Javascript (preferably Lua) with objects/functions from the business domain available to the user's script. This is what games do too. I think it's a great way to dodge most of the work. For free you can support flow control, arbitrary boolean expressions, math, etc.

18.

Solving bison shift/reduce conflicts in Postgres(illuminatedcomputing.com ↗)

1 points · by pjungwir · 2y ago · discuss

comment 2y ago · link · parent

I've used [mmdc](https://github.com/mermaid-js/mermaid-cli) to generate mermaid images from a Makefile. It looks like it is implemented with puppeteer, so perhaps it doesn't quite fit your request. But if you just want something you can use at the cli, it is great.

comment 2y ago · link · parent

SEEKING WORK - Portland, OR or Remote

I'm a full-stack developer with 20+ years experience. My specialties are deep Postgres consulting, web development in Rails/Django, and devops with Kubernetes, AWS, Azure, Terraform, Ansible, etc. From time to time I've done projects in Javascript/Typescript (React, Vue, Angular, Node), Java, C#, C, Go, Rust, Elixir, Perl, etc.

I am reliable, easy to work with, quick to turn things around, and a good communicator. I can work solo or on a team, either as lead or a team member. I value client satisfaction as highly as technical excellence.

You can see some of my recent work here:

https://illuminatedcomputing.com/portfolio

https://commitfest.postgresql.org/49/4308/ (Adding SQL:2011 application-time to Postgres)

https://commitfest.postgresql.org/31/2112/ (Adding multiranges to Postgres)

https://github.com/pjungwir/aggs_for_arrays

https://github.com/pjungwir/aggs_for_vecs

https://github.com/pjungwir/active_model_serializers_pg

If you'd like to work together, I'd be happy to discuss your project!: pj@illuminatedcomputing.com

comment 2y ago · link · parent

Nero isn't from the the late Roman Empire either.

comment 2y ago · link · parent

Great article! I'm looking forward to reading the rest of the series.

I noticed a couple details that seem wrong:

- You are passing `context` to `log_then_get` and `get`, but you never use it. Perhaps that is left over from a previous version of the post?

- In the fiber example you do this inside each fiber:

    responses << log_then_get(URI(url), Fiber.current)
and this outside each fiber:

    responses << get_http_fiber(...)
Something is not right there. It raised a few questions for me:

- Doesn't this leave `responses` with 8 elements instead of 4?

- What does `Fiber.schedule` return anyway? At best it can only be something like a promise, right? It can't be the result of the block. I don't see the answer in the docs: https://ruby-doc.org/3.3.4/Fiber.html#method-c-schedule

- When each fiber internally appends to `responses`, it is asynchronous, so are there concurrency problems? Array is not thread-safe I believe. So with fibers is this safe? If so, how/why? (I assume the answer is "because we are using a single-threaded scheduler", but that would be interesting to put in the post.)

23.

Debugging the Sprinkler System(illuminatedcomputing.com ↗)

3 points · by pjungwir · 2y ago · discuss

comment 2y ago · link · parent

How did JFrog know this github token was so powerful, compared to all the other ones I'm sure their scanner detects? What caused a human to get involved?

comment 2y ago · link · parent

If you add contact info to your profile, I will reach out. Or feel free to send me a note.

comment 2y ago · link · parent

Calagator has been dead for years, and I don't understand why. Way before the pandemic: agreed. Most of what I see there now is business networking or people selling something.

But there are still things happening, e.g.:

- pdxpug (Postgres)

- Database Reading Group (DBRG) at PSU

- pdx.rb

- pdxruby Slack channel

- pdxstartups Slack channel

- Portland Papers We Love

- Portland Linux Users Group

- Linux Kernel meetup

- Rose City Techies

That's from just a little bit of research. But I miss when Calagator was full of cool stuff. What happened there I wonder?

I've tried hosting things in my home/back yard before. One was just to come hack on your projects together. Another was to work on open source contributions. I'd be up for trying something like that again. Something about systems/databases would be right up my alley. Maybe a reading group. If anyone sees this and is interested, send me an email.

comment 2y ago · link · parent

Indeed, if you read The Goal or The Phoenix Project, they call this "slack". There is a whole theory about why slack matters.

comment 2y ago · link · parent

Oh this is very helpful!

When I read Turing's paper some years ago, this really confused me. The best sense I could make was that "circle-free" means "halts". But in popular explanations, writers often equate "halts" with "gives a result" and "doesn't halt" with "has a bug", i.e. an infinite loop. And Turing seems to connote just the opposite. The point is to print a real number, so if the program stops printing digits, something went wrong. (I guess many numbers would end in 0s forever.) From today's paper:

> a program is circular, when it produces only finitely many digits of the output digit sequence, and circle-free, when it has succeeded in giving us an infinite digit sequence for the output real number.

But I could never really believe my interpretation. It was just the best I could come up with, as an amateur reading the paper alone for fun. Later I read Petzold's book, and I'm not sure that really solved the trouble for me either.

I've only read a few pages so far, but I'm gathering it's not as simple as I wanted: "circle-free" is not merely equivalent to "halts" after all. I'm looking forward to seeing their more nuanced take.

EDIT: Btw, this reminds me of the best riddle I've ever invented myself. Q: What do you call a fully autonomous self-driving car that can operate with as much understanding as a person? A: N Gheavat Znpuvar. (I didn't say it was a good riddle.)

comment 2y ago · link · parent

> Entire C++ servers with hundreds of lines of code can be built from scratch in a minute or two tops.

Hundreds, huh? Is this a typo? It makes me wonder if the whole comment is facetious. Or do C++ programmers just have very low expectations for build time?

comment 2y ago · link · parent

I just finished reading Kernighan & Pike's The Unix Programming Environment this weekend, and it has a lot of awk. I read it more as a history book (it was published 40 years ago!), but the awk parts were a highlight, second only to the long penultimate chapter building your own calculator/programming language. It kind of made we want to learn more than just the basics I've been using for almost 25 years. But it also recalled Larry Wall's intro in Learning Perl, and how Perl started as a "better awk". That intro is really a direct response to K&P's book I think. So I don't know. I loved Perl in those days, and I agree about how not everything is doable as a shell pipeline. But a second edition makes me want to read it anyway. :-)
12345
43