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.

Why isn't the industry freaking out about DeepSeek 4.1 Flash?

https://www.dgt.is/blog/2026-10-07-deepseek-freek-out/
622•jonotime•1d ago•484 comments

Whistle: Speech to Text in 16.9 MB

https://cactuscompute.com/blog/whistle
711•gmays•14h ago•144 comments

Show HN: Quake ported to safe Rust, playable in browser

https://quake-srp.pages.dev/
115•ilreb•1h ago•94 comments

Keyboard differences between Windows and Macs

https://unsung.aresluna.org/deeper-dive-keyboard-differences-between-windows-and-macs/
78•sohkamyung•4h ago•78 comments

Man discovers his parents' coffee machine used 1TB of data in 10 days

https://www.dexerto.com/entertainment/man-discovers-his-parents-coffee-machine-used-1tb-of-data-i...
611•ck2•1d ago•366 comments

Theranos.world

https://www.theranos.world/
404•kbyatnal•13h ago•144 comments

I hired an illustrator to draw my house. Now it's my Home Assistant dashboard

https://antonfrolov.substack.com/p/i-hired-an-illustrator-to-draw-my
550•soheilpro•2d ago•96 comments

Reducing undefined behavior in the C language

https://lwn.net/Articles/1095811/
93•signa11•5h ago•70 comments

Yes, and

https://htmx.org/essays/yes-and/
349•Michelangelo11•21h ago•106 comments

OpenAI, the Partition Principle, and Mathematics

https://karagila.org/2026/openai-pp/
95•md224•7h ago•137 comments

The value of not getting to the point (2015)

https://ken.arneson.name/2015/11/the-value-of-not-getting-to-the-point/
151•NaOH•12h ago•52 comments

AI-ready biological data: $1.8B global commitment

https://biohub.org/news/virtual-biology-initiative-expansion/
112•ray__•10h ago•17 comments

ETH-68: Ethernet Audio Interface for Linux

https://naturalsystems.io/eth68
141•chabad360•1d ago•84 comments

Ask HN: What do you run on a $5 VPS that's worth keeping online 24/7?

203•mariocesar•2d ago•296 comments

Beauty in DVD Menus

https://vale.rocks/posts/dvd-menus
294•speckx•17h ago•157 comments

What should we tell our students?

https://terrytao.wordpress.com/2026/10/08/what-should-we-tell-our-students/
83•sajid•4h ago•81 comments

Show HN: Making a flexible "neon" t-shirt with LED filaments

http://scottbezek.blogspot.com/2026/10/making-flexible-neon-t-shirt-with-leds.html
154•scottbez1•14h ago•30 comments

DuckDB Ducklake

https://github.com/duckdb/ducklake
164•saikatsg•1d ago•21 comments

A Terminal Protocol for Program Status (OSC 7501)

https://mitchellh.com/writing/program-status-osc7501
138•mfiguiere•2d ago•46 comments

Step 5 Preview, a 1M-context MoE from StepFun, shows up on OpenRouter

https://openrouter.ai/stepfun/step-5-preview
125•AnneWodell•14h ago•30 comments

Bevy 0.20

https://bevy.org/news/bevy-0-20/
143•Philpax•8h ago•26 comments

A 5.3M-year-old deep-sea whale necropolis in the Diamantina Zone

https://www.nature.com/articles/s41586-026-10546-z
126•bryanrasmussen•1d ago•9 comments

Scaling and benchmarking a critical message bus using a new indexing strategy

https://blog.janestreet.com/scaling-and-benchmarking-a-critical-message-bus/
39•eatonphil•13h ago•3 comments

ADHD as a circadian rhythm disorder: evidence and implications for chronotherapy (2025)

https://www.frontiersin.org/journals/psychiatry/articles/10.3389/fpsyt.2025.1697900/full
271•bookofjoe•10h ago•164 comments

Show HN: Jevman – AI decision models play Pac-Man

https://opper.ai/jevman-benchmark/
60•felix089•14h ago•11 comments

OpenAI withdraws three mathematical results

https://twitter.com/danintheory/status/2108065033070789090
290•sashank_1509•1d ago•567 comments

Orkut.com

https://orkut.com/
181•andreynering•17h ago•133 comments

Archaeologists Are Reconstructing the 'Invisible' Technologies of the Stone Age

https://www.smithsonianmag.com/science-nature/archaeologists-are-reconstructing-the-invisible-tec...
125•Hooke•1d ago•55 comments

I think I found a planet nobody knew existed. I used Claude Code to find it

https://www.reddit.com/r/ClaudeAI/s/mbe5IY2LF9
150•pyduan•1d ago•66 comments

US man given prison sentence for bot-farming music streams

https://thequietus.com/news/us-man-given-prison-sentence-for-bot-farming-music-streams/
169•cdrnsf•1d ago•259 comments