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.

Linux Kernel Explorer

https://reverser.dev/linux-kernel-explorer
107•tanelpoder•3h ago•20 comments

Penpot: The Open-Source Figma

https://github.com/penpot/penpot
320•selvan•7h ago•50 comments

Ray Marching Soft Shadows in 2D

https://www.rykap.com/2020/09/23/distance-fields/
48•memalign•2h ago•5 comments

Interactive λ-Reduction

https://deltanets.org/
28•jy14898•2d ago•9 comments

DIY NAS: 2026 Edition

https://blog.briancmoses.com/2025/11/diy-nas-2026-edition.html
188•sashk•7h ago•67 comments

Voyager 1 is about to reach one light-day from Earth

https://scienceclock.com/voyager-1-is-about-to-reach-one-light-day-from-earth/
926•ashishgupta2209•20h ago•314 comments

Music eases surgery and speeds recovery, study finds

https://www.bbc.com/news/articles/c231dv9zpz3o
73•1659447091•5h ago•18 comments

Willis Whitfield: A simple man with a simple solution that changed the world

https://www.sandia.gov/labnews/2024/04/04/willis-whitfield-a-simple-man-with-a-simple-solution-th...
68•rbanffy•2d ago•19 comments

G0-G3 corners, visualised: learn what "Apple corners" are

https://www.printables.com/model/1490911-g0-g3-corners-visualised-learn-what-apple-corners
40•dgroshev•3d ago•11 comments

S&box is now an open source game engine

https://sbox.game/news/update-25-11-26
318•MaximilianEmel•14h ago•102 comments

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

https://nickbenton.name/coqasm.pdf
70•addaon•5h ago•27 comments

New research highlights a shortage of male mentors for boys and young men

https://www.psypost.org/new-research-highlights-a-shortage-of-male-mentors-for-boys-and-young-men/
21•ashishgupta2209•54m ago•11 comments

Principles of Vasocomputation

https://opentheory.net/2023/07/principles-of-vasocomputation-a-unification-of-buddhist-phenomenol...
23•eatitraw•4h ago•5 comments

Gemini CLI Tips and Tricks for Agentic Coding

https://github.com/addyosmani/gemini-cli-tips
279•ayoisaiah•16h ago•94 comments

Migrating the main Zig repository from GitHub to Codeberg

https://ziglang.org/news/migrating-from-github-to-codeberg/
613•todsacerdoti•8h ago•506 comments

Running Unsupported iOS on Deprecated Devices

https://nyansatan.github.io/run-unsupported-ios/
152•OuterVale•11h ago•55 comments

Functional Data Structures and Algorithms: a Proof Assistant Approach

https://fdsa-book.net/
54•SchwKatze•8h ago•8 comments

Can you take an ox to Oxford?

https://alexwlchan.net/2025/ox-in-oxford/
12•surprisetalk•5d ago•3 comments

Last Issue of "ECMAScript News"

https://ecmascript.news/archive/es-next-news-2025-11-26.html
17•Klaster_1•3h ago•3 comments

Show HN: Era – Open-source local sandbox for AI agents

https://github.com/BinSquare/ERA
20•gregTurri•4h ago•9 comments

How/why to sweep async tasks under a Postgres table

https://taylor.town/pg-task
51•ostler•5d ago•17 comments

A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)

https://www.benjoffe.com/fast-date-64
330•benjoffe•4d ago•75 comments

Fara-7B: An efficient agentic model for computer use

https://github.com/microsoft/fara
133•maxloh•15h ago•44 comments

C100 Developer Terminal

https://caligra.com/
73•matthewsinclair•10h ago•79 comments

The EU made Apple adopt new Wi-Fi standards, and now Android can support AirDrop

https://arstechnica.com/gadgets/2025/11/the-eu-made-apple-adopt-new-wi-fi-standards-and-now-andro...
468•cyclecount•12h ago•216 comments

$96M AUD revamp of Bom website bombs out on launch

https://www.bbc.com/news/articles/c2k4dy15nqqo
15•sam-cop-vimes•5h ago•8 comments

Bring bathroom doors back to hotels

https://bringbackdoors.com/
659•bariumbitmap•11h ago•506 comments

Bonsai_term: A library for building dynamic terminal apps by Jane Street

https://github.com/janestreet/bonsai_term
30•azhenley•8h ago•9 comments

A woman on a mission to photograph every species of hummingbird

https://www.audubon.org/magazine/meet-woman-mission-photograph-every-species-of-hummingbird-world
132•zeech•4d ago•27 comments

DNS Firewalling with MISP and Technitium DNS Server

https://zaferbalkan.com/technitium-misp/
7•feldrim•2h ago•5 comments