21 ms·
X
- pella 6y agohttps://www.explainxkcd.com/wiki/index.php/2309:_X https://www.explainxkcd.com/wiki/index.php/2309:_X
- 2038AD 6y agoReading Explain XKCD often feels like reading the 'Spoon' Wikipedia page
- deleted 6y ago[deleted]
- smitty1e 6y ago> 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".
- stevedonovan 6y agoWell, 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")
- thedanbob 6y agoI 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.
- sorokod 6y ago>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.
- mncharity 6y ago> 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 https://www.youtube.com/watch?v=oSCX78-8-q0
- yyyk 6y ago
- lucideer 6y agoI 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 6y agoI 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.php https://www.php.net/manual/en/language.variables.variable.ph...
- withinboredom 6y agoBut 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.
- withinboredom 6y agoAnd 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).
- simias 6y agoOof, 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.
- robin_reala 6y agoA 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.txt http://www.unicode.org/Public/security/latest/confusables.tx...
- aasasd 6y agoGreek 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
- lifthrasiir 6y agoIf 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
- taneq 6y agoAre you suggesting that this paper is in earnest? O.o
- ComodoHacker 6y agoNo, GP means "if you think this is a sick joke, look what's actually sick".
- taneq 6y agoOh right, 'this joke's even sicker'. Thanks, it's been a long day.
- lifthrasiir 6y agoWell I really meant that someone is trying to make this sick joke reality, but I like this explanation.
- rzzzt 6y agohttp://www.sigbovik.org/ 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 https://www.youtube.com/watch?v=xDxjbXAqTPg
- riffraff 6y agolooks like an obvious evolution of colorForth[0] [0] https://en.wikipedia.org/wiki/ColorForth https://en.wikipedia.org/wiki/ColorForth
- brobdingnagians 6y agoCurious... 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?
- deleted 6y ago[deleted]
- JoeAltmaier 6y agoOk just one variable - X[], use an enum for indexes into that. Enums aren't 'variables'.
- TopHand 6y agoMy Commodore Vic 20 running basic only allowed 2 character variable names.
- mekpro 6y agoWhy not just use x1, x2, ... Problem solved.
- dvh 6y agoIn 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.
- coldpie 6y agoBack 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 6y agoI 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.
- bluntfang 6y agojust make a hash map where key = actual variable name and value = x
- mkl 6y agoEven without technically changing font, there are more than you might expect: XxˣₓẊẋẌẍⅩⅹ⠭ꭖꭗꭘꭙ🄧⒳ⓍⓧXx𝐗𝐱𝑋𝑥𝑿𝒙𝓍𝓧𝔁𝔛𝔵𝕏𝕩𝖃𝖝𝖷𝗑𝗫𝘅𝘟𝘹𝙓𝙭𝚇𝚡🅇🅧🆇 https://unicode-table.com/en/blocks/mathematical-alphanumeric-symbols/ https://unicode-table.com/en/blocks/mathematical-alphanumeri...
- bufferoverflow 6y agoI never understood why Unicode has bold versions of characters, that's the function of the font, not the character set.
- mkl 6y agoMost 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.pdf https://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v3.1...., https://docs.microsoft.com/en-gb/archive/blogs/murrays/unicodemath https://docs.microsoft.com/en-gb/archive/blogs/murrays/unico... Edit: [2] Similar for Latex https://www.ctan.org/pkg/unicode-math?lang=en https://www.ctan.org/pkg/unicode-math?lang=en
- dbmueller 6y agoI'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.
- mkl 6y agoThe 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.
- Tade0 6y agoUnrelated 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?
- avianlyric 6y agoI 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.
- rootlocus 6y agoCode already has all the information. It's enough for syntax highlighters, compilers, static analyzers, navigation, refactoring, etc.
- cuspycode 6y agoAlgol-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) https://en.wikipedia.org/wiki/Stropping_(syntax)
- virgilp 6y ago> 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 6y ago
- weinzierl 6y agoBack 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...
- dhosek 6y agoThere 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.
- stOneskull 6y agoseems 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
- Starwatcher2001 6y agoThe 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 6y ago> 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.
- thallukrish 6y agoprobably you can have a ML program that generates variable names, given the situation in the code.
- efferifick 6y agoThere 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/
- DC-3 6y agoI like xkcd as much as anyone (I've even got the books!) but this isn't really HN calibre imo.
- rootlocus 6y ago"HN caliber" is determined by the community voting on posts which determines what posts make it to the front page.
- uxp100 6y agoI 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...
- yread 6y agoWhat 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.
- bufferoverflow 6y agoObviously inferior to brainfuck, which uses just two characters. https://en.wikipedia.org/wiki/Brainfuck https://en.wikipedia.org/wiki/Brainfuck
- katsura 6y ago8, not two: <>+-.,[]
- majewsky 6y agoWell technically all programming languages can be encoded with just two characters. :)
- ccmcarey 6y agoWhich is itself inferior to Whitespace [1], which uses only spaces, tabs, and linefeeds. [1] https://en.wikipedia.org/wiki/Whitespace_(programming_language) https://en.wikipedia.org/wiki/Whitespace_(programming_langua...
- deleted 6y ago[deleted]
- allis10 6y agobrainfuck interpreter in Whitespace to confirm its superiority: https://allisio.xyz/bf.ws.html https://allisio.xyz/bf.ws.html Though perhaps some sicker soul has in fact written a Whitespace interpreter in brainfuck...
- lgl 6y ago> (...) 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.
- 6y ago
- adolph 6y agoThis 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
- anoplus 6y agoGood laugh, Thanks!
- TheOtherHobbes 6y agoApart from the 'x' part, this is basically CSS.
- mraudiobook_com 6y agoHN has become a place for smart idiots. I hate you people so much.
- dodleptjdnd 6y agoI 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.
- filipn 6y agoReminds me of this comment from Reddit https://old.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/ 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 :)
- masklinn 6y agoYou'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/55e8e65e681b15f026625c38024a63adab8cd446 https://github.com/google/enjarify/commit/55e8e65e681b15f026...
- 0-_-0 6y agoIsn't that a syntax terror?
- hprotagonist 6y agonobody has mentioned Color FORTH yet? https://en.wikipedia.org/wiki/ColorForth https://en.wikipedia.org/wiki/ColorForth
- Analemma_ 6y agoSometimes it seems like people writing Coq are trying to do this. Would it kill you to use variables besides n and x with subscripts?
- bregma 6y agoCame 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.
- giggly_gopher 6y agoI 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.
- emilecantin 6y agoSo, basically coding like a mathematician or physicist?
- spcebar 6y agoFor those of you on mobile who want to read the alt text, check out m.xkcd.com, the oft forgotten mobile UI.
- frosted-flakes 6y agoIn Android Chromium, you can read the alt-text of images by long-pressing the image.
- js8 6y agoI 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.
- coldpie 6y agoYour comment reminded me of this interesting read, https://hillelwayne.com/post/influential-dead-languages/ https://hillelwayne.com/post/influential-dead-languages/
- macintux 6y agoConversely, 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.
- kgwxd 6y agoAfter 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
- dsachin 6y agoThis is great
- Wowfunhappy 6y agoI 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.
- cmpb 6y agoThanks 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.
- pinewurst 6y agoWho's the first to announce X in Rust?
- syllable_studio 6y agoBut what is the title??
- sjagoe 6y agoI 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.
- deleted 6y ago[deleted]