Hacker News new | past | comments | ask | show | jobs | submit login
X (xkcd.com)
896 points by boffinism 11 days ago | hide | past | web | favorite | 128 comments





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

https://unicode-table.com/en/blocks/mathematical-alphanumeri...


I think that violates the “only X, but in different fonts” dictum. Those are technically different glyphs and therefore very distinct names. A font would be the same character tagged in different ways, those are absolutely different characters. Aside from the visual similarity, a computer would never be confused into think they’re even remotely similar (kind of how to us 1000000001 and 10000000001 look almost indistinguishably similar, but are almost impossible for a computer to confuse).

That seems obviously true, except it is actually incorrect, at least as far as Python (3) goes.

The following are all interpreted as X in variable names: XⅩX𝐗𝑋𝑿𝓧𝔛𝕏𝖃𝖷𝗫𝘟𝙓𝚇

And these are all interpreted as x: xˣₓⅹx𝐱𝑥𝒙𝓍𝔁𝔵𝕩𝖝𝗑𝘅𝘹𝙭𝚡

I.e. 𝖃𝖝, 𝕏𝕩 and Xx all represent the same variable!

Edit: As a mathematician, this is actually kind of annoying. Sometimes I would love to have different variables named x and 𝐱, or whatever. Oh well, at least I can have θ, λ, φ, π, etc. Autohotkey macros make them easy to type.


Sure, that's true in Python. Python has some reasonable assumptions built into it in this ares. The X programming language, on the other hand, was built by someone whose prior work in language creation was so egregious as to warrant a court order against further such activity. (Only to be overturned, one would presume, on 1st amendment grounds)

“Language P has a mechanism by which it conflates several different glyphs into a canonical form for the sake of variable names” is not an “actually not true” kind of exception.

A mathematician such as yourself (and myself too) should recognise that asserting different things to be functionally equal is an entirely distinct phenomenon from what is being discussed here, which is differentiating a unique glyph based on a formatting that (font).


This bit is the incorrect bit: "a computer would never be confused into think they’re even remotely similar". Python is treating different glyphs as if they're the same but formatted differently.

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

Most of them are because they have different meanings in maths, so this makes it easier to represent maths using Unicodemath [1] or MathML.

[1] https://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v3.1...., https://docs.microsoft.com/en-gb/archive/blogs/murrays/unico...

Edit: [2] Similar for Latex https://www.ctan.org/pkg/unicode-math?lang=en


I'm pretty sure the first two links refer to something very different than the third:

The first two are about a way to encode maths using unicode, as in conventions and special characters allowing e.g. to write fractions, aligned equations, etc. So, this would essentially furnish an alternative to the "math" subset of latex (think mathjax or katex) or mathml.

The third is a package for latex, and allows to use unicode symbols (greek letters, math symbols, etc.) in your math environments + something related to the use of unicode in the output (requiring compatible fonts); it seems the second part is the main one but I'm not sure what that means exactly.


The Latex package says "Maths input can also be simplified with Unicode since literal glyphs may be entered instead of control sequences in your document source." So it at least includes a similar idea.

Superficially similar, yes, but my point was just that it may seem from your bunching up the links together that all refer to the same thing, while they don't.

Fair enough, I've edited it. I just tried using the Latex package with a formula typed using Unicode symbols, and it does work, but doesn't follow all the UnicodeMath rules.

> why Unicode has

Because the distinction did already exist in the originating repertoire.

https://news.ycombinator.com/item?id=23029871


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.

"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.

That's the opposite of the rule for CJK characters, right? For those, symbolically-same characters get the same codepoint regardless of semantics (language) or shape (glyph).

I have always assumed this related to achieving a differentiated character set for Math and science formulas.

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

"Since each variable has a corresponding color, assignment is easily represented with background colors. For instance, A denotes the assignment of the number 12345⅔ to the variable #F00BA2. Note that this could also be written as rm -rf /, because we are removing the arbitrary indirect association between text and meaning to focus only on the clear meaning conveyed by the formatting."

"Programming languages have not always been text-based. Early work explored many diverse paradigms. For example, the first widely used programming language, Build-A-New-Machine-For-Each-Task, did not employ text at all, nor did its popular successor, Plug-Wires-Into-Different-Places."

The paper's date is March 31st, so that it can be read on April 1st....

I do not exclude nothing weird since learning that indentation is a structural part of Python. I was convinced that it is just a joke, first. Now I am just sad.

> I do not exclude nothing weird since learning that indentation is a structural part of Python.

That is not that weird. In fact a more formal (and optional) version (the "offside rule", which is what Haskell uses) was part of Landin's Iꜱᴡɪᴍ:

> (c) Indentation, used to indicate program structure. A physical Iꜱᴡɪᴍ can be defined in terms of an unspecified parameter: a subset of phrase categories, instances of which are restricted in layout by the following rule called "the offside rule." The southeast quadrant that just contains the phrase's first symbol must contain the entire phrase, except possibly for bracketed subsegments. This rule has three important features. It is based on vertical alignment, not character width, and hence is equally appropriate in handwritten, typeset or typed texts. Its use is not obligatory, and use of it can be mixed freely with more conventional alternatives like punctuation. Also, it is incorporated in Iꜱᴡɪᴍ in a systematic way that admits of alternatives without changing other features of Iꜱᴡɪᴍ and that can be applied to other languages.

> I was convinced that it is just a joke, first. Now I am just sad.

There is at least one language which "seriously" attempted this though: : color forth ; (which should properly be written colorForth with a red "color" and a green "forth": https://web.archive.org/web/20160310135832/http://colorforth...).


Using visual/presentation elements for functional meaning is pretty weird. Regardless of being alone with it or not.

If you consider the long and rich history of computing, Python is not uncommon. Just an example: in COBOL, the 7th character of a line has special meaning, for example, comments must begin at the 7th character. Code body usually starts at the 8th character of a line. If you don't follows these rules, compiler won't accept your code. It makes sense when you consider that COBOL was initially written on punchcards.

That reminds me of Bjarne Stroustrup's April Fools's paper on overloading whitespace:

http://www.stroustrup.com/whitespace98.pdf


looks like an obvious evolution of colorForth[0]

[0] https://en.wikipedia.org/wiki/ColorForth


I am disappointed that the references at the end are made up and are not the prior art in the obviously important field of non-textual languages. I'd really love to learn about that "system for aromatic computation and its applications in cheese production [7]"!

That one is also a joke. There was another SIGBOVIK paper on the front page a few weeks ago: https://news.ycombinator.com/item?id=23057168

Are you suggesting that this paper is in earnest? O.o

http://www.sigbovik.org/

Tom 7's video descriptions mention this conference, he has quite a few fun topics: https://www.youtube.com/watch?v=xDxjbXAqTPg


No, GP means "if you think this is a sick joke, look what's actually sick".

Oh right, 'this joke's even sicker'. Thanks, it's been a long day.

Well I really meant that someone is trying to make this sick joke reality, but I like this explanation.

Ah, SIGBOVIK. So many amazing papers come out of that. My favorites are often by Tom7, see for example http://tom7.org/mario/mario.pdf or http://tom7.org/abc

Can't trust anyone who uses wall-to-wall justification.

Nothing new here. I've see programmers that basically use x for everything

WysiScript ie. "what you see is Script", smart word play with the acronym well known in the industry. What we are missing now is WYSYMNG editor ("what you see you might not get", see Beastie Boys song).

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?


> 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"

:)


“Future versions of the language may relax this restriction by adding support for additional colors not representable in RGB, such as ultraviolet, infrared, and plaid.”

Seems legit.


> In order to support quantum computing, which makes use of value superposition and probabilistic algorithms, future versions of WysiScript may make use of the alpha channel in color specifications.

Yeah, I'm pretty sure they're not entirely serious.


Sigbovik is a joke journal. A very serious and very good joke journal.

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...

Like registers in a processor. e.g. the ARM1 had 16 32-bit registers, some of which were special (e.g. one was the pointer to the next instruction). From the point of view of a running program, those registers are the only true 'variables' that the processor had. Everything else was achieved by swapping them in and out of memory. I guess its the same for all processors. So a language with a restricted number of variables is actually pretty realistic - it represents the bare metal quite well.

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.


> 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.


There was a basic programming cartridge for the Atari 2600. It was limited to programs that could fit on a single low-res screen (I think six lines?) and only allowed one or two variables, if I recall correctly. I remember trying to write a simple program on a friend's Atari and found something that seemed really fundamental (maybe altering the value of an index variable in a for loop) was not allowed.

seems like it was made just so users could do a 10 print 'i am the best!'; goto 10 on their tv like their computer user friends could

Reminds me of this comment from Reddit https://old.reddit.com/r/rust/comments/5penft/parallelizing_...

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 :)

You're forgetting the important bit:

> That's just a "template" file, which I use search and replace in order to generate the three monomorphized go files.

They were using a separate codegen step (really just a sed run) to actually "do generics". In fact, that was the entire reason this thing was introduced[0], the structure originally used interface{} for its items.

The "generic" part was then moved to a `go_` file from which monomorphisations on bool, ArrayT and ScalarT got generated.

Also

> Go allows characters from the Canadian Aboriginal Syllabics for identifiers

I'd expect just about any language which supports unicode identifiers to allow this, as canadian aboriginal syllabics is a "normal" abugida, and its "textual" components are (properly) tagged as XID_Start and XID_Continue.

[0] https://github.com/google/enjarify/commit/55e8e65e681b15f026...


Isn't that a syntax terror?

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

My misspelling was intentional... but now it's not funny

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...


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

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"


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...


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.

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.

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.

And to add to that. Once reflection becomes a "tool in your toolbox" so many problems can be solved easily with it in other languages. Then you bash your head against poor documentation and slow execution (looking at you Scala).

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.

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

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

That was also the case with AppleSoft BASIC

Obviously inferior to brainfuck, which uses just two characters.

https://en.wikipedia.org/wiki/Brainfuck


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

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


> (...) 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.


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!

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

brainfuck interpreter in Whitespace to confirm its superiority: https://allisio.xyz/bf.ws.html

Though perhaps some sicker soul has in fact written a Whitespace interpreter in brainfuck...


I once made a language that translated directly to Whitespace, but used images as source code. Pixels where red channel had the highest value were like Whitespace's spaces, green channel - tabs, and blue channel - new lines. If the highest value was shared across multiple channels, it was ignored.

8, not two: <>+-.,[]

Well technically all programming languages can be encoded with just two characters. :)

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?


Algol-60 (and its younger cousin Algol-68) did actually use boldface to distinguish special keywords such as "if", "begin", "true", etc, from the namespace of ordinary identifiers. But that was only used in publications, not in machine-readable source code, since few encodings could support boldface. Instead various stropping[0] methods were used in the implementations of Algol. Today there is really no technical reason why rich text can't be used, but my guess is that syntax highlighting serves a similar purpose without complicating file formats and parsers.

[0]. https://en.wikipedia.org/wiki/Stropping_(syntax)


> 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).


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.


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.

It's very hard to survey with precision the exact state of a body of rich text. I don't even like using rich text editors for prose, for this reason. HTML/Markdown are the closest thing we have to "rich text that's explicit and precise", but at that point you're back to plain text with special machine-readable syntaxes. And who wants to write out explicit formatting directives solely so that formatting can then drive program behavior?

I think debugging code is hard enough without having the debug errors cause by using the wrong font.

Have you ever wrestled with MS Word to make you heading appear on the right page? Imagine having to do that to make code compile.


Code already has all the information. It's enough for syntax highlighters, compilers, static analyzers, navigation, refactoring, etc.

Swift has a markdown comments (starting with ///), which actually render formatting inside editor, and it's pretty great.

colorForth uses colors for semantics

https://en.wikipedia.org/wiki/ColorForth


> what are the main reasons

Terminals.


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.


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


Your comment reminded me of this interesting read, https://hillelwayne.com/post/influential-dead-languages/

Conversely, I’ve found it useful that Erlang has very different syntax than most languages, because it helps me think about the distinct semantics it offers.

Plus it’s very concise, which spoiled me to the point where I find it difficult to look at Elixir.


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.

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.

So, basically coding like a mathematician or physicist?

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.

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


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/ - Alive or Not

https://xkcd.com/2224/ - Software Updates

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.



> 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".


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.

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


Well, to be fair, sometimes the X is a Greek upper case Chi. Mathematics ran out of Greek and Roman a while back and Hebrew has appeared - א (as in "Aleph Null")

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

It's like saying that source code is a summary and reminder for the seasoned practitioner, but can be a huge barrier to entry for the student.

In both cases the reader is the "interpreter", accept this or move on.


> can be a huge barrier to entry for the student

I did a category theory class a few months back. Huge barrier at times - so many moving pieces. "Err, which properties do 𝒞 and mumble(𝒟) have here, in this paragraph???"

I wanted to create an interactive version of some topics. Just mouseover elaboration and graphics, to reduce the amount of state one has to keep track of mentally, and its associated cognitive load. But the state of in-browser rendering of category diagrams wasn't quite there yet.

Best part of the class was the "after-math" (that's a 3-interpretation pun). An iterative improvement on past versions of the class, formalizing an observed custom - after the 1 hr math lecture, the room was reserved for a second hour, so people could hang out, with the instructors, in front of blackboards. In part, clarifying and explaining things in different ways.

One instructor observed something very vaguely like "I'd never approach things the way I do in lecture, if I was tutoring someone one-on-one."

One can imagine technical fixes. Mouse-over equations. FAQs. Presenting the material from multiple perspectives.

Many of them could implemented on clay tablets. And that newfangled wood pulp. My best understanding is, that as a society, incentives are poorly aligned with creating non-wretched education content in the sciences, and I assume in math.

So my hope for XR in education, is not just the power of tools like eye tracking, but that incentives are disrupted enough to get us unstuck.

Consider eye tracking. When I show people this video[1](IBM's STM stopmotion) in person, it was very common for them to ask me "what are the ripples?". Apparently it was enough of a thing for IBM to do supplementary content on it. But if I'm not there, what UI would youtube need to have a similar dynamic?

Someone did an art project. You sit by yourself and watch a drama. An interesting drama. But why is it interesting? The video is a graph, like one of those old "choose your own adventure" games. And there's an eye tracker. So if your gaze shows you're interested in character A...

Why not ripples? Imagine the richly interwoven tapestry of science and engineering as that graph, adaptively explored, driven by interest, misconceptions, and learning objectives.

And imagine being able to watch someone's gaze patterns as they try to understand a paragraph of math. Backed by a database of everyone's patterns. And being able to respond. Not as well as an excellent human tutor in some ways, but in some ways even better.

Or we could just copy the usual wretched content into 3D and call it a day.

[1] https://www.youtube.com/watch?v=oSCX78-8-q0


"Consider eye tracking... imagine being able to watch someone's gaze patterns as they try to understand"

Let's not? Ever? It reminds me of dystopias where a government tries to sense how really interested people are in the latest propaganda and punishes those who are too bored. Or just a small school ran as a totalitarian regime where you're not even allowed to be bored.


Reading Explain XKCD often feels like reading the 'Spoon' Wikipedia page

nobody has mentioned Color FORTH yet?

https://en.wikipedia.org/wiki/ColorForth


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?

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

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

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 [1] http://jsnice.org/


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

Who's the first to announce X in Rust?

But what is the title??

Good laugh, Thanks!

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

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

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.

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.


In high school when I used f for file variable everybody looked at me like I just invented the wheel. Everybody else was using weird long names.

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.

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

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

This is great

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

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

I think the conversations here are more valuable than the comic itself, which is, uh, not really a joke. Some shitty drawings and half an idea, like many xkcd comics. But the comments here have pointed me to some cool stuff, so...

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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: