Repository navigation
Expand file tree
/
Copy pathguidelines.html
More file actions
1848 lines (1734 loc) · 86.2 KB
/
Copy pathguidelines.html
File metadata and controls
1848 lines (1734 loc) · 86.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../ioccc.css">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>The International Obfuscated C Code Contest</title>
<link rel="icon" type="image/x-icon" href="../favicon.ico">
<meta name="description" content="IOCCC Guidelines">
<meta name="keywords" content="IOCCC, guidelines, Guidelines">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/gen-top-html.sh -->
<!-- The content of main section of this web page came from: next/guidelines.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: next/guidelines.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: next/guidelines.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: next/guidelines.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/topbar.default.html -->
<div class="theader">
<nav class="topbar">
<div class="container">
<div class="logo">
<a href="../index.html" class="logo-link">
IOCCC
</a>
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Entries
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../years.html" class="sub-item-link">
Winning entries
</a>
</div>
<div class="outfit-font">
<a href="../authors.html" class="sub-item-link">
Winning authors
</a>
</div>
<div class="outfit-font">
<a href="../location.html" class="sub-item-link">
Location of authors
</a>
</div>
<div class="outfit-font">
<a href="../bugs.html" class="sub-item-link">
Bugs and (mis)features
</a>
</div>
<div class="outfit-font">
<a href="../faq.html#fix_an_entry" class="sub-item-link">
Fixing entries
</a>
</div>
<div class="outfit-font">
<a href="../faq.html#fix_author" class="sub-item-link">
Updating author info
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
Status
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../news.html" class="sub-item-link">
News
</a>
</div>
<div class="outfit-font">
<a href="../status.html" class="sub-item-link">
Contest status
</a>
</div>
<div class="outfit-font">
<a href="../next/rules.html" class="sub-item-link">
IOCCC rules
</a>
</div>
<div class="outfit-font">
<a href="../next/guidelines.html" class="sub-item-link">
IOCCC guidelines
</a>
</div>
<div class="outfit-font">
<a href="../markdown.html" class="sub-item-link">
Markdown guidelines
</a>
</div>
<div class="outfit-font">
<a href="../SECURITY.html" class="sub-item-link">
Security policy
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
FAQ
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../faq.html" class="sub-item-link">
Frequently asked questions
</a>
</div>
<div class="outfit-font">
<a href="../quick-start.html#enter" class="sub-item-link">
Enter the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="../faq.html#compiling" class="sub-item-link">
Compiling entries
</a>
</div>
<div class="outfit-font">
<a href="../faq.html#running_entries" class="sub-item-link">
Running entries
</a>
</div>
<div class="outfit-font">
<a href="../faq.html#help" class="sub-item-link">
How to help
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
About
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../index.html" class="sub-item-link">
Home page
</a>
</div>
<div class="outfit-font">
<a href="../social.html" class="sub-item-link">
IOCCC social media
</a>
</div>
<div class="outfit-font">
<a href="../about.html" class="sub-item-link">
About the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="../judges.html" class="sub-item-link">
The judges
</a>
</div>
<div class="outfit-font">
<a href="../thanks-for-help.html" class="sub-item-link">
Thanks for the help
</a>
</div>
<div class="outfit-font">
<a href="../contact.html" class="sub-item-link">
Contact us
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="header-mobile-menu">
<noscript>
<a href="../nojs-menu.html" class="topbar-js-label">
Please Enable JavaScript
</a>
</noscript>
<button id="header-open-menu-button" class="topbar-mobile-menu">
<img
src="../png/hamburger-icon-open.png"
alt="hamburger style menu icon - open state"
width=48
height=48>
</button>
<button id="header-close-menu-button" class="hide-content">
<img
src="../png/hamburger-icon-closed.png"
alt="hamburger style menu icon - closed state"
width=48
height=48>
</button>
<div id="mobile-menu-panel" class="hide-content">
<div class="mobile-menu-container">
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Entries
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../years.html">
Winning entries
</a>
<a class="mobile-submenu-item" href="../authors.html">
Winning authors
</a>
<a class="mobile-submenu-item" href="../location.html">
Location of authors
</a>
<a class="mobile-submenu-item" href="../bugs.html">
Bugs and (mis)features
</a>
<a class="mobile-submenu-item" href="../faq.html#fix_an_entry">
Fixing entries
</a>
<a class="mobile-submenu-item" href="../faq.html#fix_author">
Updating author info
</a>
<a class="mobile-submenu-item" href="../thanks-for-help.html">
Thanks for the help
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Status
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../news.html">
News
</a>
<a class="mobile-submenu-item" href="../status.html">
Contest status
</a>
<a class="mobile-submenu-item" href="../next/rules.html">
IOCCC rules
</a>
<a class="mobile-submenu-item" href="../next/guidelines.html">
IOCCC guidelines
</a>
<a class="mobile-submenu-item" href="../markdown.html">
Markdown guidelines
</a>
<a class="mobile-submenu-item" href="../SECURITY.html">
Security policy
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
FAQ
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../faq.html">
Frequently asked questions
</a>
<a class="mobile-submenu-item" href="../quick-start.html#enter">
Enter the IOCCC
</a>
<a class="mobile-submenu-item" href="../faq.html#compiling">
Compiling entries
</a>
<a class="mobile-submenu-item" href="../faq.html#running_entries">
Running entries
</a>
<a class="mobile-submenu-item" href="../faq.html#help">
How to help
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
About
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../index.html">
Home page
</a>
<a class="mobile-submenu-item" href="../social.html">
IOCCC social media
</a>
<a class="mobile-submenu-item" href="../about.html">
About the IOCCC
</a>
<a class="mobile-submenu-item" href="../judges.html">
The judges
</a>
<a class="mobile-submenu-item" href="../contact.html">
Contact us
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
headerOpenMenuButton.addEventListener("click", () => {
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
headerOpenMenuButton.classList.add("hide-content");
headerCloseMenuButton.classList.remove("hide-content");
headerCloseMenuButton.classList.add("topbar-mobile-menu");
mobileMenuPanel.classList.remove("hide-content");
mobileMenuPanel.classList.add("topbar-mobile-panel");
});
headerCloseMenuButton.addEventListener("click", () => {
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
headerCloseMenuButton.classList.add("hide-content");
mobileMenuPanel.classList.add("hide-content");
mobileMenuPanel.classList.remove("topbar-mobile-panel");
headerOpenMenuButton.classList.add("topbar-mobile-menu");
headerOpenMenuButton.classList.remove("hide-content");
});
</script>
<!-- END: this line ends content from: inc/topbar.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<a href="../2011/zucker/index.html">
<img src="../png/ioccc.png"
alt="IOCCC image by Matt Zucker"
width=300
height=110>
</a>
<h1>The International Obfuscated C Code Contest</h1>
<h2>IOCCC Guidelines</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.empty.html -->
<div class="navbar">
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.ioccc.org%2Fnext%2Fguidelines.html">✓</a>
</div>
<!-- END: this line ends content from: inc/navbar.empty.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<div class="content" id="content">
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: next/guidelines.md -->
<h1 id="th-international-obfuscated-c-code-contest-official-guidelines">29th International Obfuscated C Code Contest Official Guidelines</h1>
<p class="leftbar">
Copyright © 2025 Leonid A. Broukhis and Landon Curt Noll.
</p>
<p>All Rights Reserved. Permission for personal, education or non-profit
use is granted provided this copyright and notice are included in its
entirety and remains unaltered. All other uses must receive prior
permission in writing by <a href="../contact.html">contacting the Judges</a>.</p>
<h1 id="guidelines-version">Guidelines Version</h1>
<p class="leftbar">
These Guidelines are version <strong>29.08 2025-12-02</strong>.
</p>
<p class="leftbar">
The <span style="font-size:28px;"><b>|</b></span> symbol
indicates an <strong>change</strong> from the previous IOCCC.
</p>
<p class="leftbar">
Because the <strong>IOCCC29</strong> was a substantial rewrite, only <strong>important
changes</strong> from <strong>IOCCC28</strong> have been marked.
</p>
<h1 id="guidelines">Guidelines</h1>
<p>These <a href="guidelines.html">Guidelines</a> are <strong>hints</strong> and <strong>suggestions</strong>,
<strong>NOT</strong> <a href="rules.html">Rules</a>.</p>
<p>While submissions that violate the <a href="guidelines.html">Guidelines</a> are
allowed, submissions that remain within the
<a href="guidelines.html">Guidelines</a> are preferred.</p>
<p>You are encouraged to review the following <a href="../faq.html">FAQs</a>:</p>
<ul>
<li><p><a href="../quick-start.html#enter">How to enter the IOCCC</a></p></li>
<li><p><a href="../faq.html#mkiocccentry">Obtaining and compiling the most recent mkiocccentry
toolkit</a></p></li>
<li><p><a href="../next/submit.html">How to upload your submission</a></p></li>
</ul>
<p>While the contest is <strong><a href="../faq.html#open">open</a></strong>, you may modify your
previously uploaded submission by rebuilding your submission with the
<a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry toolkit</a>, and
then re-uploading it to <strong>the same slot number</strong> on the <a href="https://submit.ioccc.org">submit
server</a>.</p>
<p>Be sure to read the <a href="rules.html">Rules</a>.</p>
<div id="guideline1">
<div id="guideline1-c">
<h1 id="guidelines-for-rule-1---c-program">Guidelines for <a href="rules.html#rule1-c">Rule 1 - C program</a></h1>
</div>
</div>
<p class="leftbar">
While you submission <strong>MUST</strong> be a C program, there is nothing wrong if
your <code>prog.c</code> file happens to also be a code for another language, say
an interpreter of JavaScript.
</p>
<p class="leftbar">
We would prefer if you do not use <code>#include</code> statements just to include
lots of data to circumvent <a href="rules.html#rule2-size">Rule 2 - Size
restrictions</a> in an excessive way. This is what
they invented <code>fopen(3)</code> for. :-)
</p>
<p class="leftbar">
We would prefer if you do not require lots and lots of implicit defines
on the C compiler command line (i.e., lots of <code>-Dfoo</code>, and
<code>-Dcurds=whey</code> style command line args to the C compiler in the
Makefile) to get around the <a href="rules.html#rule2-size">Rule 2 - Size
restrictions</a> in an excessive way.
</p>
<p class="leftbar">
Some use of <code>#include</code> statements (i.e. <code>-include stdio.h</code>) and/or
implicit <code>#define</code>s (i.e. <code>-Dfoo=bar</code>) on the C compiler command line
is perfectly reasonable..
</p>
<p class="leftbar">
As a guide, consider the level of <code>#include</code> statements and/or implicit
defines on the C compiler command line that are found in <a href="https://www.ioccc.org/years.html">winning
Entries</a>, and try to <strong>NOT</strong> set a
new record.
</p>
<p class="leftbar">
If you believe you need to significantly abuse <code>#include</code> statements
and/or implicit defines on the C compiler command line, then try to
make a case for why in your submission’s <code>remarks.md</code> file: maybe the
Judges won’t reject your submission.
</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline2">
<div id="guideline2-size">
<h1 id="guidelines-for-rule-2---size-restrictions">Guidelines for <a href="rules.html#rule2-size">Rule 2 - Size restrictions</a></h1>
</div>
</div>
<p class="leftbar">
You should pay attention to our observations on <a href="../2024/index.html#code-size-and-rule-2">code size and Rule 2
remarks for IOCCC28</a>.
</p>
<p>Your submission must satisfy <strong>BOTH</strong> the
<a href="rules.html#rule2a-gross-size">Rule 2a - Gross Size</a>
<strong>AND</strong>
<a href="rules.html#rule2b-net-size">Rule 2b - Net Size</a> rules.</p>
<p>To check your code against
<a href="rules.html#rule2-size">Rule 2 - Size restrictions</a>, use the
<code>iocccentry(1)</code> tool. For example:</p>
<pre><code> iocccsize prog.c</code></pre>
<p>The <code>iocccsize(1)</code> algorithm can be summarized as follows:</p>
<blockquote>
<p>The size tool counts most C reserved words (keyword, secondary, and
selected preprocessor keywords) as 1. The size tool counts all other
bytes as 1 excluding ASCII whitespace, and excluding any ‘<code>;</code>’, ‘<code>{</code>’
or ‘<code>}</code>’ followed by ASCII whitespace, and excluding any ‘<code>;</code>’, ‘<code>{</code>’
or ‘<code>}</code>’ byte immediately before the end of file.</p>
<p>ASCII whitespace includes ASCII tab, ASCII space, ASCII newline,
ASCII formfeed, and ASCII carriage return.</p>
<p>When ‘<code>;</code>’, ‘<code>{</code>’ or ‘<code>}</code>’ are within a C string, they may still not
be counted by the IOCCC size tool.</p>
</blockquote>
<p>In cases where the above summary and the algorithm implemented by
<code>iocccsize(1)</code> conflict, the algorithm implemented by the minimum
required version of <code>iocccsize(1)</code> is preferred by the
<a href="../judges.html">Judges</a>.</p>
<p>Make sure <code>iocccsize</code> does not flag any issues with your <code>prog.c</code>.</p>
<p><strong>NOTE</strong>: by default <code>iocccsize</code> will only report the size, unless the
code surpasses the limit.</p>
<p>There a much less need to <code>#define</code> C reserved words in an effort to
get around the size limits of <a href="rules.html#rule2-size">Rule 2 - Size
restrictions</a> because of the <code>iocccsize(1)</code>
algorithm.</p>
<p>Yes Virginia, <strong>the previous guideline sentence is an important hint</strong>!</p>
<p>Don’t expect the <a href="rules.html#rule2-size">Rule 2 - Size restrictions</a> to
<a href="../faq.html#size_slow_change">change any time soon</a>.</p>
<p>See the FAQ on “<a href="../faq.html#size_rule_history">How has the Rule 2 size restrictions rule changed over
the years?</a>”.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline3">
<div id="guideline3-register">
<h1 id="guidelines-for-rule-3---register-for-the-ioccc">Guidelines for <a href="rules.html#rule3-register">Rule 3 - Register for the IOCCC</a></h1>
</div>
</div>
<p class="leftbar">
If a group of people work on a submission, then they should <a href="../quick-start.html#enter">register
for the IOCCC</a> using either a valid group
email address, or an email address for one of the authors.
</p>
<p class="leftbar">
Processing your registration is an activity overseen by a Judge.
Please be <strong>patient</strong> while a Judge processes your registration.
</p>
<p>It can take a few days to process your registration and for the server
to email your details, therefore make sure to allow yourself ample time
to register and submit your entries; <strong>DO NOT WAIT UNTIL THE FINAL
DAYS</strong> to register! The Judges are <strong>NOT</strong> responsible for delayed or
lost email or for those who wait until the last minute to try to
register!</p>
<p class="leftbar">
If after a few days you believe your registration hasn’t been process,
then <a href="../contact.html">contact the Judges</a>.
</p>
<p class="leftbar">
After your UUID and temporary password are emailed to you, you have up
to fortnight (<strong>14 days</strong>) to login and change your temporary password.
If you fail to change your temporary password by that deadline, then
you’ll need to <a href="../contact.html">contact the Judges</a> by email to
request a reset.
</p>
<p>See the
FAQ on “<a href="../next/register.html">How to register for the IOCCC</a>”.</p>
<p>See the
FAQ on “<a href="../quick-start.html#enter">Entering the IOCCC: the bare minimum you need to
know</a>”.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline7">
<div id="guideline7-original">
<h1 id="guidelines-for-rule-7---original-work">Guidelines for <a href="rules.html#rule7-original-work">Rule 7 - Original Work</a></h1>
</div>
</div>
<p>While it is <strong>NOT</strong> required, you are allowed to use tools or services
such as:</p>
<ul>
<li>Code generators</li>
<li>Static and runtime code analysis tools</li>
<li>Machine learning tools</li>
<li>Natural language models</li>
<li>Large language models (LLMs)</li>
<li>Code copilot tools</li>
<li>So called “<em>AI services</em>”</li>
<li>Etc.</li>
</ul>
<p>The IOCCC has a rich history of remarkable winning entries created by
authors who skillfully employed various techniques (often their own
tools) to develop their code. If you do make use of such tools or
services, then we <strong>ENCOURAGE you to describe how you used such tools</strong>
in your <code>remarks.md</code> file.</p>
<p class="leftbar">
In short: you created it, you own it, its an original work <strong>OR</strong> you have
explicit permission to the work that you document in your remarks.
</p>
<p>See the
FAQ on “<a href="../faq.html#ai">May I use AI, LLM, Virtual coding assistants, or similar tools
to write my submission?</a>”.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline8">
<div id="guideline8-submitting">
<h1 id="guidelines-for-rule-8---submitting-requirements">Guidelines for <a href="rules.html#rule8-submitting-requirements">Rule 8 - Submitting requirements</a></h1>
</div>
</div>
<p>Do <strong>NOT</strong> register more than one account just to try and get around
the limit on the number of submission slots, because if you do and we
discover that you did so your submissions will be rejected for
violating the rules.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline9">
<div id="guideline9-no-interactive-compiling-allowed">
<div id="guideline9-no-interactive">
<h1 id="guidelines-for-rule-9---no-interactive-compiling-allowed">Guidelines for <a href="rules.html#rule9-no-interactive">Rule 9 - No interactive compiling allowed</a></h1>
</div>
</div>
</div>
<p>Don’t forget that the building of your program should be done <strong>WITHOUT
human intervention</strong>. So don’t do things such as:</p>
<pre><code> prog: prog.c
#echo this next line requires data from standard input
cat > prog.c
${CC} prog.c -o prog</code></pre>
<p>However, you can do something cute such as making your program do
something dumb (or cute) when it is built ‘automatically’, and when it
is run with a human involved, do something more clever. For example,
one could put in their <code>Makefile</code>:</p>
<pre><code> prog: prog.c
${CC} prog.c -DNON_HUMAN_COMPILE -o prog
@echo "See remarks section about alternate ways to compile"</code></pre>
<p>and then include special notes in your <code>remarks.md</code> file for alternate
/ human intervention based building.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline11">
<div id="guideline11-abuse">
<h1 id="guidelines-for-rule-11---legal-rule-abuse">Guidelines for <a href="rules.html#rule11-legal-rule-abuse">Rule 11 - Legal rule abuse</a></h1>
</div>
</div>
<p>We do realize that there are holes in the <a href="rules.html">Rules</a>, and
invite submitters to attempt to apply creative rule interpretation. A
rule abuse though, even if not rewarded, may result in a subsequent
rule change for future contests.</p>
<p>We sometime award ‘<strong>Best abuse of the rules</strong>’ or ‘<strong>Worst abuse of
the rules</strong>’, or some variation, to a submission that creatively
attempts to exploit a holes in the <a href="rules.html">Rules</a>.</p>
<p>When we do need to plug a hole in the <a href="rules.html">Rules</a> or
<a href="guidelines.html">Guidelines</a>, we will attempt to use a very small
plug, if not smaller.</p>
<p>Or, maybe not. :-)</p>
<p>Legal rule abuse may involve, but is not limited to, doing things that
are technically allowed by the <a href="rules.html">Rules</a> and yet do not fit
the spirit of what we intended to be submitted.</p>
<p>Legal abuse of the <a href="rules.html">Rules</a> is <strong>NOT</strong> an invitation to
violate the <a href="rules.html">Rules</a> (especially <a href="./rules.html#rule17-mkiocccentry">Rule 17 - Use
mkiocccentry</a>). A submission that
violates the <a href="rules.html">rules</a> in the opinion of the
<a href="../judges.html">Judges</a>, <strong>WILL</strong> be disqualified. <strong><em>RULE ABUSE
CARRIES A CERTAIN LEVEL OF RISK!</em></strong></p>
<p>If you intend to abuse the <a href="rules.html">Rules</a>, indicate so in your
<code>remarks.md</code> file. You <strong>MUST</strong> try to justify, plead, beg, why you
consider your rule abuse to be allowed under the <a href="rules.html">Rules</a>.
Humor or creativity help plead a case.</p>
<p>As there is no guarantee that you will succeed, you might consider
submitting an alternate version that conforms to the
<a href="rules.html">Rules</a>, if it might otherwise be interesting; one that
does not abuse the <a href="rules.html">Rules</a> and one that does, making sure
to note in the one that does not abuse the rules that this is another
version, so that the Judges do not assume you uploaded it by mistake.</p>
<p>If you do bypass the <code>mkiocccentry(1)</code> warnings about
<a href="rules.html#rule2a-gross-size">Rule 2a - Gross Size</a>
and/or about
<a href="rules.html#rule2b-net-size">Rule 2b - Net Size</a>
<strong>or any other
rule</strong> and submit it anyway, you <strong>MUST</strong> try to justify why the
<a href="../judges.html">Judges</a> should not reject your submission due to a rule
violation, and <strong>you would be wise</strong> to do this towards the top of your
<code>remarks.md</code> file so as not to be overlooked.</p>
<p>We are often asked why the contest <a href="rules.html">Rules</a> and
<a href="guidelines.html">Guidelines</a> seem strange or contain mistakes, flaws,
or grammatical errors. One reason is that we sometimes make genuine
mistakes, but in many cases such problems, flaws or areas of confusion
are deliberate.</p>
<p>Changes to <a href="rules.html">Rules</a> and <a href="guidelines.html">Guidelines</a> in
response to rule abuses, are done in a minimal fashion. Often we will
deliberately leave behind holes (or introduce new ones) so that future
rule abuse can continue. A clever author should be able to read and
“drive a truck through the holes” in the <a href="rules.html">Rules</a> and
<a href="guidelines.html">Guidelines</a>.</p>
<p>At the risk of stating the obvious, this contest is a parody of the
software development process. The <a href="rules.html">Rules</a> and
<a href="guidelines.html">Guidelines</a> are only part of the overall contest.
Even so, one might think the contest <a href="rules.html">Rules</a> and
<a href="guidelines.html">Guidelines</a> process as a parody of the sometimes
tragic mismatch between what a customer (or marketing) wants and what
engineering delivers. Real programmers must face obfuscated and
sometimes conflicting, ballooning specifications, and requirements from
marketing, sales, product management and even from customers themselves
on an all too regular basis. This is one of the reasons why the
<a href="rules.html">Rules</a> and <a href="guidelines.html">Guidelines</a> are written in
obfuscated form.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline12">
<div id="guideline12-utf8">
<h1 id="guidelines-for-rule-12---utf-8">Guidelines for <a href="rules.html#rule12-utf8">Rule 12 - UTF-8</a></h1>
</div>
</div>
<p>The IOCCC no longer discourages the use of multibyte UTF-8 characters
in <code>C</code> code.</p>
<div id="guideline13">
<div id="guideline13-nocr">
<h1 id="guidelines-for-rule-13---no-carriage-returns-in-prog.c">Guidelines for <a href="rules.html#rule13-nocr">Rule 13 - No carriage returns in prog.c</a></h1>
</div>
</div>
<p>We <strong>DISLIKE</strong> C code with trailing control-M’s (<code>\r</code> or <code>\015</code>) that
results in compilation failures.</p>
<p>Some non-UNIX/non-Linux tools such as MS Visual C and MS Visual C++
leave trailing control-M’s on lines. Users of such tools should strip
off such control-M’s before submitting their submissions. In some
cases tools have a “Save As” option that will prevent such trailing
control-M’s being added.</p>
<p class="leftbar">
If your <code>prog.c</code> is near the <a href="rules.html#rule2a-gross-size">Rule 2a Gross
Size</a> and/or <a href="rules.html#rule2b-net-size">Rule 2b Net
Size</a> limit, you are permitted to <strong>NOT</strong>
end source with a newline. If you need to do this, please document
that in your <code>remarks.md</code> file.
</p>
<p class="leftbar">
If your compiler complains about about not ending in a newline, please
note this in your <code>remarks.md</code> file, and if possible add an appropriate
<code>-Wno-</code> to the <code>CSILENCE</code> variable in your Makefile.
</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline15">
<div id="guideline15-gnu-makefile">
<h1 id="guidelines-for-rule-15---gnu-makefile">Guidelines for <a href="rules.html#rule15-gnu-makefile">Rule 15 - GNU Makefile</a></h1>
</div>
</div>
<p>Submissions will be judged in an environment that has no <strong>IDE</strong>. Any
submission that fails to compile/build because it requires an <strong>IDE</strong>
will be rejected.</p>
<p class="leftbar">
We will use the GNU <code>make(1)</code> tool, your <code>Makefile</code>, as well as tools
found in the <a href="https://en.wikipedia.org/wiki/Single_UNIX_Specification">Single UNIX
Specification</a>
(UNIX-like) environments, and commonly found on systems that reasonably
conform to the <a href="https://en.wikipedia.org/wiki/Single_UNIX_Specification">Single UNIX
Specification</a>
in the building and compiling of your submission.
</p>
<p class="leftbar">
Your <code>Makefile</code> <strong>MUST</strong> be compatible with GNU <code>make</code> and we suggest
you use <a href="../next/Makefile.example">Makefile.example</a> as a template, renamed as
<code>Makefile</code> of course.
</p>
<p>See the
FAQ on “<a href="../faq.html#makefile_details">What are the detailed recommendations for a submission
Makefile?</a>”.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="guideline17">
<div id="guideline17-mkiocccentry">
<h1 id="guidelines-for-rule-17---use-mkiocccentry">Guidelines for <a href="rules.html#rule17-mkiocccentry">Rule 17 - Use mkiocccentry</a></h1>
</div>
</div>
<p class="leftbar">
We <strong>STRONGLY</strong> recommend you <strong>do</strong> install the most recent release of
<a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry toolkit</a>
because use of older versions of the mkiocccentry toolkit are <strong>HIGHLY
LIKELY</strong> to be <strong>REJECTED</strong>!
</p>
<p class="leftbar">
If you submit your own JSON files (<strong>OTHER THAN</strong> <code>.auth.json</code> and
<code>.info.json</code>!) then they do <strong>NOT</strong> have to be valid JSON.
</p>
<p class="leftbar">
However, if you do provide invalid JSON files, <strong>PLEASE</strong> document and
<strong>clearly explain</strong> this in your <code>remarks.md</code> file.
</p>
<p class="leftbar">
An <em>extra file</em> is defined as a file that is not <code>prog.c</code>,
<code>prog.alt.c</code>, <code>try.sh</code>, <code>try.alt.sh</code>, <code>remarks.md</code>, <code>Makefile</code>,
<code>.auth.json</code> and <code>.info.json</code>: unless it’s not in the top level
directory, in which case it <strong>IS</strong> an <em>extra file</em>.
</p>
<p class="leftbar">
The <strong>non</strong>-extra files are considered <em>free files</em>, and do not count
towards the <a href="rules.html#rule17-mkiocccentry">Rule 17 - Use
mkiocccentry</a> limit of <strong>31</strong> <em>extra
files</em>.
</p>
<p class="leftbar">
If you use an optional filename for something other than their intended
use in order to get past the file limit, we will consider that an abuse
of rules.
</p>
<p class="leftbar">
The <code>mkiocccentry</code> generated tarball does <strong>NOT</strong> reveal who you are!
For this reason, the tarball <strong>MUST</strong> be a <strong>v7 format</strong> tarball.
</p>
<p class="leftbar">
You should NOT use a tarball as an <em>extra file</em> for a test-suite unless
you have a very good reason for this: if you do include a tarball as an
<em>extra file</em>, then you <strong>MUST</strong> specify why in your <code>remarks.md</code> file.
</p>
<p class="leftbar">
If you <strong>DO</strong> include a tarball as an <em>extra file</em>, and the build
process or the program extracts said tarball(s), the make <code>clobber</code>
rule <strong>MUST</strong> remove the extracted files.
</p>
<p class="leftbar">
Instead of including a large test-suite that requires a lot of files as
part of your submission, if your submission doesn’t require the
test-suite to be available to run, then in your <code>remarks.md</code> you could
include URL where such a test-suite may be downloaded from and how to
use the test-suite to test your submission, assuming it does not reveal
who you are, i.e. <strong>DO NOT</strong> use a GitHub URL which contains your
username, in case the judges know who you are. See <a href="rules.html#rule16-anonymous-judging">Rule 16 - Anonymous
judging</a>.
</p>
<p class="leftbar">
If you <strong>DO</strong> include a tarball then make sure it uses the v7 format.
This is because it will not reveal who you are.
</p>
<p class="leftbar">
See the FAQ on “<a href="../faq.html#extra-files">extra files</a>” for details on
how to make a v7 tarball.
</p>
<p class="leftbar">
We recommend that all markdown files in your submission observe our
<a href="../markdown.html">IOCCC markdown guidelines</a>.
</p>
<p>See the
FAQ on “<a href="../faq.html#try_scripts">What should I do with the <code>try.sh</code> and <code>try.alt.sh</code>
scripts?</a>”.</p>
<p>See the
FAQ on “<a href="../faq.html#auth_json">What is a <code>.auth.json</code> file?</a>”.</p>
<p>See the
FAQ on “<a href="../faq.html#info_json">What is a <code>.info.json</code> file?</a>”.</p>
<p>See the
FAQ on “<a href="../faq.html#chksubmit">How can I validate my submission
directory?</a>”.</p>
<p>See the
FAQ on “<a href="../faq.html#file_perms">What permissions may my files be and what if I need different
permissions?</a>”.</p>
<p>See the
FAQ on “<a href="../faq.html#makefile_details">What are the detailed recommendations for a submission
Makefile?</a>”.</p>
<p>See the
FAQ on “<a href="../faq.html#rule17">What are the details behind Rule 17 - Use
mkiocccentry?</a>”.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="general">
<h1 id="general-guidelines">General Guidelines</h1>
</div>
<div id="general-overall-guidelines">
<h2 id="overall-guidelines">Overall Guidelines</h2>
</div>
<p class="leftbar">
The <strong>official locale</strong> of the <strong>IOCCC</strong> is <strong>C</strong>.
</p>
<p>You are <strong>encouraged</strong> to examine the <a href="../years.html">winners of previous
contests</a>.</p>
<p>Because the <a href="rules.html">Rules</a> change from year to year, some <a href="../years.html">past
winning entries</a> may be rejected this year. What was
<em>was</em> unique and novel one year <em>might be ‘old’ the next year</em>.</p>
<p>A submission is usually examined in a number of ways. We typically
apply a number of tests to a submission:</p>
<ul>
<li>look at the original source</li>
<li>C pre-process the source ignoring <code>#include</code> lines</li>
<li>C pre-process the source ignoring <code>#define</code> <em>and</em> <code>#include</code> lines</li>
<li>run it through a C beautifier (such as <code>clang-format(1)</code>)</li>
<li>examine the algorithm</li>
<li>compile it (with flags to enable all warnings)</li>
<li>execute it</li>
<li>…and various other things only we know about :-)</li>
</ul>
<p>You should consider how your submission looks in each of the above
tests. You should ask yourself if your submission remains obscure
after it has been ‘<em>cleaned up</em>’ by the C pre-processor and a C
beautifier.</p>
<p>Your submission need not pass all of the above tests as in certain
cases, a test is not important.</p>
<p>Submissions that compete for the ‘<strong>strangest/most creative source
layout</strong>’ need not do as well as others in terms of their algorithm.</p>
<p>Given two submissions, we are more inclined to pick the submission that
does something interesting when it’s executed.</p>
<p><strong>IMPORTANT:</strong> Be sure that <strong>your submission works</strong> as documented in
your <code>remarks.md</code> file.</p>
<p>We sometimes make an effort to debug a submission that has a slight
problem, particularly in or near the final round. On the other hand,
we have seen some otherwise excellent submissions fall down because
they didn’t work as documented.</p>
<p>If you submission has bugs and/or mis-features, you are <strong>MUCH BETTER</strong>
off documenting such bugs and/or mis-features in your <code>remarks.md</code>
file.</p>
<p>Consider an example of a <a href="https://en.wikipedia.org/wiki/Prime_number">prime
number</a> printing program
that claims that 16 is a prime number. Noting such a bug in your
<code>remarks.md</code> file could save your submission:</p>
<blockquote>
<p>“<em>this submission sometimes prints the 4th power of a prime by mistake</em>”</p>
</blockquote>
<p>Sometimes a strange bug or (mis-)feature can even help the submission!
Of course, a correctly working submission might be better.</p>
<p>We tend to look down on a <a href="https://en.wikipedia.org/wiki/Prime_number">prime
number</a> printer that claims
that 16 is a prime number. Clever people will note that 16 might be
prime under certain conditions. :-) Wise people, when submitting
something clever will <strong>fully explain such cleverness</strong> in their
submission’s <code>remarks.md</code> file.</p>
<p>People who are considering to just use some complex mathematical
function or state machine to spell out something such as “<em>hello,
world!</em>” <strong>really really, <em>and we do mean REALLY</em>, do need to be more
creative</strong>.</p>
<p>Consider using misleading or subtle tricks layered on top of or under
an appropriate level of obfuscation.</p>
<p>A clean looking program with misleading comments and variable names
might be a <strong>VERY GOOD START</strong> to a great submission!</p>
<p>Try to avoid submissions that play music that some people believe is
copyrighted music.</p>
<p>Did we remember to indicate that programs that blatantly use some
complex state machine to do something simple, are boring? We think we
did. :-)</p>
<p>Given two versions of the same program, one that is a compact blob of
code, and the other that is formatted more like a typical C program, we
tend to favor the second version. Of course, a third version of the
same program that is formatted in an interesting and/or obfuscated way,
would definitely win over the first two!</p>
<p>Remember, you can submit more than one submission. See the
<a href="rules.html">Rules</a> for details (in particular, <a href="rules.html#rule8-submitting-requirements">Rule 8 - Submitting
requirements</a>).</p>
<p>Please note that the C source below, besides lacking in obfuscation, is
<strong>NOT</strong> the smallest C source file that when compiled and run, dumps
core:</p>
<pre><code> main;</code></pre>
<p>Unless you specify <code>-fwritable-strings</code> (see <code>COTHER</code> in the example
Makefile, described in the
FAQ on “<a href="../faq.html#makefile_details">What are the detailed recommendations for a submission
Makefile</a>”), do not
assume this sort of code will work:</p>
<pre><code> char *T = "So many primes, so little time!";
...
T[14] = ';'; /* modifying a string requires: -fwritable-strings */</code></pre>
<p>Even so, one should probably not assume that this is universally
accepted.</p>
<p>Initialized char arrays are OK to write over. For instance, this is
OK:</p>
<pre><code> char b[] = "Is this OK";
b[9] = 'k'; /* modifying an initialized char array is OK */</code></pre>
<p>Jump to: <a href="#">top</a></p>
<div id="likes">
<div id="dislikes">