jbang
nio
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.
jbang
-
Java kernel for Jupyter - update
Its library made by maven folks that allows easy embedding of the resolver. Im about to move it it in jbang https://github.com/jbangdev/jbang/pull/1604
-
Show HN: Zero-dependency Java framework out of beta
Congratulations. I believe there is room for a micro framework that is smaller than Javalin or SparkJava.
That said, if you want to cash even more on minimalism, you may want to provide a single-file example using JBang[0].
[0]. https://jbang.dev/
-
Paving the on-ramp [Brian Goetz]
These would be awesome changes and fully in the spirit of what we managed to do already in jbang (https://jbang.dev). Having the verbosity removed would make it even better.
-
Getting back into Java after 12-15 years away?
big part of why I made jbang.dev so if you want to quickly play with all the suggested technologies in this thread without being a java build tool master do give it a go.
-
What is the thing that makes Java hard to get started ?
(jbang being https://jbang.dev)
-
Processing images in Java with OpenCV and Quarkus
Quarkus provides the option to create command line apps, and this is so kool, since you can also compile these into native. We are just going to make simple app for demo purpose in this blog. But if you are looking into creating some serious nirvana of cli apps take a look at this guide at quarkus.io using picocli or JBang
-
Need Guidance: How to compile an application so it can run as application without Java IDE on another computer. (Example: ./runWatchFolders )
https://jbang.dev provides a bunch of ways to build and distribute simple java apps.
- Show HN: Prig – like Awk, but uses Go for “scripting”
-
JBang can now be used to make java one-liners
See https://twitter.com/maxandersen/status/1494600204590501889?s=20 and release at https://github.com/jbangdev/jbang/releases/tag/v0.90.0
-
Spring Boot 2.6.2 on Raspberry Pi 4
~$ sudo apt -q install zip ~$ curl -s "https://get.sdkman.io" | bash ~$ source "$HOME/.sdkman/bin/sdkman-init.sh" ~$ sdk version ~$ ==== BROADCAST ================================================================= * 2022-01-06: connor 1.2.1 available on SDKMAN! https://github.com/helpermethod/connor/releases/tag/v1.2.1 * 2022-01-04: micronaut 3.2.4 available on SDKMAN! * 2022-01-02: jbang 0.86.0 available on SDKMAN! https://github.com/jbangdev/jbang/releases/tag/v0.86.0 ================================================================================ SDKMAN 5.13.1 ~$
nio
-
GNU Parallel, where have you been all my life?
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
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
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
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”
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
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?
SDKMan - The SDKMAN! Command Line Interface
zsv - zsv+lib: tabular data swiss-army knife CLI + world's fastest (simd) CSV parser
picocli - Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
procs - Unix process&system query&format lib&multi-command CLI in Nim
quarkus-opencv - OpenCV extension for Quarkus
tsv-utils - eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
Quarkus - Quarkus: Supersonic Subatomic Java.
DataProfiler - What's in your data? Extract schema, statistics and entities from datasets
quarkus-opencv-examples - OpenCV examples with Quarkus
goawk - A POSIX-compliant AWK interpreter written in Go, with CSV support
javalin.github.io - Javalin website source code
csvquote