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•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.

An OpenAI model has disproved a central conjecture in discrete geometry

https://openai.com/index/model-disproves-discrete-geometry-conjecture/
1090•tedsanders•13h ago•790 comments

GitHub confirms breach of 3,800 repos via malicious VSCode extension

https://www.bleepingcomputer.com/news/security/github-confirms-breach-of-3-800-repos-via-maliciou...
792•Timofeibu•18h ago•314 comments

Haskell Foundation 2026 Update

https://discourse.haskell.org/t/haskell-foundation-2026-update/14136
102•azhenley•6h ago•24 comments

Vivaldi 8.0

https://vivaldi.com/blog/vivaldi-on-desktop-8-0/
68•OuterVale•1h ago•20 comments

Show HN: I reverse engineered Apple's video wallpapers

https://github.com/kageroumado/phosphene
251•kageroumado•8h ago•47 comments

New features in GCC 16: Improved error messages and SARIF output

https://developers.redhat.com/articles/2026/04/28/gcc-16-improved-error-messages-sarif-output
65•siteshwar•2d ago•10 comments

Typewise (YC S22) Is Hiring an AI Growth Engineer (Zurich or Remote)

https://www.ycombinator.com/companies/typewise/jobs/HmCzfBK-ai-growth-engineer
1•janisberneker•30m ago

DOS Zone

https://dos.zone/
240•rglover•9h ago•47 comments

The Letter S, by Donald Knuth (1980) [pdf]

https://gwern.net/doc/design/typography/1980-knuth.pdf
148•bambax•8h ago•19 comments

Flipper One Tech Specs

https://docs.flipper.net/one/general/tech-specs
355•gregsadetsky•13h ago•127 comments

Anthropic is expanding to Colossus2. Will use GB200

https://twitter.com/nottombrown/status/2057194829986300375
172•aurareturn•11h ago•159 comments

Simulating Infinity in Conway's Game of Life with Modern C++

https://ryanjk5.github.io/posts/GOLDE/
27•HeliumHydride•2d ago•2 comments

Archaeologists find Egyptian mummy buried with the 'Iliad'

https://www.openculture.com/2026/05/archaeologists-discover-ancient-egyptian-mummy-buried-with-pa...
125•diodorus•5d ago•87 comments

How fast is N tokens per second really?

https://mikeveerman.github.io/tokenspeed/
396•hexagr•3d ago•78 comments

All the bugs they found

https://andreapivetta.com/posts/all-the-bugs-they-found.html
13•ziggy42•1d ago•1 comments

What is a Demand Coop

https://cahootzcoops.com/blog/what-is-a-demand-coop
54•DeonRob•7h ago•54 comments

Show HN: I made a tactical map-based WWII submarine simulator (public beta)

https://silentshark.app/alpha/
28•epaga•2d ago•12 comments

OpenAI Is Preparing to File for an IPO Soon

https://www.wsj.com/tech/ai/openai-is-preparing-to-file-for-an-ipo-very-soon-0ec95af5
76•louiereederson•16h ago•173 comments

Reviving old scanners with an in-browser Linux VM bridged to WebUSB over USB/IP

https://yes-we-scan.app/details
69•gmac•2d ago•24 comments

Saying goodbye to asm.js

https://spidermonkey.dev/blog/2026/05/20/saying-goodbye-to-asmjs.html
370•eqrion•20h ago•144 comments

Your Most Improbable Life

https://kevinkelly.substack.com/p/your-most-improbable-life
93•jger15•2d ago•67 comments

Recreate famous water profiles using supermarket bottled water

https://www.waterdictionary.net
35•smugglerFlynn•2d ago•19 comments

Intuit to lay off over 3k employees to refocus on AI

https://techcrunch.com/2026/05/20/intuit-to-lay-off-over-3000-employees-to-refocus-on-ai/
179•wapasta•7h ago•132 comments

Qian Xuesen: The missile genius America lost and China gained (2025)

https://www.usni.org/magazines/naval-history/2025/december/missile-genius-america-lost-and-china-...
168•thnaks•14h ago•87 comments

A Markdown-based test suite

https://blogsystem5.substack.com/p/markdown-based-test-suite
36•zdw•2d ago•9 comments

Google’s AI is being manipulated. The search giant is quietly fighting back

https://www.bbc.com/future/article/20260519-google-tackles-attempts-to-hack-its-ai-results
306•tigerlily•21h ago•191 comments

Why is Inkwell stuck in review

https://www.manton.org/2026/05/19/why-is-inkwell-stuck-in.html
137•speckx•15h ago•45 comments

Learnings from 100K lines of Rust with AI (2025)

https://zfhuang99.github.io/rust/claude%20code/codex/contracts/spec-driven%20development/2025/12/...
148•pramodbiligiri•22h ago•155 comments

SBCL: the ultimate assembly code breadboard (2014)

https://pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-code-breadboard/
148•yacin•16h ago•8 comments

SpaceX S-1

https://www.sec.gov/Archives/edgar/data/1181412/000162828026036936/spaceexplorationtechnologi.htm
361•cachecow•11h ago•279 comments