Questions tagged [whitespace-language]

Use this tag for questions related to Whitespace, the esoteric programming language.

Whitespace is an esoteric programming language developed in 2003 by Edwin Brady and Chris Morris. The entire language consists of only three characters: space, tab, and newline. You can test Whitespace code online at compileonline. There is also an Esolang page for Whitespace.

10 questions
22
votes
1 answer

How to read character in whitespace language

I am having tough time to understand how characters reading works in Whitespace. I was able to run Hello World program. But now I try to read just one character from user and then print it on standard output. I am getting no errors, everything…
kukis
  • 4,489
  • 6
  • 27
  • 50
5
votes
1 answer

What does the "Duplicate the top item on the stack" mean in Whitespace language?

I am trying to implement a Whitespace interpreter for fun, currently I am following this tutorial to learn its syntax. The syntax looks easy, but I don't understand what "Duplicate the top item on the stack" mean. What does that mean? does it mean…
Alaya
  • 3,287
  • 4
  • 27
  • 39
5
votes
1 answer

ifeq/ifne JVM opcode always branches

[TL;DR: the following JVM bytecode instructions seems not to work: iconst_0 istore 6 ...sequential iinc 6 1 jsr L42 ... ; L42 iload 6 ifeq L53 ; Always branches!!! astore 8 iinc 6 -1 ; L53 LDC 100 ISUB ; ERROR, returnAddress is at the top of the…
Bruno Kim
  • 2,300
  • 4
  • 17
  • 27
4
votes
1 answer

How to display and write all distinct white space and control characters in VS Code (or other text editor)

I would like to be able to see all whitespace and control character explicitly in my text editor. Example Hi world! This is a new line! (pretend the new line is actually on a new line) as something like Hi\sworld!\nThis\sis\sa\snew\sline!. Or…
3
votes
1 answer

Is CTRL+M the same as Enter?

So, I've recently gotten into Whitespace programming, and one of the characters is listed as [LF]. Not knowing what this was(yes, yes, yell at me all you want for being an idiot), I looked it up and found on Wikipedia that it could be typed using…
2
votes
1 answer

How to check whether a string is substring of another in WhiteSpace?

I was going through problems on SPOJ, when I saw this SBStr1. I learnt a little bit of WhiteSpace language, but I could reach only up to loops. Can anyone please help me on how to check if a string has another string as a substring in WhiteSpace ?
ABcDexter
  • 2,751
  • 4
  • 28
  • 40
1
vote
1 answer

Whitespace (esoteric programming language) Sort Algorithm

I want to implement a sort algo in Whitespace. As you know whitespace only uses stack and heap. Any idea which sort algo can be easily implemented?
proGam
  • 11
  • 1
1
vote
1 answer

Whitespace - Not printing second character

s = space; l = line break; t = tab ssstsssttsl tl ssl sssttsssstl tl ssl This only prints F and not a. I am not very certain about stacks and it is probably something to do with that.
Bananao
  • 21
  • 4
0
votes
1 answer

How is this simple add numbers and output code doesn't work? (Whitespace language)

I want the code to output 5, which is got from 2+3 (inputted from stack manually) [space][space][space][tab][space] push 2 [space][space][space][tab][tab] push 3 [tab][space][space][space] add together [tab][lf] [space][tab] output number But it…
Cheng Adrian
  • 177
  • 10
0
votes
1 answer

WhiteSpace programming language multipliction two numbers

how can I multipiction two numbers in WhiteSpace? for example input: 32 3 output: 96 I searched tutorial for this, but i don't found this