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

That is absurd. You could work yourself to death scrubbing dishes and it will never match the returns of inheriting a fortune from your parents. You do not live in a world where wealth is meritocratically distributed.


People are not stupid. No one working a low-skilled, low-wage job is confused about why they don't have more money.


>Not all aspects of programming can be described by math.

This is completely untrue. You may not be familiar with the math, but that doesn't mean it doesn't exist. If you can model something well enough to understand it, then you can model it mathematically. There really isn't any domain of knowledge that math is unsuitable for, excepting if you don't know any relevant math to do.


Technically everything in the universe can be modelled by math. If it isn't modelled yet we can make something up to model it. Math is just axioms and theorems so yeah, you're not wrong.

I'm speaking in less technical terms. For example in general mathematical equations or axioms represent immutable concepts. In programming, variables mutate and change... very different from what math traditionally represents. Haskell is an attempt to segregate the immutability (the math part) away from the less "mathy" part (the mutations/IO).

Maybe math is too broad of a term. I probably meant to say "algebra" can't model all of programming, or whatever more suitable word that may or may not exist.


Mathematicians have no trouble modeling change. There are many ways to do so. Some are algebraic, some are not. There is nothing wrong with modelling mutability using immutable structures: that is how you probably think about history, after all.

Either way, it is unclear what you're actually trying to say. Haskell has methods for modelling change of state through pure objects, but you're talking about that as though it were an inherently flawed or invalid approach, rather than one of many equally valid approaches to modelling state transformations.


>but you're talking about that as though it were an inherently flawed or invalid approach,

This is just your bias. I never said this. I feel some people worship a paradigm so much that they see everything as an attack. FP is great however it is not a one size fits all solution. There are limitations. This is literally what I said.

>Mathematicians have no trouble modeling change. There are many ways to do so. Some are algebraic, some are not. There is nothing wrong with modelling mutability using immutable structures: that is how you probably think about history, after all.

You can model change with purity but the program in the end actually has to conduct the change without the modelling. The application has to eventually perform real world actions and the purity of your program cannot protect you from potentials pitfalls of imperative style errors/mistakes.

You have a database. The purity of haskell does not remove the necessity of mutating data in that database.

What you can do is segregate dealing with mutation/IO to a framework or external service. This is what haskell does, but you see this is just shifting the problem to somewhere else. Someone somewhere still had to deal with the issue of mutation. Modelling mutation with purity does not eliminate the problem it only moves the problem to another location.

Segregation of mutation/IO into a framework is a good thing. It makes it so that the problem can be solved one time, rather then a problem solved many times. However the main point of my post is to say that "math" or "algebra" is not a one size fits all solution. You cannot model everything this way, moving the problem into a framework does not make the problem disappear. Someone still had to use imperative primitives to deal with the issue. Think about the complexity of a SQL database.


You said FP "breaks down" when handling mutability, and you attributed that to some vague sense in which "mathematics" is the cause of it.

I have no bias for FP. I just don't understand what you're getting at.

>the purity of haskell does not remove the necessity of mutating data in that database.

That's great, because the purity of Haskell does not inhibit mutability. It just constrains it to lie within some mutable context.

>Modelling mutation with purity does not eliminate the problem it only moves the problem to another location.

Location? What is a location? It's like you're saying you can't truly add 3 + 3, because someone still has to add 1s under the hood. It's just a different model of the same problem.

Honestly, it sounds to me like you've never used the language, and your criticisms come off a bit like standing on an aircraft carrier shouting about how iron boats will never float.


>That's great, because the purity of Haskell does not inhibit mutability. It just constrains it to lie within some mutable context.

Haskell does inhibit mutability within your haskell program. Your haskell program does not mutate. What it does is it that it does IO operations and the mutations happen externally. It can also model mutation without doing actual mutation but in the end there's no point in a program modelling mutation if the program can't actually do mutation or IO.

>Location? What is a location? It's like you're saying you can't truly add 3 + 3, because someone still has to add 1s under the hood. It's just a different model of the same problem.

Location meaning outside of haskell. Like your database. I'm saying within haskell you have a variable.

  x = 3
You can never mutate that variable in haskell. However you can mutate the state of the console without ever mutating any state within haskell.

    print "hello"
The above triggers no mutation in haskell. A runtime outside of the haskell universe analyzes the IO instructions and mutates the console. What I am saying is that the thing that mutates the console has to do mutation. Whoever wrote that thing HAS to write imperative primitives. They are moving the imperative nature of programming INTO a framework. They are not eliminating the problem.

This is the same thing as a database string. UPDATE. You are moving all the imperative errors that have to deal with threading and mutations to the database. But your haskell sql string is still pure.

Again my argument is just saying that this thing that is doing the UPDATE or mutating the console cannot be built using haskell style code or immutable algebraic concepts. Imperative primitives need to exist and someone needs to use those primitives to do the actual mutations.

The OP is basically saying algebra is the future and it can replace everything. I'm saying it CAN'T.

>Honestly, it sounds to me like you've never used the language, and your criticisms come off a bit like standing on an aircraft carrier shouting about how iron boats will never float.

And honestly you sound like the guy standing on the iron boat. The person I'm shouting at is you, but you're just dismissing me.


[flagged]


>You're just trolling at this point. Please reconsider your confidence in this material, because you are egregiously mistaken.

Why the heck would I run such a long expose and troll you and be mistaken at the same time.

>How does this Haskell program write to stdout if it doesn't mutate memory?

Let's not be stupid here. Every program on the face of the earth must mutate memory because that's how computers work. Assembly instructions mutate things. We're not even talking about that. We're talking about application level programming where we only deal with primitives that the application programmer is aware about. I am saying that at the application level within the category of Hask nothing is mutated.

In your example tell me what haskell primitive.... What variable or data was mutated within haskell? That is what I'm referring to.

Try to implement IO or ST in another lang using only purely functional primitives. Use your algebra to make it work. You'll find it's impossible. What this means is that imperative primitives must exist for any programming to work.

>Then it doesn't work. Every Haskell program does nothing, because mutation of program state does not occur.

Obviously I'm operating on a certain layer of abstraction here. In X = 6, X is obviously immutable in haskell. A runtime is obviously executing your haskell program and mutating the console but your haskell code itself is pure. But you know this. It's quite obvious you're the one that's trolling.


>What variable or data was mutated within haskell?

The stdout buffer.

Just because mutation isn't explicit doesn't mean it isn't there. Programming languages are not syntax devoid of meaning: they have semantics. What happens at runtime is part of what a programming language does. (Arguably, that is the most important part of what they do.)

>What this means is that imperative primitives must exist for any programming to work.

That's completely untrue. Imperative languages can be implemented as a subset of functional ones[1] and vice versa. Again, they're just different models. No language can do anything if it isn't implemented in a machine. A machine isn't "imperative"[2], it's a pile of atoms that do what atoms do, without paradigm or instruction. You absolutely could implement a pure functional assembly language. The reason nobody has, is because it doesn't matter: any Turing complete language can be used to implement any other language[3].

Try to implement `volatile` in C without using another language. Does that mean C fails to model real hardware? No, because it has `volatile` to get volatile semantics! Just like Haskell has IO to get I/O side-effects. Or ST to get mutation semantics.

> Use your algebra to make it work. You'll find it's impossible.

Don't assert it, Prove it. Show me one computable function that cannot be computed using boolean algebra.

[1] https://www.microsoft.com/en-us/research/wp-content/uploads/... [3] https://en.wikipedia.org/wiki/Lisp_machine [2] https://en.wikipedia.org/wiki/Turing_completeness


>The stdout buffer.

The stdout buffer is not part of the haskell language, it is part of the OS. The haskell runtime reads the haskell language and accesses the buffer. Neither the runtime or the buffer is part of the haskell language, get it? That's why haskell is called "pure" Category Hask: https://wiki.haskell.org/Hask#:~:text=Hask%20is%20the%20cate....

>Just because mutation isn't explicit doesn't mean it isn't there.

So? I never said it wasn't there. I'm basically saying as far as the programmer is concerned when operating within the haskell language no haskell language primitive is mutating. stdout buffer is not a haskell primitive... it is an OS primitive.

>That's completely untrue. Imperative languages can be implemented as a subset of functional ones[1] and vice versa.

This is true theoretically, but physically but you can't actually build a functional machine. Lisp isn't actually a functional language and you'll see from the instruction primitives that the lisp machine is more or less a turing machine that mutates memory.

>No language can do anything if it isn't implemented in a machine.

So? Never said this wasn't true.

>A machine isn't "imperative"[2], it's a pile of atoms that do what atoms do, without paradigm or instruction.

The machine you build is limited by what you build it with. You have a limited set of atoms. Therefore you can only build a machine with limited amount of state. In order to use the state efficiently the state must be mutable. Mutable state means imperative instructions. You can imitate functional programming with such a machine and you can sort of solve the memory problem with garbage collection. But with what paradigm do you implement the garbage collector? Imperative primitives.

> The reason nobody has, is because it doesn't matter: any Turing complete language can be used to implement any other language[3].

No the real reason is also because it's physically impossible. A physical translation of a actual lambda machine cannot be realized. What they can make is register based machine that are more efficient at compiling certain functional languages that's it. All machines we build have some sort of state that changes.

>Don't assert it, Prove it. Show me one computable function that cannot be computed using boolean algebra.

Sure I can prove what I said. But you're changing the problem from IO and ST to a computable function which I assume is algebraic. So of course all of algebra can be used to create all algebraic functions. I'll just prove what I said rather than what you changed it to.

Assuming mutation is an axiomatic operation that cannot be built from immutable operations, you will see that no mutation operation exists in algebra indicating that mutation cannot ever exist in any theorem of algebra:

https://www.wikiwand.com/en/Algebraic_operation#:~:text=In%2....

You will see that no algebraic operation involving mutation exists in the above document.

>Try to implement `volatile` in C without using another language. Does that mean C fails to model real hardware? No, because it has `volatile` to get volatile semantics! Just like Haskell has IO to get I/O side-effects. Or ST to get mutation semantics.

No but I can implement volatile with imperative primitives from other languages. All I am saying is you cannot implement ST and IO with functional primitives.


[flagged]


Personal attacks are against site rules on HN. You are clearly across the line here. Moderators ban people for repeated violations, so if you want to continue here, you should stop posting abuse.


You can do better, then. Read nendroids latest reply to me, and help them understand that it's the "use of statements" that makes a language imperative, not the "modification of state."

I won't be responding, and they seem to think they're quite the expert in this sort of thing.


"In computer science, imperative programming is a programming paradigm that uses statements that change a program's state."

The above quote is ripped straight out of wikipedia's definition of imperative programming showing that what I said wasn't a misunderstanding but an official definition.

The definition of imperative programming must include mutation otherwise it's isomorphic to functional programming. Because functional programming is simply statements without mutation.


Case in point, This guy turned what was just fact checking into something personal. See, it's not about being civil. That's just the way people like to think they are. The reality is most people can't accept being wrong and they can't accept opinions they disagree with and the irony is everyone believes they're above this base behavior.

No one is above it.


I see no personal attack. Technically speaking.


https://www.wikiwand.com/en/Imperative_programming

"In computer science, imperative programming is a programming paradigm that uses statements that change a program's state."

You will see from the quotation above. The very act of changing state is an imperative style by definition. The purpose of mutable state is for it to change. So mutable state = imperative instructions.

>You don't have to listen to me, but you should seek out a second opinion from a competent person who can get through to you.

I'll throw that advice back at you. But you don't need to find that person. I'm right here in front of you telling you how it is.

>Everything I said in my last post is basic, well-understood computing knowledge. If you want me to disagree with it, you need to find yourself a competent computer scientist to aid you in framing your ideas in a way that is comprehensible with respect to the subject matter.

Yeah but you didn't account for the practical parts of computing. The theoretical parts often deal with machines that can't be realized in reality. It's pretty much common sense. How do you represent a function call without mutable state? How can you have a machine do an algebraic operation without mutable state? The very act of holding that information in state requires a state change meaning to even load a lambda machine with a program requires an imperative instruction.

We're also in a corner of computer science that isn't formally well defined. A language can be formally defined as pure but there's no formal theory for systems design and how the system overall influences the content of a pure SQL string in Haskell.

I define a haskell sql string to have syntactically correct SQL. The external requirements of my database are forcing me to define a string this way, is that a side effect? There's no formal rules in literature so it's just raw talking points... you won't be able to find an official source stating who's right or who's wrong.


The primary difference between computer science and mathematics proper is an overt concern for performance. Mathematical elegance and computational efficiency are not the same thing.

Haskell is a pretty awesome language, but it doesn't make it easy to incrementally optimize programs.


Not that I'm disagreeing with you in any way, but it's worth recognizing that imperative languages typically do pattern matching and type constraining in a declarative manner. So one could make an argument that what you're saying is only true because imperative languages are not forbidden from employing FP. If a language uses declarative constructs, then it's not a wholly imperative language.


I really don't think that FP should be able to take claim for this. Or, at the very least, I don't think the sort of evangelical FP should. Type pattern matching isn't all that different from virtual dispatch if you squint.

If the FP community wants to say that impure languages have been "doing FP" for decades then great! The religious war is over! We can happily have mixed paradigm languages and move on. But that's not what I'm seeing.


I've disowned by family for their willingness to reject common and simple facts, their hostile attitude, their repeated willingness to denigrate all I stand for, and an utter lack of self-awareness. I'll let you guess who they vote for, because I can't be bothered to care.


Did they reject you or only some facts and something you cared for?


What's the difference? Let me quote them directly:

"Oh, you're one of THOSE people." (What people?)

"Trump is not being impeached." (Simple to verify, not up for debate.)

"Biden is not Trump's opponent." (Didn't need to be questioned, but apparently it's also up for debate?)

"There is no truth." (Then what are we talking about?)

"You can't trust CNN." (But anyone with a YouTube account and a webcam is trustworthy.)

"Vindman is from Ukraine, so we don't know what his loyalties are." (You can't tell how trustworthy a person is based on where they were born. Textbook racism.)

"Watch the DOJ." (My spy van is in the shop and I lack a desire to confirm your biases.)

"I love you." (You can't cross a bridge after you've just burned it to the ground.)

The fact is, a person can only form correct beliefs if they test those beliefs in the crucible of reality. Sitting on the couch in some shit-smelling hoarder's hovel living off of your retirement is not a recipe for finding the truth.

Beliefs must have consequences, and as a consequence of their beliefs, they won't be seeing me alive again. It's really the least I can do. I'm not interested in playing a stooge for them to gleefully fling their ignorance at.


The difference is that your beliefs are not you. Beliefs change and you remain. They disagree with your beliefs but not with you. They do love you.


Would you rather have an expert in Rust doing web programming in Rust, or a novice in JS doing web programming in JS?

The best language to use is the one you know how to use best. If you know all languages equally well that you're free to choose the ideal language for every project, then sure, that's the way to go.


For web dev, I would rather have an expert in rust obviously, but I would also rather have an expert in php who expressly choose php over rust for the sake of the kiss principle. Plus he would probably be satisfied with a lower starting salary :-)

But you are right, reality often goes differently than what's thought to be ideal, which is why "perfect" solutions sometimes doesn't gets adopted in favor of a less perfect solution, which leaves the old "perfect" solution forgotten by history.


That's a disingenuous narrative. Truth can ultimately be verified independent of belief. That's what makes it true.

If your idea if truth is such that it can be dictated by political will, then you don't understand what makes truth special. It is special almost wholly due to its resilience to narrative, and it is incredibly bold or stupid to try to discount it through those means.


I don't hold the above as personal beliefs. I'm much more aligned with "The great thing about the truth is that it can be true whether you believe in it or not." That's spin on Neil Degrasse Tyson quote on science, but it holds true to me as well for truth.

It doesn't even need to be political. We have people that believe in a flat earth to this day. If you go through life expecting people to accept true as true, then you will be sadly un-armed for real-life experiences. There are people that are absolutely unwilling to accept that what they currently believe is not accurate, and will not listen to any reasoning what so ever.


There's always been people who believe in nonsense. Most people, throughout most of history have. The meaning of "post-truth" today is that people in power are no longer being asked to justify what they do on the basis of fact. (It doesn't mean that facts don't exist or that they don't matter, I just found it off-putting that you'd try to suggest that.)

Allow me to paraphrase a concept from Tolkien: evil doesn't win because it's a superior force, it wins because it convinces you that it's already won. "Look over there, evil wins. Look here, evil already won. Evil always wins, that's the way it has always been. You can't fight it so give up."

You can't win by spreading evil's messages, even sarcastically. You win by being a superior force and never giving up. People's credibility should actually suffer when they do or say things that are incredible, and people who appeal to us with facts and compassion should be rewarded.


But when you use words like "should", you've kind of already accepted the fate that it is not.

There are fights worth having, and then there are fights that are worth walking away from. If someone starts spouting off garbage, I just walk away and cut ties with them. I'm well past arguing over stupidity. You can tell when someone is unreasonable pretty quickly. However, when someone responds in a way that says they are willing to at least consider an opposing view, I will have a conversation. I enjoy those conversations even if no view points are changed at the end. That's the way it should work. See, I just said should as well.


>However, when someone responds in a way that says they are willing to at least consider an opposing view, I will have a conversation.

But what if they don't want a conversation? What if they want a "silent majority" that they will then claim to represent? What if they interpret a lack of resistance as evidence of support?

You may not be changing people's minds outright, but you do have some impact on the strength of their convictions, and their sense of how broadly held they are.


That's exactly why I enjoy having conversations with people with differing view points. If they are compelling and it's something I was unsure of anyways, I'm willing to accept that my current view may be flawed. OR if at the end of the conversation the other persons arguments were uncompelling or even disproven during the conversation, then I feel better about my current view of the topic.

If someone doesn't want that conversation, then it doesn't happen. I don't strap someone to a chair with toothpicks under their eyelids. I reserve that when getting people to watch my short films!

Edit: Conversations about differing/opposing view points isn't always about changing minds. It just helps to get to know someone. If someone tells me they are vegetarian, I don't launch into why I'm not. However, I will make the mental note to not ask them to join me for dinner at the local steak house. If I want to have dinner with them, it helps me plan an appropriate place that they would be okay with as well.


It's not a powerful argument for 'we must be alone', because it's an equally powerful argument for 'space colonization is nearly impossible.' You're saying things are "certainly possible" but you don't have a shred of evidence to support that belief. It's more likely that you're vastly underestimating the cost of maintaining a life-supporting ecosystem independent of the benefits of a billions of years of evolutionary adaptation.


That thinking is about a decade out of date. The number of expolanets that are in the habitable zone grows geometrically. Some think every star has some planets. Simple chance makes it possible to find agreeable destinations nearly everywhere.

And 'evolutionary adaptation' is irrelevant. We can change ourselves (are changing ourselves) genetically already. That will only increase. The result will be a species more adaptable than any in a billion years. If it has the will to colonize other planets, it certainly can.

'A shred of evidence' is really not hard to find, if we aren't needlessly negative and contrary.


A decade out of date? It'll take you 30,000 years to reach the nearest star at the rate of the fastest moving object ever constructed by man. If anything any of us are talking about are able to be out-of-date in a mere decade, the whole premise of this discussion is flawed beyond measure.

All of the resiliency that you've seen in life is due to the fact that the environments to which we're adapted are uniform. Oceans everywhere are nontoxic and water. Air everywhere is mostly clean and breathable. There is no example of life being resilient under conditions as varied as other planets. We are only able to adapt within the confines of our clean-room Earth. We can't even adapt to the bottom of the ocean or Antarctica.

Optimism isn't going to overcome 6 orders of magnitude of error.


Not a single correct thing in that, I believe! Life on Earth has evolved to live in hundreds of dissimilar environments. Heavy salt is toxic, yet fish manage the ocean. Yellowstone has life in mud pots at hundreds of degrees. Air doesn't exist underground yet bacteria thrive there. Hell, there are living things on the surface of the space station.

To get people to tolerate more salt, we'd have to have a fish's ability to regulate it. Ok, genes for that. Air issues? Filters, microstructures to migrate particulates out, baffles (like many creates already have). Deep-ocean pressure? Only a couple of issues there, and certainly life thrives at the bottom of the ocean.

It's not optimism; its simple observation of what we have already on Earth in existing life forms.

And 30,000 years changes not a thing. The log of 1 Trillion base 2 is 39. In 40 generations of space colonization, that's 40 times 30,000 times however long it takes to rebuild the capability on each colony. In a dozen million years the galaxy would be covered. Its 20B years old. So, nobody's tried it yet.


>In 40 generations of space colonization, that's 40 times 30,000 times however long it takes to rebuild the capability on each colony.

Assuming each generation survives. Stop making that assumption, and see how many ways there are for you to reach a similarly empty universe.

>It's not optimism; its simple observation of what we have already on Earth in existing life forms.

I wish you'd observe that none of Earth's lifeforms have colonies on other planets. Goldfish didn't colonize other worlds, is that then a strong argument that Goldfish don't exist?

What you're saying makes no sense: just because animals can colonize a single planet over many generations does not mean they will be able to colonize an entire galaxy in even less time.


>I wish you'd observe that none of Earth's lifeforms have colonies on other planets. Goldfish didn't colonize other worlds, is that then a strong argument that Goldfish don't exist?

I would not be so sure about dolphins. ;-)


Again, not true. Geometric growth can't be dismissed. Even if 90% didn't survive, it just takes (a little) longer.


How the hell is a 10% survival rate "not optimism?" Try a trillionth of a percent. It makes an astronomical time difference.


You're ignoring what I believe to be the most important point: how do we know that is actually possible to build an interstellar colonial vessel?

Or, to bring a concrete element to the question: all known rocket fuels require some nonrenewable Earth resource. How much fuel does it take to launch a vessel built with currently-known technology that would be capable of landing a living human being on a hypothetical planet around Alpha Centauri? And what does that fuel number look like, when expressed in terms of "years of current resource extraction" (or, somewhat more audaciously, percentage of known proven reserves)?

To my knowledge, interstellar colonization is flat-out impossible with current technology. (I'd argue that even intrastellar colonization is impossible, rather than impractical). Arguing that we should discount this non-knowledge of how to do it when explaining why it hasn't happened to our observation is irresponsible to me.


Well, the ideal chemical rocket fuel is hydrogen + oxygen - eq. the two things that make up water. Thats perfectly renewable once you pump some energy into it to split water into the two.

Methane + oxygen popular in the new generation of rockets is not much different, you basically add some carbon to the process & Methane can be made on Mars from local resources.

Best fuel for nuclear thermal rockets is again hydrogen, abundant everywhere.

Current Ion Engines run on noble gases, but supply does not seem to be a problem so far.

Sure, the uranium needed for Orion and Nuclear Salt Water rocket indeed is not really renewable but given the performance &opening the way to grab more of it from space make it a non-issue as well.


> Some think every star has some planets.

20 years ago, before we had direct evidence of exoplanets, we had evidence from the spectrum of stars that about 80% of the ones which had grown large enough to swallow any of their planets had previously had gas giants.


It is a paradox. It assumes you have a definition of uninteresting number such that you can select the least uninteresting number, and then retroactively defines that number to be interesting by brand new criteria, which contradicts that you would have ever selected it in the first place. Thus the axioms invoked are mutually contradictory: the axioms that allow you to identify the least uninteresting number, and the axioms you invoke to declare it interesting are in conflict.


If your go-to examples of male touch are reserved for brief celebratory gestures and "inappropriate" touching, then it would seem you're not effectively making the point you're attempting to make. Neither of these examples indicate that touching is normal, common, or considered appropriate.

Why did you think they would? Do you often find truth by generalizing from exceptions?


Can you talk more about how professional athletes and the highest level of government are exceptions? Those people are in the spotlight more than most people, except maybe actors...but the film industry seems to have the same message.


I'm not going to explain to you how fame and media attention are exceptional. It should be obvious to anyone who doesn't have their head up their ass.

I guess if you want to claim that the behaviors of heads of state and professionally trained millionaire athletes is indicative of the experiences of your typical American male, you can suffer the credibility loss that such a claim entails.


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

Search: