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.

Hybrid Reasoning Agents: LLM agents that think in latent space, act through text

https://arxiv.org/abs/2610.18861
241•allinonai•6h ago•147 comments

William Gibson and the trademarking of cyberspace

https://colo.to/cyberspace.html
83•Eric_Gullichsen•3h ago•5 comments

There's never been a better time to go into math (by: 3blue1brown) [video]

https://www.youtube.com/watch?v=LKrwhjOI8Nc
204•mdp2021•1d ago•198 comments

If you don't run your own LLM proxy, how do you know whats going on?

https://jrdsgl.com/if-you-dont-run-your-own-llm-proxy-how-the-fuck-do-you-even-know-whats-going-on/
50•amrrs•5h ago•38 comments

Someone behind the software

https://karrisaarinen.com/posts/someone-behind-the-software/
333•tosh•10h ago•139 comments

Laptop Based on 6502 CPU

https://www.maddox.pro/?p=448
49•nanochess•3d ago•17 comments

RepRapMicron

https://github.com/VikOlliver/RepRapMicron/wiki
338•RobotToaster•13h ago•55 comments

Free Pascal compiler now supports dynamic packages

https://www.getlazarus.org/dynamic/
117•sysrpl•8h ago•24 comments

Dogs seem to agree with humans that 'bouba' is round and 'kiki' is spiky

https://www.sciencealert.com/dogs-seem-to-agree-with-humans-that-bouba-is-round-and-kiki-is-spiky
143•gmays•1d ago•86 comments

Show HN: WhatsApp MCP running free on Cloudflare

https://github.com/finereli/whatsapp-mcp
50•zoozla•5h ago•35 comments

Starcraft: Ashfall

https://starcraft-shooter-2026.pages.dev/
10•debo_•1h ago•2 comments

I built a programming language that LLMs can't use

https://blog.picheta.me/post/killswitch-lang/
98•dom96•1d ago•78 comments

PalmOS Lemmings

https://github.com/ardiri/palmos-lemmings
99•memalign•9h ago•23 comments

How Quickly Can the DoD Rebuild and Recast the Munitions Industrial Base?

https://www.csis.org/analysis/how-quickly-can-dod-rebuild-and-recast-munitions-industrial-base
9•gmays•3h ago•0 comments

One parser, two bugs, many routers: Exploiting Broadcom WiFi across eCos, Linux

https://quentinkaiser.be/security/2026/10/16/one-parser-two-bugs/
55•zoobab•2d ago•9 comments

Superlite: A Faster Alternatie to Superpowers

https://contextfirst.blog/superlite-hand-an-agent-a-spec/
3•iheatuchriswogu•57m ago•0 comments

"Traditional, but Puzzling"

https://unsung.aresluna.org/traditional-but-puzzling/
25•colinprince•2d ago•3 comments

The DNS Museum

https://dns.museum
7•zdw•2d ago•0 comments

16-bit fully functional DIY magnetic core memory

https://www.youtube.com/watch?v=OJ1WYyO2jdY
39•oliculipolicula•4d ago•18 comments

The First Candid

https://www.newyorker.com/magazine/2026/10/19/the-first-candid
47•Thevet•2d ago•11 comments

A new way to think about borrow checking (in reverse)

https://verdagon.dev/blog/reverse-borrow-checking
26•verdagon•14h ago•4 comments

Java sealed classes and exhaustive pattern matching

https://neilmadden.blog/2026/04/24/java-sealed-classes-and-exhaustive-pattern-matching/
143•hnisjafx40•12h ago•106 comments

"I'm on a war footing": Terry Tao and the crisis in math

https://www.nytimes.com/2026/10/16/us/math-ai-terence-tao.html
106•vinipolicena•2d ago•168 comments

What the heck is /pkg?

https://anderegg.ca/2026/10/18/what-the-heck-is-pkg
22•GavinAnderegg•9h ago•9 comments

The Intel 8087 chip: floating-point addition and subtraction

https://www.righto.com/2026/10/8087-addition-subtraction-microcode.html
92•pwg•10h ago•33 comments

Footage of the Flock search that a judge ruled was uncosntitutional

https://www.404media.co/watch-footage-of-the-flock-search-a-judge-ruled-unconstitutional/
16•anigbrowl•1h ago•5 comments

Namecheap just seized and disabled all my domains

https://www.reddit.com/r/sysadmin/comments/1x8cycd/namecheap_just_seized_and_disabled_all_my_doma...
456•sashk•10h ago•217 comments

Open MicroManipulator – A sub-micrometer 3D motion control plattform

https://github.com/0x23/MicroManipulatorStepper
177•_Microft•15h ago•13 comments

SIGSALY: Churchill's top secret hotline to the president

https://www.iwm.org.uk/history/iwm/cwr/telephone
115•stmw•4d ago•40 comments

Developing for Debugging (2025)

https://www.davepacheco.net/blog/2025/developing-for-debugging-dns-propagation/
32•mpweiher•1d ago•0 comments