Hardfish

From Esolang
Jump to navigation Jump to search

Hardfish is a variant of Deadfish but only consists of the commandso, i, r, q and c where i increments, and c performs n/2 iff n % 2 == 0 and 3*n + 1 iff n % 2 == 1. q performs n/3 iff n % 3 == 0 and 2*n + 1 iff n % 3 != 0. The value is reset to zero if it is exactly -1 or 256 after an operation (thus being compatible with Deadfish). r executes every command before it, then is removed from the code. That is icricr is executed as ic ic icic and iqricrq is executed as iqiciqicq. Additionally, the code may not contain the consecutive commands in a row, that is ii, qq, rr and cc are illegal. o outputs the number in some implementation defined way (usually either as a number or as ASCII character).

Some Constants

These have been evolved and thus are not guaranteed to be shortest.

With r

0: 'r'
1: 'i'
2: 'ir'
3: 'iq'
4: 'ic'
5: 'ici'
6: 'irqi'
7: 'qicir'
8: 'icrc'
9: 'icq'
10: 'iqc'
11: 'iciq'
12: 'iqir'
13: 'iqiri'
14: 'icrcr'
15: 'iciqr'
16: 'icr'
17: 'icri'
18: 'cqicir'
19: 'icrcqrq'
20: 'ciqiqr'
21: 'iqcq'
22: 'qiqir'
23: 'ciqr'
24: 'ciqri'
25: 'iqriri'
26: 'cicrcr'
27: 'iqiriq'
28: 'iqrc'
29: 'iqrci'
30: 'cqciri'
31: 'iqirir'
32: 'qiririr'
33: 'icrq'
34: 'qcirc'
35: 'icrqr'
36: 'icrqri'
37: 'iqciriri'
38: 'iqcrcirq'
39: 'icriqr'
40: 'iqiric'
41: 'iricir'
42: 'iriciri'
43: 'qicqcqrq'
44: 'qcicrc'
45: 'cqiqr'
46: 'iciqrc'
47: 'ciqrq'
48: 'ciqrqi'
49: 'icqirqri'
50: 'cirqrqir'
51: 'qiriqr'
52: 'icric'
53: 'cicir'
54: 'ciciri'
55: 'iqririr'
56: 'icqrirqr'
57: 'icqcq'
58: 'icqcqi'
59: 'cqicqr'
60: 'qciqir'
61: 'qciqiri'
62: 'qrqiqrcrc'
63: 'iqirirq'
64: 'iqcqc'
65: 'qcqcir'
66: 'qcqciri'
67: 'cqciqicir'
68: 'qiqcrc'
69: 'qcircq'
70: 'iqcr'
71: 'iqcri'
72: 'cirqri'
73: 'icirqiri'
74: 'icrqrqirc'
75: 'irqcriqr'
76: 'cirqrir'
77: 'iqririci'
78: 'icqricrir'
79: 'rcqiqiqrq'
80: 'icicrc'
81: 'iqiricq'
82: 'icqrir'
83: 'iricirq'
84: 'iciqir'
85: 'iciqiri'
86: 'qcirqiciri'
87: 'cqirqrq'
88: 'qcicr'
89: 'iqrcrc'
90: 'iqrcrci'
91: 'iqcqrq'
92: 'iqcqrqi'
93: 'iqriqr'
94: 'qiqiqir'
95: 'iriqcirq'
96: 'iciqrqir'
97: 'icrcrqiri'
98: 'iqcrqirir'
99: 'iricqrqr'
100: 'icrqc'
101: 'icrqci'
102: 'circqrqic'
103: 'qiriqcqrq'
104: 'qiqrcrc'
105: 'icricq'
106: 'irqcr'
107: 'irqcri'
108: 'qciciri'
109: 'iqrqirir'
110: 'iqrqiriri'
111: 'iqririrq'
112: 'cqiricr'
113: 'qiricir'
114: 'iqcrcir'
115: 'iqcrciri'
116: 'ciqrirqr'
117: 'cqcqirq'
118: 'icriqrc'
119: 'iciqcir'
120: 'iciciqri'
121: 'qirirqiri'
122: 'icrcircrc'
123: 'qciqiriq'
124: 'iricirc'
125: 'cqcicrcr'
126: 'ciciricr'
127: 'ciciricri'
128: 'qcqiqriqrqi'
129: 'iqcqcq'
130: 'qcqcqir'
131: 'cqciqr'
132: 'cqciqri'
133: 'qcqicqiri'
134: 'ircrcqcrc'
135: 'icqcrcirq'
136: 'qiqcr'
137: 'qiqcri'
138: 'iqcqrici'
139: 'irqcqrq'
140: 'cicqcrc'
141: 'iqcrq'
142: 'iqcrqi'
143: 'cirqrq'
144: 'cirqrqi'
145: 'qcirqrici'
146: 'rircqcqiriri'
147: 'qiricrqrq'
148: 'icrqrqir'
149: 'qrqicicrir'
150: 'icrqiriqri'
151: 'cricrqciricqir'
152: 'cqcqcicrc'
153: 'iqriricq'
154: 'qiriqrc'
155: 'iriciqr'
156: 'ircirqir'
157: 'ciqrqicir'
158: 'ircqrcrc'
159: 'rircqrcrci'
160: 'icicr'
161: 'icicri'
162: 'circiri'
163: 'ciciririr'
164: 'qiricrcr'
165: 'icqrirq'
166: 'iqririrc'
167: 'icqririq'
168: 'iqciqrir'
169: 'qcirqirir'
170: 'qrciqrqiciri'
171: 'ciqicirqr'
172: 'icqcqc'
173: 'cqcqcir'
174: 'cqcqciri'
175: 'iqiqiqrqr'
176: 'qirqcrc'
177: 'cicqr'
178: 'iqrcr'
179: 'iqrcri'
180: 'qcicriqi'
181: 'ciqririr'
182: 'riqrcrcqirqc'
183: 'iciciqrircqc'
184: 'icicrcrc'
185: 'ciqriqicir'
186: 'iqiqrcqir'
187: 'iqiqcrqrq'
188: 'ciqriririr'
189: 'qcqirqr'
190: 'iqirirqc'
191: 'cqiqrqrci'
192: 'qciqrqriq'
193: 'qiqcriqiri'
194: 'ciqrqrir'
195: 'ricqirqiqr'
196: 'iqcqcic'
197: 'qciqcrc'
198: 'qciqcrci'
199: 'riciqircicrciq'
200: 'rciqrqricrqr'
201: 'icrqcq'
202: 'icrqcqi'
203: 'circqrq'
204: 'circqrqi'
205: 'iciqrqirir'
206: 'cqrirqrcrcqiciri'
207: 'rcricicrcirq'
208: 'ircqcr'
209: 'qiqrcri'
210: 'ircqcrcqi'
211: 'qcrqcqiciri'
212: 'crcicqcrcr'
213: 'irqcrq'
214: 'cirqrc'
215: 'ciciqr'
216: 'ciqciri'
217: 'qririqriri'
218: 'ciqcirqircqc'
219: 'icicqirqr'
220: 'ciqcirirq'
221: 'crqiriqcrc'
222: 'iqcrcqirc'
223: 'qicrcriqcqrq'
224: 'criciqrirqr'
225: 'cqiricrq'
226: 'icrqrir'
227: 'icrqriri'
228: 'icriqir'
229: 'icriqiri'
230: 'qrcqicirirqic'
231: 'iricqirqrqr'
232: 'iqriricic'
233: 'ciqrirqrq'
234: 'cirqriciriqi'
235: 'iqrcqrq'
236: 'riqriricrc'
237: 'cqiqiqr'
238: 'cqiqiqri'
239: 'iciqcirq'
240: 'iciqcirqi'
241: 'rciqrqirir'
242: 'icricrc'
243: 'icricrci'
244: 'qirircqc'
245: 'qiricqrci'
246: 'iriqiqciri'
247: 'rcqciqicrir'
248: 'cicirqcrc'
249: 'qirqcqr'
250: 'circicr'
251: 'circicri'
252: 'icriqrir'
253: 'qcircirircri'
255: 'iqiqriqrq'

Without r

1: i
2: iqic
3: iq
4: ic
5: iqicq

9: icq
10: iqc

(Shortest) Constants

0 - 
1 - i
2 - ir
3 - iq
4 - ic
5 - ici, irq, cir
6 - irqi, ciri
7 - qicir
8 - icrc
9 - iqr, icq
10 - iqc
11 - iqci, iciq, icqr, qcir, cirq
12 - iqir
13 - iqiri, qirir
14 - icrcr
15 - iciqr
16 - icr
17 - icri
18 - icrcqi, cqicir
20 - ciqiqr
21 - iqcq
22 - iqcqi, qiqir, qcqir
23 - ciqr
24 - iqrir, ciqri
25 - iqriri
26 - cicrcr
27 - iqiriq, irirqr, qiciqr, qirirq
28 - iqrc, icqc
29 - iqrci, icqci, cqcir
30 - cqciri
31 - iqirir
33 - icrq
34 - iqcic, iciqc, icqrc, icrqi, qcirc, cirqc
35 - iqcrc, icriq, icrqr
36 - iqcrci, icriqi, icrqri
39 - icriqr
40 - iqiric, qirirc
41 - iricir
44 - qcicrc
45 - iqiqr, cqiqr
46 - iqiqri, iciqrc, qirqir, cqiqri
47 - ciqrq
48 - ciqrqi
51 - qiriqr
52 - icric
53 - cicir
54 - ciciri
57 - iqrcq, icqcq
58 - iqrcqi, icqcqi, cqcqir
59 - iqrciq, icqciq, cicqrq, cqicqr, cqcirq
60 - qciqir
64 - iqcqc
65 - iqcqci, qcqcir
68 - qiqcrc
69 - iqcicq, iciqcq, icqrcq, icrqiq, qcicqr, qcircq, cirqcq
70 - iqcr
71 - iqcri, cirqr
72 - cirqri
80 - icicrc
82 - icqrir
84 - iciqir
88 - qcicr
89 - iqrcrc, qcicri
91 - iqcqrq
93 - iqriqr
100 - icrqc
101 - icrqci
105 - icricq, qiqcqr
106 - irqcr
107 - irqcri, qcicir, cicirq, cicrir
129 - iqcqcq
131 - cqciqr
136 - qiqcr
137 - qiqcri
141 - iqcrq
142 - iqcrqi, iqrqcr, ciqrqc
143 - iqcriq, cirqrq
160 - icicr
161 - icicri, circir
172 - iqrcqc, icqcqc
177 - cicqr
178 - iqrcr
179 - iqrcri
201 - icrqcq
208 - ircqcr, qiqrcr
213 - irqcrq
214 - iqcric, icrqir, cirqrc
215 - ciqcir, ciciqr
261 - cqirqr
266 - icqcrc
273 - iqcqr
274 - iqcqri
280 - cicqcr
286 - iqcqir
287 - qcirqr
321 - icicrq
352 - qirqcr
357 - iqrcrq, icqcqr
393 - cicrqr
394 - qciqcr
417 - irqcqr
424 - iqcrqc
484 - icricr
532 - icqcr
533 - icqcri
575 - ciqrqr
609 - circqr
628 - qcircr
640 - icqrcr
646 - iqcicr, iciqcr
705 - iqrcqr
789 - ciqcqr
820 - iqcqrc
1065 - icqcrq
1713 - iqcrqr
1828 - icrqcr
2368 - iqcqcr

Often read together with ..

Often read together with /

Interpreter

  • Common Lisp implementation of the Hardfish programming language.