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.

Norway Should Buy OpenAI

https://www.onethousandmeans.com/p/norway-should-buy-openai
45•alexeigannon•18m ago•26 comments

Turbovec – Google's TurboQuant for vector search in Rust

https://github.com/RyanCodrai/turbovec
89•fittingopposite•1h ago•11 comments

Using the railway network as a flatbed scanner

https://philo.gay/linecam/
320•otherayden•7h ago•52 comments

The Amazon tax

https://seths.blog/2026/08/the-amazon-tax/
618•herbertl•6h ago•420 comments

Fixing a bricked Framework laptop

https://quantum5.ca/2026/08/16/fixing-bricked-amd-7040-series-framework-13-laptop-with-20-tools/
272•jp_sc•6h ago•179 comments

How does IKEA come up with names for its products?

https://www.ikea.com/se/en/customer-service/knowledge/articles/6f564c4d-2ccc-46de-b643-545a3948dc...
100•NaOH•1h ago•68 comments

Data centers raise nearby temperatures by up to 4 degrees in Phoenix

https://asmedigitalcollection.asme.org/sustainablebuildings/article/7/2/024501/1233035/Data-Cente...
200•cwwc•2h ago•224 comments

Cursor launches Origin, GitHub alternative

https://cursor.com/changelog/origin-code-hosting
301•tomasreimers•1d ago•240 comments

Linux 7.3 improves performance when running out of vRAM

https://pixelcluster.dev/VRAM-Overcommit/
455•flaburgan•11h ago•207 comments

Python Polars Cheatsheet (based on our O'Reilly book)

https://opensource.posit.co/resources/cheatsheets/polars/
119•jeroenjanssens•6h ago•17 comments

Launch HN: machine0 (YC S26) – Persistent CPU and GPU VMs from the CLI

https://machine0.io
33•bwm•3h ago•29 comments

Evolve: An incremental game about evolving a civilization

https://pmotschmann.github.io/Evolve/
25•frozenseven•3d ago•10 comments

Show HN: Argus, agentic QA for teams whose coding agents move faster than QA

https://github.com/argus-testing/argus
7•canergl•38m ago•2 comments

Splitting a Git Commit

https://blog.gnoack.org/post/git-history-split
89•signa11•3d ago•45 comments

2,500-year-old sculpture discovered at UNESCO site in Turkey

https://www.theartnewspaper.com/2026/08/07/colossal-2500-year-old-sculpture-discovered-turkey-une...
9•speckx•5d ago•1 comments

Memory prices climb 500% in 12 months

https://www.tomshardware.com/pc-components/ram/memory-prices-climb-500-percent-in-12-months-up-to...
270•haunter•1d ago•202 comments

We've flown a radiation-blocking vest to the Moon and back, and it worked

https://arstechnica.com/science/2026/08/weve-flown-a-radiation-blocking-vest-to-the-moon-and-back...
40•rbanffy•4d ago•20 comments

Beware Management Consultants

https://about.iceland.co.uk/our-story/the-dark-ages/beware-management-consultants/
3•KolmogorovComp•19m ago•0 comments

Teaching my kid to code with a modern MUD

https://tau.dev/2026/08/07/canon
187•andrewjanke•6d ago•56 comments

Pacing model development in an era of cyber-critical capabilities

https://openai.com/index/pacing-model-development-cyber-capabilities/
11•j4mie•1h ago•1 comments

US announces new sanctions on top ICC figures

https://www.bbc.com/news/articles/cnvnl0elz47o
73•root-parent•42m ago•27 comments

Superpowers, Not Superintelligence

https://bond.now/news/superpowers-not-superintelligence
27•edbernays•3h ago•37 comments

Show HN: PantheonGPU – GPU health testing and AI workload benchmarking

https://pantheongpu.com/
8•saqibkhan1992•1h ago•0 comments

Show HN: Openleetcode – local LeetCode runner where tests live in the repo

https://github.com/therepanic/openleetcode
28•therepanic•4h ago•11 comments

IndieWeb Homebrew Website Club Asia Pacific: Reflections

https://burgeonlab.com/blog/inaugural-hwc-ap-recap/
4•rdmuser•41m ago•0 comments

Universal health coverage could save $1T and 114k lives a year: study

https://ysph.yale.edu/news-article/universal-health-coverage-could-save-one-trillion-dollars-and-...
540•karakoram•1d ago•641 comments

Babies born under sugar rationing grew into adults with lower cancer risk

https://theconversation.com/babies-born-under-sugar-rationing-grew-into-adults-with-lower-cancer-...
192•zeristor•5h ago•41 comments

Claude Code May–August 2026 weekly limits promotion

https://support.claude.com/en/articles/15910845-claude-code-may-august-2026-weekly-limits-promotion
228•tyre•2h ago•183 comments

California's new tire efficiency rules could save drivers $1B a year

https://grist.org/transportation/californias-new-tire-efficiency-rules-could-save-drivers-1b-a-year/
100•littlexsparkee•16h ago•128 comments

Show HN: macOS data protection keychain for Electron apps

https://github.com/biw/keychain-store
11•biwills•2h ago•0 comments