diff --git a/.cache/clangd/index/ansicolor_sink-inl.h.F6DF9B10233D6CD1.idx b/.cache/clangd/index/ansicolor_sink-inl.h.F6DF9B10233D6CD1.idx new file mode 100644 index 0000000..c14f643 Binary files /dev/null and b/.cache/clangd/index/ansicolor_sink-inl.h.F6DF9B10233D6CD1.idx differ diff --git a/.cache/clangd/index/ansicolor_sink.h.11D67DB603568A97.idx b/.cache/clangd/index/ansicolor_sink.h.11D67DB603568A97.idx new file mode 100644 index 0000000..0192e00 Binary files /dev/null and b/.cache/clangd/index/ansicolor_sink.h.11D67DB603568A97.idx differ diff --git a/.cache/clangd/index/async.cpp.5F2AF3630C2DFBEC.idx b/.cache/clangd/index/async.cpp.5F2AF3630C2DFBEC.idx new file mode 100644 index 0000000..a7bfc16 Binary files /dev/null and b/.cache/clangd/index/async.cpp.5F2AF3630C2DFBEC.idx differ diff --git a/.cache/clangd/index/async.h.53DDB54BF23559C0.idx b/.cache/clangd/index/async.h.53DDB54BF23559C0.idx new file mode 100644 index 0000000..a9af51f Binary files /dev/null and b/.cache/clangd/index/async.h.53DDB54BF23559C0.idx differ diff --git a/.cache/clangd/index/async_logger-inl.h.E4E1324873D29838.idx b/.cache/clangd/index/async_logger-inl.h.E4E1324873D29838.idx new file mode 100644 index 0000000..e76519e Binary files /dev/null and b/.cache/clangd/index/async_logger-inl.h.E4E1324873D29838.idx differ diff --git a/.cache/clangd/index/async_logger.h.CCAD116BD4A511F1.idx b/.cache/clangd/index/async_logger.h.CCAD116BD4A511F1.idx new file mode 100644 index 0000000..e9b5a8e Binary files /dev/null and b/.cache/clangd/index/async_logger.h.CCAD116BD4A511F1.idx differ diff --git a/.cache/clangd/index/backtracer-inl.h.4110A01BD7D1A4F6.idx b/.cache/clangd/index/backtracer-inl.h.4110A01BD7D1A4F6.idx new file mode 100644 index 0000000..e42b09f Binary files /dev/null and b/.cache/clangd/index/backtracer-inl.h.4110A01BD7D1A4F6.idx differ diff --git a/.cache/clangd/index/backtracer.h.F8B4501C91518DFD.idx b/.cache/clangd/index/backtracer.h.F8B4501C91518DFD.idx new file mode 100644 index 0000000..6f95078 Binary files /dev/null and b/.cache/clangd/index/backtracer.h.F8B4501C91518DFD.idx differ diff --git a/.cache/clangd/index/base.h.189A0DB29163B40C.idx b/.cache/clangd/index/base.h.189A0DB29163B40C.idx new file mode 100644 index 0000000..beb6172 Binary files /dev/null and b/.cache/clangd/index/base.h.189A0DB29163B40C.idx differ diff --git a/.cache/clangd/index/base.h.F336BAE12ABFEC7C.idx b/.cache/clangd/index/base.h.F336BAE12ABFEC7C.idx new file mode 100644 index 0000000..2164776 Binary files /dev/null and b/.cache/clangd/index/base.h.F336BAE12ABFEC7C.idx differ diff --git a/.cache/clangd/index/base_sink-inl.h.B13EEC68EE6029D7.idx b/.cache/clangd/index/base_sink-inl.h.B13EEC68EE6029D7.idx new file mode 100644 index 0000000..f562372 Binary files /dev/null and b/.cache/clangd/index/base_sink-inl.h.B13EEC68EE6029D7.idx differ diff --git a/.cache/clangd/index/base_sink.h.F3B57BA7ACF45970.idx b/.cache/clangd/index/base_sink.h.F3B57BA7ACF45970.idx new file mode 100644 index 0000000..d97dc4b Binary files /dev/null and b/.cache/clangd/index/base_sink.h.F3B57BA7ACF45970.idx differ diff --git a/.cache/clangd/index/basic_file_sink-inl.h.623518D46D9370B5.idx b/.cache/clangd/index/basic_file_sink-inl.h.623518D46D9370B5.idx new file mode 100644 index 0000000..a7238ca Binary files /dev/null and b/.cache/clangd/index/basic_file_sink-inl.h.623518D46D9370B5.idx differ diff --git a/.cache/clangd/index/basic_file_sink.h.B2A9EE454AAA4CE9.idx b/.cache/clangd/index/basic_file_sink.h.B2A9EE454AAA4CE9.idx new file mode 100644 index 0000000..80fc0c8 Binary files /dev/null and b/.cache/clangd/index/basic_file_sink.h.B2A9EE454AAA4CE9.idx differ diff --git a/.cache/clangd/index/bundled_fmtlib_format.cpp.BF258F2EDF128F49.idx b/.cache/clangd/index/bundled_fmtlib_format.cpp.BF258F2EDF128F49.idx new file mode 100644 index 0000000..680d83d Binary files /dev/null and b/.cache/clangd/index/bundled_fmtlib_format.cpp.BF258F2EDF128F49.idx differ diff --git a/.cache/clangd/index/cfg.cpp.779E6AD5DFC6DAC3.idx b/.cache/clangd/index/cfg.cpp.779E6AD5DFC6DAC3.idx new file mode 100644 index 0000000..845358a Binary files /dev/null and b/.cache/clangd/index/cfg.cpp.779E6AD5DFC6DAC3.idx differ diff --git a/.cache/clangd/index/circular_q.h.621C8F45944E7438.idx b/.cache/clangd/index/circular_q.h.621C8F45944E7438.idx new file mode 100644 index 0000000..564c43d Binary files /dev/null and b/.cache/clangd/index/circular_q.h.621C8F45944E7438.idx differ diff --git a/.cache/clangd/index/color_sinks.cpp.BD83E1A2FBED6C07.idx b/.cache/clangd/index/color_sinks.cpp.BD83E1A2FBED6C07.idx new file mode 100644 index 0000000..14dded1 Binary files /dev/null and b/.cache/clangd/index/color_sinks.cpp.BD83E1A2FBED6C07.idx differ diff --git a/.cache/clangd/index/common-inl.h.CC5E9AFFD40AFC52.idx b/.cache/clangd/index/common-inl.h.CC5E9AFFD40AFC52.idx new file mode 100644 index 0000000..15f88c8 Binary files /dev/null and b/.cache/clangd/index/common-inl.h.CC5E9AFFD40AFC52.idx differ diff --git a/.cache/clangd/index/common.h.00C9651CD11B4AB3.idx b/.cache/clangd/index/common.h.00C9651CD11B4AB3.idx new file mode 100644 index 0000000..865469c Binary files /dev/null and b/.cache/clangd/index/common.h.00C9651CD11B4AB3.idx differ diff --git a/.cache/clangd/index/console_globals.h.3461B5549B731629.idx b/.cache/clangd/index/console_globals.h.3461B5549B731629.idx new file mode 100644 index 0000000..b35a6b3 Binary files /dev/null and b/.cache/clangd/index/console_globals.h.3461B5549B731629.idx differ diff --git a/.cache/clangd/index/day-1-solution.cpp.28FE50EDF6BDF724.idx b/.cache/clangd/index/day-1-solution.cpp.28FE50EDF6BDF724.idx new file mode 100644 index 0000000..42d9792 Binary files /dev/null and b/.cache/clangd/index/day-1-solution.cpp.28FE50EDF6BDF724.idx differ diff --git a/.cache/clangd/index/file_helper-inl.h.42973DC6EC3D1429.idx b/.cache/clangd/index/file_helper-inl.h.42973DC6EC3D1429.idx new file mode 100644 index 0000000..37acf69 Binary files /dev/null and b/.cache/clangd/index/file_helper-inl.h.42973DC6EC3D1429.idx differ diff --git a/.cache/clangd/index/file_helper.h.D64F6DDD6ED7039D.idx b/.cache/clangd/index/file_helper.h.D64F6DDD6ED7039D.idx new file mode 100644 index 0000000..071a586 Binary files /dev/null and b/.cache/clangd/index/file_helper.h.D64F6DDD6ED7039D.idx differ diff --git a/.cache/clangd/index/file_sinks.cpp.907F1C49C3B86C79.idx b/.cache/clangd/index/file_sinks.cpp.907F1C49C3B86C79.idx new file mode 100644 index 0000000..92fc363 Binary files /dev/null and b/.cache/clangd/index/file_sinks.cpp.907F1C49C3B86C79.idx differ diff --git a/.cache/clangd/index/fmt.h.A16D9DB7E8343801.idx b/.cache/clangd/index/fmt.h.A16D9DB7E8343801.idx new file mode 100644 index 0000000..d18b944 Binary files /dev/null and b/.cache/clangd/index/fmt.h.A16D9DB7E8343801.idx differ diff --git a/.cache/clangd/index/fmt_helper.h.CE6DF02EF51E92B1.idx b/.cache/clangd/index/fmt_helper.h.CE6DF02EF51E92B1.idx new file mode 100644 index 0000000..c01964d Binary files /dev/null and b/.cache/clangd/index/fmt_helper.h.CE6DF02EF51E92B1.idx differ diff --git a/.cache/clangd/index/format-inl.h.1D4C4794146AC28D.idx b/.cache/clangd/index/format-inl.h.1D4C4794146AC28D.idx new file mode 100644 index 0000000..bdf9f32 Binary files /dev/null and b/.cache/clangd/index/format-inl.h.1D4C4794146AC28D.idx differ diff --git a/.cache/clangd/index/format-inl.h.907B53722659B8B3.idx b/.cache/clangd/index/format-inl.h.907B53722659B8B3.idx new file mode 100644 index 0000000..49e2b04 Binary files /dev/null and b/.cache/clangd/index/format-inl.h.907B53722659B8B3.idx differ diff --git a/.cache/clangd/index/format.cc.5EB23540C8AF5763.idx b/.cache/clangd/index/format.cc.5EB23540C8AF5763.idx new file mode 100644 index 0000000..3707205 Binary files /dev/null and b/.cache/clangd/index/format.cc.5EB23540C8AF5763.idx differ diff --git a/.cache/clangd/index/format.h.71E6D1C322B7D1E4.idx b/.cache/clangd/index/format.h.71E6D1C322B7D1E4.idx new file mode 100644 index 0000000..01569da Binary files /dev/null and b/.cache/clangd/index/format.h.71E6D1C322B7D1E4.idx differ diff --git a/.cache/clangd/index/format.h.F44B888312C83702.idx b/.cache/clangd/index/format.h.F44B888312C83702.idx new file mode 100644 index 0000000..43cbe08 Binary files /dev/null and b/.cache/clangd/index/format.h.F44B888312C83702.idx differ diff --git a/.cache/clangd/index/formatter.h.4B0BB20658A4713C.idx b/.cache/clangd/index/formatter.h.4B0BB20658A4713C.idx new file mode 100644 index 0000000..23f56ac Binary files /dev/null and b/.cache/clangd/index/formatter.h.4B0BB20658A4713C.idx differ diff --git a/.cache/clangd/index/helpers-inl.h.9CD66DB3ED3BA1C9.idx b/.cache/clangd/index/helpers-inl.h.9CD66DB3ED3BA1C9.idx new file mode 100644 index 0000000..81f5d2d Binary files /dev/null and b/.cache/clangd/index/helpers-inl.h.9CD66DB3ED3BA1C9.idx differ diff --git a/.cache/clangd/index/helpers.h.89E2BA8FCE2A76C1.idx b/.cache/clangd/index/helpers.h.89E2BA8FCE2A76C1.idx new file mode 100644 index 0000000..2bfff29 Binary files /dev/null and b/.cache/clangd/index/helpers.h.89E2BA8FCE2A76C1.idx differ diff --git a/.cache/clangd/index/log_msg-inl.h.FC1A45D6A73B6F10.idx b/.cache/clangd/index/log_msg-inl.h.FC1A45D6A73B6F10.idx new file mode 100644 index 0000000..fb3bede Binary files /dev/null and b/.cache/clangd/index/log_msg-inl.h.FC1A45D6A73B6F10.idx differ diff --git a/.cache/clangd/index/log_msg.h.E1F1957B0FF11086.idx b/.cache/clangd/index/log_msg.h.E1F1957B0FF11086.idx new file mode 100644 index 0000000..f9be94e Binary files /dev/null and b/.cache/clangd/index/log_msg.h.E1F1957B0FF11086.idx differ diff --git a/.cache/clangd/index/log_msg_buffer-inl.h.4E6F33A2535C8E76.idx b/.cache/clangd/index/log_msg_buffer-inl.h.4E6F33A2535C8E76.idx new file mode 100644 index 0000000..49068c7 Binary files /dev/null and b/.cache/clangd/index/log_msg_buffer-inl.h.4E6F33A2535C8E76.idx differ diff --git a/.cache/clangd/index/log_msg_buffer.h.303973391A6AC474.idx b/.cache/clangd/index/log_msg_buffer.h.303973391A6AC474.idx new file mode 100644 index 0000000..7dfbac5 Binary files /dev/null and b/.cache/clangd/index/log_msg_buffer.h.303973391A6AC474.idx differ diff --git a/.cache/clangd/index/logger-inl.h.8327168253C4E4DA.idx b/.cache/clangd/index/logger-inl.h.8327168253C4E4DA.idx new file mode 100644 index 0000000..81c33f1 Binary files /dev/null and b/.cache/clangd/index/logger-inl.h.8327168253C4E4DA.idx differ diff --git a/.cache/clangd/index/logger.h.9BD66C070B60783E.idx b/.cache/clangd/index/logger.h.9BD66C070B60783E.idx new file mode 100644 index 0000000..e95f787 Binary files /dev/null and b/.cache/clangd/index/logger.h.9BD66C070B60783E.idx differ diff --git a/.cache/clangd/index/mdc.h.2018804443553076.idx b/.cache/clangd/index/mdc.h.2018804443553076.idx new file mode 100644 index 0000000..ae92e79 Binary files /dev/null and b/.cache/clangd/index/mdc.h.2018804443553076.idx differ diff --git a/.cache/clangd/index/mpmc_blocking_q.h.C39B978DE1CC6990.idx b/.cache/clangd/index/mpmc_blocking_q.h.C39B978DE1CC6990.idx new file mode 100644 index 0000000..8ae5006 Binary files /dev/null and b/.cache/clangd/index/mpmc_blocking_q.h.C39B978DE1CC6990.idx differ diff --git a/.cache/clangd/index/null_mutex.h.685374F2463AB7AA.idx b/.cache/clangd/index/null_mutex.h.685374F2463AB7AA.idx new file mode 100644 index 0000000..a690c9e Binary files /dev/null and b/.cache/clangd/index/null_mutex.h.685374F2463AB7AA.idx differ diff --git a/.cache/clangd/index/os-inl.h.48EED081EDA69359.idx b/.cache/clangd/index/os-inl.h.48EED081EDA69359.idx new file mode 100644 index 0000000..3c34581 Binary files /dev/null and b/.cache/clangd/index/os-inl.h.48EED081EDA69359.idx differ diff --git a/.cache/clangd/index/os.cc.14EE6193B5C7364F.idx b/.cache/clangd/index/os.cc.14EE6193B5C7364F.idx new file mode 100644 index 0000000..7fd7751 Binary files /dev/null and b/.cache/clangd/index/os.cc.14EE6193B5C7364F.idx differ diff --git a/.cache/clangd/index/os.h.2C3A178AE19E0461.idx b/.cache/clangd/index/os.h.2C3A178AE19E0461.idx new file mode 100644 index 0000000..e313058 Binary files /dev/null and b/.cache/clangd/index/os.h.2C3A178AE19E0461.idx differ diff --git a/.cache/clangd/index/os.h.3E9637FA094CEEA1.idx b/.cache/clangd/index/os.h.3E9637FA094CEEA1.idx new file mode 100644 index 0000000..b0c15c3 Binary files /dev/null and b/.cache/clangd/index/os.h.3E9637FA094CEEA1.idx differ diff --git a/.cache/clangd/index/pattern_formatter-inl.h.7C675CD177C0E7A2.idx b/.cache/clangd/index/pattern_formatter-inl.h.7C675CD177C0E7A2.idx new file mode 100644 index 0000000..f4e3ebb Binary files /dev/null and b/.cache/clangd/index/pattern_formatter-inl.h.7C675CD177C0E7A2.idx differ diff --git a/.cache/clangd/index/pattern_formatter.h.4AD2683EDACB0F6A.idx b/.cache/clangd/index/pattern_formatter.h.4AD2683EDACB0F6A.idx new file mode 100644 index 0000000..a10edb9 Binary files /dev/null and b/.cache/clangd/index/pattern_formatter.h.4AD2683EDACB0F6A.idx differ diff --git a/.cache/clangd/index/periodic_worker-inl.h.FF14A99D6F2786F1.idx b/.cache/clangd/index/periodic_worker-inl.h.FF14A99D6F2786F1.idx new file mode 100644 index 0000000..32e75cf Binary files /dev/null and b/.cache/clangd/index/periodic_worker-inl.h.FF14A99D6F2786F1.idx differ diff --git a/.cache/clangd/index/periodic_worker.h.6F9D54192043E8C9.idx b/.cache/clangd/index/periodic_worker.h.6F9D54192043E8C9.idx new file mode 100644 index 0000000..27906b0 Binary files /dev/null and b/.cache/clangd/index/periodic_worker.h.6F9D54192043E8C9.idx differ diff --git a/.cache/clangd/index/registry-inl.h.92DB61EE2468DDEF.idx b/.cache/clangd/index/registry-inl.h.92DB61EE2468DDEF.idx new file mode 100644 index 0000000..1c2380b Binary files /dev/null and b/.cache/clangd/index/registry-inl.h.92DB61EE2468DDEF.idx differ diff --git a/.cache/clangd/index/registry.h.3EE8D9FF0535995F.idx b/.cache/clangd/index/registry.h.3EE8D9FF0535995F.idx new file mode 100644 index 0000000..eb1296c Binary files /dev/null and b/.cache/clangd/index/registry.h.3EE8D9FF0535995F.idx differ diff --git a/.cache/clangd/index/rotating_file_sink-inl.h.721770E0810EBDE3.idx b/.cache/clangd/index/rotating_file_sink-inl.h.721770E0810EBDE3.idx new file mode 100644 index 0000000..f72167b Binary files /dev/null and b/.cache/clangd/index/rotating_file_sink-inl.h.721770E0810EBDE3.idx differ diff --git a/.cache/clangd/index/rotating_file_sink.h.8DD805DAA0630223.idx b/.cache/clangd/index/rotating_file_sink.h.8DD805DAA0630223.idx new file mode 100644 index 0000000..dff851e Binary files /dev/null and b/.cache/clangd/index/rotating_file_sink.h.8DD805DAA0630223.idx differ diff --git a/.cache/clangd/index/sink-inl.h.71A7B93EDA44C3F9.idx b/.cache/clangd/index/sink-inl.h.71A7B93EDA44C3F9.idx new file mode 100644 index 0000000..369efa5 Binary files /dev/null and b/.cache/clangd/index/sink-inl.h.71A7B93EDA44C3F9.idx differ diff --git a/.cache/clangd/index/sink.h.72967F1D24564165.idx b/.cache/clangd/index/sink.h.72967F1D24564165.idx new file mode 100644 index 0000000..af98caf Binary files /dev/null and b/.cache/clangd/index/sink.h.72967F1D24564165.idx differ diff --git a/.cache/clangd/index/spdlog-inl.h.EB0605BF510D21F0.idx b/.cache/clangd/index/spdlog-inl.h.EB0605BF510D21F0.idx new file mode 100644 index 0000000..58b284e Binary files /dev/null and b/.cache/clangd/index/spdlog-inl.h.EB0605BF510D21F0.idx differ diff --git a/.cache/clangd/index/spdlog.cpp.9E330F55F8916FF7.idx b/.cache/clangd/index/spdlog.cpp.9E330F55F8916FF7.idx new file mode 100644 index 0000000..0e162c5 Binary files /dev/null and b/.cache/clangd/index/spdlog.cpp.9E330F55F8916FF7.idx differ diff --git a/.cache/clangd/index/spdlog.h.5E4C9BD3675ED292.idx b/.cache/clangd/index/spdlog.h.5E4C9BD3675ED292.idx new file mode 100644 index 0000000..3c77e48 Binary files /dev/null and b/.cache/clangd/index/spdlog.h.5E4C9BD3675ED292.idx differ diff --git a/.cache/clangd/index/stdout_color_sinks-inl.h.4302AD5DF9FABC9F.idx b/.cache/clangd/index/stdout_color_sinks-inl.h.4302AD5DF9FABC9F.idx new file mode 100644 index 0000000..9748ee8 Binary files /dev/null and b/.cache/clangd/index/stdout_color_sinks-inl.h.4302AD5DF9FABC9F.idx differ diff --git a/.cache/clangd/index/stdout_color_sinks.h.14B5A7F5E82AA574.idx b/.cache/clangd/index/stdout_color_sinks.h.14B5A7F5E82AA574.idx new file mode 100644 index 0000000..dc85f22 Binary files /dev/null and b/.cache/clangd/index/stdout_color_sinks.h.14B5A7F5E82AA574.idx differ diff --git a/.cache/clangd/index/stdout_sinks-inl.h.F7AE0B819EE86D0E.idx b/.cache/clangd/index/stdout_sinks-inl.h.F7AE0B819EE86D0E.idx new file mode 100644 index 0000000..a23b7fc Binary files /dev/null and b/.cache/clangd/index/stdout_sinks-inl.h.F7AE0B819EE86D0E.idx differ diff --git a/.cache/clangd/index/stdout_sinks.cpp.CB1CA82C0F13532A.idx b/.cache/clangd/index/stdout_sinks.cpp.CB1CA82C0F13532A.idx new file mode 100644 index 0000000..ae4f492 Binary files /dev/null and b/.cache/clangd/index/stdout_sinks.cpp.CB1CA82C0F13532A.idx differ diff --git a/.cache/clangd/index/stdout_sinks.h.2BCA38EE37D5946A.idx b/.cache/clangd/index/stdout_sinks.h.2BCA38EE37D5946A.idx new file mode 100644 index 0000000..cc26a99 Binary files /dev/null and b/.cache/clangd/index/stdout_sinks.h.2BCA38EE37D5946A.idx differ diff --git a/.cache/clangd/index/synchronous_factory.h.20C2881D0C969E53.idx b/.cache/clangd/index/synchronous_factory.h.20C2881D0C969E53.idx new file mode 100644 index 0000000..8b16839 Binary files /dev/null and b/.cache/clangd/index/synchronous_factory.h.20C2881D0C969E53.idx differ diff --git a/.cache/clangd/index/thread_pool-inl.h.A6BF5C480393DEFD.idx b/.cache/clangd/index/thread_pool-inl.h.A6BF5C480393DEFD.idx new file mode 100644 index 0000000..4913340 Binary files /dev/null and b/.cache/clangd/index/thread_pool-inl.h.A6BF5C480393DEFD.idx differ diff --git a/.cache/clangd/index/thread_pool.h.3A2C54B95C7A196D.idx b/.cache/clangd/index/thread_pool.h.3A2C54B95C7A196D.idx new file mode 100644 index 0000000..6ae784a Binary files /dev/null and b/.cache/clangd/index/thread_pool.h.3A2C54B95C7A196D.idx differ diff --git a/.cache/clangd/index/tweakme.h.7120E2B6B34DDECD.idx b/.cache/clangd/index/tweakme.h.7120E2B6B34DDECD.idx new file mode 100644 index 0000000..1b3e291 Binary files /dev/null and b/.cache/clangd/index/tweakme.h.7120E2B6B34DDECD.idx differ diff --git a/.cache/clangd/index/version.h.281FCBFAD13EBCB9.idx b/.cache/clangd/index/version.h.281FCBFAD13EBCB9.idx new file mode 100644 index 0000000..72d66f3 Binary files /dev/null and b/.cache/clangd/index/version.h.281FCBFAD13EBCB9.idx differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f91273 --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# OS junk +.DS_Store +Thumbs.db + +# Editor settings +.vscode/** +.idea/** +*.swp +*.swo + +# Build system metadata (keep actual build dirs tracked) +CMakeFiles/** +CMakeCache.txt +cmake_install.cmake +Makefile +compile_commands.json + +# Logs and temp files +*.log +*.tmp +*.bak +*.old + +build/** +*.toml +.cache/** + + +**/*.aux +**/*.fdb_latexmk +**/*.fls +**/*.log +**/*.synctex.gz +**/*.blg +**/*.bcf +**/*.run.xml +**/*.bbl + +testcases/* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9b0561e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "external/fmt"] + path = external/fmt + url = https://github.com/fmtlib/fmt +[submodule "external/spdlog"] + path = external/spdlog + url = https://github.com/gabime/spdlog diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..33533f9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,129 @@ +cmake_minimum_required(VERSION 3.22) + +# ----------------------------- +# Safely force Clang +# ----------------------------- +if(NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER clang CACHE STRING "C compiler" FORCE) +endif() +if(NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER clang++ CACHE STRING "C++ compiler" FORCE) +endif() + +# ----------------------------- +# Project setup +# ----------------------------- +project(advent-of-code + LANGUAGES CXX + VERSION 2025.12 +) + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type") + +# ----------------------------- +# Dependencies +# ----------------------------- +add_subdirectory(external/fmt) +add_subdirectory(external/spdlog) + +set(COMMON_LIBS fmt::fmt spdlog::spdlog) + +# ----------------------------- +# 1. Collect ALL .cpp files under src/ +# ----------------------------- +file(GLOB_RECURSE ALL_CPP_FILES + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + "src/*.cpp" +) + +# ----------------------------- +# 2. Separate day solution mains from everything else +# ----------------------------- +set(DAY_MAIN_PATTERN "^day-[0-9]+-solution\\.cpp$") + +set(DAY_MAINS "") +set(COMMON_SOURCES "") + +foreach(file ${ALL_CPP_FILES}) + get_filename_component(fname ${file} NAME) + if(fname MATCHES ${DAY_MAIN_PATTERN}) + list(APPEND DAY_MAINS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + else() + list(APPEND COMMON_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + endif() +endforeach() + +# ----------------------------- +# 3. Include directories (all subfolders under src/) +# ----------------------------- +file(GLOB_RECURSE SRC_SUBDIRS LIST_DIRECTORIES true "src/*") +set(PROJECT_INCLUDE_DIRS "") +foreach(dir ${SRC_SUBDIRS}) + if(IS_DIRECTORY ${dir}) + list(APPEND PROJECT_INCLUDE_DIRS ${dir}) + endif() +endforeach() + +# ----------------------------- +# 4. Common code → object library (only if we actually have common files) +# ----------------------------- +if(COMMON_SOURCES) + add_library(common_objects OBJECT ${COMMON_SOURCES}) + target_include_directories(common_objects PRIVATE ${PROJECT_INCLUDE_DIRS}) + target_link_libraries(common_objects PRIVATE ${COMMON_LIBS}) + target_compile_features(common_objects PRIVATE cxx_std_23) +else() + # Create a dummy interface target so the rest of the script stays simple + add_library(common_objects INTERFACE) + message(STATUS "No common source files found – each day will compile independently") +endif() + +# ----------------------------- +# 5. Build one executable per day solution +# ----------------------------- +foreach(MAIN_FILE ${DAY_MAINS}) + get_filename_component(MAIN_NAME ${MAIN_FILE} NAME_WE) # day-1-solution + set(EXE_NAME "aoc-${MAIN_NAME}") + + add_executable(${EXE_NAME} ${MAIN_FILE}) + + # If we have common_objects as OBJECT library → reuse compiled objects + # Otherwise it's just an INTERFACE → nothing added + if(COMMON_SOURCES) + target_sources(${EXE_NAME} PRIVATE $) + endif() + + target_include_directories(${EXE_NAME} PRIVATE ${PROJECT_INCLUDE_DIRS}) + target_link_libraries(${EXE_NAME} PRIVATE ${COMMON_LIBS} common_objects) + target_compile_features(${EXE_NAME} PRIVATE cxx_std_23) + + # Warnings + optimizations + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") + target_compile_options(${EXE_NAME} PRIVATE + -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Wformat=2 -Werror=main + ) + endif() + + target_compile_options(${EXE_NAME} PRIVATE -O3 -march=native) + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") + target_link_options(${EXE_NAME} PRIVATE -flto=auto) + endif() +endforeach() + +# ----------------------------- +# Final summary +# ----------------------------- +list(LENGTH DAY_MAINS DAY_COUNT) +message(STATUS "Advent of Code 2025 – Building ${DAY_COUNT} solution(s):") +foreach(MAIN ${DAY_MAINS}) + get_filename_component(NAME ${MAIN} NAME) + message(STATUS " • ${NAME} → aoc-${NAME_WE}") +endforeach() + +if(NOT DAY_MAINS) + message(FATAL_ERROR "No files matching 'day-N-solution.cpp' found in src/ – nothing to build!") +endif() diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 880c823..0000000 --- a/LICENSE +++ /dev/null @@ -1,73 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - -Copyright 2025 marsultor - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index c5c6b19..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# advent-of-code-2025 - -Advent of Code 2025 https://adventofcode.com/2025 \ No newline at end of file diff --git a/external/fmt b/external/fmt new file mode 160000 index 0000000..d6712ff --- /dev/null +++ b/external/fmt @@ -0,0 +1 @@ +Subproject commit d6712ff2c00a34bc6ac850aa11e51532b91c722c diff --git a/external/spdlog b/external/spdlog new file mode 160000 index 0000000..3f03542 --- /dev/null +++ b/external/spdlog @@ -0,0 +1 @@ +Subproject commit 3f03542d2eb4952e3b279d9cad9098d370b7be57 diff --git a/src/day-1-solution.cpp b/src/day-1-solution.cpp new file mode 100644 index 0000000..1117a34 --- /dev/null +++ b/src/day-1-solution.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +enum Direction { + LEFT=-1, RIGHT=1 +}; + +int main (int argc, char *argv[]) { + + return 0; +} + +int solution(std::vector> moves){ + constexpr thread_local static int default_start = int {50}; + + return default_start; +}