nio VS bu

Compare nio vs bu and see what are their differences.

nio

Low Overhead Numerical/Native IO library & tools (by c-blake)

bu

B)asic|But-For U)tility Code/Programs (in Nim & Often Unix/POSIX/Linux Context) (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
nio bu
7 16
32 52
- -
6.3 9.2
11 days ago 1 day ago
Nim Nim
ISC License MIT 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.

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.

bu

Posts with mentions or reviews of bu. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-06.
  • Nim
    5 projects | news.ycombinator.com | 6 Dec 2023
    I think Nim is great for small CLIs. Some examples are over at: https://github.com/c-blake/bu . To quantify "small", using tools themselves in bu/ (and Zsh *):

        wc -l --total=never **.nim|cols 1|cstats ms q.05 q.95
  • fdupes: Identify or Delete Duplicate Files
    13 projects | news.ycombinator.com | 2 Nov 2023
    200 lines of Nim [1] seems to run about 9X faster than the 8000 lines of C in fdupes on a little test dir I have. If you need C, I think jdupes [2] is faster as @TacticalCoder points out a couple of times here. In my testing, `dups` is usually faster than `jdupes`, though.

    [1] https://github.com/c-blake/bu/blob/main/dups.nim

    [2] https://github.com/jbruchon/jdupes

  • Things I've learned about building CLI tools in Python
    16 projects | news.ycombinator.com | 24 Oct 2023
    You better off with using a compiled language.

    If you interested in a language that's compiled, fast, but as easy and pleasant as Python - I'd recommend you take a look at [Nim](https://nim-lang.org).

    And to prove what Nim's capable of - here's a cool repo with 100+ cli apps someone wrote in Nim: [c-blake/bu](https://github.com/c-blake/bu)

  • Removing Garbage Collection from the Rust Language (2013)
    9 projects | news.ycombinator.com | 11 Sep 2023
    20 milliseconds? On my 7 year old Linux box, this little Nim program https://github.com/c-blake/bu/blob/main/wsz.nim runs to completion in 275 microseconds when fully statically linked with musl libc on Linux. That's with a stripped environment (with `env -i`). It takes more like 318 microseconds with my usual 54 environment variables. The program only does about 17 system calls, though.

    Additionally, https://github.com/c-blake/cligen makes decent CLI tools a real breeze. If you like some of Go's qualities but the language seems too limited, you might like Nim: https://nim-lang.org. I generally find getting good performance much less of a challenge with Nim, but Nim is undeniably less well known with a smaller ecosystem and less corporate backing.

  • The Awk book’s 60-line version of Make
    2 projects | news.ycombinator.com | 10 Sep 2023
    Often whole program generation in a prog.lang (& ecosystem!) that you already know can substitute for a new prog.lang. Python even has eval. You may be interested in: https://github.com/c-blake/bu/blob/main/doc/rp.md

    You can actually get pretty far depending upon boundaries with the always implicit command-option language (when launched from the shell language, anyway). For example, Ben's example can be adapted to:

        rp -m^\[A-Za-z\] 'echo nr," ",s[1]'
  • Learn GNU Awk with hundreds of examples and exercises
    4 projects | news.ycombinator.com | 28 Aug 2023
    You might consider: https://github.com/c-blake/bu/blob/main/doc/cols.md

    That's in Nim, though that may not be much a barrier. (There may also be other tools in bu/ of interest.)

  • GNU Parallel, where have you been all my life?
    19 projects | news.ycombinator.com | 21 Aug 2023
    This sounds like a job for what standard C calls "popen". You can do `import posix; for line in popen("ls", "r"): echo line` in Nim, though you obviously need to replace `echo line` with other desired processing and learn how to do that.

    You might also want to consider `rp` which is a program generator-compiler-runner along the lines of `awk` but with all the code just Nim snippets interpolated into a program template: https://github.com/c-blake/bu/blob/main/doc/rp.md . E.g.:

        ls -l | rp -pimport\ stats -bvar\ r:RunningStat -wnf\>4 r.push\ 4.f -eecho\ r
  • The Bipolar Lisp Programmer
    3 projects | news.ycombinator.com | 11 Aug 2023
    Nim is terse yet general and can be made even more so with effort. E.g., You can gin up a little framework that is even more terse than awk yet statically typed and trivially convertible to run much faster like https://github.com/c-blake/bu/blob/main/doc/rp.md

    You can statically introspect code to then generate related/translated ASTs to create nearly frictionless helper facilities like https://github.com/c-blake/cligen .

    You can do all of this without any real run-time speed sacrifices, depending upon the level of effort you put in / your expertise. Since it generates C/C++ or Javascript you get all the abilities of backend compilers almost out of the box, like profile-guided-optimization or for JS JIT compilation.

  • Ask HN: Why did Nim not catch-on like wild fire as Rust did?
    16 projects | news.ycombinator.com | 25 Jun 2023
    I don't know about all your other questions, but the https://github.com/c-blake/cligen CLI framework seems much lower effort / ceremony than even Rust's `argh` and is just about as old as `clap` (both started 8 years ago in 2015).

    There are over 50 CLI utilities at https://github.com/c-blake/bu, many of which do something novel rather than just "re-doing ls/find/cat with a twist". While they are really more an "ls/ps construction toolkits" with some default configs to get people going, I think https://github.com/c-blake/lc and https://github.com/c-blake/procs are nicer than Rust alternatives. I mention these since you seem interested in such tools.

  • Self Hosted SaaS Alternatives
    17 projects | news.ycombinator.com | 5 Mar 2023
    You are welcome. Thanks are too rarely offered. :-)

    You may also be interested in word stemming ( such as used by snowball stemmer in https://github.com/c-blake/nimsearch ) or other NLP techniques, but I don't know how internationalized/multi-lingual that stuff is, but conceptually you might want "series of stemmed words" to be the content fragments of interest.

    Similarity scores have many applications. Weights on graph of cancelled downloads ranked by size might be one. :)

    Of course, for your specific "truncation" problem, you might also be able to just do an edit distance against the much smaller filenames and compare data prefixes in files or use a SHA256 of a content-based first slice. ( There are edit distance algos in Nim in https://github.com/c-blake/cligen/blob/master/cligen/textUt.... as well as in https://github.com/c-blake/suggest ).

    Or, you could do a little program like ndup/sh/ndup to create a "mirrored file tree" of such content-based slices then you could use any true duplicate-file finder (like https://github.com/c-blake/bu/blob/main/dups.nim) on the little signature system to identify duplicates and go from path suffixes in those clusters back to the main filesystem. Of course, a single KV store within one or two files would be more efficient than thousands of tiny files. There are many possibilities.

What are some alternatives?

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

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.

NimForUE - Nim plugin for UE5 with native performance, hot reloading and full interop that sits between C++ and Blueprints. This allows you to do common UE workflows like for example to extend any UE class in Nim and extending it again in Blueprint if you wish so without restarting the editor. The final aim is to be able to do in Nim what you can do in C++

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

Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

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

ordiri

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

OffensiveNim - My experiments in weaponizing Nim (https://nim-lang.org/)

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

awesome-selfhosted - A list of Free Software network services and web applications which can be hosted on your own servers

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

core - OPNsense GUI, API and systems backend