• 0 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2023

help-circle

  • Like I said, impressive work.
    Converting science to shaders is an art.

    I guess your coding standards follows scientific standards.
    And I guess it depends on your audience.

    I guess the perspective is that science/maths formulae are meant to be manipulated. So writing out descriptive names is only done at the most basic levels of understanding. Most of the workings are done on paper/boards, or manually. Extra letters are not efficient.
    Whereas programming is meant to be understood and adapted. So self-describing code is key! Most workings are done within an IDE with autocomplete. Extra letters don’t matter.

    If you are targeting the science community with this, a paragraph about adapting science to programming will be important.
    Scientists will find your article and go “well yeh, that’s K2”. But explaining why these aren’t named as such will hopefully help them to produce useful code in the future.

    The fun of code that spans disciplines!

    Edit;
    Om a side note, I am terrible at coding standards when I’m working with a new paradigm.
    First is “make it work”, after which it’s pretty much done.
    Never mind consistent naming conventions and all that.
    The fact you wrote up an article on it is amazing!
    Good work!



  • Interesting.
    I love creative applications of shaders. They are very powerful.

    In my opinion only, but willing to discuss.
    And I’ll preface this by saying if I tried to publish a scientific paper and my formulas used a bunch of made up symbols that are not standardised, I imagine it would get a lot of corrections on peer review.

    So, from a programming perspective, don’t use abbreviations.
    Basically working on naming.

    I can read that TAU is the diffusion rate due to a comment. Then I dig further into the code as I am trying to figure something out and I encounter tau. Now I have to remember that tau is explained by a comment, instead of the name of the variable. Why not call it diffusionRate then have a comment indicating this is TAU.
    A science person will be able to find the comment indicating where it is initialised and be able to adjust it without having to know programming. A programming person will be able to understand what it does without having to know science things.
    Programming is essentially writing code to be read.
    It’s written once and read many times.

    Similar with the K variables.
    K is reactionRate.
    K1 is reactionKillRate.
    K2 is reactionFeedRate.
    Scientists know what these are. But I would only expect to see variables like this in some bizarre nested loop, and I would consider it a code smell.

    The inboundFlow “line” has a lot going on with little explanation (except in comments). The calculation is already happening and going into memory. Why not name that memory with variables?
    Things like adjacentFlow and diagonalFlow to essentially name those respective lines.
    Could even have adjacentFlowWeight and diagonalFlowWeight for some of those “magic numbers”.
    Comments shouldn’t explain what is happening, but why it’s happening.
    The code already explains what is happening.
    So a comment indicating what the overall formula is, how that relates to the used variables, then the variables essentially explain what each part of it is.
    If a line is getting too complicated to be easily understood, then parting it out into further variables (or even function call, tho not applicable here) will help.
    I would put in an editted example, however I’m on mobile and I know I will mess up the formatting.

    A final style note, however I’m not certain on this.
    I presume 1. and 1.0 are identical representing the float value of 1.0?
    In which case, standardise to 1.0
    There are instances of 2.0 and 2.
    While both are functionally identical, something like (1.0, 1.0, 1.0) is going to be easier to spot that these are floats, as well as spotting typos/commas - when compared to (1., 1., 1.,).
    IMO, at least




  • Oh, this is on android yt app.
    Pixel 8pro, so Google & Google.
    There isn’t any variable that they don’t have control of.
    Video playback after ads skips 500ms, plays 500ms, skips 500ms etc. Changing quality doesn’t fixing it. Play/pause doesn’t fix it, skipping doesn’t fix it. I have to fully quit YT app and restart it to get playback again, and chances are it starts the ads again.
    Never had an issue on FF, w10 or Linux.

    I get that streaming video is expensive for bandwidth. And creators need an incentive to create.
    I don’t expect it for free. I don’t YT enough to warrant a premium subscription.
    The ads literally break the platform for me.
    Makes sense to me to get into one of the alternative clients… But I don’t want to not pay my dues… It’s just not worth the £13 a month: there is no way I’m consuming that much content.





  • At the homelab scale, proxmox is great.
    Create a VM, install docker and use docker compose for various services.
    Create additional VMs when you feel the need. You might never feel the need, and that’s fine. Or you might want a VM per service for isolation purposes.
    Have proxmox take regular snapshots of the VMs.
    Every now and then, copy those backups onto an external USB harddrive.
    Take snapshots before, during and after tinkering so you have checkpoints to restore to. Copy the latest snapshot onto an external USB drive once you are happy with the tinkering.

    Create a private git repository (on GitHub or whatever), and use it to store your docker-compose files, related config files, and little readmes describing how to get that compose file to work.

    Proxmox solves a lot of headaches. Docker solves a lot of headaches. Both are widely used, so plenty of examples and documentation about them.

    That’s all you really need to do.
    At some point, you will run into an issue or limitation. Then you have to solve for that problem, update your VMs, compose files, config files, readmes and git repo.
    Until you hit those limitations, what’s the point in over engineering it? It’s just going to over complicate things. I’m guilty of this.

    Automating any of the above will become apparent when tinkering stops being fun.

    The best thing to do to learn all these services is to comb the documentation, read GitHub issues, browse the source a bit.


  • Bitwarden is cheap enough, and I trust them as a company enough that I have no interest in self hosting vaultwarden.

    However, all these hoops you have had to jump through are excellent learning experiences that are a benefit to apply to more of your self hosted setup.

    Reverse proxies are the backbone of hosting and services these days.
    Learning how to inspect docker containers, source code, config files and documentation to find where critical files are stored is extremely useful.
    Learning how to set up more useful/granular backups beyond a basic VM snapshot in proxmox can be applied to any install anywhere.

    The most annoying thing about a lot of these is that tutorials are “minimal viable setup” sorta things.
    Like “now you have it setup, make sure you tune it for production” and it just ends.
    And finding other tutorials that talk about the next step, to get things production ready, often reference out dated versions, or have different core setups so doesn’t quite apply.

    I understand your frustrations.




  • I feel like for a long time, CUDA was a laser looking for a problem.
    It’s just that the current (AI) problem might solve expensive employment issues.
    It’s just that C-Suite/managers are pointing that laser at the creatives instead of the jobs whose task it is to accumulate easily digestible facts and produce a set of instructions. You know, like C-Suites and middle/upper managers do.
    And NVidia have pushed CUDA so hard.

    AMD have ROCM, an open source cuda equivalent for amd.
    But it’s kinda like Linux Vs windows. NVidia CUDA is just so damn prevalent.
    I guess it was first. Cuda has wider compatibility with Nvidia cards than rocm with AMD cards.
    The only way AMD can win is to show a performance boost for a power reduction and cheaper hardware. So many people are entrenched in NVidia, the cost to switching to rocm/amd is a huge gamble




  • I get what you are saying, but the balance is off.
    YT premium costs (edit) more than a streaming service per month.
    There are no industry leading movies or series released exclusively on YouTube.
    YouTubes benefits of premium is “not being delivered ‘skip after 5 seconds’ live streams” as an ad that will play indefinitely (or at least for hours).
    Also, streaming services provide much better series discovery. Ie, find a show you like and easily discover the start of that series, then binge watch the entire series in order.
    YT premium is basically a “play next” queue, 1080p, and no ads.
    It doesn’t (AFAIK) support creators any more. It’s literally just a fee to not-be-inconvenienced, and it’s not great at that


  • If the router/gateway/network (IE not local) firewall is blocking forwarding unknown IPv6, then it’s a compromised server connected to via IPv6 that has the ability to leverage the exploit (IE your windows client connecting to a compromised server that is actively exploiting this IPv6 CVE).

    It’s not like having IPv6 enabled on a windows machine automatically makes it instantly exploitable by anyone out there.
    Routers/firewalls will only forward IPv6 for established connections, so your windows machine has to connect out.

    Unless you are specifically forwarding to a windows machine, at which point you are intending that windows machine to be a server.

    Essentially the same as some exploit in some service you are exposing via NAT port forwarding.
    Maybe a few more avenues of exploit.

    Like I said. Why would a self-hoster or homelabber use windows for a public facing service?!


  • How many people are running public facing windows servers in their homelab/self-hosted environment?

    And just because “it’s worked so far” isn’t a great reason to ignore new technology.
    IPv6 is useful for public facing services. You don’t need a single proxy that covers all your http/s services.
    It’s also significantly better for P2P applications, as you no longer need to rely on NAT traversal bodges or insecure uPTP type protocols.

    If you are unlucky enough to be on IPv4 CGNAT but have IPv6 available, then you are no longer sharing reputation with everyone else on the same public IPv4 address. Also, IPv6 means you can get public access instead of having to rely on some RPoVPN solution.