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.

Learning Music with Strudel

https://terryds.notion.site/Learning-Music-with-Strudel-2ac98431b24180deb890cc7de667ea92
114•terryds•6d ago•21 comments

Nixtml: Static website and blog generator written in Nix

https://github.com/arnarg/nixtml
34•todsacerdoti•1h ago•5 comments

Addressing the adding situation

https://xania.org/202512/02-adding-integers
188•messe•4h ago•54 comments

Mistral 3 family of models released

https://mistral.ai/news/mistral-3
208•pember•1h ago•55 comments

Advent of Compiler Optimisations 2025

https://xania.org/202511/advent-of-compiler-optimisation
232•vismit2000•6h ago•33 comments

Python Data Science Handbook

https://jakevdp.github.io/PythonDataScienceHandbook/
70•cl3misch•3h ago•13 comments

YesNotice

https://infinitedigits.co/docs/software/yesnotice/
28•surprisetalk•1w ago•12 comments

Show HN: Marmot – Single-binary data catalog (no Kafka, no Elasticsearch)

https://github.com/marmotdata/marmot
34•charlie-haley•1h ago•5 comments

A series of vignettes from my childhood and early career

https://www.jasonscheirer.com/weblog/vignettes/
81•absqueued•3h ago•48 comments

Apple Releases Open Weights Video Model

https://starflow-v.github.io
326•vessenes•11h ago•103 comments

What will enter the public domain in 2026?

https://publicdomainreview.org/features/entering-the-public-domain/2026/
385•herbertl•13h ago•244 comments

YouTube increases FreeBASIC performance (2019)

https://freebasic.net/forum/viewtopic.php?t=27927
115•giancarlostoro•2d ago•21 comments

Comparing AWS Lambda ARM64 vs. x86_64 Performance Across Runtimes in Late 2025

https://chrisebert.net/comparing-aws-lambda-arm64-vs-x86_64-performance-across-multiple-runtimes-...
85•hasanhaja•7h ago•39 comments

Is 2026 Next Year?

https://www.google.com/search?q=is+2026+next+year&oq=is+2026+next+year
91•kjhughes•1h ago•34 comments

DeepSeek-v3.2: Pushing the frontier of open large language models [pdf]

https://huggingface.co/deepseek-ai/DeepSeek-V3.2/resolve/main/assets/paper.pdf
898•pretext•1d ago•424 comments

India orders smartphone makers to preload state-owned cyber safety app

https://www.reuters.com/sustainability/boards-policy-regulation/india-orders-mobile-phones-preloa...
826•jmsflknr•1d ago•598 comments

Proximity to coworkers increases long-run development, lowers short-term output

https://pallais.scholars.harvard.edu/publications/power-proximity-coworkers-training-tomorrow-or-...
95•delichon•2h ago•62 comments

Show HN: RunMat – runtime with auto CPU/GPU routing for dense math

https://github.com/runmat-org/runmat
8•nallana•1h ago•0 comments

Beej's Guide to Learning Computer Science

https://beej.us/guide/bglcs/
259•amruthreddi•2d ago•92 comments

An LED panel that shows the aviation around you

https://github.com/AxisNimble/TheFlightWall_OSS
51•yzydserd•5d ago•9 comments

How Brian Eno Created Ambient 1: Music for Airports (2019)

https://reverbmachine.com/blog/deconstructing-brian-eno-music-for-airports/
132•dijksterhuis•8h ago•67 comments

Fallout 2's Chris Avellone describes his game design philosophy

https://arstechnica.com/gaming/2025/12/fallout-2-designer-chris-avellone-recalls-his-first-forays...
14•LaSombra•30m ago•0 comments

Lazier Binary Decision Diagrams for set-theoretic types

https://elixir-lang.org/blog/2025/12/02/lazier-bdds-for-set-theoretic-types/
20•tvda•3h ago•2 comments

Rootless Pings in Rust

https://bou.ke/blog/rust-ping/
94•bouk•9h ago•67 comments

OpenAI declares 'code red' as Google catches up in AI race

https://www.theverge.com/news/836212/openai-code-red-chatgpt
28•goplayoutside•1h ago•14 comments

Tom Stoppard has died

https://www.bbc.com/news/articles/c74xe49q7vlo
146•mstep•2d ago•45 comments

Reverse math shows why hard problems are hard

https://www.quantamagazine.org/reverse-mathematics-illuminates-why-hard-problems-are-hard-20251201/
142•gsf_emergency_6•13h ago•29 comments

Zig's new plan for asynchronous programs

https://lwn.net/SubscriberLink/1046084/4c048ee008e1c70e/
55•messe•1h ago•47 comments

After Windows Update, Password icon invisible, click where it used to be

https://support.microsoft.com/en-us/topic/august-29-2025-kb5064081-os-build-26100-5074-preview-3f...
136•zdw•14h ago•136 comments

Man unexpectedly cured of HIV after stem cell transplant

https://www.newscientist.com/article/2506595-man-unexpectedly-cured-of-hiv-after-stem-cell-transp...
125•doener•6h ago•25 comments