Skip to content

Latest commit

 

History

History
290 lines (207 loc) · 11.4 KB

2020-11-28.md

File metadata and controls

290 lines (207 loc) · 11.4 KB

< 2020-11-28 >

1,886,820 events, 1,106,279 push events, 1,548,568 commit messages, 88,342,445 characters

Saturday 2020-11-28 02:55:00 by Christian "Krissy" Silvermoon

Added 'Do What The Fuck You Want To Public License'


Saturday 2020-11-28 09:33:20 by Rias

updated shitty afk responses again.. damn i hate this


Saturday 2020-11-28 10:12:06 by AnonymousRevan

last shit for the night

instead of an eco law for extreme cases. remade laws so they reflect more of an allied or axis gear up which is kinda alreayd plays out as an allied gear up

  • means allied gear up are 3 laws that u get over time or axis gear up is quick but not as good long time. no one choice is better then the other. jsut gives me some choice instead of just the same thing over and over.
  • get manpower ealier

Saturday 2020-11-28 11:05:48 by Marko Grdinić

"9:55am. Turn based PFK just scratches my Dnd itch so much. Even BG could not do it to this extent. I just can't get enough of it.

But the real time mode is useful too when the enemy is pinned under web and grease and you are just pelting them with bolts and arrows. Unlike Neverwinter Nights, Pathfinder Kingmaker will age much better as a game.

Well, at least far as human made ones go. When the line between games and reality blurs who knows where people's tastes will go.

10am. Right now, I am more in control of myself. I am still obsessed, but not so much that I can't program.

10:05am. Let me just chill a bit and then I will start. I will try to get the sketch done.

10:20am. Let me start.

    let rec f (m : PersistentHashMap<string,int>) = function
        | TyPrim x -> TPrim x
        | TyArray x -> TArray (f m x)
        | TyLayout(a,b) -> TLayout(f m a,b)
        | TyInl(a,b) -> TArrow(m.Count,f (m.Add(a.name,m.Count)) b)
        | _ -> failwith "Compiler error: The base type in Infer is not supported in the prepass yet."

Ah, wait. I forgot variable indexing.

Also it should be done using ref equality, but who is going to fit that in.

        | TyVar x -> TV m.[x.name]

Actually the way base_types is structured is unique, so the ref equality comment does not apply there.

10:30am. Forget that. Let me start work on the sketch.

10:35am. Focus me, stop reading the Pathfinder pages.

What should I do first?

Imagine...

Yesterday I did the prepass union, in_module and top_env_default.

...Right first I need to get the order.

let order : string Queue = failwith "TODO"

I'll leave implementing this for later as it will be easy. All it requires is a simple depth first traversal.

(packages : Map<string, {|links : Map<string,{|name : string|}>; files : ValidatedFileHierarchy list; results : InferResult list|}>)

Ah, wait, the results should be in a map.

(packages : Map<string, {|links : Map<string,{|name : string|}>; files : ValidatedFileHierarchy list; results : Map<string, InferResult list> |}>)

10:50am. Focus, focus on the task at hand.

What I need to do next is go over the validated file hierarchy and accumulate the top_env and its results.

11:05am. Let me turn off the router.

type PrepassPackageEnv = {
    prototypes_instances : Map<int, Map<GlobalId * GlobalId,E>>
    nominals : Map<GlobalId,{|body : T; name : string|}>
    term : Map<string,E>
    ty : Map<string,T>
    }

let prepass_sketch (package_ids : PersistentHashMap<string,int>)
        (packages : Map<string, {|links : Map<string,{|name : string|}>; files : ValidatedFileHierarchy list; results : Map<string, InferResult list> |}>)
        (order : string seq) =
    Seq.fold (fun package_envs package_name ->
        let top_env = failwith "TODO"
        let rec elem (top_env, top_env_adds) = failwith "TODO"
        and list (top_env, top_env_adds) = failwith "TODO"
        let top_env_adds = list (top_env, top_env_empty)
        Map.add package_name (prepass_package_env top_env_adds) package_envs
        ) Map.empty order

Let me get rid of the order concerns. I will just assume it is given.

I will also get rid of the exact file target - the prepass will just do the whole package. That is the simplest way to do things here.

11:10am. Now I have 3 things to do here:

  1. Getting the top env.
  2. Processing the file hierarchy for a package.
  3. Converting the regular env to the PrepassPackageEnv and storing it.

Focus me. Can I do the first one before breakfast? I should try to do a single thing in this morning session.

Damn it, I need the union and in_module for PrepassPackageEnv. Let me do that.

11:35am.

open Spiral.PartEval.Prepass
type PrepassPackageEnv = {
    prototypes_instances : Map<int, Map<GlobalId * GlobalId,E>>
    nominals : Map<int, Map<GlobalId,{|body : T; name : string|}>>
    term : Map<string,E>
    ty : Map<string,T>
    }

let union small big = {
    prototypes_instances = Map.foldBack Map.add small.prototypes_instances big.prototypes_instances
    nominals = Map.foldBack Map.add small.nominals big.nominals
    term = Map.foldBack Map.add small.term big.term
    ty = Map.foldBack Map.add small.ty big.ty
    }

let in_module m (a : PrepassPackageEnv) =
    {a with
        ty = Map.add m (TModule a.ty) Map.empty
        term = Map.add m (EModule a.term) Map.empty
        }

let package_env_empty = {
    prototypes_instances = Map.empty
    nominals = Map.empty
    term = Map.empty
    ty = Map.empty
    }

let package_env_default = { package_env_empty with ty = top_env_default.ty }

let package_to_top (x : PrepassPackageEnv) = {
    nominals_next_tag = 0
    nominals = Map.foldBack (fun _ -> Map.foldBack Map.add) x.nominals Map.empty
    prototypes_next_tag = 0
    prototypes_instances = Map.foldBack (fun _ -> Map.foldBack Map.add) x.prototypes_instances Map.empty
    ty = x.ty
    term = x.term
    }

let top_to_package package_id (small : PrepassTopEnv) (big : PrepassPackageEnv): PrepassPackageEnv = {
    nominals = Map.add package_id small.nominals big.nominals
    prototypes_instances = Map.add package_id small.prototypes_instances big.prototypes_instances
    ty = small.ty
    term = small.term
    }

let prepass_sketch (package_ids : PersistentHashMap<string,int>)
        (packages : Map<string, {|links : Map<string,{|name : string|}>; files : ValidatedFileHierarchy list; results : Map<string, InferResult list> |}>)
        (order : string seq) =
    Seq.fold (fun package_envs package_name ->
        let package = packages.[package_name]
        let top_env =
            package.links |> Map.fold (fun s k v ->
                in_module v.name (union s (Map.find k package_envs))
                ) package_env_default
            |> package_to_top

        let rec elem (top_env, top_env_adds) = failwith "TODO"
        and list (top_env, top_env_adds) = failwith "TODO"
        let top_env_adds = list (top_env, top_env_empty) package.files
        Map.add package_name (prepass_package_env top_env_adds) package_envs
        ) Map.empty order

I had to do a lot of utilities for this.

I got the bullet point 1 done.

Map.add package_name (prepass_package_env top_env_adds) package_envs

This one should be easy.

11:50am. Had to take a break.

let prepass_sketch (package_ids : PersistentHashMap<string,int>)
        (packages : Map<string, {|links : Map<string,{|name : string|}>; files : ValidatedFileHierarchy list; results : Map<string, InferResult list> |}>)
        (order : string seq) =
    Seq.fold (fun package_envs package_name ->
        let package = packages.[package_name]
        let package_env =
            package.links |> Map.fold (fun s k v ->
                in_module v.name (union s (Map.find k package_envs))
                ) package_env_default

        let rec elem (top_env, top_env_adds) = failwith "TODO"
        and list (top_env, top_env_adds) = failwith "TODO"
        let top_env_adds = list (package_to_top package_env, top_env_empty) package.files
        Map.add package_name (top_to_package package_ids.[package_name] top_env_adds package_env) package_envs
        ) Map.empty order

At least I got the first and the last point out of the way.

        let rec elem (top_env, top_env_adds) = failwith "TODO"
        and list (top_env, top_env_adds) = failwith "TODO"

The next thing is this. The fact that I do not have to keep going until just the target file makes things easier. Well, most of the time the main will be at the end or near it so not having short cutting is fine.

Let me stop here so I can eat."


Saturday 2020-11-28 15:41:52 by Beatzoid

🔥 Remove credentials again

God damn I'm an idiot, anyway remove the credentials yet again


Saturday 2020-11-28 17:10:54 by ringzer0dev

Create LICENSE (WTFPL)

Just do whatever the fuck you want with this. This license is true freedom. Feel free to ask me questions about the project at ltorcuarental@gmail.com


Saturday 2020-11-28 17:21:54 by Stoicheia

holy shit I hate everything

goodbye to the people who hated on me


Saturday 2020-11-28 18:46:12 by Chris DeLuca

Manage gpg without GPGTools

I had some trouble after upgrading GPGTools, where it would largely ignore my smart card and I couldn't unlock my stuff. This sent me into a wild rage, and after too long debugging with no results, I switched tactics; trash GPGTools and install gpg myself.

GPGTools is a nice easy package for gpg on a Mac, except that now it was causing me headaches, so bye. It also added Mail support which I don't use, so another reason to get rid of bloat.

After some searching I got the system configured with the management of the included config files. I can't speak to exactly why all this config works, I'm just happy it does.


Saturday 2020-11-28 20:31:26 by rupel

FUCKING HELL YEAHgit add -u! Dont use same names for functions and vars; Dont return prints of variables; Fully specify return statements;


< 2020-11-28 >