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.

GenCAD

https://gencad.github.io/
257•dagenix•9h ago•60 comments

I turned a $80 RK3562 Android tablet into a Debian Linux workstation

https://github.com/tech4bot/rk3562deb
326•tech4bot•18h ago•147 comments

Ask an Astronaut: 333 hours of Q&A footage with astronauts

https://askanastronaut.issinrealtime.org/
115•gaws•2d ago•9 comments

Prolog Coding Horror

https://www.metalevel.at/prolog/horror
115•RohanAdwankar•10h ago•39 comments

Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

https://github.com/MinishLab/semble
289•Bibabomas•15h ago•100 comments

Jank now has its own custom IR

https://jank-lang.org/blog/2026-05-08-optimization/
106•DASD•2d ago•7 comments

Crystals found inside wreckage from the first nuclear bomb test

https://www.scientificamerican.com/article/strange-crystals-found-inside-wreckage-from-the-first-...
32•jumploops•2d ago•4 comments

WriteUp: 16 Bytes of x86 that turn Matrix rain into sound

https://hellmood.111mb.de//wake_up_16b_writeup.html
101•HellMood•8h ago•15 comments

Two EA-18 fighter jets collide at Mountain Home airshow, pilots ejected safely

https://idahonews.com/news/local/two-f-18-fighter-jets-have-crashed-during-an-airshow-at-mountain...
182•ChrisArchitect•9h ago•163 comments

Show HN: Mezz, a curl-able WiFi sandbox for IoT pentesting

https://github.com/ABGEO/mezz
18•ABGEO•2d ago•2 comments

Profunctor Equipment in Haskell

https://bartoszmilewski.com/2026/05/16/profunctor-equipment-in-haskell/
7•g0xA52A2A•1d ago•0 comments

A Good Lemma Is Worth a Thousand Theorems (2007)

https://sites.math.rutgers.edu/~zeilberg/Opinion82.html
44•susam•2d ago•9 comments

Tesla Solar Roof is on life support as it pivot to panels

https://electrek.co/2026/05/14/tesla-solar-roof-promise-vs-reality-pivot-panels/
237•celsoazevedo•1d ago•227 comments

Hindenburg’s Smoking Room

https://www.airships.net/hindenburg-smoking-room/
194•crescit_eundo•3d ago•154 comments

CUDA Books

https://github.com/alternbits/awesome-cuda-books
176•dariubs•18h ago•36 comments

Prolog Basics Explained with Pokémon

https://unplannedobsolescence.com/blog/prolog-basics-pokemon/
249•birdculture•2d ago•38 comments

Magical Realism: “Northern Exposure” 25 Years Later (2015)

https://www.rogerebert.com/streaming/magical-realism-nothern-exposure-25-years-later
101•walterbell•2d ago•43 comments

I don't think AI will make your processes go faster

https://frederickvanbrabant.com/blog/2026-05-15-i-dont-think-ai-will-make-your-processes-go-faster/
561•TheEdonian•19h ago•386 comments

Cannibalistic attacks between gray seals leave telltale “corkscrew” injuries

https://www.science.org/content/article/scientists-id-corkscrew-killer-behind-gruesome-seal-deaths
60•gmays•3d ago•20 comments

High-Entropy Alloy

https://en.wikipedia.org/wiki/High-entropy_alloy
131•leonidasrup•3d ago•23 comments

Étienne Ghys: The Shape of Letters: From Leonardo da Vinci to Donald Knuth

https://www.youtube.com/watch?v=1OIxzewWilc
18•tzury•2h ago•3 comments

Trials on veterans suggest ibogaine could provide a new treatment for PTSD

https://www.bbc.com/future/article/20260514-how-hallucinogenic-ibogaine-helps-veterans-overcome-ptsd
92•bushwart•19h ago•96 comments

VoIP brings back old-fashioned pay phones to rural Vermont (2025)

https://spectrum.ieee.org/payphone-voip
147•bookofjoe•11h ago•44 comments

The History of ThinkPad: From IBM’s Bento Box to Lenovo’s AI Workstations

https://www.jdhodges.com/blog/thinkpad-history/
94•zdw•9h ago•43 comments

The SGI Buyer's Guide (2003)

https://hardware.majix.org/computers/sgi/buyers-guide.shtml
21•uticus•2d ago•9 comments

A nicer voltmeter clock

https://lcamtuf.substack.com/p/a-nicer-voltmeter-clock
334•surprisetalk•1d ago•44 comments

Mercurial, 20 years and counting: how are we still alive and kicking? [video]

https://fosdem.org/2026/schedule/event/AGWUVH-mercurial-aint-you-dead-yet/
186•ibobev•2d ago•192 comments

Colossus: The Forbin Project

https://en.wikipedia.org/wiki/Colossus:_The_Forbin_Project
229•doener•3d ago•91 comments

America's Most-Spoken Languages After English and Spanish

https://www.visualcapitalist.com/mapped-americas-most-spoken-languages-after-english-and-spanish/
40•RyeCombinator•3h ago•6 comments

Mozilla to UK regulators: VPNs are essential privacy and security tools

https://blog.mozilla.org/netpolicy/2026/05/15/mozilla-to-uk-regulators-vpns-are-essential-privacy...
711•WithinReason•1d ago•301 comments