dcat: Concatenate File(s) to Standard Output or File

<1 min read

I've just published the first release of dcat, a cat command-line and library implementation in Dart.

final result = await cat(['path/to/file', 'path/to/otherfile]'],
    File('path/to/outfile').openWrite());
if (result.isFailure) {
  for (final error in result.errors) {
    print('Error: ${error.message}');
  }
}

I looked at Dart years ago but never did anything with it. Now that I am interested in using Flutter, I wanted to give it another try.

One thing that immediately caught my eyes is the ability to write command-line applications. This tutorial covers a small app which displays the contents of any files listed on the command line. I figured that was good starting point to turn into a full fleged app and library.

The goal was to completely emulate the standard cat Unix utility, specifically the GNU cat implementation.

I was also very interested in performance, and pleasantly surprised that, while not quite as efficient as the GNU version, it held its own.

Going from writing mostly in Kotlin to Dart felt like a big step backwards, but in all fairness Dart's verbosity is on par with Java. It just took me a bit to get comfortable with it.

As usual, documentation and source are on GitHub.

Port Flush

<1 min read

Port flush and pick-up some 💊

Twits du Jour (Jan 20)

<1 min read
  • @RussB Welcome to the club, Russ. #

Twits du Jour (Jan 19)

<1 min read

CryptoPrice for Kotlin/Java

<1 min read

I've just released the first public version of CryptoPrice. A small Kotlin/Java library to retrieve cryptocurrencies current prices from the Coinbase Public API.

val btc = spotPrice("BTC") // Bitcoin
println(btc.amount)
val eth = spotPrice("ETH", "EUR") // Ethereum in Euros
println(eth.amount)

As usual documentation and source are on GitHub.