frontpage.
newsnewestaskshowjobs

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.

Apertus – Open Foundation Model for Sovereign AI

https://apertvs.ai/
174•T-A•3h ago•64 comments

Did my old job only exist because of fraud?

https://david.newgas.net/did-my-old-job-only-exist-because-of-fraud/
189•advisedwang•3h ago•82 comments

Everything is logarithms

https://alexkritchevsky.com/2026/05/25/everything-is-logarithms.html
93•E-Reverance•4h ago•11 comments

Petition against Meta's employee training data collection for ML models

https://mcipetition.com/
21•reasonableklout•1h ago•10 comments

I was wrong about the Midjourney ultra-sound scanner

https://twitter.com/MattZirwas/status/2068365802491834541
29•MrBuddyCasino•12h ago•21 comments

JSON-LD explained for personal websites

https://hawksley.dev/blog/json-ld-explained-for-personal-websites/
158•ethanhawksley•6h ago•41 comments

PowerFox Browser

https://powerfox.jazzzny.me/
64•thisislife2•3h ago•17 comments

From Combinatorial Mess to Linear Elegance: Architecting a Conversion Engine

https://blog.minimal.app/conversion-engine/
7•arthurofbabylon•4d ago•2 comments

Identity verification on Claude

https://support.claude.com/en/articles/14328960-identity-verification-on-claude
558•bathory•12h ago•500 comments

Beyond All Reason (Free Total Annihilation Inspired RTS)

https://www.beyondallreason.info
430•mosiuerbarso•13h ago•254 comments

Simple hard way to conjugate Japanese verbs

https://underreacted.leaflet.pub/3mmevu6woys27
27•valzevul•2h ago•25 comments

1983 Northern Telecom Commodore Phone

https://www.oldtelephoneroom.ca/1983-northern-telecom-commodore-phone/
6•arexxbifs•43m ago•0 comments

I Play Video Games with Spinal Muscular Atrophy

https://www.openassistivetech.org/how-i-actually-play-video-games-with-sma-the-tools-i-use-every-...
22•dannyobrien•3d ago•4 comments

Prefer duplication over the wrong abstraction (2016)

https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction
425•rafaepta•9h ago•289 comments

Good results fine tuning a local LLM like Qwen 3:0.6B to categorize questions

https://www.teachmecoolstuff.com/viewarticle/fine-tuning-a-local-llm-to-categorize-questions
13•dev-experiments•2h ago•0 comments

Show HN: Recall – fully-local project memory for Claude Code

https://github.com/raiyanyahya/recall
64•mateenah•4h ago•53 comments

There is minimal downside to switching to open models

https://www.marble.onl/posts/cancel_claude.html
32•amarble•4h ago•7 comments

HPV jabs cut risk of dying from cervical cancer before 30 to almost zero

https://www.theguardian.com/society/2026/jun/17/hpv-jabs-reduce-risk-dying-cervical-cancer-before...
142•toomuchtodo•4d ago•71 comments

The Doom Justifies the Valuation

https://geohot.github.io//blog/jekyll/update/2026/06/21/the-doom-justifies-the-valuation.html
15•inatreecrown2•32m ago•2 comments

FDA advisors unanimously vote to approve Moderna's mRNA after agency drama

https://arstechnica.com/health/2026/06/fda-advisors-unanimously-vote-to-approve-modernas-mrna-aft...
92•worik•3h ago•47 comments

The minimum viable unit of saleable software

https://brandur.org/minimum-viable-unit
123•brandur•8h ago•49 comments

(How to Write a (Lisp) Interpreter (In Python)) (2010)

https://norvig.com/lispy.html
164•tosh•9h ago•55 comments

Wildcard (YC W25) is hiring an applied ML engineer

https://www.ycombinator.com/companies/wildcard/jobs/SEmo4di-founding-applied-ml-engineer
1•kaushikmahorker•8h ago

Show HN: Criterion Closet as a website – pull any of 1,247 films off the shelf

https://the-criterion-closet.vercel.app
40•olievans•1d ago•10 comments

An Embedded Linux on a Single Floppy

https://github.com/w84death/floppinux
59•modinfo•2d ago•26 comments

Ask for no, don't ask for yes (2022)

https://www.mooreds.com/wordpress/archives/3518
105•skogstokig•5h ago•49 comments

Minecraft: Java Edition 26.2, the first version with Vulkan 1.2

https://www.minecraft.net/en-us/article/minecraft-java-edition-26-2
48•ObviouslyFlamer•4d ago•10 comments

Show HN: MiniPCs.zip – Charting the Pareto frontier of Mini PCs

https://minipcs.zip
8•yathern•1d ago•6 comments

Show HN: Teach your kids perfect pitch

https://github.com/paytonjjones/bsharp
51•paytonjjones•12h ago•31 comments

My 1992 view of the problems of computer programming in 1992

https://blog.plover.com/prog/fortran-i.html
5•pavel_lishin•3h ago•1 comments