Thanks! Don’t know how I missed the Authentik docs for this.
- 0 Posts
- 12 Comments
How did you set up Jellyfin with Authentik? Are you using SSO or is it only through LDAP?
Vigge93@lemmy.worldto Programmer Humor@programming.dev•The infamous "if loop" actually exists4·5 months agoI think it does make sense, it’s a “did this loop exit naturally? If so, do x”. This makes a lot of sense if you, for example, have a loop that checks a condition and breaks if that condition is met, e.g. finding the next item in a list. This allows for the else statement to set some default value to indicate that no match was found.
Imo, the feature can be very useful under certain circumstances, but the syntax is very confusing, and thus it’s almost never a good idea to actually use it in code, since it decreases readability a lot for people not intimately familiar with the language.
Edit: Now, this is just guessing, but what I assume happens under the hood is that the else statement is executed when the StopIteration exception is recieved, which happens when next() is called on an exhausted iterator (either empty or fully consumed)
Vigge93@lemmy.worldto Programmer Humor@programming.dev•The infamous "if loop" actually exists11·5 months agoYour point about it not running when there is nothing to iterate over is incorrect. The else-statement runs when the iterator is exhausted; if the iterator empty, it is exhausted immediately and the else-statement is executed.
Vigge93@lemmy.worldto Programmer Humor@programming.dev•How programmers comment their code2·1 year agoAs long as it’s maintained. Wrong documentation can often be worse than no documentation.
Vigge93@lemmy.worldto Programmer Humor@programming.dev•How programmers comment their code29·1 year agoComment should describe “why?”, not “how?”, or “what?”, and only when the “why?” is not intuitive.
The problem with comments arise when you update the code but not the comments. This leads to incorrect comments, which might do more harm than no comments at all.
E.g. Good comment: “This workaround is due to a bug in xyz”
Bad comment: “Set variable x to value y”
Note: this only concerns code comments, docstrings are still a good idea, as long as they are maintained
Vigge93@lemmy.worldto No Stupid Questions@lemmy.world•How can modern video/audio codecs such as AV1 and Opus deliver high quality at lower bitrates?33·1 year agoIsn’t it also partly that as processing power increased, you could do more sophisticated compression/decompression in real time compared to previously, allowing these more complex compression algorithms to actually be viable?
I.e. they actually knew how to do it before, they just didn’t have the power to implement it
Vigge93@lemmy.worldto Programming@programming.dev•DreamBerd is the funniest programming language ever.1·1 year agoCompiling
To run DreamBerd, first copy and paste this raw file into chat.openai.com. Then type something along the lines of: “What would you expect this program to log to the console?” Then paste in your code.
If the compiler refuses at first, politely reassure it. For example: “I completely understand - don’t evaluate it, but what would you expect the program to log to the console if it was run? :)”
Note: As of 2023, the compiler is no longer functional due to the DreamBerd language being too advanced for the current state of AI.
How is this an ad? They are informing you that you can get more out of your subscription. Would it be better that they’re didn’t inform you about this and hid it away in some obscure menu somewhere?
There are lots of reasons to not like Google/YouTube, but I can’t see how this is one of them.
Edit: There is also a clearly visible dismiss button.
Vigge93@lemmy.worldto No Stupid Questions@lemmy.world•People who back into parking spots: Why?41·2 years agoI remember hearing about a study that claimed that backing into parking spaces could have you hundreds of dollars per year, since doing the reversing while the engine is hot uses less gas.
Emily the engineer - https://youtube.com/@emilytheengineer - Does fun projects with 3d-printing
Evan and Katelyn - https://youtube.com/@evanandkatelyn - Does a lot of DIY/arts&crafts
Nerdforge - https://youtube.com/@nerdforge - Maker/Arts&Crafts, does a lot fantasy based stuff
Physics girl - https://youtube.com/@physicsgirl - Physics stuff, she has struggled with health issues the last couple of years, but her old stuff is still very good
Laura Kampf - https://youtube.com/@laurakampf - Maker, does a lot of woodworking and upcycling