ioccc | My IOCCC submissions and practice | Math library

 by   ilyakurdyukov C Version: Current License: No License

kandi X-RAY | ioccc Summary

kandi X-RAY | ioccc Summary

ioccc is a C library typically used in Utilities, Math applications. ioccc has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

2020-minimd5 An MD5 tool, with 64x4 byte constant table generation using integer arithmetic. 2020-rectangles Represents an image with the number of rectangles. 2020-lettermixer Randomizes the order of letters in words other than the first and last. 2020-markovchain Generates random text based on a dictionary using a Markov chain. One entry in 2020 did not win, will be reworked for next year's contest.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ioccc has a low active ecosystem.
              It has 9 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              ioccc has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of ioccc is current.

            kandi-Quality Quality

              ioccc has 0 bugs and 0 code smells.

            kandi-Security Security

              ioccc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ioccc code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ioccc does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              ioccc releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ioccc
            Get all kandi verified functions for this library.

            ioccc Key Features

            No Key Features are available at this moment for ioccc.

            ioccc Examples and Code Snippets

            No Code Snippets are available at this moment for ioccc.

            Community Discussions

            QUESTION

            Is there a way for the value of an object to be made aware of its own key dynamically?
            Asked 2020-Nov-17 at 14:01

            This is a purely theoretical question here (though one I think is an interesting thought exercise). I was just working on a JavaScript object (documentation-related) and the somewhat-unusual thought crosses my mind: is there a way to make a key/value pair entry within said object capable of reading its own key as part of its value? That is to say:

            Assuming I have a JavaScript object used for the purposes of serializing data:

            ...

            ANSWER

            Answered 2020-Nov-17 at 14:01
            Reflexively lookup the key on call

            This is probably the most surefire way to do it. When obj.foo() is called, then foo is executed with obj set as the value of this. This means that we can lookup the key from this. We can examine the object easily the hardest thing is to find which key contains the function we just executed. We can try to do string matching but it might fail for:

            Source https://stackoverflow.com/questions/64872115

            QUESTION

            IOCCC 1988/isaak.c - why no output even after ANSIfication?
            Asked 2020-Oct-11 at 10:37

            The carefully crafted, self-including code in this IOCCC winning entry from 1988:

            http://www.ioccc.org/years.html#1988_isaak

            ...was still too much for certain systems back then. Also, ANSI C was finally emerging as a stable alternative to the chaotic K&R ecosystem. As a result, the IOCCC judges also provided an ANSI version of this entry:

            http://www.ioccc.org/1988/isaak.ansi.c

            Its main attraction is its gimmick of including in the last line (!) with well-thought-out #defines, both inside the source and at compile time, to only allow certain parts of the code into the right level. This is what allows the header to be ultimately included at the latest stage possible, just before it is necessary, in the source fed to the compiler.

            However, this version still fails to produce its output when compiled today, with the provided compiler settings:

            ...

            ANSWER

            Answered 2020-Oct-11 at 10:37

            There is nothing remotely portable about this program. As I see it tries to overwrite the exit standard library function with its own code, expecting that return from empty main() would call that exit(), which is not true. And even then, such behaviour is not standard-conforming - even C89 said it would have undefined behaviour.

            You can "fix" the program on modern GCC / Linux by actually calling exit(); inside main - just change the first line to

            Source https://stackoverflow.com/questions/64302661

            QUESTION

            IOCCC 1986/wall.c - why does TCC beat GCC in handling earlier C code?
            Asked 2020-Oct-05 at 07:03

            Another pearl from the early IOCCC years is Larry Wall's 1986 entry:

            http://www.ioccc.org/years.html#1986 (wall)

            I suspect there is no C compiler today that can actually compile that source straight-out-of-the-box, due to the severe preprocessor abuse it contains:

            • Latest TDM-GCC 9.2.0 set to ANSI mode fails
            • Last TCC 0.9.27 fails

            However, after wrenching the preprocessed code out of the obfuscated original (always with GCC's cpp -traditional), both TCC and GCC manage to compile it; nevertheless, GCC's effort goes to waste as the program chokes when trying to begin decoding its obfuscated intro text (not going to spoil that here for those who want to delve themselves!)

            TCC, on the other hand, manages to summarily warn about implicit declarations of system(), read() and write() and quickly produce a working program.

            I tried to step through the GCC code execution with GDB and that's how I found that the compiled GCC code chokes on the second pass of a for loop that goes through a text string in order to decode it:

            [Inferior 1 (process 9460) exited with code 030000000005]

            That process ID doesn't matter as it represents the debug build executable that crashes. The exit code, however, stays the same.

            Clearly, TCC is better suited to such IOCCC entries that GCC. The latter still manages to successfully compile and even run some entries, but for tough cases like this one, TCC is hard to beat. Its only drawback is that it falls short when preprocessing extremely abusive code such as this example. It leaves spaces between certain preprocessed entries and thus fails in concatenating them into the author's intended C keywords in places, whereas GCC's cpp works 100%.

            My question is, as philosophical or even rhetorical as it sounds:

            What is it in modern GCC that makes it either fail to compile, or produce unusable code when it does compile, earlier C programs, unlike TCC?

            Thanks in advance for all the feedback, I appreciate it!

            NOTE: I am using Windows 10 version 2004 with WSL 2; GCC fails in both the Windows and the WSL 2 environments. I am planning to compile TCC in WSL 2 for comparisons in that environment too.

            PS: I immensely enjoyed this program when it finally executed as intended. It undoubtedly deserves that year's "grand prize in most well-rounded in confusion"!

            ...

            ANSWER

            Answered 2020-Oct-04 at 22:04

            The crash is caused by the program writing to the contents of a string literal. "Traditional" C compilers would often put these in writable memory, but on modern systems they're basically always in read-only memory. I'm surprised it doesn't crash with TCC.

            Here is a version of the program that compiles without complaint with GCC on my computer (even with a very high level of warnings) and appears to work correctly. I have made as few changes as possible. As usual with the best IOCCC entries, preprocessing and reformatting barely helped at all, although they did remove some traps for casual reverse engineers.

            The program assumes system invokes a Bourne-style shell, and a Unix-style stty command is available to that shell. Also, it will malfunction (probably in an amusing fashion) if the execution character set isn't ASCII.

            Source https://stackoverflow.com/questions/64199950

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ioccc

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ilyakurdyukov/ioccc.git

          • CLI

            gh repo clone ilyakurdyukov/ioccc

          • sshUrl

            git@github.com:ilyakurdyukov/ioccc.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link