Convey
Convey is a programming language where the program is made like a conveyor belt. More precisely, Convey has 5 things to define a program. The following shows what they are.
List
The list is basically the main piece of the program. Each tick, the list updates to its next state. The next state is dependent on the other parts of the program. It's important to know that the list is 1-indexed.
Gives
Gives is a number that ranges from 0 to 1, and never changes during the running of the program. Each step (not tick), each number in the list's data gets transferred to the next number by the amount of the number gives. This loops around at the end of the list. Here's an example where the number gives is 0.5:
[5,4,3,2]
|
V
[5*(1 - 0.5) + 2*0.5, 4*(1 - 0.5) + 5*0.5, 3*(1 - 0.5) + 4*0.5, 2*(1 - 0.5) + 3*0.5] ->
[2.5 + 1, 2 + 2.5, 1.5 + 2, 1 + 1.5] ->
[3.5, 4.5, 3.5, 2.5] ->
[3,4,3,2]
You might have seen how the simplified next list has no decimals. This is because when you finish getting the next step, the list always has decimals taken away from it. In other words, the entire list is floored after calculations.
Freeze Mode
The Freeze Mode has 5 different states it can be in. But before that, we first need to learn about what freezing actually means. When freezing a number in the list, that number still transfers it's data, but it doesn't lose that data when transferring. If we froze element 1 and set the number gives to 0.5, this is what we would get:
[5,4,3,2]
|
V
[5 + 2*0.5, 4*(1 - 0.5) + 5*0.5, 3*(1 - 0.5) + 4*0.5, 2*(1 - 0.5) + 3*0.5] ->
[5 + 1, 2 + 2.5, 1.5 + 2, 1 + 1.5] ->
[6, 4.5, 3.5, 2.5] ->
[6,4,3,2]
The only effect that happens on the frozen element of the list is only that it receives data, rather than unfrozen elements that partially get taken away and receive data. Now let's get to what Freeze Mode means. Freeze Mode can range from 0 to 5. When 4 <= Freeze Mode < 5, the decimal part of Freeze Mode says which element gets frozen. If Freeze Mode = 4.1, freeze element 1. If Freeze Mode = 4.0, freeze nothing. If Freeze Mode = 4.99, freeze element 99. This goes for every decimal number, but with an exception. If there are leading zeros in Freeze Mode, for example, 4.100, element 1 instead of 100 is frozen because leading zeros are ignored. Now, when 0 <= Freeze Mode <= 3 and Freeze Mode is an integer, the element that gets frozen is dynamic, unlike 4 <= Freeze Mode < 5 which is constant. Back to 0 <= Freeze Mode <= 3, the element that gets frozen is dependent on the Freeze Mode and the list's current state. When Freeze Mode = 0, the minimum of the list is frozen. If there are 2 or more contenders, it picks the leftmost. Freeze Mode = 1 is the same as that except for the minimum instead being the maximum. I'll just list the rest of the Freeze Modes here:
| Mode | Action |
|---|---|
| 0 | Left Min |
| 1 | Left Max |
| 2 | Right Min |
| 3 | Right Max |
| 4 <= Freeze Mode < 5 | Custom |
Color Mode
The Color Mode doesn't really define what the program does, it instead shows how it looks like. You see, every program has a display linked to it. The display just shows the list visually, which can make for some pretty patterns if you just randomize the list. The Color Mode has 3 different states it can be in.
| Mode | Action |
|---|---|
| 0 | Relative Hue and Relative Darkness |
| 1 | Not Relative Hue and Not Relative Darkness |
| 2 | Not Relative Hue and No Darkness |
If you're crazy enough, you might be able to make a 1D game with this. Although, most of the time, it's just a debugger. Still, I encourage you to at least try to make a 1D game.
Steps / Tick
Steps is a number that ranges from 1 to 100. Each tick, the state of the list is updated for you to see. But during that tick, a steps number of steps occur in it. The list is updated every step, but you can only see the changes every tick. This can be used for speeding up the process of program execution.
Must Knows
You need to know these before starting to code. If a number in the list is 0, then it never receives data, nor does it give data. Basically, it's a roadblock. Though, negative numbers can be handled just fine. It's important to know that zeros still count toward minimums. This means that if the freeze mode freezes a minimum number, then it acts like a no freeze when a zero is in the list. Also, if you want to see the list directly and not as a visual, there's text under the display that shows the numbers of the list. But remember, all of the numbers are in scientific notation (What did you think this was? Not an esolang?). The font size never changes, so numbers may overlap, but there is a zoom bar. Because the font size never changes even if you zoom in or out, you can unravel the values of the numbers if you just play with the zoom bar a bit. If you wanted to know how I made this esolang, I made it in Desmos Graphing Calculator. Yes, a graphing calculator, don't ask me how I made an esolang in a graphing calculator. If you've already made programs in Desmos one way or another, golden star for you.
Example Programs
Now that you know what Convey is, let's make some programs in it. The -- means it doesn't matter.
Doubles
list = [1] gives = 1 0 <= freeze mode <= 3 color mode = -- steps = 1
Every tick, this program doubles the number in the list. 1, 2, 4, 8, 16, 32, 64, 128, 256, etc. This works because there's only one element in the list, so it has to be frozen. This means that the number always loops around to add to itself. And because it never loses data, it just adds itself to itself, which is the same thing as multiplying itself by 2.
Fibonacci
list = [1,1] gives = 1 freeze mode = 1 color mode = -- steps = 1
Every tick, the first element of the list becomes the next number in the Fibonacci series. I'll leave this as an exercise for you to figure out how this works yourself. Hint: Freezing can turn numbers that lasts one step into memory that lasts multiple steps.
Counter
list = [5,0,-1,-1,-1,-1,-1] gives = 1 freeze mode = 1 color mode = -- steps = 1
Every tick, the first element of the list counts down by 1. This works because when freeze mode = 1, it freezes the left most maximum. The left most maximum will always be the first element in this case. The first element will always give itself to the 0 next to it, but because zeros can't receive data, the 0 acts like a separator from the 5 and the row of -1's. The -1's are there to decrease the 5 on the other side. Remember that transferring values wrap around at the edge.
Where to Use Convey
The link to the Desmos graph is here: Convey