@Perdritto Nice, but this does a let less than my script and makes no output when run as a script.
It only reads single line, x labels are wrong, mixes lowercase with uppercase.
Also, my script shows whole a-z range if there's any lowercase letter and whole A-Z if there's any uppercase.
It only reads single line, x labels are wrong, mixes lowercase with uppercase.
Also, my script shows whole a-z range if there's any lowercase letter and whole A-Z if there's any uppercase.
2
0
0
14
@serpent7776 You are right, I didn't check anything nor read your whole script (I almost only looked at the pic). My intent was just to fight R with Julia :D
1
0
1
7
@serpent7776 Haha, yeah, I'm sorry...I had to use it for work and it really doesn't fit in my brain. I guess the main things are the fact it allows things like lm(var1 ~ var2) which needs invisible unspottable macros, a hidden global state, or function as code text
1
0
0
40
@serpent7776 However it, inspiring your post, helped me in this bored afternoon :D
Thank you!
I add an APL "version" just for fun
Thank you!
I add an APL "version" just for fun
1
0
1
15
@Perdritto Too bad it's not BQN, I'm not at all familiar with APL.
1
0
0
19
@serpent7776 You're right, sorry. My BQN is quite rusty, it seems to me it is quite hard to keep being used to few array languages.
2
0
1
21
@Perdritto Awesome, now I just need like three days to figure out how this works :)
2
0
0
10
@Perdritto I don't know K, but you can go on as far as I'm concerned :)
How would you compare K to BQN?
How would you compare K to BQN?
1
0
0
4
@serpent7776 I can see you too like programming languages.
As a novice it seems to me that K is a more practical language, BQN one of the purest. K is more functional, it has only lists and sort of imperative constructs. There's quite too much overloading imho
As a novice it seems to me that K is a more practical language, BQN one of the purest. K is more functional, it has only lists and sort of imperative constructs. There's quite too much overloading imho
1
0
0
13
@serpent7776 Guess @code_report would be interested in this thread
0
0
0
11

![library(ggplot2)
az <- 65:90
AZ <- 97:122
azAZ <- c(az, AZ)
lines <- readLines(file("stdin"))
text <- paste(lines, collapse = "")
nums <- charToRaw(text) |> as.integer()
has_lo <- any(nums %in% az)
has_up <- any(nums %in% AZ)
xs <- c()
if (has_lo) {
xs <- c(xs, az)
}
if (has_up) {
xs <- c(xs, AZ)
}
xs <- unlist(strsplit(paste(intToUtf8(xs), sep = ""), ""))
characters <- unlist(strsplit(text, ""))[nums %in% azAZ]
char_counts <- table(characters)
all_letters <- data.frame(Character = xs, Count = 0)
ascii_df <- data.frame(Character = names(char_counts), Count = as.numeric(char_counts))
agg <- aggregate(. ~ Character, rbind(ascii_df, all_letters), sum)
agg$Character <- factor(agg$Character, levels = xs)
ggplot(agg, aes(x = Character, y = Count)) +
geom_bar(stat = "identity", fill = "lightblue") +
theme_minimal() +
labs(title = "Histogram of ASCII Characters", x = "ASCII Characters", y = "Count")](/pic/media%2FGLDZJtXXoAAESqh.png)





