LibreMonk

joined 1 year ago
[–] LibreMonk@linkage.ds8.zone 1 points 7 months ago* (last edited 7 months ago) (1 children)

The post was composed with the understanding that different countries have different laws. It is not an attempt to practice UK law outside of the UK. It’s to get a general grasp on core legal theories and common practices and concepts.

For example, I learnt basics of contract law from Nolo. Nolo gives a good basic understanding of legal concepts and norms. Of course Nolo is not an all encompassing reference and does not cover variation from one jurisdiction to the next in detail. But I find that what I have learned from Nolo is very similar concepts span many different jurisdictions. You can imagine that if a law school were to only teach legal concepts that apply specifically in the location of the school, it would be a school of low standards, where lawyers could not easily adapt to other jurisdictions.

I don’t even know if the legal scenario at hand has a wild variation across jurisdictions. Some situations have more variation than others. I’m in the very early stages of trying to get a grasp on what question to ask. I don’t even speak the language of the laws that apply to me, so without even knowing the common concepts for the situation, searching for the relevant statutes is quite an undertaking. If there were some kind of latin jargon to describe the situation of being bound by the action of non-contracting actors, even that would help in finding my way to the precise statutes (or case law) that I need.

Talk to a lawyer, not us.

I qualify for a free lawyer since I have no income. But the agency that allocates pro bono lawyers has very narrow verification requirements (in short, I must have a certificate that proves I am in in the unemployment system). So because I am not in that system, I fall through the cracks. Which means I have to work pro se in this case.

[–] LibreMonk@linkage.ds8.zone 2 points 7 months ago* (last edited 7 months ago) (3 children)

I suspected that. It is interesting to know indeed. That is also the case in the US, where contracts cannot trump legal tender law.

But I believe I’m in a cash-unfriendly country where legal tender does not distinguish debts from points of sale and contracts trump law in this case, so I am still mainly interested in knowing the very general legal theories in contract law for situations where someone is bound by the actions of those not a party to the contract.

Another example: what if a contract required someone to obtain and maintain a mobile phone service, then later in the contract SIM registration is implemented and the obligated party cannot get service because their ID card is rejected or they don’t meet whatever KYC requirements? Hypothetical, but I am increasingly finding myself in situations where a supplier of some kind forces me to be served in some way by some other service.

Really seems off that I can be contractually obligated in a way that requires action by others. Fair enough if I have to make an effort to get served by a 3rd party, but when the effort fails I’m very annoyed that I might be accountable for the consequences.

[–] LibreMonk@linkage.ds8.zone 1 points 11 months ago* (last edited 11 months ago)

This is the decode function if anyone is interested:

decoded_reference()

decoded_reference()
{
    local yr_msd=${1:0:1}
    local yr_lsd=${1:1:1}
    local seq_enc_msd=${1:3:1}
    local seq_enc_lsd=${1:4:1}
    local seq_msd=${lookup_table_reverse[$seq_enc_msd]}
    local seq_lsd=${lookup_table_reverse[$seq_enc_lsd]}
    local seq_msd_index=$(typeset -p symbolset | grep -oP '[0-9]+(?=]="'"$seq_msd"'")')
    local seq_lsd_index=$(typeset -p symbolset | grep -oP '[0-9]+(?=]="'"$seq_lsd"'")')
    local seq=$((seq_msd_index * ln_symbolset + seq_lsd_index))
    local yr_msd_index=$(typeset -p symbolset | grep -oP '[0-9]+(?=]="'"$yr_msd"'")')
    local yr_lsd_index=$(typeset -p symbolset | grep -oP '[0-9]+(?=]="'"$yr_lsd"'")')
    local yr=$((ln_symbolset * ln_symbolset * 2 + yr_msd_index * ln_symbolset + yr_lsd_index)); # warning: the “2” is a dangerous hard-coding! Hopefully that bug manifests after I am dead

    printf '%s\n' "${yr}-$seq"
};#decoded_reference

[–] LibreMonk@linkage.ds8.zone 1 points 11 months ago* (last edited 11 months ago) (1 children)

I probably need a perfect hash function. This code seems to do the job:

encoded_reference()
{
    local -r yr=$1
    local -r seqno=$2
    
    local -ar symbolset=(a b c d e f g h   j k   m n   p q r s t u v w x y z     2 3 4 5 6 7 8 9)
    local -a seedset=("${symbolset[@]}")
    local -r ln_symbolset=${#symbolset[@]}; # 31
    local ln_seedset=${#seedset[@]}
    local -A lookup_table=()

    for sym in "${symbolset[@]}"
    do
        pos=$((50 % ln_seedset)); # 50 is just an arbitrary static number
        lookup_table+=(["$sym"]=${seedset["$pos"]})
        seedset=(${seedset[@]/${seedset[$pos]}}); # remove used elements from the seedset
        ln_seedset=${#seedset[@]}
    done
    
    local yr_enc=${symbolset[$(((yr / ln_symbolset) % ln_symbolset))]}${symbolset[$(($yr % ln_symbolset))]}
    local most_sig_fig=$((seqno / ln_symbolset))
    local least_sig_fig=$((seqno % ln_symbolset))
    
    # caution: if the seqno exceeds ln_symbolset², this calculation is out of range
    local seq_enc=${lookup_table[${symbolset[$most_sig_fig]}]}${lookup_table[${symbolset[$least_sig_fig]}]}
    
    printf '%s\n' "answer → ${yr_enc}-$seq_enc"
};#encoded_reference

for yr in 2024 2025 2026
do
    for seqno in {1..20}
    do
        encoded_reference "$yr" "$seqno"
    done
done

outputanswer → js-wy answer → js-w2 answer → js-w4 answer → js-w6 answer → js-w8 answer → js-wa answer → js-wd answer → js-wg answer → js-wk answer → js-wp answer → js-ws answer → js-wv answer → js-w3 answer → js-w9 answer → js-we answer → js-wm answer → js-wt answer → js-w5 answer → js-wf answer → js-wr answer → jt-wy answer → jt-w2 answer → jt-w4 answer → jt-w6 answer → jt-w8 answer → jt-wa answer → jt-wd answer → jt-wg answer → jt-wk answer → jt-wp answer → jt-ws answer → jt-wv answer → jt-w3 answer → jt-w9 answer → jt-we answer → jt-wm answer → jt-wt answer → jt-w5 answer → jt-wf answer → jt-wr answer → ju-wy answer → ju-w2 answer → ju-w4 answer → ju-w6 answer → ju-w8 answer → ju-wa answer → ju-wd answer → ju-wg answer → ju-wk answer → ju-wp answer → ju-ws answer → ju-wv answer → ju-w3 answer → ju-w9 answer → ju-we answer → ju-wm answer → ju-wt answer → ju-w5 answer → ju-wf answer → ju-wr

This is close to ideal, but I just thought of another problem: what if a year-seq pair were to derive an encoded number like “fy-ou” or “us-uk” or “sh-it”? A bias that nearly ensures a digit is used would help avoid generating offending words. But I guess I’m getting well into over-engineering territory.

[–] LibreMonk@linkage.ds8.zone 1 points 11 months ago* (last edited 11 months ago)

That is certainly a winner from the standpoint of code simplicity. And it’s trivially reversible. But I’m also prioritizing simplicity for human recipients above code simplicity. Base64 output is case sensitive and someone writing back and referencing a ref number would not necessarily preserve case. It’s also intolerant of human errors like confusing a “1” for a “l”.

(edit) I think base32 would avoid the case sensitivity problem. So here’s a sample:

for seq in {1..60}; do printf '%s → ' 2024-"$seq"; printf '%s\n' 2024-"$seq" | base32 | awk '{print tolower($1)}' | sed 's/=//g'; done

output:

2024-1 → giydenbngefa
2024-2 → giydenbngifa
2024-3 → giydenbngmfa
2024-4 → giydenbngqfa
2024-5 → giydenbngufa
2024-6 → giydenbngyfa
2024-7 → giydenbng4fa
2024-8 → giydenbnhafa
2024-9 → giydenbnhefa
2024-10 → giydenbngeyau
2024-11 → giydenbngeyqu
2024-12 → giydenbngezau
2024-13 → giydenbngezqu
2024-14 → giydenbnge2au
2024-15 → giydenbnge2qu
2024-16 → giydenbnge3au
2024-17 → giydenbnge3qu
2024-18 → giydenbnge4au
2024-19 → giydenbnge4qu
2024-20 → giydenbngiyau
2024-21 → giydenbngiyqu
2024-22 → giydenbngizau
2024-23 → giydenbngizqu
2024-24 → giydenbngi2au
2024-25 → giydenbngi2qu

[–] LibreMonk@linkage.ds8.zone 1 points 11 months ago* (last edited 11 months ago)

The “js” example is just to encode the year which is a prefix to the encoded sequence number. So if 2024 gives “js”, then ref numbers would look like this:
js-aa
js-ab
js-ac
…etc.

And I do not reset the counter at the beginning of the year. So 2025 would be like:

jt-ad
jt-ae
jt-af
…etc.

(update)

Rereading, maybe I misunderstood - would the full string include the date? so 2024-js as a complete example?

Yes, but note that “js” in my example was for an encoding of the year, which helps shrink the reference number and mask the fact that the 2nd token is a sequence.

[–] LibreMonk@linkage.ds8.zone 1 points 1 year ago* (last edited 1 year ago)

Your client would make a difference. What you are probably seeing is the mirrored version of !tex@lemmy.sdfeu.org on lemm.ee. You cannot possibly be interacting with a non-existent community. If I post to https://linkage.ds8.zone/c/tex@lemmy.sdfeu.org, then I don’t suppose you would see it on https://lemm.ee/c/tex@lemmy.sdfeu.org.

(edit) just saw your test msg. Well, that’s interesting. Even though !tex@lemmy.sdfeu.org no longer exists, it seems the mirrored versions of it can still collaborate. I’m not sure how that works.

[–] LibreMonk@linkage.ds8.zone -1 points 1 year ago* (last edited 1 year ago)

If i build a shitty house and it collapses, I own it, I don’t write a manifesto about how it’s all lumber’s fault.

If you sell the house in a high-pressure sales tactic way (“buy in the next 5 min or deal is off the table”) and deny inspection to the buyer before it collapses, that would be as close as this stupid analogy can get to the JS scenario.

As does FOSS C

Nonsense. As you were told, C is not dynamically fetched and spontaneously executed upon visiting a website.

do you install linux from the source tree and build everything yourself? no, you download an .iso, so you are bound to the whims of the OS maintainer,

Nonsense. Have a look at gentoo. You absolutely can build everything from source. You can inspect it and you can also benefit from the inspection of others. Also, look into “reproduceable builds”.

Literally every JS package I’ve ever used does this.

Nonsense. The web is unavoidably littered with unpublished JS that’s dynamically fetched every time you visit the page.

[–] LibreMonk@linkage.ds8.zone -1 points 1 year ago* (last edited 1 year ago) (2 children)

they attribute buggy sites to the company, not the underlying language (rightly so)

Precisely my point. Recall what I wrote about conflict of interest. I’m not talking about a problem of the language syntax and semantics. I’m talking about JavaScript products (in the mathematical sense of a product not in the commercial sense; the code artifacts, iow).

JS runs client side and you can see what scripts are downloaded and running

That does nothing to remedy the conflict of interest. They can also push obfuscated JS but that’s beside the point. The problem is users are not going to review that code even the first time they visit a site, much less every single time due to the nature of dynamically re-fetching the code every single time you visit a page. Even if some OCD nutty user had that level of motivation, they do not benefit from the reviews of others because the code is not being reviewed from a static centralised space. Your idea that software freedom will somehow escape the conflict of interest problem is nonsense. A site admin can do whatever they want to the code to serve themselves and you end up with users running code that is designed to serve someone else.

So open source projects written in C benefit the user, but open source projects written in JS do not?

FOSS C projects hard and fast benefit the user because of the distribution of the code. We do not fetch a dynamically changing version of unreviewable unverified C code every time we visit a website. Distribution of C code is more controlled than that.

FOSS JS depends on how it’s distributed. Someone can write JS in their basement with no public oversight, license it to pass the LibreJS plugin test, and technically it’s FOSS but because of how it’s reviewed and distributed the benefits are diminishing. If the FOSS JS is in a public repo and statically downloadable (e.g. electronmail), then the conflict of interest is removed and the code is static (not fetched on-the-fly upon every execution which escapes a QA process).

Electronmail demonstrates FOSS JS that avoids the conflict of interest problem but that’s exceptional. That’s not how most JS is distributed. Most JS is distributed from a stakeholder, thus presents a conflict of interest.

[–] LibreMonk@linkage.ds8.zone 1 points 1 year ago (2 children)

I’m not sure what that is. vger.social and voyager.lemmy.ml don’t seem to have anything relevant. But I found !tex_typesetting@lemmy.sdf.org.

view more: ‹ prev next ›