
X - boffinism
https://xkcd.com/2309/
======
mkl
Even without technically changing font, there are more than you might expect:
XxˣₓẊẋẌẍⅩⅹ⠭ꭖꭗꭘꭙ🄧⒳ⓍⓧＸｘ𝐗𝐱𝑋𝑥𝑿𝒙𝓍𝓧𝔁𝔛𝔵𝕏𝕩𝖃𝖝𝖷𝗑𝗫𝘅𝘟𝘹𝙓𝙭𝚇𝚡🅇🅧🆇

[https://unicode-table.com/en/blocks/mathematical-
alphanumeri...](https://unicode-table.com/en/blocks/mathematical-alphanumeric-
symbols/)

~~~
bufferoverflow
I never understood why Unicode has bold versions of characters, that's the
function of the font, not the character set.

~~~
diegoperini
Symbolically same but semantically different characters are most of the time
represented differently in the byte level so that searching in large text can
still be implemented as simple byte comparison, if Unicode can be called
simple.

~~~
lonelappde
"simply byte comparison" is not a term associated with Unicode. Unicode is
usually in strings, and reverse engineering a string is -- very hard, and
surprisingly I haven't found a paper proving whether it is NP complete.

------
lifthrasiir
If you think that it is just a sick joke, take a look at this and think again:
[http://www.zifyoip.com/wysiscript/sigbovik.html](http://www.zifyoip.com/wysiscript/sigbovik.html)

~~~
brobdingnagians
Curious... I can't figure out if this is completely serious. There are what
are either tongue in cheek remarks, or they are taking themselves very
seriously...

> "removing the awkward necessity of writing text"

> "as powerful as other languages and significantly more colorful"

> "we believe it will appeal to many types of students who may not have an
> interest in traditional text-based programming, including painters, graphic
> designers, and the illiterate."

I think it might be more effective to teach the illiterate to read first
rather than code... Maybe it's worth it if learning to code inspires them to
become literate?

~~~
theelous3
> I can't figure out if this is completely serious.

"Most programming languages in use today use only a single color for all
numeric literals, which is unnecessarily confusing and makes it impossible to
distinguish different numbers using only a spectrometer"

:)

------
weinzierl
Back in the late nineties I worked with a software called _Origin_. It had a
BASIC like programming language where variable names consisted of single
letters. If you now think 26 variable names should be enough: Some of the
letters, like X and Y, had special predefined meaning and you couldn't change
that. If you used seem you encountered strange behaviour, like values changing
behind your back. To add insult to injury I could never find documentation
about which variables were special, so I stuck with the few I new were safe,
which were not many...

~~~
Starwatcher2001
The old TRS-80 Model 1, Level 1 had 4KB of memory and the only permitted
variables were integers (A-Z), and two strings A$ and B$. No decimals, floats
etc.

Level 2 allowed any number of letters in a variable name... but only the first
two were recognised as unique. CUSTORDER was seen as the same variable as
CUSTLINE.

~~~
makeset
> allowed any number of letters in a variable name... but only the first two
> were recognised as unique.

That was a well-known Microsoft BASIC feature that got passed down licensed
descendants like TRS-80 and Commodore BASIC, and lasted through earlier 6502
BASIC implementations.

------
filipn
Reminds me of this comment from Reddit
[https://old.reddit.com/r/rust/comments/5penft/parallelizing_...](https://old.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/)

Go allows characters from the Canadian Aboriginal Syllabics for identifiers,
so you can define structs or methods like this:

    
    
      type ImmutableTreeListᐸElementTᐳ struct { 
    

You can pretend that go has generics :)

~~~
0-_-0
Isn't that a syntax terror?

~~~
leshow
Names just need to be valid UTF-8, which it is

~~~
0-_-0
My misspelling was intentional... but now it's not funny

------
robin_reala
A good set of variable names could be found in Unicode’s confusables list,
starting at line 3795 (or search for CANADIAN SYLLABICS FULL STOP → LATIN
SMALL LETTER X)

[http://www.unicode.org/Public/security/latest/confusables.tx...](http://www.unicode.org/Public/security/latest/confusables.txt)

~~~
aasasd
Greek question mark can be especially put to good use, in particular if a
colleague walks away forgetting to lock the machine:
[http://www.fileformat.info/info/unicode/char/037e/index.htm](http://www.fileformat.info/info/unicode/char/037e/index.htm)

------
lucideer
I envisage Randall's thought process for this was:

\- Thinks of "variable variable" title text joke

\- "Now I just need to come up with a scenario that will allow me to make this
joke"

~~~
accelbred
I was reminded of php's variable variables [1], which often makes for a good
joke.

[1]:
[https://www.php.net/manual/en/language.variables.variable.ph...](https://www.php.net/manual/en/language.variables.variable.php)

~~~
withinboredom
But it makes reflection so easy. I've never known a "modern" language to have
such simple reflection without a bunch of boilerplate (Java, C#, Python gets
close, Scala)... People harp on PHP a ton, but it's really darn powerful if
used correctly. The trick is finding people who know how to use it correctly.

~~~
simias
Oof, I'm not a PHP coder and I didn't know it had this feature before reading
these comments but I definitely do not envy it in the languages I use. The
potential for abuse is immense, this is one step removed from generating code
at runtime by concatenating strings and calling eval() on them.

I'm sure there are situations where this feature can be really valuable (and I
do sometimes use getattr/setattr in python, which is somewhat similar) but I
think the developers should really think hard and make an educated decision
about when to use it. As such having it require a bit of boilerplate is a
feature more than a bug IMO. I definitely wouldn't want to have to maintain
code written by someone who abuses these types of indirections everywhere.

I can definitely imagine a novice coder using these "variable variables" in
lieu of a proper hash table or dictionary object for instance.

I mean it suffices to read some of the comments to the article posted above to
find a bunch of people posting code snippets which, IMO, are a very poor way
of implementing what they want. For instance:

    
    
        $price_for_monday = 10;
        $price_for_tuesday = 20;
        $price_for_wednesday = 30;
    
        $today = 'tuesday';
    
        $price_for_today = ${ 'price_for_' . $today};
        echo $price_for_today; // will return 20
    

or even:

    
    
        class foo {
          function bar() {
            $bar1 = "var1";
            $bar2 = "var2";
            $this->{$bar1}= "this ";
            $this->{$bar2} = "works";
          }
        }
    
        $test = new foo;
        $test->bar();
        echo $test->var1 . $test->var2;
    

I'd probably quit if I had to maintain code written like that. Having
boilerplate would at least make it obvious that something unusual is going on
with these variables and make the intent clear while reading the code.

~~~
fendy3002
Thats because your use case isn't real. In js, its usually used to generate
select option (example in react):

    
    
        for(let optValue of Object.keys(options)){
          optDom.push(
            <option key={optValue} value={optValue}>{options[optValue]}</option>
          )
        }
    
    

Of course array also works, but with json object, it guarantee that the value
will be distinct and you don't need specific array object type.

------
sjagoe
I think there is a design issue in that language. X in a fixed width font
should be a constant. X in a variable width font is a variable.

------
TopHand
My Commodore Vic 20 running basic only allowed 2 character variable names.

~~~
weinzierl
That is not entirely true, from my recollection variable names could be longer
but only two characters were significant.

~~~
dhosek
That was also the case with AppleSoft BASIC

------
bufferoverflow
Obviously inferior to brainfuck, which uses just two characters.

[https://en.wikipedia.org/wiki/Brainfuck](https://en.wikipedia.org/wiki/Brainfuck)

~~~
ccmcarey
Which is itself inferior to Whitespace [1], which uses only spaces, tabs, and
linefeeds.

[1]
[https://en.wikipedia.org/wiki/Whitespace_(programming_langua...](https://en.wikipedia.org/wiki/Whitespace_\(programming_language\))

~~~
lgl
> (...) the Whitespace interpreter ignores any non-whitespace characters (...)
> A consequence of this property is that a Whitespace program can easily be
> contained within the whitespace characters of a program written in another
> language (...) making the text a polyglot.

This is actually pretty brilliant as a sort of steganography in code type
thing.

~~~
cmehdy
So one could write an interpreter for Whitespace along with Whitespace code to
run in the interpreter, so that the interpreter interprets itself. Hard to do
better at maximizing the usage of negative space!

~~~
lgl
Whoa, you just blew my mind. We need this in our lives :)

------
Tade0
Unrelated question: what are the main reasons (aside from the obvious file
format problems) for which we don't have rich text syntax?

Imagine having a e.g. link in the code. Wouldn't that be useful?

~~~
virgilp
> Wouldn't that be useful?

Useful - for what? Do you want that link to be written & maintained by you, or
to be automatically generated by the tools? Because we already have the
latter... (e.g. in many IDEs, ctrl-/cmd-click on symbols performs useful
actions, eg. takes you to the definition or finds all references if you're at
the definition site).

~~~
Tade0
It does, but in dynamically typed languages it's obviously less capable.

To deal with this one could of course have a static type system instead, but
that necessitates learning the DSL behind it and its idioms - the lack of
which is the main appeal of dynamic typing to begin with.

~~~
virgilp
I actually did code hinting for PHP in a fairly popular commercial product,
more than 10 years ago - and I disagree with you that it has to be less
capable. You can use heuristics - people are forgiving because they understand
you can't get everything right. You can use configuration files & user hints
to help the semantic analysis. You can absolutely get the hints mostly right -
and it's automatic, so probably closer to being correct than anything that'd
have to be maintained by hand.

------
js8
I think this hits close to home. I wish creators of new programming languages
would reuse syntax of existing programming languages (ideally the ones in the
mainstream). Or at least think about it.

Also think if you even need a new language. It seems that too many new
languages have features that can be handled by functions or macros in existing
languages.

Some languages like Forth, Lisp or Haskell are very powerful, have strong
metaprogramming facilities, and most likely can already do anything that would
need a new language and new syntax.

Think about it - if you avoid creating another syntax variation, and work with
an existing syntax (or better existing language), your chances of somebody
actually using your efforts will vastly increase.

~~~
kgwxd
After following Make A Lisp [1] and seeing how easy it is to parse and get all
that power, other syntax just seems sadistic for both the language developer
and the users.

[1] [https://github.com/kanaka/mal](https://github.com/kanaka/mal)

------
giggly_gopher
I heard a story that someone giving a talk at IAS only used M's on the
chalkboard (lowercase, uppercase, doublestroke, script, etx) before he was
told to cut it out. I can't remember who it was if anyone else heard the
story.

------
dodleptjdnd
I had a class in grad school where the textbook ran out of english, greek, and
hebrew letters and subscripts and resorted to serif vs sans fonts. It was
interesting.

------
emilecantin
So, basically coding like a mathematician or physicist?

------
bregma
Came here thinking it was another jab at the venerable X11 display server. It
seems we need a Unicode raster font to make this post more humourous.

------
adolph
This API is reminiscent of the VA Fileman API for which X is used over and
over again. Fileman also uses Y though.

[http://www.hardhats.org/fileman/pm/cl_dic.htm](http://www.hardhats.org/fileman/pm/cl_dic.htm)

------
Wowfunhappy
I am _delighted_ to see an xkcd comic make it to Hacker News's front page, but
also a little disappointed it happened to be _this_ one. It's a perfectly fine
comic, but there are so many others that could have engendered even more
interesting discussions, which I'd love to have been able to read.

Limiting myself purely to more recent ones:

• [https://xkcd.com/2307/](https://xkcd.com/2307/) \- Alive or Not

• [https://xkcd.com/2224/](https://xkcd.com/2224/) \- Software Updates

• [https://xkcd.com/2221/](https://xkcd.com/2221/) \- Emulation

I'm also really missing the xkcd forums. The quality of the discussion was
below what I'd expect to read on HN†, but it was still nice to have something
for each of the comics.

† No disrespect intended to anyone who was on those forums—you're all great
people, but there's less of you, and, well, there's nothing quite like HN.

------
pella
[https://www.explainxkcd.com/wiki/index.php/2309:_X](https://www.explainxkcd.com/wiki/index.php/2309:_X)

~~~
smitty1e
> This is also a jab at mathematicians who are in addition to using variable
> names which are short and nondescript (e.g. "x"), are also "typeface
> sensitive" (in addition to case sensitive). In other words, one can
> typically find a statement involving three different "X" variables,
> referring to three different objects, and they are distinguished by their
> font and case.

The pain, across math, engineering, and physics, is all of the formulae with
overloaded notation, sometimes from the Greek, sometimes the Roman alphabet.

Formulas are great as a summary and reminder for the seasoned practitioner,
but can be a huge barrier to entry for the student.

Perhaps GitHub repos with well-written code and test cases for the neophyte
can, as they say these days, "flatten the curve".

~~~
thedanbob
I remember always being annoyed at spherical coordinates when I was taking
both math and physics classes in university. They use the same symbols but two
of them are swapped.

~~~
smitty1e
As an undergrad I fantasized about a steel cage match between all of these
practitioners to force convergence on a single set of notation.

~~~
teddyh
[http://www.wastedtalent.ca/comic/non-dimensional-
fame](http://www.wastedtalent.ca/comic/non-dimensional-fame)

------
hprotagonist
nobody has mentioned Color FORTH yet?

[https://en.wikipedia.org/wiki/ColorForth](https://en.wikipedia.org/wiki/ColorForth)

------
Analemma_
Sometimes it seems like people writing Coq are trying to do this. Would it
kill you to use variables besides n and x with subscripts?

------
JoeAltmaier
Ok just one variable - X[], use an enum for indexes into that. Enums aren't
'variables'.

------
thallukrish
probably you can have a ML program that generates variable names, given the
situation in the code.

~~~
efferifick
There is something like this already and it is quite good. It is used for
deobfuscating javascript [0][1].

[0]
[https://www.sri.inf.ethz.ch/research/plml](https://www.sri.inf.ethz.ch/research/plml)
[1] [http://jsnice.org/](http://jsnice.org/)

------
bluntfang
just make a hash map where key = actual variable name and value = x

------
pinewurst
Who's the first to announce X in Rust?

------
syllable_studio
But what is the title??

------
anoplus
Good laugh, Thanks!

------
TheOtherHobbes
Apart from the 'x' part, this is basically CSS.

------
mekpro
Why not just use x1, x2, ... Problem solved.

~~~
coldpie
Back in high or middle school, I wrote a Tetris game. Being terrible at
programming, I stuffed all of the row clearing logic into one function, which
ended up having variables named, x, xx, xxx, xxxx... I think I stopped at four
x's. You can imagine the inner loops. No, it never worked right.

~~~
efreak
I propose modifying a minifier to make all variables different combinations of
the characters VvWw, functions FEf, objects O0o, etc

Bonus points: instead of minimizing space, all identifies are, say, exactly 6
characters long.

------
cmpb
Thanks for reminding me to catch up on the last few months of XKCD! Ended up
sending a bunch of coronavirus-related comics to my biologist wife.

------
spcebar
For those of you on mobile who want to read the alt text, check out
m.xkcd.com, the oft forgotten mobile UI.

~~~
frosted-flakes
In Android Chromium, you can read the alt-text of images by long-pressing the
image.

------
dsachin
This is great

------
DC-3
I like xkcd as much as anyone (I've even got the books!) but this isn't really
HN calibre imo.

~~~
rootlocus
"HN caliber" is determined by the community voting on posts which determines
what posts make it to the front page.

------
yread
What makes XKCD so great? Is it that he sticks to noncontroversial subjects -
everytime people pull up a "relevant xkcd" it's something most of the people
agree on.

Even with controversial subject - the covid lockdown, he chose to highlight
facts where everyone (well ~90%) agree on.

