frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Fast(er) regular expression engines in Ruby

https://serpapi.com/blog/faster-regular-expression-engines-in-ruby/
60•davidsojevic•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo ago
> Another nuance was found in ruby, which cannot scan the haystack with invalid UTF-8 byte sequences.

This is extremely basic ruby: UTF-8 encoded strings must be valid UTF-8. This is not unique to ruby. If I recall correctly, python 3 does the same thing.

    2.7.1 :001 > haystack = "\xfc\xa1\xa1\xa1\xa1\xa1abc"
    2.7.1 :003 > haystack.force_encoding "ASCII-8BIT"
    => "\xFC\xA1\xA1\xA1\xA1\xA1abc" 
    2.7.1 :004 > haystack.scan(/.+/)
    => ["\xFC\xA1\xA1\xA1\xA1\xA1abc"]
This person is a senior engineer on their Team page. All they had to do was google "ArgumentError: invalid byte sequence in UTF-8". Or ask a coworker... the company has Ruby on Rails applications. headdesk
burntsushi•11mo ago
The nuance is specifically relevant here because neither of the other two regex engines benchmarked have this requirement. It's doubly relevant because that means running a regex search doesn't require a UTF-8 validation step, and is therefore likely beneficial from a perf perspective, dependening on the workload.
kayodelycaon•11mo ago
That’s a good point. I hadn’t considered it because I’ve hit the validation error long before getting to search. It is possible to avoid string operations with careful coding prior to the search.

Edit: After a little testing, the strings can be read from and written to files without triggering validation. Presumably this applies to sockets as well.

DmitryOlshansky•11mo ago
I wonder how std.regex of dlang would fare in such test. Sadly due to a tiny bit of D’s GC use it’s hard to provide as a library for other languages. If there is an interest I might take it through the tests.

A Brief History of Fish Sauce

https://www.legalnomads.com/fish-sauce/
121•vinhnx•20h ago•55 comments

Vercel April 2026 security incident

https://www.bleepingcomputer.com/news/security/vercel-confirms-breach-as-hackers-claim-to-be-sell...
610•colesantiago•14h ago•345 comments

The Bromine Chokepoint

https://warontherocks.com/cogs-of-war/the-bromine-chokepoint-how-strife-in-the-middle-east-could-...
176•crescit_eundo•10h ago•81 comments

Show HN: Run TRELLIS.2 Image-to-3D generation natively on Apple Silicon

https://github.com/shivampkumar/trellis-mac
110•shivampkumar•4h ago•19 comments

Stop trying to engineer your way out of listening to people

https://ashley.rolfmore.com/stop-trying-to-engineer-your-way-out-of-listening-to-people/
80•walterbell•8h ago•18 comments

Turtle WoW classic server announces shutdown after Blizzard wins injunction

https://www.pcgamer.com/games/world-of-warcraft/turtle-wow-classic-server-announces-shutdown-afte...
163•Brajeshwar•12h ago•137 comments

Sudo for Windows

https://github.com/microsoft/sudo
33•luispa•4h ago•11 comments

Swiss AI Initiative (2023)

https://www.swiss-ai.org
33•doener•5h ago•10 comments

Claude Token Counter, now with model comparisons

https://simonwillison.net/2026/Apr/20/claude-token-counts/
21•twapi•3h ago•4 comments

Mechanical Keyboard Sounds – A listening Museum

https://sheets.works/data-viz/keyboard-sounds
60•akashwadhwani35•4d ago•23 comments

Changes in the system prompt between Claude Opus 4.6 and 4.7

https://simonwillison.net/2026/Apr/18/opus-system-prompt/
251•pretext•18h ago•149 comments

2,100 Swiss municipalities showing which provider handles their official email

https://mxmap.ch/
96•doener•5h ago•28 comments

Prove you are a robot: CAPTCHAs for agents

https://browser-use.com/posts/prove-you-are-a-robot
73•lukasec•4d ago•36 comments

Recovering Windows Live Writer Files

https://benovermyer.com/blog/2026/04/recovering-windows-live-writer-files/
17•bovermyer•5d ago•4 comments

Scientific datasets are riddled with copy-paste errors

https://www.sciencedetective.org/scientific-datasets-are-riddled-with-copy-paste-errors/
56•jruohonen•9h ago•9 comments

Show HN: A lightweight way to make agents talk without paying for API usage

https://juanpabloaj.com/2026/04/16/a-lightweight-way-to-make-agents-talk-without-paying-for-api-u...
19•juanpabloaj•4h ago•4 comments

The RAM shortage could last years

https://www.theverge.com/ai-artificial-intelligence/914672/the-ram-shortage-could-last-years
232•omer_k•21h ago•255 comments

A Common MVP Evolution: Service to System Integration to Product (2017)

https://www.skmurphy.com/blog/2017/08/07/a-common-evolution-service-to-system-integration-to-prod...
7•skmurphy•2d ago•1 comments

Archive of BYTE magazine, starting with issue #1 in 1975

https://archive.org/details/byte-magazine-1975-09
551•DamnInteresting•2d ago•144 comments

Six Levels of Dark Mode (2024)

https://cssence.com/2024/six-levels-of-dark-mode/
60•Akcium•10h ago•26 comments

The seven programming ur-languages (2022)

https://madhadron.com/programming/seven_ur_languages.html
312•helloplanets•21h ago•117 comments

I wrote a CHIP-8 emulator in my own programming language

https://github.com/navid-m/chip8emu
57•pizza_man•9h ago•13 comments

Show HN: A working reference implementation of context engineering

https://github.com/outcomeops/context-engineering
37•linsys•2d ago•11 comments

Interesting Map Geometry and Mathematics

https://www.markrjohnsongames.com/2026/04/11/ultima-ratio-regum-0-11-update-57-interesting-map-ge...
15•Hooke•1d ago•0 comments

Nanopass Framework: Clean Compiler Creation Language

https://nanopass.org/
125•NordStreamYacht•4d ago•28 comments

Show HN: Faceoff – A terminal UI for following NHL games

https://www.vincentgregoire.com/faceoff/
106•vcf•10h ago•35 comments

SPEAKE(a)R: Turn Speakers to Microphones for Fun and Profit [pdf] (2017)

https://www.usenix.org/system/files/conference/woot17/woot17-paper-guri.pdf
169•Eridanus2•19h ago•69 comments

PopOS Linux: Creating a Bootable Backup USB With Encryption

https://hajo.me/blog/2026/02/16/popos-linux-creating-bootable-backup-USB-with-encryption/
13•fxtentacle•2d ago•1 comments

Show HN: Prompt-to-Excalidraw demo with Gemma 4 E2B in the browser (3.1GB)

https://teamchong.github.io/turboquant-wasm/draw.html
98•teamchong•17h ago•44 comments

Notion leaks email addresses of all editors of any public page

https://twitter.com/weezerOSINT/status/2045849358462222720
343•Tiberium•13h ago•121 comments