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.

I'm helping my dog vibe code games

https://www.calebleak.com/posts/dog-game/
292•cleak•2h ago•99 comments

I pitched a roller coaster to Disneyland at age 10 in 1978

https://wordglyph.xyz/one-piece-at-a-time
317•wordglyph•7h ago•110 comments

Nearby Glasses

https://github.com/yjeanrenaud/yj_nearbyglasses
58•zingerlio•2h ago•28 comments

HuggingFace Agent Skills

https://github.com/huggingface/skills
41•armcat•2h ago•8 comments

I think WebRTC is better than SSH-ing for connecting to Mac terminal from iPhone

https://macky.dev
21•Sayuj01•1h ago•16 comments

IRS Tactics Against Meta Open a New Front in the Corporate Tax Fight

https://www.nytimes.com/2026/02/24/business/irs-meta-corporate-taxes.html
146•mitchbob•7h ago•165 comments

Open Letter to Google on Mandatory Developer Registration for App Distribution

https://keepandroidopen.org/open-letter/
221•kaplun•2h ago•139 comments

Steel Bank Common Lisp

https://www.sbcl.org/
53•tosh•1h ago•9 comments

Tesla registrations crash 17% in Europe as BEV market surges 14%

https://electrek.co/2026/02/24/tesla-eu-registrations-crash-january-2026-bev-growth/
142•breve•1h ago•108 comments

We installed a single turnstile to feel secure

https://idiallo.com/blog/installed-single-turnstile-for-security-theater
181•firefoxd•1d ago•74 comments

Extending C with Prolog (1994)

https://www.amzi.com/articles/irq_expert_system.htm
44•Antibabelic•2d ago•17 comments

Verge (YC S15) Is Hiring a Director of Computational Biology and AI Scientists/Eng

https://jobs.ashbyhq.com/verge-genomics
1•alicexzhang•3h ago

Diode – Build, program, and simulate hardware

https://www.withdiode.com/
393•rossant•3d ago•89 comments

Samsung Upcycle Promise

https://www.xda-developers.com/samsung-promised-make-old-phones-useful-galaxy-upcycle/
144•1970-01-01•1d ago•83 comments

Osaka: Kansai Airport proud to have never lost single piece of luggage (2024)

https://japannews.yomiuri.co.jp/features/japan-focus/20241228-229891/
160•thunderbong•3h ago•57 comments

OpenAI, the US government and Persona built an identity surveillance machine

https://vmfunc.re/blog/persona/
266•rzk•1h ago•82 comments

OpenAI resets spending expectations, from $1.4T to $600B

https://www.cnbc.com/2026/02/20/openai-resets-spend-expectations-targets-around-600-billion-by-20...
83•randycupertino•1h ago•52 comments

Why the KeePass format should be based on SQLite

https://mketab.org/blog/sqlite_kdbx/
51•wps•7h ago•39 comments

Show HN: Emdash – Open-source agentic development environment

https://github.com/generalaction/emdash
23•onecommit•2h ago•9 comments

λProlog: Logic programming in higher-order logic

https://www.lix.polytechnique.fr/Labo/Dale.Miller/lProlog/
121•ux266478•3d ago•35 comments

IDF killed Gaza aid workers at point blank range in 2025 massacre: Report

https://www.dropsitenews.com/p/israeli-soldiers-tel-sultan-gaza-red-crescent-civil-defense-massac...
446•Qem•7h ago•85 comments

The Missing Semester of Your CS Education – Revised for 2026

https://missing.csail.mit.edu/
330•anishathalye•1d ago•93 comments

Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148

https://hacks.mozilla.org/2026/02/goodbye-innerhtml-hello-sethtml-stronger-xss-protection-in-fire...
283•todsacerdoti•7h ago•126 comments

Show HN: Chaos Monkey but for Audio Video Testing (WebRTC and UDP)

https://github.com/MdSadiqMd/AV-Chaos-Monkey
4•MdSadiqMd•1d ago•0 comments

Terence Tao, at 8 years old (1984) [pdf]

https://gwern.net/doc/iq/high/smpy/1984-clements.pdf
450•gurjeet•1d ago•273 comments

Denver dumps Flock, awards contract to Axon

https://www.9news.com/article/news/local/denver-removing-flock-cameras-new-axon-contract/73-640b5...
60•therobots927•2h ago•24 comments

A distributed queue in a single JSON file on object storage

https://turbopuffer.com/blog/object-storage-queue
137•Sirupsen•3d ago•48 comments

Cardiorespiratory fitness is associated with lower anger and anxiety

https://linkinghub.elsevier.com/retrieve/pii/S000169182600171X
66•PaulHoule•3h ago•59 comments

Stripe valued at $159B, 2025 annual letter

https://stripe.com/newsroom/news/stripe-2025-update
144•jez•5h ago•156 comments

Discord cuts ties with identity verification software, Persona

https://fortune.com/2026/02/24/discord-peter-thiel-backed-persona-identity-verification-breach/
363•robtherobber•8h ago•251 comments