#PatternMatching

JAVAPROjavapro
2025-06-17

Forget “Hello World.” Java just said “Goodbye Boilerplate.” @ronveen takes you on a tour where classes vanish, imports simplify, and main() becomes human.
Is still Java?

Go read: javapro.io/2025/06/17/modern-j

2025-05-24

The dishwasher is running, and I heard "plutonium [beat] plutonium [beat]".. like a rhythm round in the sounds it was making. Brains are weird.

#Music #PatternMatching #Rhythm #Neurology

2025-05-24

C++OnSea 2025 SESSION ANNOUNCEMENT: The Pattern Matching We Already Have by Braden Ganetsky

cpponsea.uk/2025/session/the-p

Register now at cpponsea.uk/tickets/

#cplusplus #cpp #movesemantics #patternmatching

ItsTheManOnTheMoon :verified:ItsTheManOnTheMoon@timeloop.cafe
2025-05-19
Unattached shirt pocket with edges folded under and neatly pressedShirt pocket sewn onto the shirt. The pattern matches well enough to make it nearly invisible
Programming Languages DelftDelftPL@akademienl.social
2025-04-15

Master thesis by Pepijn Vunderink: "Program Matching with Semantic Patterns"

"We propose the Dyno pattern language, in which concrete object language syntax can be used to express intuitive semantic patterns of programs. Pattern matching is performed by translating Dyno patterns to μ-calculus formulas and model checking these formulas against models extracted from object programs."

repository.tudelft.nl/record/u

#thesis #PatternMatching #MuCalculus #ModelChecking #mCRL2

Lucian Ghindalucian@ruby.social
2025-03-20

Value objects in Ruby - The idiomatic way

I will discuss what a value object is, the concept of immutability, using Ractors to deeply freeze an object, and combining the Data class with pattern matching, all illustrated with code samples.

Let's deep dive

#Ruby #Rails #Coding #PatternMatching

Screen of an example of Data class in Ruby
2025-03-19

Here are two elegant approaches to extract values: one assigning at match time and another using pattern matching from Ruby version 3.2. Tks Nobu and Jerimy Evans. 🚀 #Ruby #Coding #PatternMatching

Example bumber 1
 /(?<country_code>\d{2})(?<area_code>\d{2}) (?<number>\d{9})/ =~ "5586987654321"

p country_code # => "55"
p area_code # => "86"
p number # => "987654321"

Example bumber 2
result = /(\d{2})(\d{2})(\d{9})/.match("5586987654321")

p (result in [_, country_code, area_code, number]) #=> false
p (result in [country_code, area_code, number]) #=> true
p [country_code, area_code, number] #=> ["55", "86", "987654321"]
N-gated Hacker Newsngate
2025-03-08

🚀🎓 Bravo, Stanford! You've invented a plan that requires mastering RegEx—because nothing says "weight loss" like complex pattern matching! 🤖🔍 If only there was a browser that supported such genius discoveries... oh wait, there isn't. 🙄📉
twitter.com/lauriewired/status

Jenetics GAjeneticsga
2025-01-23

Bridging the Abstraction Gap: A Systematic Approach to Rule-Based Transformational Design for Embedded Systems.

dl.acm.org/doi/10.1145/3714412

Pragmatic Bookshelf 📚pragprog@techhub.social
2025-01-23

New at PragProg

Staffan Nöteberg helps you really understand how the machinery works under the hood. Learn advanced tools like reluctant, lookbehind and nondeterministic finite automata to write efficient and elegant regexes with ease.

In this illustrated guide, you gain precisely that understanding., even with no prior knowledge of Regular Expressions.

pragprog.com/titles/d-snrem

@staffannoteberg

#regularexpressions #patternmatching #regex #regexp #textprocessing

2024-12-12
I tried using Marc Nieper-Wißkirchen’s Scheme pattern matcher

It’s called (rapid match), and it is part of the “Rapid Scheme” compiler project, which is a Scheme compiler written in portable, standards-compliant R7RS “small” Scheme.

It is tiny, only 300 lines of code, and compiles almost instantly. But it lacks features that other pattern matchers might have, especially matching on record data types, becuase the R7RS “small” standard does not provide any mechanism for introspection of record data. Also it cannot assign a whole pattern to a single variable, you can only match variables to elements inside of the pattern, which is unfortunate.

But it is efficient, and it gets the job done. It will probably cover 80% of all use cases. It’s best features are portability and it’s small footprint. I have decided to use it in my Gypsum software.

I also discovered that unfortunately Guile Scheme does not fully implement the R7RS standard for library definitions, it is missing the (export (rename from-sym to-sym)) declaration syntax. But I was able to work around it and get (rapid match) to build on Guile.

#tech #software #SchemeLang #Scheme #R7RS #GuileScheme #Guile #FunctionalProgramming #PatternMatching

Coach Pāṇini ®paninid@mastodon.world
2024-11-28

“Where should the line lie between #FirstPrinciples thinking and #PatternMatching? When should you use one or the other?”

commoncog.com/how-first-princi

Lucian Ghindalucian@ruby.social
2024-11-21

The following piece of code is inspired by something I wrote the other day.

I cannot share the exact piece of code or the content, but I liked the syntax, so I played a bit with it here

#Ruby #PatternMatching

Norobiik @Norobiik@noc.socialNorobiik@noc.social
2024-10-15

The results of this new GSM-Symbolic paper aren't completely new in the world of #AI research. Other recent papers have similarly suggested that #LLMs don't actually perform #FormalReasoning and instead mimic it with probabilistic #PatternMatching of the closest similar data seen in their vast training sets. #GenAI

#Apple study exposes deep cracks in LLMs’ “reasoning” capabilities
arstechnica.com/ai/2024/10/llm

Merlin BögershausenMBoegie@fosstodon.org
2024-10-15

#PatternMatching in #Java is only applicable to objects - no longer! With JEP 455 the @openjdk project enabled primitive Types in Patterns. If you're eager for more insight, grab a ☕️ and my article about JEP 455 in the current @JavaMagazin 11.2024

2024-10-08

There are certain categories of games that I absolutely love. You will have heard about my recent escapades in the world of 18xx games. Yet, there is another genre of games that I love: tile-laying games.
tabletopgamesblog.com/2024/10/
#boardgames #thoughts #TileLaying #PatternMatching

react-book.melange.re/intro/
I love #ocalm.

it has many superpowers
- #soundcomplete and #strong #typesystem with #typeinference

- #algebraiceffects
- #algebraicdatatypes
- #GADT
- #patternmatching
- pragmatic by default #immutanbility
- pragmatic and optional laziness
it gives confidence and correctness via type system and compiles
#ocaml shape languages like #scala and #rust also #Fsharp is just reincarnation of ocaml for dotnet
Melange brings this power to #reactnative developers.

Hanno Embregts 🎤🎸hannotify@foojay.social
2024-09-30

This Friday I'll be giving a masterclass on #PatternMatching in #Java at the HBO-I Job & Student Event in Utrecht. In Dutch! 🇳🇱😱 It's been a while since I spoke my native tongue in a tech talk. hboictjobevent.nl/programma/pa

2024-08-15

「 What is the Rosie project?

In brief: RPL is an alternative to regex, providing a better syntax, unit tests, and packages of patterns, among other benefits 」

rosie-lang.org/

#rosielang #patternmatching #regex #plt

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst