mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#less

1 post1 participant0 posts today

(Possibly relevant to @b0rk 's interests)

So I hit a flag in diff, --unchanged-group-format. It does not show up in the manpage. It does not show up in --help. You can search both those channels for that string and you will not find it.

You know where it shows up first? If you Google it, you'll get an example in gnu.org/software/diffutils/man.

So why doesn't it show up in the manpage? Well, it does! If you read the entire manpage. With your eyes.

  -D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs                                                                                                                                                                                                                                                                                                              
--GTYPE-group-format=GFMT format GTYPE input groups with GFMT
--line-format=LFMT format all input lines with LFMT
--LTYPE-line-format=LFMT format LTYPE input lines with LFMT
These format options provide fine-grained control over the output
of diff, generalizing -D/--ifdef.
LTYPE is 'old', 'new', or 'unchanged'. GTYPE is LTYPE or 'changed'.

"What do you mean it isn't documented? Of course it's documented. You did read every line and do some template-substitution in your brain, didn't you?"

This isn't advocating for not reading the manpage. If you really want to understand how the tool works, you read the whole manpage. And probably the source code. 😉

... but I don't want to understand how the tool works. I want to diff two files and not have the lines that are the same get emitted.

And I think a lot of application- and solution-generating computer people, most of the time, in most of their careers, are operating on that level of depth. Problems come in too fast and with too much variety. You absolutely go deep on some things. There is no time to go deep on everything.

So how do we address this (other than throw up our hands and say "Relying on Google's fuzzy search of the whole Internet and vibe-coding LLMs is the future actually")? I don't have magic bullets, but a "fuzzy search" mode in something like less that could take an input like --unchanged-group-format and twig that it if there's no exact match, it might be related to --GTYPE-group-format would be nice.

Maybe I should mock that up in emacs. Actually, I bet someone already put it in emacs. ;)

www.gnu.orgLine Group Formats (Comparing and Merging Files)Line Group Formats (Comparing and Merging Files)

#FreeBSD #less "sysutils/less" port, with DISTVERSION= 661, links to PCRE, not #PCRE2. Why?

From "devel/pcre/Makefile" ...

DEPRECATED= EOLed by upstream, use devel/pcre2 instead

In Bugzilla failed to find any previous attempt to move to PCRE2.
- - -
Submitted the patch to use PCRE2 instead: bugs.freebsd.org/bugzilla/show
# 6-month attention timer expires on ~20250919.

bugs.freebsd.org285599 – sysutils/less - Patch to move from deprecated PCRE to PCRE2 (pcre2-8)
Replied in thread

@redscroll

consider #sass - a preprocessor for #css, and the most overwrought one in comparison with its competitors #less and especially #stylus. but it "won"

last i heard, the dominant implementation of sass was a c++ module for nodejs, and nobody has even mentioned less/stylus for a long time.

though i'm sure they remain some lowkey frontend ninjas' secret weapons (secret by virtue of not knowing to look for them, lol)

@mcc

We've just started the work of removing #less from our codebase. There are some mixins that need to be inlined the few places they are used, but apart from that it's mostly rewriting variables and media queries. The result is that we will be able to use modern css features like @starting-style, which currently aren't supported by less.

‘We’re going to sell Grandad’s old house,’ Dad said.

‘No! It’s so much fun there!’ Cherry complained.

‘And Mum grew up there!’ Apple chimed in.

‘We don’t need another house. And where we live is more practical,’ Dad explained.

‘But there’s #less room to play here! Grandad’s house has a big backyard.’ Cherry insisted.

‘There’s also the magic woods out beyond the yard,’ Apple added.

‘Apple, don’t put ideas in your sister’s head. There’s no magic woods,’ Dad said sternly.

‘Well, actually...’ Mum’s eyes lit up.

With the sound of pursuit approaching, they reined in at a fork in the trail.

"Which way?" asked the barbarian.

The rogue pointed left. "This one. #Less of them'll follow."

"That's wrong," snapped the seer.

"Okay, you should know." The barbarian trotted right.

The rogue glanced at his remaining companion with suspicion. "Why was I wrong?"

"You meant 'fewer', is why."

The #MastoPrompt for Thursday 5 December 2024 is:

#less

The poem or story can include the prompt word or be about the prompt word.

@ me, if you like, or just include the #MastoPrompt tag (to allow people to follow or filter their feeds), or keep your work to yourself - all the options are good as long as you're writing.

If you're including an image please do include alt-text so I can boost your post.
#Writing
#SmallPoem
#Poetry
#Fiction
#MicroFiction
#SmallStories

Fun learning of the day: Sometimes #Less (the style sheet language) calculates values, sometimes not. "@max-width-desktop" once gets replaced as "999px" and once as "1000px - 1px" - the letter doesn't work (in a media query at least)

Causes the wiki search bar to not appear on the #postmarketOS wiki.

Replied in thread

@niniva The environment is a set of variables inherited from a process to its children. In a POSIX shell, you can export a variable to the environment with 'export VARIABLE'. Your shell will read/execute several files on startup, in many installations, ~/.profile is among them, so just put that there:

export SYSTEMD_LESS=FRXMK

Background, turns out #systemd by default uses #less as the pager (unless overridden e.g. with other environment variables), and by default passes the flags FRSXMK to it, where S tells less to enable horizontal scrolling ... so, just override it, leaving out that nasty idea.