addie

joined 1 year ago
[–] addie 1 points 3 months ago

As an example of a language that many people are familiar with, which is likely to be in long-term use where maintainability is most important, and which can almost read like pseudocode anyway, sure - probably the best 'real language' choice.

[–] addie 21 points 3 months ago (2 children)

You can write an unmaintainable fucking mess in any language. Rust won't save you from cryptic variable naming, copy-paste code, a complete absence of design patterns, dreadful algorithms, large classes of security issues, unfathomable UX, or a hundred other things. "Clean code" is (mostly) a separate issue from choice of language.

Don't get me wrong - I don't like this book. It manages to be both long-winded and facile at the same time. A lot of people seem to read it and take the exact wrong lessons about maintainability from it. I think that it would mostly benefit from being written in pseudocode - concentrating on any particular language might distract from the message. But having a few examples of what a shitfest looks like in a few specific languages might help

[–] addie 26 points 3 months ago (1 children)

That is a good read, thank you. Didn't have procedures, had two different brokersge systems running at once because they'd no procedures to follow, lost a fortune.

I'm thinking it's the "most expensive bug in history so far - haven't seen an accurate total for CrowdStrike's little faux pas, yet.

[–] addie 15 points 3 months ago

My old job had a lot of embedded programming - hard real-time Z80 programming, for processors like Z800s and eZ80s to control industrial devices. Actually quite pleasant languages to do bit-twiddling in, and it's great to be able to step through the debugger and see that what the CPU is running is literally your source code, opcode by opcode.

Back when a computers were very simple things - I'm thinking a ZX Spectrum, where you can read directly from the input ports and write directly into the framebuffer, no OS in your way just code, then assembly made a lot of sense, was even fun. On modem computers, it is not so fun:

  • x64 is just a fucking mess

  • you cannot just read and write what you want, the kernel won't let you. So you're going to be spending a lot of your time calling system routines.

  • 99% of your code will just be arranging data to suit the calling convention of your OS, and doing pointless busywork like stack pointer alignment. Writing some macros to do it for you makes your code look like C. Might as well just use C, in that case.

Writing assembly makes some sense sometimes - required for embedded, you might be writing something very security conscious where timing is essential, or you might be lining up some data for vectorisation where higher-level languages don't have the constructs to get it right - but these are very small bits of code. You would be mad to consider "making the whole apple pie" in assembly.

[–] addie 2 points 3 months ago

Genesis is a different style of game tho, isn't it? Diablo-like rather than third-person hack and slash?

Love the series. Personally prefer 3 due to its more limited scope; the other two are great, but to on for a very long time, and I really can't be bothered playing through the Portal-like bits again. Happy if 4 is the same length as 3.

[–] addie 14 points 4 months ago (2 children)

London in particular has a very transient local population - a lot of people move there for a few years then move on. Wikipedia has the city at ~50% 'overseas born' at the moment - it's a very cosmopolitan place. So having about double the number of tourists as 'residents' isn't going to have the same cultural impact that it would in some of the other cities here

I'm surprised that there's as many as 250k 'locals' in Venice, it was my understanding that they mostly live inland or up the coast and commute into the city.

[–] addie 2 points 4 months ago

Damn right. Hard unpleasant work, antisocial hours. The guys deserve to be compensated fairly.

[–] addie 19 points 4 months ago

Made a special trip to Wuppertal during the summer to have a go on these. They're good fun, work really nicely. Getting a picture that looks this natural is an achievement, though - it's a really industrial part of Germany, you get a lot of views of lagged pipework.

[–] addie 5 points 4 months ago (1 children)

That would be the 25mm2 stuff, about 9mm diameter. Pretty standard for electric ovens.

The joy of producing electricity from renewables at 12Vdc is that you can run it straight into a whole bank of car and truck batteries for storage. Can then either use it directly for powering things - there's a lot of things like portable tellies for use in a caravan that are 12V for this reason - or feed it to an inverter to get 240Vac for 'normal' usage. Again, large outdoor stores will have them, because they're intended for this usage.

[–] addie 4 points 4 months ago (1 children)

This would work better the other way round, tho.

[–] addie 48 points 4 months ago (12 children)

Cheaper for now, since venture capitalist cash is paying to keep those extremely expensive servers running. The AI experiments at my work (automatically generating documentation) have got about an 80% reject rate - sometimes they're not right, sometimes they're not even wrong - and it's not really an improvement on time having to review it all versus just doing the work.

No doubt there are places where AI makes sense; a lot of those places seem to be in enhancing the output of someone who is already very skilled. So let's see how "cheaper" works out.

[–] addie 12 points 4 months ago (1 children)

PS3 most certainly had a separate GPU - was based on the GeForce 7800GTX. Console GPUs tend to be a little faster than their desktop equivalents, as they share the same memory. Rather than the CPU having to send eg. model updates across a bus to update what the GPU is going to draw in the next frame, it can change the values directly in the GPU memory. And of course, the CPU can read the GPU framebuffer and make tweaks to it - that's incredibly slow on desktop PCs, but console games can do things like tone mapping whenever they like, and it's been a big problem for the RPCS3 developers to make that kind of thing run quickly.

The cell cores are a bit more like the 'tensor' cores that you'd get on an AI CPU than a full-blown CPU core. They can't speak to the RAM directly, just exchange data between themselves - the CPU needs to copy data in and out of them in order to get things in and out, and also to schedule any jobs that must run on them, they can't do it themselves. They're also a lot more limited in what they can do than a main CPU core, but they are very very fast at what they can do.

If you are doing the kind of calculations where you've a small amount of data that needs a lot of repetitive maths done on it, they're ideal. Bitcoin mining or crypto breaking for instance - set them up, let them go, check in on them occasionally. The main CPU acts as an orchestrator, keeping all the cell cores filled up with work to do and processing the end results. But if that's not what you're trying to do, then they're borderline useless, and that's a problem for the PS3, because most of its processing power is tied up in those cores.

Some games have a somewhat predictable workload where offloading makes sense. Got some particle effects - some smoke where you need to do some complicated fluid-and-gravity simulations before copying the end result to the GPU? Maybe your main villain has a very dramatic cape that they like to twirl, and you need to run the simulation on that separately from everything else that you're doing? Problem is, working out what you can and can't offload is a massive pain in the ass; it requires a lot of developer time to optimise, when really you'd want the design team implementing that kind of thing; and slightly newer GPUs are a lot more programmable and can do the simpler versions of that kind of calculation both faster and much more in parallel.

The Cell processor turned out to be an evolutionary dead end. The resources needed to work on it (expensive developer time) just didn't really make sense for a gaming machine. The things that it was better at, are things that it just wasn't quite good enough at - modern GPUs are Bitcoin monsters, far exceeding what the cell can do, and if you're really serious about crypto breaking then you probably have your own ASICs. Lots of identical, fast CPU cores are what developers want to work on - it's much easier to reason about.

view more: ‹ prev next ›