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.

Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot

https://jointhefreeworld.org/blog/articles/emacs/emacs-eglot-scala-kotlin/index.html
78•jjba23•2d ago•42 comments

Terence Tao's ChatGPT conversation about the Jacobian Conjecture counterexample

https://chatgpt.com/share/6a5fdc7a-d6f8-83e8-bbea-8deb42cfed56
907•gmays•17h ago•526 comments

Cruller: Bun's Zig Runtime, Continued on Zig 0.16

https://ziggit.dev/t/cruller-buns-zig-runtime-continued-on-zig-0-16/16734
69•Erenay09•5h ago•32 comments

Quality non-fiction books are the antithesis of AI slop

https://resobscura.substack.com/p/quality-non-fiction-books-are-the
382•benbreen•20h ago•142 comments

GigaToken: ~1000x faster Language model tokenization

https://github.com/marcelroed/gigatoken/
522•syrusakbary•17h ago•110 comments

ANSI escape injection in MCP servers: Hidden from humans, visible to AI

https://brightsec.com/research/detecting-ansi-escape-sequence-injection-in-mcp-servers-with-dast/
24•xgpyc2qp•2d ago•8 comments

Show HN: Bento - An entire PowerPoint in one HTML file (edit+view+data+collab)

https://bento.page/slides/
862•starfallg•19h ago•196 comments

Everyone should know SIMD

https://mitchellh.com/writing/everyone-should-know-simd
455•WadeGrimridge•17h ago•164 comments

git's –end-of-options Flag

https://nesbitt.io/2026/07/21/end-of-options.html
157•Erenay09•1d ago•91 comments

EU fines Google €890M for competition breaches over search and apps

https://www.theguardian.com/technology/2026/jul/23/eu-fines-google-for-competition-breaches-over-...
25•Stevvo•1h ago•13 comments

Are AI labs pelicanmaxxing?

https://dylancastillo.co/posts/pelicanmaxxing.html
562•dcastm•17h ago•215 comments

So Reddit has decided that plain HTML is unsafe

https://www.cole-k.com/2026/07/21/reddit/
494•montroser•22h ago•490 comments

Amiga 1000: Ten years ahead of its time

https://dfarq.homeip.net/amiga-1000-ten-years-ahead-of-its-time/
94•giuliomagnifico•5h ago•77 comments

Protecting our FLOSS commons from LLMs

https://blog.codeberg.org/protecting-our-floss-commons-from-llms.html
84•acmnrs•9h ago•23 comments

Making

https://beej.us/blog/data/ai-making/
375•erikschoster•19h ago•146 comments

Show HN: Cactus Hybrid: We taught Gemma 4 to know when it's wrong

https://github.com/cactus-compute/cactus-hybrid
149•HenryNdubuaku•17h ago•31 comments

The startup's Postgres survival guide

https://hatchet.run/blog/postgres-survival-guide
421•abelanger•22h ago•196 comments

Making ASCII Art in Vim

https://alexyang.dev/vim-ascii-art/
70•evakhoury•2d ago•7 comments

The Unity CLI: manage Unity from your terminal

https://unity.com/blog/meet-the-unity-cli
4•nateb2022•1d ago•0 comments

Medici family mystery may be solved after more than 400 years

https://www.cnn.com/2026/07/15/science/medici-family-mystery-dna-malaria
127•effects•13h ago•37 comments

John C. Dvorak has died

https://twitter.com/na_announce/status/2079952538040672302
771•coleca•15h ago•259 comments

Why malloc always does more than I asked for?

https://ssenthilnathan3.github.io/blog/malloc/
41•nathaah3•2d ago•33 comments

Malleable Computing, Emacs, and You

http://yummymelon.com/devnull/malleable-computing-emacs-and-you.html
116•kickingvegas•13h ago•32 comments

Businesses with ugly AI menu redesigns

https://blog.fiddery.com/businesses-with-ugly-ai-menu-redesigns/
314•speckx•22h ago•215 comments

Fairphone 6 wide camera experimental Linux support

https://nondescriptpointer.com/articles/fairphone-6-wide-camera-linux/
127•helonaut•14h ago•39 comments

Computing Camera Rays

https://momentsingraphics.de/CameraRays.html
7•ibobev•1w ago•0 comments

Nobody knows what a used GPU cluster is worth

https://ciphertalk.substack.com/p/nobody-knows-what-a-used-gpu-cluster
240•rbanffy•1w ago•220 comments

ascdraw: Editor for ASCII/UTF-8 diagrams (in 144FPS)

https://github.com/exlee/ascdraw
48•xlii•2d ago•10 comments

Back to Kagi

https://blog.melashri.net/micro/back-to-kagi/
282•speckx•22h ago•208 comments

Restructuring GitHub's bug bounty program

https://github.blog/security/next-chapter-restructuring-githubs-bug-bounty-program/
47•soheilpro•8h ago•22 comments