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

Comments

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

MessageFormat: Unicode standard for localizable message strings

https://github.com/unicode-org/message-format-wg
58•todsacerdoti•2h ago•26 comments

I’m joining OpenAI

https://steipete.me/posts/2026/openclaw
1135•mfiguiere•14h ago•836 comments

I want to wash my car. The car wash is 50 meters away. Should I walk or drive?

https://mastodon.world/@knowmadd/116072773118828295
678•novemp•6h ago•458 comments

Vim-pencil: Rethinking Vim as a tool for writing

https://github.com/preservim/vim-pencil
27•gurjeet•3d ago•2 comments

Qwen3.5: Towards Native Multimodal Agents

https://qwen.ai/blog?id=qwen3.5
39•danielhanchen•3h ago•12 comments

Magnus Carlsen Wins the Freestyle (Chess960) World Championship

https://www.fide.com/magnus-carlsen-wins-2026-fide-freestyle-world-championship/
312•prophylaxis•14h ago•203 comments

picol: A Tcl interpreter in 500 lines of code

https://github.com/antirez/picol
48•tosh•4h ago•35 comments

Anthropic tries to hide Claude's AI actions. Devs hate it

https://www.theregister.com/2026/02/16/anthropic_claude_ai_edits/
38•beardyw•1h ago•6 comments

Modern CSS Code Snippets: Stop writing CSS like it's 2015

https://modern-css.com
518•eustoria•18h ago•207 comments

Rolling your own serverless OCR in 40 lines of code

https://christopherkrapu.com/blog/2026/ocr-textbooks-modal-deepseek/
9•mpcsb•3d ago•1 comments

Building SQLite with a small swarm

https://kiankyars.github.io/machine_learning/2026/02/12/sqlite.html
75•kyars•7h ago•56 comments

Arm wants a bigger slice of the chip business

https://www.economist.com/business/2026/02/12/arm-wants-a-bigger-slice-of-the-chip-business
100•andsoitis•10h ago•62 comments

Expensively Quadratic: The LLM Agent Cost Curve

https://blog.exe.dev/expensively-quadratic
53•luu•3d ago•33 comments

1,300-year-old world chronicle unearthed in Sinai

https://www.heritagedaily.com/2026/02/1300-year-old-world-chronicle-unearthed-in-sinai/156948
60•telotortium•4d ago•9 comments

Thanks a lot, AI: Hard drives are sold out for the year, says WD

https://mashable.com/article/ai-hard-drive-hdd-shortages-western-digital-sold-out
11•dClauzel•17m ago•1 comments

LT6502: A 6502-based homebrew laptop

https://github.com/TechPaula/LT6502
365•classichasclass•19h ago•178 comments

Audio is the one area small labs are winning

https://www.amplifypartners.com/blog-posts/arming-the-rebels-with-gpus-gradium-kyutai-and-audio-ai
225•rocauc•3d ago•61 comments

JavaScript-heavy approaches are not compatible with long-term performance goals

https://sgom.es/posts/2026-02-13-js-heavy-approaches-are-not-compatible-with-long-term-performanc...
107•luu•12h ago•120 comments

I gave Claude access to my pen plotter

https://harmonique.one/posts/i-gave-claude-access-to-my-pen-plotter
215•futurecat•2d ago•135 comments

Show HN: Microgpt is a GPT you can visualize in the browser

https://microgpt.boratto.ca
211•b44•18h ago•23 comments

Designing a 36-key custom keyboard layout (2021)

https://peterxjang.medium.com/designing-a-36-key-custom-keyboard-layout-24498a0eecd4
23•speckx•2d ago•10 comments

Hard problems in social media archiving

https://alexwlchan.net/2025/hard-problems-in-social-media-archiving/
11•surprisetalk•3d ago•2 comments

EU bans the destruction of unsold apparel, clothing, accessories and footwear

https://environment.ec.europa.eu/news/new-eu-rules-stop-destruction-unsold-clothes-and-shoes-2026...
1055•giuliomagnifico•19h ago•708 comments

Lost Soviet Moon Lander May Have Been Found

https://www.nytimes.com/2026/02/10/science/luna-9-moon-lander-soviet.html
65•Brajeshwar•4d ago•44 comments

Real-time PathTracing with global illumination in WebGL

https://erichlof.github.io/THREE.js-PathTracing-Renderer/
172•tobr•3d ago•15 comments

Gwtar: A static efficient single-file HTML format

https://gwern.net/gwtar
246•theblazehen•21h ago•77 comments

Pocketblue – Fedora Atomic for mobile devices

https://github.com/pocketblue/pocketblue
116•nikodunk•20h ago•32 comments

Error payloads in Zig

https://srcreigh.ca/posts/error-payloads-in-zig/
78•srcreigh•13h ago•28 comments

Show HN: Knock-Knock.net – Visualizing the bots knocking on my server's door

https://knock-knock.net
169•djkurlander•19h ago•71 comments

GNU Pies – Program Invocation and Execution Supervisor

https://www.gnu.org.ua/software/pies/
93•smartmic•15h ago•58 comments