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

Honestly think Go is worse. So hard to google anything about it.


Add lang and that solves that issue. Although I agree that is a stupid name.


You can buy shares on their secondary market pretty cheaply right now.


"major Western banks frequently pay large fines for AML violations, yet bank executives rarely face criminal convictions"

Seems like changing this would fix a lot of the problems.


I use AI to create customer avatars representing potential buyers of a product I may create (based on existing competitors and their customer reviews). I then use those customer avatars to help design the product.

I love the idea of going from "AI generated customer avatar" to "simulated real people". It would help add depth to the customer avatars, and lead to better product design.

I tried creating a society around products that I sell, but it looks like the "real-world data" is pulled from LinkedIn? I'm not necessarily targeting business people.


Thank you for trying us out! Yes, most of our personas are built from social media profiles + other deep research of publicly available data. For this reason, our customers have made the most of us by simulating professionals who are otherwise really hard to survey.


Over the weekend I stood up a small site with a blog of only a few articles. I've done this in the past with Wordpress and Jekyl, but I do it pretty rarely so I forget exactly how to do it and how to make the sites fast.

So I let Claude write it. I told it I wanted a simple static website without any js frameworks. It made the whole thing. Any time I add a blog post, it updates the blog index page.

The site is, of course, very fast. But the main gain, for me, was not having to figure out how to get the underlying tech working. Yes, I'm probably dumber for it, but the site was up in a few hours and I got to go on with my life.


As long as it's not SOAP, it's great.


If I never have to use SOAP again in my life, I will die a happy man.


About 1.5 years ago I inherited a project with ~ 250,000 lines of code - in just the web UI (not counting back end).

The developer who wrote it was a smart guy, but he had never worked on any other JS project. All state was stored in the DOM in custom attributes, .addEventListeners EVERYWHERE... I joke that it was as if you took a monk, gave him a book about javascript, and then locked him in a cell for 10 years.

I started refactoring pieces into web components, and after about 6 months had removed 50k lines of code. Now knowing enough about the app, I started a complete rewrite. The rewrite is about 80% feature parity, and is around 17k lines of code (not counting libraries like Vue/pinia/etc).

So, soon, I shall have removed over 200,000 loc from the project. I feel like then I should retire as I will never top that.


> The rewrite is about 80% feature parity, and is around 17k lines of code (not counting libraries like Vue/pinia/etc).

This is exactly where these comparisons break down. Obviously you don't need as much code to get passable implementations of a fraction of all the features.


It's definitely a good argument for not reinventing the wheel though.

I'd rather have 250,000 lines of code but 230,000 of that is in battle tested libraries. And of which only 20,000 lines are what we ever need to read/write.


I will frequently extract OSS style libraries out of our app and put them in a packages/ folder.


>> is about 80% feature parity, and is around 17k lines of code

You make a fair point that a basic framework can be expressed with much less code.

And that the remaining 20% probably contains more edge cases with proportionally more code.

But do you think the last 20% will eventually make up anywhere near 233k lines of code?

The real save here comes from rewriting: seeing all the common denominators and knowing what's ahead.


I mean, you can get basic implementations of Vue and state management libs in a few hundred (maybe thousand?) LOCs (lots of examples on the interweb) that are probably less "toyish" than whatever this person had handrolled


> I joke that it was as if you took a monk, gave him a book about javascript, and then locked him in a cell for 10 years.

I've had a similar experience (see other comment), the original author was a junior developer at best, but unfortunately, a middle-aged, experienced developer, one of the founders of the company, and very productive. But obviously, not someone who had ever worked in a team or who had someone else work on their codebase.

Think functions thousands of lines long, nested switch/case/if/else/ternary things ten levels deep, concatenated SQL queries (it was PHP because of course), concatenated JS/HTML/HTML-with-JS (it was Dojo front-end), no automated tests of any sort, etc.


I've never quite gotten the axiom of choice. Can anyone ELI5?


The Cartesian product of nonempty sets is nonempty.

This is obvious!, you might say — obviously we can just pick one element from each set and be done with it. But the statement that we can pick an element from each set is the axiom of choice.

Note that it's not necessarily simple to pick an element from a set. For instance, how would one pick an element from the set of uncomputable numbers? A human cannot describe said element, by definition. The axiom of choice says it's possible anyway.


> The Cartesian product of nonempty sets is nonempty. > > This is obvious!, you might say — obviously we can just pick one element from each set and be done with it. But the statement that we can pick an element from each set is the axiom of choice.

No? I don’t see how this relates to AC at all. AC is about making an infinite number of choices at once – if you’re just making two choices (or, more generally any finite number of choices), as is needed here to prove that this Cartesian product is nonempty, then that’s completely fine without extra axioms. See for example https://mathoverflow.net/q/32538

E.g. in type theory, one term of type `Nonempty(A) → Nonempty(B) → Nonempty(A × B)` (supposing that `Nonempty` is defined as the [bracket type](https://ncatlab.org/nlab/show/bracket+type)) would just be `λ [a] ↦ λ [b] ↦ [(a, b)]`.


What AC's equivalent to is "the Cartesian product of any set of nonempty sets is nonempty". Not just of two nonempty sets, for which indeed you don't need AC.


The two statements imply each other, they are logically equivalent:

https://en.wikipedia.org/wiki/Product_topology#Axiom_of_choi...

>One of many ways to express the axiom of choice is to say that it is equivalent to the statement that the Cartesian product of a collection of non-empty sets is non-empty.


> A human cannot describe said element, by definition.

That example doesn't work. Some numbers are describable but not computable, Chaitin's constant being the famous example: https://en.wikipedia.org/wiki/Chaitin%27s_constant


> The Cartesian product of nonempty sets is nonempty.

I think you want: the Cartesian product of an infinite number of (potentially infinite) non-empty sets is non-empty.


> Note that it's not necessarily simple to pick an element from a set. For instance, how would one pick an element from the set of uncomputable numbers?

In ZF without choice, you can pick an element from any non-empty set, so it actually is simple to pick an element from a set. Choice is only needed when you have an infinite number of sets to pick elements from.


This seems elegant, but you need that you can take a Cartesian product and turn it into a set of its elements as well. I don’t know if that’s provable without classic AoC. (It might be.)


> but you need that you can take a Cartesian product and turn it into a set of its elements as well

Huh? In your model, what is a Cartesian product? How can it have elements without being a set?


Well, you’d need some model of index, for one. And I’m not sure how you’d construct that with uncountably many elements. Even ignoring that, a set containing n elements is different from a set containing n sets of one element each.

Not saying your formulation is wrong, just that there’s a fair amount of non-obvious work to get to the classic formulation.


> Even ignoring that, a set containing n elements is different from a set containing n sets of one element each.

Different in what way? A set containing n sets of one element each is a set containing n elements.

In ZF, everything that's an element of a set is itself a set, so unless what's bothering you is the idea that "a set containing n elements" might contain the empty set, or a set with two elements, I'm not seeing it.

> you’d need some model of index, for one. And I’m not sure how you’d construct that with uncountably many elements

Why would the number of elements matter? Set elements aren't indexed. What are you using your model of index for?

I really feel I should repeat the question I asked you to begin with: You say you need to convert a Cartesian product into a set containing "its elements". In your mind, what is a Cartesian product, before that conversion takes place?


Okay, let’s simplify. Do we agree that the Cartesian product (a,b,c,a) is represented in ZFC as {{1 a} {2 b} {3 c} {4 d}} and that that is different from {a b c a}?


No. We don't.

Let's note first of all that (a, b, c, a) is a tuple, not a Cartesian product.

Where are you getting your ideas from? What do you think a Cartesian product is? Give me a definition.


Ok, I see your problem now. Tuples aren’t axiomatic components of set theory. Try proving they exist then you’ll see the problem too.


Well, it's true that tuples aren't defined by the ZF axioms. They do have a conventional definition, which you appear not to know.†

Natural numbers also aren't defined by the ZF axioms; why do you think that the definition of a tuple should involve them? You're likely to have a hard time finding a textbook that agrees.

I'm getting an overwhelming sense here that you don't know the meaning of the things you say. If you don't know what a Cartesian product is, why do you think it makes sense to talk about what you can and can't do with it?

Why do you think it makes sense to write {a b c a}, which has no meaning?

† For reference: by the standard convention, the tuple (a, b, c, a) is represented as the set {{{a, {a, b}}, {{a, {a, b}}, c}}, {{{a, {a, b}}, {{a, {a, b}}, c}, a}}. You might notice that no numbers appear anywhere. You might also notice that regardless of representation - and you're free to use other representations - it will never be a Cartesian product, because "tuple" and "Cartesian product" refer to different things.


Isn't that equivalent (or, ok, similar) to saying that we can decide undecidable mathematical truths?


As far as I understand there's no such thing “undecidable” in absolute, Gödel incompleteness theorem is about being undecidable under a certain set of axioms.


The axiom of choice allows you to make infinitely many arbitrary choices.

You don't need the axiom of choice to make finitely many arbitrary choices. Let's say you have a pile of indistinguishable socks in front of you. You want to pick two of them. Well -- assuming that there are at least two of them to pick -- you can pick one, and then you can pick one from what remains. If something exists, you can pick one of it, that's permitted by the laws of logic; and if you need to do that multiple times, well, obviously you can just do it multiple times. But if you need to do it infinitely many times, well, the laws of logic aren't enough to support that.

You also don't need the axiom of choice if the choices aren't arbitrary, but rather are given by some rule you can specify. There's a famous analogy used by Russell to illustrate this. Suppose you have set in front of you an infinite array of pairs of socks, and you want to pick one sock from each pair. Then you need the axiom of choice to do that. But suppose, instead, it were an infinite array of pairs of shoes. Then you don't need the axiom of choice! Because you can say, I will always pick the left one. That's a rule according to which the choice is made, so you don't need the axiom of choice. You only need the axiom of choice when the choices have some arbitrary element to them, where there isn't a rule you can specify that gets things down to just a single possibility. (Isn't the choice of left over right making an arbitrary choice? In a sense, yeah, but it's only making a single arbitrary choice!)

(The axiom that lets you do this, btw, is the axiom of separation. Or, perhaps in rare instances, the axiom of replacement, but the axiom of replacement is generally irrelevant in normal mathematics.)

So that's what the axiom of choice does. Without it, you can only make finitely many arbitrary choices, or infinitely many specified choices. If you need to make infinitely many choices, but you don't have a rule to do it by, you need axiom of choice.

[Edit: Given the article, I should note that I'm describing the role of the axiom of choice in ordinary mathematics, rather than its role in constructive mathematics. I know little about the latter.]


Bertrand Russell coined an analogy: for any (even infinite) collection of pairs of shoes, one can pick out the left shoe from each pair to obtain an appropriate collection (i.e. set) of shoes; this makes it possible to define a choice function directly. For an infinite collection of pairs of socks (assumed to have no distinguishing features such as being a left sock rather than a right sock), there is no obvious way to make a function that forms a set out of selecting one sock from each pair without invoking the axiom of choice.

(From Wikipedia but I’ve always found it good)


Somehow the existing answers don't satisfy me, so here's my attempt. The essence of it is really simple.

The axiom is an obviously true statement: if you have a bag of beans, you can somehow take one bean out of it, without specifying, how do you choose the exact bean. Obvious, right? And that's really it, informally this is the axiom of choice: we are stating that we can somehow always do that, even if there are infinitely many beans and infinitely many bags, and the result of your work may be a collection of infinitely many beans.

Now, what's the "problem"? If you look closer, what I've just said is equivalent to saying we can well-order[0] any set of elements, which must make you uncomfortable: you may be ok with the idea that in principle you can order infinitely many particles of sand (after all, there are just ℕ of them), but how the fuck do you order water (assuming it's like ℝ — there are no molecules and you can divide every drop infinitely many times)?

This is both why we have it — ℝ seems like a useful concept so far; and the source of all notorious "paradoxes" related to it — if you can somehow order water, you may as well be able to reorder details of a sphere in a way to construct 2 spheres of the same size.

[0] https://en.wikipedia.org/wiki/Well-ordering_theorem


The single most best definition I know is what is on the wiki[0]:

> A choice function (also called selector or selection) is a function f, defined on a collection X of nonempty sets, such that for every set A in X, f(A) is an element of A. With this concept, the axiom can be stated:

> Axiom—For any set X of nonempty sets, there exists a choice function f that is defined on X and maps each set of X to an element of that set.

I like this definition because IMO it is simple, close to the name of the axiom, and you might want to use it in this form, that is, having a set of sets, and taking a choice function on them.

To understand its importance and the controversies around it, you'll need some examples and counterexamples how truthness and provability and knowability (regarding structures, numbers, metamathematics) interact; also what are the views of the majority of working mathematicians and people in other fields using mathematics.

[0] : https://en.wikipedia.org/wiki/Axiom_of_choice#Statement


Tangential, but a choice function is one of the ur-examples of Dependent Type Theory (DTT). In standard ZFC the choice function on X would have the type signature

   f: X -> UX (union X).
And you know the additional information that (∀A:X) (f(A) ∈ A), which is not encoded in the type signature, just an additional fact that you know, and have to keep track of it. In DTT the codomain can be the function of the picked element of the domain. In this case, the DTT type signature of f would be

   f: (A:X) -> A. 
So in this case the signature of the function carries strictly more information than in the case of normal, static function type signatures in ZFC. And the axiom of choice simply states that the type (A:X) -> A is non-empty if every A are non-empty.


Often it's easy to construct a family of sets representing something of interest. For example, we like to define integration initially as a finite process of breaking the integrand's domain into pieces, computing their area, and summing.

To compute the contribution of some piece indexed i, we measure the size of its domain, call it the area Ai, and then evaluate the integrand, f, at some point xi within that domain, then the contribution is Ai * f(xi).

Summing all of these across i produces a finite approximation of the integral. Then we take a limit on this process, breaking the domain into larger and larger families of sets with smaller and smaller areas. At the limit, we have the integral.

This process seems intuitive, but it contains an application of the axiom of choice---in the limit, we have an infinite number of subsets of our domain and we still have to pick a representative xi for each one to evaluate the integrand at.

It's quite obvious how to pick an arbitrary representative from each set in a finite family of sets: you just go through one-by-one picking an element.

But this argument breaks down for an infinite family. Going one-by-one will never complete. We need to be able to select these representative xis "all at once". And the Axiom of Choice asserts that this is possible.

(Note: I'm being fast-and-loose, but the nature of the argument is correct. This doesn't prove integration demands AoC or anything like that, just shows how this one sketch of an argument would. Specifically, integration normally avoids AoC because we can constructively specify our choice function - for example, picking the lexicographically smallest point within each axis-aligned rectangular cell. Generalize to something like Monte Carlo integration, however...)


Not like 5, but High-school Geometry.

If you remember Geometry, there are two ways to prove something:

- By making it (constructing)

- By contradiction (reductio ad absurdum)

During the late 1800s to early 1900s, when math was becoming more formalized, a group of mathematicians had issues with the second method.

From their point of view if you can’t show how to make it, then you’ve not proven that it exists.

Now it turns out that indirect proofs like contradiction requires the law of excluded middle: If something isn’t true, then it must be false (or vice versa).

It turns out that AoC is needed/implied, for the law of excluded middle; hence the objection to AoC; and enables these non-constructive proofs.

https://en.m.wikipedia.org/wiki/Law_of_excluded_middle

Another AoC proof: Prove that an irrational number to a irrational power can be rational.

sqrt(2)^sqrt(2) : If rational, then done.

Else (sqrt(2)^sqrt(2))^sqrt(2) = 2.

QED (and non-constructive).


Note that this proof doesn't require the axiom of choice, only excluded middle.


AC is much stronger than excluded middle. This doesn't really say anything about what AC does.


If you have a set of sets, you can pick one element from each set to construct another set.

This is provable if everything’s finite, but not if you’re dealing with things with bigger cardinalities like the real numbers.


This set of slides, originally devised for the Chaos Communication Congress, might be helpful: https://www.speicherleck.de/iblech/stuff/ac-38c3.pdf

- Precise statement of the axiom

- Overview of its consequences

- A counterexample (in an alternative universe)

- Consistency of the axiom

- Gödel's sandbox for containing the axiom


Yes. Here’s a great ELI5 intro:

https://youtu.be/_cr46G2K5Fo?si=Q6iEm3m-Nyge3FUW


Have you ever seen statements such as "for every epsilon there is a delta such that the following ... holds"? The axiom of choice implies that in those cases the delta can be supplied by some function of epsilon. It can't be proven that such a function exists in ordinary ZF (even if you can prove that statement with epsilon and delta).


I take a similar approach to investing on Masterworks (they sell shares of paintings). Most investors seem to buy the upfront offering, which is always $20/share, regardless of the painting. They don't seem to realize that MW holds onto the paintings for years, so it can be hard to cash out. Many will sell at a loss just to get their cash our before the painting is sold, so I can buy their shares very cheap.


I recently got a letter from the bank that owns my tesla loan, informing me that I can buy the car at the end of the loan. Previously that wasn't an option. Plus, it was for $28k (at the end of a 3 year loan).

Got another letter trying to get me to buy a new 3 with 0% interest for 60 months.

They're definitely under pressure.


Do you mean lease?


Yeah seems like your have a lease. You definitely want to return that lemon. Even if you love it return and re-buy for cheaper.


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

Search: