Trollface

forgejo: https://forgejo.asudox.dev/Asudox
matrix: https://matrix.to/#/@asudox:matrix.org

aspe:keyoxide.org:D63IYCGSU4XXB5JSCBBHXXFEHQ

  • 9 Posts
  • 72 Comments
Joined 1Y ago
cake
Cake day: Jun 25, 2023

help-circle
rss

I still think Briar and SimpleX are the best ones for both privacy and anonymity.




These are pretty good as an overview tbh. I like it when teachers have a sense of humour at least.


Apparently it’s so that it is easier for more people to contribute because java is known by more people than rust. The sublinks dev is also promising better mod tools. The LW team said something about also helping to develop it and eventually use it as the backend.



Bidirectional.

It probably will only federate:

  • Communities that are created
  • Posts that are created
  • Comments that are created
  • Deletion of posts, users and comments
  • Modlog for the action mentioned above




Runtime errors are rare? Interesting. I guess it depends on how much error handling the dev additionally wants to do.


Is Java really that fun? I really hate boilerplate languages.


Runtime errors are still a thing.



The webserver performance is not my main concern. It’s the speed of the algorithm.


The most I read and hear is “you’re a hacker”. And I get labeled as the computer nerd alot in school.


I guess benchmarking seems to be the most reliable answer to my question.


Should I use Rust and Go together or just Go?
So I want to make a new project. It will have a website and an algorithm which will handle the requests. The thing is, web development in Rust feels harder than say in Go or Python. So I thought maybe I could somehow make bindings in Rust for Go since the faster the algorithm is, the better. However, that seems to complicate stuff as well. So do you think I should just rewrite the current algorithm in Go? Is it fast enough for it to not be a noticeable difference? Edit: Thanks for the suggestions and advice! I decided to go with Rust for the website with Axum and the algorithm as well.
fedilink





I recently picked up Rust, still a beginner, but it’s very nice. And the compiler errors and tips are top. Since I used only Python before, Rust is my first compiled language and I’m glad it was Rust. Options and Result’s are also something I appreciate tbh. Other than for AI, simple stuff and maybe prototypes, I would use Rust over Python. Definitely recommend it. The borrow checker is a pain in the ass though. I’ll also be using it later for embedded systems when I become more fluent with it. I am also currently making a big project with Rust that I haven’t been able to do with Python.




Haskellers Haskell their way through Haskell. Simple.



It says it’s a library for e-books. Visual Novels aren’t books.



Copypasta:

Does a tree make a cracking sound in the forest if nobody’s around to hear it? Well, depending on the circumstances, the answer could be yes, no, or both. According to classical mechanics, the answer is definitely yes.

Classical mechanics, a physics subfield, studies the motion of large objects like planets and galaxies. Determinism and reversibility are central to our comprehension of the physical world; they allow us to predict future object behavior based on initial conditions and the laws of nature, suggesting we can trace motion history back to its initial state.

In classical mechanics, sound is described as a pressure wave propagating through a medium like air or water. When an object, such as a tree, is subjected to an external force, it may crack, causing a rapid release of energy transferred to surrounding air molecules, creating pressure waves or sound waves that travel until reaching a listener’s ear.

Sound waves cause the eardrum to vibrate, creating an electrical signal transmitted to the brain, resulting in the perception of sound. Thus, according to classical mechanics, the cracking sound by the tree is an objective physical phenomenon, occurring regardless of observation.

However, quantum mechanics introduces uncertainty. In this realm, particles exist in multiple states simultaneously, as seen in Schrödinger’s Cat. The presence or absence of the sound of a cracking tree is uncertain until observed, known as superposition.

In quantum mechanics, a particle is in superposition until observed, lacking a definite property. Observation causes the wave function to collapse, fixing properties. Thus, whether a tree makes a sound in the forest without an observer remains unclear until the particle is observed.

Observation’s impact extends to sound waves’ particle components, affecting their behavior. While the sound itself is objective, the act of observation can influence the experience of that sound.

In conclusion, the question of whether a tree makes a sound if no one hears it is straightforward in classical mechanics but introduces uncertainty in quantum mechanics. The Schrödinger’s Cat paradox exemplifies the complexities, challenging our understanding of reality as we continue to explore fundamental principles in our evolving understanding of the universe.


I find “I don’t care about cookies” pretty useful. It works with almost every cookie consent popup I’ve encountered. It automatically selects all the available settings in the popup which give the less consent to the website. So basically a automatic do not consent button presser.



Thank, those are very helpful. Immediately found Aiyoku no eustia which I searched for so long.



Where can I find translated Visual Novels?
I am specifically looking for Aiyoku no Eustia and Umineko: When They Cry
fedilink

0, 1, 2, 3, 5, 8, 13, 21, etc.


My first discord bot written in discord.py. It had over 800 lines of code. I wrote it all in one main.py and hence the organization wasn’t great. I also wasn’t very good in Python at the time so I am now rewriting it with cogs and better practices.


Thanks. It seems interesting and useful.


Yeah I know that. I wrote that just as an attempt to show how it looks like. I won’t document a print statement in my code.


How to properly document code?
I just recently started documenting my code as it helped me. Though I feel like my documentations are a bit too verbose and probably unneeded on obvious parts of my code. So I started commenting above a few lines of code and explain it in a short sentence what I do or why I do that, then leave a space under it for the next line so it is easier to read. What do you think about this? Edit: real code example from one of my projects: ``` async def discord_login_callback(request: HttpRequest) -> HttpResponseRedirect: async def exchange_oauth2_code(code: str) -> str | None: data = { 'grant_type': 'authorization_code', 'code': code, 'redirect_uri': OAUTH2_REDIRECT_URI } headers = { 'Content-Type': 'application/x-www-form-urlencoded' } async with httpx.AsyncClient() as client: # get user's access and refresh tokens response = await client.post(f"{BASE_API_URI}/oauth2/token", data=data, headers=headers, auth=(CLIENT_ID, CLIENT_SECRET)) if response.status_code == 200: access_token, refresh_token = response.json()["access_token"], response.json()["refresh_token"] # get user data via discord's api user_data = await client.get(f"{BASE_API_URI}/users/@me", headers={"Authorization": f"Bearer {access_token}"}) user_data = user_data.json() user_data.update({"access_token": access_token, "refresh_token": refresh_token}) # add tokens to user_data return user_data, None else: # if any error occurs, return error context context = generate_error_dictionary("An error occurred while trying to get user's access and refresh tokens", f"Response Status: {response.status_code}\nError: {response.content}") return None, context code = request.GET.get("code") user, context = await exchange_oauth2_code(code) # login if user's discord user data is returned if user: discord_user = await aauthenticate(request, user=user) await alogin(request, user=discord_user, backend="index.auth.DiscordAuthenticationBackend") return redirect("index") else: return render(request, "index/errorPage.html", context) ```
fedilink

I don’t see the need for an if block or renaming the function and leaving it there. It is extra unnecessary work for the compiler. Comments are probably the best way. Might also copy the current file, put the original in some folder like “old”, and delete the old code inside the new copy.





[question] Which ML library should I learn in Python?
So I wanted to get into ML using Python recently and I was wondering about which ML library I should learn as a ML beginner first. I've been using Python for a few years now.
fedilink

[help] Should I use Django for a small website?
I basically want to make a small personal website that probably won't get any attention. It will also be somewhat simple. Is Django overkill and I should use Flask or something else or is it okay? I tried learning JS and using ExpressJS but JS overall feels very loosely typed and I don't like it. I've been using Python for over 3 years now.
fedilink

NodeJS vs Go
I want to learn another programming language now that I've been using Python for over 2 years now. I am kind of leaning on learning JS so that I can use it for the backend and also for the frontend. But the syntax is kind of weird. I heard Go is pretty good for the backend and also is compiled. What do y'all say? I also welcome other language recommendations.
fedilink

Caddy with Cloudflare DNS fails to solve acme challenge
Hello, I am a pretty new beginner to website stuff and was trying to get my personal website to run on my VPS. The website's DNS is Cloudflare and I am trying to get it to work using Caddy. I've been trying to get past the acme challenge solving thing, but always get this error message: ``` ERROR tls.obtain could not get certificate from issuer {"identifier": "asudox.dev", "issuer": "acme-v02.api.letsencrypt.org-directory", "error": "[asudox.dev] solving challenges: waiting for solver certmagic.solverWrapper to be ready: timed out waiting for record to fully propagate; verify DNS provider configuration is correct - last error: <nil> (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/111399894/9853568284) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)"} ``` As much as I've seen from the Cloudflare dashboard, the acme challenge record gets created. What is the problem? I also tried to change the resolver to Cloudflare's as it is a troubleshooting step in the Cloudflare Caddy module github page, but that also did not work. Here's the Caddyfile: ``` asudox.dev { respond "Test" tls { dns cloudflare {env.CF_API_TOKEN} } } ```
fedilink

Which web server software do you recommend?
I want to host my website in my raspberry pi, I've read that I would need a web server software for this. Which one do you recommend? It won't be a complex website.
fedilink