Comments (2)
This depends on some refactoring as part of #40. Will defer until then.
from hs-logo.
Here is an example of an interesting way to call the for
library procedure taken from the Logo 15-word challenge.
for [i 0 220 sin :i/1000] [fd :i bk :i rt 41]
One interesting thing about the statement above is that the value :i/1000
evaluates to 0 and hence the program should go into an infinite loop. It is unclear how it generates the figure as shown on the page.
Moreover, this is in violation of the the Berkeley Logo spec for the for
library procedure:
FOR forcontrol instructionlist
The first input must be a list containing three or four members: (1) a word, which will be used as the name of a local variable; (2) a word or list that will be evaluated as by RUN to determine a number, the starting value of the variable; (3) a word or list that will be evaluated to determine a number, the limit value of the variable; (4) an optional word or list that will be evaluated to determine the step size. If the fourth member is missing, the step size will be 1 or –1 depending on whether the limit value is greater than or less than the starting value, respectively.
The best way to resolve this seems to be to obey the spec, and modify the statement above appropriately.
for [i 0 220 [sin :i/1000]] [fd :i bk :i rt 41]
However the problem of infinite looping remains.
from hs-logo.
Related Issues (20)
- parser barfs if '[' token is not separated by a space from the next token HOT 1
- Make a hakyll page containing all examples and the corresponding PNG output HOT 1
- Fix stack overflow issues HOT 4
- Use IO Monad inside ParsecT to allow pr and random builtins HOT 1
- Bug in expression evaluation HOT 2
- Implement escaping
- Make a list of all primitives that arent implemented HOT 1
- Figure out the ordering of examples
- Write up simple installation instructions for dev
- Avoid using ParsecT based Evaluator
- Add source control locations for each token
- Bad output
- Evaluation logic is awkward
- Fix warnings in test code HOT 1
- Add a show instance for Turtle and a debug traceTurtle function HOT 1
- Fix deprecation warnings in site Hakyll code
- Make an OS X Package
- Fix test failure in Travis build due to too few test cases
- Update documentation
- Hackage version depends on old base (>=4.2 && <4.6) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hs-logo.