Hi,
I’ve recently explored a lot of packages to get more of an idea, of what kind of functionality is being covered in the julia-ecosystem, as it applies to my needs. While there are some very nice and powerful packages (for visualization, especially, which is very useful, to me), I’m still on the quest for ONE package to handle all my simple output of anything, that is just a single number, on the console.
I could come up with a huge list, of nice-to-haves (like padding, overall-precision, dates, times with annotations of units, etc.), but have now limited my expectations to being able to do just the very basic formatting of floats & integers (up to 64-bit size, only).
Specifically, just having 1000s-separators for ints and limiting precision (# digits) for floats likely already covers 90% of my needs (and I’m happy to come up with custom functions for the remaining 10%).
Please understand, I’m going to be 50 yrs. old, soon, and the julia-ecosystem is already a bit overwhelming, for me, and I’d rather just do those very limited formats, but have ONE reliable package for it, than being flooded with 10 packages, of which each does a portion of what I actually need, to perfection, but I have to use a different package, as soon as I don’t want to output a float, but an int, this time.
This kinda sums up, my currently best options of Packages (but is rather disappointing, as both are failing to do 1000s-separators)…
- Formatting (python-style)
- Printf (C-style)
julia> testFormats()
--------------------------------------------------------------
no formatting applied...
float: 123456.78901234567, integer: 1234567890123456789 (Base.print)
--------------------------------------------------------------
testing Packages...
--------------------------------------------------------------
float: 123456.789 (Formatting.printfmt)
float: 123456.789 (Printf.@printf)
integer: 1234567890123456789 (Formatting.printfmt)
integer: 1234567890123456789 (Printf.@printf)
==============================================================
best, so far...
--------------------------------------------------------------
float: 123456.789 & integer: 1234567890123456789 (Formatting.printfmt)
float: 123456.789 & integer: 1234567890123456789 (Printf.@printf)
"(note: Both packages failing to display 1000s-separators)"
==============================================================
min-target: float: 123456.789 & integer: 12,345,678,901,234,567
nice-2-have: float: 123,456.789 & integer: 12,345,678,901,234,567
--------------------------------------------------------------
Please note, one additional hard requirement: It’s gotta be possible, to call ONE function of ONE package, to output several variables with individual datatypes & formats in ONE line (of code).
in addition to Printf
, Formatting
& Base
, I’ve looked at Format
, but might have not found other relevant packages or even missed options / functions in those packages, I listed. Does anyone have further pointers to explore (or even a solution)?