[-] [email protected] 2 points 2 days ago

my money is on vi or vi derivates.

[-] [email protected] 2 points 2 days ago

I don't think google will allow them to move to chromium. They need gecko to avoid anti-trust law suites.

[-] [email protected] 4 points 2 days ago

Yeah, I believe the official instance of EU and ACM are both quite small. It is a great way to verify people's identity just from their ID.

[-] [email protected] 4 points 6 days ago* (last edited 5 days ago)

In Maybe monadic, its monadic bind will automatically resolves any failed computation, and don't need explicit checking.

for example, the code in Haskell looks something like the following:

fib: Int -> Int -> Maybe Int
fib max_depth idx =
  do
     guard (0 <= max_depth)
     n1 <- fib (max_depth - 1) (idx - 1)
     n2 <- fib (max_depth - 1) (idx - 2)
     return (n1 + n2)

Haskell type class system automatically figures out this is a maybe monad, and check for error accordingly.

Notice, unlike the C code the author provide, this haskell code will exit immediately when n1 failed and never compute n2, similar to the behavior of the exception code. Thus I believe his point about performance is at least unjustified, if not wrong.

Another interesting fact about this code is that there is nothing that is built into the compiler/interpretor (except the do expression, which is just a minor syntactical sugar). For this code, the compiler designers don't need to design special semantics for raise and catch. Everything here, guard, return, and the Maybe monad (which is in charge of propagating errors) is defined by the user, using normal functions, no metaprogramming involved.

Wouldn't effect systems still be considered exceptions, but handled differently?

Yes, unlike monad, the error in algebraic effect is propagated by the compiler/interpretor, instead of user defined. But unlike implicit effect, explicit effect (algebraic effect, throwable, etc.) makes it clear how the code can go wrong.

Although explicit error through monad or algebraic effect is more clear in general, there are special cases where explicit effect is undesirable. One such example is effect pollution: low-level effects that are unlikely to cause impure behaviors are unnecessarily propagated through the call stack. This problem can make the code more verbose and difficult to handle.

[-] [email protected] 20 points 6 days ago* (last edited 5 days ago)

The more I read about these kind of article the more I am amazed that our digital future is at hand in utterly incompetent people.

This person clearly have no understanding of monadic error (AKA Maybe/option monad or slightly more advanced Either monad), which is the first monad we teach at a class targeting second year undergrad.

The performance comparison is just plain factual error. The functional error code will continue to compute n2 when computation of n1 failed; the same do not happen in the exception version. If you compare codes with completely different traces, of course they will have different performance...

A properly implemented monadic error will return as soon as compute for n1 failed, and never execute the rest of the code. This is the default and idiomatic behavior in Haskell, OCaml, F#, and rust. This performance problem doesn't even happen in LINQ-style handling like in C# and Kotlin (maybe also Typescript?).

The point of monadic error is that its control flow is local, whereas exception is non-local. Specifically, the exception can be handled and occur anywhere in the code base, with no indication on the type level. So programmers will be constantly worrying about whether the exception in a function call is properly handled.

Even worse, when you try to catch a certain error, there is always the risk to accidentally catch similar exceptions in a library call or someone else's code. Writing good code with try-catch requires a lot of principle and style guides. But unlike monads, these principle and rules cannot be enforced by the type system, adding extra burden to programmers.

In fact, we have known for a long time that non-local control flows (goto, break, contiune, exception, long jump) are the breeding ground for spaghetti code. As an evidence, many non-local control flows (goto, long jump) are baned in most languages.

That being said, there are certainly cases, with proper documentation, that exception style is easy to write and understand. But I think they are very specific scenarios, which have to be justified on a case-by-case basis.

3
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]

cross-posted from: https://mander.xyz/post/16531580

I have tried to follow several tutorial to setup using either ip or nmtui:

However, the bridge inherits the MAC address of host after enslaving the host hardware enp1s0.... This causes my router to give both the host and the bridge the same ip address, making the ha instance inaccessible.

The red hat tutorial clearly show that the bridge and the host have different IP, so I was wondering if I am doing something wrong.


Alternatively, I can set the home assistant vm to run in NAT and port forward from host, but I have several devices that communicate over different ports. So it would be annoying to forward all these ports. Not to mention, many appliances don't have documentation about the ports they use.

I can also potentially use virtualbox, but it is not well supported on silverblue, especially with secureboot enabled.

7
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]

cross-posted from: https://mander.xyz/post/16531247

I have tried to follow several tutorial to setup using either ip or nmtui:

However, the bridge inherits the MAC address of host after enslaving the host hardware enp1s0.... This causes my router to give both the host and the bridge the same ip address, making the ha instance inaccessible.

The red hat tutorial clearly show that the bridge and the host have different IP, so I was wondering if I am doing something wrong.


alternatively, I can set the home assistant vm to run in NAT and port forward from host, but I have several device that communicate over different ports. So it would be annoying to forward all these ports. Not to mention, many appliances don't have documentation about the ports they use.

I can also potentially use virtualbox, but it is not well supported on silverblue, especially with secureboot enabled.

17
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]

I have tried to follow several tutorial to setup using either ip or nmtui:

However, the bridge inherits the MAC address of host after enslaving the host hardware enp1s0.... This causes my router to give both the host and the bridge the same ip address, making the ha instance inaccessible.

The red hat tutorial clearly show that the bridge and the host have different IP, so I was wondering if I am doing something wrong.


alternatively, I can set the home assistant vm to run in NAT and port forward from host, but I have several devices that communicate over different ports. So it would be annoying to forward all these ports. Not to mention, many appliances don't have documentation about the ports they use.

I can also potentially use virtualbox, but it is not well supported on silverblue, especially with secureboot enabled.

[-] [email protected] 93 points 7 months ago* (last edited 7 months ago)

While in the U.S., your mental health data are just on the market, waiting to be brought.

https://www.ftc.gov/business-guidance/blog/2023/03/ftc-says-online-counseling-service-betterhelp-pushed-people-handing-over-health-information-broke

In the good case, there will be a class action law suit, and every victim will get approximately 2 dollars back for all their health data sold; but only after giving more sensitive information to the company that distributes these two dollars.

https://www.morrisbart.com/faqs/how-is-money-divided-in-a-class-action-lawsuit/

What a fun time to be alive.

13
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]

Hi all Nix experts,

I recently started using nix to manage my dev environment on my immutable distro, and I need some help.

I was wondering if I am using a large package like TexLiveFull, how to make sure nix don't delete large packages after I close the shell? I also don't want this package to be available in my global environment, as I don't need to use it outside vscode.

Another question is how to keep my packages up-to-date. I don't do serious development work, thus I typically perfer my package and dev-tools to be on the latest version. I prefer to have a little management of this as possible. Ideally, every time I start up a nix shell, the package manager will grab the latest version of the package if possible without requiring additional interaction from me. Is this possible?

Finally, is there any way to bubblewrap programs installed by nix to only access the file within the starting path of the shell? I don't imagine this is possible, but it would definitely be nice if nix has some security feature like this.

Thanks in advance for your help! I understand parts of this post might be ridiculous. I am still new to nix. Please correct me if I am not using nix in the "correct" way.

[-] [email protected] 122 points 8 months ago* (last edited 8 months ago)

Not "job", these are "volunteering contributions", that are not only time consuming, mentally consuming, and unpaid as well.

[-] [email protected] 87 points 8 months ago* (last edited 8 months ago)

Just letting everyone know that GE appliance is also owned by Haire.

https://en.m.wikipedia.org/wiki/GE_Appliances

Besides that, they also own the following brands: Hotpoint (U.S.), Hoover (Europe), Candy, Fisher & Paykel.

https://en.m.wikipedia.org/wiki/Haier

0
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
33
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
65
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
[-] [email protected] 105 points 8 months ago* (last edited 8 months ago)

This is another case of a foreign word don't have a good translation in English (and vise versa). Both 摆烂 and 让它腐烂 don't have the same tone as "let it rot".

To me, "let it rot" means watching something collapse with a sense of enjoyment. I cannot recall a Chinese word with this exact sentiment of the top of my head. But I can try to explain both Chinese words.

"让它腐烂" is the literal translation of "let it rot", word for word. It don't have the cultural and sentimental meaning behind it, merely stating the fact. More like "let the leave rot in the compost pile".

"摆烂" is probably what the article is referring to. Its meaning is similar to civil disobedience, and 躺平 ("lay flat", another word that was popular couple years ago).

"摆" means put, "烂" means something poorly made, broken, etc. "摆烂", together as a word, means "displaying a broken (bad) attitude, no matter the outside influence". However, "烂" also means rot, which is probably where the translation "let it rot" came from.

The original usage is much more playful, like your cat would lay on the floor no matter what toy or treat you give it, then it is 摆烂. But with the recent increase in pressure for many young people in China. 摆烂 and 躺平 (lay flat) become more of a act of civil disobedience and refusal to participate in the broken system/economy.

So 摆烂 is not a exact translation for "let it rot", but they do share the meaning of "no action" and the sentiment of joy. And "let it rot" sounds much cooler and concise than my explanation.

54
submitted 9 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]

Inspired by the video by Gem and Impulse from Hermitcraft. In the video, Impulse told Gem (a Canadian) that he had hawaiian pizza with canadian bacon on it; and Gem got really confused in what constitute a "Canadian bacon".

Apparently Canadian bacon is called "Canadian" because it is originally imported from Canada to New York. Not because it is popular or invented in Canada.

On the other hand, Hawaiian pizza is a true cultural amalgamation. It is invented by a Greek in Canada inspired by his experience cooking Chinese food. One of the culture it doesn't connect to is Hawaii, its name comes from the brand of pineapple the inventor was using.

https://en.m.wikipedia.org/wiki/Back_bacon https://en.m.wikipedia.org/wiki/Hawaiian_pizza

[-] [email protected] 126 points 9 months ago* (last edited 9 months ago)

On the other hand if most of your school's money is in some investment firm, instead of invested in the wellbeing and learning of your employees and students. And you have a investor as the person with the highest salary.

Then your "school" is more of a financial institution than a school. And probably should be taxed as such.

Looking at you, Harvard: https://www.reuters.com/world/us/harvard-posts-investment-gain-fiscal-2023-endowment-stands-507-billion-2023-10-20/

91
submitted 10 months ago by [email protected] to c/[email protected]
[-] [email protected] 82 points 10 months ago

I think BSD is the BSD equivalent to arch.

[-] [email protected] 71 points 10 months ago

I remember someone mentioned online that the reconstruction of animals are more complicated than just tracing the bone line.

I am very interested if some experts are willing to tell us more.

26
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]

I have setup my fedora to use LUKS encryoted partitions. But entering two passwords gets quite tiring, as I shutdown my laptop quite often to get the benefit of LUKS (I am assuming nothing is encrypted when in suspend, please correctme if I am wrong)

I am thinking about setting up TPM autodecrypt. However, I was wondering does the decryption happen on boot or after I login?

If it happens on boot, then it seems like the benefit is pretty limited compare to a unencrypted drive. Since the attacker can simply boot my laptop and get the unecrypted drive.

Am I missing something here? I was wondering is there a way for me to enter my password once and unlock everything, from disk to gnome keyring?

27
submitted 11 months ago* (last edited 11 months ago) by [email protected] to c/[email protected]

Just a curiosity. Theoretically FRP (factory reset protection) can use the current login password as a way of authentication after reset. But everything on the web states that you will need a Google account to take advantage of he feature.

385
Fairphone 5 Released (shop.fairphone.com)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

With 5 years of OS support and 8 years of security update.

Related threads:

view more: next ›

baseless_discourse

joined 1 year ago