6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 6:51 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: OT: Forth haikus
PostPosted: Tue Oct 21, 2014 1:25 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
To be treated, perhaps, as an educational resource:
http://forthsalon.appspot.com/

See also
http://repl.it/languages/Forth
where you can run Forth in your browser, and share your code too.


Top
 Profile  
Reply with quote  
 Post subject: Re: OT: Forth haikus
PostPosted: Tue Oct 21, 2014 1:39 pm 
Offline

Joined: Tue Jan 07, 2014 8:40 am
Posts: 91
Unfortunately, I see:

Quote:
Unsupported Browser

Unfortunately, this site requires a browser that supports the <canvas> tag and Javascript.

You will need to install one of these browsers to use this site:
Google Chrome
Firefox
Safari


Which prompts me to compose the following:

Quote:
Unsupported User

Unfortunately, this user requires a web site that supports alternative browsers, such as Opera.

You will need to write standards-compliant web code to interest this user.
World Wide Web Consortium
AnyBrowser.org

_________________
Because there are never enough Forth implementations: http://www.camelforth.com


Top
 Profile  
Reply with quote  
 Post subject: Re: OT: Forth haikus
PostPosted: Tue Oct 21, 2014 1:40 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
That is unfortunate. Does it apply to both?


Top
 Profile  
Reply with quote  
 Post subject: Re: OT: Forth haikus
PostPosted: Tue Oct 21, 2014 2:56 pm 
Offline

Joined: Tue Jan 07, 2014 8:40 am
Posts: 91
Oh, sorry, it only applies to the forthsalon.appspot.com page. The repl.it page works fine.

_________________
Because there are never enough Forth implementations: http://www.camelforth.com


Top
 Profile  
Reply with quote  
 Post subject: Re: OT: Forth haikus
PostPosted: Tue Oct 21, 2014 3:08 pm 
Offline

Joined: Tue Jan 07, 2014 8:40 am
Posts: 91
Here's a haiku for them.

"Browse with only this,
all else will be rejected."
The concept is missed.

_________________
Because there are never enough Forth implementations: http://www.camelforth.com


Top
 Profile  
Reply with quote  
 Post subject: Re: OT: Forth haikus
PostPosted: Tue Oct 21, 2014 3:10 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
For info, from the "about" page of the haiku site:
Quote:
A Forth Haiku is an attempt to mix mathematics, art, and the Forth programming language. It resembles a texture shader, however, the emphasis is on direct expression in the resulting image.

The Forth program describing each Haiku is run once per pixel over a square image. Forth cells are floating point. Conditions return 1 instead of -1. The position is available from the words x and y, which range from 0 to 1, which the origin in the lower left hand corner. The haiku returns the desired color in (red, green, blue, alpha), with alpha being topmost on the stack. If the stack has less than 4 items default values are assumed: red:0, green:0, blue:0, alpha:1.


A sample program, called "Disco:"
Code:
x 9.4 * sin
y 9.4 * sin
t 4 * sin
* *
dup t 2 * sin *
dup t 3 * sin *


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: