lainchan / λ

Esoteric Programming Languages

Torvalds · 2018-10-09 03:44
Any interest in esoteric programming languages? Namely brainfuck and its derivatives have quite an active community online dedicated to messing around with the code.
Ivan Petrov · 2018-10-09 05:05
Does IBNIZ count? It's derived from FORTH but I like how all the commands are single ASCII characters. http://pelulamu.net/ibniz/ http://pelulamu.net/ibniz/ibniz.txt
-->--> · 2018-10-09 05:27
>>10805 I'm a big fan of begunge and fungoidals in general. The most audacious of which is Quantum Dimensions. Enjoy this list: https://esolangs.org/wiki/Category:Multi-dimensional_languages
Splicer · 2018-10-09 12:44
I'm a big fan of Piet. I even wrote an interpreter that has the ability to do syscalls. Now I'm planning on writing a C compiler that makes use of that in order to compile "real" programs to Piet.
Yet Another Lainon · 2018-10-09 12:46
>>10807 It appears so. Looks really cool. https://esolangs.org/wiki/IBNIZ
drop · 2018-10-10 00:07
>>10809 This soykaf is crazy cool. I wish someone had shown me this stuff in elementary school...
Fred Nurk · 2018-10-11 11:25
>imageboard >images get deleted
Roger Pollack · 2018-10-11 16:46
>>10849 Did you read the rules? Irrelevant images are not allowed on this board.
Hong, Guil Dong · 2018-10-12 19:43
>>10807 >>10814 I've started to make something based on this but more in the direction of a normal FORTH - Main differences: Everything internally is represented using Balanced Ternary. Everything is a single character: Undefined/available words left to the user are E-Z - Numbers are 0-D (if you need to input a number larger than 13 you must build it on the stack with normal arithmetic operations, OR abuse strings and use their Extended BalTerSCII values). e, tau (2pi), and phi (the golden ratio) are available as constants. Stacks: $datastack #returnstack Conditionals: ?if ,else .endif Loops: [begin |exit ]again Definitions: :define &recurse ;enddef so if f is a boolean flag and (c) is some optional code f?c(,c). [(c)(f|)(c)] :X(y$z)(c)(f?(c)&(,c).); (comments) and "strings" both work by pointing to new dictionaries where everything is redefined - This allows for easy nesting and \escaping. @fetch and !store are normal, but I also want there to be {read and }write for external file/pipe stuff. There's more, and I really have to figure out how exactly I want some more critical things to behave, but this is turning out really nice I think. Someone talk to me about cyclical vs normal stacks. >>10849 Maybe you have to say: >mfw pic related
Crisis Ended · 2018-10-14 04:24
>>10813 I think someone already did that? I definitely trolled someone by transpiling something to piet a couple of years ago.
nil · 2018-10-14 09:56
The appeal of brainfuck, I've never understood. As an implementation target it's less exciting than hq9+ (which everyone gets wrong, so the fun is ranting about that in comments). For masochism it's too simple. I always liked befunges though. There's some crazy stuff you can do (time-travelling), and I like the visualness of it, the potential to animate programs. It feels like it could even be a practical programming language if something were changed. If you're into esoteric languages because you just want to get something done while standing on your head and maintaining a stress pose, how about a nice APL? J? K? Or how about ATS? You can get a good sense of what ATS is about from this video: https://www.youtube.com/watch?v=zt0OQb1DBko . He's not kidding, it's the hardest language I've ever learned. But there are real benefits to it.
Crisis Ended · 2018-10-14 18:01
>>10899 Half the appeal is the name, I imagine. I did use a variant usefully once - jsfuck let's you program javascript in a series of backets and array accesses. You can use it bypass WAFs.
typedef · 2018-10-14 19:23
>>10899 Brainfuck is a Turing Machine implemented in a subset of C syntax. It makes a lot of sense to use the most popular syntax if you want to experiment with Turing Machine concepts.
Dr. X · 2018-10-14 19:46
>>10879 I like it anon, you've inspired me to write a similar "one char forth" with some additional influences from SIMPL. Link related: https://nanode0000.wordpress.com/2017/01/20/simpl-a-small-forth-like-language/ >>10901 No, just no. Brainfuck is in no way a subset a C nor is it in any way related to C. Pretty much any language allows you to "experiment with Turing Machine concepts", bf isn't special in that matter. Bf isn't a turing machine, it's programmed in a completely different way and the only real similarity is the simple continuous memory but that's pretty fuarrrking common. Bf took off (I postulate) because of its quirkiness to program (while not being TOO difficult to get a cool lil calculation going) plus the small compiler (which was the original goal of the language). The fact the set of commands are so easy to remember was probably also of great help.
null · 2018-10-15 02:18
>>10902 >In fact the ascii code for W is used to store this code snippet at a given address – calcuated as (W-61)*32. So as soon as the interpreter encounters W, it jumps to that code address This is exactly how I thought to approach it - Makes me feel like maybe I'm not a poser hack after all.
Cereal Killer · 2018-10-15 20:08
>>10905 Cool idea but not really feasible for the kind of machine such a small language would be useful in (aka microcontrollers). It'd also remove the ability to define new words without removing the old ones and of switching dictionaries (unless you wanna double the memory usage). It's a pretty good idea if you only have a small set of words and don't need to define new ones tho.
() · 2018-10-17 02:11
>>10925 I think the opposite - Having the encoding just be the address saves you a whole layer of abstraction and pointer calls. I want to take this even a step further though so that for things like numbers, the address is the encoding is the value itself. D = 13 = 000000+++ The instruction to be executed at this address (represented by D) would just be to put the current address (the value 13) on the stack.
Naomi Nascimento · 2018-10-18 21:45
>>10946 >I think the opposite - Having the encoding just be the address saves you a whole layer of abstraction and pointer calls. Huuuu, there’s nothing to think about here. Your approach would take up a massive amount of memory, which would be relatively even bigger when you realise this kind of language is only useful in a small machine. Why you ignored this fact and simply dismissed my commentary as if it was so dumb as not to be worthy of your consideration is beyond me. Your idea for numbers is even more retarded and clearly impossible for any cpu which can only has its word length in addressing space or less (aka pretty much all any cpu). Further more, if you have that number in a form where you can jump to it, you also have a way to push it onto the stack, making your idea both impossible AND much slower than what you’re trying to replace. I'm honestly not sure if this is a troll or not, but I'd expect better from lainchan either way.
cond · 2019-08-08 07:02
>>10805 Brainroller is pretty neat, it's 2D, image and turn based, brainfuck. My GitHub profile picture spells out my name in it.
Mitnick · 2019-08-08 22:03
>Namely brainfuck and its derivatives have quite an active community online dedicated to messing around with the code. I've made my own Brainfuck derivative; I made the language homoiconic and from homo and fuarrrk came up with the name masturbation. It's just a toy and I've only written two examples in it, one of which is a quine, but it's not bad to share it here: http://verisimilitudes.net/2017-02-02 If you think deeply about this language, that becomes mental masturbation. >>10807 I really should try IBNIZ at some point. It has its own thread here, although you probably already knew that: >>3026 I eventually want to participate in the demoscene, but the topic of a platform constantly arises. I suppose I should really look at IBNIZ as such a platform, rather than considering a focus solely on older machines or GPUs, as newer demos do. I could go on, but I think instead I'll turn my thoughts into a post for that thread later, actually.
Netrunner · 2019-11-23 00:00
>>10805 Do you consider Hoon to be an esoteric language? Nock certainly is, goddamn.
list · 2020-05-23 03:16
There's not been much mention of Befunge yet: https://esolangs.org/wiki/Befunge I've just revisited it, since Brainfuck is well-known and it had been a while. The inherent homoiconicity here is particularly interesting, and the more abstract operations for convenience places it above other esoteric languages. Reviewing the compilation strategies was insightful; the brute-force approach of compiling every possible interpretation of instructions is actually quite clever, as is the approach of compiling all non-conditional code segments into a single unit. I may write a basic interpreter at some point, if only to have something to boost this thread with. >>15987 I read the Urbit whitepaper not long back and, while there are undeniably some interesting ideas, they're largely wasted on the rest of it. The Nock specification is intended to look profound, but I only ever had any chance at understanding it when reading the whitepaper; that rules which reduce to themselves are infinite loops and considered crashes is interesting. It's practically useless, is neither high-level nor truly low-level, has an arcane indexing scheme with the / class of rules, and is overall bereft of worth. I don't see how anyone could take it seriously, in any way. The concept of jets is interesting, but works so much better for high-level languages relying on idiom usage, such as APL, because APL is still generally high-level and useful enough to have good performance characteristics without jets, and I'd really argue jets aren't an original idea, in addition to this; Nock effectively requires jets, and a lot of them. For anyone ignorant of Nock, there's addition and no subtraction, so subtraction requires incrementing an integer until it's suitably less than that being subtracted; I don't know how Hoon does it, but it likely just increments an appropriate number of times, compares, and increments the running sum to try again, until it reaches the answer. As for Hoon, my eyes were beginning to glaze over by that point and I didn't even try to understand all of the material. One wonders why Hoon wasn't the base, instead, especially since the recommendation is to optimize Nock based on what Hoon and only Hoon uses. Hoon compares its syntax to Lisp, which has a general rule for functions and special forms for special parts of the language, by describing all of its syntax as special forms, which isn't a pleasant thought. It supposedly has an interesting idea to eliminate bothersome indentation common in Lisp and other languages, but the rest of it isn't compelling enough to bother with it.
(λx.xy)z · 2020-09-02 03:38
Why do people care for esoteric languages? Yes , I agree they look cool and are fascinating but once their novelty wears off it's a lot less cool. Do I think this because I haven't wrote in an esoteric language?
Neuromancer · 2020-09-02 03:50
>>20609 Yeah, I think it's mainly just the novelty factor. Maybe learning a couple could produce some kind of deeper insight into computer linguistics, since they usually tend to be incredibly simple and boiled down. But that could be a stretch. You could fiddle around with one and see for yourself, but in my personal experience they're just something to experiment with for a little while until the curiosity is satisfied and then I just joke about them with other programmers or whatever but otherwise never think about them.
(λx.xy)z · 2020-09-02 03:53
>>20611 That does make sense. I compare esoteric languages with some languages like D or B; both aren't used for anything important, but has a weird novelty factor attributed to it simply because it's niche.
Batou · 2020-09-03 02:17
>>20612 >both aren't used for anything important Pretty sure D is used in some important stuff (e.g.weka, funkwerk). So I don't think it's fair to place D next to B.
(λx.xy)z · 2020-09-03 03:18
>>20637 My apologies.
Unspecified · 2020-09-04 05:15
>>20609 From what I know these languages do have their applications sometimes, if that's what you look for. E.g https://github.com/adam-mcdaniel/oakc is what I found recently. To be honest, though, they are not meant to be useful. They are for challenging yourself. Some people like the challenge, you clearly do not and that's fine.
(λx.xy)z · 2020-09-04 15:15
>>20649 But when you're challenged, usually an end result of some kind happens. Whether it being growth as a person or learning something, but I don't see what you would get out of an esoteric language. Yes, you do learn the language, but what else? Are people really just fascinated by them because they're hard and abstract?
Lord Nikon · 2020-09-04 15:57
I never liked brainfuck derivatives, they always felt so samey 99% of the time (no disrespect to the ones that are obviously different, though) I think the fun in these languages is 1. the logic puzzle of making it (creator) 2. the logic puzzle of making it work (programmer) So when you already have stuff that applies to a ton of brainfuck stuff, there's not really any point...
Joey · 2020-10-25 20:57
>>20650 >Are people really just fascinated by them because they're hard and abstract? Yes, not everything has to give you something useful in return in order for you do it. People don't just have hobbies for greater success.