HNHacker News
TopNewBestAskShowJobs

fetbaffe

949 karma · joined April 29, 2013

submissionscomments
fetbaffe··on Ask HN: Mac/Linux devs, have you had success switching to Windows?
try Windows Terminal

https://aka.ms/terminal

https://github.com/Microsoft/Terminal

fetbaffe··on From QMake to CMake: A story on why CMake is pretty nice in 2020
Looking at it now, I wanted to copy files into the build folder after build step was done with add_custom_command() with copy_if_different and with target TARGET <project> POST_BUILD, but when I would put that in a subdirectory it wouldn't work because there was no target.

   add_custom_command(TARGET project POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy_if_different
        some.dll
        $<TARGET_FILE_DIR:project>)
fetbaffe··on From QMake to CMake: A story on why CMake is pretty nice in 2020
If I remember correctly I never figured out how to get the target in a subfolder, you need the target to your dependencies.
fetbaffe··on From QMake to CMake: A story on why CMake is pretty nice in 2020
I recently experimented with C++17/20 in CLion & CMake. I tried to organize my project that different namespaced folders could have their own cmake-file and depend on different external libraries (dlls).

I gave up. CMake is just too frustrating to work with. Hard to debug, different API versions, many different ways to do the same thing, hard to understand the abstraction of CMake itself. Total time sink. I will never use that again.

fetbaffe··on Firefox usage is down despite Mozilla's top exec pay going up
Ought to be a flagship of technology.

Not only has Mozilla an overpaid management that doesn't do what it is supposed to do but the it seems that the staff fits into that same category.

fetbaffe··on Trump offered to pardon Assange if he provided source for DNC emails – lawyer
However CIA also pushes their own agenda like Timber Sycamore, a secret operation lobbied by CIA director David Petraeus, to overthrow President Assad of Syria, that led to a war that created a humanitarian disaster.

President Obama signed off the operation, however it was a CIA creation & execution, with the help of Arab intelligence.

CIA does way more than lying and propaganda. They create wars too.

fetbaffe··on Trump offered to pardon Assange if he provided source for DNC emails – lawyer
How about an investigation into CIA hacking?
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
See my reply https://news.ycombinator.com/item?id=24517049
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
See my reply https://news.ycombinator.com/item?id=24517049
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Where I live (Sweden), yes actually, but I do understand that US are somewhat crazy.

Isn't corn production massively subsidized in the US? So it becomes cheaper to feed cattle with corn instead of grazing. Madness.

That type of meat production is not something I support.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
No, I didn't.

Quote myself "but you solve a specific problem, as your example shows."

So I have to assume your choice of technology for your problem was the correct one & the stats you supply seems to backup such claim.

However you also implying a bigger claim that C++, or something similar, is preferable in web development, where you mostly do string handling, is not something I can agree with.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Yes, lots off apps today have the entire schema replicated in the browser, which means that every schema change you do in the backend must be replicated in the frontend. Madness.

If your UI is a copy of the database why not just give the user a phpmyadmin login instead?

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Sure, it is perhaps possible for planting crops in areas that is less suitable, I guess that the current economic system we have in the West makes that not feasible. That is why I'm in favor of tariffs on imported goods.

With more being produced within your country you can legislate higher requirements on production methods. And when food becomes more expensive to buy, the incentive to have high quality production increases.

In the west we no longer have the problem of food shortage, thus we can afford somewhat higher food prices. And of course if you produce more within your country, you can get better salaries.

Why Sweden uses that much natural fertilizer I can't really tell.

But I found something about high prices on synthetic (mineral or others like natural gas) fertilizers. This was something that started happening globally around 2008. Between September 2007 and September 2008 prices increased with 80 percent globally.

If you understand Swedish, 2008

https://www2.jordbruksverket.se/webdav/files/SJV/trycksaker/...

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
If it is not efficient it will cost more than it yields, a loss. According to FAO 70% of worlds land surface is not suitable for planting crops.

Cattle can transform grass, that we can't eat, to protein that we need. It is actually a good thing, especially if you can't grow anything there.

In Sweden we have something called ecological farming, it is certification, to be approved for ecological farming you can't use mineral fertilizers anywhere in your food production.

Ecological products are usually somewhat more expensive in the store.

Now there are of course lots of farms that is not classified as ecological and they can use mineral fertilizers or natural fertilizers.

About a third of all fertilizers for farming used in Sweden is natural.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
I wouldn't be surprised, but do you have any statistics?
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Nutritional and greenhouse gas impacts of removing animals from US agriculture

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5715743/

In the simulated system with no animals, estimated agricultural GHG decreased (28%), but did not fully counterbalance the animal contribution of GHG (49% in this model). This assessment suggests that removing animals from US agriculture would reduce agricultural GHG emissions, but would also create a food supply incapable of supporting the US population’s nutritional requirements.

Assuming agricultural emissions account for 9% of total US emissions (47), and assuming that emission estimates here are representative of national emissions, eliminating animal agriculture would decrease total US emissions by an estimated 2.6 percentage units.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Why would you need all that state management in the frontend if most of the rendering is on the backend?

We already have two teams today, one for the overly complex frontend and one for the backend. Solution to that is server side rendering and full stack developers.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
See my reply here https://news.ycombinator.com/item?id=24514430
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
The thing is that soil used for grazing cattle can’t be used for planting vegetables efficiently.

There is a reason why we have different farming, because of different soil quality.

So the effect would be to reduce the area of where we can produce food.

And if you would remove cattle you no longer have natural fertilizer. Mineral fertilizer has a big environmental impact on ground water.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
It can definitely be true, but it depends what your service does, if you do regular HTML pages what you want is an infrastructure that can do fast string handling, for that I wouldn’t pick C++.

And if you need more developer time is also a consumption of energy.

I think a more common problem is relying on general frameworks regardless of platform. Frameworks solves a general problem, but you solve a specific problem, as your example shows.

How much would it save to use SQL SELECT with the columns you need instead of a ORM that fetches everything?

Or what about API endpoints that deliveries everything to single page app that only needs a few values?

Most data deliveries online today is never used only to be discarded. And you have that discarding of data at two different places, between the database & the backend and then between the backend and the client. That is probably a higher cost than changing server language.

fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
I’m talking about that the society as a whole will produce less food if we all would go vegan.
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
By removing meat more people would starve. Now that can be a good thing because fewer people means less energy consumption, however you still need to make that moral argument that starvation is an acceptable solution for reducing energy consumption.
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Problem is free trade & WHO itself, it is easier to go back to tariffs, by making things more expensive people will consume less, you can also increase quality & add requirements that a product must reparable.
fetbaffe··on How can we, as web professionals, help to make the web more energy efficient?
Why wouldn’t it be simpler to code? When you do server side rendering with HTML forms you reduce complexity by having more pages.

It is somewhat more complex to handle more pages in your code base, but each page is short and simple.

fetbaffe··on DNA sequencing of Viking skeletons reveals they weren’t all Scandinavian
This article does not explain the difference between Viking burials inside Scandinavia and outside of Scandinavia.

And the headline is pure clickbait.

fetbaffe··on Is anybody still using Windows 95?
Risk is hardware related, finding replacement parts. But yes, the software part seem to work fine.
fetbaffe··on You Really Don’t Need All That JavaScript [video]
"Blank page" problem is usually only a problem if your site is really slow, but if it is fast (because of server side rendering) it is less of a problem.

As the presenter in the video said, browsers can render HTML documents really fast, this leads to some interesting conclusions.

Assume that you need to render a modal as popup for each item in a grid.

Frontend solution would be to reuse the same modal for every item and just swap in the on-the-fly rendered content for that item. Or maybe even on-the-fly create & render the entire modal when needed.

Backend solution would be to render one modal per item. This is actually easier, just loop & have unique ids (you can even reuse the same loop that you build the grid with) & no need for dynamic loading, rendering, etc. So even if you send more HTML down the line, the page acts smother.

fetbaffe··on Introduction to runc
In Swedish all of them are either loanwords or abbreviations.

https://www.synonymer.se/ordlekar/sv/ord-som-slutar-pa/c

fetbaffe··on Introduction to runc
https://en.m.wiktionary.org/wiki/runk
fetbaffe··on Deep Dive into PHP 8's JIT
There is a small error in the text. When describing the opcache.jit setting it shows examples where the third flag is set to 5, eg 1255, but the table of possible values for the third flag, 'T - JIT trigger', goes from 0 to 4.
← PreviousPage 2 of 16Next →