[-] [email protected] 2 points 3 weeks ago

Distroless is not core to the idea. It's only a nice to have. The main point is the composability, Declarative design, etc.

[-] [email protected] 1 points 3 weeks ago

the base image is nodejs

Which has its own dockerfile. My proposed tool would allow using other images as base too, but that is not the problem it is solving.

copy your app

Well you'd have to have it compiled or built if that is required in your case. With my system, the build recipe would be a gentoo ebuild (shell-script-like) that you would just reference.

The example I gave is pretty simple, you're right. Say in another case, you list the following packages:

nodejs, nginx, vpn-app(wireguard), some-system-monitoring-app, my-app

You could start with a nodejs base or an nginx base, and then write the steps to install the other. You'd also have to make sure to get all the deps if they have them.

You're unlikely to find a ready image that has all what you want. But with my method, you can compose different ones however you like, rather than having to find an image that matches your exact use case.

[-] [email protected] 1 points 3 weeks ago

I had a feeling nixos would have something, but I avoided it because it seemed more than a day's worth of learning (and also its a bit opinionated). But I will revisit it one day!

[-] [email protected] 8 points 3 weeks ago

Did not know about apko. I am not attached to distroless, just thought it was a nice to have. So apko might be a reason I don't pursue this project anymore. Thanks for showing me!

Your comment is very insightful for other reasons too. Thanks a lot :)

[-] [email protected] 2 points 3 weeks ago* (last edited 3 weeks ago)

The package manager would not be part of the container image. The package manager is only used to build it. The container image will only include the packages the user specifies.

combining portions of images as multi-stage builds

That's something I am making use of for this, actually :)

What you're describing not only already exists...

Can you please give an example of a tool that can build a container image by being given only a list of packages it needs to have?

My tool would be as simple as doing something like this:

build-container --packages nodejs-20.1.1, yarn-4.2.2, some-app-i-made-1.0.0

And I would have a container that only has nodejs binary, yarn, and my own app. no package manager or any utils.

[-] [email protected] 2 points 4 weeks ago

Whats the risk? My uptime is pretty good and I host from home.

[-] [email protected] 2 points 4 weeks ago

Why not host at home?

[-] [email protected] 1 points 4 weeks ago

But it's not self hostable.

[-] [email protected] 16 points 4 weeks ago

Not self hostable and not secure by default.

[-] [email protected] 2 points 1 month ago

Anyone noticed slow downs since the update?

[-] [email protected] 3 points 1 month ago

Most people use JavaScript for this nowadays, but most commentary also hates on it.

I'll be real with you. There's a reason JavaScript keeps being chosen despite the hate. It's so much easier and the dev experience is much more polished for creating desktop apps.

The reason it's hated on is that it is running a browser in the background, which people view as too bloated for a desktop app. Moreover, JS tends not to play well with system-wide themeing like GTK or QT.

But in the end, as a developer, you'll be dealing with a lot of messiness going with anything else. If you're up for a challenge, do try other things. But if you just want something that works and looks nice, do Js

[-] [email protected] 8 points 1 month ago

Do you know where I can find them? I will seed them all

51
DuckDB as the New jq (www.pgrs.net)
submitted 3 months ago by [email protected] to c/[email protected]
30
submitted 3 months ago by [email protected] to c/[email protected]

I want to self host a suite of services and make them public.

What kind of services? Well, all kinds. Matrix, lemmy, bookwyrm, and I may think of others in the future.

The problem? I don't even know where to begin from a legal stand point. Not only that, I am a barely legal immigrant (vulnerable to deportation) from a country that is not very liked by the gov. I am afraid to put myself in a vulnerable position and get more trouble than the typical US citizen.

Is there a reasonable way to be able to self host public services without legal trouble? Is there a resource I can follow for best practices to avoid issues?

16
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]

I am interested in trying out matrix, but my first impression seems to reveal that by default, there may be some privacy or anonymity pitfalls if I use matrix.

Examples:

  • using an instance I don't host means the host is trusted with my data
  • self hosting might reveal a lot of information about me. Most likely, it is registered to a domain that has my info and could potentially be traced back to me.
  • When self-hosting, being one of few users, basic analysis of my activity could reveal a lot about me, since all that activity could be easily identified as belonging to a single person

Now I understand not all threats could be mitigated, but my worry is that both self hosting or not have significant gaps. What's the most privacy and anonymity conscious way to use Matrix?

72
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]

An alternative to reviewing games on steam

Preferably the platform would be community driven rather than profit driven (which may make the data less trust worthy for me)

12
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]

While learning Automata and computation theory independently, I made a realization I want to confirm.

Regular languages can all be created by taking elementary languages (languages made up of a single member of its alphabet) and performing closed operations in them, such as union, concat, and kleene star. This was clear to me from regular expressions.

Is this true? Is there any significance to this fact?

What about Context-free languages and other formal languages? Are there operations that can be performed on elementary languages to create all of them? Or is this a special property of regular languages only?

211
submitted 4 months ago by [email protected] to c/[email protected]

I know Calibre can remove DRM, but it seems that Calibre does not remove things like watermarks, references to the buyer by name, etc. Now maybe I can try to find those manually, but that is an error prone process. Plus, what if they embed a unique digital signature that ties back to me? I understand that this is a very uncommon practice, but I do not want to find myself in a bad place.

I suppose the only way to remove a digital signature of any sort is to buy two of the same e-book by different people, diff them, and remove anything that differentiates them.

Is there any tool that does this or automates the process? am I being too paranoid, and this is not a real threat?

20
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]

I want something that is:

  • SSG (static site output)
  • looks nice
  • is a template I can use out of the box by just dropping in my content and configurations, rather than designing or building myself
  • is not feature-poor. I want it to have features like footnotes, jump-to-section links, citations, on-hover pop-ups for citations or footnotes, syntax highlighting for code blocks, etc.
  • nice to have: ability to draw basic graphs or diagrams (helps in technical explanations)
  • is not too difficult to customize by editing the code directly, Customizing the looks, structure, or adding functionality if I needed

Programming language doesn't matter much. I can use whatever. I do have a preference for functional languages.

Eleventy seems like a great framework to do this, but as I said I want a template that's ready out of the box not just a framework. The blogging template I found for eleventy does not look as nice as I hope.

36
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]

Suppose we have a large to-do task manager app with many features. Say we have an entity, which is the task, and it has certain fields like: title, description, deadline, sub-tasks, dependencies, etc. This entity is used in many parts of our codebase.

Suppose we decided to modify this entity, either by modifying, removing, or adding a field. We may have to change most if not all of the code that deals with this entity. How can we do this in a way that protects us from errors and makes maintenance easy?

Bear in mind, this is just an example. The entity may be something more low-key, such as a logged user event in analytics, or a backend API endpoint being used in the frontend, etc.

Potential Solutions

Searching

One way people do this already is by just searching the entity across the codebase. This is not scalable, and not always accurate. You may get a lot of false positives, and some parts of the code may use the entity without using it by name directly.

Importing

Defining the entity in one central place, and importing it everywhere it is used. This will create an error if a deleted field remains in use, but it will not help us when, say, adding a new field and making sure it is used properly everywhere the entity is being used

so what can be done to solve this? plus points if the approach is compatible with Functional Programming

Automated Tests and CICD

Tests can discover these types of issues with high accuracy and precision. The downside is... Well tests have to be written. This requires developers to be proactive, and writing and maintaining tests is non-trivial and needs expensive developer time. It is also quite easy and common to write bad tests that give false positives.

47
submitted 4 months ago by [email protected] to c/[email protected]

Hello friends,

Just about every guide that comes up on my Google search for "How to create certificate authority with OpenSSL" seems to be out-of-date. Particularly, they all guide me towards creating a certificate that gets rejected by the browser due to the "Common Name" field deprecation, and the requirement of "Subject Alternative Name" field.

Does someone know a tool that creates a Certificate Authority and signs certificates with that CA? A tool that follows modern standards, gets accepted by browsers and other common web tools. Preferably something based on OpenSSL.

If you know a guide that does this using OpenSSL, even better! But I have low hopes for this after going through dozens of guides all having the same issue I mentioned above.

Replies to Some Questions you Might Ask Me

Why not just correct those two fields you mention?

I want to make sure I am doing this right. I don't want to keep running into errors in the future. For example, I actually did try that, and npm CLI rejected my certs without a good explanation (through browser accepts it).

Why not Let's Encrypt?

This is for private services that are only accessible on a private network or VPN

If this is for LAN and VPN only services, why do you need TLS?

TLS still has benefits. Any device on the same network could still compromise the security of the communication without TLS. Examples: random webcam or accessory at your house, a Meta Quest VR headset, or even a compromised smartphone or computer.

Use small step CA (or other ACME tools)

I am not sure I want the added complexity of this. I only have 2 services requiring TLS now, and I don't believe I will need to scale that much. I will have setup a way to consume the ACME server. I am happier with just a tool that spits out the certificates and I manage them that way, instead of a whole service for managing certs.

If I am over estimating the difficulty for this, please correct me.

10
submitted 5 months ago by [email protected] to c/[email protected]

I've been enjoying learning ocaml, but I found it very easy to write code riddled with side effects and imperative-ness.

Take this example:

let some_func arg = 
  let input = format_input_from_stdin ()
  let read_content = read_file "some/file/path.txt"
  let to_write = get_write_file_content input read_content
  let () = write_file "some/other/path.txt" to_write 
  let output = run_external_command_with_output 
  (output, read_content)

As you can see, many side effects and imperative steps in the code. Is there a better practice for coding this in a functional manner?

90
submitted 5 months ago by [email protected] to c/[email protected]

I read a lot of answers online that its a bad idea, but the arguments did not make a lot of sense. "it's a heavily ingrained part of the eco system". Well if I can change it, what's the deal?

It makes more sense to make an interrupt signal be the harder shortcut, and copy to be ctrl+C, matching other programs and platforms.

20
submitted 5 months ago by [email protected] to c/[email protected]

I constantly hear about research into functional programming, and even real things coming out of them, like certain programming languages (idris).

Is there anything like this for frontend UI dev? It doesn't have to be FP related.

view more: ‹ prev next ›

matcha_addict

joined 1 year ago