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.

11 year old unsoundness bugs found in Rust borrow checker

https://github.com/rust-lang/rust/issues/164250
293•formerly_proven•3h ago•161 comments

An hour of audio transcribed in about 13s on MacBook Air

https://eg2.haku.sh/
143•amrrs•2h ago•43 comments

Apple's Minions: A virtual GPU cloud built from idle Apple Silicon Macs

https://machinelearning.apple.com/research/distributed-gpu-cloud
26•acossta•1h ago•7 comments

Hittite royal archive found in Turkey

https://www.thehistoryblog.com/archives/77107
171•benbreen•7h ago•31 comments

Mozilla Introduces Firefox Enterprise

https://www.firefox.com/en-US/enterprise/
130•recvonline•1h ago•59 comments

Show HN: Use your OpenAI subscription to create audiobooks

https://pdftomp3.com/connect-ai/
76•janpmz•3h ago•45 comments

CFTC Staff Were Told to Retract Analysis of Suspicious Oil Trades

https://www.bloomberg.com/news/features/2026-10-13/cftc-staff-told-to-retract-analysis-of-suspici...
185•helsinkiandrew•3h ago•75 comments

Apple HomeView

https://www.apple.com/apple-homeview/
75•etothet•31m ago•78 comments

Character.ai Files for Bankruptcy

https://www.theverge.com/ai-artificial-intelligence/1009802/character-ai-files-for-bankruptcy-disney
92•yanis_t•2h ago•51 comments

The baffling intelligence of a single cell (2024)

https://jsomers.net/e-coli-chemotaxis/
333•jsomers•2d ago•95 comments

GLM-Legal

https://z.ai/blog/glm-legal
611•ilreb•21h ago•338 comments

Intel D270 GPU AI Accelerator–Up to 480 GB LPDDR5X

https://www.intel.com/content/www/us/en/products/details/discrete-gpus/data-center-gpu/d-series.html
265•hurricanepootis•15h ago•136 comments

Hackers activate automatic defrosting in supermarket fridges across Europe

https://www.tomshardware.com/tech-industry/cyber-security/unprecedented-cyberattack-cripples-supe...
780•Zeekaas•1d ago•899 comments

A Modern Web App in C

https://prophitt.me/writing/a-modern-web-app-in-c
626•prophittcorey•21h ago•274 comments

Document Review with Unsiloed and TypeSafe Jev

https://www.unsiloed.ai/blog/document-review-unsiloed-typesafe-jev
24•ritzaco•5h ago•6 comments

Character.ai files for Chapter 11 bankruptcy

https://blog.character.ai/an-update-on-character-ai/
38•nryoo•6h ago•11 comments

Janas: Run LLMs larger than RAM by streaming experts from SSD

https://github.com/prabanta-dev/janas
180•khalidkhair•15h ago•65 comments

A Visual Intro to Complex Numbers

https://photonlines.substack.com/p/a-visual-intro-to-complex-numbers
4•surprisetalk•1h ago•0 comments

Making big downloads resumable in Firefox

https://lunarwatcher.codeberg.page/til/firefox/resumable-big-downloads.html
242•speckx•17h ago•117 comments

Who is vfmaddrnd231pd?

https://purplesyringa.moe/blog/who-is-vfmaddrnd231pd/
229•pngmangi•16h ago•21 comments

Turn a WiFi 7 Router into a 320Msps Software Defined Radio Receiver

https://github.com/h0m3us3r/w1700k-sdr
380•djfergus•1d ago•103 comments

AWS Lambda Web Functions

https://aws.amazon.com/blogs/aws/announcing-aws-lambda-web-functions-for-fast-consistent-web-app-...
61•HatchedLake721•3h ago•38 comments

DishwasherBench – Can Frontier Models Stack a Dishwasher?

https://github.com/composo-ai/DishwasherBench
71•mlukewizard•5h ago•39 comments

Citroen revives the 2CV for an electric age

https://www.bbc.com/news/articles/c620r33plgppo
374•scrlk•1d ago•416 comments

Writing a Demoscene Intro for the ZX Spectrum

https://www.markround.com/blog/2026/zx-spectrum-intro
156•zdw•17h ago•28 comments

Crypto thieves sell hardware wallets with secret eSIM

https://www.heise.de/en/news/Crypto-thieves-sell-hardware-wallets-with-secret-eSIM-11485188.html
88•qwertox•4h ago•60 comments

Launch HN: Agent37 (YC F26) – Low-cost agent sandboxes for running agents

146•vishnukool•20h ago•101 comments

AI is a tool and using it well takes skill

https://yyhh.org/blog/2026/10/ai-is-a-tool/
479•layer8•15h ago•390 comments

Show HN: SolidCraft – Open-Source Parametric CAD in Rust (With MCP Support)

https://github.com/bherbruck/solidcraft
91•bherbruck•13h ago•22 comments

Auto Research: Integer multiplication below n log n

https://app.getsupers.com/auto-research
69•swesnow•1d ago•34 comments