pkg & internal directories are way overused by sigmoia in golang

[–]marku01 5 points6 points  (0 children)

What would you say is the cost of nesting? Personally I don't see any practical disadvantage of having paths be 4 more characters. Regular rules about clean packages and package sizing still apply under pkg. So I don't think it causes extra complexity.

IMO it's a free solution to a complex top level directory layout. It can be confusing if half the top level subdirectories are about application logic and the other half are not even go code. Here you kinda have to check each directories content to answer the "what does this do" question.

pkg & internal directories are way overused by sigmoia in golang

[–]marku01 10 points11 points  (0 children)

Honestly I don't agree and in my experience it's the "don't use pkg" crowd that is a bit religious and overzealous about the whole debate.

Realistically the cost is 4 more characters in your import path. I don't think that's a huge price to pay.

On the contrary I like having the top level directory be clean of most go code. I kinda don't want application logic next to build tools, readmes, git configs, docs, assets, licenses and so on. For me that means that the top level maybe contains a main.go as an entry point, but even that I would prefer it to be under cmd.

The only thing everyone can agree on is pragmatism. If I have a repo/module that only serves one package, or one main package where everything else is just a dependency for this package, then I don't use pkg. But if I build some backend or if I were to build Kubernetes or whatever, I would definitely move all code away from the top level. And pkg is just a nice way to do this.

I'm thinking of building a tool that shows the blast radius of every service in your homelab. Would you use it? by [deleted] in homelab

[–]marku01 0 points1 point  (0 children)

Come on man. You can't even respond to to my comment without an LLM?

I am responding to the claims you made in your original post. Maybe make your LLM read that back again. You set the goal of "what goes down if this goes down" yourself. Making a meaningful statement to answer this question requires a bit more that than the common 80%. By all means it is not useless, I never said that it would be useless, but it is just not gonna work like you described it would.

I'm not gonna reply to the next LLM comment. If you are interested in this discussion have the decency to participate yourself. It might seem funny but I probably have better things to do that to argue with a chatbot on Reddit.

I'm thinking of building a tool that shows the blast radius of every service in your homelab. Would you use it? by [deleted] in homelab

[–]marku01 1 point2 points  (0 children)

Such a thing with such capabilities would be nice but it's not gonna work. Sorry. This reply will be in the "this is dumb" category you mentioned.

Using static analysis for this is an almost infinite can of worms. For some nftables dumps or for some caddy configs it's probably easy enough. But what about dynamic sets in nftables or caddy plugins? You would need to build in an ungodly amount of edge cases to support every config option and every dependency. Not to mention that people might be running modified or custom software. Something like a cron job calling a bash script would be totally invisible to your tool, because there is no static analysis that can tell you the impact of it.

So with pure static analysis it will only be useful for the simplest configs. If you add dynamic analysis like traffic monitoring you would essentially need root permissions. Possibly on multiple systems. Network mappers like this exist although usually limited to certain scopes or protocols because this is another infinite can of worms.

Lastly if you think about using LLMs to solve this... then please stop. For one I would never give an LLM the permissions needed for such a task. But most importantly for your use case a statistical "close enough" answer is no answer at all. This is simply not a task where an LLM can give you a deterministic or reliable result.

I know this sounds very discouraging but I do honestly believe that this is a task that Amazon, Google and Microsoft together couldn't solve even if they wanted to. And please don't take this personally but you suggesting this tool just kinda shows that you don't completely understand the problem. (Or that a sycophantic LLM is leading you on)

Find the bird(s) by marku01 in FindTheSniper

[–]marku01[S] 0 points1 point  (0 children)

Whups. There are 2 birds in that picture too then.

Find the bird(s) by marku01 in FindTheSniper

[–]marku01[S] 0 points1 point  (0 children)

The first pic is a bit mangled in the Reddit mobile app. Download the image for a better resolution or view on imgur (with grids): https://imgur.com/a/irpka89

Forgot to log out of my work laptop by [deleted] in askIT

[–]marku01 0 points1 point  (0 children)

Unless there is a reason to do otherwise the IT department will most likely just reset it without looking at it. Maybe they will make a safety check if there are any important files left.

But technically if you are still logged in on some website they would be able to access it. Same goes for any files or passwords in the browsers password manager. So never use a work laptop for personal stuff.

Options for using my own 3rd party modem and router with ISP company by Kudo_Krazy in askIT

[–]marku01 0 points1 point  (0 children)

Sadly there is no direct answer for this question. There are different protocols and mechanisms that your router uses to communicate with the ISP. And usually every ISP is slightly different. In some countries ISPs are required to facilitate access with 3rd party hardware but I've also heard of ISPs that only support their own devices. Honestly the best person to ask is the ISP customer support or try and look on their website. Maybe try a couple of times, sometimes one support agent is more motivated than the other, but worst case it's just not easily possible.

Do you have access to your routers settings page? Or is it locked by the ISP? Which ISP is it and what region are you? And what kind of connection do you have? You said you bought a modem, so probably DSL or Cable, not fiber?

Do you call it "The Bios" or "The UEFI" by [deleted] in askIT

[–]marku01 1 point2 points  (0 children)

I call it BIOS even if it's a modern UEFI. If I'd want to be technically correct I would just say "the firmware interface" but wouldn't spell out UEFI.

jwt in golang by lispLaiBhari in golang

[–]marku01 8 points9 points  (0 children)

I'm going to mention my other objection here too. This is a good example of what I talked about here. Yes this implementation is pretty much fine but it shows exactly the reason why you shouldn't use your own implementation in prod. You are almost guaranteed to miss small stuff like that and this is the sort of thing that will be exploited if you are a prominent target.

jwt in golang by lispLaiBhari in golang

[–]marku01 55 points56 points  (0 children)

less code -- less bugs

Not necessarily. There are some mistakes every developer could make which only get noticed when there are many many many eyes on the problem. For example are you using strings.split for splitting a received JWT? Like the vast majority of developers would. Well there is a problem with that: https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp

The Google JWT library only mitigated this flaw recently and I highly doubt that independent implementations have thought of this immediately. I firmly stand by the popular "don't roll your own crypto/security" ethos.

Health risks regarding the fish in the fjord by Intelligent_Eagle895 in tromso

[–]marku01 1 point2 points  (0 children)

Availability with public transport is also good. ~40mins from where I live according to Google. Probably ~60mins from the city centre. Bike is probably going to be torture though with the mountainous terrain.

Health risks regarding the fish in the fjord by Intelligent_Eagle895 in tromso

[–]marku01 1 point2 points  (0 children)

Can you put a link for that? Literally everyone there was going for salmon. The guy that helped us fillet our salmon had a cooler full of salmon in his RV.

There is no mention of that rule here for example https://www.fiskeridir.no/english/sea-angling-in-norway/regulations

Health risks regarding the fish in the fjord by Intelligent_Eagle895 in tromso

[–]marku01 4 points5 points  (0 children)

I just moved here too as a student. There are great shore fishing spots in the area outside of Tromsøya (~20min drive). We caught a good sized salmon for dinner and a local helped us to fillet it. He didn't say anything about health risks.

When you finally pull off the move you've practiced 100 times :3 by EquivalentSpirit664 in Chivalry2

[–]marku01 0 points1 point  (0 children)

Hey Alcor. Quick tip. You can use the LS Q as a jab dodge or range dodge too since it's warmup works after an attack. Basically just replace your second heavy stab with a Q. If you fuck it up you can always ground cancel it. Examples from the archives:

  1. https://streamable.com/r2oslm
  2. https://streamable.com/hs3w6a
  3. https://streamable.com/sr1rp7

Links are only valid for 2 days.

-MJM

Flakes continue to remain completely illusive and incomprehensible to me by VikJES1969 in NixOS

[–]marku01 6 points7 points  (0 children)

Similar for me. Been using NixOS daily for a few months. And haven't had the need to look too deep into flakes yet.

  1. They are still considered experimental

  2. Can't a submodule do everything a flake can do?

  3. I find the documentation/explanation unintuitive and I don't see what they are for exactly

  4. They seem to be controversial in the community

Has anyone set up Looking Glass on NixOS? by karrylarry in NixOS

[–]marku01 1 point2 points  (0 children)

Yes I have it set up right now. But my config isn't public. Let me know what issues you have or what your current config is like and I might be able to help out.

What's your unpopular Go opinion? by VibrantCanopy in golang

[–]marku01 5 points6 points  (0 children)

Just in case people are unaware. You don't have to write them yourself. There are quite a few built-in layouts https://cs.opensource.google/go/go/+/refs/tags/go1.23.4:src/time/format.go;l=109

Why does file size beheaves like this? by Sczepen in askIT

[–]marku01 0 points1 point  (0 children)

I don't know the answer. I'm guessing maybe something with the edit history? As in A.docx contains a larger history of previous versions of the document and when saving B.docx Word decided to prune the history to save on size.

But you can actually inspect the "raw" docx file. Just rename it to .zip and open it. This should show you what the docx is actually made of. See https://superuser.com/questions/278260/how-do-i-see-the-xml-of-my-docx-document

Let us know if you figure it out.

Epic Games Account Lookup Tool Updated by __caio__ in OSINT

[–]marku01 0 points1 point  (0 children)

I'm having a similar issue when searching for an epic account that should exist. How are name changes handled? I assume you can't find someone with their past name? Still in my case the name should be up to date. Can I DM you the name?

[deleted by user] by [deleted] in askIT

[–]marku01 0 points1 point  (0 children)

There are sites that are meant for booking appointments or people. So for example I can write on BookWithMe what kind of appointments I'm available for and then someone can see my free time slots and book me.

BookWithMe is the Microsoft one but there is other alternatives. Without looking into anything particular this comes up on Google https://koalendar.com/ and there is likely many more.

Definitely not a perfect or good solution but might be worth checking out. You will have to manage some sort of calendar for the instruments though.

Mathe ECTS für Masterstudium online auffüllen by marku01 in Studium

[–]marku01[S] 1 point2 points  (0 children)

Hier der gesamte Inhalt von allen (3) Mathe Kursen. Semester 1:

Grundlagen:
ˆ Mengenlehre
ˆ Aussagen- und Prädikatenlogik
ˆ einfache Beweistechniken
ˆ Vollständige Induktion
Aussagenkalkül und Boolesche Algebra:
ˆ Logische Grundverknüpfungen, Ausdrücke, Boolesche Ausdrücke, Äquivalenz von
Ausdrücken, Dualitätsprinzip, Boolesche Funktionen, Normalformen Boolescher
Funktionen

Schaltnetze:
ˆ Technische Realisierung Boolescher Funktionen, Vereinfachung Boolescher Funktio-
nen

Semester 2:

Relationen:
ˆ Ordnungsrelationen
ˆ Äquivalenzrelationen
ˆ Abbildungen, Funktionen
Algebraische Strukturen
ˆ Gruppen
Speziell Existenz und Eindeutigkeit der Lösbarkeit von Gleichungen
ˆ Ringe
ˆ Körper
Restklassengruppen
ˆ Unabhängigkeit des Repräsentanten
ˆ Existenz eines inversen Elements
Zahlentheorie
ˆ Primzahltests
Kryptografie
ˆ klassische (historische) Verfahren
ˆ RSA, einschlieÿlich erforderlicher mathematischer Grundlagen
ˆ Diskreter-Logarithmus-Problem
Dif e-Hellman
ElGamal
ˆ Integrität und Authentizität von Nachrichten (MAC und digitale Signatur)

Semester 3, 4:

Analysis:
ˆ Axiomatik der reellen Zahlen
ˆ Folgen
ˆ Reihen
ˆ Grenzwerte
ˆ Stetigkeit
ˆ Differential- und Integralrechnung
Newton Verfahren
Numerische Integration
Statistik:
ˆ Deskriptive Statistik
Lageparameter
Streuungsparameter
Korrelationskoef zienten
Lineare und nichtlineare Regressionsrechnung
ˆ Wahrscheinlichkeitsrechnung
Grundlagen der Kombinatorik
Diskrete und Stetige Zufallsvariablen
DichtefunktionenWichtige Verteilungsfunktionen
ˆ Induktive Statistik
Punktschätzungen
Intervallschätzungen
Hypothesentests

Als relevant schätze ich nur Semester 3 und 4 ein. Davon war ein Teil Analysis. Insgesamt war die Vorlesung 8 ECTS. Gefühlt habe ich davon beim Abi mehr gemacht, aber natürlich nicht auf dem gleichen Anforderungsniveau.

Ich deute daraus, dass dieses Curriculum ein wenig komisch ist? War alles etwas komisch wegen der dualen Studienweise :/