RecordStream
ocaml-containers
RecordStream | ocaml-containers | |
---|---|---|
3 | 7 | |
298 | 479 | |
- | - | |
2.6 | 8.5 | |
almost 4 years ago | 13 days ago | |
Perl | OCaml | |
GNU General Public License v3.0 or later | BSD 2-clause "Simplified" License |
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.
RecordStream
-
Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON
It's interesting watching these types of tools get re-invented periodically:
https://github.com/benbernard/RecordStream
It shows the unix model of many small, composable tools is very powerful, but also shows that POSIX is missing some essential pieces that everyone keeps trying to add/reinvent.
-
Miller CLI – Like Awk, sed, cut, join, and sort for CSV, TSV and JSON
I don't know about MillerCLI's portability, but RecordStream (https://github.com/benbernard/RecordStream) is my go to swiss army knife.
-
A Lisp REPL as my main shell (article)
That record/field parsing library would be a tool to handle a broad category of command-line programs. Once the library has broken the input stream into a collection of records and fields, another layer would then turn them into internal representations. The JSON-based RecordStream tools are illustrative here: there are some tools that parse based on a delimiter or a regular expression, some that parse documented generic non-JSON formats like XML, and some that parse application-specific files like tcpdump outputs. In a Lisp world, all of the dedicated stream manipulation tools are redundant, and you avoid parsing and printing at every step in the chain.
ocaml-containers
-
Decy vreau sa învăț și eu un limbaj
YMMV. Există extensii: Base, Containers. Pentru I/O ai Lwt sau Async.
-
Is 'Real World OCaml' 1st ed worth bying for a beginner?
It focuses on Jane Street's alternate standard library, Base, which means you're not quite learning OCaml, you're learning a distorted dialect of it that is mostly the same but with a lot of unique, opinionated design decisions chosen by Jane Street developers to suit their company's workflow. If you want to use Base you pretty much have to opt in to its way of doing things and pulling in a lot of extra code, so I think it's better to learn OCaml first, then learn Jane Street's way, especially since OCaml's stdlib has grown and improved a good bit since the time when Base was made and RWO originally written. Plus there's also containers now, which is a stdlib extension that lets you cherry-pick the things you want in a more self-contained way that builds on what OCaml provides instead of trying to replace it.
-
My adventures in ML Land
Fortunately, there is Containers which gets the argument ordering right.
-
I'm typecasting a lot, help
Instead of either, you might be interested in Containers. It's more like an extension of the OCaml stdlib where you can cherry-pick what you want to use instead of having to go all-or-nothing. Adds a lot of useful things but not in the opinionated "let's make OCaml a different language" way that Base does.
-
OCaml over Scala
Same can be said of containers, which extends the stdlib rather than replaces or changes it. It's not fragmentation, it's a "batteries included" utility library that works with the stdlib.
-
A Lisp REPL as my main shell (article)
I'm not a fan of some of the opinionated things it does and find it bloats the executables a bit much for my liking, but it is coherent and nicely made. I was looking into trying Batteries instead but someone suggested containers and it seems more modular and an extension of the stdlib rather than a replacement, which is more to my liking.
-
For an OCaml newbie, do you recommend using one of the alternative standard libraries?
For writing a self-contained library, people generally stick to stdlib (and occasionally some lightweight stdlib alternatives, e.g. containers - https://github.com/c-cube/ocaml-containers). Personally, I use containers a fair bit for libraries, but not as a full stdlib replacement.
What are some alternatives?
vnlog - Process labelled tabular ASCII data using normal UNIX tools
base - Standard library for OCaml
DataProfiler - What's in your data? Extract schema, statistics and entities from datasets
book - V2 of Real World OCaml
jq - Command-line JSON processor [Moved to: https://github.com/jqlang/jq]
utop - Universal toplevel for OCaml
rq - Record Query - A tool for doing record analysis and transformation
opam-monorepo - Assemble dune workspaces to build your project and its dependencies as a whole
miller - Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON
sihl - A modular functional web framework
jq - Command-line JSON processor
preface - Preface is an opinionated library designed to facilitate the handling of recurring functional programming idioms in OCaml.