Skip to content

Latest commit

 

History

History
640 lines (469 loc) · 27.1 KB

2020-09-14.md

File metadata and controls

640 lines (469 loc) · 27.1 KB

< 2020-09-14 >

2,779,471 events, 1,333,748 push events, 2,057,090 commit messages, 161,159,276 characters

Monday 2020-09-14 05:54:58 by ᆠ

suidai14-16+player

test.bin is some god damn shit to figure out a way of optimizing the image index


Monday 2020-09-14 06:57:52 by Gabriel Muntean

HMA with linked mailboxes - 2-way trust and domain-wide authentication required

We have different customers using linked mailboxes (account/resource forest) which want to implement HMA. The requirements from the documentation does not touch such scenario. Moreover from the field experience it seems selective auth is not enough, as we need domain-wide auth for HMA to work.

Could we please update the articles below to include a statement related to HMA and linked mailboxes implementation? How to configure Exchange Server on-premises to use Hybrid Modern Authentication Hybrid modern authentication overview and prerequisites for using it with on-premises Skype for Business and Exchange servers

Attached (in the ContentIdea https://dev.azure.com/ContentIdea/ContentIdea/_workitems/edit/123230) you can find the discussion on the tech aliases about such requirements and the troubleshooting from the Active Directory team to support this statement, as my colleague trace from end to end in the logs proving that Exchange fails to get the Kerberos token when only 1-way trust is setup between the forests, which is our minimal requirement when implementing linked mailboxes.

Thank you, Gabriel


Monday 2020-09-14 07:37:33 by chrisfarms

update bind template to write credentials to ssm

we want to write the credentials into parameter store so they can be safely accessed/audited instead of being easily leaked in cloudformation outputs.

The provider expects to be able to fetch the entire JSON credentials blob, so that's what we want to write into the store.

To do this, we build a "template" making use of the cloudformation "Sub" intrinsic function, where values like "${thing}" will get interpolated as if they are calls fetching the Ref from the resource named "thing".

This lets us build the JSON blob using values that will only exist after the cloudformation stack is provisioned.

Errr "what the hell is that test" I hear you cry ... yeah "that test", the one where I decode the template and type cast every value about 10 times ... that is using goformation's ability to pretend to be cloudformation and evaluating the intrinsic function so I can try and check that the template will produce a parameter store value with a JSON blob with the expected keys

The Credentials blob is now using snake_case_format too for consistancy with the other GOV.UK PaaS broker credentials.

As part of this change, the continued migration of naming from Main -> Primary and DL -> Secondary is mixed in (sorry). This renaming better reflects the queues use and makes things easier to read (especially in tests).


Monday 2020-09-14 11:56:25 by Marko Grdinić

"9:55am. I am up. Let me chill for a while and then I will start. Today I will definitely do some work. I've gotten over my inertia regarding the prepass. I'll start knocking things out starting from here.

10:25am. I am satisfied. Let me read this one chapter and then I will start. Actually, since it is this late, let me have breakfast.

Things will be much easier once I deal with the prepass. I'll only really have the partial evaluator left. After I finish that I will be able to rest more easily.

The completion of Spiral v0.2 is when I am going to consider myself a true pro. Right now, I have the skills after my concurrency adventure in the first half of 2020, but right now I am too tied up with Spiral.

I have many worries, and many concerns on my mind, but all of them will go away after I convert my current liabilities into assets. In a way, I am blessed. One does not always get a chance to do work as important as Spiral. In addition to the understanding of the self improvement loop, this will be my second great contribution to this world.

After I deal with this, the benefits will be more private.

Regret, worries, hard work. Who needs all of that? I want to play a game where I am not constantly pushed into a poor position. I want single-player ability in real life.

10:45am. I want to go through and overcome the cruelty of transcendence.

10:55am. Done with breakfast.

Let me rant just a bit.

The morality of transcendence trully is cruel.

In Reverend Insanity which I've been reading the strong eat the weak, but in real life, it is more like the strong are so strong that the weak barely matter. I've long been looking for the right belief, the way to get true power in the real, but when I found it, the implications of it broke me. I might be the aggressor, but I do feel like a victim as much as anyone else.

Nevertheless, I am not delusional about this - the path ahead of me allows no compromises.

The story that is Simulacrum is just a small taste of Singularity. I need the whole meal. I won't get it by navel gazing. I am going to have to let my hands be active and let their motion do the office of my mind.

11am. Regardless of how things turn out, the idea of optimizing for goals is not going to go away. Much like top down typing, it is one of the grand concepts without which the power of machines won't be able to be exploited.

The reason why I am useless now is because I can barely use even a tiny fraction of the machines' power. It is only by taking advantage of the processes of optimization and submersing myself in them that I will be make a concrete achievement.

11:05am. To go forward as a programmer, I need real skill in that.

And I need functional programming in its full splendor in order to build such processes. Spiral is the only language that will allow me this.

11:10am. Once I have true insight and true skill, my worries and regrets and loneliness will vanish. They are just wraiths of the weak position I am in.

11:25am. That feeling of wanting to program, I want it again. I've been running the prepass over and over in my mind yesterday and I know what I need to focus on. I want to finish it.

It does not matter if it takes until the ned of the month. That is fine. I just need to work on it piece by piece every day.

I might be weak, but it is not like imaginary pressure will break me. I need to let it build, explode and use that propel myself forward.

11:35am. Damn it, I should start the constraint refactor, but don't quite feel like it.

Let me just try filling in the types and I'll see whether my feelings on this change in a more positive direction. If I still do not feel like it, I'll spend the rest of the day in bed as well.

type TopEnv = {
    hoc : HigherOrderCases PersistentVector
    prototypes : {| instances : Map<int,Constraint Set list>; name : string; signature: T|} PersistentVector
    ty : Map<string,T>
    term : Map<string,T>
    constraints : Map<string,Constraint>
    }

Let me start with this.

This is what I've planned. Now let me take some things out.

"number", TyConstraint CNumber

I'll get rid of TyConstraint.

    let constraints =
        [
        "number", CNumber
        ] |> Map.ofList
    {hoc=PersistentVector.empty; ty=ty; term=Map.empty; prototypes=PersistentVector.empty; constraints=constraints}

Now I have this.

And I've gotten rid of TyConstraint. I have a bunch of red as a result. Let me adjust that.

let constraint_kind (env : TopEnv) x =
    match x with
    | CNumber -> KindType
    | CPrototype i -> prototype_init_forall_kind env.prototypes.[i].signature
    |> fun a -> KindFun(a, KindConstraint)

I need to get rid of KindConstraint as well.

let constraint_kind (env : TopEnv) = function
    | CNumber -> KindType
    | CPrototype i -> prototype_init_forall_kind env.prototypes.[i].signature

I'll let this be like so.

This will definitely simplify things.

11:45am.

let validate_bound_vars (top_env : Env) constraints term ty x =
    let errors = ResizeArray()
    let check_term term (a,b) = if Set.contains b term = false && Map.containsKey b top_env.term = false then errors.Add(a,UnboundVariable)
    let check_ty ty (a,b) = if Set.contains b ty = false && Map.containsKey b top_env.ty = false then errors.Add(a,UnboundVariable)
    let check_cons (a,b) = if Map.containsKey b constraints = false then errors.Add(a,UnboundVariable)
    let rec cterm term ty x =
        match x with
        | RawSymbolCreate _ | RawDefaultLit _ | RawLit _ | RawB _ -> ()
        | RawBigV(a,b) | RawV(a,b) -> check_term term (a,b)
        | RawType(_,x) -> ctype term ty x
        | RawMatch(_,body,l) -> cterm term ty body; List.iter (fun (a,b) -> cterm (cpattern term ty a) ty b) l
        | RawFun(_,l) -> List.iter (fun (a,b) -> cterm (cpattern term ty a) ty b) l
        | RawForall(_,(((_,(a,_)),l)),b) -> List.iter check_cons l; cterm term (Set.add a ty) b

Checking the constraints here is not too hard.

type Env = { ty : Map<string,T>; term : Map<string,T> }

I need to add the constraints to this.

12pm.

let module_open (top_env : Env) (r : Range) b l =
    let tryFind env x =
        match Map.tryFind x env.term, Map.tryFind x env.ty, Map.tryFind x env.constraints with
        | Some (TyRecord a), Some (TyRecord b), Some (TyRecord c) -> ValueSome {term=a; ty=b; constraints=c}
        | _ -> ValueNone
    match tryFind top_env b with
    | ValueNone -> Error(r, UnboundModule)
    | ValueSome env ->
        let rec loop env = function
            | (r,x) :: x' ->
                match tryFind env x with
                | ValueSome env -> loop env x'
                | _ -> Error(r, ModuleIndexFailedInOpen)
            | [] -> Ok env
        loop env l

This is really making me think. Do I want to go in this direction? I'll have to. I need to add modules to constraints.

| CModule of Map<string, Constraint>

12:15pm.

let rec constraint_name (env : TopEnv) = function
    | CModule l -> sprintf "{%s}" (Map.toList l |> List.map (fun (k,c) -> sprintf "%s : %s" k (constraint_name env c)) |> String.concat "; ")
    | CNumber -> "number"
    | CPrototype i -> match PersistentVector.tryNth i env.prototypes with Some x -> x.name | None -> "?"

Somehow, even just printing this is a pain in the ass. Once I make instances recursive, I am going to have trouble with printing their names.

Let me just do it like this for now.

This is such a pain in the ass.

let rec constraint_name (env : TopEnv) = function
    | CModule l -> sprintf "{%s}" (Map.toList l |> List.map (fun (k,c) -> sprintf "%s : %s" k (constraint_name env c)) |> String.concat "; ")
    | CNumber -> "number"
    | CPrototype i -> env.prototypes.[i].name

No forget that. It is too much of a burden. I'll just have the constraints be non-recursive for the time being.

It actually completely slipped my mind that I needed constraints in the Env simply to deal with module opens.

    let typevar_to_var ty (((_,(name,kind)),constraints) : TypeVar) : Var =
        let rec typevar = function
            | RawKindWildcard -> fresh_kind()
            | RawKindStar -> KindType
            | RawKindFun(a,b) -> KindFun(typevar a, typevar b)
        let kind = typevar kind
        let cons =
            constraints |> List.choose (fun (r,x) ->
                match v ty top_env.ty x with
                | Some (TyConstraint x & a) -> hover_types.Add(r,a); unify_kind r (KindFun(kind,KindConstraint)) (constraint_kind top_env' x); Some x
                | Some x -> errors.Add(r,ExpectedConstraint x); None
                | None -> errors.Add(r,UnboundVariable); None
                ) |> Set.ofList
        {scope= !scope; constraints=cons; kind=kind_force kind; name=name}

I need to simplify this.

12:25pm.

type Constraint =
    | CModule of Map<string, Constraint>
    | CNumber
    | CPrototype of int

I really dislike this module being here.

type Constraint =
    | CNumber
    | CPrototype of int

type ConstraintOrModule = C of Constraint | M of Map<string,ConstraintOrModule>

Let me do this.

12:30pm. I am feeling good about this.

    let typevars ty (l : TypeVar list) =
        List.mapFold (fun s x ->
            let v = typevar_to_var s x
            v, Map.add v.name (TyVar v) s
            ) ty l

Don't need the mapFold anymore.

12:35pm.

let vars,env_ty = typevars env.constraints vars

It is too much of a pain in the ass to do it like this.

I need to go to the old way of doing things.

    let typevars env (l : TypeVar list) =
        List.mapFold (fun s x ->
            let v = typevar_to_var env.constraints x
            v, Map.add v.name (TyVar v) s
            ) env.ty l

Let me do this.

This is not bad.

12:45pm.

    | BundlePrototype(_,(r,name),(_,var_init),vars,expr) ->
        let cons = CPrototype top_env'.prototypes.Length
        let v = {scope=0; constraints=Set.singleton cons; name=var_init; kind=List.foldBack (fun ((_,(_,k)),_) s -> KindFun(typevar k, s)) vars KindType}
        let vars,env_ty = typevars {term=Map.empty; constraints=Map.empty; ty=Map.add var_init (TyVar v) Map.empty} vars
        let vars = v :: vars
        let v = fresh_var()
        ty {term=Map.empty; ty=env_ty; constraints=Map.empty} v expr
        let body = List.foldBack (fun a b -> TyForall(a,b)) vars (term_subst v)
        hover_types.Add(r,body)
        { top_env' with term = Map.add name body top_env.term; constraints = Map.add name (C cons) top_env.constraints;
                        prototypes = PersistentVector.conj {|instances=Map.empty; name=name; signature=body|} top_env'.prototypes }

Actually, I see that printing the prototype constraints won't be a problem even if I make instances recursive.

12:50pm.

    | BundleInstance(r,prot,ins,vars,body) ->
        let assert_no_kind x = x |> List.iter (fun ((r,(_,k)),_) -> match k with RawKindWildcard -> () | _ -> errors.Add(r,KindNotAllowedInInstanceForall))
        let assert_vars_count vars_count vars_expected = if vars_count <> vars_expected then errors.Add(r,InstanceCoreVarsShouldMatchTheArityDifference(vars_count,vars_expected))
        let assert_kind_compatibility got expected =
            try unify_kind' (fun () -> raise (TypeErrorException [r, InstanceKindError (got, expected)])) got expected
            with :? TypeErrorException as e -> errors.AddRange e.Data0
        let assert_kind_arity prot_kind_arity ins_kind_arity = if ins_kind_arity < prot_kind_arity then errors.Add(r,InstanceArityError(prot_kind_arity,ins_kind_arity))
        let assert_instance_forall_does_not_shadow_prototype_forall prot_forall_name = List.iter (fun ((r,(a,_)),_) -> if a = prot_forall_name then errors.Add(r,InstanceVarShouldNotMatchAnyOfPrototypes)) vars
        let body prot_id (ins_id,ins_kind') =
            let er_count = errors.Count
            let guard next = if errors.Count = er_count then next () else top_env'
            let ins_kind = kind_get ins_kind'
            let prototype = top_env'.prototypes.[prot_id]
            hover_types.Add(fst prot, prototype.signature) // TODO: Do the same for the instance signature.
            let prototype_init_forall_kind = prototype_init_forall_kind prototype.signature
            let prot_kind = kind_get prototype_init_forall_kind
            assert_kind_arity prot_kind.arity ins_kind.arity
            guard <| fun () ->
            let vars_expected = ins_kind.arity - prot_kind.arity
            assert_kind_compatibility (List.skip vars_expected ins_kind.args |> List.reduceBack (fun a b -> KindFun(a,b))) prototype_init_forall_kind
            guard <| fun () ->
            assert_vars_count (List.length vars) vars_expected
            guard <| fun () ->
            assert_no_kind vars
            guard <| fun () ->
            let ins_core, env_ty, ins_constraints =
                let ins_vars, env_ty =
                    List.mapFold (fun s (((r,_),_) & x,k) ->
                        let v = {typevar_to_var s x with kind = k}
                        let x = TyVar v
                        hover_types.Add(r,x)
                        x, Map.add v.name x s
                        ) Map.empty (List.zip vars (List.take vars_expected ins_kind.args))
                let ins_constraints = ins_vars |> List.map (function TyVar x -> x.constraints | _ -> failwith "impossible")
                let ins_core, _ =
                    let trim_kind = function KindFun(_,k) -> k | _ -> failwith "impossible"
                    List.fold (fun (a,k) (b : T) -> let k = trim_kind k in TyApply(a,b,k),k) (TyHigherOrder(ins_id,ins_kind'),ins_kind') ins_vars
                ins_core, env_ty, ins_constraints
            let env_ty, prot_body =
                match foralls_ty_get prototype.signature with
                | (prot_core :: prot_foralls), prot_body ->
                    List.fold (fun ty x ->
                        assert_instance_forall_does_not_shadow_prototype_forall x.name
                        Map.add x.name (TyVar x) ty) env_ty prot_foralls,
                    subst [prot_core, ins_core] prot_body
                | _ -> failwith "impossible"
            term {term=Map.empty; ty=env_ty} prot_body body
            let prototype = {|prototype with instances = Map.add ins_id ins_constraints prototype.instances|}
            {top_env' with prototypes = PersistentVector.update prot_id prototype top_env'.prototypes}

I have to refactor this massive thing as well.

12:55pm. Ah, no wait. I can't make this recursive without adding the specific instance in top_env.

1pm.

let infer (top_env' : TopEnv) expr =
    let hoc = top_env'.hoc
    let top_env = loc_env top_env'

I'll make things more complicated and start passing in top_env as an argument.

let infer (top_env : TopEnv) expr =
    let mutable top_env = top_env

Ah, damn it. It is too much for me to weave the argument everywhere.

let infer (top_env : TopEnv) expr =
    let mutable top_env = top_env // The hack of top_env being mutable is used to make instances recursive.

1:05pm.

            let prototype = {|prototype with instances = Map.add ins_id ins_constraints prototype.instances|}
            top_env <- {top_env with prototypes = PersistentVector.update prot_id prototype top_env.prototypes}
            term {term=Map.empty; ty=env_ty; constraints=Map.empty} prot_body body
            top_env

As hacks go, this one is fairly horrible, but weaving top_env explicitly everywhere would be even worse.

1:15pm. Ok, I did it. Right now everything is clear.

But let me go a bit extra before I move to testing.

    let typevar_to_var cons (((_,(name,kind)),constraints) : TypeVar) : Var =
        let rec typevar = function
            | RawKindWildcard -> fresh_kind()
            | RawKindStar -> KindType
            | RawKindFun(a,b) -> KindFun(typevar a, typevar b)
        let kind = typevar kind
        let cons =
            constraints |> List.choose (fun (r,x) ->
                match v_cons cons x with
                | Some (M _) -> errors.Add(r,ExpectedConstraintInsteadOfModule); None
                | Some (C x) -> unify_kind r kind (constraint_kind top_env x); Some x
                | None -> errors.Add(r,UnboundVariable); None
                ) |> Set.ofList
        {scope= !scope; constraints=cons; kind=kind_force kind; name=name}

This is fine, but I also need to check that I am getting back a constraint in cterm

    let check_cons (a,b) =
        match Map.tryFind b constraints with
        | Some (C _) -> ()
        | Some (M _) -> errors.Add(a,ExpectedConstraintInsteadOfModule)
        | None -> errors.Add(a,UnboundVariable)

Let me go with this.

This is nice.

1:25pm. Let me go back to testing. I need to make sure that everything still works. Thankfully I've written a nice chunk of code.

prototype eq x : x -> x -> bool
instance eq list el {eq} = fun a b =>
    let rec loop = function
        | Nil, Nil => true
        | (Cons: a,a'), (Cons: b,b') when eq a b => loop (a',b')
        | _ => false
    loop (a,b)

Everything seems to be working in order. Let me refactor this so it is recursive.

prototype eq x : x -> x -> bool
instance eq list el {eq} = fun a b => match a,b with
    | Nil, Nil => true
    | (Cons: a,a'), (Cons: b,b') when eq a b => eq a' b'
    | _ => false

Oh, it works.

Spiral plugin is active.
index.js:42
ApplicationInsights:CorrelationIdManager
extension.js:1
Array[1]
ApplicationInsights:CorrelationIdManager
extension.js:1
Array[1]
ApplicationInsights:CorrelationIdManager
main.js:1
Array[1]

What the hell is this thing in the debug window?

Ahhh...I did something to the network. As it turns out, I removed the cable and cut myself off from the Internet. Then I noticed it was asking me for permissions on both ends. ZeroMQ is taking a different route than usual.

This is nothing to worry about.

1:35pm. Hmmm, does the parser have to parse at least one constraint every time. I do not need that restriction.

let forall_var d : Result<TypeVar,_> = (ho_var .>>. (curlies (sepBy1 (read_type_var' <|> rounds read_op_type) (skip_op ";")) <|>% [])) d

Let me make this a regular sepBy.

Ok, that is one thing out of the way.

1:40pm. Ok, this is good enough. I am done with the constraints refactor. Now constraints are in a separate environment from regular types.

They won't get in my way during the prepass.

Now, since I have been programming for a bit, let me take a break here. I want a nap to think about it for a bit. Then I'll go at it full force. I have my focus. I just need to elaborate things a bit more. I think for the first run, I'll just focus on doing the first pass of the greater prepass. Once I have that as a basis, the other two parts will be quite easy. The first one is a bit tricky. Just like with type inference, the top level statements present some challenges.

1:50pm. I just do not feel like rushing to the next thing right away. Let me step away from the screen. I think as soon as I am able to do even a single case, I will regain my momentum. This means that tomorrow, I might be able to return to my regular rhythm.

I'll finish the prepass that way.

Once only the partial evaluator is left, that will be a load off my shoulders. Sure the partial evaluator will be some work, but by that point compared to everything that had come before, it won't be a great challenge."


Monday 2020-09-14 12:24:14 by Nick LAITY

renaming is so annoying

WELL that was:

  • A good chunk of the menu done
  • Actually making the game playable
  • Implementing sprites for Mars, Venus & Mercury (Thank you SO MUCH to my brother)
  • probably something else, i'm too tired to think, goodnight

Monday 2020-09-14 14:28:25 by Peter Zijlstra

sched/core: Implement new approach to scale select_idle_cpu()

Hackbench recently suffered a bunch of pain, first by commit:

4c77b18cf8b7 ("sched/fair: Make select_idle_cpu() more aggressive")

and then by commit:

c743f0a5c50f ("sched/fair, cpumask: Export for_each_cpu_wrap()")

which fixed a bug in the initial for_each_cpu_wrap() implementation that made select_idle_cpu() even more expensive. The bug was that it would skip over CPUs when bits were consequtive in the bitmask.

This however gave me an idea to fix select_idle_cpu(); where the old scheme was a cliff-edge throttle on idle scanning, this introduces a more gradual approach. Instead of stopping to scan entirely, we limit how many CPUs we scan.

Initial benchmarks show that it mostly recovers hackbench while not hurting anything else, except Mason's schbench, but not as bad as the old thing.

It also appears to recover the tbench high-end, which also suffered like hackbench.

Tested-by: Matt Fleming matt@codeblueprint.co.uk Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Cc: Chris Mason clm@fb.com Cc: Linus Torvalds torvalds@linux-foundation.org Cc: Mike Galbraith efault@gmx.de Cc: Peter Zijlstra peterz@infradead.org Cc: Thomas Gleixner tglx@linutronix.de Cc: hpa@zytor.com Cc: kitsunyan kitsunyan@inbox.ru Cc: linux-kernel@vger.kernel.org Cc: lvenanci@redhat.com Cc: riel@redhat.com Cc: xiaolong.ye@intel.com Link: http://lkml.kernel.org/r/20170517105350.hk5m4h4jb6dfr65a@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar mingo@kernel.org Signed-off-by: Raphiel Rollerscaperers rapherion@raphielgang.org Signed-off-by: twisted 36546624+TwistedPrime@users.noreply.github.com


Monday 2020-09-14 15:56:06 by Adam Zethraeus

fix for returning an array of destination instead of just a destination. BUT NO, TYPES ARE NO BIG DEAL. YOU ONLY NEED THOSE IN SUPER BORING INDUSTRY PROJECTS. REALLY THEY JUST HOLD YOU BACK. BUT ADAM TELL ME HOW YOU REALLY FEEL? WELL FOR ONE I FEEL LIKE THAT'S AN IMPOLITE WAY TO REACT TO SOMEONE ACTUALLY CARING ABOUT SOMETHING. BUT FOR TWO I FEEL LIKE TYPES ARE AN IMPORTANT PART OF A DEVELOPER'S TOOLKIT AND BOTH YOU AND GOOGLE APPS SCRIPT CAN GO FUCK YOURSELVES. BUT ESPECIALLY GOOGLE APPS SCRIPT.


Monday 2020-09-14 20:23:59 by Geolykt

Mon Sept. 14th Updates (#18)

That were a ton of commits

  • Updated 1.16.2/1.16.3 compat Oh god, md_5, why did you do that?

  • Fixed issues with the Fire enchantment (Fix #13)

Sorry for my lazyness, closes #13

  • Further 1.16.2/1.16.3 compat

Classes weren't needed anyways. Fixes an inheritance issue

  • Updated from upstream (better PR-47 lore detection)

Sorry for taking so massively long to implement these changes

  • OOPs, commited the wrong file

That's the file I wanted to commit in the last commit

  • We are 1.9.3

New version, hopefull works all right


Monday 2020-09-14 22:28:13 by Venarir

Hoe Ass.

fuck you im gonna completely recreate you tomorrow im going to rebirth you from whatever fucking depths of hell you crawled out of.


< 2020-09-14 >