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

The workers behind Meta's smart glasses can see everything

https://www.svd.se/a/K8nrV4/metas-ai-smart-glasses-and-data-privacy-concerns-workers-say-we-see-e...
479•sandbach•3h ago•256 comments

Seed of Might Color Correction Process (2023) [pdf]

https://andrewvanner.github.io/som/SoM_CC_Process_Day.pdf
62•haunter•2h ago•15 comments

Closure of the Weatheradio Service in Canada

https://www.rac.ca/rac-responds-to-the-closure-of-the-weatherradio-service-in-canada/
51•da768•2h ago•26 comments

Welcome (back) to Macintosh

https://take.surf/2026/03/01/welcome-back-to-macintosh
242•Udo_Schmitz•4h ago•153 comments

Show HN: I built a sub-500ms latency voice agent from scratch

https://www.ntik.me/posts/voice-agent
150•nicktikhonov•4h ago•41 comments

Show HN: PHP 8 disable_functions bypass PoC

https://github.com/m0x41nos/TimeAfterFree
6•m0x41nos•29m ago•0 comments

How to Build Your Own Quantum Computer

https://physics.aps.org/articles/v19/24
18•tzury•2h ago•1 comments

British Columbia to end time changes, adopt year-round daylight time

https://www.cbc.ca/news/canada/british-columbia/b-c-adopting-year-round-daylight-time-9.7111657
411•ireflect•5h ago•237 comments

First in-utero stem cell therapy for fetal spina bifida repair is safe: study

https://health.ucdavis.edu/news/headlines/first-ever-in-utero-stem-cell-therapy-for-fetal-spina-b...
246•gmays•10h ago•48 comments

New iPad Air, powered by M4

https://www.apple.com/newsroom/2026/03/apple-introduces-the-new-ipad-air-powered-by-m4/
317•Garbage•11h ago•517 comments

The 185-Microsecond Type Hint

https://blog.sturdystatistics.com/posts/type_hint/
40•kianN•3h ago•2 comments

Show HN: Govbase – Follow a bill from source text to news bias to social posts

https://govbase.com
153•foxfoxx•8h ago•69 comments

RCade: Building a Community Arcade Cabinet

https://www.frankchiarulli.com/blog/building-the-rcade/
38•evakhoury•4d ago•3 comments

Against Query Based Compilers

https://matklad.github.io/2026/02/25/against-query-based-compilers.html
14•surprisetalk•1d ago•2 comments

Show HN: Visual Lambda Calculus – a thesis project (2008) revived for the web

https://github.com/bntre/visual-lambda
16•bntr•2d ago•4 comments

Programmable Cryptography

https://0xparc.org/writings/programmable-cryptography-1
40•fi-le•2d ago•22 comments

Motorola announces a partnership with GrapheneOS

https://motorolanews.com/motorola-three-new-b2b-solutions-at-mwc-2026/
2058•km•18h ago•734 comments

Ask HN: Who is hiring? (March 2026)

165•whoishiring•9h ago•216 comments

"That Shape Had None" – A Horror of Substrate Independence (Short Fiction)

https://starlightconvenience.net/#that-shape-had-none
79•casmalia•6h ago•14 comments

Show HN: Pianoterm – Run shell commands from your Piano. A Linux CLI tool

https://github.com/vustagc/pianoterm
38•vustagc•4h ago•15 comments

Inside the M4 Apple Neural Engine, Part 1: Reverse Engineering

https://maderix.substack.com/p/inside-the-m4-apple-neural-engine
270•zdw•1d ago•69 comments

Launch HN: OctaPulse (YC W26) – Robotics and computer vision for fish farming

64•rohxnsxngh•9h ago•30 comments

Reflex (YC W23) Is Hiring Software Engineers – Python

https://www.ycombinator.com/companies/reflex/jobs
1•apetuskey•8h ago

iPhone 17e

https://www.apple.com/newsroom/2026/03/apple-introduces-iphone-17e/
192•meetpateltech•11h ago•236 comments

LFortran compiles fpm

https://lfortran.org/blog/2026/02/lfortran-compiles-fpm/
46•wtlin•3d ago•21 comments

Ask HN: Who wants to be hired? (March 2026)

66•whoishiring•9h ago•177 comments

Show HN: uBlock filter list to blur all Instagram Reels

https://gist.github.com/shraiwi/009c652da6ce8c99a6e1e0c86fe66886
98•shraiwi•5h ago•25 comments

Parallel coding agents with tmux and Markdown specs

https://schipper.ai/posts/parallel-coding-agents/
119•schipperai•11h ago•89 comments

Build your own Command Line with ANSI escape codes (2016)

https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html
35•vinhnx•2d ago•12 comments

Packaging a Gleam app into a single executable (2025)

https://www.dhzdhd.dev/blog/gleam-executable
83•todsacerdoti•9h ago•7 comments