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

Comments

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

Axios compromised on NPM – Malicious versions drop remote access trojan

https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-t...
1234•mtud•11h ago•449 comments

Ollama is now powered by MLX on Apple Silicon in preview

https://ollama.com/blog/mlx
426•redundantly•10h ago•201 comments

Claude Code's source code has been leaked via a map file in their NPM registry

https://twitter.com/Fried_rice/status/2038894956459290963
695•treexs•5h ago•376 comments

Open source CAD in the browser (Solvespace)

https://solvespace.com/webver.pl
21•phkahler•1h ago•0 comments

Artemis II is not safe to fly

https://idlewords.com/2026/03/artemis_ii_is_not_safe_to_fly.htm
524•idlewords•11h ago•334 comments

Combinators

https://tinyapl.rubenverg.com/docs/info/combinators
23•tosh•2h ago•4 comments

Audio tapes reveal mass rule-breaking in Milgram's obedience experiments

https://www.psypost.org/audio-tapes-reveal-mass-rule-breaking-in-milgram-s-obedience-experiments-...
75•lentoutcry•2d ago•40 comments

Anthropic: Claude Code users hitting usage limits 'way faster than expected'

https://www.theregister.com/2026/03/31/anthropic_claude_code_limits/
73•samizdis•1h ago•40 comments

Google's 200M-parameter time-series foundation model with 16k context

https://github.com/google-research/timesfm
202•codepawl•8h ago•83 comments

Universal Claude.md – cut Claude output tokens

https://github.com/drona23/claude-token-efficient
373•killme2008•12h ago•132 comments

Fedware: Government apps that spy harder than the apps they ban

https://www.sambent.com/the-white-house-app-has-huawei-spyware-and-an-ice-tip-line/
608•speckx•19h ago•233 comments

Nobody Is Coming to Save Your Career

https://alifeengineered.substack.com/p/nobody-is-coming-to-save-your-career
29•herbertl•55m ago•9 comments

Do your own writing

https://alexhwoods.com/dont-let-ai-write-for-you/
627•karimf•1d ago•204 comments

Multiple Sclerosis

https://subfictional.com/multiple-sclerosis/
11•luu•4d ago•1 comments

30 Years Ago, Robots Learned to Walk Without Falling

https://spectrum.ieee.org/honda-p2-robot-ieee-milestone
20•vinhnx•2d ago•7 comments

Good CTE, Bad CTE

https://boringsql.com/posts/good-cte-bad-cte/
95•radimm•1d ago•26 comments

7,655 Ransomware Claims in One Year: Group, Sector, and Country Breakdown

https://ciphercue.com/blog/7655-ransomware-claims-march-2025-to-march-2026
37•adulion•4h ago•7 comments

What major works of literature were written after age of 85? 75? 65?

https://statmodeling.stat.columbia.edu/2026/03/25/what-major-works-of-literature-were-written-aft...
33•paulpauper•2d ago•16 comments

RamAIn (YC W26) Is Hiring

https://www.ycombinator.com/companies/ramain/jobs/jezgwo5-ai-ml-research-engineer
1•svee•7h ago

GitHub backs down, kills Copilot pull-request ads after backlash

https://www.theregister.com/2026/03/30/github_copilot_ads_pull_requests/
385•_____k•8h ago•229 comments

Clojure: The Documentary, official trailer [video]

https://www.youtube.com/watch?v=JJEyffSdBsk
264•fogus•4d ago•34 comments

How to turn anything into a router

https://nbailey.ca/post/router/
714•yabones•1d ago•248 comments

Android Developer Verification

https://android-developers.googleblog.com/2026/03/android-developer-verification-rolling-out-to-a...
295•ingve•15h ago•295 comments

Turning a MacBook into a touchscreen with $1 of hardware (2018)

https://anishathalye.com/macbook-touchscreen/
358•HughParry•18h ago•181 comments

We're Pausing Asimov Press

https://www.asimov.press/p/pause
61•bookofjoe•1d ago•28 comments

In Expanding de Sitter Space, Quantum Mechanics Gets More Elusive

https://www.quantamagazine.org/in-expanding-de-sitter-space-quantum-mechanics-gets-even-more-elus...
5•pseudolus•2h ago•1 comments

One of the largest salt mines in the world exists under Lake Erie

https://apnews.com/article/cleveland-salt-mine-winter-road-0daf091e3d56f65766bcf6a597683893
50•1659447091•2d ago•35 comments

OpenGridWorks: The Electricity Infrasctructure, Mapped

https://www.opengridworks.com
140•jonbraun•16h ago•21 comments

Bird brains (2023)

https://www.dhanishsemar.com/writing/bird-brains
329•DiffTheEnder•1d ago•207 comments

Oscar Reutersvärd (2021)

https://escherinhetpaleis.nl/en/about-escher/escher-today/oscar-reutersvard
48•layer8•1d ago•4 comments