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

Comments

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

Same-day upstream Linux support for Snapdragon 8 Elite Gen 5

https://www.qualcomm.com/developer/blog/2025/10/same-day-snapdragon-8-elite-gen-5-upstream-linux-...
251•mfilion•5h ago•114 comments

Underrated reasons to be thankful V

https://dynomight.net/thanks-5/
17•numeri•1h ago•6 comments

Physicists drive antihydrogen breakthrough at CERN

https://phys.org/news/2025-11-physicists-antihydrogen-breakthrough-cern-technique.html
56•naves•5d ago•2 comments

Quake Engine Indicators

https://fabiensanglard.net/quake_indicators/index.html
145•liquid_x•3d ago•25 comments

Memories of .us

https://computer.rip/2025-11-11-dot-us.html
60•sabas_ge•1d ago•5 comments

Why Strong Consistency?

https://brooker.co.za/blog/2025/11/18/consistency.html
48•SchwKatze•23h ago•26 comments

Feedback doesn't scale

https://another.rodeo/feedback/
61•ohjeez•1d ago•12 comments

Tell HN: Happy Thanksgiving

356•prodigycorp•16h ago•80 comments

Linux Kernel Explorer

https://reverser.dev/linux-kernel-explorer
489•tanelpoder•15h ago•72 comments

Penpot: The Open-Source Figma

https://github.com/penpot/penpot
648•selvan•19h ago•158 comments

DeepSeekMath-V2: Towards Self-Verifiable Mathematical Reasoning [pdf]

https://github.com/deepseek-ai/DeepSeek-Math-V2/blob/main/DeepSeekMath_V2.pdf
34•fspeech•1h ago•9 comments

Show HN: Runprompt – run .prompt files from the command line

https://github.com/chr15m/runprompt
84•chr15m•7h ago•27 comments

LinkedIn is loud, and corporate is hell

https://ramones.dev/posts/linkedin-is-loud/
10•austinallegro•1h ago•4 comments

Pakistan says rooftop solar output to exceed grid demand in some hubs next year

https://www.reuters.com/sustainability/boards-policy-regulation/pakistan-says-rooftop-solar-outpu...
141•toomuchtodo•4h ago•106 comments

Inspired by Spider-Man, scientists recreate web-slinging technology

https://scienceclock.com/inspired-by-spider-man-scientists-recreate-web-slinging-technology/
21•ohjeez•1d ago•5 comments

The VanDersarl Blériot: a 1911 airplane homebuilt by teenage brothers

https://www.historynet.com/vandersarl-bleriot/
28•ForHackernews•4h ago•23 comments

TPUs vs. GPUs and why Google is positioned to win AI race in the long term

https://www.uncoveralpha.com/p/the-chip-made-for-the-ai-inference
168•vegasbrianc•8h ago•166 comments

The input stack on Linux: An end-to-end architecture overview

https://venam.net/blog/unix/2025/11/27/input_devices_linux.html
85•venamresm__•4h ago•5 comments

Mixpanel Security Breach

https://mixpanel.com/blog/sms-security-incident/
186•jaredwiener•14h ago•102 comments

DIY NAS: 2026 Edition

https://blog.briancmoses.com/2025/11/diy-nas-2026-edition.html
362•sashk•18h ago•231 comments

Coq: The World's Best Macro Assembler? (2013) [pdf]

https://nickbenton.name/coqasm.pdf
128•addaon•17h ago•58 comments

Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

https://github.com/Dancode-188/synckit
63•danbitengo•7h ago•28 comments

The current state of the theory that GPL propagates to AI models

https://shujisado.org/2025/11/27/gpl-propagates-to-ai-models-trained-on-gpl-code/
151•jonymo•8h ago•186 comments

Ray Marching Soft Shadows in 2D (2020)

https://www.rykap.com/2020/09/23/distance-fields/
163•memalign•14h ago•28 comments

ZZ9000 multifunction card for Zorro Amigas

https://www.amiga-shop.net/en/Amiga-Hardware/Amiga-graphic-cards/ZZ9000-multifunction-card-for-Zo...
6•doener•4d ago•1 comments

AI CEO – Replace your boss before they replace you

https://replaceyourboss.ai/
293•_tk_•3h ago•116 comments

Show HN: MkSlides – Markdown to slides with a similar workflow to MkDocs

https://github.com/MartenBE/mkslides
58•MartenBE•8h ago•8 comments

Interactive λ-Reduction

https://deltanets.org/
106•jy14898•3d ago•22 comments

Technical Deflation

https://benanderson.work/blog/technical-deflation/
65•0x79de•3d ago•63 comments

Music eases surgery and speeds recovery, study finds

https://www.bbc.com/news/articles/c231dv9zpz3o
175•1659447091•16h ago•83 comments