Alexandra Lanes reshared this.

The commands 'cd $PWD' and 'cd .' in bash both look like useless no-ops which change into the same directory you're already in. But they're not, and both can be useful.

$PWD is a string variable which caches the pathname that your current directory had at the time you changed into it. It's not automatically updated in between cd commands.

So 'cd $PWD' (or 'cd "$PWD"' if you're being properly careful) changes to whatever directory _now_ lives at the pathname that your actual cwd _was_ when you changed to it.

'cd .' really _does_ just change directory to the same physical directory you're already in, but it's still not useless, because it causes bash to recalculate the value of $PWD.

For example, if one shell is in ~/test, and in another shell you rename ~/test to ~/newname and make a new directory ~/test, then in the first shell 'cd $PWD' will move to the new ~/test, whereas 'cd .' will stay in the original directory but update $PWD to reflect the fact that it now lives at ~/newname.

Alexandra Lanes reshared this.

in reply to Simon Tatham

That's remind me something i found amusing some times ago:

~/tmp/tmp$ rmdir ../tmp
~/tmp/tmp$ # where am i now?
~/tmp/tmp$ pwd
/mnt/vg00/diego/tmp/tmp
~/tmp/tmp$ echo $PWD
/mnt/vg00/diego/tmp/tmp
~/tmp/tmp$ # everything is fine, right?
~/tmp/tmp$ ls
~/tmp/tmp$ ls .
~/tmp/tmp$ cat /dev/null > x
bash: x: No such file or directory
~/tmp/tmp$ # ah!
~/tmp/tmp$ mkdir ../tmp
~/tmp/tmp$ # so does it works now?
~/tmp/tmp$ cat /dev/null > x
bash: x: No such file or directory
~/tmp/tmp$ #still no luck
~/tmp/tmp$ cd .
~/tmp/tmp$ cat /dev/null > x
~/tmp/tmp$ # now it works!

While the error in creating the file looks legit, why can I list a directory that doesn't exist? And I think that a new directory with the same name, it's still a new directory, but looks like "cd ." somehow fix the cwd of the shell.

Just for reference tests were made on linux on a ext4 filesystem (but does it matters?).

in reply to Diego Roversi

@diegor 'why can I list a directory that doesn't exist?' – it does exist, it just isn't linked from anywhere. On Unix, directories as well as files have the property that the inode (containing the actual contents) persists even after there's no path to it from the filesystem root, if a process has it open. So your cwd can still be in a directory that's been deleted.

'looks like "cd ." somehow fix the cwd of the shell' – assuming the shell is bash, yes, by default "cd ." will do that. It _doesn't_ do what I claimed in the head of the thread, unless you have the non-default 'set -P' option, which I set long ago for myself and had forgotten was relevant. If _I_ had done "cd ." in that situation, I'd have stayed in the deleted directory.

Alexandra Lanes reshared this.

The media in this post is not displayed to visitors. To view it, please go to the original post.

This llama is so very, very patient, and baby goats can be so very, very annoying!
Alexandra Lanes reshared this.

in reply to Laura βœ¨πŸ’œ

@laura_fae that was perhaps the thing I needed to get over to transition. I was so used to maximizing my safety, but still I felt neither safe nor happy. I was just hiding from the world.

Transition involved making myself deliberately vulnerable, and that is a risk! But what I didn't realise beforehand was how much courage that would generate.

in reply to Tattie

Yes, and now that transitioining has become more accessible, the number of creatures who start hormones but don't actually transition into whatever would be the happiest person of themselves has risen dramatically. The community focused a lot on making sure people can find hormones easily, but turns out we need to also provide people with help being enthusiastically themselves, or they just end up depressed boymoding on estrogen :/
Alexandra Lanes reshared this.

THE BIGGEST NEWS! Rob and I are offering up a hand-signed hardback, first edition/first printing copy of Monstrous Regiment straight from the Pratchett archives. Those who know the story will know why it’s a pertinent one for this cause.

32auctions.com/organizations/1…

Somehow reassuring to see the Guardian and Observer getting absolutely mauled for their transphobia. Dump that trashfire of a paper. I think by normalising transphobia among the soi-disant left they’ve done as much if not more harm than the right wing press.

reshared this

Alexandra Lanes reshared this.

The Vagina Museum is trans inclusive. We always have been and we always will be. As long as there's a Vagina Museum, we cannot be bullied or bought to change our stance on this.
Alexandra Lanes reshared this.

The Transphobic Guardian practically jumping for joy today, as is 'White Feminism'

How well things are going for that rich bigot in her castle, a new TV Series, Trans people being punished for simply existing.....and Westminster just shrugs and follows Gilead's lead

I feel ill, as a Queer man I fill ill and alone in this country, it's not hatred mostly I see, it's indifference....so when the Fash come for us, nobody will make a stand.

I don't feel British at all.

#LGBTQIA

Alexandra Lanes reshared this.

in reply to Lazarou Monkey Terror πŸš€πŸ’™πŸŒˆ

Sorry man
You're just a victim of the human condition, apathy 🀷
Or
πŸŽ΅πŸ’ƒπŸ•ΊπŸ“―Derrr da derrr
πŸ₯³πŸ‘―β€β™€οΈπŸ“―
Da der da der dadud derrr🎡
YOU CAN GO DOWN DANCING!
FUCK EM
Young man
there's no need to feel down
I said, young man
pick yourself off the ground
I said, young man
'cause you're in a new town
There's no need
to be un happy

THEY MARCH YOU TO THE TRENCH, ASK IF YOU WANT A SMOKE/BLINDFOLD, TAKE THE SMOKE, KEEP DANCING. EVEN IF THEY TELL YOU TO STOP, WHAT ARE THEY GUNNA DO, SHOOT YOUΒΏ

Alexandra Lanes reshared this.

Ah, I see that GNOME has started throwing X out the airlock. According to the Fedora 42 release notes, GDM no longer supports X-based sessions, leaving Cinnamon, XFCE, and various other desktops out to lunch, and if you switch to another login manager, GNOME itself may not work properly.

Good job, everyone, right when Windows 11 could give desktop Linux a great opportunity to pick up users.

One of the more unhelpful trauma responses that’s resurfaced this year is the fear of copying. When I was a kid I was mocked for picking up interests from friends, so I used to try hard not to do that or to be cautious or contrary in how I developed interests.

I learned not to do this at some point, especially with transition initially (which I think I knew had to be about me and nobody else whatever my brain said) but it’s come back this year. I have to fight against an urge to reject for myself anything people I know find positive.

Unknown parent

mastodon - Link to source

ralph_himself

Lewd, kink, breath play

Sensitive content

Alexandra Lanes reshared this.

The media in this post is not displayed to visitors. To view it, please go to the original post.

I have to say that having a barn full of cute baby goats (current count at 5 babies from 2 mamas) that I can snuggle anytime I need is much, much more therapeutic than rage-screaming in the hay field.
#BabyGoatCountdown

reshared this

Alexandra Lanes reshared this.

This entry was edited (1 year ago)
in reply to Ian Jackson

I agree with this post, and think it's an insightful perspective.

However, I think Rust faces a challenge with complexity. I completely failed to get any of the rest of the team to work on a Rust project I'd developed on leaving my last programming job cos they got stuck learning Rust (before they saw my code!)

Folk found things like co-/contra-variant lifetimes befuddling. I couldn't even convince people they need to know the difference between heap and stack. Not least, management stripped this exact question out of hiring interviews.

Things like async are a mistake, I think. (A mistake I used in my project until I understood why), mainly because of the way they pile on things like pinning. I coped okayish, but the project failed because I was the only compsci degree-er.

I worry that Rust is turning into C++

I don't really think Rust can hope to be inclusive while it require so befuddling concepts. I hold out hopes for maybe Zig (I've not learnt it).

I have no problem with the community.

This entry was edited (1 year ago)
in reply to kæt

I do agree that Rust faces a challenge with complexity.

But, I think the problem in the language is much less severe than often imagined. One can write eg Easy Mode Rust - which is still a highly performant and reliable language.

I certainly wouldn't bother novices with lifetime variance; that's advanced stuff which you hardly ever have to worry about (and as ever, either if builds it's fine, or you're an expert doing unsafe). I think "heap vs stack" is another thing novices can ignore.

It doesn't help that there's still a fair amount of perf hacker thinking even in resources for total newbies.

A very real challenge is the way that Rust programs almost never compile first time, which can be deeply offputting to people who've been socialised to be afraid of error messages. I wish we could somehow persuade folks that compiler errors are completely normal and fine, so they feel free to go ahead and experiment.

This entry was edited (1 year ago)
in reply to Ian Jackson

People apparently don't realise that I moderate comments on my blog. They think that if they send a 1000-word screed complaining about "wokeism" that anyone (even me) will read it.

FTR, my practice is to moderate comments vigorously so as to try to maintain the space as both enlightening and pleasant.

This entry was edited (1 year ago)
Alexandra Lanes reshared this.

Yeah. The original UNIX philosophy was "small single-purpose tools that do one thing brilliantly and can be connected like Lego bricks"; systemd pours a pint of cyanoacrylate glue into the toy box.
mastodon.social/@LinuxAndYarn/…


@jimcarroll I'm not getting into Vim vs Emacs, Gnome vs KDE, Debian vs Rhel vs Arch or any of their siblings and children fighting amongst themselves.

But systemd is the most cursed, bastardized, overcomplicated and overcompensating crock that has ever been forced upon Linux users. (AI is still a choice, after all.)


reshared this

Alexandra Lanes reshared this.

The media in this post is not displayed to visitors. To view it, please go to the original post.

Some of you have been eagerly awaiting part 2 of my test date with Jack. HERE IT IS!

The conclusion: love yourself before you start #dating. You'll know you're ready to #date when you can accept rejection with a shrug and 'your loss!'.

(pls share if you like it!)

girlonthenet.com/blog/love-you…

This entry was edited (1 year ago)

reshared this

Alexandra Lanes reshared this.

It occurs to me that Ken Thompson's classic lecture "Reflections on Trusting Trust" has a LOT to say about code generation using LLMs.

The Thompson self-propagating UNIX hack that he described was a lot like a prompt injection attack (the right parsed input could trigger an unexpected output via opaque-to-programmer intermediate steps).

cs.cmu.edu/~rdriley/487/papers…
mastodon.social/@gmh/114132067…


Something that strikes me is that news disinformation is a relatively minor threat here; there's enough news around for fact-checking AI-boosted propaganda.

I think a bigger threat is AI-boosted unsafe programming. Too many people rely on Copilot or GPT to write their code for them, perform no sanity-checking, and put it into workplace production. If you pollute a LLM with backdoored code, how many people will roll it out?

The phrase 'Word macros for the 21st Century' springs to mind.


Unknown parent

mastodon - Link to source

Charlie Stross

@ShiitakeToast @graydon @bsdphk Yeah, going to prison for 11 years can also wreck a career. I DO NOT CARE. If you fuck people over for money, especially lots of money, you are a criminal and you might wear a $3000 suit but you're no different from a street mugger and deserve to be treated the same. If lifetime median earnings are on the order of $5M, then stealing > $5M through "white collar crime" is tantamount to stealing lives.
Alexandra Lanes reshared this.

The media in this post is not displayed to visitors. To view it, please go to the original post.

Proof air fryers existed before we knew of them
⇧