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.

SpaceX catches the Starship to end Flight 15

https://www.spacex.com/launches/starship-flight-15
1253•ls612•13h ago•850 comments

Why did some Apollo missions carry a grenade launcher?

https://space.stackexchange.com/questions/37775
33•Skyfall106•1h ago•15 comments

Lovable apps expose passport details and more than 200K private messages

https://www.crissyfield.de/research/lovable-en/
843•armcat•17h ago•319 comments

Court denies motion to dismiss DRAM price fixing case

https://litnews.ai/articles/garciaguirre-samsung-sk-hynix-micron-dram-conspiracy-suit-survives-di...
179•ybathaee•9h ago•49 comments

A rare glimpse inside the high-risk, high-reward Hormuz trade

https://www.lloydslist.com/LL1158922/A-rare-glimpse-inside-the-highrisk-highreward-Hormuz-trade
76•everybodyknows•4d ago•53 comments

Handwritten 200-year-old dismissal notice found on roof tile

https://www.bbc.co.uk/news/articles/c6jdmdzv25r9o
19•nephihaha•2d ago•7 comments

How did Woz write the Apple 1 BASIC before building the computer?

https://retrocomputing.stackexchange.com/questions/17957
226•Skyfall106•12h ago•111 comments

Semicircle Packing

https://rorz.io/writing/semicircle-packing
29•sarreph•1d ago•3 comments

Disk encryption on NetBSD – achieving secrecy

https://netbsd.org/~nia/disk-encrypt/
34•jaypatelani•5h ago•3 comments

My favourite modern NES games

https://jordi.inversethought.com/blog/25-of-my-favourite-modern-nes-games/
93•jordigh•8h ago•9 comments

Kiri – The Modern Container Runtime

https://runkiri.com/
57•nikolay•6h ago•26 comments

The Evolving Story of How Chemistry Became Biology

https://www.quantamagazine.org/the-evolving-story-of-how-chemistry-became-biology-20261112/
55•pseudolus•1d ago•13 comments

Strictly monotonic timestamps and gapless sequences in Rust

https://tsoracle.rs/
5•znano•2d ago•1 comments

KDE: The documentary [video]

https://tube.kockatoo.org/w/fFinNHfanLT7aBEb2B8y4c
487•mrkn1•21h ago•107 comments

A family tree of software job titles

https://zwischenzugs.com/2026/11/03/a-family-tree-of-software-job-titles/
321•umerf•17h ago•157 comments

Show HN: Gawain – Require type hints on all Python variables

https://github.com/matheuzgomes/gawain
54•MarinhoD•6h ago•30 comments

Why get an expensive Pi when I have an old phone?

https://so.long.thanks.fish/why-pi-when-i-have-an-old-phone/
563•casi•4d ago•305 comments

Open-Source HF Communications for Remote Communities and Experimenters

https://www.ardc.net/rhizomaticas-hermes-and-mercury-expand-open-source-hf-communications-for-rem...
18•tejtm•3d ago•2 comments

500 Lines or Less A 3D Modeller

https://aosabook.org/en/500L/a-3d-modeller.html
59•myth_drannon•1d ago•10 comments

PyPI's redesigned project pages with clearer security signals are now live

https://blog.pypi.org/posts/2026-11-06-ui-updates-complete/
246•rbanffy•19h ago•103 comments

Memory Safety Bugs in Rust Standard Library

https://forge-blog.github.io/posts/rust-std-memory-safety/
153•pjmlp•2d ago•114 comments

We're Asking an Appeals Court to Require a Warrant for ALPR Searches

https://www.eff.org/deeplinks/2026/11/were-asking-appeals-court-require-warrant-alpr-searches
233•nobody9999•8h ago•66 comments

Show HN: Turbo-Browser-MCP – Batch forms, DOM deltas and submit guards for MCP

https://github.com/Tthanh2k6/turbo-browser-mcp
35•tthanh2k6•6h ago•7 comments

Show HN: DeepSeek V3 in ~200 lines of pure Jax

https://github.com/Vaibhaav-Tiwari/deepseek-v3-jax
236•VaibhaavTiwari•19h ago•22 comments

Project Zero will disclose vulnerabilities 90 days after reporting

https://projectzero.google/2026/11/disclosure-policy.html
259•hacb•23h ago•129 comments

Book list for streetfighting computer scientists

https://nick-black.com/dankwiki/index.php?title=Book_list_for_streetfighting_computer_scientists
10•num42•3h ago•0 comments

One Man's Quest to Create the Perfect Whiskey Glass

https://www.nytimes.com/2026/11/13/dining/drinks/kurt-josef-zalto-whiskey-glass.html
38•Kaibeezy•1d ago•28 comments

Advancing science and engineering with Antigravity's /teamwork

https://research.google/blog/advancing-science-engineering-with-antigravitys-teamwork-feature/
203•acossta•21h ago•47 comments

Generative AI uses more energy on non-English text

https://news.umich.edu/generative-ai-uses-more-energy-on-non-english-text/
214•DeepLogin•4d ago•111 comments

Oxford Molecular Motors

https://www.physics.ox.ac.uk/research/group/oxford-molecular-motors/research/bacterial-flagellar-...
56•handfuloflight•3d ago•13 comments