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

Comments

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

Replacing JavaScript with Just HTML

https://www.htmhell.dev/adventcalendar/2025/27/
131•soheilpro•2h ago•34 comments

Fathers’ choices may be packaged and passed down in sperm RNA

https://www.quantamagazine.org/how-dads-fitness-may-be-packaged-and-passed-down-in-sperm-rna-2025...
55•vismit2000•2h ago•14 comments

How we lost communication to entertainment

https://ploum.net/2025-12-15-communication-entertainment.html
316•8organicbits•7h ago•164 comments

Functional programming and reliability: ADTs, safety, critical infrastructure

https://blog.rastrian.dev/post/why-reliability-demands-functional-programming-adts-safety-and-cri...
62•rastrian•3h ago•30 comments

2025 was the year Xbox died

https://www.engadget.com/gaming/xbox/2025-was-the-year-xbox-died-130000467.html
33•speckx•4d ago•15 comments

Floor796

https://floor796.com/
598•krtkush•14h ago•76 comments

Text rendering hates you (2019)

https://faultlore.com/blah/text-hates-you/
98•andsoitis•6d ago•35 comments

Project Vend: Phase Two

https://www.anthropic.com/research/project-vend-2
75•kubami•5d ago•24 comments

Gpg.fail

https://gpg.fail
292•todsacerdoti•10h ago•156 comments

Show HN: Viral Potential Predictor

https://hn-ph.vercel.app
30•salebanolow•2h ago•14 comments

Rainbow Six Siege hacked as players get billions of credits and random bans

https://www.shanethegamer.com/esports-news/rainbow-six-siege-hacked-global-server-outage/
116•erhuve•7h ago•34 comments

Windows 2 for the Apricot PC/Xi

https://www.ninakalinina.com/notes/win2apri/
104•todsacerdoti•9h ago•24 comments

Immer – A library of persistent and immutable data structures written in C++

https://github.com/arximboldi/immer
30•smartmic•6d ago•6 comments

Clock synchronization is a nightmare

https://arpitbhayani.me/blogs/clock-sync-nightmare/
140•grep_it•4d ago•90 comments

Nvidia's $20B antitrust loophole

https://ossa-ma.github.io/blog/groq
365•ossa-ma•9h ago•121 comments

Show HN: Ez FFmpeg – Video editing in plain English

http://npmjs.com/package/ezff
345•josharsh•18h ago•169 comments

Janet Jackson had the power to crash laptop computers (2022)

https://devblogs.microsoft.com/oldnewthing/20220816-00/?p=106994
240•montalbano•10h ago•96 comments

7- and 14-segment fonts "DSEG"

https://www.keshikan.net/fonts.html
17•anigbrowl•4h ago•2 comments

Liberating Bluetooth on the ESP32

https://exquisite.tube/w/mEzF442Q4hUXnhQ8HmfZuq
18•todsacerdoti•4h ago•0 comments

Rust the Process

https://www.amalbansode.com/writing/2025-12-24-rust-the-process/
38•quadrophenia•3d ago•5 comments

The Dangers of SSL Certificates

https://surfingcomplexity.blog/2025/12/27/the-dangers-of-ssl-certificates/
28•azhenley•4h ago•46 comments

Toll roads are spreading in America

https://www.economist.com/united-states/2025/12/18/toll-roads-are-spreading-in-america
145•smurda•9h ago•407 comments

OrangePi 6 Plus Review

https://boilingsteam.com/orange-pi-6-plus-review/
143•ekianjo•14h ago•126 comments

Say No to Palantir in the NHS

https://notopalantir.goodlawproject.org/email-to-target/stop-palantir-in-the-nhs/
113•_____k•6h ago•16 comments

Ask HN: Resources to get better at outbound sales?

166•sieep•6d ago•40 comments

Pfizer ended up passing on my GLP-1 work back in the early '90s (2024)

https://www.statnews.com/2024/09/09/glp-1-history-pfizer-john-baxter-jeffrey-flier-calbio-metabio/
74•rajlego•5h ago•31 comments

Mruby: Ruby for Embedded Systems

https://github.com/mruby/mruby
129•nateb2022•5d ago•32 comments

Richard Stallman at the First Hackers Conference in 1984 [video]

https://www.youtube.com/watch?v=Hf2pfzzWPYE
109•schmuckonwheels•6h ago•17 comments

Show HN: Mysti – Claude, Codex, and Gemini debate your code, then synthesize

https://github.com/DeepMyst/Mysti
176•bahaAbunojaim•4d ago•142 comments

Splice a Fibre

https://react-networks-lib.rackout.net/fibre
90•matt-p•15h ago•41 comments