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.

Sabotaging projects by overthinking, scope creep, and structural diffing

https://kevinlynagh.com/newsletter/2026_04_overthinking/
182•alcazar•3h ago•47 comments

SDL Now Supports DOS

https://github.com/libsdl-org/SDL/pull/15377
44•Jayschwa•1h ago•16 comments

I Cancelled Claude: Token Issues, Declining Quality, and Poor Support

https://nickyreinert.de/en/2026/2026-04-24-claude-critics/
251•y42•1h ago•129 comments

DeepSeek v4

https://api-docs.deepseek.com/
1577•impact_sy•14h ago•1223 comments

Norway Set to Become Latest Country to Ban Social Media for Under 16s

https://www.bloomberg.com/news/articles/2026-04-24/norway-wants-kids-to-be-kids-with-social-media...
233•1vuio0pswjnm7•2h ago•183 comments

I'm done making desktop applications (2009)

https://www.kalzumeus.com/2009/09/05/desktop-aps-versus-web-apps/
67•claxo•1h ago•49 comments

Different Language Models Learn Similar Number Representations

https://arxiv.org/abs/2604.20817
52•Anon84•2h ago•18 comments

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

https://nate.leaflet.pub/3mk4xkaxobc2p
170•calcifer•6h ago•184 comments

Spinel: Ruby AOT Native Compiler

https://github.com/matz/spinel
243•dluan•9h ago•63 comments

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

https://github.com/browser-use/browser-harness
23•gregpr07•3h ago•3 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
17•wglb•16h ago•2 comments

US special forces soldier arrested after allegedly winning $400k on Maduro raid

https://www.cnn.com/2026/04/23/politics/us-special-forces-soldier-arrested-maduro-raid-trade
553•nkrisc•19h ago•597 comments

Mounting tar archives as a filesystem in WebAssembly

https://jeroen.github.io/notes/webassembly-tar/
86•datajeroen•7h ago•25 comments

The operating cost of adult and gambling startups

https://orchidfiles.com/stigma-is-a-tax-on-every-operational-decision/
58•theorchid•5h ago•88 comments

Hear your agent suffer through your code

https://github.com/AndrewVos/endless-toil
131•AndrewVos•6h ago•64 comments

Machine Learning Reveals Unknown Transient Phenomena in Historic Images

https://arxiv.org/abs/2604.18799
22•solarist•3h ago•14 comments

An update on recent Claude Code quality reports

https://www.anthropic.com/engineering/april-23-postmortem
863•mfiguiere•23h ago•657 comments

Bitwarden CLI compromised in ongoing Checkmarx supply chain campaign

https://socket.dev/blog/bitwarden-cli-compromised
830•tosh•1d ago•404 comments

Why I Write (1946)

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/why-i-write/
243•RyanShook•15h ago•63 comments

GPT-5.5

https://openai.com/index/introducing-gpt-5-5/
1487•rd•23h ago•993 comments

8087 Emulation on 8086 Systems

https://www.os2museum.com/wp/learn-something-old-every-day-part-xx-8087-emulation-on-8086-systems/
43•ingve•6h ago•16 comments

Show HN: Gova – The declarative GUI framework for Go

https://github.com/NV404/gova
100•aliezsid•11h ago•19 comments

Refuse to let your doctor record you

https://buttondown.com/maiht3k/archive/why-you-should-refuse-to-let-your-doctor-record/
70•speckx•1h ago•83 comments

Composition shouldn't be this hard

https://www.cambra.dev/blog/announcement/
94•larelli•10h ago•63 comments

Show HN: Atomic – Local-first, AI-augmented personal knowledge base

https://atomicapp.ai/
33•kenforthewin•5h ago•15 comments

Meta tells staff it will cut 10% of jobs

https://www.bloomberg.com/news/articles/2026-04-23/meta-tells-staff-it-will-cut-10-of-jobs-in-pus...
761•Vaslo•22h ago•782 comments

MeshCore development team splits over trademark dispute and AI-generated code

https://blog.meshcore.io/2026/04/23/the-split
261•wielebny•1d ago•144 comments

Show HN: leaf – a terminal Markdown previewer with a GUI-like experience

https://github.com/RivoLink/leaf
21•RivoLink•6h ago•7 comments

Tesla (TSLA) discloses $2B AI hardware company acquisition buried

https://electrek.co/2026/04/23/tesla-tsla-quietly-discloses-2-billion-ai-hardware-acquisition-10q/
13•Bender•41m ago•3 comments

Aspartame is not that bad? (2022)

https://dynomight.net/aspartame/
90•pHequals7•5h ago•169 comments