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

Comments

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

Apple Introduces MacBook Pro with All‑New M5 Pro and M5 Max

https://www.apple.com/newsroom/2026/03/apple-introduces-macbook-pro-with-all-new-m5-pro-and-m5-max/
154•scrlk•51m ago•135 comments

India's top court angry after junior judge cites fake AI-generated orders

https://www.bbc.com/news/articles/c178zzw780xo
168•tchalla•2h ago•78 comments

Apple unveils new Studio Display and all-new Studio Display XDR

https://www.apple.com/newsroom/2026/03/apple-unveils-new-studio-display-and-all-new-studio-displa...
55•victorbjorklund•53m ago•33 comments

I'm reluctant to verify my identity or age for any online services

https://neilzone.co.uk/2026/03/im-struggling-to-think-of-any-online-services-for-which-id-be-will...
20•speckx•31m ago•3 comments

The Xkcd thing, now interactive

https://editor.p5js.org/isohedral/full/vJa5RiZWs
500•memalign•3h ago•66 comments

Launch HN: Cekura (YC F24) – Testing and monitoring for voice and chat AI agents

8•atarus•22m ago•1 comments

Meta’s AI smart glasses and data privacy concerns

https://www.svd.se/a/K8nrV4/metas-ai-smart-glasses-and-data-privacy-concerns-workers-say-we-see-e...
1233•sandbach•16h ago•711 comments

I'm losing the SEO battle for my own open source project

https://twitter.com/Gavriel_Cohen/status/2028821432759717930
120•devinitely•1h ago•62 comments

Arm's Cortex X925: Reaching Desktop Performance

https://chipsandcheese.com/p/arms-cortex-x925-reaching-desktop
172•ingve•7h ago•83 comments

British Columbia is permanently adopting daylight time

https://www.cbc.ca/news/canada/british-columbia/b-c-adopting-year-round-daylight-time-9.7111657
967•ireflect•18h ago•472 comments

Don't Become an Engineering Manager

https://newsletter.manager.dev/p/dont-become-an-engineering-manager
7•flail•34m ago•2 comments

Computer Says No

https://koenvangilst.nl/lab/computer-says-no
34•vnglst•2d ago•12 comments

Claude's Cycles: Claude Opus 4.6 solves a problem posed by Don Knuth [pdf]

https://www-cs-faculty.stanford.edu/~knuth/papers/claude-cycles.pdf
49•fs123•3h ago•10 comments

Ars Technica fires reporter after AI controversy involving fabricated quotes

https://futurism.com/artificial-intelligence/ars-technica-fires-reporter-ai-quotes
445•danso•13h ago•274 comments

Apple introduces the new MacBook Air with M5

https://www.apple.com/newsroom/2026/03/apple-introduces-the-new-macbook-air-with-m5/
14•Garbage•48m ago•3 comments

The Internet's Top Tech Publications Lost 58% of Their Google Traffic Since 2024

https://growtika.com/blog/tech-media-collapse
39•Growtika•1h ago•26 comments

We Built a Video Rendering Engine by Lying to the Browser About What Time It Is

https://blog.replit.com/browsers-dont-want-to-be-cameras
94•darshkpatel•2d ago•42 comments

Simple screw counter

https://mitxela.com/projects/screwcounter
208•jk_tech•2d ago•57 comments

How to sew a Hyperbolic Blanket (2021)

https://www.geometrygames.org/HyperbolicBlanket/index.html
29•aebtebeten•3d ago•2 comments

Mullvad VPN: Banned TV Ad in the Streets of London [video]

https://www.youtube.com/watch?v=rwhznrpgl7k
143•vanyauhalin•2h ago•77 comments

History of the Graphical User Interface: The Rise (and Fall?) Of WIMP Design

https://www.uxtigers.com/post/gui-history
10•todsacerdoti•3d ago•6 comments

Privacy-preserving age and identity verification via anonymous credentials

https://blog.cryptographyengineering.com/2026/03/02/anonymous-credentials-an-illustrated-primer/
63•FrasiertheLion•5h ago•32 comments

AI-generated art can't be copyrighted (Supreme Court declines review)

https://www.theverge.com/policy/887678/supreme-court-ai-art-copyright
31•duggan•1h ago•15 comments

Show HN: I built a sub-500ms latency voice agent from scratch

https://www.ntik.me/posts/voice-agent
491•nicktikhonov•17h ago•143 comments

C64: Putting Sprite Multiplexing to Work

https://bumbershootsoft.wordpress.com/2026/02/28/c64-putting-sprite-multiplexing-to-work/
32•ibobev•1d ago•0 comments

I built a pint-sized Macintosh

https://www.jeffgeerling.com/blog/2026/pint-sized-macintosh-pico-micro-mac/
67•ingve•7h ago•18 comments

DOS Memory Management

https://www.os2museum.com/wp/dos-memory-management/
83•ingve•2d ago•24 comments

Physicists developing a quantum computer that’s entirely open source

https://physics.aps.org/articles/v19/24
161•tzury•15h ago•29 comments

The beauty and terror of modding Windows

https://windowsread.me/p/windhawk-explained
58•wild_pointer•4h ago•61 comments

First in-utero stem cell therapy for fetal spina bifida repair is safe: study

https://health.ucdavis.edu/news/headlines/first-ever-in-utero-stem-cell-therapy-for-fetal-spina-b...
329•gmays•23h ago•62 comments