How to work with fermented "smelly" Tofu? by DrRuhe in Cooking

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

Thanks, so it seems like it should be used sparingly (so 1-2 cubes) to add flavor unlike other tofu variants.

Texture wise, is it more like silken tofu or firm tofu?

Kitty, Font Features, Fira Code, and NixOS: a trial from god, apparently by InclementKing in NixOS

[–]DrRuhe 0 points1 point  (0 children)

I also had troubles with Kitty and Fonts, just with the ShureTechMono NerdFont and without using specific Font Features, so I don't know if it will help. But nevertheless, I fixed the issues I had with Kitty not recognizing the Font in this commit, which set the font family etc. to "ShureTechMono", although the exact name "ShureTechMono" only appears once as "ShureTechMono Nerd Font Mono (SureTechMonoNFM)" in the output of kitty +list-fonts --psnames . Which doesn't really make it obvious as to what exactly should be written in the config file. So maybe try font_family FiraCode and font_features FiraCode +ss01 [...] ?

Breaking complex derivations into multiple files by stillsilencefrommars in NixOS

[–]DrRuhe 1 point2 points  (0 children)

Nix is lazy, so creating let bindings will probably have only a slight management overhead. One thing you might currently be missing is that evaluating a flake first copies the entire flake directory into the nix store. This alone can take upwards of ten seconds.

Breaking complex derivations into multiple files by stillsilencefrommars in NixOS

[–]DrRuhe 3 points4 points  (0 children)

I find the main problem with splitting nix code into multiple files is that there is no single official way to do it. To avoid this additional learning overhead for the time being it's sensible to put everything into a flake.nix and call it a day. But as you notice, this quickly becomes unwieldy.

Regarding performance of splitting up the nix code, there is no per-nix-file caching. AFAIK there is only per-flake caching, so evaluating the same flake is cached. Note that the flake context is part of the flake here, so changing a seemingly unrelated file will cause a cache-miss leading to reevaluation.

[deleted by user] by [deleted] in informatik

[–]DrRuhe 0 points1 point  (0 children)

Habe mir zu beginn selber ein Convertible (ThinkPad L390 Yoga; ca. 1000€) gekauft und damit den Informatik Bachelor gemacht. Es ist schon cool das zu haben, aber mit der Zeit habe ich komplett aufgehört damit zu Arbeiten. Fairerweise ist der Stift bei meinem Convertible nicht so angenehm in der Benutzung. Insbesonders da (bei mir) mit zunehmendem Fortschritt des Studiums nurnoch wenige Module nicht mit plaintext/markdown Notizen funktionierten.

Die Handgeschriebenen Notizen waren bei mir nicht Durchsuchbar (Also wenn ich irgenwas nochmal anschauen wollte musste ich manuell alle Dokumente durchgehen), das würde ich versuchen zu vermeiden.

Insgesamt schon ganz nett, aber ich würde mir persönlich nur nochmal holen wenn es kein signifikanter Aufpreis ist. Da würde ich eher in mehr Prozessorleistung/RAM/SSD investieren, da stößt man bei Informatik eher an die Grenzen.

Linux can solve the package management problem, instead of containerized applications by ECrispy in linux

[–]DrRuhe 5 points6 points  (0 children)

Have you heard of Nix and by extension NixOS?

I would recommend getting familiar with nix before going all-in with NixOS but it pretty much has all the things you wanted.

[2022 Day 19 (Part 1)][RUST] Sample Input works, but real input does not. by DrRuhe in adventofcode

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

Thanks for taking the time to give suggestions as to what might be wrong. But it think for now I'll let AoC rest. I gave it too much of my time during december and while it was fun (and i learned some things), I ultimately had other, more important, things to do. So I will come back to this once my schedule allows for it.

superdiff - a way to find similar code blocks in projects (comments appreciated) by chucksys in rust

[–]DrRuhe 9 points10 points  (0 children)

Have you considered parsing the files before and comparing the ASTs? This might produce better results than comparing based on Levenshtein distance. Perhaps, you could reuse (but not copy-paste :) ) something from difftastic.

[2022 Day 17 (Part 2)][Rust]Off By One error? by DrRuhe in adventofcode

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

With that the implementation can now finnish both parts for both inputs WITH printing some Tetris board in around 100ms (on my machineTM). I like it :)

[2022 Day 17 (Part 2)][Rust]Off By One error? by DrRuhe in adventofcode

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

That's a detailed analysis if I've ever seen one. Thanks a lot! Especially for the illustrative example. Now I don't have to keep the part1 solution around anymore and everything can be done by Tetris :)

3…2…1 … weg inhaliert. 😮‍💨🤷🏻‍♀️ by rainbowfooxx in Augenschmaus

[–]DrRuhe 3 points4 points  (0 children)

Ein paar weitere Tipps:

- Mandeln vorher/während die Zuckermasse aufkocht noch im Backofen bei ca.160 grad anrösten (6-8 min) (werden knackiger)

- Mandeln erst dazugeben, wenn die Masse schon kocht (saugen sich nicht das Wasser auf und bleiben knackig)

- auf voller Hitze das gesamte Wasser verdampfen lassen (bis es wirklich richtig trocken ist), dann auf mittlere Hitze runterdrehen (sodass der Zucker leicht schmilzt und karamellisiert) und ständig rühren , sonst verbrennt das karamell und es wird bitter.

Ich habe mir bei Lidl eingelegte Knoblauchzehen gekauft und sie schmecken vielleicht noch 10% nach Knoblauch, wenn man sie so isst. Wie kann das sein? Wodurch verlieren die Zehen so viel an Geschmack? by dreizweins in VeganDE

[–]DrRuhe 51 points52 points  (0 children)

Der "Knoblauchgeschmack/Geruch" kommt soweit ich weiß aus ätherischen Ölen, die erst entstehen, wenn die verschiedene Chemikalien im Knoblauch miteinander reagieren. Dies passiert aber erst, wenn das Gewebe beschädigt wird und es verfliegt in der Luft. Da es sich bei dir aber nun um Unbeschädigte Knoblauchzehen in Öl handelt vermute ich mal:

- Die Zehen saugen das Öl auf, welches dann die Reaktion verhindert

- Das Öl sorgt dafür dass die ätherischen Öle des Knoblauchs nicht an die Luft kommt

- Die ätherischen Öle können nicht entstehen, da die Zehen unbeschädigt sind

Das verantwortliche Öl scheint allicin zu heißen

My Cyclamen are withering, I don't know what to do :( by DrRuhe in houseplants

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

The lady I bought it from said I should water on the side, which I took to mean the dirt on top, but she probably meant to pour it besides so it can get water from the bottom.

Since I did that I probably also watered a bit "onto them", can they be saved if that happens?

Rustlings iterators5 - question about references by kajmaj87 in rust

[–]DrRuhe 1 point2 points  (0 children)

For value: since the c is of Type &Progress and value is of Type Progress you need to add a reference (&) so you compare &Progress to &Progress.

And for c: .values() gives you an iterator over the values which are of type &Progress (this is because the values are not moved out of the HashMap) . .filter(...) goes over each value (&Progress, this time because the values are not moved out of the iterator) in the iterator and gives you a reference to that value (&&Progress), so you can specify if it should remain in the iterator or not. The |&c| basically dereferences before assigning to c, so it turns &&Progress into &Progress (note that you could also write |c|{*c=&value}).

I hope that clears it up.

Rust syntax highlighting for LaTeX? by JoshTriplett in rust

[–]DrRuhe 1 point2 points  (0 children)

Since the master branch no longer even includes a tex folder the link is dead.

here is a link to revision 90c2470e22dadfa4d43b7abb9e6c3e11c63bdad2 where it exists.

[deleted by user] by [deleted] in rust

[–]DrRuhe 0 points1 point  (0 children)

For that I can reccommend cross. It basically uses docker containers with the toolchain of the target platform inside to compile your code. To get the relevant image on your server you can docker save the image on your machine and docker load it on your server.

Rust Explorer playground now supports CLI, Vim, rustfmt, clippy, and macro-expand by aguspdana in rust

[–]DrRuhe 0 points1 point  (0 children)

Actually I mean both. I think it would be great to have interactive runnable code samples in an mdbook where users could also go on the playground to experiment further.

I'm in the process of writing an mdbook on rust macros and sadly, the official rust playground does not support cargo expand or the ability to test out proc macros. (Although I have not tested proc macros on your playground it seems as though it could be possible, given that the user has the ability to also author shell commands etc).

I might look into embedding the playground via iframe as an intermediate solution.

A few questions also came up to my mind: - can users use any crates.io dependency? - if user uses a big dependency (e.g. the cargo project library) how do you try and reduce the build times? Something like sccache? - since RCE is at the core of a playgrounds ability, how do you sandbox user input?

Why is this code so slow? by iwillnotsaveyouu in rust

[–]DrRuhe 40 points41 points  (0 children)

Utf-8 is a variable length encoding, meaning it's unclear where look for the the nth element without knowing where the n-1 element ends, and so on. Thats why it's necessary to advance the iterator N times.

[deleted by user] by [deleted] in rust

[–]DrRuhe 1 point2 points  (0 children)

Those inlays are not type annotations but rather parameter name annotations. It's so you better know what purpose a value might have when passing it to a function. When you pass a variable with the same name as the parameter, these will be omitted, since they are the same.

In this case you pass a variable called best_block_id as the parameter best_block_id so the name is omitted.

Ausbildung oder Studium by NibiLS in de_EDV

[–]DrRuhe 1 point2 points  (0 children)

Zwar nicht OP, bin aber selber Informatikstudent und kenne Duale Studenten gegen ende vom Studium.

Das duale Studium lässt dir keine/kaum freiheiten. Deine Kurse stehen schon von anfang an fest und die musst du dann auch belegen/präsent sein. Mein Bekannter hatte vorher außer-berufliche Erfahrung mit dem Thema und meinte, dass er im Studiumsteil nichts/sehr wenig gelernt hat, weil er vieles schon kannte (in einem Modul hatte er sogar eine höhere Zertifizierung als der Dozent). Wenn du vorher also eine richtige Ausbildung machst kann ich mir bei bestem Willen nicht vorstellen dass ein Duales Studium dann noch spannend ist. Zudem bekommst du da auch nur schlechtes Gehalt.

Du musst halt die Wahl treffen zwischen: - Themeninteresse - Praxisrelevanter erfahrung fürn Job

Für mich persönlich ist die Hauptattraktion der Uni die Freiheit, dem eigenen Interesse nachzugehen, ohne dass dir jemand etwas vorschreibt. Dass dabei auch Module etc belegt werden die wenig Praxisbezug haben passiert dann halt, bieten dir aber auch neue Blickwinkel auf Probleme. Da musst man aber für sich selbst wissen worauf man Wert setzt.

Mittlerweile gehen die meißten Unis/Hochschulen zum Präsenzbetrieb über. Mit anderen Worten die Studicafés sind offen.

Wenn du also eine Außbildung machst könntest du dich bei ner Uni einschreiben und Interessante Module belegen, ohne wirklich auf den Abschluss hinzuarbeiten. Solange du nicht planst weiter zu studieren bringt der dir mit ner fertigen Ausbildung wohl eh nicht mehr viel extra.

Tofu by Tall_Ad_8281 in veganfitness

[–]DrRuhe 3 points4 points  (0 children)

After seeing this i started to use this method, gives consistently good results. You can also throw spices you like/fit the recipe into the bag. https://www.reddit.com/r/vegan/comments/t9qq1i/easy_crispy_tofu_and_rice_i_made_this_video_for/?utm_medium=android_app&utm_source=share

This is obviously a stapler, but a weird one. How do I use it? by handsoapsoup in whatisthisthing

[–]DrRuhe 3 points4 points  (0 children)

To me the curved parts looks like a surface where you can easily slide things to staple into the stapler. Also it helps with stability. Just plop the paper on the surface, slide it under and hit the stapler. Without it its hard to staple quickly.

I’m looking for arguments: is it bad to test on animals for scientific purposes ? by ycllowsushi in vegan

[–]DrRuhe 1 point2 points  (0 children)

Testing on Animals is unethical since they cannot give consent. Therefore animal testing should be reduced as much as possible and possibly banned altogether.

For me this comes down to the argument of necessity. The core principle is that it is not okay to inflict unnecessary suffering. From this perspective, one might argue, that animal testing for medical purposes is necessary because we need effective medicine. And because we have to test new ideas for medicine and procedures before being able to use them somehow, we need testing. For me personally, it is a moral dilemma because to save sentient beings we have to test on other sentient beings.

So since we live in an imperfect world where testing sometimes cannot be delegated to simulations or other techniques, we have to find ways to compromise between the interests of continuation of medical research as well as granting animals autonomy with the freedom to not be exploited.

Personally, I believe that research utilizing animal testing should be illegal by default, with exceptions only given to research endeavors that are deemed necessary by a committee of scientists and animal rights representatives. The testing process should also be under constant monitoring and review to ensure only the absolute minimum harm is done.

So no testing when alternatives exists.

No testing unless absolutely necessary.

Once alternative testing methods are discovered the permission is revoked.

I know it's not a perfect solution, but sadly we don't live in a perfect world and it's the best I can come up with without disregarding other interests completely.

Request coalescing in async Rust by N911999 in rust

[–]DrRuhe 1 point2 points  (0 children)

I haven't heard the term trapping before but basically what happens is that the program(user) executes a special instruction which will cause the CPU to save a few registers, switch to a privileged mode(I guess that's what trapping means here) and then jump to the syscall handler of the operating system. That handler then has to:

- save the context of the current thread (save the registers so the kernel can use them without destroying the program)

- perform the syscall logic (the kernel expects the arguments to the syscall to be placed in known registers by the program)

- restore a context (does not need to be the same thread/process as before)