Hacker News new | past | comments | ask | show | jobs | submit | runeks's comments login

> I would question the ethics of engineers whom employ a strategy of preferring politics over delivering solutions.

This too harsh. There's nothing unethical about delivering what your manager tells you instead of what you believe the customers need. Going rogue — as opposed to doing what you're told — is not necessarily the ethical choice.


IMO there are enough "not particularly ethical" tech companies are out there that we shouldn't be giving awards for blindly doing whatever your corporate overlords say. You have a choice every day what you contribute to the world.

Agreed. And preferably a fourth, fifth and sixth as well.

Ranked choice voting is the only path to this.

Have you not heard about approval voting? Or do you not see it as another path to multi party elections?

Approval voting would be better than what we have now, but I think ranked choice is easier for people to understand.

I think putting preferences is more comforting to people than the idea of approving people equally if you have preference.


> I think ranked choice is easier for people to understand

I strongly disagree. "Vote for one or more candidates" is even easier to explain than "sort all these candidates in the order of your preference".

And once you start trying to explain the potential adverse effects there's no contest. Approval voting today, tomorrow, forever.


* You can cap the number of candidates to rank (in other words cap the number of instant run-offs before another election may be needed). Or you cap the number of candidates, or determine a tie-breaker strategy after X rounds.

* What adverse effects are there that are worse than FPTP?

* I think if someone loathes candidate A, doesn't like candidate B but would tolerate them, and REALLY LIKES candidate C, they should be able to express that preference. Approval voting demands they express B and C with equal endorsement. Personally, I think that's discouraging.


> what adverse effects are there that are worse than FPTP.

* The results of close elections become basically random (due to results swinging wildly depending on the order in which the first few candidates are eliminated)

* You have to convey results with a series of graphs rather than a single graph (which confuses voters)

* You need all ballots in-hand to start an official count, so you can't call elections early

* You lose the ability to perform risk-limiting audits, which are the cheapest and easiest way to audit elections

So bad actors can trivially affect RCV elections by destroying or delaying a few mail-in ballots, as well as cast doubt on RCV results as a whole


1) This is not worse than FPTP at all since they are the same in the case of two candidates and FPTP has horrible properties with multiple candiates (the condorcet loser can win the election). Ranked voting can use various methods (condorcet or hybrid) to make sure the winner is the condorcet winner or in the smith set but that adds complexity and no voting method has every desirable property (IRV does not always elect the condorcet winner). Approval voting also can elect the condorcet loser which seems like quite a bad property to me (particularly since this can be affected by strategic voting).

2) Any confusion is due to lack of familiarity and the additional information can be useful beyond determining the winner.

3) This is only true when hand counting a lot of votes (just because you don't want to do it multiple times). Portland just had an election with STV for council seats and IRV for Mayor and these elections were (when possible) called early. You can see the early results here:

https://rcvresults.multco.us/

4) From a quick Google Scholar search there are risk-limiting audit options for IRV that usually work with few ballots but in occasional worst cases can need a full recount. See Blom et al. Ballot-Polling Risk Limiting Audits for IRV Elections:

[PDF] https://www.researchgate.net/profile/Michelle-Blom-3/publica...

I agree with buzzy_hacker that proportional representation is the most important thing to aim for. The main advantage of IRV is that it is easy to understand for single winner elections if you use STV for proprotional representation (which seems like a good choice for the US to me). As far as I know Ireland only has the President (a ceremonial role) individually elected but the US has a bunch of individually elected positions so going directly to the Irish system would be a bigger change.


Just elections really are a science.

I'll comment on the last point: I know that multi member districts with proportional representation would be better. Hell, I am closer to convinced that a parliamentary system would be better for us, but I think the people of the US like having a directly elected head of state.

Democracies have evolved in 250 years. We're running old software.


1) Preliminary election-night results (provided by ballot-counting software) will change drastically as new ballots arrive, and it is harder for voters to understand margins. For example, a 2022 miscount in California for a board of education position (noticed weeks after the election) should have elected the candidate who had previously gotten 3rd place.

https://abc7news.com/amp/ranked-choice-voting-oakland-school...

2) You're saying that a series of graphs is only harder to understand than a single graph due to lack of "familiarity?" This seems disingenuous. With single-graph results, you can show geographical heat maps of voting behavior which is paints a vivid picture of the vote. Heat maps for RCV are misleading and/or require additional context (this shows 1st choices).

3) Hand-counted ballots are a must in my opinion (for audit-ability). And hand counts of RCV are time-consuming so are typically only done once. I guess runaway elections can be called early with RCV, but my point is that it will happen far less often and most election results will be significantly delayed (waiting for all mail-in ballots to start a hand count)

4) I admit I didn't read this paper nor understand it at a cursory glance, but I know this was a drum that approval voting experts beat a while back. Maybe these strategies are new, or have downsides I'm unaware of.

Why do you see proportional representation as the most important thing to aim for? This is the only argument for RCV over approval that holds water, but my mental model for the need for proportional representation is of politics being a 0-sum game where everyone needs to vie for themselves (which I disagree with).


1) Sure it can happen and mistakes happen in any voting system. You can't tell who wins a close election until all the votes are counted, that is pretty much the definition of a close election. FPTP elections are also miscalled at times.

2) Anyone who cares to look at a heat map will need to learn how the new system works then will appreciate the additional information (the ballot could usefully also include approval information as a distinct aspect that doesn't affect results so that it is possible to determine how many voters like their representative, but I would say that approval voting does not communicate that).

3) Why do you think hand counting improves auditability? Being able to hand count does of course but actually doing the main count by hand doesn't seem to me like it would add anything. Not that I am opposed to hand counting, in that case you just wait for the ballots. As issues go it is way down the list from the other properties of the voting system in my opinion.

4) That one was 2018 or 2019 I think and an older one I saw was published in 2013 so yeah it sounds like this research is fairly recent and still being improved.

I don't see politics as a 0-sum game but people absolutely have fundamental differences where politics is the non-violent way to come to a resolution. These differences can be non-obvious if it isn't important to you and proportional representation gives a better chance that an elected representative will be able to understand and care about your issue (which increases the chance it can be solved easily if it isn't a contentious issue even if your favored representative doesn't otherwise have power). To put it another way, if the point of an election is to elect a represetative then proportional representation aims to give everyone representation within the practical limits of the number of representatives. Ideally, this would also make it easier for the representative to explain actual points of contention and tradeoffs (and basic stuff like what they are actually able to affect) to constituents and build general political competence, although I can't say that what I know of countries that use proportional representation is as promising as I would like on that. Ultimately a voting system alone can't do everything, representation isn't the only possible reason to ever have an election, and my personal ideal of how political resolution of differences can or should work involves a number of things quite different from currently common methods. Overall I see FPTP elections as more of a show to distract from behind the scenes power than a system designed to resolve differences peacefully and approval voting seems similar to me (in my opinion one of the most important things a voting method should try to do is limit the effect of strategic voting).


Proportional representation is more important than RCV vs approval voting for single-winner elections. And, in the US, multi-winner RCV (single transferable vote) is the most viable approach to achieve that.

I tried this a couple of years ago and had to ditch the TV because of too much input lag.

You mention input lag only once where you say:

> Although this post is mostly focused on productivity, most if not all 8K TVs can be run in 4K at 120 Hz. Modern TVs have decent input lag in the ballpark of 10 ms and may support FreeSync.

Have you measure this, or where do you get this number from?

The TV I bought was also advertised as low-latency, but I found it too high in practice (when typing in code, or scrolling, and waiting for the screen to update).


> With a sufficiently advanced type system, you could lay out high level building blocks, such as function definitions, and let the LLM go wild, and then if things compile there's a high chance it's correct. Or maybe even a formal proof things are correct.

A formal proof is simply a type that allows only the correct implementation at the term level. And specifying this takes ages, as in hundreds of times longer than just writing it out. So you want to use an LLM to save this 1% of time after you've done all the hard work of specifying what the only correct implementation is?


> Highly recommend people mess around with Purescript, you can feel how much pressure is relieved thanks to the row polymorphism tooling almost instantly.

> I think row polymorphism is a fairly straightforward thing compared to dependent types in general, but can let you crush a whole class of errors [...]

Would you care to provide a few examples? I don't have experience with row polymorphism so I'm genuinely curious.


  greet :: forall r. { name :: String | r } -> String
  greet person = "Hello, " <> person.name <> "!"

  greetWithAge :: forall r. { name :: String, age :: Int | r } -> String
  greetWithAge person = 
    "Hello, " <> person.name <> "! You are " <> show person.age <> " years old."

  main :: Effect Unit
  main = do
    let person = { name: "Alice", age: 30, occupation: "Engineer" }

    -- greet can accept the person record even though it has more fields
    log (greet person)           -- Output: "Hello, Alice!"
  
    -- greetWithAge can also accept the person record
    log (greetWithAge person)


How does it differ from structural typing in TypeScript though?


Structural typing relies on interface compatibility. Row polymorphism is a type-level feature in PureScript where record types are constructed with an explicit "row" of fields.

In Practice, row polymorphism is more granular, allowing you to explicitly allow certain fields while tracking all other fields via a ("rest") type variable.

Example: PureScript allows you to remove specific fields from a record type. This feature, is called record subtraction, and it allows more flexibility when transforming or narrowing down records.

You can also apply exact field constraints; meaning, you can constrain records to have exactly the fields you specify.

Lastly, PureScript allows you to abstract over rows using higher-kinded types. You can create polymorphic functions that accept any record with a flexible set of fields and can transform or manipulate those fields in various ways. This level of abstraction is not possible in TypeScript.

These are just a few examples. In the most general sense, you can think of row polymorphism as a really robust tool that gives you a ton of flexibility regarding strictness and validation.


> PureScript allows you to remove specific fields from a record type. This feature, is called record subtraction, and it allows more flexibility when transforming or narrowing down records.

TypeScript does allow you to remove specific fields, if I understand you right [0]:

    function removeField<T, K extends keyof T>(obj: T, field: K): Omit<T, K> {
        const { [field]: _, ...rest } = obj;
        return rest;
    }

    type Person = { name: string; age: number };
    declare const p: Person;
    const result = removeField(p, 'age'); // result is of type: Omit<Person, "age">

> PureScript allows you to abstract over rows using higher-kinded types. You can create polymorphic functions that accept any record with a flexible set of fields and can transform or manipulate those fields in various ways. This level of abstraction is not possible in TypeScript.

Again, if I understand you correctly, then TypeScript is able to do fancy manipulations of arbitrary records [1]:

    type StringToNumber<T> = {
        [K in keyof T]: T[K] extends string ? number : T[K]
    }

    function stringToLength<T extends Record<string, unknown>>(obj: T): StringToNumber<T> {
        const result: Record<string, unknown> = {};
        for (const key in obj) {
            result[key] = typeof obj[key] === 'string' ? obj[key].length : obj[key];
        }
        return result as StringToNumber<T>;
    }

    const data = {
        name: "Alice",
        age: 30,
        city: "New York"
    };

    const lengths = stringToLength(data);

    lengths.name // number
    lengths.age // number
    lengths.city // number

[0] https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABA...

[1] https://www.typescriptlang.org/play/?#code/C4TwDgpgBAysBOBLA...

edit: provided links to TS playground


The tools typescript provides are a little pointless if it allows you to do stuff like this (imo):

const r1: { a: number; b: number } = { a: 10, b: 20 };

const r2: { a: number } = r1;

const r3: { a: number; b: string } = { b: "hello", ...r2 };

console.log(r3.b) // typescript thinks it's a string, but actually it's a number


Yeah, it's definitely not ideal, but even with its many flaws I prefer TS over plain JS.

The problem in question can be "fixed" like this

    const r1: { a: number; b: number } = { a: 10, b: 20 };

    const r2 = r1 satisfies { a: number };

    const r3: { a: number; b: string } = { b: "hello", ...r2 };
Now, TS would warn us that "'b' is specified more than once, so this usage will be overwritten". And if we remove b property -- "Type 'number' is not assignable to type 'string'"

Another "fix" would be to avoid using spread operator and specify every property manually .

Both of these solutions are far from ideal, I agree.

---

I don't advocate TS in this thread though; I genuinely want to understand what makes row polymorphism different, and after reading several articles and harassing Claude Sonnet about it, I still didn't grasp what row polymorphism allows over what TS has.


As far as I understand it, row polymorphism wouldn’t allow the given example. Or to put it another way, the spread operator is impossible to type soundly in the presence of structural subtyping because the type system doesn’t capture the “openness” of the record’s type, the potential presence of additional fields. Whereas with row polymorphism, to some degree or another, you can.


Thank you, but I was looking for real world examples solved by row types as OP implied there were plenty of.


Can `greetWithAge` be implemented using `greet`?


https://rtpg.co/2016/07/20/supercharged-types.html I wrote this example a long time ago, I think nowadays I could come up with some more interesting examples though.

As to the differences with TS... I think they're playing in similar spaces but the monadic do syntax with Purescript lets you use row polymorphism for effect tracking without having to play weird API tricks. In TS that's going to be more difficult.

(short version: in purescript I could write an API client that tracks its state in the types so that you can make sure you authorize before calling some mechanism. In TS you would need to design that API around that concept and do things like client = client.authorize(). Purescript you could just do "authorize" in a monadic context and have the "context" update accordingly)


> We pay the price by having a weaker economy, they pay the price by having less dignity in their life, but there is eventually balance.

It doesn't need to be black or white.

A country can have decent consumer protections without e.g. a tax policy that is hostile to startups. But many EU countries are seemingly uninterested in the latter — presumably because there are no votes in it.


I disagree. People reading a book on how to write HTML already have an idea of what it is — why else would they read the book?

And, in any case, explaining what HTML stands for does not get anyone closer to understanding what it is.

I think it's a feature that this book doesn't throw technical jargon at the reader before they've even created anything useful yet.


Which browser?


And which device.

Over the years, adding many simultaneous videos to websites has become quite common, and I have always marveled at how well many devices can handle this.

Nevertheless, it is pretty demanding for the hardware, and many smartphones are not made for such tasks.


> I watched everyone make the same arguments about the general Internet, and then the Web, then mobile, then Bitcoin.

You’re conveniently forgetting all the things that followed the same trajectory as LLMs and then died out.


>died out

Btc is currently like 60k... What does died out mean to you?


My advice: use Stack if you're new to Haskell, otherwise cabal. Stack has better UX but isn't as powerful as cabal.


Thanks, cabal worked for a Yocto layer PoC.


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

Search: