! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Fixes and new binary clock mode
Status:
RESOLVED: MOVED
Product:
Xfce4-panel

Comments

Description Felipe Contreras 2019-06-14 02:21:31 CEST
A true binary clock shouldn't based on hours (mod 12), but on bits (mod
2).

Take for example the following clock:

  1010010000100000

In order to make sense of it we would have to find out if it's
binary-coded decimal (BCD), or sexagesimal. And then if it's packed or
not, and where the divisions are.

But we could say this number is a binary... A true binary.

To see if this is the highest part (past 12) or the lowest part (before
12), we just look at the most significant digit '1'. So it's past noon.

Then of those later 12 hours are we in earlier or later? We look at the
second digit '0', so it's between 12-18; We still have a quarter of the
day left. We continue like that until the last digit, which is similar
to a second, but not quite.

This is a 16-bit binary clock; that is: a clock whose value is a real
binary, on which you can do binary operations. By dividing the day into
2 ^ 16 equal parts it's easy to represent the most and least significant
  parts of a day.

  000: day started
  100: past noon
  010: early morning (6am)
  110: afternoon (6pm)
  001: 3am
  011: 9am
  101: 3pm
  111: 9pm

We can't call this the true true binary clock, but it pretty much is.

In order to represent minutes (not seconds) we need the first 10 most
significant bits.
Comment 1 Felipe Contreras 2019-06-14 02:22:17 CEST
Created attachment 8630 
clock: binary: add missing unref
Comment 2 Felipe Contreras 2019-06-14 02:32:10 CEST
Created attachment 8631 
clock: binary: fix widget style
Comment 3 Felipe Contreras 2019-06-14 02:36:17 CEST
Created attachment 8632 
List of patches

I give up. I can't add more than one patch at a time before bugzilla barfs.
Comment 4 Git Bot editbugs 2020-05-28 02:12:23 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/235.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15607

Reported by:
Felipe Contreras
Reported on: 2019-06-14
Last modified on: 2020-05-28

People

Assignee:
Xfce Bug Triage
CC List:
0 users

Version

Version:
Unspecified

Attachments

clock: binary: add missing unref (720 bytes, patch)
2019-06-14 02:22 CEST , Felipe Contreras
no flags
clock: binary: fix widget style (3.54 KB, patch)
2019-06-14 02:32 CEST , Felipe Contreras
no flags
List of patches (50.00 KB, application/octet-stream)
2019-06-14 02:36 CEST , Felipe Contreras
no flags

Additional information