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

Comments

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

UEFI Bindings for JavaScript

https://codeberg.org/smnx/promethee
31•ananas-dev•43m ago•12 comments

Thoughts on Generating C

https://wingolog.org/archives/2026/02/09/six-thoughts-on-generating-c
32•ingve•56m ago•0 comments

Show HN: Algorithmically Finding the Longest Line of Sight on Earth

https://alltheviews.world
183•tombh•4h ago•68 comments

Can Ozempic Cure Addiction?

https://www.newyorker.com/magazine/2026/02/16/can-ozempic-cure-addiction
13•adrianhon•34m ago•19 comments

Show HN: Browse Internet Infrastructure

https://www.wirewiki.com
69•pul•2h ago•14 comments

Long-Sought Proof Tames Some of Math's Unruliest Equations

https://www.quantamagazine.org/long-sought-proof-tames-some-of-maths-unruliest-equations-20260206/
3•ibobev•14m ago•0 comments

Art of Roads in Games

https://sandboxspirit.com/blog/art-of-roads-in-games/
463•linolevan•17h ago•147 comments

Matrix messaging gaining ground in government IT

https://www.theregister.com/2026/02/09/matrix_element_secure_chat/
106•rbanffy•2h ago•72 comments

Vouch

https://github.com/mitchellh/vouch
949•chwtutha•1d ago•419 comments

Discord will require a face scan or ID for full access next month

https://www.theverge.com/tech/875309/discord-age-verification-global-roll-out
27•x01•13m ago•15 comments

Show HN: Minimal NIST/OWASP-compliant auth implementation for Cloudflare Workers

https://github.com/vhscom/private-landing
20•vhsdev•3h ago•8 comments

Offpunk 3.0

https://ploum.net/2026-02-09-offpunk3.html
94•todsacerdoti•4h ago•20 comments

Nobody knows how the whole system works

https://surfingcomplexity.blog/2026/02/08/nobody-knows-how-the-whole-system-works/
101•azhenley•9h ago•81 comments

Roman industrial hub discovered on banks of River Wear

https://www.durham.ac.uk/news-events/latest-news/2026/01/roman-industrial-hub-discovered-on-banks...
29•andsoitis•4d ago•5 comments

AT&T, Verizon blocking release of Salt Typhoon security assessment reports

https://www.reuters.com/business/media-telecom/senator-says-att-verizon-blocking-release-salt-typ...
10•redman25•28m ago•0 comments

LispE: Lisp Interpreter with Pattern Programming and Lazy Evaluation

https://github.com/naver/lispe
76•PaulHoule•4d ago•15 comments

Thought-Terminating Cliché

https://en.wikipedia.org/wiki/Thought-terminating_clich%C3%A9
86•walterbell•4d ago•75 comments

Like Game-of-Life, but on Growing Graphs, with WASM and WebGL

https://znah.net/graphs/
12•znah•1d ago•1 comments

Tessellation Kit (2016)

https://sciencevsmagic.net/tes/#0.5.0.1.aaaaaaaaa
24•surprisetalk•5d ago•2 comments

Show HN: A custom font that displays Cistercian numerals using ligatures

https://bobbiec.github.io/cistercian-font.html
133•bobbiechen•16h ago•27 comments

Every book recommended on the Odd Lots Discord

https://odd-lots-books.netlify.app/
134•muggermuch•15h ago•56 comments

Show HN: I created a Mars colony RPG based on Kim Stanley Robinson’s Mars books

https://underhillgame.com/
258•ariaalam•21h ago•84 comments

Ask HN: What are you working on? (February 2026)

190•david927•19h ago•675 comments

Quartz crystals

https://www.pa3fwm.nl/technotes/tn13a.html
107•gtsnexp•1d ago•31 comments

Show HN: Printable Classics – Free printable classic books for hobby bookbinders

https://printableclassics.com
5•bookman10•2h ago•0 comments

Apple XNU: Clutch Scheduler

https://github.com/apple-oss-distributions/xnu/blob/main/doc/scheduler/sched_clutch_edge.md
157•tosh•18h ago•31 comments

Experts Have World Models. LLMs Have Word Models

https://www.latent.space/p/adversarial-reasoning
151•aaronng91•20h ago•151 comments

More Mac malware from Google search

https://eclecticlight.co/2026/01/30/more-malware-from-google-search/
242•kristianp•17h ago•166 comments

Custom Firmware for the MZ-RH1 – Ready for Testing

https://sir68k.re/posts/rh1-firmware-available/
71•jimbauwens•5d ago•18 comments

Clean Coder: The Dark Path (2017)

https://blog.cleancoder.com/uncle-bob/2017/01/11/TheDarkPath.html
31•andrewjf•4d ago•54 comments