Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 749521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:26:40+00:00 2026-05-14T14:26:40+00:00

According to the specification, Black colour blocks and the edges of the program restrict

  • 0

According to the specification,

Black colour blocks and the edges of the program restrict program flow. If the Piet interpreter attempts to move into a black block or off an edge, it is stopped and the CC is toggled. The interpreter then attempts to move from its current block again. If it fails a second time, the DP is moved clockwise one step. These attempts are repeated, with the CC and DP being changed between alternate attempts. If after eight attempts the interpreter cannot leave its current colour block, there is no way out and the program terminates.

Unless I’m reading it incorrectly, this is at odds with the behaviour of the Fibonacci sequence example here:

(from: http://www.dangermouse.net/esoteric/piet/samples.html)

Specifically, why does the DP turn left at (0,3) ((0,0) being (top, left)) when it hits the left edge? At this point, both DP and CC are LEFT, so, by my reading, the sequence should then be:

  1. Attempt (and fail) to leave the block by going off the edge at (0,4),
  2. Toggle CC to RIGHT,
  3. Attempt (and fail) to leave the block by going off the edge at (0,2).
  4. Rotate DP to UP,
  5. Attempt (and succeed) to leave the block at (1,2) by entering the white block at (1,1)

The behaviour indicated by the trace seems to be that DP gets rotated all the way, leaving CC at LEFT.

What have I misunderstood?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:26:40+00:00Added an answer on May 14, 2026 at 2:26 pm

    Your analysis seems correct; the sample is buggy. The white block at (1,1) should be black. You can verify this by grabbing the sample image and executing it.

    Note that at least three of the interpreters linked from DMM’s page are buggy – Marc Majcher’s is marked as such, Sylvain Tintillier’s traverses and outputs correctly but switches the meaning of in and inn from the spec (this is a bug-free version), and PietDev incorrectly traverses colour blocks.

    EDIT: other white blocks probably also need to be black, e.g. the block at (6,3).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to the DCPU specification , the only time a SET instruction fails is
I understand that according to the HTML specification, it's invalid to add custom attributes
According to the C++11 standard, is the following program well-formed and portable C++? int
According to the ECMAScript specification in section 7.8.1 a NullLiteral is defined as follows:
According W3C XML specification, element is declared in form of : [45] elementdecl ::=
According to the dataset specification , how is element.dataset meant to delete data attributes?
According to CSharp Language Specification. An interface defines a contract that can be implemented
According to the JLS (Java Language Specification): The notion of subsignature is designed to
I've got a strange problem with pthread_cond_timedwait(): according to the POSIX specification it is
According to the specification on http://dev.w3.org/html5/2dcontext/#dom-context-2d-globalcompositeoperation , the lighter composition is A plus B.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.