Closed afkcodes closed 2 years ago
hello @david-fong please help me here, i want to use this amazing library to create MxN puzzles
Hi Ashish. This library can create puzzles of size (N^2)x(N^2)
. If you want NxM
, take a look at Herbert Kociemba's sudoku project. NxM
is not a goal of this project.
If you actually want (N^2)x(N^2)
, carefully read the cpp folder's readme- particularly the "Using the Library" section and "Source Code" section.
Remember that if you want your Dart project to be able to call this library (as opposed to just using this library ahead of time to create a fixed collection of puzzles to draw from,) you still need to handle language bindings from C++ to dart, and also modify the library to implement a grid serialization/deserialization format to move grid data between this C++ library and your dart code. This library's current serialization functionality is still a work in progress and is more focused on compression and not speed.
In general, if you want to use this library (or probably any library not written in Dart), I think you should expect to have to learn a fair bit about the technologies the library is built on and the library itself. For this project, those technologies would be CMake and C++, and that covers a surprising amount of content. It's unfortunate, but I wouldn't try to sugar-coat things and say things are easy.
This library's puzzle generation functionality is still in its very early stages. I'm surprised you noticed it so soon. The current naive puzzle generation approach I am using quickly becomes infeasible for larger grid sizes (just generating one 25x25 puzzle starts taking over half an hour). If you are interested in the literature of efficient puzzle-setting, take a look at deadly patterns and the McGuire paper on finding 16-clue sudokus. Making such improvements is on the roadmap, but I work on this project for my own enjoyment and don't commit myself to any sort of deadline/timeline.
I should also remind you that this library doesn't have puzzle difficulty ranking/scoring as a goal. I don't know off the top of my head if there are any other projects that do that.
It seems you noticed the updated main readme, so I'd suggest you carefully read the section on the project goals and non-goals, and also the section on other existing projects.
If after doing all that you still want to try using this repo, I'd recommend installing CMake and gcc or clang via homebrew instead of using any tools distributed with XCode, which are made by apple and in my experience are a bit behind in following the latest C++ standards.
You are making a sudoku game for humans to play, right? If so, I am curious as to what grid size you intend to go up to. For me, I can't imagine myself attempting to solve a 25x25 sudoku without having a computer at least automatically apply solving techniques of singles, subsets, and intersections for me.
sorry @david-fong got this MxN thing a typo. i am making a game which would be NxN not more than 16x16 or 12x12 I tried running this project but failed there were so many options as shared on the image above.
for the difficulty rating part https://github.com/PseudoFish/Hodoku (hodoku) & https://github.com/1to9only/SukakuExplainer (SukakuExplainer) does this quite well
Taking a 30 second browse through the Hodoku and SukakuExplainer source code, it seems they do not support variable grid size- I saw files hardcoding size 9x9 parameters. That's going to be a problem for you to solve.
I gave you instructions in the above comment I made. Please read it carefully and follow my instructions there. In summary, I make a good effort to provide instructions and links to useful resources in order for a newcomer to get this project running. There is an inherent difficulty level to learning the tooling that I cannot prevent you from having to experience despite how much I would like that to be the case. I would appreciate if you made a good effort to try to follow my instructions before asking for help.
I'm not making any promises about providing any consistent help to you, but you can at least enable me to better understand what you need by publicizing information about your project: What are your goals? What is your target platform? In broad strokes, what's the architecture of your project when viewed as a system? Even if you don't have concrete details, you can at least state as much of your intended plan as you can. If you start providing this information in detail, you'll make it much less annoying for me to try to understand what you are trying to do: me having to ask you these questions and then wait for a reply, and then ask more questions is pretty frustrating.
It seems like this is a consistent problem with how you communicate with other sudoku library authors: you ask questions before spending the 2-20 minutes it takes to find out the answer, and don't provide much information about what you are looking for when you ask your question. I'd encourage you to improve in those regards.
I will happily answer your questions if I see that they are not answered already by the instructions I have provided.
In regards to your screenshot, most of those entries (Those starting with "Continuous") are related to CMake's in-built testing and continuous integration support (CTest). You can ignore them.
Thanks For suggestion i will try to improve myself on that front. Here is what i am doing right now.
Platform Supported:
The basic architecture that i have thought for now is to generate some puzzle and then create a backend to serve those puzzles to the frontend through an API. There might be more features that i can think of but this is what i have in my mind currently.
On the whole its just an Android or iOS app/game that user can download and play. I am also planning to add some features such as hint and stuff for which i am trying to figure out.
At later point of time i would also like to build a web/desktop version of it but i really don't know when its gonna happen. I am working on the android app now, that will be built on flutter using dart. i don't have to create dart bindings because i don't want to run this in client side, it will be a hassle for users to wait until the puzzle is generated.
This is what i have thought of at this point and the rating part the libraries above are more suitable for 9x9 as its the stantard that generally users play and the rater is quite good it seems (may not be consistent though)
The reason i was asking help to run this project is because i have little to no experience with cmake and c++ environments, it became overwhelming for me, will try to figure this out again. to be honest i was not able to understand the usage part of the CPP readme.
Sorry for my earlier replies and question if it didn't made sense.
Note: Keep in mind that this project is a work in progress. If it doesn't do something you need, you will either have to wait (if it is on the roadmap), or implement it yourself (which will require you to learn more about C++).
Here's a quick overview of the toolchain:
compiler
brew install gcc
or brew install llvm
(llvm is the underlying compiler technology that Clang is built on top of).build system
brew install ninja
build system configurer
brew install cmake
In VS Code, there is a command palette to perform IDE actions via commands like a CLI. I will describe what to do in terms of command palette commands instead of UI buttons since the UI is configurable and I don't know what yours is configured to look like. The command palette can be opened with ctrl+shift+P
.
File: Open Workspace from File
okiidoku.code-workspace
Extensions: Show Recommended Extensions
okiidoku.code-workspace
workspace again by default. if not, do it manually.CMake configure
. you can ignore and close them for now.CMake: Select a Kit
CMake: Select Variant
CMake: Configure
CMake: Build
.../okiidoku/cpp/build/Clang/apps/cli/okiidoku_cli
(if you chose Clang. otherwise the part of the path that says "Clang" would instead say "GCC")..../okiidoku/cpp/build/Clang
./apps/cli/okiidoku_cli
okiidoku_cli
application. It will print a help menu. you can close it by doing its "quit
" command.build/
folder instead of building directly under the build/
folder. Since I develop this project and often switch between Debug and Release, I prefer the Multi-Config mode, but I don't think it would provide as much benefit to you.I expect that you'll run into a problem somewhere in this process. Let me know what it is a try to provide as much detail as possible.
I estimate that you would have figured this all out within 2 hours or so of googling and reading the documentation links I provided. I wrote the above instructions because I understand that facing a bunch of new tooling can be intimidating.
This is a message for you after you have got things up and running: at this point you will need to seriously consider learning some C++. I guarantee you that my work on this library will not exactly fit your needs, and that some need of yours will not be on my roadmap. You can raise a feature request, but you should brace yourself for me to say no (and maybe even expect me to say no). Ie. If you are serious about using this library, you will need to do some work to suit it for your own needs, and that will require learning some C++. If you decide you are up for it, I can link you to helpful learning resources.
I had the setup done upto installing cmake, thanks for the detailed instruction.
Tried Building this as per the instructions, everything seems to run fine but it fails at CMake: build Step: attaching the error log.
[main] Building folder: cpp
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /Users/ashishkumar/okiidoku/cpp/build/Clang --config Release --target all --
[build] [10/32 3% :: 1.343] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/grid.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/grid.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/grid.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/grid.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/grid.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/grid.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/grid.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 6% :: 1.344] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/transform.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/transform.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/transform.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/transform.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/transform.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/transform.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/transform.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/morph/transform.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 9% :: 1.390] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/archive.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/archive.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/archive.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/archive.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/archive.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/archive.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/archive.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/archive.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 12% :: 1.421] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/rel_info.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/rel_info.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/rel_info.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/rel_info.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/rel_info.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/rel_info.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/rel_info.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/rel_info.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 15% :: 1.638] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/gen.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/gen.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/gen.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/gen.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/gen.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/gen.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/gen.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/gen.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 18% :: 1.677] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/serdes.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/serdes.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/serdes.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/serdes.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/serdes.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/serdes.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/serdes.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/serdes.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 21% :: 1.749] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/scramble.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/scramble.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/scramble.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/scramble.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/morph/scramble.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/scramble.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/morph/scramble.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/morph/scramble.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/morph/transform.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 25% :: 1.802] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/print_2d.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/print_2d.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/print_2d.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/print_2d.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/print_2d.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/print_2d.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/print_2d.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/print_2d.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/grid.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] [10/32 28% :: 1.823] Building CXX object libs/cli_utils/CMakeFiles/okiidoku_cli_utils.dir/src/okiidoku_cli_utils/console_setup.cpp.o
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] [10/32 31% :: 1.857] Building CXX object libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/o2_bit_arr.cpp.o
[build] FAILED: libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/o2_bit_arr.cpp.o
[build] /usr/bin/clang++ -DOKIIDOKU_TARGET_SUPPORTS_X86_BMI2 -Dokiidoku_EXPORTS -I/Users/ashishkumar/okiidoku/cpp/build/Clang/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include -I/Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src -isystem /Users/ashishkumar/okiidoku/cpp/build/Clang/_deps/range-v3-src/include -O3 -DNDEBUG -flto=thin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-semantic-interposition -march=native -Wall -Wextra -Wpedantic -pedantic-errors -Wfatal-errors -Wold-style-cast -Wvla -Wconversion -Wsign-conversion -Wdouble-promotion -Wdisabled-optimization -Wformat=2 -Wcast-qual -Wcast-align -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wenum-compare -Wenum-conversion -Wmissing-declarations -Wunused-macros -Wundef -Wimplicit-fallthrough -std=c++20 -MD -MT libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/o2_bit_arr.cpp.o -MF libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/o2_bit_arr.cpp.o.d -o libs/okiidoku/CMakeFiles/okiidoku.dir/src/okiidoku/o2_bit_arr.cpp.o -c /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/o2_bit_arr.cpp
[build] clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/o2_bit_arr.cpp:1:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/src/okiidoku/o2_bit_arr.hpp:4:
[build] In file included from /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/ints.hpp:4:
[build] /Users/ashishkumar/okiidoku/cpp/libs/okiidoku/include/okiidoku/detail/order_templates.hpp:145:33: fatal error: no template named 'compare_three_way_result_t' in namespace 'std'
[build] [[nodiscard, gnu::pure]] std::compare_three_way_result_t<typename Adaptor::template type<compiled_orders[0]>> operator<=>(
[build] ~~~~~^
[build] 1 error generated.
[build] ninja: build stopped: subcommand failed.
[build] Build finished with exit code 1
While configuration it asked for selecting clang: i was getting two options let me know if there is any problem here
vscode isn't detecting the clang compiler installed via homebrew because homebrew purposely doesn't install it deeply into the system to avoid it clashing with apple-clang. The solution is to either define a CMake toolchain file or a kit that points to the correct compiler path. I tried doing that on my mac machine and ran into more problems that I don't want to spend time on right now. Try using gcc instead. It looks like you have one installed. It might just be a symlink to apple-clang. You can check if it's from homebrew by checking the output of g++-11 --version
. If that's installed from homebrew you can use that one. Otherwise install it from homebrew first and then re-scan for kits.
Please git pull
first.
Note: the gcc I got from homebrew didn't seem to support interprocedural optimization (a compiler optimization that can make the final code run faster). I don't know why.
I had the setup done upto installing cmake
Next time, tell me exactly where you have gotten to. We're communicating asynchronously. Save me the effort of either asking you a question (and waiting for your answer), or taking the time to offer you information that what you say indicates you need, only to find out you actually didn't need it. Both are frustrating to me.
sorry got sick, finally was able to compile was able to run it. will go through the docs now to generate some puzzles, thanks David. was able to see the emojis puzzle, is there a way i can get the string format of the puzzle something like this: The ones that are generated are the solved grid basically, also if i want to generate puzzles with solution in a string format what i would have to do ?
For ex : .45.3......8...7...7.5...9....3..8.....6.9.4363...4..1.514..6.........…
The CLI currently has no command to generate a puzzle. I can add one. The current puzzle generation method is just a draft. There's nothing special about it. It is a naive random implementation. In the future I will try to achieve something more efficient and possibly able to target a high or low number of givens.
The string format you are describing is not implemented. I previously didn't implement this because I didn't have a need for it, and nobody else was using this library, and there isn't an obvious way to implement it for grids larger than 9x9. For 16x16, one can use hex characters, for 25x25 and 36x36 I think there's just enough characters when using characters in [a-zA-Z0-9]
. I'll consider adding a library function that only implements for 9x9, 16x16, 25x25, and 36x26. Remember, one of my top priorities for this library is supporting variable grid size, so that's why I'm a little wary of implementing library functionality for only certain smaller grid sizes.
I can probably finish implementing this today, but no promises. I'm going to close this issue now.
I would prefer that you use the discussions functionality of GitHub to ask questions. There's a "Q&A" section there. If you actually find a bug in the library, then yes- report it using the issues functionality. For anything else, prefer the discussions page. Even this conversation about building the library I would have preferred to have there.
Hello David, Ashish here again, seems like this project is now able to generate puzzles. and this will surely gonna help me in the game. I was trying to run this with VSCode, but got confused how to do that. can you help with that ?
I am not able to understand, which option to choose there are so many options i here. I am using a mac system.