moonpiedumplings

joined 2 years ago
[–] moonpiedumplings@programming.dev 1 points 43 minutes ago

go run works by compiling the program to a temporary executable and then executing that.

can you guarantee that runs everywhere

It seems to depend on glibc versions, if that's what you are asking. You can force it to be more static by using a static musl python or via other tools. Of course, a binary for Linux only runs on Linux and the same for Windows and Mac. But yeah.

Also it should be noted that go binaries that use C library dependencies are not truly standalone, often depending on glibc in similar ways. Of course, same as pyinstaller, you can use musl to make it more static.

[–] moonpiedumplings@programming.dev 1 points 2 hours ago* (last edited 2 hours ago) (2 children)

You can create static binaries that bundle the python interpreter and dependencies.

It's the onefile option in pyinstaller: https://pyinstaller.org/en/stable/usage.html#cmdoption-F

You can also do it with C. Or Csharp. Or many other programming languages. It's not a feature unique to Go, it's just that Go can only create static binaries.

 

Sample with fibonacci:

⍥◡+9∩1 is the fibonacci in this language

oh I have tested this game somewhat, although I've never actually played it. It is very impressive.

What about a static site generator? Plaintext, markdown, but renders to html with headings and whatnot. Version control is because it's in git.

Read access control is difficult though. You could do some hacks like using encrypting files in the git repo (perhaps with SOPS), and then either using http basic auth to control access to specific pages or something like staticrypt. But these are not ideal solutions.

 

Here are some cool examples I was looking at:

https://github.com/zardoy/minecraft-web-client — Minecraft in your browser, complete with connections to servers.

https://github.com/inolen/quakejs — quake 3 in your browser, has multiplayer as well.

Any other good examples? or good lists?

[–] moonpiedumplings@programming.dev 1 points 4 days ago* (last edited 4 days ago)
  1. Bluetooth probably won't be able to give you good quality audio and mic input at the same time. It doesn't have enough bandwidth over a single channel, last time I tried. Of course that was probably like 5 years ago and things might've changed, like a theoretical workaround I thought about is the headset simply having two bluetooth reveivers and connecting twice. But yeah.

Edit: I suspect jgrffn's comment in the thread refutes the above. I might test later.

  1. Most of the proprietary wireless 2.4 ghz usb adapters I have tried have worked fine and better than bluetooth since they can do good audio and mic at low latencies. I have used logitech and corsair but my logitechs died on me (one I bought had the left side die and the other the right side :/) and the corsair earmuffs fell apart after I made the mistake of not being perfectly dry once. So I can't really recommend my most used headsets.
[–] moonpiedumplings@programming.dev 8 points 4 days ago* (last edited 4 days ago) (1 children)

I won't lie, I use curl | bash as well, but I do dislike it for two reasons:

Firstly, it is much, much easier to compromise the website hosting than the binary itself, usually. Distributed binaries are usually signed by multiple keys from multiple servers, resulting in them being highly resistant to tampering. Reproducible builds (two users compiling a program get the same output) make it trivial to detect tampering as well.

On the other hand, websites hosting infrastructure is generally nowhere near as secure. It's typically one or two VPS's, and there is no signature or verification that the content is "official". So even if I'm not tampering with the binary, I can still tamper with the bash script to add extra goodies to it.

On the other hand (but not really relevant to what OP is talking about), just because I trust someone to give me a binary in a mature programming language they have experience writing in, doesn't mean I trust them to give me a script in a language known for footguns. A steam bug in their bash script once deleted a user's home directory. There have also been issues with AUR packages, which are basically bash scripts, breaking people's systems as well. When it comes to user/community created scripts, I mostly trust them to not be malicious, and I am more fearful of a bug or mistake screwing things up. But at the same time, I have little confidence in my ability to spot these bugs.

Generally, I only make an exception for running bash installers if the program being installed is a "platform" that I can use to install more software. K3s (Kubernetes distro), or the Nix package manager are examples. If I can install something via Nix or Docker then it's going to be installed via there and not installed via curl | bash. Not every developer under the sun should be given the privilege of running a bash script on my system.

As a sidenote, docker doesn't recommend their install script anymore. All the instructions have been removed from the website, and they recommend adding their own repo's instead. Personally, I prefer to get it from the distro's repositories, as usually that's the simplest and fastest way to install docker nowadays.

[–] moonpiedumplings@programming.dev 1 points 1 week ago* (last edited 1 week ago)

Unfortunately deleted means deleted. Data gone.

My recommendation is to use it as a reverse proxy to expose services but ultimately host from another device.

It's 1 gb of ram anyway (the free 24 gb of ram arm vps' are scarce and hard to get).

Another tip is that they monitor cpu and ram and are more likely to delete it if is idling. There exist programs on github that do nothing but waste cpu in order to try to keep the oracle vps up.

[–] moonpiedumplings@programming.dev 3 points 1 week ago (2 children)

Openebs mayastor

But you could fit ceph on that I think. As long as your network between nodes is fast enough.

[–] moonpiedumplings@programming.dev 6 points 1 week ago (2 children)

They like to randomly delete them. It happened to me and a friend.

[–] moonpiedumplings@programming.dev 6 points 1 week ago* (last edited 1 week ago) (1 children)
  1. Use networkmanager. Other alternatives technically work but I have has seen many people struggle with alternatives, they are not as smooth.

  2. Follow the instructions for connecting on android devices. The options will be named the same.

 

cross-posted from: https://programming.dev/post/45725210

I noticed in a fairly recent version of KDE, my computer would pretend to be a bluetooth sink when connected to devices like my phone.

This is a really cool feature, and I really like it, because it lets me stream audio from my phone to my computer with no fuss.

However, there is an annoying glitch where the stream stops all of a sudden. The phone keeps playing the music, but I can't hear anything. I've noticed that this seems to have something to do with CPU usage, like when I switch windows rapidly or do something that requires CPU the bluetooth process is dropped. The only reliable way to fix it is to disconnect and reconnect, or wait a minute, and then it works again. Is there any way to fix this more persistently?

I am using CachyOS + KDE right now.

 

I noticed in a fairly recent version of KDE, my computer would pretend to be a bluetooth sink when connected to devices like my phone.

This is a really cool feature, and I really like it, because it lets me stream audio from my phone to my computer with no fuss.

However, there is an annoying glitch where the stream stops all of a sudden. The phone keeps playing the music, but I can't hear anything. I've noticed that this seems to have something to do with CPU usage, like when I switch windows rapidly or do something that requires CPU the bluetooth process is dropped. The only reliable way to fix it is to disconnect and reconnect, or wait a minute, and then it works again. Is there any way to fix this more persistently?

I am using CachyOS + KDE right now.

[–] moonpiedumplings@programming.dev 34 points 2 weeks ago* (last edited 2 weeks ago)

It's easy. Mumble. Or the thing you used probably still works.

But you see, people never actually seek a discord alternative. They want a discord alternative that includes all the features in one app that is also federated, AND end to end encrypted, and each one makes things vastly more technically challenging and resource intensive and then you want them together.

A little secret: Matrix is much, much easier to host if you disable encryption and federation. Federation to many servers is the main performance killer, and "failed to decrypt message" will all disappear if you disable encryption.

 

0patch provides "micropatches", that replace running windows code in place, fixing security issues rapidly without requiring an update/reboot.

I really want something like them for an upcoming cybersecurity competition, specifcally patches for the zerologin and eternalblue vulnerabilities.

Unfortunately, 0patch does want a credit card for the free trial, which makes it unfeasible for us to use.

Any alternatives?

 

Has anyone tried this? It's discord reverse engineered.

 

Inspired by this comment.

I'm curious.

 

Tldr we want a static website that will last a long time and also look pretty nice.

Right now, we have a wordpress website. It looks very nice. It also have 4 extensions that aren't configured to auto update. Also whenever I try to make changes to the website they don't apply because the website was configured via the extensions and I hate it.

I want a static site of some kind. It's simple to self host or host anywhere, and it's also simple to secure and keep maintained for a long time.

I am currently looking at static site generators, like quarto, or docusaurus

However, they are difficult to theme to the "niceness" that I want, and their nature results in these somewhat fixed output formats. Like, it is somewhat difficult and annoying to put images anywhere I want them and etc.

Is there like a fixed WYSIWYG html editor? Something between designing a website from scratch and a static site generator. Or is there a way to finagle static site generators to be more flexible than blogs or documentation sites?

 

I hate all three. I understand some of the decisions but other ones are frustrating.

Let me explain what I used to do. What I used to do, is take advantage of the fact that firefox profiles are completely separate instances of firefox, each with their own settings and extensions. I would run my personal profile with highly aggressive and experimental settings, because I was ok with it crashing if it meant I learned interesting things. On the other hand, the profiles related to schoolwork and other more important tasks would be defaults, so they would be much more stable. I no longer consider this a necessary feature, but it was fun to play with.

The other big reason why I relied on the old profiles, is because they have separate cookies and whatnot, which is useful for when I want to have an account for each profile. Although Google happily lets you sign into multiple accounts from the same browser, Microsoft, Discord, and many other apps do not, and force you to sign out before signing in again.

But this is painful. Things never open in the profile I want them to by default, which is annoying. In theory, and I am considering doing this, the way to fix it is by creating app menu shortcuts for each profile, and then having them be the apps I select whenever I want to open a website link or file (with no default profile/app set, so I just select every time).

In addition to that, each profile had to have it's own mozilla account for syncing, which was annoying.

Containers seemed like a nice in between. I could use a single mozilla account for sync, but have seperate microsoft or other accounts on the same browser instance.

Except nope, they actually suck and don't work like that. I can't decide a window is dedicated to a container, so all tabs from xyz site will open in that container and give me that account. It constantly prompts me and it's painful and the UX for what I'm trying to do is miserable.

Containers seem designed more for isolating cookies between two different sites, rather than hiding instances of sites from themselves. Like the original version was a "facebook container", which would hide the facebook cookies from other sites, but I don't want that. I want to be able to log into multiple facebook accounts (hypothetically, I don't actually have a single facebook account but you get the idea).

The new profiles, if you've heard of them, somehow manage to combine the worst of both worlds. Firstly they are an entirely separate system and can't be managed by the second profile system. But they exist within a single one of the old profiles, meaning I can't do tricks with desktop shortcuts to make apps open in one profile or the other. But at the same time, despite existing within one profile, they each require seperate Mozilla accounts for sync.

I am very frustrated, but als resetting up my system so I am considering what to do. I am probably going to continue with profiles, but add app menu shortcuts for them.

Any better ideas?

27
Core War - Wikipedia (en.wikipedia.org)
submitted 2 months ago* (last edited 2 months ago) by moonpiedumplings@programming.dev to c/wikipedia@lemmy.world
 

Core war is a programming combat game, where players make MIPS-like assembly programs to fight eachother for control over a virtual system.

10
submitted 7 months ago* (last edited 7 months ago) by moonpiedumplings@programming.dev to c/emulation@lemmy.world
 

Firstly, I would like to begin with the way Duckstation was relicensed from GPL to CC-by-NonCommercial-Noderivatives (non-foss license).

I've seen a lot of people incorrectly claiming that this violates the GPL, but the way the duckstation developer did this was not a violation of the GPL. The duckstation developer gained prior contributors approval, and/or rewrote all GPL code for which they didn't.

source: https://www.gamingonlinux.com/2024/09/playstation-1-emulator-duckstation-changes-license-for-no-commercial-use-and-no-derivatives/

I have the approval of prior contributors, and if I did somehow miss you, then please advise me so I can rewrite that code. I didn't spend several weekends rewriting various parts for no reason. I do not have, nor want a CLA, because I do not agree with taking away contributor's copyright.

It should be noted that the version the AUR package uses is the older, still GPL version of the program. There is a git version which uses the latest, and it seems to be okay, but I should note that part of the packaging process on many distros, is essentially forking the software and making a derivative — something incompatible with CC ND.

I have been following this drama for a while, specifically on the r/emulationonandroid reddit community, and there is even more context to be had.

Now, about the dropping of Linux support. The problem, goes a lot deeper than "Arch users annoying".

Firstly, I want to state that there is a running, widely believed theory that Stenzek, the developer of the AetherSX2 android emulator, Talred, are the same person. You see this manifest in comments/posts like this one, but it's all over the sub. (This comment states that Stenzek was never really harassed and I disagree, I will get to that later/)

The problem is that this developer has a pattern of insisting on having a discord community, but being unwilling/unable to moderate it properly, or appoint other/enough moderators to act as a shield between them in the community members.

Arch users are what is being complained about, but the android emulation community has some pretty bad members, due to the high prevalence of children. So they would go on the discord, troll, harass, and be annoying. For example, this instance here.

It culminated with a final update that added ads and decreased performance: https://www.reddit.com/r/EmulationOnAndroid/comments/11q726j/do_not_update_aethersx2_on_google_play_i_repeat/

Now, I do not condone harassment, and I think that the members of the community who are acting in bad faith are ultimately in the wrong here. But at the same time, you are not obligated to have a discord for your software project.

In my opinion, the real problem here is the flawed idea that every software needs to have a "community". I have watched around 3-4 projects die due to harassment on discord (not all of them related to emulation), and it's clear that moderating a community actually takes work that not everybody is willing/able to give, especially if you are interacting with children. And the r/emulationonandroid software is particularly forgetful about this, as they just repeat these patterns over and over again and it drives me nuts.

I'm currently watching the latest android switch emulator use a discord server for communications and do their releases on Github —after the previous iteration's discord server owner locked down the discord server (a lot of blame is placed on powertripping mods but this is the kinda thing that happens when people get fed up with dealing with children tbh). And before that, the Nintendo DMCA fiasco happened. But don't worry, I'm sure the latest switch emulators combination of discord + github will go well and nothing bad will happen at all.

In addition to that, right now I am in 100 discord servers (they don't let you join more without Nitro), because people treat discord as an issue tracker and distribution hub for their small software projects and it drives me nuts.

I would prefer small software projects to not create a community, and instead integrate into existing communities that already have established moderators, so that they protected from harassment and children being annoying.

view more: next ›