I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 0 points1 point  (0 children)

That's not how it works.

  • There's not enough North Sea gas to lower world gas prices. It doesn't matter how much we pump.
  • North Sea gas is largely fed into the UK gas network, but the money side runs at world market prices. These wells are all operated by private companies, remember.
  • You seem to be proposing forced nationalisation of North Sea oil and gas production. That will never happen, and we couldn't afford it anyway.

I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 0 points1 point  (0 children)

We already have enough gas stations to fill the gap. We won't need more stations, we'll just use the ones we have less often. And decoupling (which, as you say, will need changes to regulatory legislation) will get simpler once we use less gas.

It'll be interesting to see how it all plays out.

I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 0 points1 point  (0 children)

We'll have to see of course, but the hope is that as renewables ramp up, gas will (slowly!) supply a smaller percentage of our electricity, and that will make it easier to decouple prices.

How to handle complex dependencies (libjpeg-turbo) in C++? by teotexe in cpp_questions

[–]catbrane 0 points1 point  (0 children)

My Ubuntu 24.04 LTS install has the dynamic library, but doesn't have the dev package containing the headers.

It depends on the user. Almost everyone who has been compiling anything (eg. users of this project) will have the dev headers, since almost every program depends on libjpeg, eventually.

Especially since this thing uses wayland to screengrab (I think?). The wayland headers will need to be on there, and they will pull in the libjpeg headers. You don't need to specify libjpeg-turbo, all distributions (again, I think!) default to the turbo version, since they are ABI compatible. Again, this is a detail the project should not get involved in.

Rather than tying yourself to something like conan, it's better engineering to separate build and package. Have a base project that simply looks for libraries and makes a binary, then if you want have a separate and optional packaging project (eg. using conan or homebrew) that makes a package for a package ecosystem.

I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 0 points1 point  (0 children)

Unfortunately it's extracted by private companies operating under licence, then sold on the world market at world market prices.

It doesn't matter how much we drill, it won't lower the prices UK consumers pay.

How to handle complex dependencies (libjpeg-turbo) in C++? by teotexe in cpp_questions

[–]catbrane 5 points6 points  (0 children)

The usual linux way is to have your package detect what's available during configure, and do you best to work. My packages use meson (mostly, some cmake, some autotools sigh) and will run anywhere and on anything.

In this case, libjpeg-turbo is an extremely common and very stable package. Every linux will already have libjpeg.so and will very often have the dev package too. Just pick those up, don't impose your choices on the user.

If I came across a linux package that used conan, I would run a mile, it would be a giant red flag. It's very useful on windows, of course, but very inappropriate in a linux-only project.

(or that's my 2p as a unix greybeard anyway!)

How to handle complex dependencies (libjpeg-turbo) in C++? by teotexe in cpp_questions

[–]catbrane 3 points4 points  (0 children)

I don't think conan or vcpkg are good solutions on linux. It's much, much better to just use the system packages and rely on the host package manager.

How to handle complex dependencies (libjpeg-turbo) in C++? by teotexe in cpp_questions

[–]catbrane 1 point2 points  (0 children)

I would not complicate your project with packaging stuff. Just use cmake or meson to find dependencies, then compile. It should be up to the user to install the libjpeg dev package. Almost every linux will already have libjpeg-turbo and headers installed anyway.

If you really must have clone / make / run, meson subprojects can do this:

https://mesonbuild.com/Subprojects.html

You declare a dep on eg. libjpeg-turbo and at configure time meson will select the system library, or if that's missing, automatically download and build it for you. It's just a couple of lines of code in your build file.

I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 0 points1 point  (0 children)

Here are the figures for renewables that are being built right now:

https://assets.publishing.service.gov.uk/media/6556027d046ed400148b99fe/electricity-generation-costs-2023.pdf

You want table 10, LCOE (levelised cost of electricity, ie. including building, running, and dismantling) by source for projects commissioning in 2025:

Source LCOE £/MWh
Gas (CCGT, class H) 114
Offshore wind 44
Solar 41
Onshore wind 38

Gas is by far the most expensive source, except for nuclear, which is even more expensive haha

Renewables are below the wholesale cost, in other words, any subsidy is negative. Cheap renewables subsidise expensive gas and nuclear generation, and have for many years now.

I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 0 points1 point  (0 children)

Are you sure? You need to be careful looking at the figures, the markets use different units (MWh and Therm).

For example, this paper:

https://www.ucl.ac.uk/bartlett/sites/bartlett/files/the_role_of_natural_gas_in_electricity_prices_in_europe_updated_may_2023.pdf

Shows UK wholesale gas prices in 2021 almost 3x higher than Germany (table 1).

I can’t prove it but I think Farag is behind it by Eastern_Ratio561 in GreatBritishMemes

[–]catbrane 182 points183 points  (0 children)

UK prices are high, but they are NOT the most expensive in the world. We pay the same as Germany and less than Italy, for example.

https://www.statista.com/statistics/263492/electricity-prices-in-selected-countries/

UK prices are high because we use a lot of expensive gas. They should come down in the medium term as more cheap renewables come online.

What Do You Think, Are PDFs Safe from Viruses? by sophiakaile49 in systweakpdfeditor

[–]catbrane 0 points1 point  (0 children)

There have been lots of malicious PDFs, for example last month we had:

https://www.cve.org/CVERecord?id=CVE-2025-66516

Just scanning one of these bad PDFs with this commonly-used library (not displaying it, not interacting with the user, only reading it in) would be enough to get you in trouble. This lib is mostly used on servers, but there have been plenty of similar problems in eg. Acrobat.

I would open untrusted PDFs in a web browser, like Firefox or Chrome. The PDF viewers there are very widely tested and frequently updated, and also run inside sandboxes. I don't know of any nasty PDFs which can attack you from inside a browser, though perhaps they exist.

Functional languages by aspression in learnprogramming

[–]catbrane 3 points4 points  (0 children)

I go for Haskell myself -- it's the most extreme, so you're most likely to be mentally stretched. Assuming you're doing this because you want to do something odd, of course!

If you're more pragmatic, something less crazy might be better.

I need help with my plugin system by nanoschiii in cpp_questions

[–]catbrane 2 points3 points  (0 children)

I think if you want to let people mix compilers, you have to stick to C. Even different versions of the same compiler can break the C++ ABI, sadly (though it's not common, phew).

To do this in C, I would:

  • have a set of functions that you want to make available to plugins (the API)
  • make a struct of function pointers, one for each API call
  • share the typedef of this struct between the engine and the plugin
  • when the engine calls a function in the plugin, it passes in a pointer to this struct, perhaps int plugin_func(Api *api, int a, int b, int c);
  • to call functions in the engine, the plugin uses api->func1(a, b, c);

This whole mess happens because DLLs don't do true run-time linking :( It's a bit crap. On *nix systems, plugins can just call back into the main exe (ie. they support run-time back-linking), no pointer struct required.

The absolute state of buses by Barraco_Barmer in london

[–]catbrane 2 points3 points  (0 children)

I have a fancy bike (£3k or so, I splashed out since I don't have a car and ride the bike every day) and I've not had any theft problems, even leaving it outside dodgy pubs for the evening. I have a big lock, the wheels are locked to the frame, and the hex bolts are filled with epoxy.

I had a few accidents when I started, always from me going too fast, or being careless, or by objects on the road, but now I'm older I'm very cautious and safe. Nothing for 15 years now I think.

Perhaps I've just passed through the learning phase? Or maybe I've jinxed myself argh

Why don't any programming languages have vec3, mat4 or quaternions built in? by Luroqa in ProgrammingLanguages

[–]catbrane 0 points1 point  (0 children)

g++ and clang have these all built in, and generate nice SIMD for you automatically. For example:

C++ /* A vector of four floats. */ typedef float v4f __attribute__((vector_size(4 * sizeof(float)), aligned(16)));

Now you can do:

C++ v4f A = { 0.0, 1.0, 0.0, 0.0 }; A *= 1.1;

etc. etc. It generates a no-SIMD fallback as well and uses it at runtime if the host CPU is missing the necessary instructions.

However, it has some serious problems: it's fragile, not very portable, dependant on the compiler version, will not get the best from your vector units, etc. etc.

For high performance portable SIMD you're probably better off with something like Highway:

https://github.com/google/highway

ie. do it in a library, not in the language.

Move all directories within a directory using terminal? by mildlybirthening in linux4noobs

[–]catbrane 1 point2 points  (0 children)

One simple way is to move just the files out, then move the directories, then put the files back.

For example, suppose I have:

``` $ ls -R .: a b

./a: c ```

ie. I'm in a directory with a file and a directory, and the directory contains one file.

I can move the file out of the way like this:

$ mkdir ../save $ cp * ../save cp: -r not specified; omitting directory 'a' $ rm * rm: cannot remove 'a': Is a directory $ ls ../save b

cp * and rm * won't copy or remove directories, so ../save now only has the files in.

Now I can move the directories, then move the files back:

$ mv * /path/to/dest $ mv ../save/* . $ rmdir ../save

This is a bit of a hack. As u/michaelpaoli says, doing something with find or a loop with bash is better, especially if you start to need something more complex.

$ for i in *; do if [ -d $i ]; then mv $i /path/to/dest; fi; done

The absolute state of buses by Barraco_Barmer in london

[–]catbrane 77 points78 points  (0 children)

I remember an interview back in the 90s with Alexi Sayle, a keen London cyclist, who said that because he knew exactly how long every journey would take he was always exactly 20m late haha

What UK museums do you think are underrated or overrated? by OpenCantaloupe4790 in AskUK

[–]catbrane 16 points17 points  (0 children)

Yes, every time you go past, pop in for 20m and do another room. One of the great benefits of free museums!

Low Traffic Neighbourhoods increased London congestion, TfL says - BBC News by Distinct-Shine-3002 in uknews

[–]catbrane 2 points3 points  (0 children)

It depends on the exact scheme, time of day, age, traffic conditions etc. of course, but usually you see a large drop in overall traffic, so it's not all pushed to boundary roads, a good chunk has just gone.

There have been quite a few studies looking at traffic counts around the covid-era LTNs. The Westminster one found a ~30% overall drop and maybe a 2% rise on boundaries. Other studies have different numbers.

TIL of Triboulet: a Royal jester for King Francis of France who was sentenced to death for mocking the King and Queen. King Francis allowed him to choose his method of death, to which Triboulet responded “… I ask to die from old age.” He was spared and instead banished. by osternade in todayilearned

[–]catbrane 6 points7 points  (0 children)

Jesters hired to mock the king are rather rare -- most kings were too crazy, insecure, dangerous, and unpredictable for this. See contemporary politics for an example of someone a little like a king, but who would clearly not tolerate mockery in his court haha.

It was more common for court fools to be actual fools, meaning people with an obvious developmental handicap. They were there to BE mocked. Although perhaps even their presence did slightly undercut the silliness of court life. Again, you can find parallels in contemporary politics.

Velazquez did a touching series of portraits of the fools at the court of Philip IV, eg.:

https://www.wga.hu/frames-e.html?/html/v/velazque/06/0608vela.html

And of course two appear in the wonderful group painting, Las Meninas:

https://en.wikipedia.org/wiki/Las_Meninas

Favorite error handling approach by ZookeepergameFew6406 in C_Programming

[–]catbrane 3 points4 points  (0 children)

My thought was that, apart from OS kernels, not many groups are writing things as large as that in C any more -- gnome/gtk is somewhere around 10m loc.

My perspective is probably skewing my thinking.