4 ms·
I invented a programming language where you use Unicode box-drawing characters to draw a structure of boxes and lines: ╓───╖
by Timwi 2y ago
I invented a programming language where you use Unicode box-drawing characters to draw a structure of boxes and lines:
╓───╖
║ ! ║
╙─┬─╜ ┌───╖ ╔═══╗
┌─────┴─────┤ > ╟──╢ 2 ║
│ ╘═╤═╝ ╚═══╝
╔════╗ ┌───╖ │ │
║ −1 ╟──┤ + ╟─┴─┐ │
╚════╝ ╘═╤═╝ │ │
┌─┴─╖ │ ╔═══╗ │
│ ! ║ │ ║ 1 ║ │
╘═╤═╝ │ ╚═╤═╝ │
│ ┌─┴─╖ ┌─┴─╖ │
│ │ × ╟──┤ ? ╟──┘
│ ╘═╤═╝ ╘═╤═╝
└─────┘ │
The language is called Funciton (pronounced: /ˈfʌŋkɪtɒn/) and the above example demonstrates the factorial function.
I made this language over 10 years ago, but earlier this year I've been making YouTube videos in which I describe it in excruciating detail: https://youtube.com/playlist?list=PLkG32PHxWoJaetjKUMVRONWLgRHQVjmtc https://youtube.com/playlist?list=PLkG32PHxWoJaetjKUMVRONWLg...
For my next video, I want to show in detail how the interpreter works. For this purpose I'm creating an elaborate animation. You'll notice that the latest video is already several months old; this is because this animation is more work than I bargained for, and I got a little burned out by it. Nevertheless, I persevere and the video will come out whenever I may finish it.
Language specification: https://esolangs.org/wiki/Funciton https://esolangs.org/wiki/Funciton
Interpreter: https://codeberg.org/Timwi/Funciton https://codeberg.org/Timwi/Funciton
- sgt 2y agoAlso impressed with how good this looks on HN :)
- danielvaughn 2y agoYeah I was going to comment the same. Even looks good on mobile.
- sureglymop 2y agoThis is awesome! I think what it needs now is tooling/an ide to "draw" programs :) I've long wanted to look for a sort of "ascii drawing program" where one can just draw on a grid with monospace ascii characters and have tools for boxes, circles, etc. Maybe it already exists!
- inrodos 2y agoThere is a tool called asciiflow which sounds exactly what you are looking for
- toastal 2y agoVery cool! +1 for hosting on Codeberg so we don’t have corporate lock-in.
- slightwinder 2y agoThis seems like something which would be annoying to create digital without supporting tools, but awesome in analog. I could see value in a specialized camera-app which transforms hand drawn box-structures to digital boxes, or a kind of play board where children could arrange cards to create a program and learning programming.
- Timwi 2y agoI doubt that Funciton, in its current form, could be useful in education. It doesn’t embody the most widely used programming paradigm (procedural) but instead is a declarative functional language, which makes any skills obtained by studying it pretty much untransferable. Secondly, its syntax does not allow for naming of variables and parameters (except perhaps through comments) which is an anti-pattern. If these could be addressed in a derivative concept that is actually designed for education, it could work. As it stands, however, it’s just a quirky esolang.
- alonsonic 2y agoVideos are actually quite good. Great job!
- hinkley 2y agoThe “better mousetrap” of visual programming is inventing a diff tool that works decently. If you can do that, the world will beat that path to your doorstep.