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.

Halt and Catch Fire: TV's Best Drama You've Probably Never Heard Of (2021)

https://www.sceneandheardnu.com/content/halt-and-catch-fire
126•walterbell•1h ago•56 comments

Claude Sonnet 4.6

https://www.anthropic.com/news/claude-sonnet-4-6
952•adocomplete•10h ago•853 comments

Thank HN: You helped save 33k lives

546•chaseadam17•11h ago•70 comments

Thousands of CEOs just admitted AI had no impact on employment or productivity

https://fortune.com/2026/02/17/ai-productivity-paradox-ceo-study-robert-solow-information-technol...
192•virgildotcodes•2h ago•117 comments

BarraCUDA Open-source CUDA compiler targeting AMD GPUs

https://github.com/Zaneham/BarraCUDA
195•rurban•7h ago•59 comments

Show HN: AsteroidOS 2.0 – Nobody asked, we shipped anyway

https://asteroidos.org/news/2-0-release/index.html
302•moWerk•8h ago•34 comments

Minimal x86 Kernel Zig

https://github.com/lopespm/zig-minimal-kernel-x86
41•lopespm•4h ago•10 comments

Gentoo on Codeberg

https://www.gentoo.org/news/2026/02/16/codeberg.html
276•todsacerdoti•10h ago•96 comments

Using go fix to modernize Go code

https://go.dev/blog/gofix
304•todsacerdoti•11h ago•67 comments

So you want to build a tunnel

https://practical.engineering/blog/2026/2/17/so-you-want-to-build-a-tunnel
183•crescit_eundo•11h ago•77 comments

Google Public CA is down

https://status.pki.goog/incidents/5oJEbcU3ZfMfySTSXXd3
193•aloknnikhil•3h ago•107 comments

Async/Await on the GPU

https://www.vectorware.com/blog/async-await-on-gpu/
166•Philpax•11h ago•49 comments

Reverse Engineering Sid Meier's Railroad Tycoon for DOS from 1990

https://www.vogons.org/viewtopic.php?t=105451
30•LowLevelMahn•3d ago•4 comments

I swear the UFO is coming any minute

https://www.experimental-history.com/p/i-swear-the-ufo-is-coming-any-minute
122•Ariarule•6h ago•41 comments

Assistant to the Regional Manager

https://smallpotatoes.paulbloom.net/p/assistant-to-the-regional-manager
78•NaOH•4d ago•31 comments

Is Show HN dead? No, but it's drowning

https://www.arthurcnops.blog/death-of-show-hn/
429•acnops•17h ago•363 comments

Show HN: I wrote a technical history book on Lisp

https://berksoft.ca/gol/
178•cdegroot•12h ago•65 comments

It's not just you, YouTube is partially down in outage

https://9to5google.com/2026/02/17/youtube-outage-february-2026/
38•aqeelat•2h ago•2 comments

I converted 2D conventional flight tracking into 3D

https://aeris.edbn.me/?city=SFO
224•kewonit•13h ago•47 comments

Structured AI (YC F25) Is Hiring

https://www.ycombinator.com/companies/structured-ai/jobs/q3cx77y-gtm-intern
1•issygreenslade•7h ago

Show HN: Pg-typesafe – Strongly typed queries for PostgreSQL and TypeScript

https://github.com/n-e/pg-typesafe
52•n_e•9h ago•21 comments

'My Words Are Like an Uncontrollable Dog': On Life with Nonfluent Aphasia

https://thereader.mitpress.mit.edu/my-words-are-like-an-uncontrollable-dog-on-life-with-nonfluent...
33•anarbadalov•5h ago•7 comments

Physicists Make Electrons Flow Like Water

https://www.quantamagazine.org/physicists-make-electrons-flow-like-water-20260211/
86•rbanffy•4d ago•10 comments

I Use Obsidian

https://stephango.com/vault
36•hisamafahri•5h ago•29 comments

HackMyClaw

https://hackmyclaw.com/
272•hentrep•11h ago•141 comments

Use Microsoft Office Shortcuts in Libre Office

https://github.com/Zaki101Aslam/MS-office-shortcuts-for-Libre-Office
24•Zaki101Aslam•2d ago•5 comments

Advice, not control: the role of Remote Assistance in Waymo's operations

https://waymo.com/blog/?modal=short-advice-not-control-the-role-of-remote-assistance
61•xnx•2h ago•50 comments

Create bootable ISO image files which are compatible with the Amiga CD32

https://github.com/fuseoppl/isocd-win
13•doener•4h ago•1 comments

A Brief History of Xenopus

https://www.asimov.press/p/xenopus
4•surprisetalk•4d ago•0 comments

Tesla Sales Down 55% UK, 58% Spain, 59% Germany, 81% Netherlands, 93% Norway

https://cleantechnica.com/2026/02/15/tesla-sales-down-tremendously-in-uk-norway-netherlands-germa...
89•whynotmaybe•13h ago•42 comments