4
32
alienscience

@programming.dev

alienscience 19 points 3 years ago

The person that found this is a hero.

Whenever I see slightly weird behaviour, there is a temptation to just move on because there isn't enough time, running software is complicated, and there is something else I want to do. I will try to change my attitude in future in case it uncovers a backdoor like this -- it would be educational too.

path: 0 8948639, hotness: undefined, score: 19, children: 0
alienscience 18 points 2 months ago

I got interested in constraint programming, and I had NO idea how it worked. It seemed like magic.

I have started on following the slides and code of MiniCP, and have started implementing the first steps in Rust. I find it very challenging but it is a great learning experience. I got such a thrill from solving the N-Queens problem in milliseconds from a program that I had written myself.

I am continuing to develop the implementation for a few hours this weekend. Because writing a constraint system is hard, I am also learning some new parts of Rust that I have not touched before.

path: 0 25186450, hotness: undefined, score: 18, children: 0
alienscience 13 points 2 months ago

I find daily is better than weekly because I can actually remember what I was doing. However, it is mostly just a few hours each weekend for me a the moment.

path: 0 25187453 25187499, hotness: undefined, score: 13, children: 0
alienscience 11 points a year ago

Filling out forms to get CI runners means no serious users will be attracted.

I think this will have opposite effect. Only serious users will be willing to fill out forms and casual users will be put off by the bureaucracy. I agree that it is a downside though. In a perfect world, there would be no forms to fill in.

The problem with CI is that the internet is full of not-nice people who will use free compute to mine crypto. Gitlab had problems with this abuse and requires credit card details.

path: 0 18746953 18750205, hotness: undefined, score: 11, children: 0
alienscience 6 points 3 years ago

I found the most interesting bit was this at the end:

  • You can now specify a new RestartPolicy: Always configuration for an init container.
  • If you add that new config, you now have a sidecar container.
  • A sidecar container starts before all ordinary containers (because it's an init container), and—this is the big part—it now terminates after all the ordinary containers all terminate.
  • If for some reason your sidecar container dies while ordinary containers are running, it will be restarted automatically. (This is the "Always" bit.)
  • Finally, unlike with normal init containers that each wait in turn to complete before the next starts, the other init containers do not wait for sidecar containers to complete before starting. Which is good, because they're not going to complete until much later.
path: 0 2466960, hotness: undefined, score: 6, children: 1
alienscience 5 points a year ago path: 0 18985843, hotness: undefined, score: 5, children: 0
alienscience 5 points 2 months ago

Learning Rust is a journey. I actually gave up twice before I learnt it properly. I built a simple interpreter as my first project and I found it challenging.

I think that tutorials, and the support you get, is much better now though. Its also a language well worth learning.

path: 0 25187799 25188280, hotness: undefined, score: 5, children: 1
alienscience 5 points a year ago

At $work we write closed source Rust but we do not use Kellnr.

Instead we use a mono-repo, using a workspace, that contains most of our applications and libraries.

Our setup is mostly OK but needs some workarounds for problems we have hit:

  • Slow cargo clean && cargo build, to speed this up we use sccache.
  • Very slow Docker builds. To speed these up we use cargo chef.
  • Slow CI/CD. To speed this up we use AWS instances as Github runners that we shutdown, but do not destroy, after use. This allows us to cache build dependencies for faster builds.

I am generally happy with our setup, but I am a fan of mono-repos. If it ever becomes to difficult to keep compiles times reasonable, I think that we would definitely look at Kellnr.

path: 0 16556399 16560577, hotness: undefined, score: 5, children: 0
alienscience 5 points 3 years ago

I am not sure if it is best practice, but this is what I do and it might provide some inspiration:

  • Bootstrap from a private gitlab.com repository with a base ansible setup. Executed from a laptop.
  • The bootstrap setups up k8s and installs a bare bones git repository docker container based on https://codeberg.org/al13nsc13nc3/gitsrv.
  • Flux CD is installed into the bare bones git repository and k8s.
  • Flux CD is used to install Forgejo and Woodpecker CI using the bare bones git repository as the gitops source of truth.

This has the advantage that Gitops and normal git repositories are separate. I think that a similar principle would work with docker compose instead of k8s.

path: 0 9336659, hotness: undefined, score: 5, children: 1
alienscience 4 points 2 years ago

Just to add to this point. I have been running a separate namespace for CI and it is possible to limit total CPU and memory use for each namespace. This saved me from having to run a VM. Everything (even junk) goes onto k8s isolated by separate namespaces.

If limits and namespaces like this are interesting to you, the k8s resources to read up on are ResourceQuota and LimitRange.

path: 0 11972199 11979654, hotness: undefined, score: 4, children: 0
alienscience 4 points 3 years ago path: 0 7453316, hotness: undefined, score: 4, children: 1
alienscience 4 points 2 years ago

I bought my Fairphone for similar reasons to you.

I had a second hand mid-range Samsung for about 6 months and then the USB port got destroyed. I was unable to replace the USB port so the phone is useless.

I bought a Fairphone 5 thinking that, if anything similar happened, I would NOT need to replace the phone and would save money in the long term.

Kids not dying in cobalt mines is also a bonus: https://www.npr.org/...

path: 0 13709562 13709762 13725150, hotness: undefined, score: 4, children: 0
alienscience 4 points 8 months ago

That's a cool docker compose setup and is definitely competitive with a single node k8s deployment I run for hobby projects (k3s). The simplicity of this docker compose setup is an advantage, but it is missing some useful features compared to k8s:

  • No Let's Encrypt support for Nginx using Cert Manager.
  • No git ops support, the deployment shell script is manually run.
  • No management ui's like Lens or k9s.
  • Will not scale to multiple machines without changing the technology to k8s or Nomad.

That said, I would be happy to run their setup if I hadn't gone through the pain of learning k8s.

path: 0 22007973, hotness: undefined, score: 4, children: 0
alienscience 4 points 2 years ago

The only thing you should keep an eye on is probably the license? But I’m not the right person to discuss about licensing :/

It is normal practice to keep the same copyright notice and add your name to it, e.g for this project I forked in 2021: https://code.alienscience.org/...

path: 0 15940419 15943175, hotness: undefined, score: 4, children: 1
alienscience 4 points a year ago

Its not the solution that you are looking for but Woodpecker runs well on k8s and directly supports Forgejo. I use them together on k8s and I am happy enough not have tried runners.

path: 0 18288230 18290870, hotness: undefined, score: 4, children: 0
alienscience 4 points 2 years ago path: 0 12192987, hotness: undefined, score: 4, children: 0
alienscience 4 points a year ago

I do this for sites where I don't care at all about security. One minor tip, that will protect against automated attacks if the password is cracked, is to add part of the website name into the password (e.g "mystrongp4ss!lemworld") .

A human could easily crack it, but automated systems that replay the password on different sites would probably not bother to calculate the pattern.

path: 0 17947316 17948383 17948599, hotness: undefined, score: 4, children: 2
alienscience 4 points 3 years ago

The manifest of my Kubernetes cluster is managed in a Git repository and is automatically deployed via a GitOps tool named Flux CD. When I push changes to the repository, such as adding a new application or upgrading Docker images, the deployment occurs within a few minutes.

This is the way.

Although I use Flux ImageUpdateAutomation instead of Renovate Bot. Did you consider using Flux to do auto updates? Are there any downsides that made you choose Renovate Bot instead?

path: 0 7156276, hotness: undefined, score: 4, children: 1
alienscience 4 points a year ago

I also use KeepassXC and Synthing together and I am very happy with this combination.

One tip that I have, if you are worried about the security of the database file being shared, is to get 2 Yubikeys and use these, along with a strong passphrase, to protect the database file.

path: 0 17946682 17948536, hotness: undefined, score: 4, children: 2
alienscience 4 points 2 years ago

If you deploy with Docker you need to attach to the external interface -- I bound to localhost in a Docker container once and its painful enough to debug that it is something I never forget.

I expect that upload_handle() would need to change to 0.0.0.0 rather than axum to bind to localhost.

path: 0 14290195 14293923, hotness: undefined, score: 4, children: 0

thanks for using Leebra!

go to feed...