#+TITLE: Guile-DSV News -- history of user-visible changes.
#+STARTUP: content hidestars

Copyright (C) Artyom V. Poptsov <poptsov.artyom@gmail.com>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

* Changes in version 0.9.0 (2026-01-06)
** Improve =scm->dsv= and =scm->dsv-string= performance
=scm->dsv= and =scm->dsv-string= procedures were re-written to use a simple
finite-state machine (with Guile-SMC), with concurrent processing of table
rows.  The concurrency is provided by either Guile-Fibers or =(ice-9 threads)=
(Guile-DSV can use =(ice-9 threads)= as a fallback option on systems where
Guile-Fibers are not available.)

Those changes give Guile-DSV much better performance.  For example, given a
test table with 1'000'000 rows and 10 columns, =scm->dsv= finished in 55s on
Ryzen 9 5950X with 128GB of RAM, while the same task took 3649s on the same
machine when Guile-DSV 0.8.1 is used.  That gives us around 66 times faster
execution times, which is nice.

Also, due to introduction of new Guile-SMC state machines, =scm->dsv= and
=scm->dsv-string= now accept =log-driver= and =log-opt= keyword options.  The
logging is disabled by default.

* Changes in version 0.8.1 (2025-12-25)
** Changes in =(dsv table-preset)=
*** Fix =table-preset-override=                                      :BUGFIX:
The procedure would add all border specifications to the original preset
instead of replacing them.

Now the procedure replaces all border specifications from the original preset
with the new ones as expected.
** Changes in =dsv= CLI tool
*** Now row, column and cell filtering works with =--to= option
Now =dsv= allows to do table filtering and cell value processing along with
table format/delimiter conversion (with =--to= and =-t= options.)  Also now
=convert= procedure from =(dsv cli common)= allows to add numbering to the
table.
* Changes in version 0.8.0 (2025-11-02)
** =rfc4180.puml=: Bugfix: Properly handle LFs in empty rows
Guile-DSV would fail to read RFC4180 format properly when faced with data that
uses empty rows with plain "LF" line endings.  This patch fixes that behavior.

Reported by mooseyboots in:
<https://github.com/artyom-poptsov/guile-dsv/issues/15>
** =(dsv table)=: Improve the API
*** New "string-slice" option
Now =format-table=, =table-wrap= and =table-wrap-row= procedures accept
"string-slice" keyword option, that allows to fit a table into the specified
width.

The "string-slice" option expects a procedure an argument.  The project
documentation updated to describe the new option.

Implemented by Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>.
*** New "calculate-cell-widths" option
Now =table-wrap= and =format-table= procedures accept "calculate-cell-widths"
keyword option that allows to control how the individual cell widths are
calculated.

The "calculate-cell-widths" option expects a procedure an argument.  The
project documentation updated to describe the new option.

Implemented by Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>.
** Changes in documentation
*** Add a description of the table preset format
The table preset format was not described properly in the documentation.  Now
this issue is solved by adding the description to the Texinfo documentation.

Reported by mooseyboots in
<https://github.com/artyom-poptsov/guile-dsv/issues/16>
*** =README=: Improve
Improve =README= file formatting and content to make it more readable and
informative.

* Changes in version 0.7.2 (2024-08-04)
** Bugfixes
*** Parsers now can check if the table rows have consistent lengths
Guile-DSV table formatters would always fail when a table has inconsistent
column number in rows.  Now this is fixed by adding an additional check for
the row length consistency to the parser.

This behavior is enabled by default for the CLI. For =dsv->scm= and
=dsv-string->scm= procedures validation is disabled by default.  The rationale
is that in CLI a user most likely wants to pretty-print a table, and in that
case we currently cannot print a ill-formatted table anyways so it's
reasonable to throw an error as soon as possible.  For the programming API it
is normal to read ill-formatted data as it is up to user how to handle the
errors and there are more than one way to solve problems with data.  Plus we
keep the API backward-compatible with Guile-DSV 0.7.1.
*** Table formatter now handles tables with less than 2 columns
The Guile-DSV table formatter would always fail when a table has less than 2
columns.  Now this is fixed.
*** Fix =make distcheck=
Now the command produces a distribution of the package as it should.
** Improvements to the project documentation
*** New =ARCHITECTURE.org= file
This file contains the overview of the Guile-DSV architecture (as proposed in
<https://matklad.github.io//2021/02/06/ARCHITECTURE.md.html>.)
*** New =CODE_OF_CONDUCT.org= file
The document is a copy of
<https://www.contributor-covenant.org/version/2/1/code_of_conduct/> converted
into org-mode format.

* Changes in version 0.7.1 (2023-10-22)
** =dsv= now handles =--number= option
This option allows to add numbers to rows and columns of a table.
** New procedure in =(dsv table)=: =table-number=
This procedure creates a new table from the one that passed as the parameter,
adding rows and columns numbering as the first column/first row.
** Update Texinfo documentation

* Changes in version 0.7.0 (2023-08-15)
** Guile-DSV now uses Guile State Machine Compiler (Guile-SMC)
Guile-DSV now uses Guile State Machine Compiler (Guile-SMC) for the state
machine code generation from the PlantUML description:
  https://github.com/artyom-poptsov/guile-smc

** =dsv->scm= and =dsv-string->scm= now accept additional parameters
Now =dsv->scm= and =dsv-string->scm= procedures accept additional parameters:
- =#:debug-mode?= -- Enable/disable the debug mode.
- =#:log-driver= -- Set the logging driver.
- =#:log-opt= -- Set the logging options.
** =dsv= tool now accepts =--log-driver= and =--log-opt=
** Update Texinfo documentation

* Changes in version 0.6.0 (2023-05-14)
** =dsv= now accepts =--width= (=-w=) option
This option allows to set the table width for formatting.  When the width of a
table cell is lesser than its content, the content is wrapped.  Cell widths
difference will be smoothed to make the table more balanced.

When the value for the option is set to "auto" (default behavior) Guile-DSV
tries to fit the table into the screen width (to get the width of the terminal
the =stty= tool is used.)  When the option is set to zero, no table resizing
is performed thus no cell content wrapping will be done.
** Update the help output of =dsv= and its man page

* Changes in version 0.5.2 (2023-04-18)
** Bugfixes
*** RFC 4180 now handles empty trailing fields correctly
The library would skip a trailing empty field in a row thus a row shorter than
the rest of the table rows would be made.  For example, the following data:

#+BEGIN_EXAMPLE
  a,b
  c,
#+END_EXAMPLE

Would result in:
#+BEGIN_EXAMPLE lisp
'(("a" "b")
  ("c"))
#+END_EXAMPLE

Now this behavior should be fixed so the result for the same data will look as
follows:
#+BEGIN_EXAMPLE lisp
'(("a" "b")
  ("c" ""))
#+END_EXAMPLE
** =dsv= now accepts =--table-presets-path= option
The option allows to set the path to a directory that contains table presets.
** =dsv= now reads =GUILE_DSV_TABLE_PRESETS_PATH= environment variable
This environment variable allows to specify the directory that contains table
presets, akin to =--table-presets-path= option.
** Table presets now allow to specify styles
The styles are in the format of GNU/Linux terminal colors, e.g. "107;100".
See the manual page for "dsv" or =dsv --help= for details.
** Now table preset parameters can be overridden
For example:
#+begin_example shell
$ dsv -b "graphic-with-shadow,bs=107;100,ts=107;100"
#+end_example
** Table presets now allow to specify a table shadow symbol and offsets
For example, a simple table with a semi-graphic shadow "░" with an offset
"2;1" can be created using the "graphic" preset with overrides:
#+begin_example shell
$ echo -e "a1,b1,c1\na2,b2,c2\n" | dsv -b "graphic,s=░,so=2;1,ss=1;37,ts=1;44,bs=1;44"
#+end_example
** Update the help output of =dsv= and its man page

* Changes in version 0.5.1 (2022-02-05)
** Add Markdown table preset
    =dsv= now has Markdown table preset that allows to generate Markdown
    tables from a DSV data.
** New module: =(dsv version)=
    This module contains procedures that return information about the current
    Guile-DSV version.
** =dsv= now handles =--version= option
    When this option is passed to the =dsv= program it prints the version
    information and a short copyright note to the stdout.
** =dsv= now handles =--map-cell= option
    This option allows to apply an arbitrary Scheme code to each table cell
    before printing.
** =dsv= now handles =--filter-row= option
    This option allows to keep only that rows from a table for which the
    provided Scheme code returned #t.
** =dsv= now handles =--filter-column= option
    This option allows to keep only that columns from a table for which the
    provided Scheme code returned #t.

* Changes in version 0.5.0 (2021-12-12)
** Bugfixes
*** Fix a regression in =dsv --summary= introduced in 0.4.1
** API changes in the =dsv= tool
    Make table style more configurable by adding new table parameters.  Some
    old parameters are renamed to make the CLI API more consistent.
** =dsv= now handles =--with-header= option
    This option allows to use the first row of data as the table header.

    When pseudo-graphical tables are printed to the screen the first row that
    contains the header now has different style (which is configurable.)

    Thanks to Dr. Arne Babenhauserheide <https://www.draketo.de/> for the
    idea.
** New table preset: "org"
    This preset can be used to generate Emacs org-mode tables from data.

    Thanks to Dr. Arne Babenhauserheide <https://www.draketo.de/> for the
    idea.
** All table presets are updated to provide styles for the header
** New modules
    Some code from the =dsv= tool is moved to separate modules available for
    users:
    - (dsv table)
    - (dsv table-preset)

    See the Texinfo documentation for more info.
** Improve Autotools scripts
** Update Texinfo documentation
* Changes in version 0.4.1 (2021-12-11)
** Changes in the =dsv= tool
*** Allow to specify wider range of table border parameters
*** Allow to use table border presets
    Currently the following presets are available:
    - ascii
    - graphic
    - graphic-bold
    - graphic-double
* Changes in version 0.4.0 (2020-02-14)
** Allow to build with GNU Guile 3
** Improve the performance of Unix DSV parser
   According to tests on 50k+ datasets, the parser should be almost 3x faster
   now.
** Expand the test suite
* Changes in version 0.3.0 (2020-05-11)
** Remove bundled SRFI-64
   This module is shipped with Guile since version 2.0.12.
** Improve =dsv= tool (=utils/dsv.in=)
   - The tool now is capable of converting delimiters and reading data from
     stdin.
   - Add check for empty argument: print help message if no arguments
     specified.
** Bugfixes
*** Fix quote handling in RFC4180 data
    The library would always fail to correctly parse RFC4180 format because there
    was an error in the state machine: it considered even number of double quotes
    as a proof that the input data was correct.
  
    This change fixes the problem (#7 on GitHub) by re-writing the FSM to follow
    the standard more closely. Also now the FSM for RFC4180 reads data character
    by character which is more elegant and controllable.
  
    Thanks to Alex Sassmannshausen for attracting my attention to the parser
    issues in <https://github.com/artyom-poptsov/guile-dsv/issues/7>
** Improve tests
   Expand test suite, make tests more fine-grained.
* Changes in version 0.2.1 (2017-11-25)
** Add Guix package recipe
   Guile-DSV now has GNU Guix <https://www.gnu.org/software/guix/> package
   recipe that allows to use the package with Guix package manager.

   Thanks to Alex Sassmannshausen <alex@pompo.co> for writing the recipe.
** Bugfixes
*** RFC4180 now correctly handles quoted final fields in CRLF context
    The RFC4180 parser would always fail to parse strings such as:
      "test,hello,\"blah\"\r\n"
      "test,hello,\"blah\"\r\nincorrect,field,parsing"

    due to implementation defects.  Now the parser works correctly in such
    cases.

    Thanks to Alex Sassmannshausen for the patches!

    Reported by Alex Sassmannshausen <alex@pompo.co> in
    <https://github.com/artyom-poptsov/guile-dsv/issues/3>

* Changes in version 0.2.0 (2015-04-16)
** API change
   Procedures were renamed:
   - 'dsv-string->list' was renamed to 'dsv-string->scm'.
   - 'list->dsv-string' was renamed to 'scm->dsv-string'.
   - 'dsv-read' was renamed to 'dsv->scm'.
   - 'dsv-write' was renamed to 'scm->dsv'.

   Also see the procedure-specific changes below.
** Add RFC 4180 parser
   Procedures now accept optional keyed argument called 'format' that allows
   to switch between the Unix-style DSV format and the RFC 4180 (CSV) format.
** Unix parser now handles C-style backslash escapes
   as described in
   <http://www.catb.org/~esr/writings/taoup/html/ch05s02.html#id2901882>

   Specifically when the format is set to 'unix', 'dsv-string->scm' and
   'dsv->scm' now ignore backslash-escaped newlines; also all the procedures
   handle escaped nonprintable characters properly.
** Procedures now throw 'dsv-parser-error' on an error
** 'dsv-string->scm' now returns a table
   The procedure now returns a table (a list of lists) in which every inlined
   list represents a row of the table.
** New 'set-debug!' procedure in (dsv)
   The procedure allows to enable or disable debugging traces.  The debug mode
   is disabled by default.
** 'dsv-string->scm' and 'dsv->scm' now accept 'comment-prefix'
   'comment-symbol' argument is renamed to 'commen-prefix' and expected to be
   a string instead of a char.
** 'scm->dsv' and 'scm->dsv-string' procedures add a line break
   The procedures now add a line break that is default for a specified format
   at the end of lines.
** 'guess-delimiter' in (dsv) now accepts an optional 'known-delimiters' argument
   The argument can be used to privide the procedure with the list of
   delimiters to test to.
** Documentation update
   Description of the API was updated and more usage examples was added.

* Changes in version 0.1.0 (2014-11-30)
** Release of the first version of Guile-DSV

Local Variables:
mode: org
End:
