@bender@twtxt.net I vaguely remember this, some leftover from the old-style hashtags? The (#foo) stuff? 🤔
@movq@www.uninformativ.de Mu (µ)’s startup latency appears to be ~10ms on my machine:
$ time ./bin/mu ./foo.mu
real 0m0.011s
user 0m0.004s
sys 0m0.006s
Tasmania to pay $650,000 for Foo Fighters concert in Launceston
Tasmania’s “biggest concert ever” will take place at Launceston’s York Park next month when American rock band Foo Fighters play their only Australian show. ⌘ Read more
You can explicitly use colors in manpages. I saw this in the apt manpage of Ubuntu recently, which, for some reason, uses blue text in one place:
https://movq.de/v/de5ab72016/s.png
Makes little sense to me. I’m glad that most manpages don’t do this. I wouldn’t want unicorn vomit all over the place.
Using colors can be done using the low level commands \m and \M:
.TH foo_program 3
\m[blue]I'm blue\m[], da ba dee.
\m[red]\M[yellow]I'm red on yellow.\m[]\M[]
This is quite horrible.
@kat@yarn.girlonthemoon.xyz On the one hand, all these programs have a very long history and the technology behind manpages is actually very powerful – you can use it to write books:
https://www.troff.org/pubs.html
I have two books from that list, for example “The UNIX programming environment”:
https://movq.de/v/c3dab75c97/upe.jpg
It’s a bit older, of course, but it looks and feels like a normal book, and it uses the same tech as manpages – which I think is really cool. 😎
It’s comparable to LaTeX (just harder/different to use) but much faster than LaTeX. You can also do stuff like render manpages as a PDF (man -Tpdf cp >cp.pdf) or as an HTML file (man -Thtml cp >cp.html). I think I once made slides for a talk this way.
On the other hand, traditional manpages (i.e., ones that are not written in mandoc) do not use semantic markup. They literally say, “this text is bold, that text over here is italics”, and so on.
So when you run man foo, it has no other choice but to show it in black, white, bold, underline – showing it in color would be wrong, because that’s not what the source code of that manpage says.
Colorizing them is a hack, to be honest. You’re not meant to do this. (The devs actually broke this by accident recently. They themselves aren’t really aware that people use colors.)
If mandoc and semantic markup was more commonly used, I think it would be easier to convince the devs to add proper customizable colors.
@lyse@lyse.isobeef.org defn foo(_ x _): # Ignored arguments
@aelaraji@aelaraji.com I use Alt+. all the time, it’s great. 👌
FWIW, another thing I often use is !! to recall the entire previous command line:
$ find -iname '*foo*'
./This is a foo file.txt
$ cat "$(!!)"
cat "$(find -iname '*foo*')"
This is just a test.
Yep!
Or:
$ ls -al subdir
ls: cannot open directory 'subdir': Permission denied
$ sudo !!
sudo ls -al subdir
total 0
drwx------ 2 root root 60 Jun 20 19:39 .
drwx------ 7 jess jess 360 Jun 20 19:39 ..
-rw-r--r-- 1 root root 0 Jun 20 19:39 nothing-to-see
fn sub(foo: &String) {
println!("We got this string: [{}]", foo);
}
fn main() {
// "Hello", 0x00, 0x00, "!"
let buf: [u8; 8] = [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x00, 0x00, 0x21];
// Create a string from the byte array above, interpret as UTF-8, ignore decoding errors.
let lossy_unicode = String::from_utf8_lossy(&buf).to_string();
sub(&lossy_unicode);
}
Create a string from a byte array, but the result isn’t a string, it’s a cow 🐮, so you need another to_string() to convert your “string” into a string.
- https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy
- https://doc.rust-lang.org/std/borrow/enum.Cow.html
I still have a lot to learn.
(into_owned() instead of to_string() also works and makes more sense to me, it’s just that the compiler suggested to_string() first, which led to this funny example.)
What does :s//foo do? ⌘ Read more
If we must stick to hashes for threading, can we maybe make it mandatory to always include a reference to the original twt URL when writing replies?
Instead of
(<a href="https://we.loveprivacy.club/search?q=%23123467">#123467</a>) hello foo bar
you would have
(<a href="https://we.loveprivacy.club/search?q=%23123467">#123467</a> http://foo.com/tw.txt) hello foo bar
or maybe even:
(<a href="https://we.loveprivacy.club/search?q=%23123467">#123467</a> 2025-04-30T12:30:31Z http://foo.com/tw.txt) hello foo bar
This would greatly help in reconstructing broken threads, since hashes are obviously unfortunately one-way tickets. The URL/timestamp would not be used for threading, just for discovery of feeds that you don’t already follow.
I don’t insist on including the timestamp, but having some idea which feed we’re talking about would help a lot.
Regex Isn’t Hard - Tim Kellogg 👈 this is a pretty good conscience article on regexes, and I agree, regex isn’t that hard™ – However I think I can make the TL;DR even shorter 😅
Regex core subset (portable across languages):
Character sets
• a matches “a”
• [a-z] any lowercase
• [a-zA-Z0-9] alphanumeric
• [^ab] any char but a or b
Repetition (applies to the preceding atom)
• ? zero or one
• * zero or more
• + one or more
Groups
• (ab)+ matches “ab”, “abab”, …
• Capture for extract/substitute via $1 or \1
Operators
• foo|bar = foo or bar
• ^ start anchor
• $ end anchor
Ignore non‑portable shortcuts: \w, ., {n}, *?, lookarounds.
hmm this would convert down to:
var f os.File
if f, e = os.Open("foo.txt"); e != nil {
log.Fatal("error opening file; %s", e)
}
im not sure if its much better.
[foo] foo ?
@prologic@twtxt.net Try hitting this URL:
https://twtxt.net/external?nick=nosuchuser&uri=https://foo.com
Change nosuchuser to any phrase at all.
If you hit https://twtxt.net/external?nick=nosuchuser , you’re given an error. If you hit that URL above with the uri parameter, you can a legitimate-looking page. I think that is a bug.
I can query the configurations a few different ways. i can request the specific name foo.bar or a glob like foo.* or trace the hierarchy trace:some.deep.name.space which will give me the namespaces some, some.deep, some.deep.name, and some.deep.name.space. These can be combined.
@lyse@lyse.isobeef.org its a hierarchy key value format. I designed it for the network peering tools i use.. I can grant access to different parts of the tree to other users.. kinda like directory permissions. a basic example of the format is:
@namespace
# multi
# line
# comment
root :value
# example space comment
@namespace.name space-tag
# attribute comments
attribute attr-tag :value for attribute
# attribute with multiple
# lines of values
foo :bar
:bin
:baz
repeated :value1
repeated :value2
each @ starts the definition of a namespace kinda like [name] in ini format. It can have comments that show up before. then each attribute is key :value and can have their own # comment lines.
Values can be multi line.. and also repeated..
the namespaces and values can also have little meta data tags added to them.

the service can define webhooks/mqtt topics to be notified when the configs are updated. That way it can deploy the changes out when they are updated.
@mckinley@twtxt.net Don’t forget the syntax for arrays of sets [[foo.bars]] [[foo.bars]] [[foo.bars]]
So. Some bits.
i := fIndex(xs, 5.6)
Can also be
i := Index(xs, 5.6)
The compiler can infer the type automatically. Looks like you mention that later.
Also the infer is super smart.. You can define functions that take functions with generic types in the arguments. This can be useful for a generic value mapper for a repository
func Map[U,V any](rows []U, fn func(U) V) []V {
out := make([]V, len(rows))
for i := range rows { out = fn(rows[i]) }
return out
}
rows := []int{1,2,3}
out := Map(rows, func(v int) uint64 { return uint64(v) })
I am pretty sure the type parameters goes the other way with the type name first and constraint second.
func Foo[comparable T](xs T, s T) int
Should be
func Foo[T comparable](xs T, s T) int
@prologic@twtxt.net “_foo_”
@prologic@twtxt.net “foo”
@prologic@twtxt.netYes, I think tags should just be #foo, and let the client figure out searching if it cares.
I don’t have any issue with the (foo) subjects, it’s the proliferation of the (foo url) tags. They’re just too long and ugly.
I don’t think I’m implementing twtxt.net-style hashtags (for now?). The “” is bad enough for nicks, but they just make the plain text unreadable.
FOLLOW: @foo@txt.sour.is from @foo@txt.sour.is using twtxt/0.1.0@9fdcb47
I shouldn’t use @foo in git commits https://github.com/mdom/txtnish/commit/42f9715b7d136393a2665566ee96b61bd1a20a87
@dave@davebucklin.com Okay, i fixed the awk and xargs problem, but it seems awk on macosx is weird: printf “foo\n” | awk ‘{gsub(/[[:cntrl:]]/,” “);print}’ => ” f o o “