Am looking for a way to render numeric string/date/time using unicode block drawing characters like in example below. Ideally this could have been solved with a figlet font but couldn't find one. Height is 3 characters, width is as tight as in example below.
$ echo "\n█▀▀▀█▀▀▀███▀█▀▀▀███▀▀▀█▀███\...
@cairdcoinheringaahing So far we've covered basic linear algebra and vector valued functions (a second time, we also did that in calc II, but minus cross products and some other things), no clue what's in the rest of the class, but it's also called "multivariable calculus" if that's of any use
@emanresuA Aren't you like 15? "Still doing calc" is hardly something to be ashamed of :p
I'm taking what I suspect would be a below average list of classes anywhere else in the west, and my school counselor called it "the most rigorous course load [she's] ever seen"
@RadvylfPrograms And I'm in a fairly nice school, with the largest list of advanced classes, and some of the best teachers, within like an hour of here
It was called "pipe". The "pipe" was just an accumulator, but I didn't know that word yet, so the analogy I used was that all of the operators were like a "pipe" that the data travelled through, being transformed by each operator
I still haven't recovered my sense of time. A dangerous mix of COVID lockdowns and getting older.
@emanresuA I already try to call it that. I'd guess probably as we approach the 30s we'll actually need a name for the decade
Right now we've gotten into the habit of using generations instead of decades, but since 2020 is kind of a defining year in our perception of time and culture, it's a great time to switch back to decades
@UnrelatedString This reminds me of one of my first JS projects, a really simple text adventure game where every choice you made was an if-else block. The width of the jsfiddle text box was what limited the complexity lol
My intuition is that is is, via some really annoying BF reimplementation
Actually I think it's almost trivial. You could easily have three stacks within easy access using scopes. Use the first stack as the tape to the left, the second as the tape to the right, and the third as the current tape item and any intermediate state necessary for things like -
Okay so for backwards compat you can overwrite globalThis but it doesn't actually use what you write to it as the global scope, just shadows the identifier
Whoa, chrome bug
xyz is undefined but still shows up in autocomplete
It appears that the autocompletion is based on globalThis instead of window, overwriting globalThis removes all window autocompletions:
Okay weird, you can't make something that was never callable in the first place callable with a proxy, but you can override what calling does if it was callable
And since you csn completely mimic a second object using any other object with a proxy, which is pretty much what they're for, you can just use () => {} as the proxied object and make calling do whatever you want
...which I realize is actually extremely useless since you can already make calling a function do whatever you want since that's the whole point of a function
Well, useless for making cursed objects with Proxy, but useful for its intended purpose of making certain modifications to existing objects
You could fairly completely change JS's syntax with the with (proxy) trick, since getters can be impure
E.g., do_x, do_y, do_z would be a series of function calls, despite having no ()s
And if you use stored state, you could even make a sort of assembly language syntax: add, x, y; jmp, x; mov, y, $20
ASCII Range
code-challenge string
Your task
Given a string, output the range of ASCII values.
Example
Let's say we have the string Hello.
We get the ASCII values:
H = 72
e = 101
l = 108
l = 108
o = 111
Now, we get the range (max - min):
111 - 72 = 39
Our answer is 39.
Test cases
Input ...
The aim is to create an algorithm to detect that one the string in a list of string contains %s, %d, %f, or %r. All sub-string will start by '%' and be 2 characters longs. Input string will be from 1 to 500 characters with a median of around 20 characters and contain zero to multiple of the poss...
You work at a bakery and every day you make exactly 100 bagels. However your customers are not as reliable and every day a random number of bagels will be ordered. So sometimes you will run out of bagels and sometimes you will have leftovers.
Now leftover bagels will still be good for 1 more da...
Challenge
You must write a program which takes a string and a flag as input and performs one of the following functions.
Input
If your language does not support command line arguments, you may take the arguments as input via STDIN.
The flag will be two characters: a dash and an ASCII characte...