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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

Google plans to invest up to $40B in Anthropic

https://www.bloomberg.com/news/articles/2026-04-24/google-plans-to-invest-up-to-40-billion-in-ant...
283•elffjs•8h ago•345 comments

My audio interface has SSH enabled by default

https://hhh.hn/rodecaster-duo-fw/
147•hhh•5h ago•35 comments

Iliad fragment found in Roman-era mummy

https://www.thehistoryblog.com/archives/75877
86•wise_blood•2d ago•21 comments

Google Flow Music

https://www.flowmusic.app/
79•hmokiguess•3h ago•46 comments

Sabotaging projects by overthinking, scope creep, and structural diffing

https://kevinlynagh.com/newsletter/2026_04_overthinking/
348•alcazar•10h ago•86 comments

The Classic American Diner

https://blogs.loc.gov/picturethis/2026/04/the-classic-american-diner/
143•NaOH•5h ago•87 comments

Show HN: I've built a nice home server OS

https://lightwhale.asklandd.dk/
47•Zta77•3h ago•25 comments

There Will Be a Scientific Theory of Deep Learning

https://arxiv.org/abs/2604.21691
115•jamie-simon•6h ago•43 comments

Work with the garage door up

https://notes.andymatuschak.org/Work_with_the_garage_door_up
109•jxmorris12•3d ago•84 comments

FusionCore: ROS 2 sensor fusion (IMU and GPS and encoders)

https://github.com/manankharwar/fusioncore
11•kharwarm•2h ago•2 comments

Diatec, known for its mechanical keyboard brand FILCO, has ceased operations

https://gigazine.net/gsc_news/en/20260424-filco-diatec/
89•gslin•8h ago•29 comments

How to be anti-social – a guide to incoherent and isolating social experiences

https://nate.leaflet.pub/3mk4xkaxobc2p
294•calcifer•13h ago•283 comments

Email could have been X.400 times better

https://buttondown.com/blog/x400-vs-smtp-email
114•maguay•1d ago•112 comments

You don't want long-lived keys

https://argemma.com/blog/long-lived-keys/
15•kkl•3d ago•10 comments

Spinel: Ruby AOT Native Compiler

https://github.com/matz/spinel
306•dluan•16h ago•81 comments

MacBook Neo and how the iPad should be

https://craigmod.com/essays/ipad_neo/
191•jen729w•1d ago•109 comments

DeepSeek v4

https://api-docs.deepseek.com/
1790•impact_sy•21h ago•1396 comments

I cancelled Claude: Token issues, declining quality, and poor support

https://nickyreinert.de/en/2026/2026-04-24-claude-critics/
763•y42•8h ago•449 comments

The Overtom Chess Computer Museum

https://tluif.home.xs4all.nl/chescom/Engindex.html
6•semyonsh•2d ago•0 comments

I'm done making desktop applications (2009)

https://www.kalzumeus.com/2009/09/05/desktop-aps-versus-web-apps/
139•claxo•9h ago•166 comments

CC-Canary: Detect early signs of regressions in Claude Code

https://github.com/delta-hq/cc-canary
38•tejpalv•6h ago•18 comments

SFO Quiet Airport (2025)

https://viewfromthewing.com/san-francisco-airport-removed-90-minutes-of-daily-noise-travelers-say...
124•CaliforniaKarl•6h ago•74 comments

SDL Now Supports DOS

https://github.com/libsdl-org/SDL/pull/15377
217•Jayschwa•8h ago•75 comments

OpenAI releases GPT-5.5 and GPT-5.5 Pro in the API

https://developers.openai.com/api/docs/changelog
208•arabicalories•6h ago•114 comments

Show HN: Browser Harness – Gives LLM freedom to complete any browser task

https://github.com/browser-use/browser-harness
78•gregpr07•10h ago•33 comments

CSS as a Query Language

https://evdc.me/blog/css-query
59•evnc•7h ago•19 comments

Different Language Models Learn Similar Number Representations

https://arxiv.org/abs/2604.20817
90•Anon84•10h ago•35 comments

TIPSv2: Advancing Vision-Language Pretraining with Enhanced Patch-Text Alignment

https://gdm-tipsv2.github.io/
20•gmays•5h ago•1 comments

Physicists revive 1990s laser concept to propose a next-generation atomic clock

https://phys.org/news/2026-04-physicists-revive-1990s-laser-concept.html
50•wglb•23h ago•8 comments

Redesigning the Recurse Center application to inspire curious programmers

https://www.recurse.com/blog/192-redesigning-the-recurse-center-application
58•nicholasjbs•8h ago•9 comments