Tootfinder

Opt-in global Mastodon full text search. Join the index!

@xtaran@chaos.social
2025-11-25 15:28:56

#TIL you can concatenate "=~ s/…/…/r" in modern #Perl (in this case since Perl 5.14). Example:
my $a = "foobar";
my $b = $a =~ s/foo/bar/r =~ s/bar/fnord/r =~ s/fnord/gnarz/r;
say $b;
Output:
gnarzbar

@azonenberg@ioc.exchange
2025-11-25 15:24:56

Anybody else wish C and C had named function arguments like SystemVerilog module ports, and allowed you to default-value an optional argument in any position?
foo.bar(
.baz(1),
.foobar("hai"),
//foobaz is unspecified and gets a default value
.asdf(42)
);

@jdrm@social.linux.pizza
2026-01-16 21:45:51

Pero qué fantasía es esta github.com/google-gemini/gemin

@azonenberg@ioc.exchange
2025-11-30 14:20:40

Wishing C had the ability to do compile-time polymorphism.
Like, I have base class Foo with Bar/Baz derived from it.
I want to be able to put a method DoSomething() in Foo and call it on a Bar or Baz object in a template, without putting a vtable in Foo or incurring the overhead of a virtual method call.
You can sort of get this effect by having Bar/Baz be separate classes with no common base and make the template just call T.Foo() for parameter T, but this eliminates som…