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.

Motorola announces a partnership with GrapheneOS Foundation

https://motorolanews.com/motorola-three-new-b2b-solutions-at-mwc-2026/
464•km•3h ago•143 comments

Making Video Games in 2025 (without an engine)

https://www.noelberry.ca/posts/making_games_in_2025/
116•alvivar•3d ago•26 comments

/e/OS is a complete "deGoogled", mobile ecosystem

https://e.foundation/e-os/
15•doener•40m ago•0 comments

Show HN: Omni – Open-source workplace search and chat, built on Postgres

https://github.com/getomnico/omni
14•prvnsmpth•51m ago•1 comments

Computer-generated dream world: Virtual reality for a 286 processor

https://deadlime.hu/en/2026/02/22/computer-generated-dream-world/
101•MBCook•5h ago•15 comments

If AI writes code, should the session be part of the commit?

https://github.com/mandel-macaque/memento
237•mandel_x•9h ago•232 comments

How to talk to anyone and why you should

https://www.theguardian.com/lifeandstyle/2026/feb/24/stranger-secret-how-to-talk-to-anyone-why-yo...
25•Looky1173•2h ago•270 comments

WebMCP is available for early preview

https://developer.chrome.com/blog/webmcp-epp
285•andsoitis•11h ago•158 comments

Show HN: Timber – Ollama for classical ML models, 336x faster than Python

https://github.com/kossisoroyce/timber
128•kossisoroyce•8h ago•26 comments

How to record and retrieve anything you've ever had to look up twice

https://ellanew.com/2026/03/02/ptpl-197-record-retrieve-from-a-personal-knowledgebase
49•Curiositry•5h ago•21 comments

Right-sizes LLM models to your system's RAM, CPU, and GPU

https://github.com/AlexsJones/llmfit
144•bilsbie•10h ago•32 comments

Evolving descriptive text of mental content from human brain activity

https://www.bbc.com/future/article/20260226-how-ai-can-read-your-thoughts
22•ggm•4h ago•15 comments

Everett shuts down Flock camera network after judge rules footage public record

https://www.wltx.com/article/news/nation-world/281-53d8693e-77a4-42ad-86e4-3426a30d25ae
237•aranaur•5h ago•54 comments

An interactive intro to Elliptic Curve Cryptography

https://growingswe.com/blog/elliptic-curve-cryptography
23•vismit2000•3h ago•8 comments

Ghostty – Terminal Emulator

https://ghostty.org/docs
735•oli5679•21h ago•312 comments

Process-Based Concurrency: Why Beam and OTP Keep Being Right

https://variantsystems.io/blog/beam-otp-process-concurrency
32•linkdd•4h ago•20 comments

Tove Jansson's criticized illustrations of The Hobbit (2023)

https://tovejansson.com/hobbit-tolkien/
177•abelanger•2d ago•82 comments

Neocaml – Rubocop Creator's New OCaml Mode for Emacs

https://github.com/bbatsov/neocaml
4•TheWiggles•2d ago•0 comments

Enable CORS for Your Blog

https://www.blogsareback.com/guides/enable-cors
35•cdrnsf•2d ago•17 comments

Why does C have the best file API

https://maurycyz.com/misc/c_files/
113•maurycyz•14h ago•85 comments

Decision trees – the unreasonable power of nested decision rules

https://mlu-explain.github.io/decision-tree/
486•mschnell•1d ago•74 comments

Little Free Library

https://littlefreelibrary.org/
120•TigerUniversity•11h ago•64 comments

When does MCP make sense vs CLI?

https://ejholmes.github.io/2026/02/28/mcp-is-dead-long-live-the-cli.html
378•ejholmes•16h ago•244 comments

Microgpt explained interactively

https://growingswe.com/blog/microgpt
271•growingswe•1d ago•37 comments

Long Range E-Bike (2021)

https://jacquesmattheij.com/long-range-ebike/
164•birdculture•3d ago•253 comments

Next-gen spacecraft are overwhelming communication networks

https://atempleton.bearblog.dev/how-next-gen-spacecraft-are-overwhelming-our-communication-networks/
66•korrz•2d ago•23 comments

Ape Coding [fiction]

https://rsaksida.com/blog/ape-coding/
180•rmsaksida•19h ago•118 comments

Setting up phones is a nightmare

https://joelchrono.xyz/blog/setting-up-phones-is-a-nightmare/
157•bariumbitmap•3d ago•194 comments

Flightradar24 for Ships

https://atlas.flexport.com/
231•chromy•22h ago•47 comments

Why XML tags are so fundamental to Claude

https://glthr.com/XML-fundamental-to-Claude
204•glth•18h ago•140 comments