Hacker Newsnew | past | comments | ask | show | jobs | submit | anaphylactic's commentslogin

> There the game stops. Proof surfaced in 1898 that the reals, complex numbers, quaternions and octonions are the only kinds of numbers that can be added, subtracted, multiplied and divided.

1. I think they meant "the only kinds of numbers constructed in this way". 2. Sedenions can still be added, multiplied, subtracted and divided. it's just that multiplication and division lose most of their useful properties. With octonions you've already lost associativity and commutativity, though.


>it's just that multiplication and division lose most of their useful properties.

Specifically they lose the property of not having zero divisors.

There exists sedonions a,b != 0 such that ab = 0


Another (related) property that fails is that inverses stop being useful for cancellation. Inverses still exist, for every p there's a q with pq = qp = 1, but if you've got an equation ap = b you can't cancel to get a = bq, because we don't have associativity. The left hand side (ap)q doesn't equal a(pq), so you can't reduce it to a.

Of course associativity doesn't hold in the octonions either, but it holds just enough for cancellation to work.


Yeah, octonion multiplication is alternative.



No, power associativity is never lost, after sedenions the properties remain the same.


They don't remain exactly the same. The answers to this (https://math.stackexchange.com/questions/641809/what-specifi...) question provide some interesting starting-points.


That happens in general for matrices too.


Yes, and this is a bit obvious, but reals, complex numbers, split complex numbers, quaternions, octonions, sedenions, can all be represented as matrices of the appropriate form.


That's at most sort-of-true. It's not possible to represent octonions by matrices of numbers in such a way that multiplication of matrices corresponds to multiplication of octonions, because matrix multiplication is associative and octonion multiplication isn't.


can't be true, unless there is some special matrix multiplication rule - afaik, standard matrix multiplication is associative


An n-dimensional matrix of octonions


Being composition algebras makes R,C,Q and O more interesting than others:

N(xy) = N(x)N(y) - N is called norm.

Without this property, you have zero divisors.

edit: throwawaymath uses better notation: |xy| = |x| • |y|


What type of thing is N? What you wrote doesn't seem to make sense if N is just a constant, but I don't see how it makes sense if N is a function? Or maybe you didn't mean multiplication?

E.g. N = 3, x = 2, y = 3

N(xy) = 3(2 . 3) = 18

N(x)N(y) - N = 3(2) . 3(3) - 3 = 51, which is not 18


That's not a subtraction sign, it's a hyphen. N is the norm of x, denoted by |x|. Technically the norm is a scalar-valued function applied to a vector, hence the functional notation N(xy) = N(x) • N(y).

So to be explicit, they're saying |xy| = |x| • |y| implies you cannot have a 0 divisor.


N here is a function, not a constant. I was confused at first, but I think the "-N" in that post wasn't intended to mean "minus N" but rather ", where N is the function called...".

The "norm" of a number is more or less its absolute value: its size, it's magnitude. So "1" has norm 1, but "-1" also has norm 1, as does "i", and "-5" or "5i" or "4-3i" all have norm 5. So these four mathematical structure (R,C,Q, and O) all have the property that the norm of a product is equal to the product of the norms. Things get really obnoxious (or at least really unfamiliar) if you don't have that property.

Edit: Sorry for the repetition! I've got to remember to reload these pages before replying.


is there a proof that real numbers can be added?


As far as I know, addition is something you define (an axiom) in order to construct the real (or other) numbers.

https://sites.math.washington.edu/~hart/m524/realprop.pdf


So let met get this straight - you're telling me that people are staking their livelihoods entirely on Uber, and none of this is Uber's fault, it's just the people who are idiots?


Why are they idiots? If it’s their best opportunity then they would be idiots to not take it.

I don’t think people doing the Uber bashing here understand what it’s like to be poor and that service like Uber are actually a good thing.


What if it's their only opportunity? A lot of people aren't doing this because they think it's a fantastic opportunity, they're doing it because it's one of very few ways they can make a living.


You're telling me that with a phone, a car, and the ability to speak english, that driving cars around is the only opportunity possible?


I don't know, I was requesting clarification for the line "people will exploit themselves".


No, we're bashing Uber for exploiting that relationship.


It depends. If Uber was truly marketing itself as something you should stake your livelihood on (i.e. a viable career), then it's understandable that people would do that.

People are only idiots if they take something that is only obviously meant for non-sustainable income, try to turn it into their livelihood, and then act surprised/outraged when it isn't sustainable. I kind of got this vibe from ride sharing - I never thought it would be sustainable as a full-time job, I thought it was more for just some fun side income.


No!

- Parametric polymorpism isn't OOP, pretty much every halfway-decent language has it (including Haskell, which is as functional as they come).

- Boxing in Rust isn't what you think it is - it's just heap allocation (more like malloc than the monstrosity that is boxing in Java).

- Again, operator overloading isn't OOP either. Seriously, is it that hard to believe that "you get to use + and - with your own types" is an expectation independent of any paradigm?

> I must have gotten the wrong idea.

Yes. Go and Rust are both very far from what most people would consider "OOP".


You make it sound like OOP is an inherently bad thing, and OOP is not mutually esclusive with FP as you seem to imply with your Haskell reference.

Funcional can be considered an alternative vs imperative and declarative, and usually languages are a mix of the three. And any of these 3 style can support OOP.

BTW, plenty of half-decent languages don't have generics.


Objects are parametrizations of functions that possibly close over variables. Having types with functions defined in types with dot notation is a different thing.


That's a good point, and it's not just a problem with C++. As any project matures, the voices of current users drown out the voices of new users, and as a result discoverability gets thrown out the window. How would you engineer a project so as to avoid this fate?


I disagree. If a perfectly good optional type can be implemented without making new syntax, why bother making new syntax? It obscures what's going on under the hood, makes implementation needlessly complex, and increases mental overhead for users.


To be fair, not all languages make this easy.


I believe (hope) that OpenGL continues to be that developer-friendly API. Building OpenGL on top of Vulkan shouldn't be too hard, and it means we don't have to pointlessly deprecate and recreate the huge number of OpenGL resources out there.


OpenGL isn't friendly to developers on either side. Tutorials are generally not trustworthy, there's no cross platform debugging tools, and errors just get you a "something happened vOv" code.

If you care about performance it will just do something slow at uncontrollable points in the background, like copy CPU-GPU-CPU memory, synchronize against the GPU, do format conversions, etc.

If you're the one implementing GL, it's gotten gigantic again since they simplified it. GL 4.3/4.6 core has compute shaders, which means you have to implement OpenCL twice but different this time.


There is already OpenGL-on-Metal and OpenGL-on-DirectX middleware, so this may not actually be an issue.


I know this comment is rather inane, but rarely have I seen a library name so fitting yet so humorous as "burgled-batteries".


I think the parent's trying to tell you guys not to sell yourselves short - that what you're doing is exactly what mathematics is.


I'm guessing XML doesn't count as a text-based file format? Otherwise, that's what every office suite (technically a zip file of XML files, but that's splitting hairs), vector editor, and graphical HTML editor already does.

Anyway, I especially like the `sc` spreadsheet format and editor as an example of a GUI tool that works with text-based file formats. Despite the giant disclaimer at the top of each file saying not to edit it, it's shockingly human-friendly.


XML is OK, but it's not exactly human-readable, nor does it play well with version control tools. You can actually edit OpenSCAD and Markdown files and be reasonably productive.


I don't understand what your concern is - this only took me about a minute to write and it looks completely safe and efficient.

https://play.rust-lang.org/?gist=674f4b88876614f603fd70368cb...


Thanks for this snippet. Didn't think about that.

If I understand correctly that's overly restrictive though. You're limiting the lifetime of list elements to the lifetime of the spine of the list.

What I want is this:

    enum List<T> {
        Nil,
        Cons(T, Box<List<T>>)
    }

    struct IntoIter<T>(List<T>);

    impl<T> IntoIterator for List<T> {
        type Item = T;
        type IntoIter = IntoIter<T>;
        fn into_iter(self) -> Self::IntoIter {
            IntoIter(self)
        }
    }

    impl<T> Iterator for IntoIter<T> {
        type Item = T;
        fn next(&mut self) -> Option<T> {
            match std::mem::replace(&mut self.0, List::Nil) {
                List::Nil => None,
                List::Cons(x, l) => {
                    std::mem::replace(&mut self.0, *l);
                    Some(x)
                }
            }
        }
    }

But without the `replace` calls.

Also, in general I may be working with a data type for which I don't have a value I can conjure out of thin air (like `Nil`). What then?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: