Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Notices by namark (namark@qoto.org)

  1. namark (namark@qoto.org)'s status on Wednesday, 02-Feb-2022 09:38:44 UTC namark namark
    in reply to
    • Bernie

    @codewiz the main point is that it's a nuanced issue out of scope for chrono. Any halfway solution would achieve very little and lower the quality of the library. The arithmetic bound checking is universally applicable, so it would be kind of silly to have something for durations that you couldn't use for other types. Also imposing any sort of compile-time, run-time or maintenance overhead any such checks would bring is nonsensical in a world where everyone in every other application of arithmetic is perfectly happy to just use a type that is assumed to be "large enough" to represent any value. Most just want to use a 64 bit int, and forget it can overflow, even at nanosecond precision, and some would vehemently argue that even on systems that don't have wide enough words, it should just be emulated in software.

    In conversation Wednesday, 02-Feb-2022 09:38:44 UTC from qoto.org permalink
  2. namark (namark@qoto.org)'s status on Wednesday, 02-Feb-2022 09:38:43 UTC namark namark
    in reply to
    • Bernie

    @codewiz another thing you could do is define and use your own bound checked literals of different sizes. Here is an example for just plain integers
    https://git.sr.ht/~namark/libsimple_support/tree/master/item/source/simple/support/int_literals.hpp

    If you stick with just one duration type throughout the codebase that would be all you need, otherwise if you want to mix and match duration of different granularity and size, your custom literals can return a wrapper type that would only be implicitly convertible to durations that they can fit in.

    In conversation Wednesday, 02-Feb-2022 09:38:43 UTC from qoto.org permalink

    Attachments


  3. namark (namark@qoto.org)'s status on Wednesday, 02-Feb-2022 09:38:41 UTC namark namark
    in reply to
    • Bernie

    @codewiz keeping in mind that it's still a half measure, which won't save your from many potential pitfalls. For anything non trivial you'd still need to do a lot of mental (or pen and paper) calculations to make sure there is no overflow, so literals would be the least of your concerns on that front.

    In conversation Wednesday, 02-Feb-2022 09:38:41 UTC from qoto.org permalink
  4. namark (namark@qoto.org)'s status on Sunday, 09-Jan-2022 18:10:37 UTC namark namark
    in reply to
    • Bernie

    @codewiz you seemed to have a problem with the concept so that was an explanation and a proof of concept implementation. Pleasantly surprised it worked at all! If you care about it you should participate, cause as far as I know that is the most developed of any such concepts:
    https://github.com/boostorg/safe_numerics

    common_type trait sounds like a misnomer, but I imagine chrono didn't have anything better to use. safe_numeric may provide alternatives on that front, though it will likely never be standardized in it's current form. It's much more likely for a more generic numeric library to get in, that would also handle arbitrary precision and provide the safe_numerics functionality as its subset, and probably not called "safe" cause that's not a very good name either.

    In conversation Sunday, 09-Jan-2022 18:10:37 UTC from qoto.org permalink

    Attachments


  5. namark (namark@qoto.org)'s status on Sunday, 09-Jan-2022 11:26:50 UTC namark namark
    in reply to
    • Bernie

    @codewiz exception, abort or compiler error?

    yes

    https://yewtu.be/watch?v=93Cjg42bGEw

    https://www.boost.org/doc/libs/develop/libs/safe_numerics/doc/html/index.html

    In conversation Sunday, 09-Jan-2022 11:26:50 UTC from qoto.org permalink
  6. namark (namark@qoto.org)'s status on Wednesday, 15-Jan-2020 14:51:04 UTC namark namark
    • 🎓 Dr. Freemo :jpf: 🇳🇱

    @retiredguru @freemo I would suggest not basing the wording on who they are but rather how they behave in qoto. Just like accounts that are primarily aimed at advertising goods and services, account that are primarily aimed at spreading nonsensical claims on nature of things with no basis in any scientific theory could be disallowed.

    If someone is a "flat earther" or an "icosahedron mooner" or whatever, but refrains from spamming their beliefs in qoto, and otherwise engages in meaningful conversations/interactions I see no reason to force them to leave.

    On the other hand if someone is a professor in some respected university, but decides to troll qoto with bogus theories just to demonstrate their superior knowledge and debate skills, there is no reason to let them stay.

    In conversation Wednesday, 15-Jan-2020 14:51:04 UTC from qoto.org permalink
  7. namark (namark@qoto.org)'s status on Sunday, 12-Jan-2020 21:40:39 UTC namark namark
    in reply to
    • 🎓 Dr. Freemo :jpf: 🇳🇱

    @freemo next poll:

    [ ] emacs
    [ ] emacs!
    [ ] emacs!!
    [ ] emacs!!!

    In conversation Sunday, 12-Jan-2020 21:40:39 UTC from qoto.org permalink
  8. namark (namark@qoto.org)'s status on Thursday, 09-Jan-2020 18:05:32 UTC namark namark
    in reply to
    • 🎓 Dr. Freemo :jpf: 🇳🇱

    @freemo but say I want to make a post about mercury language, and absolutely nobody around knows what it even is, I get no tag? Maybe other way around - give me the first vote on the tags to make the post visible, then let others reinstate/add/remove tags through voting.

    Another thing is that this kind of a system will be easy to exploit, without a reputation system like in stackoverflow. Statistics don't work in small numbers, so a small group could actively silence a new/unpopular user, by exploiting filtering behavior. You could have some kind of a limit on votes cast before statistics applied, but then it kind of defeats the purpose of filtering, since it could be that "a big enough number of people who need to see the post(and vote on it) for statistics to kick in" is also "all people who will ever see the post", given that mastodon is mostly about quick continuous interactions, rather than long living publications.

    Of course you can have moderators, now to moderate misbehaving taggers, but I'm not sure if that would make things easier or harder.

    And finally if you're making a tag/category system pleaseee make it a tree, don't make it a list pleaseeee

    In conversation Thursday, 09-Jan-2020 18:05:32 UTC from qoto.org permalink
  9. namark (namark@qoto.org)'s status on Wednesday, 08-Jan-2020 23:18:39 UTC namark namark

    I spend several minutes to convince myself that all common divisors of two natural numbers are divisors of their greatest common divisor... no wonder my projects move at a snail's pace.

    In conversation Wednesday, 08-Jan-2020 23:18:39 UTC from qoto.org permalink

User actions

    namark

    namark

    Tags
    • (None)
    ActivityPub
    Remote Profile

    Following 0

      Followers 0

        Groups 0

          Statistics

          User ID
          23565
          Member since
          8 Jan 2020
          Notices
          9
          Daily average
          0

          Feeds

          • Atom
          • Help
          • About
          • FAQ
          • Privacy
          • Source
          • Version
          • Contact

          Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

          Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.