frontpage.
newsnewestaskshowjobs

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•1y ago

Comments

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

Google Antigravity ACP using "custom-agent" consumes 4x quota per token

https://github.com/google-antigravity/antigravity-cli/issues/1890
333•bloopernova•4h ago•160 comments

Borland's DOS compilers, rebuilt from their own binaries

https://github.com/abedegno/borland-reborn
72•frostbyte7•2h ago•18 comments

Your family should have a shared two-factor authentication code

https://shkspr.mobi/blog/2026/11/your-family-should-have-a-shared-two-factor-authentication-code/
54•robin_reala•2h ago•13 comments

Disk Utility needs loving care and attention

https://eclecticlight.co/2026/11/28/disk-utility-needs-loving-care-and-attention/
79•zdw•1d ago•30 comments

Google account banned due to Gemini usage

https://twitter.com/complex_maths/status/2126864616538165581
230•tarr11•1h ago•140 comments

Show HN: A free online PDF editor that runs in the browser

https://pdfbop.com/
15•ulicaki8991•1h ago•6 comments

An exhaustive review of design tool hover areas

https://tldraw.dev/blog/a-review-of-design-tool-hover-areas
39•bpierre•1d ago•7 comments

FP64 Is All You Want, INT8 Is All You Need, FP4/6/8 Is All You Have

https://arxiv.org/abs/2609.37693
163•peter_d_sherman•8h ago•49 comments

Get a Cable Modem Go to Jail (1999)

http://telecom.csail.mit.edu/judy-sammel.html
108•romania1•7h ago•59 comments

Attention Kmart shoppers – music played over the store PA

https://www.attentionshoppers.net/
408•ChrisArchitect•13h ago•110 comments

The Math Behind Counter-Strike Surfing

https://healeycodes.com/the-math-behind-counter-strike-surfing
35•v3gas•2d ago•6 comments

Vernor Vinge: The curse of the mummy's tomb (1992)

https://akkartik.name/post/straumli
79•akkartik•3d ago•32 comments

So You Want to Build a Mainstream Formally Verifiable Language

https://danilafe.com/blog/verifiable_language/
32•mpweiher•4h ago•10 comments

Crowdsourcing AI Agents to Solve P Equals NP

https://pequalnp.com/pnp
62•whatisthiseven•1h ago•55 comments

The M-Vave FM-1 FM Synthesizer and the Success of Open Source

https://www.hashbangcode.com/article/m-vave-fm-1-fm-synthesizer-and-success-open-source
120•speckx•4d ago•69 comments

Elephant in the Server Room: >50% of WordPress Sites Run PHP That's EOL by Jan

https://adamgreenough.net/blog/wordpress-php-versions/
201•xadz•14h ago•92 comments

Optimizing Rustc's next trait solver

https://donsz.nl/blog/optimizing-rustcs-next-trait-solver
181•g0xA52A2A•4d ago•20 comments

Show HN: I made a tiny live replica of SFO

https://tinysfo.com/
518•eiiot•19h ago•156 comments

PocketBase has moved off GitHub

https://github.com/pocketbase/pocketbase/issues/7872
371•p2detar•17h ago•187 comments

'Enormous fear': Scientist shares arrest by ICE despite pristine paper trail

https://www.science.org/content/article/enormous-fear-scientist-shares-arrest-ice-despite-pristin...
346•Alien1Being•7h ago•287 comments

Gmail "Send as" ends January 2027

https://emailfa.st/blog/gmail-send-as-ending-cloudflare-email-routing
517•tombakerbuilds•19h ago•277 comments

Torqwave – Open-source C++20/JUCE spectral audio editor and DAW (AGPL-3.0)

https://github.com/BobClawblaw/torqwave
11•hjm•2d ago•4 comments

Domes

https://www.shelterpub.com/domes
26•tosh•5h ago•9 comments

Beating Floating Point at Its Own Game: Posit Arithmetic [pdf]

http://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf
73•xenophonf•9h ago•27 comments

Silently degrading the model's capabilities is sabotage

https://twitter.com/TimSweeneyEpic/status/2126682647862862063
947•tosh•23h ago•370 comments

Audible removes download option for purchased audiobooks

https://consumerrights.wiki/w/Audible_removes_download_option_for_purchased_audiobooks
1416•DeepLogin•1d ago•528 comments

A Clear Case of Treason

https://deanblundell.substack.com/p/breaking-iran-used-elon-musks-starlink
5•lksugarman•18m ago•0 comments

Computer Disease (2020)

https://blog.adafruit.com/2020/01/13/richard-feynman-on-computer-disease/
255•jvanderbot•22h ago•105 comments

Guitar Hero, but for Hand Bells

https://dingdonghero.com
68•devbytes•3d ago•13 comments

Hacker Laws

https://github.com/dwmkerr/hacker-laws
93•Olshansky•11h ago•14 comments