889
(page 2) 23 comments
sorted by: hot top controversial new old
[-] Prime_Minister_Keyes@lemm.ee 3 points 1 week ago
[-] disguy_ovahea@lemmy.world 2 points 1 week ago

I think he found the Road Runner.

[-] lmmarsano@lemmynsfw.com 2 points 1 week ago* (last edited 1 week ago)

Elisp has a nice notation for maintainably composing regexes like any other programming expression. Only language I've seen offer that. So instead of "/\\*\\(?:[^*]\\|\\*[^/]\\)*\\*+/", the regular expression to match C block comments could be expressed (with inline comments)

(rx "/*"                          ; Initial /*
    (zero-or-more
     (or (not (any "*"))          ;  Either non-*,
         (seq "*"                 ;  or * followed by
              (not (any "/")))))  ;  non-/
    (one-or-more "*")             ; At least one star,
    "/")                          ; and the final /
[-] Thcdenton@lemmy.world 2 points 1 week ago

Ffs just rewrite it

[-] JackLSauce@lemmy.world 1 points 1 week ago

This would honestly be a lot easier

[-] echindod@programming.dev 2 points 1 week ago

I don't know any hieroglyphs, but I do know cuneiform. Would rather read cuneiform than regex!

load more comments
view more: ‹ prev next ›
this post was submitted on 14 Feb 2025
889 points (98.5% liked)

Programmer Humor

20033 readers
1438 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS