From 9a32c48098272f68a946fc9e6745bd9421023910 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Sat, 9 Oct 2021 11:34:21 -0400 Subject: [PATCH] Cleaning up the single-header demo. (#1731) * Cleaning up the single-header demo. * Updating xcode --- .github/workflows/macos-11.yml | 2 +- singleheader/amalgamate_demo.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/macos-11.yml b/.github/workflows/macos-11.yml index 24e1a96b..325e0e4d 100644 --- a/.github/workflows/macos-11.yml +++ b/.github/workflows/macos-11.yml @@ -16,7 +16,7 @@ jobs: key: ${{ hashFiles('dependencies/CMakeLists.txt') }} - name: Use cmake run: | - xcversion select 11.2.1 + xcversion select 11.7 mkdir builddebug && cd builddebug && cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF .. && diff --git a/singleheader/amalgamate_demo.cpp b/singleheader/amalgamate_demo.cpp index 37a54b13..8026ae6f 100644 --- a/singleheader/amalgamate_demo.cpp +++ b/singleheader/amalgamate_demo.cpp @@ -7,7 +7,7 @@ int main(int argc, char *argv[]) { std::cerr << "Please specify at least one file name and" << std::endl; std::cerr << "up to two files." << std::endl; std::cerr << "The first file should be a JSON document." << std::endl; - std::cerr << "The secod file should container many JSON documents." + std::cerr << "The second file should container many JSON documents." << std::endl; std::cerr << "Try the test files: jsonexamples/twitter.json " "jsonexamples/amazon_cellphones.ndjson" @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) { std::cout << error << std::endl; return EXIT_FAILURE; } - std::cout << "document has the following type at the root: " << type + std::cout << "if valid, the document has the following type at the root: " << type << std::endl; if (argc == 2) { @@ -73,8 +73,9 @@ int main(int argc, char *argv[]) { std::cout << error << std::endl; return EXIT_FAILURE; } else { - std::cout << "iterate_many valid" << std::endl; - std::cout << "found " << counter << " documents" << std::endl; + std::cout << "I found " << counter << " potential JSON documents." << std::endl; } + std::cout << "For more information on how simdjson works, please refer to our documentation." << std::endl; + std::cout << "https://github.com/simdjson/simdjson/blob/master/doc/basics.md" << std::endl; return EXIT_SUCCESS; }