5 ms·
Well designing a language to use characters that aren't on the keyboard is certainly an example of an impractical language.
by lloydatkinson 4y ago
Well designing a language to use characters that aren't on the keyboard is certainly an example of an impractical language.
- mlajtos 4y agoCan programming be liberated from the keyboard-style input?
- still_grokking 4y agoAnd what would be the alternative? A joystick maybe? (No, the joystick idea isn't serous of course). You can already program by drag & drop. Try Scratch. But this just does not scale… Before we give up keyboards and switch to brain interfaces, maybe we should first try to liberate programming form the monadic style, or something like that. ;-)
- mlajtos 4y agoI am exploring pencil input for coding: https://mlajtos.mu/posts/new-kind-of-paper https://mlajtos.mu/posts/new-kind-of-paper What do you mean by "monadic style"?
- still_grokking 4y agoI'm not sold on this pen & paper idea to be honest. It looks slow and cumbersome. It misses all the advantages of using a computer. How would for example code competition, context sensitive features, or refactoring work? How about editing features of a capable editor like this here: https://helix-editor.com/ https://helix-editor.com/ It would be very hard, if even possible, to replicate such user experience with "pen & paper" (even if "pen and paper" would be digital). I think programming could be improved. But not by going back in time. Instead the "text" (code) should become even more interactive. I really like the ideas of e.g. Bret Victor in this regard: http://worrydream.com/#!/LearnableProgramming http://worrydream.com/#!/LearnableProgramming https://youtube.com/watch?v=8pTEmbeENF4 https://youtube.com/watch?v=8pTEmbeENF4 Or the ideas behind something like Enso: https://enso.org/ https://enso.org/ Or "just" interactive notebooks… Computers are so much more than pen & paper! --- "Liberating programming form monadic style" was only a pun on the parent post. :-) If you do FP (functional programming) in an advanced typed language you will likely end up with code written in monadic style, meaning that you wrap all (effectful) computation in some monads. In my opinion that's in the end not really much better than the usual imperative style—and that closes the circle to the original citation: "Can programming be liberated from the von Neumann style?" (which was the title of a quite important paper).
- mlajtos 4y ago> It looks slow and cumbersome. It misses all the advantages of using a computer. It's not a computer. It is a calculator for pen & paper. > How would for example code competition, context sensitive features, or refactoring work? How about editing features of a capable editor like this here: [Helix]. It would be very hard, if even possible, to replicate such user experience with "pen & paper" (even if "pen and paper" would be digital). Exactly. Keyboard-driven programming as it has evolved is un-replicable in a pen & paper form. But this goes both ways. Pen & paper modality allows you to do stuff you can't with keyboard, e.g. drawing & writing weird symbols like ∞∆⫸ (also outside UTF-8). Mouse is a poor substitute. Analog pen & paper world lacks computation. What this pen & paper calculator should do well is to solve Euler problems in-situ at the speed of thought. Example: https://youtu.be/y5Tpp_y2TBk?t=18 https://youtu.be/y5Tpp_y2TBk?t=18 > Instead the "text" (code) should become even more interactive. [Bret Victor] & [Enso] & interactive notebooks. 120% agree. Been doing some work & research in this space for quite some time.
- still_grokking 4y agoWe should stop the ASCII madness at some point. The world speaks Unicode. Only programming languages are mostly stuck in the 7-bit era. That sucks. People even use extra keyboards to input their emojis, but we "can't" input math or programming symbols? Really? An "international" keyboard layout gives you already a shitload of "special" signs. Using the compose key you can input even more. When this isn't enough it's trivial to add something to ~/.XCompose I'm not advocating to have a pure symbolic programming language. But things that are better expressed through symbols just should be. It has reasons why you use symbols in math instead of writing everything out in some human language. Programming is evidently symbolic, just like math: We know that as we let professionals read code while in a MRI scanner and we could look on their brain activity. The brain activity correlates with the one seen when reading (and understanding) math, not with the one seen while processing human language. We should design programming languages accordingly!
- al2o3cr 4y agoPeople even use extra keyboards to input their emojis, but we "can't" input math or programming symbols? Really? Your usage of emojis may be different from mine, but personally I'd estimate they appear in text about once per sentence (or even couple sentences) at the absolute most. That's quite a bit lower than the symbol density in most code. An "international" keyboard layout gives you already a shitload of "special" signs. Unfortunately not always the _same_ shitload - for instance, the OS X layout for Norwegian has the seemingly-ordinary ( and ) on Option-Shift-8 and Option-Shift-9!
- still_grokking 4y ago> Your usage of emojis may be different from mine, but personally I'd estimate they appear in text about once per sentence (or even couple sentences) at the absolute most. That's quite a bit lower than the symbol density in most code. That's completely past my point. The point is: People are using special keyboards to input their emojis. (You can even buy those as hardware gadgets!) So there shouldn't be any issue with the requirement to use some special keyboard (layout) to input code if even causal people mange to use such special keyboard (layouts) for very mundane purposes. > > An "international" keyboard layout gives you already a shitload of "special" signs. > Unfortunately not always the _same_ shitload - for instance, the OS X layout for Norwegian has the seemingly-ordinary ( and ) on Option-Shift-8 and Option-Shift-9! I was talking especially about a so called "international layout", not some country specific one. https://dry.sailingissues.com/us-international-keyboard-layout.html https://dry.sailingissues.com/us-international-keyboard-layo... http://arjenvankol.com/dvorak.php http://arjenvankol.com/dvorak.php Also for billions of people there is no direct correspondence between keys on the keyboard and the symbols they're trying to type. Just think about Asiatic languages. There is just no valid reason to limit the symbols used in programming to the ASCII set, as in every day use ASCII was already replaced by much richer symbol sets, which are perfectly fine to use for even less techy people. Only programming languages are caught in the "tradition" of drawing some "ASCII-art" instead of just using some proper Unicode symbols. That's laughable. Changing this would make in the end programming languages even simpler to read as, like I said, programming is symbolic by it's pure nature. Of course there is still a kind of balance needed: Using symbols for just everything wouldn't be helpful, as nobody wants to learn hundreds or even thousands of symbols just to read code (I'm not proposing to mimic an Asiatic language, as this wouldn't be accessible). But using a health mixture of symbols and words would be beneficial. Language level features would be better encoded as proper symbols (instead of the "written out symbols" we mostly use today, like e.g. "keywords"), but most user level code like APIs in libs should still remain word-based. APL got this almost right. Only that the code is too dense, imho, so it's hard to parse (for humans). But a modern language that would replace for example keywords with symbols would be a step forward again.