• 5 Posts
  • 202 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle


  • Honestly, it is much more code to use loop with non-local control like break, continue etc. (variable initialization, append, variable mutation in loops…) than just calling a collect function (which I assume just means to_list). In the above example, in most programming language I know, you don’t even need to collect the result into a list.

    Not to mention, large loops with non-local control is a breeding ground for spegatti code. Because you no longer have a consistent exit point to the loop, thus making the semantics hard o reason about.

    In many languages, there are type class / trait / interfaces (whatever you want to call them) that allows lazy structures to share the same API as strict ones.







  • I think modern coffee is judged by how much the tastes reflect its distinct characteristics, which includes physical characteristic of the farm (altitude etc), fermentation process, and roasting process.

    It takes a lot of work to produce good coffee, and the end result should let these efforts shine. Acidity, fragrance, and funk are great ways to communicate the life of the coffee to the taster. That is why they are typically the standard to determine good coffee, instead of generic and monotone"smoothness" that is shared across kirkland signature, peets, starbucks, and gas station coffees.







  • Two of the same MAC address can’t exist in the same IP space, else the router can’t route packets to them.

    Yes, this seems to be my problem, both the host and the vm got the same IP, and I think I cannot send any traffic to either my host or vm. So my router is probably confused, as you suggested.

    Is there an issue with using Docker for this?

    I forgot to mention this, docker indeed work. However, ha requires a privileged docker running as root, which means ha essentially runs as root on the host.

    This is fine on dedicated hardware, but as my server have other infrastructure on there, running ha as root can be a security risk.


  • Hi, thank you for your reply.

    Did you make sure that eno2 is enslaved by br0? When br0 is created, it indeed have a unique MAC, but once it enslaves the hardware, it inherits the hardware address.

    I have not tried to get the bridge going with virsh, but I was unsuccessful with the virt-manager ui. And I assume they use the same system?

    It is possible I have accidentally disabled some network virtualization kernel component during setup, as I have implemented some mods from secureblue. I will try to reset everything to default, and try again.

    Do you have a tutorial for making bridge via virsh that you can share.



  • Last time I tried ChatGPT it cannot even do a trie in Haskell, so I don’t see any way it is useful for me, unfortunately. IIRC, I was testing with some trivial modification of a trie, but I do not remember at this point.

    Maybe it is useful for college homework, but I have yet to find any problem it can solve beyond college. But I would love to learn more, since you have more experience with it. :)

    Edit: I tried a problem I encountered couple month ago on https://perplexity.ai. I want to implement a parser in Haskell that do not halt on error, but record the error and keeps going.

    It should take 2 lines with mtl, and the AI gives me a more verbose answer that is also completely wrong.

    So… I don’t see how they are helpful, honestly. Sorry.