Tweetovi

Blokirali ste korisnika/cu @TimSweeneyEpic

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @TimSweeneyEpic

  1. 2. velj

    Congrats to Godot for showing that a pemissively licensed open source 3D engine can succeed at scale!

    Poništi
  2. 2. velj

    The goal of a high level programming language is to be something that we and these alien civilizations could agree on as universal and principled, and free of quirks and arbitrarity.

    Prikaži ovu nit
    Poništi
  3. 2. velj

    We’d have transactions as a way of running concurrent operations atomically. We’d have most of Knuth’s algorithms in common (maybe they’d have some major breakthroughs we lack!)

    Prikaži ovu nit
    Poništi
  4. 2. velj

    So, let’s ask: what parts of programming would we have in common? We’d share the mathematical integers, and data structures analogous to Cartesian products (structs) and sums (unions), and functions with side effects, and pure functions as a special case.

    Prikaži ovu nit
    Poništi
  5. 2. velj

    Now we compare programming languages. We’d find some low level constructs have developed very differently. Maybe they’d have balanced tertiary numbers instead of twos-complement and u-law fractional numbers instead of floating point. Our bitwise ops may have no analog.

    Prikaži ovu nit
    Poništi
  6. 2. velj

    But mathematics would be shared. After translating syntax and symbols, we’d find we had exactly the same constructive axioms, and agree that other axioms are controversial. We’d have the same theorems and the same proofs. They’d rever a Pythagoras and a Leibniz.

    Prikaži ovu nit
    Poništi
  7. 2. velj

    Spoken language would be inscrutable. Different physiologies would lead to an inability to speak or even hear each others’ phonemes. Written language would be inscruible, though we might find analogs of nouns, adjectives, and verbs.

    Prikaži ovu nit
    Poništi
  8. 2. velj

    Here’s an exercise in separating fundamentals from conventions: if we held a technical summit with all of the galaxy’s advanced alien civilizations, what would we find we had in common, and what would we find inscrutable?

    Prikaži ovu nit
    Poništi
  9. 2. velj

    Programming languages should be built on principles first and foremost, and avoid conveniences that violate principles. So much of what’s wrong today is the result of design by “wouldn’t it be nice if” without an earnest enumeration of guiding principles.

    Prikaži ovu nit
    Poništi
  10. 2. velj

    If we support floating point, then the float 1.0f can’t be equal to integer 1, because there exist functions f where f(1.0f) is unequal to f(1), and a==b implies that for all f, f(a)==f(b). We must either say 1 is not equal to 1.0f, or that we aren’t allowed to compare them.

    Prikaži ovu nit
    Poništi
  11. 2. velj

    Finally, types should obey the mathematical properties expected of them. This means we must adopt mathematical integers, and if we support smaller integer storage formats, they are still just for storage. The byte 255 plus the byte 1 is not the byte 0, it’s the integer 256.

    Prikaži ovu nit
    Poništi
  12. 2. velj

    Next, we have to abandon manually synchronized memory concurrency. The combinatorial complexity here isn’t in performance but in programmer reasoning. We must either stay single-threaded or adopt purely functional programming or transactions.

    Prikaži ovu nit
    Poništi
  13. 2. velj

    The other is we should never copy a non-constant-sized data structure, but ensure it can be used in all contexts as-is or with the help of a constant sized adapter.

    Prikaži ovu nit
    Poništi
  14. 2. velj

    One is that containers should be designed to minimize asymptotic complexity of operations. If concatenating strings is O(m+n), we’re doing it wrong. This means we can’t expect nice linear arrays in memory, but must pay some sort of dynamic control flow cost for accessing them.

    Prikaži ovu nit
    Poništi
  15. 2. velj

    The ideal performance property we should ask of a high-level programming language and library is that it minimizes runtime and compile-time combinatorial complexity. We can accept constant overheads, but not higher-order overheads. This has many implications.

    Prikaži ovu nit
    Poništi
  16. 1. velj

    Unfortunately, most languages missed this opportunity. The C family including C# and Java are overly imperative and lost variance due to wrongly-scoped mutability. And functional languages have generally chosen type systems lacking subtypes, covariance, and contravariance.

    Prikaži ovu nit
    Poništi
  17. 1. velj

    But if we have garbage collection, we can store our large data structures once with whatever type is required, then dynamically create wrappers that reinterpret it as any subtype that’s required. We pay the cost of GC and indirect control flow for accessors but that’s all.

    Prikaži ovu nit
    Poništi
  18. 1. velj

    Or we can create a very clunky wrapper like array_of_anything that is used wherever generic types are required, which manually casts and converts values among types dynamically each time it’s accessed. Java generics did this and they were awful.

    Prikaži ovu nit
    Poništi
  19. 1. velj

    So now when we want to recover performance, we need to write all containers and their operations using an increasingly elaborate set of templates or generic functions, which the compiler must specialize for each type at significant cost. This is what C++ and Rust do.

    Prikaži ovu nit
    Poništi
  20. 1. velj

    Without garbage collection, offering an array of bytes where an array of integers is required requires stack-allocating an array of integers and converting each byte to an integer every time a subtype is used in place of an actual type. This is so absurd that it’s not done.

    Prikaži ovu nit
    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·