Bug detected!

L does not respect BREAK! Easy fix, will appear in beta3, which I’ll publish after some more testing.

Also, the KILL patch doesn’t appear to be working. :face_with_raised_eyebrow:

Edit: the KILL patch is missing from my repository entirely. Guess I blasted it on accident. Fix in beta3.

Beta4 will happen, so I can add trivial operators at that point.

Now, for something nontrivial: beta3 has been released! (Note: Turtle’s not working right. :frowning: Next build tomorrow.)

  • Fixed KILL
  • Fixed L + BREAK
  • Almost fixed documentation
  • Added the Turtle operator (@)
  • Did not add any docs
  • Commented some code

Turtle ops:

@ get/set
@X and @Y get/set
@POS x y
@HOME x y (with no getters)
@FENCE x1 y1 x2 y2
@BOUNCE, @BUMP, and @WRAP
@DIR (degrees)
@SPEED (cells)
@STEP forward at the current speed + direction
@FWD x and @REV x
@TURN 
@UP x, @DOWN x, @LEFT x, @RIGHT x

Send me your best Rene clones or covers of the Talk Talk song Renee.

6 Likes

Bah, somewhere along the line, I broke FENCE, seriously limiting the turtle’s behaviour. :frowning:

Bah! New build in 24 hours or so.

(Man, this releasing things is hard!)

@sliderule, are you storing your zip files in the git repo?

If so, you probably want to stop doing that, as those zip files are kept forever inside the repo. Not such an issue now, but git repos get unhappy when they get too big (operations starting taking a long time, and every clone will need to bring down those redundant zips).

You’ve got 2 options,

  • tag the release, then you can upload the file to GitHub in the releases tab
  • just upload the zip file here (drag an drop it on the message window, or click the upload button in the toolbar).

Also to change the version number, you don’t need to edit the Makefile, just edit TELETYPE_VERSION in src/teletype.h

Hope that’s helpful!

Nice work!

Would love to help with testing but I’m travelling sans computer for a few weeks.

I’ll git filter-branch before I PR (edit:merge), shouldn’t be a problem?

It’s already set to 2.1.0 but I replaced the git dirty flag with the beta tag so that it’s easily recognizable and occupies the same space in the array. I’ll switch it back before the PR.

1 Like

Writing test code takes a lot of time it seems, but it is actually helping me find bugs that I didn’t know were there yet. Thank you @sam for setting up the test framework. :+1:

Also, it’s saving wear on the USB port on my teletype. :slight_smile:

Being able to use gdb again is a godsend!

2 Likes

Great work!!
next week I’m going to test new ops on my TT.

Well, after the disaster that was adding the turtle operator without writing a single test for it, I added tests for some of the more complex facets of the turtle’s operation.

What should have been released: beta4.

Not only have I written some tests, I’ve actually spent a couple of hours writing scripts and testing, so it should be pretty funcitonal.

The turtle now behaves mostly properly, with the exception that BOUNCE should be wavefolding.

Notes:

  • UP / DOWN / LEFT / RIGHT now N / S / W / E
  • FX1, FY1, FX2, FY2 individual get / set for fence
  • HX, HY individual get/set for home
  • Rounding (?) errors with non-cardinal DIRs (i.e.: not divisible evenly by 90)
2 Likes

You think I’d learn to fully test everything, but to be honest I was tired of writing test cases after 30 of them.

Bug detected!

  • BOUNCE doesn’t work correctly at FX2 or FY2
  • This isn’t so bad because BOUNCE will be getting an update to automatically turn around when it hits a wall and will require new logic anyways.
  • Enjoy WRAP and BUMP in the meantime.
1 Like

Full overhaul of turtle in beta5 soon with clearer usage per @tehn 's design. Better tested but still not perfect. One more nasty bug to quash. A literal corner case: bouncing directly off the corner. Probably rounding related.

3D printer kit arrives tomorrow, plus a maintenance window Tuesday morning, so it may be a day or two.

So many test cases…

1 Like

Currently testing beta 4, but i’m a bit rusted with my TT. Seems to work ok, but i need further testing. The ability to see the turtle in the pattern screen would make the tests so much easier. For now i stick to a 4x4 square with values set to 1, 2, 3…16 to control the behavior but a “@” would make it easier !
Thanks so much for the work !

1 Like

Little René Patch with Turtle : https://www.instagram.com/p/BZLlmtDlNDB/?taken-by=chapelierfoumusic

4 Likes

:+1: that should work

That dirty flag is pretty useful…


Have you got the PDF stuff sorted? If it’s still causing you problems I should be able to look into it this week.

I’m only doing it for the beta. I want to be able to identify the build easily.

Negative. I got distracted by reptiles :wink:

Pretty sure it’s just my build tools, so maybe you want to try building from my fork and see if it works on your system?

No 3D printer today, so beta5 (zip, hex) is ready. Here’s the syntax:

Most things appear to be working, but I might eat those words.

Caveats:

  • Familiarize yourself with SPEED being 100 units between cells in each axis. It permits you to set speeds proportional to your angle to facilitate predictable behaviour. Trig functions are absent on the Teletype so it’ll be hard to do that dynamically.

  • Position is tracked fractionally. This permits us to have meaningful movement in more than 8 directions. There is no access to the underlying fractional data, but it carries.

  • When you set your position, you set it to the center of the cell. Therefore, to align with the center

    @Y @Y; @X @X

  • The fence might behave unexpectedly in terms of time spent on a cell before reflection in bounce mode. This is because the turtle travels the distance of the cell twice, as the fence is on the other side of the cell. This can be changed if there’s a preferable way. I could put the fence halfway.

  • I’ve changed and read the code so much that I’ve lost faith in it. Despite using ddd to track things down and increase my confidence in every line of code, the effect has been the opposite. I encourage an enterprising soul to investigate turtle_normalize_position and turtle_step and tell me how I did.

  • It was a mistake to add this feature to the beta, for obvious reasons and by definition. I will clean up the rest of the easy ops and call it a day on code additions bar bug fixes. The next alpha test will be handled differently. :slight_smile:

  • I will continue to write tests to hunt for bugs in the existing feature set that I am familiar / involved with in the meantime. Let’s call beta6 a weekend thing at this point. I need the turtle to get his legs for a bit, so I can work out the kinks until then.

4 Likes

Does it mean the turtle is moving by default ? (Edit, no way, sorry)

This also made me think of a cool feature request : what about interpolating the carried value with the neighbor values when the turtle is “between” to cells ?

You’re 5 hours late!

And you’d be interpolating between up to 4 cells.

2 Likes

Amazing ! Many thanks !

As nobody has downloaded it yet, I was able to ninja edit in a couple of bug fixes into beta5.

  • CTRL-F1 to CTRL-F8 enable/disable scripts
  • Script number is shaded in editor when muted
  • CTRL-F9 en/disables the metro (is there already a keystroke for this?)
  • I forgot to shade the M when disabled
  • KILL now clears stack
  • KILL now disables metro
  • Updated KILL documentation
3 Likes