HNHacker News
TopNewBestAskShowJobs

fetbaffe

949 karma · joined April 29, 2013

submissionscomments
fetbaffe··on ProtonMail, Tutanota urging EU to reconsider encryption rules
I think that todays terrorism is mainly state sponsored, terrorist organisation use different types of resentment when recruiting new members, however many of the terrorist organisations are funded by governments around the world, this is the modern form of covert warfare in the post cold war era.

What we have is that one government, lets call it the States of Merica, funds & trains freedom fighters in a country called Lyria. Sometime after this Lyria is thrown into huge & devastating civil war against the regime where the opposing terrorist forms a new entity, the Salami State.

The civil war results in massive refugee crisis. Refugees flees north into the big trade union called Äuropean Club, ÄC. ÄC happens to be allied with States of Merica. Terrorists from the Salami State infiltrates the refugees and travels to ÄC where they commit a horrific terrorist attack in the capital city of Sirap. President of the States of Merica is chocked by these horrible news and pledges to help it's friends in the ÄC.

This leads the ÄC to adopt surveillance measures to track any potential terrorist. To its help it uses the knowhow and infrastructure from their close friends States of Merica (obviously).

When the civil war in Lyria nears it end and the Salami State is almost defeated, suddenly the winning Lyrian regime commits a gas attack on innocent civilians in a Salami State stronghold. ÄC and States of Merica condemns the gas attack and bombs the Lyrian regime as punishment. The freedom fighters rejoice because they now can fight for freedom a few more years.

The Salami State still exists and continue to get help from somewhere, unknown by whom, and commits more terrorist attacks in ÄC, in cities like Ockholm and Womanchester, because ÄC still haven't fixed it's border problem, but coincidentally ÄC has instead developed an excellent surveillance program, which is if course needed when the border is wide opened to the Salami state, duh!

All this is of course highly speculative and shares no resemblance with the real world.

So yes, if we fix terrorism because of like uh poverty, it can probably be solved.

fetbaffe··on PHP 8: Before and After
Correct, OOP in itself it’s not bad. I use it every day, but I mostly use composition rather than inheritance.

What I was trying to say was that the inheritance based OOP was sold as the ultimate problem solver.

We all remember programming classes with Hello World like examples of Cat inherits from Animal.

Problem is of course that in the real world is never that simple so the inheritance based model turned out many times to be a mess because it was applied to problems where it didn’t fit.

That doesn’t mean that inheritance based OOP has its place, it does, but that is usually in very specific domains.

fetbaffe··on PHP 8: Before and After
Early web was written in Perl, I guess it was the classic approach of lets borrow what is already successful and in end PHP won over Perl so it worked too. Bill Gates would have been proud.
fetbaffe··on PHP 8: Before and After
$ was taken from Perl

https://stackoverflow.com/a/3073818

but because early PHP was more simplistic than Perl it only has $.

Powershell also uses $ for variables.

Regardless of etymology of the $ sign and the usefulness of it, personally I like it because it makes it easier for me when I'm reading code, especially if you are scanning fast, to differentiate variables from symbols. Yes, you can get that with your editor too, but for me it is easier to associate the $ sign with a variable rather than a specific color, sometimes you don't have coloring available like when in command line going thru diffs, cat, nano etc.

fetbaffe··on PHP 8: Before and After
I learned Spring, one of the worst frameworks I ever worked with (note that I have worked with Laravel too). Spring is a bloated mess with lots of legacy & misuse of annotations, a.k.a necromancy.

It has somewhat improved with Spring Boot, but still to be avoided.

Database layer in Spring, especially if you combine it with the monstrosity called Hibernate, is enough to apply to an insane asylum. Trying to debug what combinations of annotations that work and doesn't work is time you could have used writing PHP instead and get results.

The idea that you can annotate a SQL schema & query language into a Java class with annotations is one of the most asinine ideas I ever come across.

And don't get me started on Java collections.

fetbaffe··on PHP 8: Before and After
Because the alternatives is actually not good, it just a fallacy.

There will always be something negative regardless of what you pick, problem is to decide what your core values are when writing different types of software. If you don't, you are just comparing apples to oranges.

When it comes to PHP, core values are usually things that has to do with tooling, server architecture & deployment, not much the language (syntax, expressions, lambdas, classes etc) it self, except maybe it is easy to learn & use.

This means that developers who comes from a background of that the language itself is the most important part of a project will most of the time just get confused what PHP is about.

fetbaffe··on PHP 8: Before and After
PHP is filled to the brim with bad frameworks with one size fits all type of mentality. Just avoid them and make your life easier.

If you need a framework, look for something small, small enough to read thru and understand in one hour.

fetbaffe··on PHP 8: Before and After
It was because every developer in the West was taught that inheritance based OOP was the one thing to rule them all.

And that unfortunate school of thought created the Java mythos that spread to many languages, not only PHP, eg JavaScript (everyone trying to write inheritance based OOP in a prototype based language).

Few years ago the mythos changed somewhat to every programming language should be functional.

Thus it is not a specific PHP problem, it is common problem of trend sensitivity in programming culture.

And the funny thing is that much of the critique against PHP, like in this thread, is in the form of "why isn’t PHP like the other programming languages?"

But agree PHP should go it’s own way, it has much to contribute to the world still and it feels like it has started to create its own path again.

fetbaffe··on PHP 8: Before and After
Nothing is stopping you of writing PHP the "old" way, all new stuff is optional.
fetbaffe··on YouTube bans coronavirus vaccine misinformation
If you haven't realized it yet, your ideology liberalism is dying.
fetbaffe··on YouTube bans coronavirus vaccine misinformation
If social media is poising the country, why give social media (YouTube) more powers?

If it is the case then you have two options, ban YouTube or add more government regulation.

Let them, with the poison, regulate themselves doesn’t make sense if you agree with that premise except if you think some poison is ok.

fetbaffe··on YouTube bans coronavirus vaccine misinformation
Because the neighbors were Romans.
fetbaffe··on The Serverless Revolution Has Stalled
I find it easier to handle multiple PHP versions on Windows than on Linux. As you say just download zip,unpack somewhere copy php.ini-development to php.ini, and you can do this for every minor PHP-version.

Apache is almost as easy, download zip, unpack & configure apache conf to use your php.

MySQL is somewhat more complicated because you need to run an setup script after unpacking the zip.

fetbaffe··on Apple tells Telegram to take down protestor channels in Belarus
I can’t escape Apple even I would change to Android according to this decision done by Apple against Telegram.
fetbaffe··on Ask HN: What are the pros / cons of using monorepos?
It usually begins as

let’s split our project into multiple libraries so it can be reused within the company or even better if we put it on GitHub everyone can use it.

After a few months you notice nobody within the company cares about your nicely versioned libraries and on GitHub you get more and more complaints that the libraries are very limited and need more features.

After that you merge everything back into your monorepo and try to forget all the time wasted on git bureaucracy, versioning, dependency handling and syncing changes between repos.

fetbaffe··on Which tool should I use to build a simple dynamic website in 2020?
PHP, Apache, MySQL (or MariaDB), Bootstrap CSS and jQuery.

Very good setup that will solve your problems relatively fast and can be running for years without much maintenance.

There is no point of using anything else to do webpages. These technologies are tested and tried and works. Tons of documentation.

Ignore ideas that says you need to use fancy modern technologies, that is what has ruined the web and web development.

What is important is to follow best practices and web standards and that is true regardless of what technology you choose.

fetbaffe··on Missing Covid-19 test data was caused by the ill-thought-out use of Excel
The mix of Excel & Access as a new application would be a killer app. Hasn’t someone already built that in the cloud?
fetbaffe··on Missing Covid-19 test data was caused by the ill-thought-out use of Excel
How do you share the spreadsheet? Shared network drive? By email? With Excel?
fetbaffe··on One Guy Ruined Hacktoberfest 2020
Sure, but you always have to ask, to what degree?

If it is more prevalent than in other societies then you can definitely call it a phenomenon.

fetbaffe··on One Guy Ruined Hacktoberfest 2020
Pattern is high trust societies vs low trust societies.
fetbaffe··on In Defense of XML
Most common XML parsers in PHP uses libxml which is written in C, so it should be relatively fast, however I haven't used it for super large XML-files and not for every request. It would be interesting to test.
fetbaffe··on Amnesty International India Halts Its Work in India Due to Government Reprisal
Sure, but how is it ironic? That is what I'm trying to figure out.
fetbaffe··on Amnesty International India Halts Its Work in India Due to Government Reprisal
So basically you never become a native regardless how many generations you stay in a country, thus nationalism is valid point of view.
fetbaffe··on Amnesty International India Halts Its Work in India Due to Government Reprisal
How is that ironic?
fetbaffe··on In Defense of XML
In the old days many things that were XML when it should have been JSON, today it is the opposite, many things that are JSON when it should be XML.
fetbaffe··on Things I Was Wrong About: Types
I’m not so sure about that, the reason is that the total number of programmers in the world are just increasing and more importantly more and more non-programmers program code today than ever before.

It hard to convince non-programmers to see the beauty of a type system when they only want to print some html.

So what I see is a bright future for languages that can do both, types or no types.

fetbaffe··on Graalphp: An Efficient PHP Implementation Built on GraalVM
I read the original poster's post as Graalphp needs to support both PDO, the C extension, AND Laravel, specifically every language construct that Laravel uses.
fetbaffe··on Graalphp: An Efficient PHP Implementation Built on GraalVM
Efforts like this with GraalVM and the upcoming JIT in PHP 8 should lead to, I believe, that many of the existing C extensions of PHP to be converted to pure PHP implementations.

When you have a JIT based language you want as much to be executed in that language, jumping back and forth between PHP and C is a drawback from a JIT perspective.

However there exist many PHP C extensions that are just thin wrappers around large C libraries like cURL, it is not really feasible to implement that in pure PHP.

But with the introduction of a foreign function interface with PHP 7.4 that has made it possible to call C libraries with ease, as long the C library doesn't do too much macro magic, and to my understanding upcoming Java release ships with a much improved native bridge with better support for native types, these two thing could lead to, guessing here, that you only need to implement the bridge for each implementation but share the rest of the PHP wrapper code for that C library.

However the foreign function interface introduced in PHP 7.4 is signigfanctly slower that the old style C extension of Zend PHP, but to my understanding is that future evolution of the JIT could theoretically reduce that performance impact.

fetbaffe··on How far into the Americas did the Vikings travel?
Hilarious. Marxist are constantly trying to rewrite history of the Vikings to fit the modern political spectrum of migration & multiculturalism, but now suddenly rewriting history is problem because of "white supremacy", which is of course once again trying to fit history into our modern discourse.
fetbaffe··on A Picture of Java in 2020
> Laravel of the Java world

Fixed it for you.

Page 1 of 16Next →