[-] jonc211@programming.dev 12 points 4 days ago

https://mitpress.mit.edu/9780262046305/introduction-to-algorithms/

This one is pretty hardcore. I bought the 2nd edition of it over 20 years ago when I started my career as a developer due to not doing a CS degree.

[-] jonc211@programming.dev 120 points 6 days ago

It’s not necessarily how far things are, it’s that you need a car to get to places in a sensible way.

I’m a fellow Brit, but have stayed in suburban US enough to have experienced how different it is. You might have a supermarket a couple of miles away, but if you want to attempt to walk there, you’ll often be going well out of your way trying to find safe crossing points or even roads with paved sidewalks.

Train stations are mostly used for cargo in most US cities. If you don’t have a car, you’re pretty much screwed.

Some cities are different. NYC being the obvious one. You can get about there by public transport pretty easily in most places there. San Francisco is another city that is more doable without a car, but more difficult than NYC.

I stayed near Orlando not too long ago and there it’s just endless surburban housing with shops and malls dotted about mostly along the sides of main roads. You definitely need a car there.

[-] jonc211@programming.dev 4 points 6 days ago

Also take a look at the Specification Pattern for something similar.

That’s something I would only use if the logic becomes very complex, but it can help break things down nicely in those cases.

[-] jonc211@programming.dev 61 points 1 month ago

If you strip things back, the most fundamental point of a market is to bring buyers and sellers together and to enable price discovery.

The price of a financial instrument you see on a stock exchange or similar is simply the last traded price between a buyer and a seller. If you want to buy or sell something, then the price you get depends on who wants to sell/buy on the other side and what price they have put an order in for.

The more trades going on in the market, the more likely it is that you will be able to buy at a price close to what you see as the last price in the market.

If you only allow trading every hour, then you lose some of that price discovery.

Additionally, as already mentioned, trades would likely still happen, but away from the designated marketplace. If I want to sell something, then I may just ask who else has the thing I want to sell and try to negotiate a price directly with them.

That way, fewer trades happen in the marketplace and more trades happen in private away from there.

That sort of limited trading does happen for some very niche products that don’t have a lot of potential buyers and sellers. For common financial instruments, have a lot of participants wanting to trade, having a centralised marketplace helps avoid the issues that would come otherwise.

Now, you can argue that in practice it doesn’t work as well as the theory, and I would agree there. If you are a HFT, then you can make money by getting in milli or microseconds ahead of others.

For a lot of market participants, that doesn’t really matter though. The big banks typically don’t do that sort of trading. They are buying and selling on behalf of their clients, both individuals and companies that want access to the market. The bank makes their money by charging a margin to their client (similar to how it works for pretty much any retailer), and the fact that the HFTs are making all these trades helps them with price discovery and liquidity (ensuring there is someone to buy what they want to sell, or sell what they want to buy)

[-] jonc211@programming.dev 63 points 1 month ago

Although filling an entire trunk full of peanut butter, let’s say 500kg worth (assume a 450 litre trunk and density of 1.1 kg/l according to Google), then adding all that weight over the rear axle would affect the handling and balance of the car, potentially making it dangerous and therefore illegal to drive.

So, it’s not actually that clear cut that it wouldn’t be illegal!

[-] jonc211@programming.dev 69 points 1 month ago* (last edited 1 month ago)

So I deleted the story before I posted it, and began to realize that even though I'm 40, and should be past all this, it still hurts, and I'm a deeply broken person.

The thing about trauma (and it likely is trauma) is that it often just doesn’t go away on its own and you need to do work on it. So, why should you be over it?

Should is a loaded word as it pretty much always comes from what you learned as a child. You should do that. You should be like this.

That “should” probably comes from your father when he told you how you should be as a child.

It sounds like you aren’t over it now, but that’s ok. It’s ok not to be over stuff that happened in childhood. But the important thing to understand is that you can get over it with work. Being aware of that is the first step on that road.

[-] jonc211@programming.dev 52 points 1 month ago

Guessing they’ve never gone more than 31 days without an accident or they would have needed a bigger sign

[-] jonc211@programming.dev 32 points 2 months ago

That guy with the mullet looks sharp

[-] jonc211@programming.dev 80 points 8 months ago

I still remember the code for Braeburn Apples, over 25 years after I worked in a supermarket.

For some reason, their code of 6969 sticks in my mind.

[-] jonc211@programming.dev 34 points 8 months ago

I’m from the UK.

It was a joke. Don’t take things so seriously

[-] jonc211@programming.dev 96 points 8 months ago

Sure, there’s a lot of plug sockets there, but I don’t see a single plug in that image

[-] jonc211@programming.dev 42 points 1 year ago* (last edited 1 year ago)

That one’s actually really easy to prove numerically.

Not going to type out a full proof here, but here’s an example.

Let’s look at a two digit number for simplicity. You can write any two digit number as 10*a+b, where a and b are the first and second digits respectively.

E.g. 72 is 10 * 7 + 2. And 10 is just 9+1, so in this case it becomes 72=(9 * 7)+7+2

We know 9 * 7 is divisible by 3 as it’s just 3 * 3 * 7. Then if the number we add on (7 and 2) also sum to a multiple of 3, then we know the entire number is a multiple of 3.

You can then extend that to larger numbers as 100 is 99+1 and 99 is divisible by 3, and so on.

5

I've just set up arcosphere balancing in my K2SE playthrough.

My set up is relatively simple, though it uses a lot of combinators! I'm taking the inputs for a recipe as signal I and the products as signal P. If I > P then I request the inputs for that particular recipe.

I then added a slight tweak to multiply the products by 1.1, so the inputs need to exceed products by 10% before the request comes through.

Initially, it never reached equilibrium and the gravimetrics facilities would keep churning away. With the extra 10% buffer, it settles down a lot more easily and kicks in only when things start to become more unbalanced.

I've been producing naquium tesseracts and DSS3 data cards for a while now and it seems to be hanging together.

I had a hiccup early on when I ended up really unbalanced due to the length of time bots were in the air with arcospheres leading to the balancing running amok. My fix for now has been to move DSS3 and tesseracts close to the balancing area, but not sure this is going to be sustainable. Let's see!

view more: next ›

jonc211

joined 1 year ago