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•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.

Founder of GitLab battles cancer by founding companies

https://sytse.com/cancer/
502•bob_theslob646•4h ago•120 comments

CSS is DOOMed

https://nielsleenheer.com/articles/2026/css-is-doomed-rendering-doom-in-3d-with-css/
69•msephton•1h ago•24 comments

Further human + AI + proof assistant work on Knuth's "Claude Cycles" problem

https://twitter.com/BoWang87/status/2037648937453232504
110•mean_mistreater•3h ago•67 comments

Linux is an interpreter

https://astrid.tech/2026/03/28/0/linux-is-an-interpreter/
137•frizlab•5h ago•21 comments

AI overly affirms users asking for personal advice

https://news.stanford.edu/stories/2026/03/ai-advice-sycophantic-models-research
467•oldfrenchfries•8h ago•361 comments

I decompiled the White House's new app

https://thereallo.dev/blog/decompiling-the-white-house-app
304•amarcheschi•6h ago•107 comments

InpharmD (YC W21) Is Hiring – Senior Ruby on Rails Developer

https://inpharmd.com/jobs/senior-ruby-on-rails-engineer
1•tulasichintha•44m ago

The first 40 months of the AI era

https://lzon.ca/posts/other/thoughts-ai-era/
64•jpmitchell•3h ago•3 comments

OpenCiv1 – open-source rewrite of Civ1

https://github.com/rajko-horvat/OpenCiv1
43•caminanteblanco•3h ago•4 comments

Detecting file changes on macOS with kqueue

https://www.vegardstikbakke.com/kqueue/
50•benhoyt•4d ago•7 comments

I Built an Open-World Engine for the N64 [video]

https://www.youtube.com/watch?v=lXxmIw9axWw
308•msephton•10h ago•43 comments

1929: Inside the Greatest Crash in Wall Street History

https://www.nybooks.com/articles/2026/03/26/tick-tick-boom-1929-andrew-ross-sorkin/
21•mitchbob•3d ago•21 comments

Undroidwish – a single-file, batteries-included Tcl/Tk binary for many platforms

https://androwish.org/home/wiki?name=undroidwish
50•smartmic•5h ago•3 comments

Cocoa-Way – Native macOS Wayland compositor for running Linux apps seamlessly

https://github.com/J-x-Z/cocoa-way
280•OJFord•12h ago•90 comments

Private equity turned vulnerable elderly people into human ATMs

https://www.theguardian.com/society/2026/mar/28/the-great-care-home-cash-grab-how-private-equity-...
21•mordechai9000•37m ago•5 comments

Meta Partners with Arm to Develop New Class of Data Center Silicon

https://about.fb.com/news/2026/03/meta-partners-with-arm-to-develop-new-class-of-data-center-sili...
9•eatonphil•4d ago•1 comments

Spanish legislation as a Git repo

https://github.com/EnriqueLop/legalize-es
663•enriquelop•10h ago•199 comments

CERN uses ultra-compact AI models on FPGAs for real-time LHC data filtering

https://theopenreader.org/Journalism:CERN_Uses_Tiny_AI_Models_Burned_into_Silicon_for_Real-Time_L...
287•TORcicada•14h ago•126 comments

Circuit-level PDP-11/34 emulator

https://github.com/dbrll/ll-34
40•elvis70•5h ago•4 comments

rpg.actor Game Jam

https://rpg.actor/jam
54•Kye•5h ago•5 comments

Go hard on agents, not on your filesystem

https://jai.scs.stanford.edu/
567•mazieres•21h ago•304 comments

C++26: A User-Friednly assert() macro

https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
57•jandeboevrie•3d ago•41 comments

ICAO issued new power bank restriction on flight

https://www.icao.int/news/new-power-bank-restrictions-will-safeguard-international-aviation
48•phantomathkg•7h ago•63 comments

Improved Git Diffs with Delta, Fzf and a Little Shell Scripting

https://nickjanetakis.com/blog/awesome-git-diffs-with-delta-fzf-and-a-little-shell-scripting
101•nickjj•4d ago•33 comments

Google just gave Android power users a sideloading win

https://www.androidauthority.com/android-sideload-carry-over-3652845/
30•croemer•1h ago•20 comments

Hacking old hardware by renaming to .zip [video]

https://www.youtube.com/watch?v=P1kfuCkWo24
91•abadar•3d ago•69 comments

AMD's Ryzen 9 9950X3D2 Dual Edition crams 208MB of cache into a single chip

https://arstechnica.com/gadgets/2026/03/amds-ryzen-9-9950x3d2-dual-edition-crams-208mb-of-cache-i...
289•zdw•20h ago•159 comments

StationeryObject

https://stationeryobject.com/archive/
35•NaOH•3d ago•1 comments

Paper Tape Is All You Need – Training a Transformer on a 1976 Minicomputer

https://github.com/dbrll/ATTN-11
123•rahen•3d ago•21 comments

The bee that everyone wants to save

https://naturalist.bearblog.dev/the-bee-that-everyone-wants-to-save/
263•nivethan•3d ago•82 comments