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•7mo ago

Comments

yxhuvud•6mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•6mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•6mo 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•6mo 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•6mo 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•6mo 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.

Can Dutch universities do without Microsoft?

https://dub.uu.nl/en/news/can-dutch-universities-do-without-microsoft
123•robtherobber•2h ago•95 comments

Poll HN: What operating system do you primarily develop on?

7•dennis-tra•8m ago•0 comments

C++ Web Server on my custom hobby OS

https://oshub.org/projects/retros-32/posts/getting-a-webserver-running
23•joexbayer•55m ago•3 comments

So you wanna build a local RAG?

https://blog.yakkomajuri.com/blog/local-rag
32•pedriquepacheco•1h ago•3 comments

Bringing Sexy Back. Internet surveillance has killed eroticism

https://lux-magazine.com/article/privacy-eroticism/
79•eustoria•1h ago•22 comments

Don't tug on that, you never know what it might be attached to

https://blog.plover.com/2016/07/01/#tmpdir
50•todsacerdoti•2h ago•10 comments

Show HN: An LLM-Powered Tool to Catch PCB Schematic Mistakes

https://netlist.io/
12•wafflesfreak•40m ago•3 comments

True P2P Email on Top of Yggdrasil Network

https://github.com/JB-SelfCompany/Tyr
36•basemi•1h ago•7 comments

Meta hiding $27B in debt using advanced geometry

https://stohl.substack.com/p/exclusive-credit-report-shows-meta
172•FreeQueso•2h ago•80 comments

Atuin’s New Runbook Execution Engine

https://blog.atuin.sh/introducing-the-new-runbook-execution-engine/
65•emschwartz•3d ago•8 comments

JSON Schema Demystified: Dialects, Vocabularies and Metaschemas

https://www.iankduncan.com/engineering/2025-11-24-json-schema-demystified/
9•navigate8310•36m ago•0 comments

Show HN: Glasses to detect smart-glasses that have cameras

https://github.com/NullPxl/banrays
419•nullpxl•12h ago•151 comments

AI Adoption Rates Starting to Flatten Out

https://www.apolloacademy.com/ai-adoption-rates-starting-to-flatten-out/
88•toomuchtodo•1h ago•38 comments

28M Hacker News comments as vector embedding search dataset

https://clickhouse.com/docs/getting-started/example-datasets/hackernews-vector-search-dataset
3•walterbell•9m ago•0 comments

Rock Paper Scissors Solitaire

https://klezlab.it/rock-paper-scissors-solitaire.html
4•klez•17m ago•1 comments

Petition to formally recognize open source work as civic service in Germany

https://www.openpetition.de/petition/online/anerkennung-von-open-source-arbeit-als-ehrenamt-in-de...
363•PhilippGille•4h ago•93 comments

Tech Titans Amass Multimillion-Dollar War Chests to Fight AI Regulation

https://www.wsj.com/tech/ai/tech-titans-amass-multimillion-dollar-war-chests-to-fight-ai-regulati...
147•thm•8h ago•147 comments

Moss: a Rust Linux-compatible kernel in 26,000 lines of code

https://github.com/hexagonal-sun/moss
310•hexagonal-sun•6d ago•78 comments

Pocketbase – open-source realtime back end in 1 file

https://pocketbase.io/
555•modinfo•14h ago•152 comments

Stellantis Is Spamming Owners' Screens with Pop-Up Ads for New Car Discounts

https://www.thedrive.com/news/stellantis-is-spamming-owners-screens-with-pop-up-ads-for-new-car-d...
53•cf100clunk•1h ago•20 comments

Generating 3D Meshes from Text

https://cprimozic.net/notes/posts/generating-3d-meshes-from-text/
12•todsacerdoti•2h ago•1 comments

The Signal Is the Noise

https://www.magazine.dirt.fyi/p/the-signal-is-the-noise
12•surprisetalk•2h ago•4 comments

Apple and Intel Rumored to Partner on Mac Chips

https://www.macrumors.com/2025/11/28/intel-rumored-to-supply-new-mac-chip/
44•bigyabai•1h ago•15 comments

A Tale of Four Fuzzers

https://tigerbeetle.com/blog/2025-11-28-tale-of-four-fuzzers/
46•jorangreef•5h ago•13 comments

Lobsters Interview

https://susam.net/my-lobsters-interview.html
4•blenderob•1h ago•1 comments

Anti-patterns while working with LLMs

https://instavm.io/blog/llm-anti-patterns
4•mkagenius•54m ago•0 comments

A Remarkable Assertion from A16Z

https://nealstephenson.substack.com/p/a-remarkable-assertion-from-a16z
248•boplicity•5h ago•98 comments

Tell HN: Want a better HN? Visit /newest

191•alecco•2h ago•59 comments

Swedish publishers file police report against Meta's Zuckerberg for fraud

https://www.sverigesradio.se/artikel/swedish-publishers-file-police-report-against-metas-zuckerbe...
73•Frieren•2h ago•24 comments

Writing Builds Resilience in Everyday Challenges by Changing Your Brain

https://scienceclock.com/writing-builds-resilience-in-everyday-challenges-by-changing-your-brain/
20•PikelEmi•4h ago•3 comments