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

Comments

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

My Experience as a Rice Farmer

https://xd009642.github.io/2026/04/01/My-Experience-as-a-Rice-Farmer.html
114•surprisetalk•4d ago•35 comments

Show HN: Ghost Pepper – Local hold-to-talk speech-to-text for macOS

https://github.com/matthartman/ghost-pepper
361•MattHart88•12h ago•170 comments

Solod – A subset of Go that translates to C

https://github.com/solod-dev/solod
122•TheWiggles•7h ago•30 comments

Issue: Claude Code is unusable for complex engineering tasks with Feb updates

https://github.com/anthropics/claude-code/issues/42796
1038•StanAngeloff•18h ago•583 comments

Sam Altman may control our future – can he be trusted?

https://www.newyorker.com/magazine/2026/04/13/sam-altman-may-control-our-future-can-he-be-trusted
1332•adrianhon•22h ago•534 comments

Launch HN: Freestyle – Sandboxes for Coding Agents

https://www.freestyle.sh/
265•benswerd•16h ago•145 comments

Apollo Guidance Computer restoration videos

https://www.curiousmarc.com/space/apollo-guidance-computer
51•mariuz•2d ago•8 comments

A cryptography engineer's perspective on quantum computing timelines

https://words.filippo.io/crqc-timeline/
453•thadt•17h ago•185 comments

Three hundred synths, 3 hardware projects, and one app

https://midi.guide/blog/three-hunded-synths-one-app/
15•ductionist•3h ago•0 comments

Peptides: where to begin?

https://www.science.org/content/blog-post/ah-peptides-where-begin
139•A_D_E_P_T•11h ago•175 comments

German police name alleged leaders of GandCrab and REvil ransomware groups

https://krebsonsecurity.com/2026/04/germany-doxes-unkn-head-of-ru-ransomware-gangs-revil-gandcrab/
298•Bender•18h ago•145 comments

Show HN: GovAuctions lets you browse government auctions at once

https://www.govauctions.app/
271•player_piano•16h ago•78 comments

Some iPhone Apps Receive Mysterious Update 'From Apple'

https://www.macrumors.com/2026/04/06/iphone-apps-from-apple-update/
31•tosh•1h ago•5 comments

What being ripped off taught me

https://belief.horse/notes/what-being-ripped-off-taught-me/
397•doctorhandshake•19h ago•199 comments

AI singer now occupies eleven spots on iTunes singles chart

https://www.showbiz411.com/2026/04/05/itunes-takeover-by-fake-ai-singer-eddie-dalton-now-occupies...
163•flinner•16h ago•255 comments

Show HN: Anos – a hand-written ~100KiB microkernel for x86-64 and RISC-V

https://github.com/roscopeco/anos
70•noone_youknow•3d ago•22 comments

VOID: Video Object and Interaction Deletion

https://github.com/Netflix/void-model
155•bobsoap•3d ago•47 comments

Anthropic expands partnership with Google and Broadcom for next-gen compute

https://www.anthropic.com/news/google-broadcom-partnership-compute
238•l1n•10h ago•102 comments

Book review: There Is No Antimemetics Division

https://www.stephendiehl.com/posts/no_antimimetics/
245•ibobev•18h ago•172 comments

Show HN: Hippo, biologically inspired memory for AI agents

https://github.com/kitfunso/hippo-memory
89•kitfunso•10h ago•17 comments

Second Revision of 6502 Laptop

https://codeberg.org/TechPaula/LT6502b
11•uticus•3d ago•0 comments

Build web apps for smart glasses

https://hub.evenrealities.com/docs/getting-started/overview
4•mozz100•1d ago•4 comments

The Last Quiet Thing

https://www.terrygodier.com/the-last-quiet-thing
215•coinfused•3d ago•119 comments

Sky – an Elm-inspired language that compiles to Go

https://github.com/anzellai/sky
164•whalesalad•17h ago•58 comments

Show HN: Tusk for macOS and Gnome

https://shapemachine.xyz/tusk/
91•factorialboy•2d ago•30 comments

HackerRank (YC S11) Is Hiring

1•rvivek•11h ago

Battle for Wesnoth: open-source, turn-based strategy game

https://www.wesnoth.org
474•akyuu•15h ago•132 comments

Graph-go – zero config, full visibility

https://github.com/guilherme-grimm/graph-go
24•devGrimm•3d ago•2 comments

Dear Heroku: Uhh What's Going On?

https://judoscale.com/blog/heroku-whats-going-on
56•crcastle•6h ago•20 comments

After 20 years I turned off Google Adsense for my websites (2025)

https://blog.ericgoldman.org/archives/2025/06/after-20-years-i-turned-off-google-adsense-for-my-w...
183•datadrivenangel•9h ago•120 comments