@vaporeon_ oh wow, posix xargs doesn’t suppurrt using null characters as a sepurrator
@vaporeon_ exactly
@aescling Personally my opinion is that if you put a newline inside a filename, you deserve whatever troubles this causes you... It's just a wrong thing to do, even if it's technically allowed...
But I understand that not everyone may agree with that.
@vaporeon_ if POSIX allows newlines in filenames i’m either going to not assume they don’t have any, or make very clear that i am expecting a certain convention to be followed to not break my script lol
@vaporeon_ i have a feeling you would have some strong disagreements with the strictly typed functional programmer types if you got deep enough into learning languages like haskell. or especially a dependently typed language like idris or lean or something. you know, the kind of people who get really up their own ass about correctness
@vaporeon_ i have taken a lot of influence from my time learning such languages and i have noticed you do not seem to share that way of thinking lol
@vaporeon_ this is not a criticism just an observation
@aescling Aescling is Haskell programmer? Why did you never tell me?
I never got deeply into Haskell, but the superficial course that I took on it years ago was pretty fun
And also it introduced me to concepts like higher-order functions, which has been very useful for my understanding of programming in general even if I never got to seriously program Haskell...
i notice now i never mentioned Lean 4 in that list. i kinda know that
@vaporeon_ anyway i learned functional programming through OCaml and learned Haskell later on my own, which imo is purrobably the better way to teach functional purrogramming, OCaml makes much better choices, pedagogically speaking, of when and how to cheat your away out of pure FP
@vaporeon_ @aescling This has happened before by accident as a result of trying to operate on text files/scripts that were saved in windows notepad.
@onfy @vaporeon_ this succinctly raises so many questions lol, i love it
@aescling @vaporeon_ One thing we did was a script that would take every line in a text file and make an empty file named for it
Say the document says:
Super Mario Bros
Luigi's Mansion
Sonic the Hedgehog 2
After the last character of every line it would have a newline characters because bash assumes Linux line endings instead of windows
So you get a file named Super Mario Bros[CR].
@vaporeon_ @aescling I don't remember just what I did. I guess I should've asked you instead of whatever horrible thing it was.
Though it did work in the end if you ignore that it broke FAT.
@vaporeon_ @aescling more than me
@onfy @aescling You, too, can learn xargs!
In any case, you're still learning Linux right? I think it'd be unfair to call someone incompetent who is still learning. Do you want me to look over your script and review it?
It's just that I have been doing this for so many years that I really ought to know it... And also I specifically want to be good at computers, just like some of y'all want to be good at melee fighting games or whatever, and so it is frustrating when despite my best efforts, I am bad at computers...
I think it'd be unfair to call someone incompetent who is still learning.
vaporeon… please take your own advice…
@vaporeon_ @aescling nah fuck you, take your advice vaporeon
@vaporeon_ @aescling we're all learning, always. give up on learning is like giving up on yourself
@vaporeon_ @aescling today's the second-best time to plant a tree
@vaporeon_ @aescling in your mind
@vaporeon_ @onfy sarah was using metaphorical language
@aescling @vaporeon_ i have the weird flavour of autism where i understand and use metaphors ![]()
@vaporeon_ @aescling i'll see if i still have it
not sure what i want to be good at...
@vaporeon_ @onfy except now it’s not POSIX ;3
@aescling @onfy Good news! I went and checked POSIX 2024 instead of POSIX 2004, and that actually specifies the -0 option, too: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/xargs.html
@vaporeon_ @onfy better late than never ig
@vaporeon_ @onfy good
@aescling @vaporeon_ The result was a hideous "it works on my machine and breaks horribly on theirs" bug, since my text files have Unix endings.
@vaporeon_ the infamous
ls | xargs [...]is not safe