HNHacker News
TopNewBestAskShowJobs

xyzzy_plugh

10,008 karma · joined September 23, 2014

submissionscomments
xyzzy_plugh··on Four Years with Decker
I don't believe you.

Here, I inserted a subtle bug in this function, can you find it?

    int widget_grid(lv*target,grid x,grid_val*value){
        if(x.show==show_none)return 0; lv*hfnt=FONT_BODY; int hsize=x.headers?font_h(hfnt)+5:0; if(x.size.h<=(50+hsize)||x.size.w<16)x.scrollbar=0;
        lv*fnt=x.font?x.font:FONT_MONO; int os=value->scroll, or=value->row, oc=value->col, files=x.headers==2; if(files||x.size.h<=hsize)x.headers=0;
        int _bg=dgeti(value->table,lmistr("_bg")),_fg=dgeti(value->table,lmistr("_fg")),_hideby=dgeti(value->table,lmistr("_hideby"));
        lv*pv=NULL,*vp=NULL;if(target!=NULL&&_hideby!=-1)grid_pv(target,&pv,&vp);int nr=pv?pv->c: value->table->n;
        #define grid_cell_at(col,row) (value->table->lv[col]->lv[permuted_row(row)])

        int nc=MIN(256,value->table->c), rh=font_h(fnt)+(x.lines?5:3), fcol=!in_layer()?13:x.show==show_invert?32:1, bcol=x.show==show_invert?1:32;
        int fk=strlen(x.format); rect b=x.size;
        int sel=in_layer()&&x.show!=show_none&&wid.active==wid.count;
        if(in_layer()&&dover(b)&&(ev.md||ev.mu||ev.drag)){if(!sel&&wid.gv)grid_exit(); wid.active=wid.count,sel=1;}
        if(sel&&in_layer()&&!over(b)&&ev.md){sel=0;wid.active=-1;grid_exit();}
        if(sel){if(wid.fv)field_exit();wid.ingrid=1,wid.g=x,wid.gv=value,wid.gt=target;}
        if(x.show!=show_transparent)draw_rect(b,bcol);
        rect bh={b.x,b.y,b.w,x.headers?font_h(hfnt)+5:0}; int nrd=MIN(nr,((b.h-bh.h+1)/rh)), scrollmax=nr-nrd;
        rect bb=scrollbar((rect){b.x,b.y+(x.headers?bh.h-1:0),b.w,b.h-(x.headers?bh.h-1:0)},scrollmax,1,nrd,&value->scroll,x.scrollbar,x.show==show_invert);
        draw_box(x.lines?b:(rect){b.x,bb.y,b.w,b.h-(bb.y-b.y)},0,sel?13:fcol);
        char*pal=patterns_pal(ifield(deck,"patterns"));
        if(x.lines)draw_rect(bh,fcol);if(nc<=0)draw_textc(inset(bb,1),"(no data)",hfnt,fcol);

        int cw[256];for(int z=0;z<nc;z++)cw[z]=z>=x.widths[0]?-1:x.widths[1+z];
        if(_bg!=-1)cw[_bg]=0;if(_fg!=-1)cw[_fg]=0;if(_hideby!=-1)cw[_hideby]=0;
        int hwt=0;for(int z=0;z<x.widths[0];z++)hwt+=cw[z];
        int nwt=0;for(int z=0;z<nc         ;z++)nwt+=cw[z]==-1;
        for(int z=x.widths[0];z<nc         ;z++)cw[z]=cw[z]==-1?(bb.w-hwt)/nwt:0;

        if(!cf.sv)cf=str_new();
        #define rowh(n) inset((rect){bb.x+1,bb.y+rh*n+2,bb.w-2,rh-3},x.lines?0:-1)
        #define rowb(n) (rect){bb.x,bb.y+rh*n,bb.w,rh}
        int clicked=0,rsel=0,hrow=-1,hcol=-1;
        for(int y=0;y<nrd;y++){
                if(_bg!=-1){
                        int p=CLAMP(0,ln(grid_cell_at(_bg,y+value->scroll)),255);
                        if(p){rect t=rowb(y);if(y==0)t.y+=1,t.h-=1; draw_rect(t,p);}
                }
                int ra=in_layer()&&over(bb)&&over(rowb(y));rect cbox={0};
                if(ra&&x.bycell){for(int z=0;z<nc;z++){rect cell=grid_cell(x,value,bb,(pair){z,y},cw);if(over(cell))hcol=z,cbox=grid_hcell(x,z,cell);}}
                if(ra&&(ev.md||ev.drag)){rsel=1,hrow=y+value->scroll;draw_rect(x.bycell?cbox:rowh(y),fcol);}
                if(ra&&ev.mu)clicked=1,value->row=permuted_row(y+value->scroll),value->col=hcol;
                if(ra&&!ev.drag)uicursor=cursor_point;
        }int rr=display_row(value->row)-value->scroll;
        if(!rsel&&rr>=0&&rr<nrd&&(x.bycell?value->col>=0&&value->col<nc:1)){
                hrow=display_row(value->row),hcol=value->col;
                if(x.bycell&&value->col>=0){draw_rect(grid_hcell(x,value->col,grid_cell(x,value,bb,(pair){value->col,rr},cw)),fcol);}
                else{draw_rect(rowh(rr),fcol);}
        }
        int drawncol=0;for(int z=0,cols=0,cx=0;z<nc&&cx+cw[cols]<=bb.w;z++,cols++){
                rect hs=(rect){bh.x+4+cx,bh.y+1,cw[cols]-5,bh.h-2};
                if(hs.w<=0)continue; // suppressed column
                if(x.headers){
                        int oa=target&&in_layer()&&over(hs)&&((ev.drag||ev.mu)?dover(hs):1)&&!wid.col_drag;
                        int dp=oa&&(ev.md||ev.drag);if(dp)draw_rect(hs,x.lines?bcol:fcol);
                        draw_textc(hs,value->table->kv[z]->sv,hfnt,x.lines^dp?bcol:fcol);
                        if(oa&&!ev.drag)uicursor=cursor_point;
                        if(oa&&ev.mu){msg.target_order=target,msg.arg_order=value->table->kv[z];}
                }
                if(drawncol&&x.lines)draw_invert(pal,(rect){hs.x-3,b.y+1,1,b.h-2});cx+=cw[cols];drawncol=1;
                for(int y=0;y<nrd;y++){
                        int ccol=y+value->scroll==hrow&&(x.bycell?cols==hcol :1)?bcol: _fg==-1?fcol: CLAMP(0,ln(grid_cell_at(_fg,y+value->scroll)),255);
                        rect cell={hs.x-3,bb.y+rh*y+1,hs.w+5,rh-1}; lv*v=grid_cell_at(z,y+value->scroll);
                        cf.c=0;format_type_simple(&cf,v,z>fk?'s':x.format[z]=='L'?'s':x.format[z]);str_term(&cf);
                        rect ib=box_center(cell,image_size(ICONS[0]));pair ip={ib.x,ib.y};
                        rect oc=frame.clip; frame.clip=box_intersect(cell,frame.clip);
                        if     (z<fk&&x.format[z]=='I'){int i=MAX(0,MIN(8,ln(v)));if(i<8)draw_icon(ip,ICONS[i],ccol);}
                        else if(z<fk&&x.format[z]=='B'){if(lb(v))draw_icon(ip,ICONS[icon_chek],ccol);}
                        else if(z<fk&&(x.format[z]=='t'||x.format[z]=='T')){
                                rect rr={hs.x+1,bb.y+rh*y,hs.w-2,rh}; // display rich text:
                                pair t=layout_richtext(deck,rtext_cast(v),fnt,align_left,rr.w);
                                rect r={rr.x,rr.y+ceil(t.y<rr.h?(rr.h-t.y)/2.0:0),rr.w,rr.h};
                                lv*alink=NULL;if(x.format[z]=='T'&&in_layer()&&(ev.md||ev.drag||ev.mu))for(int z=0;z<layout_count;z++){
                                        glyph_box g=layout[z];if(g.pos.w<1)continue; // skip squashed spaces/newlines
                                        if(g.pos.y+g.pos.h<0||g.pos.y>r.h)continue; g.pos.x+=r.x, g.pos.y+=r.y; // coarse clip
                                        if(lis(g.arg)&&g.arg->c&&dover(g.pos)&&over(g.pos)){
                                                if(ev.md||ev.drag){alink=g.arg;break;}
                                                if(ev.mu){msg.target_link=target,msg.arg_link=g.arg;break;}
                                        }
                                }
                                draw_text_rich_raw(r,ccol,0,alink);
                        }
                        else{
                                rect r={hs.x+1,bb.y+rh*y,hs.w-2,rh}; // right-align numeric columns:
                                if(z<fk&&strchr("fcCihH",x.format[z])){draw_textr(r,cf.sv,fnt,ccol);}else{draw_text_fit(r,cf.sv,fnt,ccol);}
                        }
                        frame.clip=oc;
                        if(!x.locked&&sel&& ((ev.dclick&&over(cell)) || (ev.action&&x.bycell&&z==value->col&&y+value->scroll==display_row(value->row)))){
                                char f=z<fk?x.format[z]:'s';pair tc=(pair){z,y+value->scroll},tpc=(pair){tc.x,permuted_row(tc.y)};
                                if     (f=='I'||f=='L'||f=='T'){} // no editing allowed
                                else if(f=='B'||f=='b'){grid_edit_cell(tpc,ls(lmn(!lb(v))));} // toggle
                                else{
                                        ms.pending_grid_cell_rich=f=='t';
                                        wid.pending_grid_edit=1,ms.pending_grid_cell=grid_cell(x,value,bb,(pair){tc.x,tc.y-value->scroll},cw);
                                        ms.pending_grid_cell.y-=1,ms.pending_grid_cell.w+=1,ms.pending_grid_cell.h+=2;
                                        ms.cell=tpc;ms.text=(field_val){f=='t'?rtext_cast(v):rtext_cast(lmcstr(cf.sv)),0};
                                }
                        }
                }
        }
        if(x.lines)for(int y=1;y<nrd;y++)draw_hline(bb.x,bb.x+bb.w,bb.y+rh*y,fcol);
        if(!x.locked&&in_layer()&&target)for(int z=0,cx=bh.x;z<nc;cx+=cw[z],z++){
                if(cw[z]==0)continue;
                rect h={cx+cw[z]-1,bh.y,5,bh.h};if(h.x+h.w>b.x+b.w)break;
                if(over(h))draw_vline(h.x+2,h.y,h.y+h.h,13);
                if(ev.md&&dover(h)){wid.col_drag=1,wid.col_num=z,wid.col_orig=cw[z];}
                if(sel&&wid.col_drag&&wid.col_num==z&&ev.drag){
                        int s=MIN(MAX(10,wid.col_orig+(ev.pos.x-ev.dpos.x)),bb.w-10),i=z;uicursor=cursor_drag;
                        GEN(r,MAX(x.widths[0],i+1))lmn(i==z?s:cw[z]);iwrite(target,lmistr("widths"),r),mark_dirty();
                }
        }
        if(target&&os!=value->scroll)iwrite(target,lmistr("scroll"),lmn(value->scroll)),mark_dirty();
        if(target&&or!=value->row)iwrite(target,lmistr("row"),lmn(value->row)),mark_dirty();
        if(target&&oc!=value->col)iwrite(target,lmistr("col"),lmn(value->col)),mark_dirty();
        if(target&&clicked)msg.target_click=target,msg.arg_click=(fpair){0,value->row};
        if(in_widgets())wid.count++;
        return files?((clicked&&ev.dclick)||(sel&&ev.action)): clicked;
    }
xyzzy_plugh··on Four Years with Decker
I can't resist posting whenever Decker shows up.

Decker is one of the craziest code bases I'm aware of: a single, incredibly dense file:

https://raw.githubusercontent.com/JohnEarnest/Decker/refs/he...

(I wonder how many tokens it'd be to make this legible...)

xyzzy_plugh··on 2026 is an exciting year for the Rust compiler (and me)
I've seen three outages at various orgs that were prolonged due to compile times. In these cases it was a root contributor to missing RTO. The compile times are a liability.

One proposal I came across actually suggested breaking up a perfectly fine monolith into a dozen microservices to reduce compile times (at the cost of cumulative CI costs going up).

When the alternative is massively rearchitecting your systems, Zig and Go begin to look really nice by comparison.

xyzzy_plugh··on Google Cloud outage affects almost all banking and other operations in Europe
Yes. The area on the Venn diagram where services, hardware and regulatory compliance intersect is surprisingly small.

I had a client that was contracting with a very large bank and there were only something like four zones globally that we could possibly deploy in to.

Google also is unlike AWS in that their zone abstraction is very virtual, and two zones might be in the same physical building. If you have requirements that your deployment zones be physically separated by some minimal distance then it can make things pretty challenging.

xyzzy_plugh··on OpenAI discloses four more rogue incidents
No.

If this is endorsed and thus malicious, they should be ground into dust by the law.

If this is accidental and due to incompetence, they should be ground into dust by the law.

I've secured many, many far less important and impactful systems substantially better than even the best sandbox environment that we're aware of being used by these labs.

There's simply no reason to let these things interact with the internet at large. We can already rapidly copy existing tools and services (albeit questionably) using these models, why not simply run in a fully virtualized, air gapped environment?

Because they don't care.

This is incredibly blatant intentionally malignant behavior. The fact that so many people question this is frankly stunning.

They're getting away with it simply because they can point at the other guy and say "see? they're doing it too!"

It's ridiculous and they should all be litigated into a fine residue.

We take biological lab leaks seriously, how is this substantially different?

xyzzy_plugh··on Sorry, I'm in a meeting
I once worked on a team of SREs where the workload was so atrocious that we had HR make up new virtual employees Team On-call Primary and Team On-call Secondary and, other than the manager, they were the only accessible team members. We gave these virtual employees their own laptops and phones. When your shift ended, or you needed a break, you handed the gear to the next guy. We didn't have a formal schedule because it was common to get burned out in just three or four days, or if it was a rare calm period you might hang on to the laptop a bit longer until you got a chance to get properly throttled.

It worked exceptionally well because then the other employees were unable to individually bother team members. The team name in the HR directory was something vague and reported to the skip level, so unless you were in the know, we were totally invisible to the rest of the org. For some context we were keeping many millions of dollars of daily transactions afloat and it was not unusual to receive death threats from business folks when they couldn't do their jobs.

I don't miss it remotely, but I sometimes miss being a member of an invisible force with superuser privileges, with the blessing to unfuck anything we saw fit.

xyzzy_plugh··on Our $445M Series D
That would mean they would be growing slower. Being common is irrelevant.

Raising a Series D is an attempt to permanently increase the velocity of their enterprise. The change in the cap table is negligible if they succeed.

Raising debt right now would be a massive unforced error given they were able to shore up half a billion dollars in funding. If the funding well were dry then it'd be a different story, but that's not the case.

Can you imagine if they raised $445M of debt?

xyzzy_plugh··on Our $445M Series D
This is a crazy take. If you can raise on good terms (or better) then it almost always beats debt. Debt can make it a lot harder to raise or take on more debt in the future.

They're profitable, they are going to get the best terms possible at this moment.

xyzzy_plugh··on GVisor is being donated to CNCF
I like gvisor but I fear this is too little, too late. Microvms are crushing it right now. I believe even Modal, which is one of the few non-Google users deploying gvisor commercially, and heavily called out in TFA, are moving off gvisor in favor of microvms. Unreal!

Frankly I would never want to operate gvisor with customer defined workloads.

For one, performance isn't native, which makes it hard to determine workload characteristics. Second, it has a pretty long list of limitations that make it difficult to deploy transparently: cgroups aren't fully supported, no io_uring, etc.

They claim they test a wide array of workloads but there are still compatibility issues that take years to iron out. I once had a workload that was probably buggy, and crashed only on arm64 under gvisor, but as I lacked source access there was no viable path forward.

I hope I am wrong, I'd love to see gvisor really take off. I think finishing the macOS port would be wild: run Linux binaries on macOS without a VM! But I'm not confident.

xyzzy_plugh··on Gemini ending free use of Flash and Pro models
This is what happens when you give people a valuable service for free. You can't take it away without a lot of complaining and loss of good will.

Flash-lite is pretty capable and getting that entirely for free is not a bad deal at all.

It was always obvious Google couldn't keep letting non-paying users use Flash and Pro.

I'm not a fan of how they bundled their plans but they're not too bad especially when shared with a family. I think I've got almost 1TB of Google Photos at this point.

This is a much better page than TFA: https://support.google.com/gemini/answer/17004136

xyzzy_plugh··on With most information hidden, the game Stratego had stumped AI until now
The key difference is gambling.

Have you ever gambled over a game of Dominion? I wouldn't.

Have you ever played Hold'em without gambling? I wouldn't either.

xyzzy_plugh··on Shut up and take our money: Amazon plows $1B into quashing datacenter dissent
The problem was and still is politicians. Your elected representatives are in place precisely to guard your best interests. Maybe it's in your best interest to have a data center in the neighborhood, or maybe not.

Regardless, if there is a political movement to stop building data centers, but they're still getting built, either not enough people care, or the people permitting these builds are not appropriately accountable, or they will be held accountable at an appointed day and time (most likely elections).

The core problem as I see it is a combination of:

- not enough people who should care do, but probably will when it's too late

- there is insufficient regulation and regulation is too slow to keep up with the pace of development, and doesn't show signs of improving

- there's no good recourse after the fact. It's not like you can easily say "oops actually this megastructure is inconvenient begone" when there are hundreds of millions of dollars on the line, or more.

And lastly, I think Amazon is being treated unfairly due to the actions of other. All things considered I'd rather have an Amazon data center than practically anyone else. If I were Amazon I'd be pushing for more regulation. They can certainly afford to raise the floor of what passes as "environmentally friendly" or whatever. Historically they don't even want anyone to really know where they are. They'd rather be invisible.

The average DC corp you've never heard of? I'm much more skeptical.

xyzzy_plugh··on NTSB Preliminary Report: Prime Air 767 Runway Overrun [pdf]
While this is generally true and having read this report I do not believe it to contain any new material information related to the probable cause, it continues to paint the picture of the captain making a pretty big series of mistakes.

It really sucks that the FO could not intervene further as he clearly identified the problem and articulated the solution.

I certainly doubt there will be a satisfying ending to this one.

xyzzy_plugh··on With most information hidden, the game Stratego had stumped AI until now
I've played a lot of Dominion with people who have played thousands of games. I've even beat them with some frequency (it's not that hard!).

I don't think Dominion is a good game. It's good if you maybe think cubing is good. And it can be a lot of fun!

But as a game? It's not good. If you have no idea what you are doing and are totally unfamiliar, you can even win pretty easily with some luck. But you won't understand why you won, or rather why others lost.

There are many, many games where everyone can read the rules together and be, more or less, on even footing. Dominion can sometimes be that way, but it can pretty easily be extremely opposite of that.

xyzzy_plugh··on Upgrade your desktop: Ubuntu 26.04.1 LTS is now available
It came out in April. Their LTS releases always come out in April of even numbered years.
xyzzy_plugh··on ChatGPT Pro 500
I'll be the first to bemoan these companies but there are many, many locations where even with today's higher prices and level of service they come out way cheaper and way more reliable than incumbents.

It's getting shitty, I agree, but still feels like a net improvement to where we were over a decade ago.

xyzzy_plugh··on First Steps of the PLC Organization – Independent Public Ledger of Credentials
IMO perfect is the enemy of good here. If your personal email account you use for literally everything is firstname.lastname@mailprovider then you're already in the same situation. This isn't any worse, but it is strictly better.

You can always create a new identity, I don't think anything has changed there. If you don't want your new identity connected to your old identity, then don't.

The right to be forgotten is whole separate problem. The only hope here, really, is that entropy takes care of it for you. I don't see how a chain of trust system can fundamentally be compatible with the right to be forgotten unless you relax the rules a bit.

xyzzy_plugh··on We just shipped support for the ugliest part of HTTP: Vary
I honestly thought they would never ship this. Holy hell this has been a long time coming.

Actual real content negotiation in 2026. Never thought I'd live to see the day.

xyzzy_plugh··on UK military jamming other nations' satellites to defend itself, BBC told
Actually it hasn't proliferated into civilian use because the military industrial complex has captured pretty much anything with real accuracy.

I had an old colleague who in a previous life worked on an incredibly accurate positioning system that was effectively a brief case that knew where it was at all times. The story he told was the DoD made them an offer they couldn't refuse, and everything became secret. I'm pretty sure the company in question is still in business.

I'm not trying to say it's not legal but it might not exactly be legal?

xyzzy_plugh··on Show HN: Drop – A rootless Linux sandbox with gVisor support
To be honest, me also. I don't even use Docker either but it helps in conversations to keep it simple.

Since it isn't obvious to your, Docker and friends also have an entire content management system (pulling, pushing, tagging images and layers) as well as a build system.

xyzzy_plugh··on Show HN: Drop – a rootless Linux sandbox with gVisor support
I've been using gVisor with Docker (or Docker-compatible runtimes) via runsc for years.

It isn't obvious to me what this does that we haven't been able to do for some time now.

xyzzy_plugh··on The Effect of CRTs on Pixel Art (2024)
Why is no one manufacturing CRTs in 2026? Seriously this is such a lost art.
xyzzy_plugh··on Tin: full-text search for Postgres
Everything else aside

> Those that develop on top of open-source have no obligation to give you their work for free.

This is a pretty narrow view of open source.

Just as a simple example, GPLv3 and AGPLv3 are both considered Open Source and, depending on how you hold them, may obligate releasing work to customers essentially for free.

xyzzy_plugh··on I don't like passkeys
Do passkeys improve security posture for the average person, reducing the likelihood of them losing their accounts to fraudulent actors? Absolutely.

But they also introduce single points of failure, as the article points out. I can't even remember how many times I've had to help a family member recover their account or get confused when they can't sign in on a new device. It's incredibly frustrating that this flow is promoted as the default for so many services.

1password is the best solution I've found for the average person. It's not perfect (it's definitely more complex than writing down your passwords on a piece of paper or using the same password everywhere) but it's much easier than juggling yubikeys. I know so many non-technical staff members who prefer the OS or browser keys even if it means another account recovery is lurking around the corner.

xyzzy_plugh··on A wandering black hole caught feeding on the run
I get what you're saying but you're also being incredibly dismissive to the common understanding which is still correct, otherwise most astrophysics wouldn't work, because it wouldn't be possible to predict where another planet will be at a later time. It's possible to have two alarm clocks go off at the same instant on two planets, though obviously each will observe the other going off later, after a delay.

It's obviously fair to say they happened at the same time in this scenario.

xyzzy_plugh··on Neki – Sharded Postgres
See? You're proving my point. All you do is play games. Are you even capable of engaging without confrontation?
xyzzy_plugh··on Neki – Sharded Postgres
You've simply chosen not to listen, considering that they've voiced those concerns to me.
xyzzy_plugh··on Neki – Sharded Postgres
But your customers are, of course, somehow different? What point are you even trying to make?

Commerical open source is fine. It's nobody else's fault if you raised too much to make it work sustainably.

xyzzy_plugh··on Neki – Sharded Postgres
I love how the Planetscale CEO has been shitting on multigres[0], Supabase's equivalent to Neki, and gloating about how superior Neki is, and yet Neki is not even open source!

Sam, it feels like you're just playing games. It's hard to take anything you say or do seriously. Are you going to OSS this thing? Or have you decided to backpedal?

Congrats on the checks notes closed launch, I guess?

0: https://github.com/multigres/multigres

xyzzy_plugh··on “We want it to really confuse people, but also really make people happy”
This line in the closing epilogue really resonates with me:

> It’s one thing to revisit those old machines just to relive your own years of (likely imagined) glory, but yet another to see people see them as inspiration: to encounter computers that were simpler, unencumbered, unenshittified, and with software you could understand, remix, and own.

I feel as though we have strayed so far from this in modern times and yet it seems to be beyond nostalgia, but firming up to actually be ideal. The idea that your personal computing experience is truly malleable.

We're at a crossroads and where we end up a few years from now, either a personal computing dystopia or utopia, is really up in the air.

We're long overdue for an explosion of new forms of truly liberated personal computing.

← PreviousPage 2 of 34Next →