octobanana / peaclock Goto Github PK
View Code? Open in Web Editor NEWA responsive and customizable clock, timer, and stopwatch for the terminal.
Home Page: https://octobanana.com/software/peaclock
License: MIT License
A responsive and customizable clock, timer, and stopwatch for the terminal.
Home Page: https://octobanana.com/software/peaclock
License: MIT License
I might be missing it, but I wanted to know if its possible to set an option to exit peaclock when the timer finishes?
adding exit
to the end of the config file exit peaclock immediately and adding exit
to timer-exec
doesn't seem to work
http://beefy17.nyi.freebsd.org/data/head-i386-default/p529299_s359382/logs/peaclock-0.4.1.log (IPv6 URL)
clang-8 errors:
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:86:25: error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
long int const now {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:86:25: note: insert an explicit cast to silence this issue
long int const now {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<long>( )
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:108:26: error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:108:26: note: insert an explicit cast to silence this issue
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<long>( )
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:120:26: error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:120:26: note: insert an explicit cast to silence this issue
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<long>( )
3 errors generated.
Modern GPU based terminals draw the entire frame on redraws. The way to avoid screen from stuttering is to use a different approach to redrawing screen.
The solution is mentioned in neovim/neovim#14225 (comment), and vim/vim#8002 (comment). The solution is to redraw with
NOT_VALID, which would redraw everything but not clear the screen.
This problem is similar to vim on GPU accelerated terminals also has the problem and plans to fix it: vim/vim#8002
Here's an example of screen stuttering in peaclock (I am not pressing any keys in the video):
Ref: #22
It takes a long time to build the program on a Raspberry Pi. Would you mind add an instruction about cross-building?
I'm not familiar with CMake
. Buinding and installing are all proxyed by the RUNME.sh
script, so I have no idea how to modify the script.
Peaclock crashes on my Void Linux musl system with the error:
Error: locale::facet::_S_create_c_locale name is not valid
This is because on musl
systems, there is no locale.
System info
peaclock 0.4.0, compiled from source.
EDIT: I was able to get it working by doing:
$ unset LANGUAGE
$ LC_ALL=C peaclock
Hello,
Thanks so much for sharing this program! I've created a wrapper script that uses peaclock as a pomodoro timer. With the pomodoro technique, I set timers for at the most 25 minutes and therefore no hours. I was wondering if there was a way to toggle the expression of hours in the digital clock view similar to how you can toggle seconds? Toggling minutes aren't necessary for me, but I figured for general purpose that might be useful to implement as well.
Hello,
I used MSYS2 with cmake and gcc to build peaclock. But when I execute it with
./peaclock
it outputs
Aborted (core dumped)
I looked in the peaclock.exe.stackdump
file and found this:
Stack trace:
Frame Function Args
000FFFFBCC0 0018005D16C (00000000000, 00000000002, 000FFFFBED8, 000FFFFDE50)
000FFFFBD60 0018005E77B (00000000064, 00000000000, 00000000000, 00000000000)
000FFFFBFB0 00180123ACD (00000000000, 00000010000, 7FFFCCECC822, 00000000000)
00180010000 001801202AE (0000000008A, 00000000000, 00000000000, 000FFFFC6B0)
00526902560 00180120762 (0052689C0AD, 00000000219, 00000000219, 00000000006)
00526902560 001801209AA (005268A501D, 0052690F920, 00526856CBD, 00000000020)
00526902560 00180120C6F (005268FE7C2, 00000000038, 00000000038, 000FFFFC5D0)
00526902560 0018015A0C6 (000FFFFC5B8, 00600017E10, 00526901B50, 00000000000)
00526902560 001800BA8E3 (0052690E940, 0052690E898, 005268FE7C2, 00526911320)
00526902560 0018011BEDB (0052690E940, 0052690E898, 005268FE7C2, 00526911320)
00526902560 005268C5A4C (000FFFFC5D0, 000FFFFC518, 000FFFFC708, 000FFFFC638)
00000000001 005268C443A (0010041863B, 005269185A0, 0018011BEDB, 001004310A0)
00000000001 005268F1893 (00600017CA8, 00180142BC1, 00600017BB8, 00600017A18)
000FFFFC950 0010040FEA3 (00000000000, 000FFFFC848, 000FFFFC850, 000FFFFC870)
00000000000 001004025F2 (001800D8194, 00600000413, 000FFFFCA60, 000FFFFCA60)
000FFFFCCB0 0010042D861 (00000000020, 30001000000FF00, 00180047986, 00180046990)
End of stack trace (more stack frames may be present)
Currently the binary clock shows the binary equivalent of each digit in the decimal representation of the time. For instance, 12 is represented as 01 0010; first the 1 is converted, and then the 2, with the results shown side-by-side. This is akin to representing 0xFF as "15 15" in decimal.
A more accurate method would be to convert the number rather than its constituent digits, so that 12 would be represented as 01100 on a 24 hour clock.
Perhaps a configuration option could allow users to choose between binary conversion of the digits in the decimal representation of the time, and binary conversion of the numbers in the time?
Hello! I just tried building peaclock for my Raspi to use it on a nice small display. I ran into an error during compilation. Sadly I have no clue about C++ and linking and all that stuff, so I just used my Google Fu and went with trial and error.
It was a error referencing some file system issues and the way I solved it was by adding link_libraries(stdc++fs)
to the CMakeLists.txt. Source
Maybe you can make sense of it and fix it for the people coming after me. :)
This change is needed:
--- CMakeLists.txt.orig 2019-05-23 00:24:50 UTC
+++ CMakeLists.txt
@@ -13,7 +13,7 @@ endif (CCACHE_FOUND)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
-set (CMAKE_CXX_FLAGS "-std=c++17 -fdiagnostics-color=auto")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fdiagnostics-color=auto")
set (DEBUG_FLAGS "-g -Og -rdynamic -Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused")
set (DEBUG_LINK_FLAGS "-fprofile-arcs -ftest-coverage")
Is there a config file somewhere or do I have to put in each command to get it to look how I want each time I open a window?
It isn't found.
I humbly request for peaclock to adhere to the xdg base directory specification. I request this because it seems like an easy change and the xdg standard very commonly used.
This means nstead of having the default location of config files at $HOME/.peaclock
, locate them at $XDG_CONFIG_HOME/peaclock
(usually $HOME/.config/peaclock
). I realize that there is an option to change the config directory, but it is kind of unwieldy to have to use: peaclock --config-dir=$XDG_CONFIG_HOME/peaclock --config=$XDG_CONFIG_HOME/peaclock/timer05m
to for example use peaclock as a timer.
Multiple stopwatch is very important tool for solving problem and manage time.
Please add and document and uninstall option in the RUNME.sh script (option) and README.md (documentation)
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:209:21: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set date " << btos(_peaclock.cfg.date) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:209:21: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:210:24: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set seconds " << btos(_peaclock.cfg.seconds) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:210:24: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:211:24: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set hour-24 " << btos(_peaclock.cfg.hour_24) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:211:24: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:212:26: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set auto-size " << btos(_peaclock.cfg.auto_size) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:212:26: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:213:27: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set auto-ratio " << btos(_peaclock.cfg.auto_ratio) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:213:27: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:493:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set hour-24 "s + btos(_peaclock.cfg.hour_24));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:493:44: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:501:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set seconds "s + btos(_peaclock.cfg.seconds));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:501:44: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:509:41: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set date "s + btos(_peaclock.cfg.date));
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:509:41: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:517:46: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set auto-size "s + btos(_peaclock.cfg.auto_size));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:517:46: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:525:47: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set auto-ratio "s + btos(_peaclock.cfg.auto_ratio));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:525:47: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2282:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2282:19: note: place parentheses around the assignment to silence this warning
if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2282:19: note: use '==' to turn this assignment into an equality comparison
if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2289:52: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set date "s + btos(_peaclock.cfg.date));
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2289:52: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2301:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2301:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2301:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2308:55: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set seconds "s + btos(_peaclock.cfg.seconds));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2308:55: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2320:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2320:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2320:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2327:55: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set hour-24 "s + btos(_peaclock.cfg.hour_24));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2327:55: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2339:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2339:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2339:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2346:57: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set auto-size "s + btos(_peaclock.cfg.auto_size));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2346:57: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2358:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2358:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2358:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2365:58: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set auto-ratio "s + btos(_peaclock.cfg.auto_ratio));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2365:58: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
20 warnings generated.
I can't seem to find the option to toggle milliseconds in the stopwatch.
The stopwatch is great, but it's a pain to have to type stopwatch --h:--m:--s
everytime I want to reset it.
My initial plan was to make it easier myself, but after looking through the code I found that you're totally allowed to enter the fields seperately, it's just that the help system doesn't give you any indication of this.
Could you please edit the help file to let the rest of us know?
Also, could you write in an abbreviation to that command so we can type in sw
instead?
I installed all the pre-requisites and got the following with icu4c:
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have icu4c first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc
For compilers to find icu4c you may need to set:
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
For pkg-config to find icu4c you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
I proceeded to go through with the install and got the following error
Build type: release -- Building peaclock 0.4.3 in release mode: System: Darwin-19.5.0 CXX compiler: GNU 10.2.0 -- Configuring done -- Generating done -- Build files have been written to: /Users/ivan.blazic/workspace/peaclock/build/release [ 16%] Building CXX object CMakeFiles/peaclock.dir/src/ob/readline.cc.o [ 33%] Building CXX object CMakeFiles/peaclock.dir/src/main.cc.o In file included from /Users/ivan.blazic/workspace/peaclock/./src/ob/readline.hh:4, from /Users/ivan.blazic/workspace/peaclock/src/ob/readline.cc:1: /Users/ivan.blazic/workspace/peaclock/./src/ob/text.hh:6:10: fatal error: unicode/coll.h: No such file or directory 6 | #include <unicode/coll.h> | ^~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/peaclock.dir/src/ob/readline.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /Users/ivan.blazic/workspace/peaclock/./src/ob/rect.hh:5, from /Users/ivan.blazic/workspace/peaclock/./src/peaclock/peaclock.hh:5, from /Users/ivan.blazic/workspace/peaclock/src/peaclock/tui.hh:4, from /Users/ivan.blazic/workspace/peaclock/src/main.cc:10: /Users/ivan.blazic/workspace/peaclock/./src/ob/text.hh:6:10: fatal error: unicode/coll.h: No such file or directory 6 | #include <unicode/coll.h> | ^~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/peaclock.dir/src/main.cc.o] Error 1 make[1]: *** [CMakeFiles/peaclock.dir/all] Error 2 make: *** [all] Error 2
I can't seem to resolve it as I can't brew link icu4c even if I force it, and adding it to the PATH does not seem to work either.
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:209:21: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set date " << btos(_peaclock.cfg.date) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:209:21: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:210:24: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set seconds " << btos(_peaclock.cfg.seconds) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:210:24: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:211:24: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set hour-24 " << btos(_peaclock.cfg.hour_24) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:211:24: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:212:26: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set auto-size " << btos(_peaclock.cfg.auto_size) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:212:26: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:213:27: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
<< "set auto-ratio " << btos(_peaclock.cfg.auto_ratio) << "\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:213:27: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:493:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set hour-24 "s + btos(_peaclock.cfg.hour_24));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:493:44: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:501:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set seconds "s + btos(_peaclock.cfg.seconds));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:501:44: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:509:41: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set date "s + btos(_peaclock.cfg.date));
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:509:41: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:517:46: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set auto-size "s + btos(_peaclock.cfg.auto_size));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:517:46: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:525:47: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
set_status(true, "set auto-ratio "s + btos(_peaclock.cfg.auto_ratio));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:525:47: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2282:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2282:19: note: place parentheses around the assignment to silence this warning
if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2282:19: note: use '==' to turn this assignment into an equality comparison
if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2289:52: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set date "s + btos(_peaclock.cfg.date));
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2289:52: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2301:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2301:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2301:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2308:55: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set seconds "s + btos(_peaclock.cfg.seconds));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2308:55: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2320:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2320:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2320:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2327:55: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set hour-24 "s + btos(_peaclock.cfg.hour_24));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2327:55: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2339:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2339:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2339:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2346:57: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set auto-size "s + btos(_peaclock.cfg.auto_size));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2346:57: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2358:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
else if (match_opt = OB::String::match(input,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2358:24: note: place parentheses around the assignment to silence this warning
else if (match_opt = OB::String::match(input,
^
(
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2358:24: note: use '==' to turn this assignment into an equality comparison
else if (match_opt = OB::String::match(input,
^
==
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2365:58: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
return std::make_pair(true, "set auto-ratio "s + btos(_peaclock.cfg.auto_ratio));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
~~~~~~~~~^~~~~~~~
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:2365:58: note: use array indexing to silence this warning
/usr/ports/misc/peaclock/work/peaclock-0.4.0/src/peaclock/tui.cc:38:27: note: expanded from macro 'btos'
#define btos(x) ("off\0on"+4*!!(x))
^
MAN DATE(1)
%z +hhmm numeric time zone (e.g., -0400) %:z +hh:mm numeric time zone (e.g., -04:00) %::z +hh:mm:ss numeric time zone (e.g., -04:00: %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) %Z alphabetic time zone abbreviation (e.g., EDT)
Both %z
and %Z
work but none of variants with :
does.
This is the log after I typed ./build
on macOS Mojave. I have no understanding of C++/C, so can't help much sorry. Tell me if anything needed.
And exit code is 2
according to echo $?
.
Setting Environment Variables
Building peaclock in release mode
Compiling peaclock
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_BUILD_TYPE is release
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Kutsan/Documents/peaclock/build/release
Scanning dependencies of target peaclock
[ 20%] Building CXX object CMakeFiles/peaclock.dir/src/main.cc.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
[ 40%] Building CXX object CMakeFiles/peaclock.dir/src/ob/string.cc.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
[ 60%] Building CXX object CMakeFiles/peaclock.dir/src/peaclock/peaclock.cc.o
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
/Users/Kutsan/Documents/peaclock/src/peaclock/peaclock.cc:205:20: error: call to 'wrap' is ambiguous
buf << aec::wrap(_config.symbol, {_config.style.active, _config.style.bold});
^~~~~~~~~
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:367:13: note: candidate function [with T = std::__1::basic_string<char>]
std::string wrap(T const val_, std::string const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:387:13: note: candidate function [with T = std::__1::basic_string<char>]
std::string wrap(T const val_, std::vector<std::string> const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/src/peaclock/peaclock.cc:210:20: error: call to 'wrap' is ambiguous
buf << aec::wrap(_config.symbol, {_config.style.inactive, _config.style.bold});
^~~~~~~~~
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:367:13: note: candidate function [with T = std::__1::basic_string<char>]
std::string wrap(T const val_, std::string const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:387:13: note: candidate function [with T = std::__1::basic_string<char>]
std::string wrap(T const val_, std::vector<std::string> const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/src/peaclock/peaclock.cc:245:18: error: call to 'wrap' is ambiguous
buf << aec::wrap(_digital_clock.at(i), {_config.style.active, _config.style.bold});
^~~~~~~~~
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:367:13: note: candidate function [with T = int]
std::string wrap(T const val_, std::string const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:387:13: note: candidate function [with T = int]
std::string wrap(T const val_, std::vector<std::string> const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/src/peaclock/peaclock.cc:251:22: error: call to 'wrap' is ambiguous
buf << aec::wrap(":", {_config.style.inactive, _config.style.bold});
^~~~~~~~~
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:367:13: note: candidate function [with T = const char *]
std::string wrap(T const val_, std::string const attr_, bool color_ = true)
^
/Users/Kutsan/Documents/peaclock/./src/ob/term.hh:387:13: note: candidate function [with T = const char *]
std::string wrap(T const val_, std::vector<std::string> const attr_, bool color_ = true)
^
4 errors generated.
make[2]: *** [CMakeFiles/peaclock.dir/src/peaclock/peaclock.cc.o] Error 1
make[1]: *** [CMakeFiles/peaclock.dir/all] Error 2
make: *** [all] Error 2
real 0m5.431s
user 0m4.703s
sys 0m0.532s
@octobanana Could you please add alarm sound to make the app more interactive with timer, stopwatch and clock?
@octobanana That problem is fixed, but the earlier MacOS versions face another problem:
error: call to unavailable member function 'value': introduced in macOS 10.14
A possible workaround is to remove the optional regex matches from string.cc
and string.hh
. Something like that:
-std::optional<std::vector<std::string>> match(std::string const& str, std::regex rx);
+std::vector<std::string> match(std::string const& str, std::regex rx);
The logic of the optional regex matches in peacock.cc
should be refactored then, as there will be no more match_opt
's.
I have tried it locally just now, but the result seems a bit strange. There were no errors during the compilation and the clock runs just fine, the digital numbers are changing, but the binary ones are all enabled. Maybe something else went wrong, or my changes were incorrect.
Originally posted by @Dluzhnevsky in #1 (comment)
can anyone help me?
my system Linux deepneon 5.10.29-amd64-desktop #2 SMP Mon Apr 26 09:48:13 CST 2021 x86_64 GNU/Linux
deep@deepneon:~/Downloads/peaclock-0.4.3$ ./RUNME.sh build -- -DCMAKE_CXX_COMPILER=/usr/bin/g++
Build type: release
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building peaclock 0.4.3 in release mode:
System: Linux-5.10.29-amd64-desktop
CXX compiler: GNU 8.3.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/deep/Downloads/peaclock-0.4.3/build/release
Scanning dependencies of target peaclock
[ 33%] Building CXX object CMakeFiles/peaclock.dir/src/ob/string.cc.o
[ 33%] Building CXX object CMakeFiles/peaclock.dir/src/main.cc.o
[ 50%] Building CXX object CMakeFiles/peaclock.dir/src/ob/readline.cc.o
[ 83%] Building CXX object CMakeFiles/peaclock.dir/src/peaclock/tui.cc.o
[ 83%] Building CXX object CMakeFiles/peaclock.dir/src/peaclock/peaclock.cc.o
[100%] Linking CXX executable peaclock
/usr/bin/ld: /tmp/cc4aWbJQ.ltrans0.ltrans.o: in function `std::filesystem::__cxx11::path::path<char [5], std::filesystem::__cxx11::path>(char const (&) [5], std::filesystem::__cxx11::path::format) [clone .constprop.134]':
<artificial>:(.text+0x7d56): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /tmp/cc4aWbJQ.ltrans2.ltrans.o: in function `Tui::command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
<artificial>:(.text+0x35c): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: <artificial>:(.text+0x364): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: <artificial>:(.text+0x4c7): undefined reference to `std::filesystem::__cxx11::path::lexically_normal() const'
/usr/bin/ld: <artificial>:(.text+0x219c): undefined reference to `std::filesystem::__cxx11::path::lexically_normal() const'
/usr/bin/ld: <artificial>:(.text+0x3281): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: <artificial>:(.text+0x329e): undefined reference to `std::filesystem::__cxx11::path::lexically_normal() const'
/usr/bin/ld: <artificial>:(.text+0x3392): undefined reference to `std::filesystem::__cxx11::path::lexically_normal() const'
/usr/bin/ld: <artificial>:(.text+0x347f): undefined reference to `std::filesystem::__cxx11::path::lexically_normal() const'
/usr/bin/ld: /tmp/cc4aWbJQ.ltrans3.ltrans.o: in function `Tui::load_config(std::filesystem::__cxx11::path const&)':
<artificial>:(.text+0x6a05): undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
/usr/bin/ld: <artificial>:(.text+0x6a4a): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: /tmp/cc4aWbJQ.ltrans5.ltrans.o: in function `std::filesystem::__cxx11::path OB::Parg::get<std::filesystem::__cxx11::path, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
<artificial>:(.text+0x8134): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /tmp/cc4aWbJQ.ltrans9.ltrans.o: in function `std::filesystem::__cxx11::path::operator/=(std::filesystem::__cxx11::path const&)':
<artificial>:(.text+0x3960): undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const'
/usr/bin/ld: <artificial>:(.text+0x3995): undefined reference to `std::filesystem::__cxx11::path::has_filename() const'
/usr/bin/ld: <artificial>:(.text+0x39b7): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /tmp/cc4aWbJQ.ltrans7.ltrans.o: in function `main':
<artificial>:(.text.startup+0x784): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: <artificial>:(.text.startup+0x83d): undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
/usr/bin/ld: <artificial>:(.text.startup+0x849): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: <artificial>:(.text.startup+0x41ba): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: <artificial>:(.text.startup+0x4257): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: <artificial>:(.text.startup+0x426e): undefined reference to `std::filesystem::create_directory(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: <artificial>:(.text.startup+0x44ca): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/peaclock.dir/build.make:144: peaclock] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/peaclock.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.