tinycc VS nio

Compare tinycc vs nio and see what are their differences.

tinycc

Unofficial mirror of mob development branch (by TinyCC)

nio

Low Overhead Numerical/Native IO library & tools (by c-blake)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
tinycc nio
15 7
1,817 32
2.8% -
8.8 6.3
6 days ago 11 days ago
C Nim
GNU Lesser General Public License v3.0 only ISC License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

tinycc

Posts with mentions or reviews of tinycc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-03.
  • Autoconf makes me think we stopped evolving too soon
    8 projects | news.ycombinator.com | 3 Apr 2024
    A better solution is just to write a plain ass shell script that tests if various C snippets compile.

    https://github.com/oilshell/oil/blob/master/configure

    https://github.com/oilshell/oil/blob/master/build/detect-pwe...

    Not an unholy mix of m4, shell, and C, all in the same file.

    ---

    These are the same style as a the configure scripts that Fabrice Bellard wrote for tcc and QEMU.

    They are plain ass shell scripts, because he actually understands the code he writes.

    https://github.com/qemu/qemu/blob/master/configure

    https://github.com/TinyCC/tinycc/blob/mob/configure

    OCaml’s configure script is also “normal”.

    You don’t have to copy and paste thousands of lines of GNU stuff that you don’t understand.

    (copy of lobste.rs comment)

  • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation [pdf]
    1 project | news.ycombinator.com | 15 Aug 2023
    I can highly recommend libtcc (https://github.com/TinyCC/tinycc.git) for this kind of thing. I recently ported the code developed in linux on an ARM chromebook to a generic windows box in 20 minutes.
  • Are there faster alternatives to GCC and Clang for C?
    2 projects | /r/Compilers | 5 Apr 2023
  • Offensive Nim
    8 projects | news.ycombinator.com | 1 Jan 2023
    I think it's a pretty nice prog.lang. You may be very happy. Though nothing is perfect, there is much to recommend it. By now I've written over 150 command-line tools with https://github.com/c-blake/cligen . A few are at https://github.com/c-blake/bu or https://github.com/c-blake/nio (screw 1970s COBOL-esque SQL) or in their own repos.

    If it helps, I like to use the "mob branch" [0] of TinyCC/tcc [1] for really fast builds in debugging mode, but this may only work if you toss `@if tcc: mm:markAndSweep @end` or similar in your nim.cfg. Then I have a little `@if r: ...` so I can say `nim c -d:r foo` for a release build with gcc/whatever.

    [0] https://repo.or.cz/w/tinycc.git

    [1] https://en.wikipedia.org/wiki/Tiny_C_Compiler

  • Bringing a dynamic environment to C: My linker project
    3 projects | news.ycombinator.com | 28 Oct 2022
    I have found the libtcc from https://github.com/TinyCC/tinycc to be absolutely fantastic. I'm using it to instantaneously compile the C output from my hobby language to create a repl. Once I had the compiler in good shape it allowed me to create a 100% compatible interpreter for (basically) free.

    The libtcc API is minimal. For my needs that has been 100% sufficient and a pleasure to work with.

  • tcc on RasPi, func pointers to standard functions are nil
    1 project | /r/C_Programming | 12 Feb 2022
    The latest version that people are working with can be found on the 'mob' branch at https://repo.or.cz/w/tinycc.git
  • Optimizing GoAWK with a bytecode compiler and virtual machine
    4 projects | news.ycombinator.com | 3 Feb 2022
    Instead of interpreters, if one has less of a "must be a full featured prog.lang" mentality and a fast compiler like Go or Nim [1] (or is willing to wait, for slow optimizing compiles to apply against big data sets) then an end-to-end simpler design for "one-liners" (or similarly simple programs) is the whole program generator. Maybe "big IFs", but also maybe not.

    To back up my simplicity claim, consider rp [2] -- like 60 non-comment/import/signature lines of code for the generator. Generated programs are even smaller. But, you can deploy gcc or clang or whatever against them and make fast libraries in the host language.

    Why, if you are willing to write those little generation command options in C99 then you can compile the harness with tcc [3] in about 1 millisecond which is faster than most interpreter start-up times - byte code or otherwise - and can link against gcc -O3 (or whatever) helper libraries.

    Anyway, I only write this because in my experience few people realize how much development cost they buy into when then insist on a full featured prog.lang, not to criticize Ben's work. You also make users need to learn quirks of that new language instead of the quirks of a "harness" which may be fewer.

    [1] https://forum.nim-lang.org/

    [2] https://github.com/c-blake/cligen/blob/master/examples/rp.ni...

    [3] https://repo.or.cz/w/tinycc.git

  • What's the best portfolio project that you have ever seen?
    1 project | /r/cscareerquestions | 14 Dec 2021
  • CHICKEN 5.3.0 has been released
    1 project | /r/scheme | 21 Nov 2021
    I think it is. At least there have been some recent activity in https://repo.or.cz/w/tinycc.git
  • Cwerg - an opinionated, light-weight compiler backend
    3 projects | /r/ProgrammingLanguages | 5 Jul 2021

nio

Posts with mentions or reviews of nio. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-21.
  • GNU Parallel, where have you been all my life?
    19 projects | news.ycombinator.com | 21 Aug 2023
    Sure. No problem.

    Even Windows has popen these days. There are some tiny popenr/popenw wrappers in https://github.com/c-blake/cligen/blob/master/cligen/osUt.ni...

    Depending upon how balanced work is on either side of the pipe, you usually can even get parallel speed-up on multicore with almost no work. For example, there is no need to use quote-escaped CSV parsing libraries when you just read from a popen()d translator program producing an easier format: https://github.com/c-blake/nio/blob/main/utils/c2tsv.nim

  • Offensive Nim
    8 projects | news.ycombinator.com | 1 Jan 2023
    I think it's a pretty nice prog.lang. You may be very happy. Though nothing is perfect, there is much to recommend it. By now I've written over 150 command-line tools with https://github.com/c-blake/cligen . A few are at https://github.com/c-blake/bu or https://github.com/c-blake/nio (screw 1970s COBOL-esque SQL) or in their own repos.

    If it helps, I like to use the "mob branch" [0] of TinyCC/tcc [1] for really fast builds in debugging mode, but this may only work if you toss `@if tcc: mm:markAndSweep @end` or similar in your nim.cfg. Then I have a little `@if r: ...` so I can say `nim c -d:r foo` for a release build with gcc/whatever.

    [0] https://repo.or.cz/w/tinycc.git

    [1] https://en.wikipedia.org/wiki/Tiny_C_Compiler

  • Modernizing AWK, a 45-year old language, by adding CSV support
    11 projects | news.ycombinator.com | 12 May 2022
    When you have "format wars", the best idea is usually to have a converter program change to the easiest to work with format - unless this incurs a massive expansion in space as per some image/video formats.

    With CSV-like data, bulk conversion from quoted-escaped RFC4180 CSV to a simpler-to-parse format is the best plan for several reasons. First, it may "catch on", help Microsoft/R/whoever embrace the format and in doing so squash many bugs written by "data analyst/scientist coders". Second, in a shell a|b run programs a & b in parallel on multi-core and allow things like csv2x|head -n10000|b. Third, bulk conversion to a random access file where literal delimiters cannot occur as non-delimiters allows trivial file segmentation to be nCores times faster (under often satisfied assumptions). There are some D tools for this in https://github.com/eBay/tsv-utils and a much smaller stand-alone Nim tool https://github.com/c-blake/nio/blob/main/utils/c2tsv.nim . Optional quoting was always going to be a PITA due to its non-locality. What if there is no quote anywhere? Fourth, by using a program as the unit of modularity in this case, you make things programming language agnostic. Someone could go to town and write a pure SIMD/AVX512 converter in assembly even and solve the problem "once and for all" on a given CPU. The problem is actually just simple enough that this smells possible.

    I am unaware of any "document" that "standardizes" this escaped/lossless TSV format. { Maybe call it "DSV" for delimiter separated values where "delimiters actually separate"? } Someone want to write an RFC or point to one? It can be just as "general/lossless" (see https://news.ycombinator.com/item?id=31352170).

    Of course, if you are going to do a lot of data processing against some data, it is even better to parse all the way to down to binary so that you never have to parse again (Well, unless you call CPUs loading registers "parsing") which is what database systems have been doing since the 1960s.

  • Unix command line conventions over time
    9 projects | news.ycombinator.com | 7 May 2022
    With https://github.com/c-blake/nio/blob/main/utils/catz.nim you can get similar format agnostic decoding/decompression not just in tar but in any pipeline context (based on magic numbers, not filename extensions and even doing the copy loop needed for unseekable inputs to replace the early read).
  • Show HN: Prig – like Awk, but uses Go for “scripting”
    3 projects | news.ycombinator.com | 1 Mar 2022
    Part of the value prop is that you can directly author/access any library code in your native prog.lang in your query as naturally as native imports and routine calls. Awk is pretty established and for trivial one-liners you may not need any libs, but there are a lot more Go/Python/etc. libs than awk libs, AFAICT.

    Beyond lib existence there is lib API understanding. There is not only language learning to be saved, but also lib ecosystem learning. I'm sure 'perl -na' folks could rattle off dozens of examples with CPAN package PDQ. I know many people who would say learning the ecosystem is what takes the most time...

    There is also little barrier to using the same approach to also "compile" your data as well as the code. This is basically how 'nio qry' works as a kind of open architecture ghetto DB. [1] I mean, yeah, Big Iron, corporate database XYZ probably also has some ugly, non-portable extension language with 1970s prog.lang aesthetics that also sacrifices much value of SQL standardization.

    [1] https://github.com/c-blake/nio

  • Fast CSV Processing with SIMD
    5 projects | news.ycombinator.com | 4 Dec 2021
    I get ~50% the speed of the article's variant with no SIMD at all in https://github.com/c-blake/nio/blob/main/utils/c2tsv.nim

    While in Nim, the main logic is really just bout 1 screenful for me and should not be so hard to follow.

    As commented elsewhere, but bearing repeating, a better approach is to bulk convert text to binary and then operate off of that. One feature you get is fixed sized rows and thus random access to rows without an index. You can even mmap the file and cast it to a struct pointer if you like (though you need the struct pointer to be the right type). When DBs or DB-ish file formats are faster, being in binary is the 0th order reason why.

    The main reason not to do this is if you have no disk space for it.

What are some alternatives?

When comparing tinycc and nio you can also consider the following projects:

Cwerg - The best C-like language that can be implemented in 10kLOC.

jbang - Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.

v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io

zsv - zsv+lib: tabular data swiss-army knife CLI + world's fastest (simd) CSV parser

pvsneslib - PVSnesLib : A small, open and free development kit for the Nintendo SNES

procs - Unix process&system query&format lib&multi-command CLI in Nim

c2nim - c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.

tsv-utils - eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.

nimterop - Nimterop is a Nim package that aims to make C/C++ interop seamless

DataProfiler - What's in your data? Extract schema, statistics and entities from datasets

cligen - Nim library to infer/generate command-line-interfaces / option / argument parsing; Docs at

goawk - A POSIX-compliant AWK interpreter written in Go, with CSV support