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•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.

Erlang/OTP 29.0

https://www.erlang.org/news/188
75•pyinstallwoes•1h ago•3 comments

Project Gutenberg – keeps getting better

https://www.gutenberg.org/
712•JSeiko•9h ago•173 comments

I believe there are entire companies right now under AI psychosis

https://twitter.com/mitchellh/status/2055380239711457578
773•reasonableklout•5h ago•337 comments

The Zulip Foundation

https://blog.zulip.com/2026/05/15/announcing-zulip-foundation/
213•boramalper•6h ago•51 comments

The main thing about P2P meth is that there's so much of it (2022)

https://dynomight.net/p2p-meth/
37•tomjakubowski•1h ago•10 comments

Naturally Occurring Quasicrystals

https://johncarlosbaez.wordpress.com/2026/05/14/naturally-occurring-quasicrystals/
50•lukeplato•1d ago•5 comments

'No Way to Prevent This,' Says Only Package Manager Where This Regularly Happens

https://kevinpatel.xyz/posts/no-way-to-prevent-this/
14•alligatorplum•52m ago•0 comments

How to Write to SSDs [pdf]

https://www.vldb.org/pvldb/vol19/p1469-lee.pdf
47•matt_d•3h ago•5 comments

Show HN: Epiq – Distributed Git based issue tracker TUI

https://ljtn.github.io/epiq/
8•jolaflow•1h ago•2 comments

ESP-EEG is an affordable 8-channel biosensing board

https://www.autodidacts.io/cerelog-esp-eeg-affordable-openbci-like-board/
17•surprisetalk•2d ago•0 comments

A 0-click exploit chain for the Pixel 10

https://projectzero.google/2026/05/pixel-10-exploit.html
337•happyhardcore•11h ago•156 comments

California bill would require patches or refunds when online games shut down

https://arstechnica.com/gaming/2026/05/bill-to-keep-online-games-playable-clears-key-hurdle-in-ca...
307•Lihh27•5h ago•188 comments

The sigmoids won't save you

https://www.astralcodexten.com/p/the-sigmoids-wont-save-you
147•Tomte•14h ago•162 comments

Spectre Programming Language

https://spectre-docs.pages.dev
22•asdkop•2h ago•1 comments

I designed a nibble-oriented CPU in Verilog to build a scientific calculator

https://github.com/gdevic/FPGA-Calculator
84•gdevic•8h ago•27 comments

U.S. DOJ demands Apple and Google unmask over 100k users of car-tinkering app

https://macdailynews.com/2026/05/15/u-s-doj-demands-apple-and-google-unmask-over-100000-users-of-...
355•tencentshill•8h ago•240 comments

Microscale Thermite Reaction

https://sciencedemonstrations.fas.harvard.edu/presentations/microscale-thermite-reaction
52•krunck•5h ago•21 comments

Image-blaster: Creates 3D environments, SFX, and meshes from a single image

https://github.com/neilsonnn/image-blaster
128•MattRogish•9h ago•25 comments

The Bird Eye Was Pushed to an Evolutionary Extreme

https://www.quantamagazine.org/how-the-bird-eye-was-pushed-to-an-evolutionary-extreme-20260513/
4•sohkamyung•1d ago•0 comments

O(x)Caml in Space

https://gazagnaire.org/blog/2026-05-14-borealis.html
227•yminsky•14h ago•51 comments

Show HN: Watch a neural net learn to play Snake

https://ppo.gradexp.xyz/
116•c1b•1d ago•30 comments

ASCII by Jason Scott

https://ascii.textfiles.com/
152•bookofjoe•11h ago•21 comments

Hightouch (YC S19) Is Hiring

https://hightouch.com/careers
1•joshwget•8h ago

ABC News has taken all FiveThirtyEight articles offline

https://twitter.com/baseballot/status/2055309076209492208
236•cmsparks•6h ago•115 comments

Waymo updates 3,800 robotaxis after they 'drive into standing water'

https://www.cnbc.com/2026/05/12/waymo-recalls-3800-robotaxis-after-able-drive-into-standing-water...
155•drob518•7h ago•150 comments

The nuclear-physics infrastructure behind PET scans

https://www.lanl.gov/media/publications/1663/proton-power-for-public-health
40•LAsteNERD•2d ago•2 comments

A SQL-Inspired Query Language Designed for Event Sourcing (2025)

https://yoeight.github.io/blog/2025/12/21/EventQL_A_SQL_Inspired_Query_Language_Designed_For_Even...
18•goloroden•2d ago•2 comments

London Police Deploy Facial Recognition at Protest for First Time

https://reclaimthenet.org/london-police-deploy-facial-recognition-at-protest-for-first-time
105•Cider9986•4h ago•73 comments

Steve Jobs in Exile – New book on Steve Jobs’s years at NeXT Computer

https://spectrum.ieee.org/steve-jobs-next-computer
182•rbanffy•14h ago•148 comments

Radicle: Sovereign {code forge} built on Git

https://radicle.dev/
216•KolmogorovComp•13h ago•74 comments