Jump to content

Talk:Whitespace (programming language)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by R.e.s. (talk | contribs) at 01:50, 20 September 2015 (Does the Hello World actually works?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputing Unassessed
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
???This article has not yet received a rating on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.

Template:Findsourcesnotice

Color Scheme

I'm red-green colorblind, is there any way that the colors could be changed to stand out for someone like me?

Thanks,

Centrisian (talk) 20:51, 30 August 2008 (UTC)[reply]

This any better?

--Kizor 22:26, 30 August 2008 (UTC)[reply]

This prints "Hello World!". Note that whitespace characters have been given differently coloured backgrounds since, in practice, they are invisible. (Space, Tab)

   
   	  	   
		    	
   		  	 	
		    	 
   		 		  
		    		
   		 		  
		    
	  
   		 				
		    	 	
   	 		  
		    		 
   	     
		    			
   			 			
		  
  	   
   		 				
		    	  	
   			  	 
		    	 	 
   		 		  
		    	 		
   		  
	  
		    		  
   	    	
		    		 	
   		 	
		    			 
   	 	 
		    				
    
	
	     
empty-line
    	
empty-line
 			 
empty-line
	  	 
	
     	
	   
empty-line
  	
empty-line
   	 
empty-line
empty-line/EOF


A lot better. if this could be implemented, that would be great. Also, sorry for being awol so long for a reply. Centrisian (talk) 03:21, 2 March 2009 (UTC)[reply]

Whitespace should be white: that's surely the whole point. Showing it in pink and lilac is cheating. Mhkay (talk) 15:04, 2 March 2012 (UTC)[reply]

Markers

I've added in markers to separate the characters, in the hope of improving clarity - I'm not sure whether it's actually turned out better or not; if people disagree then please do give reasons and revert. --82.70.156.254 (talk) 01:08, 21 October 2009 (UTC)[reply]

Personally, I don’t think they’re necessary since it’s already highlighted… and I’m not sure anything could help this language’s clarity. Still, they don’t do any harm since the interpreter ignores them. But here’s one vote against them, which makes it a tie. —Frungi (talk) 19:17, 18 February 2010 (UTC)[reply]

Although not as "pretty", the marker version makes it clearer how many Spaces (or Tabs) there are when they're adjacent. It also makes it easier for a reader to obtain directly usable source code by copy/paste (in edit mode). However, if we're going to use markers, an alternative is to use markers that identify the characters they mark; e.g. use S,T,L as "comments" to identify Space,Tab,Linefeed respectively. I just revised the example to do this, and also made the source code available at ideone. — r.e.s. (talk) 03:14, 6 April 2012 (UTC)[reply]
The STL-commented program can be then explained in normal text fashion by referring to just the "identifiers" S, T, L (now ignoring whitespace!):
SS STSSTSSSL TLSS    ;push +1001000 (72 in decimal) onto the stack and output the top-of-stack as a character ('H')
SS STTSSTSTL TLSS    ;push +1100101 (101 in decimal) onto the stack and output the top-of-stack as a character ('e')
SS STTSTTSSL TLSS    ;etc.
SS STTSTTSSL TLSS
SS STTSTTTTL TLSS
SS STSTTSSL TLSS
SS STSSSSSL TLSS
SS STTTSTTTL TLSS
SS STTSTTTTL TLSS
SS STTTSSTSL TLSS
SS STTSTTSSL TLSS
SS STTSSTSSL TLSS
SS STSSSSTL TLSS     ;push +100001 (33 in decimal) onto the stack and output the top-of-stack as a character ('!')
LLL                  ;end the program
I don't know if it would be appropriate to include such an explanation in the article, though. (?) — r.e.s. (talk) 11:58, 6 April 2012 (UTC)[reply]
I revised again to include the best of both worlds -- identifying comments (S,T,L) and color coded html. Each Space, Tab, or Linefeed character in the source code is preceded by the identifying comment "S", "T", or "L", respectively. — r.e.s. (talk) 12:57, 7 April 2012 (UTC)[reply]

"This article does not cite any references or sources."

This is an incorrect statement, although it may have been correct when it was added.

What is the process for removing it? —Preceding unsigned comment added by 65.166.54.44 (talk) 16:57, 7 April 2010 (UTC)[reply]

Does the Hello World actually works?

I copy/pasted the code to ideone.com. Some characters not visible in the code were printed there, but since they're supposed to be ignored, I let them there. The interpreter threw out this error: "Fail: user error (Can't do Dup)". — Preceding unsigned comment added by 189.77.168.10 (talk) 13:45, 15 September 2011 (UTC)[reply]

Rather than try to debug that code, I replaced it with a fresh example that prints "Hello, world!". This version includes "comments" (S,T,L) to identify each whitespace character. (See the earlier discussion, and the code available at ideone).— r.e.s. (talk) 12:26, 6 April 2012 (UTC)[reply]
This example needs to be given much deeper comments, with an explanation of what each line does. --NeatNit (talk) 21:15, 17 September 2015 (UTC)[reply]
The commented version is already given above in the talk section on "Markers", and there is also a link given there to an online interpreter that proves the program works as advertised. — r.e.s. (talk) 01:50, 20 September 2015 (UTC)[reply]

Purpose?

Is there a point to this language or is it just sort of a clever trick/joke? — Preceding unsigned comment added by 108.221.57.236 (talk) 17:56, 11 November 2012 (UTC)[reply]

Well, it does say under the History section that it was a facetious suggestion. So yes, I think it’s just a novelty. —Frungi (talk) 01:16, 26 April 2013 (UTC)[reply]
It seems that it started as "just" a joke, but it then rapidly developed into a "real" language (albeit of the experimental, academic variety). A small community has developed around Whitespace beyond just the original authors, producing alternative compilers, interpreters, and even an assembler (for those who don't want to program directly in the "machine language" of spaces and tabs). — Preceding unsigned comment added by 99.146.149.141 (talk) 18:35, 5 June 2013 (UTC)[reply]
This page would be a vital resource to any programmer who encountered a Whitespace program before having heard of it. 164.119.77.244 (talk) 15:15, 12 September 2013 (UTC)[reply]