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

Comments

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

We Will Not Be Divided

https://notdivided.org
409•BloondAndDoom•1h ago•146 comments

Statement on the comments from Secretary of War Pete Hegseth

https://www.anthropic.com/news/statement-comments-secretary-war
238•surprisetalk•1h ago•44 comments

Smallest transformer that can add two 10-digit numbers

https://github.com/anadim/AdderBoard
61•ks2048•1d ago•12 comments

OpenAI raises $110B on $730B pre-money valuation

https://techcrunch.com/2026/02/27/openai-raises-110b-in-one-of-the-largest-private-funding-rounds...
386•zlatkov•11h ago•469 comments

Qt45: A small polymerase ribozyme that can synthesize itself

https://www.science.org/doi/10.1126/science.adt2760
42•ppnpm•2h ago•6 comments

A new California law says all operating systems need to have age verification

https://www.pcgamer.com/software/operating-systems/a-new-california-law-says-all-operating-system...
388•WalterSobchak•11h ago•383 comments

Emuko: Fast RISC-V emulator written in Rust, boots Linux

https://github.com/wkoszek/emuko
42•felipap•3h ago•4 comments

NASA announces overhaul of Artemis program amid safety concerns, delays

https://www.cbsnews.com/news/nasa-artemis-moon-program-overhaul/
213•voxadam•9h ago•206 comments

A Chinese official’s use of ChatGPT revealed an intimidation operation

https://www.cnn.com/2026/02/25/politics/chatgpt-china-intimidation-operation
144•cwwc•10h ago•92 comments

A better streams API is possible for JavaScript

https://blog.cloudflare.com/a-better-web-streams-api/
375•nnx•12h ago•127 comments

I am directing the Department of War to designate Anthropic a supply-chain risk

https://twitter.com/secwar/status/2027507717469049070
1060•jacobedawson•3h ago•901 comments

Show HN: Claude-File-Recovery, recover files from your ~/.claude sessions

https://github.com/hjtenklooster/claude-file-recovery
49•rikk3rt•9h ago•17 comments

Inventing the Lisa user interface – Interactions

https://dl.acm.org/doi/10.1145/242388.242405
14•rbanffy•2d ago•1 comments

Distributed Systems for Fun and Profit

https://book.mixu.net/distsys/single-page.html
29•vinhnx•3d ago•0 comments

Let's discuss sandbox isolation

https://www.shayon.dev/post/2026/52/lets-discuss-sandbox-isolation/
104•shayonj•7h ago•30 comments

Get free Claude max 20x for open-source maintainers

https://claude.com/contact-sales/claude-for-oss
451•zhisme•17h ago•202 comments

Open source calculator firmware DB48X forbids CA/CO use due to age verification

https://github.com/c3d/db48x/commit/7819972b641ac808d46c54d3f5d1df70d706d286
139•iamnothere•10h ago•68 comments

Writing a Guide to SDF Fonts

https://www.redblobgames.com/blog/2026-02-26-writing-a-guide-to-sdf-fonts/
78•chunkles•7h ago•5 comments

Otters as Bioindicators of Estuarine Health

https://emt.pensoft.net/article/185117/
19•PaulHoule•4h ago•2 comments

Building secure, scalable agent sandbox infrastructure

https://browser-use.com/posts/two-ways-to-sandbox-agents
57•gregpr07•11h ago•9 comments

Kyber (YC W23) Is Hiring an Enterprise Account Executive

https://www.ycombinator.com/companies/kyber/jobs/59yPaCs-enterprise-account-executive-ae
1•asontha•7h ago

Gawk 5.4.0 is released, with replaced MinRX matcher

https://lists.gnu.org/archive/html/info-gnu/2026-02/msg00011.html
11•zdw•2d ago•0 comments

Allocating on the Stack

https://go.dev/blog/allocation-optimizations
125•spacey•9h ago•49 comments

PCB Tracer

https://pcbtracer.com
54•Luc•3d ago•30 comments

Implementing a Z80 / ZX Spectrum emulator with Claude Code

https://antirez.com/news/160
126•antirez•2d ago•62 comments

We gave terabytes of CI logs to an LLM

https://www.mendral.com/blog/llms-are-good-at-sql
171•shad42•10h ago•93 comments

Rob Grant, creator of Red Dwarf, has died

https://www.beyondthejoke.co.uk/content/17193/red-dwarf-rob-grant
242•nephihaha•6h ago•69 comments

Modeling cycles of grift with evolutionary game theory

https://www.oranlooney.com/post/grifters-skeptics-marks/
83•ibobev•3d ago•36 comments

Reading English from 1000 AD

https://lewiscampbell.tech/blog/260224.html
114•LAC-Tech•4d ago•37 comments

Show HN: I built a self-hosted course platform in Clojure

https://clojure.stream
39•jacekschae•1d ago•5 comments