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\ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \} \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \ } \
O________________________________________I'/O\/O\__u'/O\____i'/O\++p'/O\___/O\_i'/O\__u'/O\___/O\_____i'/O\++p'/O\+++/O\+/O\_______/O\_i'/O\_________________________________________I'/O\_u'/O\++p'/O\____/O\___/O\_i'/O\_u'/O\/O\____i'/O\++u'/O\__u'/O\_________________________________________I'/O\_/O\+/O\+++/O\____/O\___/O\_i'/O\++p'/O\___/O\_i'/O\_u'/O\____/O\____i'/O\+++++++P'L
Try it online!
OK, here we are with plain luck, actually ._.
First cool feature of Fission is that it has 4 commands to create command pointers, AKA atoms: RLDU
, so I have two commands for left and right groups.
Second lucky charm is 2 commands for output !
and O
, which occurs in different groups.
Third time the charm. Both outputting comands output ASCII equivalent of atoms' mass. So I need to change it some how. Lucky me! Both + (+1 mass)
and _ (-1 mass)
are in one group and all needed three $ (+1 energy)
, ~ (-1 energy)
, @ (swap mass and energy)
are in other group.
Also there are mirrors to control atoms in both groups! But I didn't use them in first program
So there is nothing to stop me, but it can't be compact, setting masses step-by-step.
First program
First program consists of only Dz^@$~!V
D create atom, going down
z set its mass to ASCII code of 'z'
^ split atom in 2, dividing their mass. One goes left, second - right
Start can be simplier (just R
), but using divide saves some bytes for first letter.
Atom, that goes left wraps around and encounters V
, which makes him going down and wrapping indefinitely, doing nothing.
Second atom goes rigth and will encounter bunch of repeated patterns @...@!
for each letter to output.
@ swap atom's mass and energy
... increament or decrement energy until it would match desired ASCII code
@ swap again
! print character by atoms mass
Eventually it will encounter V
and share fate of first atom. There is no way to destroy them or halt with left part of keyboard.
Second program
Second comes with its ups and downs. I've got comands to change mass directly, but output command O
destroys atoms, so I need to preserve them somehow.
Program starts on the right from L
with atom going left.
Repeated pattern:
} \
/O\...X'
'
puts next encoutered char's ASCII code in atoms' mass, so code of some X
is stored first, than mass is changed by _
and +
to exact value.
Sometimes X'
is skipped, if it is shorter to use just _
and +
.
Atom comes from the left, mirrors two times and hits }
from left. In this case }
works like cloner, sending two identical atoms up and down. Down atom reflects by mirror and goes left. Up atom wraps, hits same mirror but from below and so reflects right, encountering O
and printing.
At the end last atom meets final O
to be destructed.
6Why H is left hand? – tsh – 2018-03-09T05:52:08.743
1@tsh I wanted to split the keyboard 6/6 (or as close to that as possible) just to try and keep more even number of symbols for each "hand". – Dom Hastings – 2018-03-09T05:56:34.310
8// Maybe i should learn whitespace and back later... – tsh – 2018-03-09T06:16:16.407
@tsh, I guess a whitespace answer is inevitable! Not sure how competitive it would be though! Perhaps I should have addressed that, too late now! – Dom Hastings – 2018-03-09T06:25:02.567
Is it OK if the program has other (non-whitespace) output too, as long as it includes the requested texts? – Grzegorz Oledzki – 2018-03-09T12:12:26.963
@GrzegorzOledzki I don't think any other output is acceptable, but I'm intrigued on what the output would be in your proposed solution! – Dom Hastings – 2018-03-09T12:44:28.133
@DomHastings, I am wondering if I can
throw()
orraise()
some exception, etc. – Grzegorz Oledzki – 2018-03-09T13:09:21.957@GrzegorzOledzki you can exit via error, but in a full program the result must be on
STDOUT
. Hope that helps! – Dom Hastings – 2018-03-09T13:15:53.280