News for hackers. Stuff that matters.

jfk13

Re:AI Is Breaking Two Vulnerability Cultures on Friday May 08, 2026 @07:41PM (#48070137)
Sounds like you're expecting the AI-based tools that are finding bugs to also provide fixes.

I've been dealing with a bunch of AI-generated (or at least -assisted) vulnerability reports lately. In many cases the reports include proposed patches to fix the issues.

It's been..... interesting. In many cases, the analysis provided in the report has been accurate and helpful. In some cases, the proposed patches have also been good, and we've accepted them with minimal or no changes.

In other cases, despite finding a valid issue, and even providing a good analysis of the problem, the AI tool's suggested patch has been, quite simply, wrong.

Careful review from somebody who really _understands_ the code -- and the wider context in which it is operating -- is still absolutely necessary. That's not always going to happen in an hour.

Re:Tell HN: GitHub Filters Seem Broken on Monday April 27, 2026 @02:05PM (#47925066)
Just to confirm, I'm seeing the same issue on other repos. Sometimes a subset of the expected PRs show up, other times none at all.
Re:Can Software Be Durable? on Sunday July 20, 2025 @12:20PM (#44626648)
An example worth considering is TeX, which is now 43 years old (considering only TeX82; the earlier TeX78 was a substantially different piece of software). There has been some maintenance over the years, it's true, including a few feature additions in 1990 (TeX 3.0), but I would suggest it has shown itself to be extremely durable.
Except that it's not clear whether the intelligence† that underlies their homing ability is equally effective in helping them evade predators.

†Is "intelligence" even the right word here? I don't know. Much depends on how you define it, I guess, combined with the unknowability of the pigeon's own mental processes.

Glad to see you didn't acknowledge your source! :-)

(It's Tom Lehrer, for any who don't recognize it.)

"Some of you may die but that is a sacrifice I am willing to make."
Re:HTML Whitespace Is Broken on Friday February 07, 2025 @05:11AM (#42971100)
Does the article's "Example 31" look correct to anyone? I see no "small space between the two boxes" (as claimed) in any of the browsers I tried.
Re:Where is London's most central sheep? on Thursday January 23, 2025 @10:45AM (#42805073)
How large does the field have to be? I grow some in my back garden...does that count as zero, then?
Re:The Engineering Behind Texas's Top Tourist Attraction on Sunday January 12, 2025 @06:31AM (#42672832)
Yes, agreed! The first time I visited San Antonio (as a Brit who was based in Dallas for some months) happened to be at exactly that time. We didn't know anything about it, but found ourselves on the river walk in the evening, and along came the parade of boats bringing Pancho Claus & co... it was a lovely surprise and a beautiful evening.
Re:The day I taught AI to read code like a Senior Developer on Sunday January 05, 2025 @10:16AM (#42602299)
It does, but those would only be applied if the `font-variant-ligatures: historical-ligatures` property were specified, so they don't appear on this site.
Re:The day I taught AI to read code like a Senior Developer on Sunday January 05, 2025 @10:13AM (#42602266)
Specifically, `font-variant-ligatures: discretionary-ligatures` enables this.

(So does `font-feature-settings: "dlig" 1`, which is the low-level equivalent; the site includes both.)

Ah, remembering the phone-book Inside Mac volumes! Those were the days.

(Kids these days with StackExchange and Copilot have no idea.... now get off my lawn!)

Some years ago I was very frustrated, as a UK citizen visiting the States and suffering from congestion, that I was completely unable to buy it because I wasn't carrying suitable ID that the pharmacy would recognize.
As a test for your browser's internationalisation support, try

    data:text/html,<div lang="nl" style="text-transform:capitalize">ijmuiden
In Firefox, this displays correctly as "IJmuiden" (thanks to the lang attribute; without that, it would show "Ijmuiden").
Re:Implementing a Tiny CPU Rasterizer on Friday November 01, 2024 @07:33PM (#42022635)
It looks like for some reason Firefox isn't being served the same source as Safari or Chrome. In those browsers, the filename is wrapped in <center>, <a>, and <tt> elements, and followed by <hr> <br>.

But in the version of the HTML that Firefox receives, all that is missing and the filename is just some text that ends up immediately in front of the first line of code.

Re:The almost lost art of rosin potatoes on Friday November 01, 2024 @07:18PM (#42022513)
That's how my mother used to do it, but I've found that you don't actually need to use "lots of fat" -- you can get good results with much less (just enough oil or goose fat to cover the bottom of the roasting tray), provided you toss the potatoes in it (pre-heated) when putting them in, and turn them a few times during cooking.

The variety of potatoes used is also a critical factor.

For something that's more of a substantial story than things like Cars & Trucks or Busy Busy Town, let me put in a word for Peasant Pig and the Terrible Dragon. My kids had it pretty much memorized long before they could read it for themselves.
Re:Font with Built-In Syntax Highlighting on Thursday August 15, 2024 @11:58AM (#41257488)
Another issue you'd run into, I suspect, is that in practice text engines/editors/etc will often repaint only fragments of the content, and so the syntax highlighter would not necessarily see all the context it needs.

E.g. if you have a comment that starts with "/*" and ends several lines later with "*/", but the editor decides to just redraw a line in the middle, the highlighter won't "know" to use the comment color as the text-drawing operation won't include the delimiters.

(This issue already exists in a small way, as mentioned in https://news.ycombinator.com/item?id=41251114, but it'd only get worse as the syntax highlighter becomes more sophisticated.)

Re:Font with Built-In Syntax Highlighting on Thursday August 15, 2024 @11:43AM (#41257355)
A minor detail, but the MIME type should be `font/woff` (or `font/woff2` if appropriate), not the nonstandard `application/x-...`.

(E.g. see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...)

Re:Font with Built-In Syntax Highlighting on Wednesday August 14, 2024 @07:50PM (#41251917)
I tried it (via Firefox DevTools) on your example page by inserting a @font-palette-values rule alongside the @font-face that loads the font:

    @font-palette-values --mycolors {
      font-family: Monaspace;
      base-palette: 0;
      override-colors: 0 red, 1 green, 2 blue,
                       3 magenta, 4 cyan, 5 yellow;
    }
(I just picked some arbitrary colors as a proof-of-concept; they don't actually look good.) Then adding the property:

    font-palette: --mycolors;
to the textarea element causes it to use these colors instead of the defaults in the font.
Re:Font with Built-In Syntax Highlighting on Wednesday August 14, 2024 @07:21PM (#41251627)
Interesting - thanks. I'm on 17.1; time to apply a macOS update, I guess.
Re:Font with Built-In Syntax Highlighting on Wednesday August 14, 2024 @07:20PM (#41251608)
Would LaTeX apply the 'calt' lookups? I don't think so.

XeLaTeX or LuaLaTeX should be able to do that, though I'm not sure offhand whether they successfully embed color fonts into the output PDF.

Re:Font with Built-In Syntax Highlighting on Wednesday August 14, 2024 @07:11PM (#41251494)
It's definitely going to be significantly slower as a result of all the contextual lookups.

To get an idea, I repeatedly duplicated the CSS in the "tiny sandbox" until there were nearly 20,000 lines there, and then profiled the operation of changing the font-size by 1px in Firefox. Reflowing the textbox took about 1.6 seconds.

With `font-feature-settings: "calt" off` applied, so that the contextual lookups aren't being run, a font-size change for that same textbox content reflows in about 100 milliseconds.

(I don't have actual timings for the same example in Chrome, but subjectively, with "calt" disabled, the resize is near-instant, whereas with it enabled, it's quite laggy, similar to Firefox.)

Re:Font with Built-In Syntax Highlighting on Wednesday August 14, 2024 @06:43PM (#41251301)
What a fun hack!

One small note: the post seems slightly confused about the use of OpenType features, as it calls for:

    font-feature-settings: "colr", "calt";
but there's no 'colr' feature tag in the font's OpenType layout tables, so that's meaningless here.

I suppose this was intended to "activate" the color glyph table (COLR) in the font; but that isn't an OpenType layout feature that would be controlled by font-feature-settings, and doesn't need to be "turned on" like this.

(In addition, the 'calt' feature is (according to the spec[1]) supposed to be active by default, so it shouldn't be necessary to explicitly set it either. And indeed, the font works for me in both Firefox and Chrome without this rule; sadly Safari doesn't seem to handle it.)

[1] https://learn.microsoft.com/en-gb/typography/opentype/spec/f...

Re:Of Mice and Men and Magdalen on Tuesday August 13, 2024 @07:58PM (#41241142)
Hello, Molesworth major.
Wow, that brings back memories! I still have a copy of BCPL: the language and its compiler on my shelf, though I admit I haven't looked at it in years. But spent¹ many happy hours with BCPL back in the early 80s. (It was that, Fortran, or Pascal; we didn't have a C compiler on the University system. Oh, there was also Algol68C, but I never really got into that.)

¹Perhaps my tutor would've said "wasted", as it had nothing to do with my courses. But I learned a lot, anyhow.

Older »