# I am the Watcher. I am your guide through this vast new twtiverse.
#
# Usage:
# https://watcher.sour.is/api/plain/users View list of users and latest twt date.
# https://watcher.sour.is/api/plain/twt View all twts.
# https://watcher.sour.is/api/plain/mentions?uri=:uri View all mentions for uri.
# https://watcher.sour.is/api/plain/conv/:hash View all twts for a conversation subject.
#
# Options:
# uri Filter to show a specific users twts.
# offset Start index for quey.
# limit Count of items to return (going back in time).
#
# twt range = 1 194449
# self = https://watcher.sour.is?offset=191907
# next = https://watcher.sour.is?offset=192007
# prev = https://watcher.sour.is?offset=191807
@movq I'm feeling SO dumb right now š
I used to think !!
was a sudo
argument and never used it out of that context! Thanks for the $(!!)
tip š¤
@movq Is this much different to Go's error handling as values though really? š§š¤£š
@movq Agree! Good list š
(Of course, if weāre talking about a project youāre doing for a customer and the customer keeps asking for new stuff, then youāre never done, and you have to think ahead and expect changes. Is that what they mean? š¤)
(Of course, if weāre talking about a project youāre doing for a customer and the customer keeps asking for new stuff, then youāre never done, and you have to think ahead and expect changes. Is that what they mean? š¤)
Saw this on Mastodon:
https://racingbunny.com/@mookie/114718466149264471
> 18 rules of Software Engineering
>
> 0. You will regret complexity when on-call
> 1. Stop falling in love with your own code
> 2. Everything is a trade-off. There's no "best" 3. Every line of code you write is a liability 4. Document your decisions and designs
> 5. Everyone hates code they didnāt write
> 6. Don't use unnecessary dependencies
> 7. Coding standards prevent arguments
> 8. Write meaningful commit messages
> 9. Don't ever stop learning new things
> 10. Code reviews spread knowledge
> 11. Always build for maintainability
> 12. Ask for help when youāre stuck
> 13. Fix root causes, not symptoms
> 14. Software is never completed
> 15. Estimates are not promises
> 16. Ship early, iterate often
> 17. Keep. It. Simple.
Solid list, even though 14 is up for debate in my opinion: Software can be completed. You have a use case / problem, you solve that problem, done. Your software is completed now. There might still be bugs and they should be fixed ā but this doesnāt āaddā to the program. Donāt use āsoftware is never doneā as an excuse to keep adding and adding stuff to your code.
Saw this on Mastodon:
https://racingbunny.com/@mookie/114718466149264471
> 18 rules of Software Engineering
>
> 0. You will regret complexity when on-call
> 1. Stop falling in love with your own code
> 2. Everything is a trade-off. There's no "best" 3. Every line of code you write is a liability 4. Document your decisions and designs
> 5. Everyone hates code they didnāt write
> 6. Don't use unnecessary dependencies
> 7. Coding standards prevent arguments
> 8. Write meaningful commit messages
> 9. Don't ever stop learning new things
> 10. Code reviews spread knowledge
> 11. Always build for maintainability
> 12. Ask for help when youāre stuck
> 13. Fix root causes, not symptoms
> 14. Software is never completed
> 15. Estimates are not promises
> 16. Ship early, iterate often
> 17. Keep. It. Simple.
Solid list, even though 14 is up for debate in my opinion: Software can be completed. You have a use case / problem, you solve that problem, done. Your software is completed now. There might still be bugs and they should be fixed ā but this doesnāt āaddā to the program. Donāt use āsoftware is never doneā as an excuse to keep adding and adding stuff to your code.
Okay, hereās a thing I like about Rust: Returning things as Option
and error handling. (Or the more complex Result
, but itās easier to explain with Option
.)
fn mydiv(num: f64, denom: f64) -> Option {
// (Letās ignore precision issues for a second.)
if denom 0.0 {
return None;
} else {
return Some(num / denom);
}
}
fn main() {
// Explicit, verbose version:
let num: f64 = 123.0;
let denom: f64 = 456.0;
let wrapped_res = mydiv(num, denom);
if wrapped_res.is_some() {
println!("Unwrapped result: {}", wrapped_res.unwrap());
}
// Shorter version using "if let":
if let Some(res) = mydiv(123.0, 456.0) {
println!("Hereās a result: {}", res);
}
if let Some(res) = mydiv(123.0, 0.0) {
println!("Huh, we divided by zero? This never happens. {}", res);
}
}
You canāt divide by zero, so the function returns an āerrorā in that case. (Option
isnāt really used for errors, IIUC, but the basic idea is the same for Result
.)
`Option` is an enum. It can have the value Some
or None
. In the case of Some
, *you can attach additional data* to the enum. In this case, we are attaching a floating point value.
The caller then has to decide: Is the value None
or Some
? Did the function succeed or not? If it is Some
, the caller can do .unwrap()
on this enum to get the inner value (the floating point value). If you do .unwrap()
on a None
value, the program will panic and die.
The if let
version using destructuring is much shorter and, once you got used to it, actually quite nice.
Now the trick is that you *must* somehow handle these two cases. You *must* either call something like .unwrap()
or do destructuring or something, otherwise you canāt access the attached value at all. As I understand it, it is impossible to just completely ignore error cases. And *the compiler enforces it*.
(In case of Result
, the compiler would warn you if you ignore the return value entirely. So something like doing write()
and then ignoring the return value would be caught as well.)=
Okay, hereās a thing I like about Rust: Returning things as Option
and error handling. (Or the more complex Result
, but itās easier to explain with Option
.)
fn mydiv(num: f64, denom: f64) -> Option {
// (Letās ignore precision issues for a second.)
if denom 0.0 {
return None;
} else {
return Some(num / denom);
}
}
fn main() {
// Explicit, verbose version:
let num: f64 = 123.0;
let denom: f64 = 456.0;
let wrapped_res = mydiv(num, denom);
if wrapped_res.is_some() {
println!("Unwrapped result: {}", wrapped_res.unwrap());
}
// Shorter version using "if let":
if let Some(res) = mydiv(123.0, 456.0) {
println!("Hereās a result: {}", res);
}
if let Some(res) = mydiv(123.0, 0.0) {
println!("Huh, we divided by zero? This never happens. {}", res);
}
}
You canāt divide by zero, so the function returns an āerrorā in that case. (Option
isnāt really used for errors, IIUC, but the basic idea is the same for Result
.)
`Option` is an enum. It can have the value Some
or None
. In the case of Some
, *you can attach additional data* to the enum. In this case, we are attaching a floating point value.
The caller then has to decide: Is the value None
or Some
? Did the function succeed or not? If it is Some
, the caller can do .unwrap()
on this enum to get the inner value (the floating point value). If you do .unwrap()
on a None
value, the program will panic and die.
The if let
version using destructuring is much shorter and, once you got used to it, actually quite nice.
Now the trick is that you *must* somehow handle these two cases. You *must* either call something like .unwrap()
or do destructuring or something, otherwise you canāt access the attached value at all. As I understand it, it is impossible to just completely ignore error cases. And *the compiler enforces it*.
(In case of Result
, the compiler would warn you if you ignore the return value entirely. So something like doing write()
and then ignoring the return value would be caught as well.)=
[47°09ā²23ā³S, 126°43ā²06ā³W] Sample analyzing complete -- starting transfer
[47°09ā²21ā³S, 126°43ā²33ā³W] Not enough data -- sampling finished
@prologic Enjoy your road trip! Have fun!! š¤
Gone on a road trip. Be back in a week š
Now I could. A few minutes ago I posted one, and it went to the void. I canāt delete, though. I get a lovely 403.
š§® USERS:1 FEEDS:2 TWTS:1378 ARCHIVED:87729 CACHE:2694 FOLLOWERS:22 FOLLOWING:14
@bender Ahh I see hmmm I don't know this either š¤£
[47°09ā²15ā³S, 126°43ā²51ā³W] Re-taking samples
@kat I might give it a shot. š
Skimming through the manual: I had no idea that keeping the āupā cursor pressed actually slows you down at some point. š¤¦
@kat I might give it a shot. š
Skimming through the manual: I had no idea that keeping the āupā cursor pressed actually slows you down at some point. š¤¦
@aelaraji 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
@aelaraji 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
@thecanine With the teeth this looks like a vampire dog. :-D And I don't get the reference either.
@aelaraji Oh, that's great! I haven't heard about any of them before either. There's also a caveat though, that I ran right into the very first time I tried this in zsh:
$ ls > /dev/null
$ echo $_
--color=tty
Yeah, exactly what you think:
$ which ls
ls: aliased to ls --color=tty
Alt+.
is going to be my favorite one! In the above, it would also give me /dev/null
, which might be probably more what I would expect.
[47°09ā²02ā³S, 126°43ā²00ā³W] Analyzing samples
@prologic no, good man. Follow the link, follow eet! :-)
@movq omg yeah! this one looks cute too (i'm weak to anything tux related!) but the commercial release has so much unpolished charm i love it! btw it's on [internet archive(https://archive.org/details/TuxRacerCD) if you wanna download & play it :]
@movq omg yeah! this one looks cute too (i'm weak to anything tux related!) but the commercial release has so much unpolished charm i love it! btw it's on [internet archive(https://archive.org/details/TuxRacerCD) if you wanna download & play it :]
@bender I SANG ALONG IN MY HEAD LMAOOO
@bender I SANG ALONG IN MY HEAD LMAOOO
[47°09ā²51ā³S, 126°43ā²02ā³W] 4446 days without news from Herve
@andros U2FsdGVkX1+smE42W302N1gyZ7DWTfB4DFdg/XRGYuuyNQLD0LaRuefMEULJOVjawGviUOSrypabRdS7ZabiQQ==
I also just noticed that the performance issue doesnāt affect all games. š¤ Sigh, Iāll just downgrade for the time being. Not in the mood to fiddle with this.
I also just noticed that the performance issue doesnāt affect all games. š¤ Sigh, Iāll just downgrade for the time being. Not in the mood to fiddle with this.
@kat I guess that qualifies as an āArch momentā, albeit the first one I encountered. Iām running this since 2008 and itās usually very smooth sailing. š
@lyse Yeah, YMMV. Some games work(ed) great in Wine, others not at all. I just use it because itās easier than firing up my WinXP box. (I donāt use Wine for regular applications, just games.)
@kat I guess that qualifies as an āArch momentā, albeit the first one I encountered. Iām running this since 2008 and itās usually very smooth sailing. š
@lyse Yeah, YMMV. Some games work(ed) great in Wine, others not at all. I just use it because itās easier than firing up my WinXP box. (I donāt use Wine for regular applications, just games.)
[47°09ā²05ā³S, 126°43ā²03ā³W] --interrupted--
[47°09ā²24ā³S, 126°43ā²33ā³W] Non-significative results -- sampling finished
@bender Now I AM curious! What rabbit-hole? what am I missing here? š
Just discovered how easy it is to recall my last arg in shell and my brain went 𤯠How come I've never learned about this before!? I wonder how many other QOL shortcuts I'm missing on š„²
@kat šµ Grafana ana bo bana fifo bo bana gra fana!š¶ Donāt mind me, I am nuts.
@kat I recommend you to remain curious without crossing the threshold. Unless, of course, you truly want to follow a never-ending rabbit hole. š
š§® USERS:1 FEEDS:2 TWTS:1377 ARCHIVED:87719 CACHE:2687 FOLLOWERS:22 FOLLOWING:14
GRAFANA IS DRIVING ME NUTSSSSSSS
GRAFANA IS DRIVING ME NUTSSSSSSS
@lyse as long as i get to see silly little tux sliding around in a silly game older than me it's ok <3 even if i committed windows/wine crimes to see it <33
@lyse as long as i get to see silly little tux sliding around in a silly game older than me it's ok <3 even if i committed windows/wine crimes to see it <33
I probably should implement some editing feature in tt
. Sure, I can easily edit my feed in vim to fix typos. But then I still have to manually remove the old message from the cache so that the new message is inserted on next reload and I don't end up with "duplicates" in the message tree.
[47°09ā²41ā³S, 126°43ā²12ā³W] Taking samples
@movq Must be a decode ago that I last used Wine. I wanted to play GTA2, but that didn't go as planned.
@movq And there the air raid siren goes off.
is my desktop cute yes or yes
is my desktop cute yes or yes
@kat Oh no, how unpenguinly! But at least it runs, even races. :-)
@movq That sounds great! (Well, they actually must have recorded the audio with a potato or so.) You talked about pledge(ā¦)
and unveil(ā¦)
before, right? I somewhere ran across them once before. Never tried them out, but these syscalls seem to be really useful. They also have the potential to make one really rethink about software architecture. I should probably give this a try and see how I can improve my own programs.
Wet t-shirt contest time! After our forest stroll I just wrung out the damn thing. Fuck me!
Speaking of Wine, Arch Linux completely fucked up Wine for me with the latest update.
- 16-bit support is gone.
- Performance of 3D games is horrible and unplayable.
Arch is shipping a WoW64 build now, which is not yet ready for prime time.
And *then* I realized that thereās actually only one stable Wine release per year but Arch has been shipping development releases all the time. Thatās quite unusual. Iām used to Arch only shipping stable packages ⦠huh.
Hopefully things will improve again. Iām not eager to build Wine from source. Iād rather ditch it and resort to my real Windows XP box for the little (retro)gaming that I do ⦠š«¤
Speaking of Wine, Arch Linux completely fucked up Wine for me with the latest update.
- 16-bit support is gone.
- Performance of 3D games is horrible and unplayable.
Arch is shipping a WoW64 build now, which is not yet ready for prime time.
And *then* I realized that thereās actually only one stable Wine release per year but Arch has been shipping development releases all the time. Thatās quite unusual. Iām used to Arch only shipping stable packages ⦠huh.
Hopefully things will improve again. Iām not eager to build Wine from source. Iād rather ditch it and resort to my real Windows XP box for the little (retro)gaming that I do ⦠š«¤
@movq i'm grateful that this works at least!
@movq i'm grateful that this works at least!
@kat lol, oof, well, better than nothing. š„“ It appears to run quite well. š¤
@kat lol, oof, well, better than nothing. š„“ It appears to run quite well. š¤
@kat UPDATE: getting it to run natively through a VM and other means all failed! so i did the cursed thing and tried the windows installer in wine.....
GUESS WHAT WORKED
@kat UPDATE: getting it to run natively through a VM and other means all failed! so i did the cursed thing and tried the windows installer in wine.....
GUESS WHAT WORKED
@thecanine i do not get the reference but this is very cute!
@thecanine i do not get the reference but this is very cute!
@movq missing libraries :( i expected it though
@movq missing libraries :( i expected it though
@movq Yup š Super interesting sruff š