Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AN
Posts
0
Comments
406
Joined
2 yr. ago

  • Sleep sort is kind of like count sort but with added overhead. Both have a complexity of O(n+m) with n being the length and m the value of the max element.

    The optimum of O(n log n) is based on the assumption that the only information about the values is obtained by comparison. If you operate on integer keys I would recommend radix sort. It has a complexity of O(n w) where w is the length (read logarithm) of the key.

  • I can't find the name/source at the moment, but if you enumerate all turing machines and run them concurrently you will find the optimal algorithm for your problem in O(1) and executed that.
    To my knowledge the algorithm is so inefficient on small input that it takes hours to solve integer addition.

    You run the first turing machine one step, than the first two one additional step, that the first tree... This allows you to run an unlimited amount of TMs an unlimited amount of steps.

  • I looked at the diff, it's around 100 lines of new code and a few hundred lines of comments and tests.
    I couldn't have written it, but there are many smarter people that fixed it after they learned of the problem.

    What also made it easier to fix is that they (sensibly) chose to error on certain strings that can't be escaped safely.

  • The main difference is that WASM is an agnostic bytecode without a gc while the jvm is opinionated in a java way. It has a gc, focus on dynamic dispatch and it has knowledge of concepts like exceptions, classes and visibility.

    All this leaking of abstractions means languages like java and kotlin are well suited, scala has hit problems and c couldn't be compiled to java bytecode.

  • Actual assembly in mainstream use:
    x86
    arm
    risc v

    mainstream byte code:
    jvm
    .net (I think)
    wasm

    fake assembly people may write:
    llvm
    wasm

    wat (web assembly text) is actually written is S-expressions, like lisp but without code as data.

    Edit: formatting