Commit d2fc0d18 authored by Robert Izzard's avatar Robert Izzard
Browse files

update to V1.41

fix typo in Glib reference in JOSS paper

add three recent paper citations that use libcdict
parent c1cdef92
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -22,3 +22,5 @@
01/10/2022 : V1.31 Added checks for __VA_OPT__ in meson.build because Clang 11 behaves differently to Clang 12+ and GCC, and set the default C std to gnu18.

06/12/2023 : V1.4 Release for (hopefully!) final JOSS paper.

07/12/2023 : V1.41 fix citation typo and added a few recent papers that use libcdict (thanks to David Hendriks).
+3 −0
Original line number Diff line number Diff line
#!/bin/bash

# script to build the JOSS paper from
# the source files in the libcdict repostiory
docker run --rm \
    --volume $PWD:/data \
    --user $(id -u):$(id -g) \
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ project(
        'cpp_std=gnu++17', # gnu++17
        'libdir=lib',
    ],
    version : '1.4',
    version : '1.41',
)

############################################################
+53 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ url = {https://gitlab.com/binary_c/binary_c-python/},


@misc{glib_manual_hashtable,
  author = {GLib~documentation},
  author = {Glib},
  title = {\textsc{glib} hash tables},
  year = {2022},
  publisher = {Gitlab},
@@ -244,3 +244,55 @@ url = {https://gitlab.com/binary_c/binary_c-python/},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.521...35I},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{2023MNRAS.524.3978M,
       author = {{Mirouh}, Giovanni M. and {Hendriks}, David D. and {Dykes}, Sophie and {Moe}, Maxwell and {Izzard}, Robert G.},
        title = "{Detailed equilibrium and dynamical tides: impact on circularization and synchronization in open clusters}",
      journal = {\mnras},
     keywords = {stars: evolution, stars: rotation, open clusters and associations: general, Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Astrophysics of Galaxies},
         year = 2023,
        month = sep,
       volume = {524},
       number = {3},
        pages = {3978-3999},
          doi = {10.1093/mnras/stad2048},
archivePrefix = {arXiv},
       eprint = {2307.02678},
 primaryClass = {astro-ph.SR},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.524.3978M},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{2023MNRAS.524.4315H,
       author = {{Hendriks}, D.~D. and {Izzard}, R.~G.},
        title = "{Mass-stream trajectories with non-synchronously rotating donors}",
      journal = {\mnras},
     keywords = {binaries: close, stars: mass-loss, accretion, accretion discs, Astrophysics - Solar and Stellar Astrophysics, Astrophysics - High Energy Astrophysical Phenomena},
         year = 2023,
        month = sep,
       volume = {524},
       number = {3},
        pages = {4315-4332},
          doi = {10.1093/mnras/stad2077},
archivePrefix = {arXiv},
       eprint = {2307.04600},
 primaryClass = {astro-ph.SR},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.524.4315H},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{2023MNRAS.tmp.3267Y,
       author = {{Yates}, Robert M. and {Hendriks}, David and {Vijayan}, Aswin P. and {Izzard}, Robert G. and {Thomas}, Peter A. and {Das}, Payel},
        title = "{The impact of binary stars on the dust and metal evolution of galaxies}",
      journal = {\mnras},
     keywords = {methods: analytical, methods: numerical, stars: binaries, galaxies: abundances, galaxies: evolution, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics},
         year = 2023,
        month = nov,
          doi = {10.1093/mnras/stad3419},
archivePrefix = {arXiv},
       eprint = {2310.15218},
 primaryClass = {astro-ph.GA},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.tmp.3267Y},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ A common requirement in science is to store and share large sets of simulation d

Users of high-level languages such as Perl or Python have access to associated-array data structures through dictionaries and hashes, respectively. These allow arbitrary data types to be stored in array-like structures. These are in turn accessed through key-value pairs which allow the value to be a further, nested associated array, allowing arbitrary nesting of data. Compiled low-level languages, like C and Fortran, are more suited to high-speed and repeated calculations typical in science. These languages lack native associated-array functionality. While there are pure hash-table solutions out there, such as `glib` [@glib_manual_hashtable] and `uthash` [@uthash_github], these do not combine a simple API for setting and adding to nested structures, a small library footprint, fast input and output, and standardised JSON output to easily interface with other languages and tools. `libcdict` provides an API for such functionality which allows `cdict`s to be nested in `cdict`s, hence arbitrarily-nested dictionaries of variables in C just as in Perl or Python. 

`libcdict` is written in C and provides an API through a set of C macros. Nested `cdict` structures have values in them set with a single line of code. `libcdict` has been used for the last year in the `binary_c` single- and binary-star population nucleosynthesis framework [@izzard:2004; @izzard:2006; @izzard:2009; @izzard:2018; @izzard:2023] which computes the evolution of millions of single- and binary-stellar systems in only a few hours using its `binary_c-python` Python frontend [@Hendriks:2023].  We provide `libcdict` as open-source code on Gitlab subject to the GPL3. `libcdict` also has a comprehensive test suite run through its configuration program `cdict-config`.
`libcdict` is written in C and provides an API through a set of C macros. Nested `cdict` structures have values in them set with a single line of code. `libcdict` has been used for the last year in the `binary_c` single- and binary-star population nucleosynthesis framework [@izzard:2004; @izzard:2006; @izzard:2009; @izzard:2018]. Recent works [@izzard:2023; @2023MNRAS.524.3978M; @2023MNRAS.524.4315H; @2023MNRAS.tmp.3267Y] compute the evolution of millions of single- and binary-stellar systems in only a few hours using its `binary_c-python` Python frontend [@Hendriks:2023].  We provide `libcdict` as open-source code on Gitlab subject to the GPL3. `libcdict` also has a comprehensive test suite run through its configuration program `cdict-config`.

# Using libcdict

@@ -51,6 +51,6 @@ We provide an interactive example made with `binary_c` and `binary_c-python` usi

# Acknowledgements

RGI acknowledges funding by STFC grants ST/L003910/1 and ST/R000603/1. DDH acknowledges funding by UKRI/UoS grant H120341A. We thank the authors of software used by `libcdict`, especially Troy Hanson and Arthur O'Dwyer for `uthash`, Ulf Adams and the `Ryū` team, Serge Zaitsev and the `jsmu` team, and Daniel Lemire for `fast double parser`.
RGI acknowledges funding by STFC grants ST/L003910/1, ST/L003910/2 and ST/R000603/1. DDH acknowledges funding by UKRI/UoS grant H120341A. We thank the authors of software used by `libcdict`, especially Troy Hanson and Arthur O'Dwyer for `uthash`, Ulf Adams and the `Ryū` team, Serge Zaitsev and the `jsmu` team, and Daniel Lemire for `fast double parser`.

# References
Loading