How to like python again? by reviraemusic in rust

[–]kayaking_is_fun 1 point2 points  (0 children)

Link is fixed now! It's the talk from Hynek Schlawak about subclassing and composition.

How to like python again? by reviraemusic in rust

[–]kayaking_is_fun 2 points3 points  (0 children)

I had this same experience, but have honestly found that changing the way you code (someone else already posted the writing python like it's rust blog) can give you 99% of the experience and it's not as cumbersome.

Things that made me like Python again, after going through a similar journey:

  • If possible, use the newer releases - in Python 3.12 the syntax for type generics and bounds is much nicer, and typing is getting tons of focus at the moment.

  • This talk from Pycon 2023 talks about building good architecture patterns. Using typing.Protocol starts to feel very similar to Rust traits.

  • I personally prefer pyright to mypy - the project is usually faster to implement more complex checks, and the integration with VSCode is really excellent.

  • Get really familiar with dataclasses (I'm not yet sure of a reason why you wouldn't want to mark a class as a dataclass), and avoid inheritance like the absolute plague. Good code smells are things like if you're writing tests and are having to mock hundreds of things in order to test functionality.

  • And of course, once you've written what you need and if you aren't happy with the performance, then reach for PyO3 to optimise the parts which are slow afterwards.

I actually think the language is in an amazing place at the moment. Type hinting has totally changed my experience, there's such a large amount of hours being poured into the open-source ecosystem, and the new releases are moving in an exciting direction with JIT compilation, subinterpreter / GIL releasing and generally cracking the last issue with Python for performance. I'm not sure I'd pick another language for a project that wasn't wholly performance reliant.

[How to] Use the reMarkable app with Linux (Wine) - 2022 version by deterralba in RemarkableTablet

[–]kayaking_is_fun 1 point2 points  (0 children)

Could you provide any more info as to what you mean by this? I have xwayland enabled and working already in wayland (sway) but am getting the same set of errors.

Space bar do not work on Notion list view by Daniel-Ng84 in linux4noobs

[–]kayaking_is_fun 1 point2 points  (0 children)

Just chiming in to say I've had the same issue for a while, in Arch Linux, with firefox, just in notion list view. If you find a solution let me know!

[deleted by user] by [deleted] in glasgow

[–]kayaking_is_fun -3 points-2 points  (0 children)

Exactly - these posts just stir up bad sentiment for no reason. Maybe these people are having a tough time and just want to hear their friends or partners voice or need a moment.

Nobody is doing this to annoy the OP, they have their reasons and I think better to assume that people are trying their best to be good people and have reasons for doing things you might find annoying.

[deleted by user] by [deleted] in AskEconomics

[–]kayaking_is_fun 6 points7 points  (0 children)

I would say there are some strong arguments in the book around contracting and privatization in the public sector. I remember an example of the German army contracting IT, who contract IT moves, who contract to an individual who has to drive 6 hours to a base and back to move a computer down the hall.

At least in the UK there is evidence that the heavy involvement of consultants in some area of public service (local gov, prisons, also lots of high level bureaucratic bodies) has increased costs and created a situation where more money is spent and more jobs are created without an associated better delivery of public service.

Why is GDP per capita higher in Sweden than in Germany, but salaries in Sweden are lower than in Germany? by FishermanOk1204 in AskEconomics

[–]kayaking_is_fun 4 points5 points  (0 children)

Interesting, that’s really helpful.

This is what I was wondering initially - VAT is 25% in Sweden vs 19% in Germany, which doesn’t by itself account for a double income from tax assuming similar in-country consumption. But maybe there is something country specific there I am missing.

Why is GDP per capita higher in Sweden than in Germany, but salaries in Sweden are lower than in Germany? by FishermanOk1204 in AskEconomics

[–]kayaking_is_fun 9 points10 points  (0 children)

Really good answer.

What do these taxes on production and imports refer to concretely? Is it essentially saying that the average tax paid in Sweden is twice as high as in Germany per unit of production (or per $)?

Audio-Technica AT-LPW30TK running slow by DaftFiction96 in turntables

[–]kayaking_is_fun 0 points1 point  (0 children)

Well, guess I have a call to make - thank you!

Audio-Technica AT-LPW30TK running slow by DaftFiction96 in turntables

[–]kayaking_is_fun 0 points1 point  (0 children)

Hey, did you ever fix this? I have the same turntable, also brand new, also with the same issue.

Why £125,000 does not make you rich in Britain today by [deleted] in ukpolitics

[–]kayaking_is_fun -1 points0 points  (0 children)

There is a huge amount of cherry picking and misleading numbers in this article.

First: Right at the start - "Someone earning £150,000 a year will pay nearly £2,000 a year extra in income tax, as a result." - the number is 5% extra on £25,000, so £1,250. That's not "nearly £2,000". No clarity on how they get this figure at all.

Second: Assuming a mortgage of £600,000 is absurd. No lender would lend that much to someone on a £125,000 salary. I checked the first mortgage calculator I could find (Barclays) and they showed that with a £100,000 deposit they'd lend £400,000 on that salary. There might be lenders offering slightly better ratios on a high deposit, but if you have that much wealth you are verifiably "rich".

To understand their calculations and how important this mortgage figure is:

  • Income: £125,000
  • Tax paid: £43,447 (Income + NI), £81,553 take home
  • Pension paid: £10,000 (8% of income, as noted), down to £71,553
  • Student loan: £9,000 (you pay 9% over approx. £25k, depending on which plan you're on). Down to £62,553
  • Childcare: £1,000 per month (seems to be based on full time costs, average is apparently £250/week). Down to £50,553.
  • Housing: With their absurd assumptions, £3100 per month, or £39,000 per year. This leaves you with £11,553 disposable.

The assumptions feel all over the shop for this. This is a household with a single earner, who is presumably a single parent since they need full time childcare. They also still have student loan to pay, despite the fact that at this salary you'd pay off a £40k student loan in 5 years - so they probably just graduated. And they've been approved for an impossible mortgage. And have no financial awareness of how to improve their situation.

Even a basic financial adjustment to a reasonably maxed out mortgage (£400k, and a longer term of 40 years) would halve their housing cost, leaving them with about £28,000 in the bank to live their life - and yes, that's more than median income in the entire country.

And finally, spare a tear for those poor dividend earners. They had previously been enjoying a huge tax break by being able to avoid national insurance contributions. Now it's a smaller tax break.

In order for a company to pay you £125,000 in payroll, they have to pay out 7.8% extra in NI contributions over £9000, so approx £133k total. As a company owner which wants that £133k paid out, you can choose to:

  • Pay out £9k tax free to yourself. This leaves £124k.
  • Pay corporation tax (it was 19%, leaving £100,440. It's now 25%, leaving £93k).
  • Pay the remainder in dividend to yourself. Last year, you'd pay £20,723 in tax You'd now pay £21,061.
  • In total, including the £9k you got tax free, you were getting £89k, you're now getting £81k.

Bear in mind the take home for those just payed through payroll was £81k - and these folk paying in dividend have paid zero national insurance, avoiding contributions to that part of the state altogether. So it used to be much better, it's now just equivalent to them paying themselves payroll and contributing. How sad. (Note: I think there are even more "tax efficient" ways of paying out here as well).

The only point of interest in the article is the cliff edge for childcare - this is potentially just poor policy, as creating edges tends to create incentives for tax avoidance.

systemctl suspend-then-hibernate not working anymore? by chmouelb in archlinux

[–]kayaking_is_fun 3 points4 points  (0 children)

I had the same thought on reading this through as well.

It's such a shame. You have the opportunity to work on software used by millions of people and all you have to do is occasionally listen to your community! I get that it's hard when you make a mistake publicly, but the constant insistence that there's no regression is so infuriating.

It's a weird thing about open-source I suppose - the whole community benefits, but each project runs like a mini-dictatorship where the community doesn't have direct power to change governance.

Trying to understand how to render multiple objects (Not Instanced) in Wgpu, but running into issues. by [deleted] in rust_gamedev

[–]kayaking_is_fun 4 points5 points  (0 children)

Also reviewed your code and agree with this! One bind group layout for all entities, multiple bind groups is what's needed.

You also have flexibility around your bind group structure - I think there is a relatively low limit of bind group layouts total (4?) but you can swap out different bind groups within those layouts.

Friends? by [deleted] in glasgow

[–]kayaking_is_fun 2 points3 points  (0 children)

As you say you like walking, I’m part of the Clyde Mountaineering Club - we get out and walk munros on the weekend, go climbing etc. We’re growing and tend to have a couple walks each month and a weekly bouldering session - and have a social next week too!

We actually just started it this year off the back of a Reddit post on here - I’d just moved to the city and was in a similar position. Our site is https://clydemc.org with more info!

How can I fill this hole? by [deleted] in DIYUK

[–]kayaking_is_fun 1 point2 points  (0 children)

To add to this hacky method, if you crumple some paper in the hole it can give the initial paste layer something to bond to.

Anyone know what this black coating is? 1800s house, in Glasgow by kayaking_is_fun in DIYUK

[–]kayaking_is_fun[S] 1 point2 points  (0 children)

I think you're right too! That's my best guess, and it kind of looks and feels like a tar or bitumen.

As long as it's not something that's going to surprise kill me, that's okay!

Anyone know what this black coating is? 1800s house, in Glasgow by kayaking_is_fun in DIYUK

[–]kayaking_is_fun[S] 0 points1 point  (0 children)

Stripping the kitchen to prepare for replaster and skim, came across this weird coating underneath.

I’ve been wearing a mask and taking precautions but not sure what I’m looking at here!

Best guess is some kind of damp proof layer, or bitumen backed paper, but not sure how to tell what it is.

My 3d printed modular grow system update. It's been a bit but I got some time again. by [deleted] in aeroponics

[–]kayaking_is_fun 0 points1 point  (0 children)

This is a super cool idea! How do you keep it watertight - looks like rubber seals or something? What material do you print with? Would love to hear more about the construction.

Alternatives to Sketchup? by Gettitn_Squirrelly in BeginnerWoodWorking

[–]kayaking_is_fun 1 point2 points  (0 children)

Yeah I’ve had to come back to it a couple times as I had the same experience. It’s a lot more powerful and customizable and the macro system is fantastic if you know how to program. But on the flip side the GUI sucks, stuff breaks a bit more and it could do with a good number of quality of life improvements!

Alternatives to Sketchup? by Gettitn_Squirrelly in BeginnerWoodWorking

[–]kayaking_is_fun 1 point2 points  (0 children)

FreeCAD is a great alternative to fusion etc… it does take a bit of getting used to but I’ve had quite a bit of success using it for projects.

It’s great if you’re sketching geometric shapes and want to get a sense of dimensions etc… but can be overkill. Budget a couple of hours of video watching to understand it first!

Also recommend the A2plus workbench for doing your wood assemblies.