Live data from Hacker News

TrollScript, an esoteric dialect of Brainfuck.

github.com

31–40 of 49 posts

Re: TrollScript, an esoteric dialect of Brainfuck.

#31
post #8

I can't understand why anyone would choose to use this language. Clearly it is unreadable and I highly doubt this scales. Can somebody give me a good reason for using this on my Facebook clone instead of a more mature language such as PHP, Python or Java? Also, I heard somebody was developing a web framework, Trolls under Bridges. Has anybody heard about this?

I don't think this is a language people use in real life. It's more for testing. When I went for a job interview at Alexander Interactive http://www.alexanderinteractive.com/ one of the tests they gave me was to write a short bit of code in Brainfuck to reverse a string. The string they gave me was "Hello World". I was allowed to look at the Wikipedia page regarding Brainfuck. They had an interpreter running, into wh…

beautiful! 12 minutes :

>,[[>,]]edit: of course it should be

>,[>,]<[.<]

Re: TrollScript, an esoteric dialect of Brainfuck.

#32

Earlier quoted context omitted.

Impossible, or seemingly impossible, interview questions are actually quite useful. It can be quite informative to see how the applicant response to such a situation, and what their "Oh shit, wasn't expecting this" emergency problem solving techniques are.

Which is another way of saying, messing with people is a respectable interview tactic--see how they react to a little nudge.

> Which is another way of saying, messing with people is a respectable interview tactic

I don't think so. Rather it's that technology jobs (and others, surely) often confront frustrating, confounding, and even downright impossible tasks. The ability to identify a situation as impossible or otherwise -- to drill down to the point of conflict -- is prized, as well as the ability to keep it together mentally and keep plugging away.

Re: TrollScript, an esoteric dialect of Brainfuck.

#33
Wow... I never knew a 'Hello World' program could look like this. Mind = Blown.

Trooloolooloolooloolooloolooloolollooooolooloolooloolooloolooooolooloolooloolooloolooloolooloooooloolooloooooloooloolooloololllllooooloololoooooololooolooloolooloolooloololoolooolooloololooooooloololooooloololooloolooloolooloolooloolooloolooloolooloololooooolooolooloololooollollollollollolllooollollollollollollollollloooooololooooolooll.

Re: TrollScript, an esoteric dialect of Brainfuck.

#34

I can't understand why anyone would choose to use this language. Clearly it is unreadable and I highly doubt this scales. Can somebody give me a good reason for using this on my Facebook clone instead of a more mature language such as PHP, Python or Java? Also, I heard somebody was developing a web framework, Trolls under Bridges. Has anybody heard about this?

The various derivatives of Brainfuck are all joke languages.

That said, Brainfuck originally had an at least interesting purpose: The idea was to create a language that could be handled by the smallest possible compiler.

AFAIK a Brainfuck compiler can be implemented in less code than a compiler for any other Turing-complete language.

Still not practical, but interesting nonetheless.

Re: TrollScript, an esoteric dialect of Brainfuck.

#35
post #8

Earlier quoted context omitted.

I don't think this is a language people use in real life. It's more for testing. When I went for a job interview at Alexander Interactive http://www.alexanderinteractive.com/ one of the tests they gave me was to write a short bit of code in Brainfuck to reverse a string. The string they gave me was "Hello World". I was allowed to look at the Wikipedia page regarding Brainfuck. They had an interpreter running, into wh…

beautiful! 12 minutes : >,[[>,]] edit: of course it should be >,[>,]<[.<]

">,[>,]
    pStr++;
    *pStr = getc(stdin); //or wherever
    while *pStr {
      pStr++;
      *pStr = getc(stdin);
    }
    pStr--;
    while *pStr {
      putc (*pStr, stdout)
      pStr--;
    }
It'll print the reverse of a string, but it will also print everything before it until it hits a null byte. I'd add

    
to the beginning to null out the preceding byte and hope it wasn't important.

As silly as brainfuck seems, I could see something like it being used in nanobots (should such a thing ever come to pass), where memory would be at a severe premium.

Re: TrollScript, an esoteric dialect of Brainfuck.

#36
Something inspired me to write a Brainfuck interpreter after reading this so I just put together one in Scheme with a TrollScript compatibility layer. I haven't tested it extensively but it seems to work with everything that I've thrown at it.

https://github.com/Wollw/BrainScript

I wrote it using Guile 1.8.7 and I have no idea if I'm using Guile specific features or not.

edit: Seems it's still a bit broken. The reverse string example in this thread doesn't work for example.

edit2: Well the reverse string example works now. I changed it to read the EOF as equal to 0.

Re: TrollScript, an esoteric dialect of Brainfuck.

#37

Earlier quoted context omitted.

beautiful! 12 minutes : >,[[>,]] edit: of course it should be >,[>,]<[.<]

">,[>,] pStr++; *pStr = getc(stdin); //or wherever while *pStr { pStr++; *pStr = getc(stdin); } pStr--; while *pStr { putc (*pStr, stdout) pStr--; } It'll print the reverse of a string, but it will also print everything before it until it hits a null byte. I'd add to the beginning to null out the preceding byte and hope it wasn't important. As silly as brainfuck seems, I could see something like it being used in nano…

Brainfuck doesn't really save more memory than any other Turing machine language. However, it could save you silicon space in your hypothetical nanobot because everything is an increment -- incrementing can be done by a chain of half adders, which require fewer gates than full adders.

Re: TrollScript, an esoteric dialect of Brainfuck.

#38
post #28

As amusing as I find all this, can you imagine what would happen if one of these took off? I had enough trouble several years ago convincing my boss that we really did need to get a copy of Satan... can you imagine trying to even fill out a PO to order 1000 licenses of Brainfuck with the optional TrollScript extension?

Your trolling is highly inappropriate.

Re: TrollScript, an esoteric dialect of Brainfuck.

#39
post #19

Earlier quoted context omitted.

I think this is a case of premature optimisation. Trolls under Bridges is struggling to hit v1.0 due to the limited memory capacity of trolls, but someone is hard at work on a Node.js implementation of the interpreter. This will allow spawning a new worker process, or "troglodyte", for each request, and will be totally webscale (there will be no unnecessary trolling for events). In addition, there's also a JVM port o…

Re: Node.js implementation my buddy has been hacking on this and he says the benefit of being able to troll on the server the same way you troll the client is a huge benefit.

True, but at the same time it's no match to the TIT (Troll In Time) compiler in cases where every ounce of performance counts.

Re: TrollScript, an esoteric dialect of Brainfuck.

#40
post #36

Something inspired me to write a Brainfuck interpreter after reading this so I just put together one in Scheme with a TrollScript compatibility layer. I haven't tested it extensively but it seems to work with everything that I've thrown at it. https://github.com/Wollw/BrainScript I wrote it using Guile 1.8.7 and I have no idea if I'm using Guile specific features or not. edit: Seems it's still a bit broken. The rever…

Here's one a friend and I did in Prolog last year:

https://github.com/danieldk/brainfuck-pl

Why? Because it can be done. And actually prolog's tracing mechanism makes debugging brainfuck code quite insightful.

Post reply on HN