My attempt of an honest answer to my best knowledge:
As @TootSweet@lemmy.world mentioned, to make a programming language closer to spoken English language, most likely (hi, Python, I am looking at you too). Which infuriates me immensely: when programming, I do not speak languages, I express data structures and operations on them, stacked one upon another. The last thing I need here is ambiguity, loose structure and information duplication (forgot correct term for the last one) that are typical to natural languages of human communication
The Go programming language documentation makes a big deal about how it "reads from left to right." Like, if you were describing the program in English, the elements of the Go program go in the same order as they would in English.
I say this as someone who likes Go as a language and writes more of it than any other language: I honestly don't entirely follow. One example they give is how you specify a type that's a "slice" (think "list" or "array" or whatever from other languages) of some other type. For instance a "slice of strings" would be written []string. The [] on the left means it's a slice type. And string on the right specifies what it's a slice of.
But does it really make less sense to say "a string slice"?
In Go, the type always comes after the variable name. A declaration might look like:
var a string
Similarly in function declarations:
func bob(a string, b int, c float64) []string { ... }
Anyway, I guess all that to say I don't mind the Go style, but I don't fully understand the point of it being the way it is, and wouldn't mind if it was the other way around either.
Edit: Oh, I might add that my brain will never use the term "a slice of bytes" for []byte. That will forever be "a byte slice" to me. I simply have no choice in the matter. Somehow my brain is much more ok with "a slice of strings", though.
I remember mentions that there were methods to host static content on ipfs. But I didn't do it myself. That's not "activity pub" federated but ipfs is also distributed.
The other thing is that you might want to use more than one library. Typical imports at the top of the file might look like this:
rust
use bingbong::{BingBong, BingBongError, SomethingElse};
use bogos::binted::crotchidizer::{Crotchidizer, CrotchidizerError};
If both libraries named their error enums just "Error", the collision could be worked around, but it's an unnecessary extra step:
rust
// Not sure how renaming affects compiler hints.
use bingbong::{BingBong, Error as BingBongError, SomethingElse};
use bogos::binted::crotchidizer::{Crotchidizer, Error as CrotchidizerError};
or if you want to avoid renaming:
rust
use bingbong::{BingBong, SomethingElse};
use bogos::binted::crotchidizer::{self, Crotchidizer};
/* ... */
match result {
Ok(value) => return value,
Err(bingbong::Error::MissionFailed) => panic!(),
Err(bingbong::Error::UrMom) => todo!(),
_ => unreachable!(),
}
if let Err(crotchidizer::Error::SomethingsWrong) = result2 {
// ...
}
If the screenshot had followed conventions, the message would say something like this:
could not convert error type `BingBongError` to `MyAppError`
here's what DeepSeek gave me for the following prompt: write a small bash script to check if a CSV exists and if it does rename to the filename_date.CSV and upload to hdfs, keep it simple
#!/bin/bash
# Check if filename argument is provided
if [ $# -eq 0 ]; then
echo "Usage: $0 <csv_filename>"
exit 1
fi
CSV_FILE="$1"
# Check if file exists
if [ ! -f "$CSV_FILE" ]; then
echo "Error: File $CSV_FILE not found!"
exit 1
fi
# Generate new filename with date (YYYYMMDD format)
DATE=$(date +%Y%m%d)
NEW_FILENAME="${CSV_FILE%.*}_${DATE}.csv"
# Rename the file
mv "$CSV_FILE" "$NEW_FILENAME"
# Upload to HDFS
hdfs dfs -put "$NEW_FILENAME" /path/to/hdfs/directory/
echo "Successfully processed: $NEW_FILENAME"
That's fine and you don't need to. But don't knock it if you haven't even taken time to learn it.
Yesterday I needed to insert a tab character on every line from 2 to 31,000 something. I made the line selection keystrokes in Cursor - it immediately crashed so hard I had to restart my PC.
My attempt of an honest answer to my best knowledge:
As @TootSweet@lemmy.world mentioned, to make a programming language closer to spoken English language, most likely (hi, Python, I am looking at you too). Which infuriates me immensely: when programming, I do not speak languages, I express data structures and operations on them, stacked one upon another. The last thing I need here is ambiguity, loose structure and information duplication (forgot correct term for the last one) that are typical to natural languages of human communication