HNHacker News
TopNewBestAskShowJobs

crimsonalucard5

89 karma · joined June 15, 2020

submissionscomments
crimsonalucard5··on “Adobe Flash is no longer supported in Safari”
Got a question for any front end devs who were experts in Flash and AS but now experts in React.

Qualitatively speaking what was the development experience like for Flash websites or animations vs. HTML 5 + react OR JS?

Can you say definitively one experience was better than the other or is it a more complicated story?

I know there's a lot of hate for flash but I'm specifically asking about the developer experience here.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
No I did not do what you wrote.

Here's what I did: I defined what a function is, then I described how a unix program fits the definition of what a function is...

In short a unix program with stdin as domain and stdout as a codomain is a function but a function is not necessarily a unix program.

I think what's actually going on is you didn't read what I wrote very carefully. You sort of just skimmed over it. I can't blame you, it is rather long and detailed...

But if you want to have a meaningful discussion you need to read it and ask questions about things you don't understand.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
I use to be pretty negative about JS, but typescript saves the day. The lego aspect of functional programming always becomes more evident when you have static types.
crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
I don't think dynamic typing or static typing really applies.

In either case you have to compose functions With the correct types otherwise you hit an error. The difference with dynamic types and static types is when this error occurs. Run time for dynamic types and compilation time for static types. Either way some type of error will always occur regardless.

Though I agree with you if you have a limited number of types things become easier to deal with.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
Yeah, I'm just saying it can work and it can work remarkably well and efficiently. It's just probably too complex for our limited intelligence to handle.
crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
>Functions run to completion and return their result. Filters tend to run concurrently and, importantly, do not return their results, they pass them on to the next filter in the pipeline.

Let me address this point so it is more clear. Functions by definition do not need to "run" at all. The underlying implementation of a programming language may "run" a function lazily, eagerly or concurrently but that is not what the Definition of a function is describing.

A function is simply a relation between two sets, one set called a codomain, another set called a domain is deterministic. That is all.

So within unix piping the domain is stdin, the codomain is stdout, the function is the unix program. This paradigm fits the definition of a function and as long as that "function" remains deterministic and compose-able it fits within the paradigm of functional programming BY definition. there is no need to discuss "similarities" here, because it fits the definition therefore it is functional programming. Of course we can get pedantic about certain non-functional use cases but in basically you are fully aware of the generality I'm describing. No point in getting pedantic.

Also keep in mind when you "execute" these functions it does not matter HOW these functions are executing whether concurrently, lazily or eagerly. The only important thing is the relation between the domain and codomain. That is all.

>The single type is also a restriction relative to the functional model, and crucial to (syntactic) composability.

Every unix program must internally deserialize this string type and serialize it again for output. The typing must be handled regardless. It seems like you don't need to deal with it but it's dealt with regardless. You also get inevitable deserialization problems of incorrect types. You do not escape typing in the unix world.

>But they are not actually equal (never mind the same), at least not in typed FP, and most FP is typed.

A relation that takes a string from a domain and returns a string that is from a codomain is a function that is part of functional programming. This is EXACTLY what a unix program does when relating stdin to stdout and therefore it IS a function and it is FP By definition.

You can look at it from another direction. A function that returns an Array does not fit the definition of what a unix program should output to stdout therefore a function IS NOT a unix program. BUT a unix program IS a function.

Formally unix programs are just the set of all functions where the domain and codomains are strings.

>>Both f' and f are equivalent in theory. >But they are not actually equal (never mind the same), at least not in typed FP, and most FP is typed.

The mathematical term is "isomorphic" meaning you get the EXACT same properties going one way vs. the other way. It's the syntactic sugar that prevents composition. Using multi-arity functions and single arity functions with tuples only involves two additional parenthesis:

   f(a, b)
   f'((a, b))
It's just syntactic sugar that causes a difference to occur.

Arity and tuple types are well described to be isomorphic in category theory. I'm not making this up.

One way to think about an isomorphism is that if two things are isomorphic then they are just different perspectives of the exact same thing. Any differences are superficial or illusory.

>Exactly. It is hidden in Unix and not in FP. That's a difference.

Exactly what? If you're not dealing with the type conversions someone else has too. Just because it's hidden from you doesn't mean it doesn't need to be dealt with. Someone has to serialize things and deserialize it. Even from the command line level you cannot escape types. Let's say you have a unix program that can only take numerical strings from stdin. Let's say you pipe english letters to it... if you do then you will have still triggered a sort of type error despite everything being typed as strings in unix. It's just not handled explicitly as a system error.

You cannot escape typing even in the unix world because it is in the end just FP.

>So: it is good to recognize that 'X is similar to Y', but that doesn't imply that 'X is just Y'.

Except we're not talking about similarity. Like I said above X is just Y BY definition.

crimsonalucard5··on Evaluation and euthanization of a dangerous honeybee colony [video]
I wonder what will happen if you use one of those electric fly swatters.
crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
>Filters tend to run concurrently and, importantly, do not return their results, they pass them on to the next filter in the pipeline.

Filters are functions. They are one and the same. For unix it's a function that takes in a string and outputs a string. The unix world reduces everything into a singular type. You will note that unix "filters" cannot compose with functions of "other" types either. If unix included types like arrays or ints in stdout you would have the same typing problems as you have with functions.

In the unix world all your types are strings so things seem simpler, but in reality your little unix programs need to deserialize the strings into proper types in order to do anything meaningful. You could achieve the same thing if you used functions that returned strings all the time then did internal deserialization but that's not really a solution.

I do get your point about arity and parameter types. You're referring to the fact that not all functions can compose UNLESS they have compatible types and an arity of 1 in the parameters and an arity of 1 in the return value (Golang for example can have arity > 1 in the return value).

However this arity issue doesn't really exist. A function with Arity of two is isomorphic to a function of arity 1 that takes in a 2-tuple as input.

  f(a, b) -> c
  f'(Tuple[a, b]) -> c

  g(d) -> Tuple[a, b]
Both f' and f are equivalent in theory. Plus you can compose g with f'.

The only compatibility problems with composition among functions in the end is just types (not arity) but this problem still exists even in the unix world... it's just hidden from you because you don't actually watch the programs perform deserialization and serialization.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
>The goal of OOP is also to be modular and composable.

Well it depends on the type of composition you're talking about. Anything when mashed together hard enough can compose.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
Unless you use some stateful program or you're writing to a file typically a unix expression that uses purely reads and pipes is deterministic meaning you run the same expression twice you get the same result.

If you want to get pedantic fine, but the majority of use cases is stateless.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
Cool! Glad I was able to convince you. Just note that a lot of people find the functional style kind of unnecessarily mind bending. Like the functional style primarily uses recursion instead of loops for iteration which is harder to reason about (and less performant). I actually agree with them, but I feel that these people got lost in the details and missed the big picture about the benefits of functional programming from the perspective of modules, design and program organization.

I recommend you try building something complex with the point free style using Haskell. It will be a bit mind bending at first but if you get it then you'll see how FP is basically the same thing as using legos to build data pipelines... exactly the style used with unix pipes.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
I mean what he describes is literally the same thing as haskell. Just untyped.
crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
You can create building blocks of unlimited complexity or pure simplicity.

The key lies in your choice of primitives. Do you start off with a set primitives that are extremely complex or a set primitives that are simple but complete in the sense that you can build entities of unlimited complexity by composing simpler primitives?

I would say the latter method is easier. But there's no reason why the former method won't work. Biological evolution has built many examples of working machines with primitives of unimaginable complexity.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
>You can't just compose two functions because they're both written in a functional programming language.

Obviously not, the types have to be compatible just like how a lego piece must be compatible.

>The programmer has to have the foresight to make their types compatible.

Just like a lego builder needs to have the foresight to see whether two lego components are compatible. The analogy still fits.

> I think the novelty of the Unix pipe for interoperability is that they (typically) work on one agreed-upon kind of data: human readable, white-space separated. So a lot of tools "just work" with each other.

The agreed upon data is just a type. Unix pipes compose functions that take in strings as input and deliver strings as output.

The spaces is just an oversight, the whole thing would have been more clean if the type was designed to represent multiple pieces of data like a tuple of words rather than a single string with words divided by spaces.

>you could certainly fail to do this with functional programming.

Just like how two lego pieces can't compose if they're not compatible pieces facing the right direction. Sockets and plugs must be compatible. A functional program still fits the analogy of legos perfectly.

Take a look at lego pieces here: https://brickarchitect.com/2019/2019-most-common-lego-parts/

There exists lego parts that can never compose with certain other parts. Just like functions and function composition.

What you're not seeing is how other styles of programming such as OOP or procedural programming fail to fit the analogy and literally become like organ transplantation.

Let's take a look at object composition. How does that work in the context of legos? It's like a lego block with a mutating hole in it and once you can put different things in that hole and that changes the overall lego block.

Also with OOP and procedural programming you get lego blocks that can mutate. Lego blocks can transform themselves and other lego blocks. They form an interconnected network of entities that are constantly mutating.

To fit the analogy of a lego block you need unchanging blocks.

The entire field of Procedural programming and OOP is basically the art of building systems with mutating primitives that constantly change. Imagine constructing buildings using bricks that change shape. Now imagine refactoring code that does this.... Organ transplantation.

Also you really just need to try it. Doing the type of grafting and refactoring that's an intrinsic part of programming literally becomes lego-like once you program using the functional style. To really see the big picture I suggest you exclusively try the point free style using Haskell.

That being said. There are still massive tradeoffs to doing functional programming. But if your goal is to program like you're using lego blocks, functional programming is the path.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
Unix piping is basically functional programming.

If you ever wondered why some people are obsessed with functional programming this is the reason why:

Functional programming forces every primitive in your program to be a Lego Block.

A lot of functional programmers don't see the big picture. They see a sort of elegance with the functional style, they like the immutability but they can't explain the practical significance to the uninitiated.

Functional Programming is the answer to the question that has plagued me as a programmer for years. How do I organize my program in such a way that it becomes endlessly re-useable from a practical standpoint?

Functional programming transforms organ transplantation into lego building blocks.

The "lego" is the "function" and "connecting two lego blocks" is "function composition".

In short, another name for "Point free style" programming is "Lego building block style" programming.

crimsonalucard5··on Software reuse is more like an organ transplant than snapping Lego blocks (2011)
Have you guys heard of functional programming?

Have you guys wondered why some people are so fanatic about functional programming?

Functional programming forces your program to be lego blocks by Definition.

A function with no side effects IS A Lego Block.

If I never discovered functional programming I'd be like John D. Cook, blogging about how programming is like organ transplantation.

Functional Programming is the answer to the question that has plagued me as a programmer for years: How do I organize/design my program in such a way that it becomes endlessly re-useable from a practical standpoint?

If this question plagues you as a programmer I urge you to take a closer look at functional programming. Specifically look at functions and function composition.

crimsonalucard5··on Go vs. Crystal Performance
I could care less if a statement was positive or negative what is important is if the statement has a realistic possibility of being true.

If anything Engineering school should have taught you how to logically observe situations rather than viewing things through an optimistic or cynical lens.

crimsonalucard5··on Go vs. Crystal Performance
A golang expert isn't going to flip to crystal based off of one benchmark.. Humans don't work that way. The first reactions to a post like this always involves golang fans trying to reconstruct the evidence into a reality that is convenient and proportional to their time invested into golang.

The results do say something about golang and crystal. Without more data we cannot confirm anything, therefore the following possibility remains an open question:

Crystal may be generally faster and more efficient than golang for most use cases.

To not acknowledge this possibility or to fully embrace it as an absolute is a form of bias.

crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
>And regarding removing the bar allowing more people through, that's not true either--it's not like colleges all of a sudden have more seats available. They'll still only admit the same number of students, and they will still select for the best students.

But white people tend not do as well on the SATs, but they do fine with GPAs.

Now they can let more white people into the school and they don't have to explain the SAT discrepancies because they aren't measuring for that.

crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
You're not wrong. But there's no evidence arguing the contrary either.
crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
I live in SF, i grew up in the bay.

https://www.wikiwand.com/en/Demographics_of_San_Francisco#:~....

crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
>The SAT has always generally been a test showing how well you prepared for the SAT. For top schools all viable candidates had very good scores so it wasn’t much use.

There are many people who have high GPA's but are not intelligent enough to do well on the SATs. Removing this bar will allow those people through.

Not necessarily a bad thing but a thing nonetheless.

crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
How was personality scored? Was this specified?
crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
But whites still are the majority in SF by a huge margin.
crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
>Asians disproportionately yield to schools

No Asians go big or go home. They yield to all schools that are prestigious regardless of race-neutrality because all of these school (on the surface) appear to be race neutral.

crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
The objective here isn't to identify good students. That's just the cover story.

The objective is to select on criteria other than intelligence. For example, race.

crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
I've had it this happen. It was a startup that was ran and helmed by mostly people from academia. These people have never been outside of academia so that might have influenced there decision to check my grades.
crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
How does that make SAT scores useless?
crimsonalucard5··on Harvard University Won’t Require SAT, ACT for Admissions Next Year
High test scores are correlated with income but income is not a causative factor.

Most asian immigrants came here with nothing and much less resources than the caucasians who've already been here for years. They worked hard and performed well on the SATs and got into great schools and as a result are now generating a higher than average income than caucasians.

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

Not trying to brag about asians here. It's really just part of the culture and it can get really extreme. It stems mostly from parenting... the memes below are really illustrative:

https://www.pinterest.com/lindaschloss/asian-father-memes/

I think one time when I was a kid I mentioned to my dad I was interested in becoming an artist. My dad beat the shit out of me. Now I'm on hacker news and I'm definitely not an artist.

I would argue that what is causing the income disparity is the ability to work hard and study. This ability leads to higher test scores and higher income.