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.

The Birth and Death of JavaScript (2014)

https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript
75•subset•1h ago•36 comments

Firewood Splitting Simulator

https://screen.toys/firewood/
126•memalign•4d ago•36 comments

FarOutCompany

https://faroutcompany.com/
6•bookofjoe•17m ago•2 comments

Lisp's Influence on Ruby

https://blog.tacoda.dev/lisps-influence-on-ruby-6a54f1a7740e
76•tacoda•2d ago•0 comments

How did Atari apply side art to Arcade Cabinets?

https://arcadeblogger.com/2026/06/14/how-did-atari-apply-side-art-to-arcade-cabinets/
16•msephton•1h ago•1 comments

Free SQL→ER diagram tool, runs in the browser, nothing uploaded

https://sqltoerdiagram.com/
277•robhati•10h ago•54 comments

Honda Civics and the Evil Valet

https://juniperspring.org/posts/honda-evil-valet/
342•librick•13h ago•76 comments

How to Earn a Billion Dollars

https://paulgraham.com/earn.html
103•kingstoned•2h ago•231 comments

GLM 5.2 Is Out

https://twitter.com/jietang/status/2065784751345287314
692•aloknnikhil•22h ago•405 comments

Caddy compatibility for zeroserve: 3x throughput and 70% lower latency

https://su3.io/posts/zeroserve-caddy-compat
4•losfair•44m ago•0 comments

Can't Stop the Signal. Poison It

https://blog.digitalgrease.dev/posts/fauxx-cant-stop-the-signal
14•rmadriz•2h ago•5 comments

Noise infusion banned from statistical products published by Census Bureau

https://desfontain.es/blog/banning-noise.html
858•nl•1d ago•536 comments

Historic co-determination helps monasteries navigate digital change

https://phys.org/news/2026-05-historic-monasteries-digital-countries.html
56•indynz•2d ago•39 comments

Every Frame Perfect

https://tonsky.me/blog/every-frame-perfect/
791•ravenical•1d ago•259 comments

SpaceX, Adding It Up – The $235B Cash Gap

https://capefearadvisors.substack.com/p/spacex-adding-it-up-the-235-billion
9•root-parent•13m ago•1 comments

Windows 1.0 and the WinAPI, 40 Years Later

https://medium.com/@stassaf.uae/windows-1-0-and-the-winapi-40-years-later-abaf64832918
34•jhack•2d ago•22 comments

Don't trust large context windows

https://garrit.xyz/posts/2026-05-06-dont-trust-large-context-windows
178•computersuck•8h ago•126 comments

New pancreatic cancer drug might open the door to much longer survival times

https://economist.com/science-and-technology/2026/06/12/treating-pancreatic-tumours-may-have-reve...
407•andsoitis•1d ago•140 comments

Pac-Man, but you're the ghost

https://garrit.xyz/posts/2026-06-13-pac-man-but-you-re-the-ghost
152•mindracer•10h ago•65 comments

Tribblix: The retro Illumos distribution

http://tribblix.org/
60•naturalmovement•9h ago•20 comments

FreeOberon – Open-Source, Cross-Platform, Free Pascal/Turbo Pascal-Like Language

https://github.com/kekcleader/FreeOberon
119•peter_d_sherman•2d ago•53 comments

Codex for open source

https://openai.com/form/codex-for-oss/
254•EvgeniyZh•2d ago•110 comments

Python 3.14 garbage collection rigamarole

https://theconsensus.dev/p/2026/06/06/python-3-14-garbage-collection-rigamarole.html
73•eatonphil•2d ago•50 comments

KPMG pulls report on AI usage due to apparent hallucinations

https://techcrunch.com/2026/06/13/kpmg-pulls-report-on-ai-usage-due-to-apparent-hallucinations/
7•Brajeshwar•25m ago•2 comments

Pyodide 314.0: Python packages can now publish WebAssembly wheels to PyPI

https://blog.pyodide.org/posts/314-release/
151•agriyakhetarpal•4d ago•36 comments

Building a serial and VGA "everything console"

http://oldvcr.blogspot.com/2026/06/building-serial-and-vga-everything.html
49•classichasclass•11h ago•5 comments

Making Claude a Chemist

https://www.anthropic.com/research/making-claude-a-chemist
65•gmays•11h ago•58 comments

A low-carbon computing platform from your retired phones

https://research.google/blog/a-low-carbon-computing-platform-from-your-retired-phones/
309•vikas-sharma•1d ago•163 comments

Phoenix LiveView 1.2

https://phoenixframework.org/blog/phoenix-liveview-1-2-released
161•ksec•9h ago•43 comments

Conversations with a six-year-old on functional programming (2018)

https://byorgey.wordpress.com/2018/05/06/conversations-with-a-six-year-old-on-functional-programm...
3•downbad_•15m ago•0 comments