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

Comments

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

Size of Life

https://neal.fun/size-of-life/
449•eatonphil•2h ago•83 comments

DeepSeek uses banned Nvidia chips for AI model, report says

https://finance.yahoo.com/news/china-deepseek-uses-banned-nvidia-131207746.html
139•goodway•2h ago•101 comments

Australia begins enforcing world-first teen social media ban

https://www.reuters.com/legal/litigation/australia-social-media-ban-takes-effect-world-first-2025...
94•chirau•1d ago•189 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
36•__rito__•1h ago•11 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
85•pretext•2h ago•35 comments

Why the Sanitizer API is just `setHTML()`

https://frederikbraun.de/why-sethtml.html
50•birdculture•1d ago•23 comments

Gundam is just the same as Jane Austen but happens to include giant mech suits

https://eli.li/gundam-is-just-the-same-as-jane-austen-but-happens-to-include-giant-mech-suits
20•surprisetalk•1w ago•7 comments

Factor 0.101 now available

https://re.factorcode.org/2025/12/factor-0-101-now-available.html
40•birdculture•7h ago•3 comments

9 Mothers (YC X26) Is Hiring

https://app.dover.com/jobs/9mothers
1•ukd1•1h ago

Launch HN: InspectMind (YC W24) – AI agent for reviewing construction drawings

18•aakashprasad91•2h ago•8 comments

COM Like a Bomb: Rust Outlook Add-in

https://tritium.legal/blog/outlook
40•piker•3h ago•17 comments

Valve: HDMI Forum Continues to Block HDMI 2.1 for Linux

https://www.heise.de/en/news/Valve-HDMI-Forum-Continues-to-Block-HDMI-2-1-for-Linux-11107440.html
88•OsrsNeedsf2P•1h ago•30 comments

Golang's big miss on memory arenas

https://avittig.medium.com/golangs-big-miss-on-memory-arenas-f1375524cc90
44•andr3wV•6d ago•28 comments

RoboCrop: Teaching robots how to pick tomatoes

https://phys.org/news/2025-12-robocrop-robots-tomatoes.html
20•smurda•3h ago•7 comments

Typewriter Plotters (2022)

https://biosrhythm.com/?p=2143
30•LaSombra•5d ago•0 comments

Volcanic eruptions set off a chain of events that brought Black Death to Europe

https://www.cam.ac.uk/stories/volcanoes-black-death
43•gmays•4d ago•4 comments

Super-Flat ASTs

https://jhwlr.io/super-flat-ast/
26•mmphosis•6d ago•2 comments

Deprecations via warnings don't work for Python libraries

https://sethmlarson.dev/deprecations-via-warnings-dont-work-for-python-libraries
22•scolby33•2d ago•26 comments

Revisiting "Let's Build a Compiler"

https://eli.thegreenplace.net/2025/revisiting-lets-build-a-compiler/
214•cui•12h ago•35 comments

Is it a bubble?

https://www.oaktreecapital.com/insights/memo/is-it-a-bubble
32•saigrandhi•1h ago•12 comments

Israel used Palantir technologies in pager attack in Lebanon

https://the307.substack.com/p/revealed-israel-used-palantir-technologies
129•cramsession•3h ago•62 comments

England Historic Aerial Photo Explorer

https://historicengland.org.uk/images-books/archive/collections/aerial-photos/
17•davemateer•2h ago•3 comments

PeerTube is recognized as a digital public good by Digital Public Goods Alliance

https://www.digitalpublicgoods.net/r/peertube
652•fsflover•1d ago•141 comments

Map of all the buildings in the world

https://gizmodo.com/literally-a-map-showing-all-the-buildings-in-the-world-2000694696
137•dr_dshiv•5d ago•48 comments

Show HN: MCPShark – Traffic Inspector for Model Context Protocol

16•mywork-dev•1h ago•0 comments

Rust in the kernel is no longer experimental

https://lwn.net/Articles/1049831/
868•rascul•15h ago•640 comments

Cloth Simulation

https://cloth.mikail-khan.com/
157•adamch•1w ago•32 comments

Show HN: Gemini Pro 3 imagines the HN front page 10 years from now

https://dosaygo-studio.github.io/hn-front-page-2035/news
3222•keepamovin•1d ago•916 comments

In New York City, congestion pricing leads to marked drop in pollution

https://e360.yale.edu/digest/new-york-congestion-pricing-pollution
345•Brajeshwar•3h ago•340 comments

New benchmark shows top LLMs struggle in real mental health care

https://swordhealth.com/newsroom/sword-introduces-mindeval
86•RicardoRei•4h ago•118 comments