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.

Kimi K3.1 Pro and K3.1 Pro Highspeed

https://www.kimi.ai/blog/kimi-k3-1-pro
491•Jowsey•3h ago•286 comments

Apple Music 404 Not Found

https://music.apple.com/this-url-doesnt-exist
272•frizlab•8h ago•97 comments

Kimi K3.1 scores 55 on Artificial Analysis, placed on the Pareto line

https://artificialanalysis.ai/models/kimi-k3-1-pro
110•theanonymousone•2h ago•25 comments

Today, we hacked what we'd set out to hack: the iPhone

https://blog.calif.io/p/iphone
568•pavel_lishin•4h ago•390 comments

Dessa: the most authentic full-duplex speech model ever built

https://block.xyz/dessa
37•dsr12•1h ago•9 comments

Local Wikipedia: Wikipedia, but only for things a half hour walk from you

https://edjefferson.com/localwiki/
1101•sohkamyung•21h ago•212 comments

The Real Kevin Bacon

https://pudding.cool/2026/10/kevin-bacon/
160•xnx•3d ago•44 comments

Canadians are running out of time to oppose Bill C-22

https://www.eff.org/deeplinks/2026/10/canadians-are-running-out-time-oppose-dangerous-c-22-survei...
204•hn_acker•22h ago•85 comments

Kimi K3.1 Pro puts open-source AI a month behind the best

https://www.modelcompare.ai/blog/china-open-source-ai
4•rakannimer•35m ago•0 comments

How is music possible

https://www.henrikkarlsson.xyz/p/music
71•rafaelc•4h ago•44 comments

UUIDv7 doesn't have the properties you think it does

https://alexsci.com/blog/uuidv7-is-weird/
80•ibobev•4h ago•68 comments

I turned my TV into a Game Boy Color with a Pokemon town as my home screen

https://twitter.com/robbietilton/status/2111936458923851923
42•scrambled•3h ago•11 comments

Reforming English Spelling

https://blog.oup.com/2026/10/reforming-english-spelling/
13•jruohonen•4h ago•30 comments

Show HN: Impossible Machines: declaratively program the physical world

https://www.impossiblemachines.xyz
43•bhaprayan•20h ago•12 comments

The Missed Opportunities of Sonic 06 (2025)

https://isaacmarovitz.com/posts/sonic-06/
51•ibobev•4h ago•10 comments

LISP Comes of Age (1980)

https://microship.com/lisp-comes-of-age/
47•so-cal-schemer•1d ago•14 comments

Animations for System Builders

https://brooker.co.za/blog/2026/10/23/animations.html
16•KraftyOne•3h ago•2 comments

We are all living inside of an obscure sci-fi film from 1970

https://thanksforthatjim.bearblog.dev/we-are-all-living-inside-of-an-obscure-sci-fi-film-from-1970/
5•speckx•1h ago•1 comments

Time Nuts (2005)

http://leapsecond.com/time-nuts.htm
23•jacquesm•3h ago•20 comments

Show HN: Swurf – Swipe through the real web

https://swurf.org/
31•webtjb096•13h ago•15 comments

Can we replace a $150k Looker with a bucket of HTML files?

https://david.lequin.dev/blog/bi-software-is-dead/
81•skadamat•3h ago•50 comments

Total Historian

https://www.theideasletter.org/essay/total-historian/
18•benbreen•4h ago•3 comments

Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?

536•ex-aws-dude•23h ago•587 comments

Job loss and cortisone mania

https://tilschuenemann.de/job-loss-cortisone-mania
151•speckx•10h ago•86 comments

Show HN: OnKey – I'm a bad singer, so I built an app to show where I'm off-key

https://github.com/dsmurrell/onkey
194•dsmurrell•1d ago•82 comments

Gemma-4-26B-A4B with 39-69% less thinking at same accuracy

https://bottlecapai.com/post/thinkingcap-gemma-4-26b/
75•armcat•6h ago•11 comments

Florida officer found dead man, impersonated him for years, renovated his home

https://www.nbcnews.com/news/us-news/officer-impersonates-dead-florida-man-moved-into-home-rcna60...
24•Michelangelo11•1h ago•8 comments

The alien space of science: Coherent but cognitively unavailable directions

https://arxiv.org/abs/2603.01092
191•martincsweiss•1d ago•78 comments

How does Fable 5.1 hide messages in images?

https://www.lesswrong.com/posts/WHEQps5PK8LrrcTAb/how-does-fable-5-1-hide-messages-in-images
188•gmays•23h ago•69 comments

We have traits at home

https://www.axelmagn.com/blog/202610-zig-traits/
40•Ygg2•21h ago•14 comments