HNHacker News
TopNewBestAskShowJobs

kingdomcome50

297 karma · joined December 11, 2015

submissionscomments
kingdomcome50··on Parler drops offline after Amazon pulls support
That's not the reason, and we all know it.

We live in a capitalist free-market system. Amazon (or any entity) is free to choose with whom they do business (oh the irony!). They are dropping Parler because the the current political climate has manifest in such a way that they think it will cost them more financial and/or political capital than the alternative (recall there is a lot of antitrust sentiment out there right now).

Too bad so sad. Sorry not sorry. This is exactly the kind of "freedom" for which many of the above platform's users would advocate. Parler's PR team is missing the opportunity to applaud AWS for exercising their freedoms.

kingdomcome50··on U.S. Capitol Locked Down Amid Escalating Protests
You are arguing that religious myths[0] cannot be claimed to be true or false while simultaneously claiming to believe your religious myths to be true and all others false. I was hoping to lead you here without saying it explicitly, but that is what I was getting at when I asked what it meant to "have faith". It means to hold a belief that cannot be rationalized.

With the above inconsistency in mind we can explore what it means to "prove something false":

https://www.quora.com/What-does-it-mean-to-prove-something-f...

The top answer here summarize the current state of our understanding. The key terms on which to focus are "inconsistent" and "contradiction". Can you see how believing in something that cannot be rationalized is inconsistent or a contradiction? It is the belief in a religion itself that is the contradiction. It doesn't matter whether any specific event can be proved true or false (again that is not my point). My point is that "having faith" is to recognize this contradiction and choose to believe anyway. By simply "having faith" you are, yourself, proving it false.

That isn't to say having faith is a bad thing! I will again commend organized religion as a valuable tool to both the individual and society. People are not rational. Feelings are not rational. I genuinely believe that the good that comes from religion outweighs the bad. That doesn't mean I can't recognize it for what it is...

And I am not an atheist! I guess it depends what you mean be "God" though... I don't believe in any region as an ideology, but I do believe in religion as an institution (I do go to church on occasion): Was there a person name Jesus? Probably. Did he inspire good things? Mostly likely. Are the lessons we learn from his story valuable? Absolutely! Did he turn water into wine? No. Did he rise from the dead? Of course not.

In this way I believe in religion, but I don't "have faith".

[0] The word "myth" does not always denote something that is false.

kingdomcome50··on U.S. Capitol Locked Down Amid Escalating Protests
My point is not that having faith is wrong or bad, rather, that to believe in the kinds of myths many religions espouse requires faith.

It is impossible to believe in the teachings of the Bible without having faith. I'm sure you bring an equal amount of faith when reading other stories. You don't? Why not?

kingdomcome50··on U.S. Capitol Locked Down Amid Escalating Protests
I am honestly not trying to argue whether one specific myth is true or not. You are missing my point.

There are many myths from many cultures that seek describe where we came from or how we ought to live. For example, nearly every culture has some story about the creation of man/the earth. They all cannot possibly be true. I'm sure we can agree that man/the earth wasn't created as many times as there are stories about it.

So you are making claims about truth! How can you square the above with your belief in your own religion using the thought paradigm you outlined above? By claiming that your creation story is true (or as you may put it, "not proven false") you are also making a claim that all others are not true. A claim you have just argued cannot be made... It's all a fallacy.

The most interesting question worth answering is: Why do you believe the myths that you do?

Statistically speaking, the answer is because it is the one your parents believed. It's hard to explain away the eerie correlation between a person's religion and where they were born. Why is it that a child born in the Middle-East is so likely to follow Islam, a child in the West Christianity, in India Hindu, etc. etc.? It's almost as if these religions are a product of the people, not some greater truth.

And for what it's worth, I see no meaningful difference between something that is false and something that cannot be proven to be true:

"There are 2,145,124,152 birds in flight above the earth right now." - do you believe me?

"Jesus Christ just came down and told me personally that Hindu is the one true religion" - do you believe me?

"I just saw a red 2018 Toyota 4Runner drive past my house" - do you believe me?

"One of the above claims it true" - do you believe me?

What role does "faith" play when appraising the above questions? Are you applying "faith" in the same way to the above as you do to your religion? Probably not.

kingdomcome50··on U.S. Capitol Locked Down Amid Escalating Protests
That's exactly right. You can see how well the above compliments misinformation right?

Go ahead and read any religious text (I've read many!). Nearly every culture has one or many myths. Do you believe them to be fact? Or do you only believe your religious text to be true? And if so, why?

I don't mean to take a stance against religion in general. I agree with the above commenter that the impact of religion in a general sense does seem to be positive! A shared mythos can be a very powerful way of building community. This can have very real positive affects on a population, and, depending on that mythos, on an individual. But to suggest that religion doesn't require "faith" (i.e. believing in something despite no evidence) is... well... naïve.

kingdomcome50··on U.S. Capitol Locked Down Amid Escalating Protests
What does it mean to “have faith”?
kingdomcome50··on PHP RFC: Enumerations
I'm not a PHP developer! And you have therefore made my point repeatedly. You have come to believe something about me in total ignorance.

Why don't you provide me with some non-fiction? I've asked repeatedly if you could delineate what a "tool that allows you to effectively think through problems" might look like, but the only answer I have received so far is "I don't have to". Very convincing!

Of course we both know that you won't because doing so would move the concept out of your head (where it is just a prop) into this discussion where, inevitably, it will be shown to be insufficient to your argument. You need to hold onto it because it is the only straw you have left. I understand your unwillingness to be made a fool. You are a poker player who insists they have won the hand, but refuses to show their cards. Unfortunately I'm calling your bluff!

I've had you nailed down on this since your very first comment and here we are, days later, and you have yet to substantiate your claim beyond "I believe it to be true". A true work of cognitive genius! Or is it dissonance? It's always interesting to see which of my thoughts garner a response. I'll take a page out of your playbook and make a prediction myself:

A) You will continue to avoid to substantiate your claim and focus on something else entirely.

B) You will substantiate your claim by providing only criteria to which PHP does not meet (e.g. "multi-threaded") without providing any information as to how those criteria support your premise (essentially arguing "not PHP" in more words).

C) You will not respond at all.

At this point I think you are right. The answer is C! Sometimes you are overmatched and it's best to just avoid the interaction. It's healthier that way. Good luck!

kingdomcome50··on PHP RFC: Enumerations
To suggest that such tools exist, that these tools impact one's ability to effectively(!) think through problems, and that PHP programmers simply don't value these tools does insinuate a belief that PHP programmers are in some way unable to effectively think through problems. A broad claim indeed! Add to the above that you are unable to define, identify, or in any way clarify what criteria you are using to classify these tools, how it is they impact a person's ability to effectively think through problems, and why PHP is not one of them... and we are left with an obvious conclusion: you don't know what you are talking about.

Suggesting that PHP doesn't allow you to effectively think through problems, while certainly ripe for some fleshing out, is very different than saying PHP programmers (other people!) don't value tools that allow them to effectively think through problems.

We call my first paragraph ignorance, and the second projection. Turns out I was right!

At the end of the day any answer to a question asking why people condescend PHP programmers that doesn't dismiss the premise is itself condescending (or at the very least an admission thereof).

> "Why do you condescend PHP programmers?"

> "They don't share my values."

That's essentially your argument. Well... that's not really an argument is it? What are their values? What are your values? Why is one set better than the other? And most importantly, why does this lead to condescension?

The answers to the above, as I pointed out in my original comment, lead to only one conclusion: you've only identified a deficit in yourself.

kingdomcome50··on PHP RFC: Enumerations
What does a "tool that allows you to think through problems" look like? This claim is unsubstantiated. You have provided nothing to discredit an assertion that no such tool exists, and certainly haven't provided any criteria by which your claim could be falsified.

Your claim is:

1. Such a tool(s) exists -- how can I know?

2. PHP is not one of these tools -- why not?

3. PHP practitioners don't value these tools -- huh?

It's a total non-sequitur.

Your criticism reads as "PHP solves problems differently than how I want to solve them". That is a totally reasonable opinion to hold (many do)! That's not really a reflection of PHP, it's a reflection of yourself. And that's okay! You don't have to like PHP. But it is a little offensive to try to justify your preferences in a way that passes sweeping judgement over anyone who programs in PHP. Especially when your argument insinuates that PHP programmers must have a deficit in their ability to think through problems...

kingdomcome50··on PHP RFC: Enumerations
No one is acting.

The question:

> When I read comments coming from people who don't use PHP which are always negative or condescending, I wonder - how do you imagine programmers who use PHP are like?

Your answer:

> I imagine programmers who do not place a high value on the impact that their tools have on their ability to think through problems effectively

Even in the most charitable of circumstances it's hard to read your words in a way that isn't a slight against someone who chooses PHP. Especially when taken in the context of the discussion to which you are responding. And even more so because you have yet to substantiate (or even define) that claim in any meaningful way.

I have no problem with someone who doesn't like PHP (or any language). I don't particularly like PHP. And you know what? I hate python! But I am not making sweeping generalizations about those who program in python and whether or not they value their "ability to think through problems effectively"[0]. Mostly because that claim would make no sense at all...

It's hard to rationalize your answer above to mean anything like "Don't eat lasagna if you're lactose intolerant", so forgive me when I say that you are the one acting. Hey! I get it. You don't like PHP and you took a cheap shot at it. We all do it. The "PHP sucks" trope is hard to resist! But don't act like that isn't what happened. Have some self-knowledge and take the rejection. It's healthier that way.

[0] or import a file in a sane way :)

kingdomcome50··on The Future of Clojure
Did I literally post that? You might want to reread my comment.

I can say from experience for every language above, save C++ (with which I have never worked), that they will fail to compile if you change a function signature in a backwards-incompatible way and fail to update all call sites.

The purpose of static typing as a method of program verification is to enforce type constraints at compile-time for all possible executions of that program. A function signature is, you guessed it, a type constraint.

kingdomcome50··on PHP RFC: Enumerations
> I'm saying the PHP community has certain values and approaches problems with a certain perspective

What are those values and what is that perspective? Your argument is getting rather hand-wavy. I'm not entirely sure what I would be arguing if I attempted to disagree.

Without a more concrete formulation my current hypothesis is that you are simply disguising your ignorance as projection.

kingdomcome50··on The Future of Clojure
Of course there is. That's not my point.
kingdomcome50··on The Future of Clojure
Any statically typed language allows for a compiler to detect breaking changes like you describe. That’s the point!
kingdomcome50··on PHP RFC: Enumerations
Did you read that?

> If you're writing a program that only has to do something very simple, like number crunching or bit manipulation, you may as well use a less abstract language, especially since it may be slightly faster.

In your opinion, what percentage of web applications do you think are non-trivial?

And for what it’s worth, nobody chooses PHP because of the language. That’s not the selling point. The selling point is the development paradigm/runtime. It’s dead simple.

I recently started a small web project using the SAFE stack:

https://safe-stack.github.io/docs/quickstart/

I urge you to follow that QuickStart yourself (it only takes a minute or two).

Assuming you were actually able to build the project, now, look at your project structure. How many directories do you have (11)? How many files (15510)? Think about how much knowledge is required to understand what’s going on (if you’ve never touched F# you are probably lost).

What does this QuickStart app do? It is, I kid you not, a “Todo list”!

I could write an almost exact clone of this app using PHP in exactly 1 file. No configuration scripts. No build suite. No 3rd-party packages. No CLI commands. Just 1 PHP file. Thats why people choose PHP.

kingdomcome50··on PHP RFC: Enumerations
Right. PHP is not the problem. Nor is the bread, or the connectors, or the husband/wife. That is exactly my point - you are leveling a criticism at yourself and your own inability to use a tool.

This is wholly unrelated to the quality of the tool itself or the other practitioners who choose to use it. It is therefore a bit offensive that the conclusion you draw is that developers who use PHP must have a deficit in their ability to work through problems.

The “problems” do not change based on which language is chosen to solve them. That is, if you actually understand the “problems” in the first place...

kingdomcome50··on PHP RFC: Enumerations
No doubt. I'm not trying disparage other options.

My point is that PHP literally only requires a single file to work. No cli commands. No 3rd-party packages. No configuration files. Just PHP.

kingdomcome50··on PHP RFC: Enumerations
Because the vast majority of problems are trivial. And a trivial problem demands a trivial solution.

PHP offers a development paradigm second to none. Drop a single file into a single directory and hit f5. Problem solved. Next.

Which language above can do that?

kingdomcome50··on PHP RFC: Enumerations
> This clash is so strong that I predict that if I again try to program professionally in php and its frameworks, the interaction would again have a disastrous impact on my mental health, my livelihood, and my marriage

> Let's suppose you enjoyed baking bread, but someone rejected your work and told you that gluten gives them terrible intestinal pain

Both these examples are ones where the problem isn't the tool, rather, the person using it. It's not really PHP (or the bread) being critiqued is it?

kingdomcome50··on Web Scraping Is Vital to Democracy
You make the target. I’ll make the bot. Let’s see who wins.

In all seriousness, your suggestion is woefully naive in the face of any serious entity.

kingdomcome50··on PHP 8
While not quite as ergonomic as your example, it's rather trivial to extend ArrayIterator to accomplish your goal:

    foreach ($iter = new IndexingIterator($array) as $k => $v) {
        echo $iter->index();
    }
kingdomcome50··on PHP 8
That's the best part
kingdomcome50··on Insights from Adopting TypeScript at Scale
> I hope TS doesn’t turn JS into Enterprise Java, The Next Generation.

No chance. And frankly, I don't get the comparison you are making to C++/Java/C#. TS is fundamentally different than those languages. From structural typing to a default functional/imperative paradigm, it really is just JS with better static analysis.

Your IDE is not as good for JS as it would be for TS. The entire impetus for TS is/was to provide better tooling/ergonomics around JS. Whether or not you need better tooling is a subjective matter.

kingdomcome50··on Principles of Data Oriented Programming
Can you expand upon this? Perhaps the difference between "re-mapping" the function:

    f(x_1)=y_2
and "re-mapping" the value:

    x=42+2
How is the former different than the latter? And by what mechanism is the former achieved? I understand what you are saying, but how does one simply "change this same function"? Redefine it?

To be clear, I'm not suggesting you are incorrect. I just don't fully understand what you are getting at.

kingdomcome50··on The Failed Promise of Web Components
Most of the frameworks you mention above are 5+ years old. Back when jQuery was the THE THING to know.

In any case, my critique is not levied against MVC the pattern, rather, how it is manifest. One can logically follow MVC without the physical separation of concerns (files). It's a continuum: You start by defining your state, view, and orchestration all in the same place. Should any one piece of the above suddenly need to be reused elsewhere, you then abstract as necessary.

I was pushing back against the idea that "inlining" CSS/JS with HTML is poor practice. What React achieves, because it demands you inline JS (and CSS if you want) with the HTML, is a simple, declarative development paradigm. It's like reading a function. No procedural ad-hoc `let el = document.querySelector('#id')` garbage getting in the way. The behavior is with the component, not around the component. In many ways, this is how OOP was supposed to work.

kingdomcome50··on The Failed Promise of Web Components
I think the irony here is that MVC in its original form has largely fallen out of fashion the last few years. And it is precisely because physically separating all of the functionality into a model/view/controller files doesn't actually make development easier. This makes sense right? Logically it's all coupled, so separating the pieces, even if they are functionally responsible for different things, doesn't really produce a system that is easier to maintain.

Look at the new default "razor pages" web project for .NET core. While it it is a little bit fancier, it basically brings back the same mental model that PHP has been using for decades. That is, cram all of the logic into a single file, and use a "service locator" pattern (I know it's actually DI under the hood) to "inject" extra functionality. In this way it is easy to trace where all of the pieces are coming from. Why abstract your `UserRegistrationView` to accept any `UserRegistrationModel` from a `UserRegistrationController` in a "decoupled" manner when the reality is that only one of any of that actually needs to exist ever? Might as well have the orchestration right next to the use-case!

The above applies to (what I believe to be) a significant majority of use-cases. At least the interesting ones.

kingdomcome50··on Show HN: A SQL database implemented purely in TypeScript type annotations
Well said. It's amusing imagining the soup that would result from attempting to do this sort of thing in various other languages!
kingdomcome50··on Show HN: A SQL database implemented purely in TypeScript type annotations
Yes. What you don't see it that the TS language server provides things like autocomplete, definitions on hover, squiggly lines, sane error messages, etc. to the developer as they write the parsing code. What you don't see is that because that file compiles, it is guaranteed to parse (certain) "SQL" strings into types. This is because the code doesn't have to actually run to work, rather, TS's powerful type system does the parsing.

Source code generation wouldn't really provide the same end-user ergonomics and, frankly, would barely resemble the same project. How would that work? You generate source code from a SQL string and a data source? At that point you might as well just... write the actual code. The point of this package is that type information is dynamically assigned according to arbitrary "SQL" queries at compile-time[0].

Have you gone through short exercise I outlined below? Surely you can't think it would be better to manually generate type information than have it automagically available and enforced instantly as you work?

The closest thing I've seen to this is "type providers" in F#. Where, given a database connection, a "Provider" can offer compile-time contracts between your code and the schema of the database. What it does not do is provide contracts against arbitrary projections of the database (SQL queries). Of course one can write code that queries and transforms the data in a type-safe way, but these "transformations" must happen in F# for the compiler to infer any new types.

This project takes the above to a different level and infers the type of the result of an arbitrary (subset of) SQL operation before it is ever executed. It's fairly impressive.

[0] This has been pointed out more than once already, but this project does offer compile-time guarantees

kingdomcome50··on Show HN: A SQL database implemented purely in TypeScript type annotations
Maybe clicking on the playground link would help your understanding of the project. You can literally hover over the types defined like:

      type EX = Query<"some query string", db>; 
and see the that the type as defined by the TS language server (i.e. in your editor) is the result of "running" the query without actually running the code. It's a little insane and somewhat akin to "type providers" in languages like F#.

For example, add this below `EX1` (line 66) in the TS Playground:

    let names = (persons: EX1) => persons.map(person => person.name);
Now change the column alias in `EX1` to something other than "name" and see what happens. You see that? There is now a compile-time error.
kingdomcome50··on Show HN: A SQL database implemented purely in TypeScript type annotations
I'm honestly curious. What other languages have a type system the would allow for this project? That is, (a subset of) SQL as a type. And assuming these languages exist, are they as ergonomic to the developer as TS while instrumenting the above?
← PreviousPage 4 of 8Next →