frontpage.
newsnewestaskshowjobs

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•1y ago

Comments

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

Deno Desktop

https://docs.deno.com/runtime/desktop/
675•GeneralMaximus•8h ago•260 comments

window.showDirectoryPicker opens up a whole new world

https://steveharrison.dev/showdirectorypicker-opens-up-a-whole-new-world/
31•steveharrison•1h ago•26 comments

GLM 5.2 vs. Opus

https://techstackups.com/comparisons/glm-5.2-vs-opus/
255•ritzaco•6h ago•198 comments

Codex logging bug may write TBs to local SSDs

https://github.com/openai/codex/issues/28224
232•vantareed•6h ago•133 comments

Pledging Another $400k to the Zig Software Foundation

https://mitchellh.com/writing/zig-donation-2026
3•tosh•9m ago•0 comments

Help I accidentally a wigglegram

https://lmao.center/blog/wiggle-accidents/
365•gregsadetsky•2d ago•78 comments

Did my old job only exist because of fraud?

https://david.newgas.net/did-my-old-job-only-exist-because-of-fraud/
678•advisedwang•16h ago•299 comments

Munich 1991: The Roots of the Current AI Boom

https://people.idsia.ch/~juergen/ai-boom-roots-munich-1991.html
139•tosh•2d ago•55 comments

Apertus – Open Foundation Model for Sovereign AI

https://apertvs.ai/
459•T-A•16h ago•156 comments

Investors get real-time view of UK bond market activity for the first time

https://www.fca.org.uk/news/press-releases/investors-get-real-time-view-uk-bond-market-activity-f...
64•monkeydust•6h ago•29 comments

There is minimal downside to switching to open models

https://www.marble.onl/posts/cancel_claude.html
295•amarble•16h ago•248 comments

Manticore Search 27.1.5: Auth, sharding, conversational and faster vector search

https://manticoresearch.com/blog/manticore-search-27-1-5/
20•snikolaev•3h ago•0 comments

Sakana Fugu

https://sakana.ai/fugu/
158•Finbarr•11h ago•92 comments

Maria Isabel Sánchez Vegara on Her 100th "Little People, Big Dreams" Book

https://www.amightygirl.com/blog?p=36753
4•zeristor•2d ago•0 comments

Why Drawing Tablet Brands Won't Collaborate on Linux Floss Drivers

https://www.davidrevoy.com/article1154/why-drawing-tablet-brands-wont-collaborate-on-linux-floss-...
40•Tomte•1h ago•4 comments

My 1992 view of the problems of computer programming in 1992

https://blog.plover.com/prog/fortran-i.html
57•speckx•2d ago•18 comments

Memory Safe Inline Assembly

https://fil-c.org/inlineasm
138•pizlonator•2d ago•30 comments

Everything is logarithms

https://alexkritchevsky.com/2026/05/25/everything-is-logarithms.html
255•E-Reverance•16h ago•55 comments

Good results fine tuning a local LLM like Qwen 3:0.6B to categorize questions

https://www.teachmecoolstuff.com/viewarticle/fine-tuning-a-local-llm-to-categorize-questions
171•dev-experiments•14h ago•33 comments

Becoming a dad changes men's brains

https://www.scientificamerican.com/article/how-becoming-a-dad-changes-mens-brains/
20•momentmaker•1h ago•8 comments

Lisp in the Rust Type System

https://github.com/playX18/lisp-in-types/
85•quasigloam•2d ago•5 comments

JSON-LD explained for personal websites

https://hawksley.dev/blog/json-ld-explained-for-personal-websites/
243•ethanhawksley•19h ago•76 comments

Danish privacy activist Lars Andersen raided by police

https://twitter.com/LarsAnders1620/status/2068208864747540516#m
323•I_am_tiberius•9h ago•275 comments

Alan Greenspan Dies at 100; Led Fed During Boom Before 2008 Bust

https://www.bloomberg.com/news/articles/2026-06-22/alan-greenspan-dies-at-100-led-fed-during-boom...
33•helsinkiandrew•2h ago•2 comments

Writing Postcards with a 3D Printer

https://severinbucher.com/posts/writing-postcards-with-a-3d-printer/
34•typesafeJ•3d ago•17 comments

Japanese verb conjugation the simple hard way

https://underreacted.leaflet.pub/3mmevu6woys27
127•valzevul•14h ago•196 comments

How I play video games with spinal muscular atrophy

https://www.openassistivetech.org/how-i-actually-play-video-games-with-sma-the-tools-i-use-every-...
138•dannyobrien•3d ago•18 comments

Show HN: Teach your kids perfect pitch

https://github.com/paytonjjones/bsharp
168•paytonjjones•1d ago•113 comments

Minecraft: Java Edition 26.2, the first version with Vulkan 1.2

https://www.minecraft.net/en-us/article/minecraft-java-edition-26-2
177•ObviouslyFlamer•5d ago•76 comments

Efficient C++ Programming for Modern 64-bit CPUs: Chapter 4/part 2

https://6it.dev/blog/infographics-operation-costs-in-cpu-clock-cycles-take-2-80736
80•birdculture•2d ago•17 comments