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•7mo ago

Comments

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

A guide to local coding models

https://www.aiforswes.com/p/you-dont-need-to-spend-100mo-on-claude
363•mpweiher•10h ago•184 comments

Deliberate Internet Shutdowns

https://www.schneier.com/blog/archives/2025/12/deliberate-internet-shutdowns.html
138•WaitWaitWha•3d ago•40 comments

Webb observes exoplanet that may have an exotic helium and carbon atmosphere

https://science.nasa.gov/missions/webb/nasas-webb-observes-exoplanet-whose-composition-defies-exp...
40•taubek•2d ago•9 comments

I'm just having fun

https://jyn.dev/i-m-just-having-fun/
298•lemper•5d ago•101 comments

Build Android apps using Rust and Iced

https://github.com/ibaryshnikov/android-iced-example
50•rekireki•5h ago•9 comments

Disney Imagineering Debuts Next-Generation Robotic Character, Olaf

https://disneyparksblog.com/disney-experiences/robotic-olaf-marks-new-era-of-disney-innovation/
166•ChrisArchitect•9h ago•67 comments

Show HN: Books mentioned on Hacker News in 2025

https://hackernews-readings-613604506318.us-west1.run.app
410•seinvak•15h ago•154 comments

Kernighan's Lever

https://linusakesson.net/programming/kernighans-lever/index.php
40•xk3•2d ago•11 comments

ONNX Runtime and CoreML May Silently Convert Your Model to FP16

https://ym2132.github.io/ONNX_MLProgram_NN_exploration
60•Two_hands•7h ago•8 comments

Aliasing

https://xania.org/202512/15-aliasing-in-general
16•ibobev•5d ago•1 comments

Cursed circuits #3: true mathematics

https://lcamtuf.substack.com/p/cursed-circuits-3-true-mathematics
11•zdw•3h ago•2 comments

Functional Flocking Quadtree in ClojureScript

https://www.lbjgruppen.com/en/posts/flocking-quadtrees
19•lbj•5d ago•1 comments

Single-Pass Huffman Coding

https://doisinkidney.com/posts/2018-02-17-single-pass-huffman.html
6•todsacerdoti•5d ago•0 comments

Exploring Speculative JIT Compilation for Emacs Lisp with Java

https://kyo.iroiro.party/en/posts/juicemacs-exploring-jit-for-elisp/
18•gudzpoz•2d ago•1 comments

CO2 batteries that store grid energy take off globally

https://spectrum.ieee.org/co2-battery-energy-storage
212•rbanffy•16h ago•176 comments

Show HN: WalletWallet – create Apple passes from anything

https://walletwallet.alen.ro/
350•alentodorov•15h ago•101 comments

Making the most of bit arrays in Gleam

https://gearsco.de/blog/bit-array-syntax/
13•crowdhailer•3d ago•0 comments

Luke Howard’s essay on the modification of clouds (1865)

https://publicdomainreview.org/collection/essay-on-the-modification-of-clouds/
9•Petiver•18h ago•0 comments

Show HN: Rust/WASM lighting data toolkit – parses legacy formats, generates SVGs

https://eulumdat.icu
16•holg•10h ago•0 comments

I program on the subway

https://www.scd31.com/posts/programming-on-the-subway
209•evankhoury•5d ago•140 comments

Evaluating chain-of-thought monitorability

https://openai.com/index/evaluating-chain-of-thought-monitorability/
46•mfiguiere•3d ago•16 comments

The Going Dark initiative or ProtectEU is a Chat Control 3.0 attempt

https://mastodon.online/@mullvadnet/115742530333573065
521•janandonly•12h ago•172 comments

Autoland saves King Air, everyone reported safe

https://avbrief.com/autoland-saves-king-air-everyone-reported-safe/
211•bradleybuda•14h ago•121 comments

E.W.Dijkstra Archive

https://www.cs.utexas.edu/~EWD/welcome.html
132•surprisetalk•16h ago•12 comments

You’re not burnt out, you’re existentially starving

https://neilthanedar.com/youre-not-burnt-out-youre-existentially-starving/
278•thanedar•13h ago•325 comments

Ruby website redesigned

https://www.ruby-lang.org/en/
390•psxuaw•1d ago•158 comments

Indoor tanning makes youthful skin much older on a genetic level

https://www.ucsf.edu/news/2025/12/431206/indoor-tanning-makes-youthful-skin-much-older-genetic-level
237•SanjayMehta•1d ago•178 comments

Waymo halts service during S.F. blackout after causing traffic jams

https://missionlocal.org/2025/12/sf-waymo-halts-service-blackout/
245•rwoll•1d ago•350 comments

86Box v5.3

https://86box.net/2025/12/21/86box-v5-3.html
61•chungy•5h ago•1 comments

I can't upgrade to Windows 11, now leave me alone

https://idiallo.com/byte-size/cant-update-to-windows-11-leave-me-alone
448•firefoxd•12h ago•419 comments