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.

Running local models is good now

https://vickiboykis.com/2026/06/15/running-local-models-is-good-now/
617•jfb•4h ago•283 comments

Claude: Elevated errors across many models

https://status.claude.com/incidents/xmhsglsz3h3w
123•forks•1h ago•96 comments

SpaceX to buy Cursor for $60B

https://www.reuters.com/legal/transactional/spacex-buy-anysphere-60-billion-2026-06-16/
554•itsmarcelg•8h ago•946 comments

TIL: You can make HTTP requests without curl using Bash /dev/TCP

https://mareksuppa.com/til/bash-dev-tcp-http-without-curl/
90•mrshu•2h ago•54 comments

Mechanical Watch (2022)

https://ciechanow.ski/mechanical-watch/
530•razin•7h ago•98 comments

GPT‑NL: a sovereign language model for the Netherlands

https://www.tno.nl/en/digital/artificial-intelligence/gpt-nl/
29•root-parent•1h ago•8 comments

Calvin and Hobbes and the price of integrity

https://therepublicofletters.substack.com/p/calvin-and-hobbes-and-the-price-of
43•pseudolus•3h ago•12 comments

But yak shaving is fun

https://parksb.github.io/en/article/32.html
110•parksb•4h ago•29 comments

Apple's weird anti-nausea dots cured my car sickness

https://www.theverge.com/tech/942854/apple-vehicle-motion-cues-review-really-work
240•neilfrndes•2h ago•85 comments

Making ast.walk 220x Faster

https://reflex.dev/blog/why-ast-walk-when-you-can-ast-sprint/
46•palashawas•2h ago•10 comments

10Gb/s Ethernet: switching to a Broadcom SFP+ module

https://www.gilesthomas.com/2026/06/10g-ethernet-switching-to-broadcom-sfp-plus
21•gpjt•1h ago•15 comments

Stop Using JWTs

https://gist.github.com/samsch/0d1f3d3b4745d778f78b230cf6061452
35•dzonga•2h ago•15 comments

Correlated randomness in Slay the Spire 2

https://tck.mn/blog/correlated-randomness-sts2/
230•rdmuser•9h ago•74 comments

SubQ 1.1 Small

https://subq.ai/subq-1-1-small-technical-report
76•EDM115•4h ago•35 comments

I admire Fabrice Bellard. He is almost certainly a better overall programmer

https://twitter.com/ID_AA_Carmack/status/2064095424420487226
771•apitman•14h ago•367 comments

Why is Meta destroying its engineering organization?

https://newsletter.pragmaticengineer.com/p/why-is-meta-destroying-its-engineering
154•throwarayes•2h ago•94 comments

Has AI already killed self-help nonfiction books?

https://tim.blog/2026/06/12/has-ai-already-killed-nonfiction/
12•imakwana•1h ago•9 comments

After AI Takes Everything

https://ursb.me/en/posts/after-ai-takes-everything/
66•speckx•3h ago•57 comments

The time the x86 emulator team found code so bad they fixed it during emulation

https://devblogs.microsoft.com/oldnewthing/20260615-00/?p=112419
452•paulmooreparks•14h ago•147 comments

Qwen-Robot Suite: A Foundation Model Suite for Physical World Intelligence

https://qwen.ai/blog?id=qwen-robotsuite
57•ilreb•5h ago•6 comments

Formal Methods and the Future of Programming

https://blog.janestreet.com/formal-methods-at-jane-street-index/
26•nextos•4d ago•1 comments

Cooling at the Speed of Light

https://cacm.acm.org/news/cooling-at-the-speed-of-light/
10•sohkamyung•3d ago•1 comments

An interview with an Apple emoji designer

https://shadycharacters.co.uk/2026/06/ollie-wagner/
73•nate•3d ago•37 comments

The octopus architecture for AI agents

https://blog.goodman.dev/blog/octopus-agent-architecture/
11•joshbetz•1h ago•2 comments

'Ghost jobs' could soon be illegal in New York

https://www.fastcompany.com/91558427/ghost-jobs-could-soon-be-illegal-in-new-york
59•toomuchtodo•2h ago•28 comments

Getting Creative with Perlin Noise Fields

https://sighack.com/post/getting-creative-with-perlin-noise-fields
134•0x000xca0xfe•2d ago•21 comments

Unicorn – The Ultimate CPU Emulator

https://www.unicorn-engine.org/
71•tosh•7h ago•20 comments

Specs Augmented Reality Glasses

https://newsroom.snap.com/introducing-specs-augmented-reality-glasses
26•haberdasher•2h ago•13 comments

Flip TABLE: storing arbitrary data in iNaturalist

https://exclav.es/2026/06/13/flip-table-storing-arbitrary-data-in-inaturalist/
4•evakhoury•23h ago•0 comments

Show HN: Garden of Flowers – an archive of pictorial typography before ASCII art

https://garden-of-flowers.heikkilotvonen.com/
130•california-og•14h ago•21 comments