love to see a youtube video that references a script that's linked in the comments and it's an obfuscated link to a one-click hoster.

THAT'S DEFINITELY STILL GONNA WORK IN FOUR YEARS

it does still work, but that's because it's only been 2 years.

also, wow, this is horrible.
the script is to generate random kanji/han characters and insert them into minecraft books.
but the video references there being two hotkeys to generate two distinct books, which seemed odd. so I thought I'd check.
it turns out by "random" they mean "pre-randomized and is hardcoded into the 45 kilobyte autohotkey scripot"
I mean, I get it. I don't want to write AutoHotKey scripts either. it's a horrible, horrible language.

BUT STILL
it's like PHP designed by someone who learned on Visual Basic for Applications
ANYWAY I decided to not just complain about it, and archived it:
https://t.co/IKxjNQMZMK
that's the script for this video:
https://t.co/GPvTp17RDR
naturally I would comment and add a link to it, but of course I can't post links in the comments.
anyway, autohotkey is great.
have you ever wanted to get a list of drives on a system?
That's simple!

DriveGet, drives, List
now you have a variable named "drives" which is a string containing a list like "ACDEFP"
that's how programming languages work, right?
assigning variables
small brain: a=1 (fortran, C, descendants of C)
big brain: a := 1 (ALGOL, Pascal)
cosmic brain: LET A=1 (early BASIC)
multiverse brain: a <- 1 (F#, OCaml)
brane cosmology bulk brain: there is no assignment, functions output to one of their arguments (AHK)
fun fact: AHK actually also uses = and :=

it just doesn't use them for functions.
it's got "=" which is called legacy... assignment? they don't actually call it assignment.
legacy variable storage, let's say.
the fun thing is that = only takes integers, unquoted strings, and other variables.
so:

a=1
b=FOOBAR
c=%b%
but if you do:
a=1+2

that's either an error, or you'll get a string containing "1+2".
I'm not sure which. I don't really want to find out
whereas if you do:
a := 1+2

a will be set to "3"
BTW these differences in = and := mean that if you convert that above example from = to :=, you get:

a=1
b="FOOBAR"
c=b
in computer science, we call this "consistency"
this is the fundamental problem with AutoHotKey as a language:
it started as a bad batch scripting language and got a little powerful with some visual basic ideas, and then it got "fixed" into being a more usable language, but THEY LEFT THE OLD SYNTAX VALID FOR COMPATIBILITY
it's like having a language that uses Go's syntax but you can always just drop down to
10 PRINT "HELLO WORLD"
20 GOTO 10
in the middle of a method
autohotkey is a language that could have been fixed, and they tried to fix it, but they tried to fix it by nailing the "fixed" version onto the side of the broken version
I guess it's fortunate then that microsoft is trying so hard to murder autohotkey.
once it stops working there won't be any more language evolution
maybe I should port autohotkey to an arduino keyboard+mouse.

or maybe I shouldn't torture tiny computers

More from foone

More from Culture

You May Also Like

A brief analysis and comparison of the CSS for Twitter's PWA vs Twitter's legacy desktop website. The difference is dramatic and I'll touch on some reasons why.

Legacy site *downloads* ~630 KB CSS per theme and writing direction.

6,769 rules
9,252 selectors
16.7k declarations
3,370 unique declarations
44 media queries
36 unique colors
50 unique background colors
46 unique font sizes
39 unique z-indices

https://t.co/qyl4Bt1i5x


PWA *incrementally generates* ~30 KB CSS that handles all themes and writing directions.

735 rules
740 selectors
757 declarations
730 unique declarations
0 media queries
11 unique colors
32 unique background colors
15 unique font sizes
7 unique z-indices

https://t.co/w7oNG5KUkJ


The legacy site's CSS is what happens when hundreds of people directly write CSS over many years. Specificity wars, redundancy, a house of cards that can't be fixed. The result is extremely inefficient and error-prone styling that punishes users and developers.

The PWA's CSS is generated on-demand by a JS framework that manages styles and outputs "atomic CSS". The framework can enforce strict constraints and perform optimisations, which is why the CSS is so much smaller and safer. Style conflicts and unbounded CSS growth are avoided.