Skip to content

Latest commit

 

History

History
399 lines (296 loc) · 21.7 KB

2020-08-02.md

File metadata and controls

399 lines (296 loc) · 21.7 KB

< 2020-08-02 >

2,078,987 events, 936,790 push events, 1,329,236 commit messages, 82,310,521 characters

Sunday 2020-08-02 02:10:57 by ynot01

Adds TRAIT_NOINTERACT and applies it to guardian Time Erasure (#9362)

  • Adds TRAIT_NOINTERACT

TRAIT_NOINTERACT currently disallows the touching (clicking) of anything and doesn't allow you to use items in hand

  • Adds TRAIT_NOINTERACT to Time Erasure

TRAIT_NOINTERACT makes it so you primarily can't driveby drop grenades or stunbaton people while using this ability while also preventing future exploits by removing the ability to touch at all. TRAIT_PACIFISM should cover mostly everything else. Except bear traps I guess. Fuck you

  • _globalvars/traits.dm doesn't exist anymore

this is so sad

  • Update code/_onclick/item_attack.dm

I forgot to add "can't"

Co-authored-by: Hopekz hopekxx@gmail.com

Co-authored-by: Hopekz hopekxx@gmail.com


Sunday 2020-08-02 03:01:41 by LeptoFlare

Change it back to background color because fuck this production vs development environment bullshit what is this bug I hate this so much this shit gives me depression


Sunday 2020-08-02 03:10:32 by Pajuka22

fixed inability to run up slopes

holy shit that was a wild ride. first i couldn't go up slopes. next thing i know, i'm running up all the fuckin slopes. And GUESS WHAT? it was a fucking parentheses error.


Sunday 2020-08-02 06:05:26 by Danny

It’s a link to a vine where as we can see, King Bach has presented a rather large spoon to his friend. The humor stems from the fact that King Bach would like to eat some ice cream but his friend resorts at him, saying he can only have a spoonful and nothing more. Bach then suddenly changes his expression and body language that he is in possession of a spoon. And not just any spoon, it is a massive stainless steel spoon.This is funny because you would never expect someone to be in possession of a massive spoon to eat ice cream with. It is completely unorthodox and uncalled for. This is why the video is on the 2012 epic vine compilation on YouTube


Sunday 2020-08-02 10:49:59 by Marko Grdinić

"9:25am. I got up 20m ago, but I am really groggy right now so let me chill for a while. I still haven't read the Mahoako chapter that came out yesterday. Dark Lady which I've binged read over the last two days is one of the more unique works I had the pleasure of experiencing. The art is great, but the writing is unexpectedly mature. This is the first time I've ever seen the antagonists bring the MC on their side simply because they are so good at dialogue and negotiation. There was actually very little to indicate that MC would get turned into a girl by the very same antagonists before that. I can never tell where the plot is going to go with this one. One thing I do dislike is how the MC keps lucking into powerful people's favor.

9:40am. Well, let me chill as I said I would. After that I'll get back to the grind and deal with unbound variable errors.

10:05am. Ok, just a bit more and then I begin. I'll start with the monthly PL thread.

10:25am. Let me start. Is the thread up yet?

Yeah. Let me bring up the review once more.

///

In July, I made the tokenizer incremental, finished the lines-to-blocks converter and then made the block parser. Rather than redoing the whole file on every change, in v0.2 the file is split into blocks based on where statements begin and end. Meaning, every top-level statement is treated as its own block independent of the rest and this allows reuse of previously done work on a block-wise basis.

In the previous version of Spiral (and the January v0.2 prototype) I did not spend too much effort on making parser errors good, in fact it really bothered me how arbitrary they appeared to be during testing, but what I have now is worlds apart. Start the server, and start the VS Code plugin and you can see the errors exactly on point in the editor now. I do not think the error messages are great, but they are not poor by any means. If you know the language syntax they are quite satisfactory. The language syntax requires almost no backtracking, so I've been able to take advantage of that to good effect.

If I were competing with F#'s tooling I'd have quite a hard time. The same goes with Haskell when it comes to type system features. I've made up my mind to ignore those temptations and just focus on getting the product to ship, so to speak. The main goal with v0.2 is to make something broadly useful, and then if I can get those ensemble agents to work, only then will I focus on polishing up the language. I must not forget that the killer use of type systems is that they enable top-down reasoning. Once you have a working type system and incremental compilation, you get 85% of the benefit of a language. Things like autocomplete, unused variable highlighting, renaming, reference finding...plus esoteric type system features like GADTs that have substitutes, all the things that while being beneficial would also take a lot of work can be left for the future.

The next thing on my list is the top-down type system. At the time of writing this, I just finished annotating every part of the parsed AST with its range and thanks to that I can finally start considering the type checking phase seriously. I thought I might do the prepass and the partial evaluation pass with which I am much more familiar before this, but I've decided in the end that I do not want redo those after I go back and do type checking. So I'll do it all in order.

Mastering type inference is one of the main challenges for me in v0.2. Everything else, while a lot of work, I already know how to do. Once I push through this part, the core feature of v0.2 will be done and I will be able to put everything into place.

My estimated time until I am done is 2-3 months. I'll need at least a month to get type checking done, and then at least a week each for the prepass and the partial evaluator which is fast, but I am quite familiar with those parts. Add codegen and testing to that and it will fill out another two. More likely, this will be an underestimate. The type checker might take longer, or work that I haven't anticipated might need doing. Back in 2017 I wanted to be done with Spiral in a few months, but it took much longer than that.

Still, by the end of the year I will have Spiral in a very usable state. I am eagerly anticipating that moment. At that time, I will be able to breathe a welcome sigh of relief. This sweltering summer is much like the work I am doing right now. I want to exchange it for the coolness of fall. To me Spiral was always a means to an end, and once it is done I am looking forward to testing my vision of Spiral being a necessity for catching the incoming wave of new AI hardware.

///

10:40am. I touched this up a bit. I think now that the TC will get done ahead of schedule, and I might have time to deal with editor support as well, but let me go with the story I wrote.

10:45am. Posted it. Great. Now let me get back to work on validation.

        | RawApply of Range * RawExpr * RawExpr
        | RawIfThenElse of Range * RawExpr * RawExpr * RawExpr
        | RawIfThen of Range * RawExpr * RawExpr
        | RawPairCreate of Range * RawExpr * RawExpr
        | RawSeq of Range * RawExpr * RawExpr
        | RawReal of Range * RawExpr

I still have these to go through in cterm so let me get to it.

| RawForall(_,(_,(a,_)),b) -> cterm (Set.add a term) ty b

Why am I adding things to term here?

10:55am.

let unbound_vars (env_term : Map<string,T>) (env_ty : Map<string,T>) (x : RawExpr) =
    let errors = ResizeArray()
    let rec cterm term ty x =
        let check' (a,b) = Set.contains b term = false && Map.containsKey b env_term = false
        let check (a,b) = if check' (a,b) then errors.Add(a,UnboundVar)
        match x with
        | RawSymbolCreate _ | RawDefaultLit _ | RawLit _ | RawB _ -> ()
        | RawV(a,b) -> check (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,_)),b) -> cterm term (Set.add a ty) b
        | RawRecBlock(_,l,on_succ) ->
            let term = List.fold (fun s ((_,x),_) -> Set.add x s) term l
            List.iter (fun (_,x) -> cterm term ty x) l
            cterm term ty on_succ
        | RawRecordWith(_,a,b,c) ->
            List.iter (cterm term ty) a
            List.iter (function
                | RawRecordWithSymbol(_,e) | RawRecordWithSymbolModify(_,e) -> cterm term ty e
                | RawRecordWithInjectVar(v,e) | RawRecordWithInjectVarModify(v,e) -> check v; cterm term ty e
                ) b
            List.iter (function RawRecordWithoutSymbol _ -> () | RawRecordWithoutInjectVar (a,b) -> check (a,b)) c
        | RawOp(_,_,l) -> List.iter (cterm term ty) l
        | RawReal(_,x) | RawJoinPoint(_,x) -> cterm term ty x
        | RawAnnot(_,a,b) -> cterm term ty a; ctype term ty b
        | RawTypecase(_,a,b) ->
            ctype term ty a
            List.iter (fun (a,b) ->
                ctype term ty a
                cterm term (ty + metavars a) b
                ) b
        | RawModuleOpen(_,(a,b),l,on_succ) ->
            let tryFind x =
                match Map.tryFind x env_term, Map.tryFind x env_ty with
                | Some (TyRecord a), Some (TyRecord b) -> Some (a,b)
                | _ -> None
            let bound_local,bound_global = Set.contains b term, tryFind b
            match bound_local, bound_global with
            | false, None -> errors.Add(a,ModuleUnbound)
            | true, Some _ -> errors.Add(a,ModuleShadowed)
            | true, None -> errors.Add(a,ModuleShadowedAndUnbound)
            | false, Some (m_term, m_ty) ->
                let rec loop (m_term,m_ty) = function
                    | (r,x) :: x' ->
                        match tryFind x with
                        | Some (m_term, m_ty) -> loop (m_term, m_ty) x'
                        | _ -> errors.Add(r,ModuleIndexFailed)
                    | [] ->
                        let combine e m = Map.fold (fun s k _ -> Set.add k s) e m
                        cterm (combine term m_term) (combine ty m_ty) on_succ
                loop (m_term, m_ty) l
        | RawSeq(_,a,b) | RawPairCreate(_,a,b) | RawIfThen(_,a,b) | RawApply(_,a,b) -> cterm term ty a; cterm term ty b
        | RawIfThenElse(_,a,b,c) -> cterm term ty a; cterm term ty b; cterm term ty c

    cterm Set.empty Set.empty x

I am actually rather pleased with how this came out.

Now let me do ctype.

11:10am.

    and ctype term ty x =
        let check (a,b) = if Set.contains b ty = false && Map.containsKey b env_ty = false then errors.Add(a,UnboundVar)
        match x with
        | RawTPrim _ | RawTWildcard _ | RawTB _ | RawTSymbol _ | RawTMetaVar _ -> ()
        | RawTVar(a,b) -> check (a,b)
        | RawTPair(_,a,b) | RawTApply(_,a,b) | RawTFun(_,a,b) -> ctype term ty a; ctype term ty b
        | RawTRecord(_,l) -> Map.iter (fun k -> ctype term ty) l
        | RawTForall(_,(_,(a,_)),b) -> ctype term (Set.add a ty) b
        | RawTArray(_,a) -> ctype term ty a
        | RawTTerm (_,a) -> cterm term ty a

The type stuff is simpler than the term stuff as could be expected.

11:45am. I spent the last 35m thinking about GADTs. It bothers me that I still haven't decided on the syntax, and now that I am actually working on the typechecker I feel the urge to nail down the potential implementation of them.

Putting them would indeed be a major change to the type system. The main difference being that forall vars can now have paths.

Without GADTs a and b are always distinct, but with GADTs the forall variables could be unified with other forall vars.

a could be equal to q * w.

12pm. Damn it. I understand the essential mechanisms of it now. I could implement GADTs, but once again the syntax of it all gives me trouble

12:10pm. I need to refocus. While it is fun planning out extra features, all of them significantly increase the language complexity and Spiral is already packed as it is.

Let me do cpattern next.

12:30pm.

    and cpattern term ty x =
        let rec loop term x =
            let f = loop term
            match x with
            | PatSymbol _ | PatB _ | PatE _ -> Set.empty
            | PatVar(_,b) -> Set.singleton b
            | PatDyn(_,x) | PatUnbox(_,x) -> loop x
            | PatAnnot(_,a,b) -> let r = loop a in ctype (r + term) ty b; r
            | PatPair(_,a,b) -> loop a + loop b
            | PatRecordMembers(_,l) ->
                List.fold (fun s x ->
                    let check (a,b) = if (Set.contains b s || Set.contains b term || Map.containsKey b env_term) = false then errors.Add(a,UnboundVar)
                    match x with
                    | PatRecordMembersSymbol(_,b) -> s + loop b
                    | PatRecordMembersInjectVar(a,b) -> check a
                    ) Set.empty l

Actually, this is giving me trouble. I forgot what the semantics of injection patterns should be.

12:40pm.

inl f (a, !a x) = ...

Crap, I did not think about this at all. I spent much more time thinking about how to get the range of a variable in comparison.

Hmmm...How are record patterns compiled again...

12:45pm.

//        | PatRecordMembers items ->
//            let binds, on_succ =
//                List.mapFoldBack (fun item on_succ ->
//                    match item with
//                    | PatRecordMembersSymbol(keyword,name) -> let arg, on_succ = step name on_succ in RawRecordTestSymbol(keyword,arg), on_succ
//                    | PatRecordMembersInjectVar(var,name) -> let arg, on_succ = step name on_succ in RawRecordTestInjectVar(var,arg), on_succ
//                    ) items on_succ
//            RawRecordTest(List.toArray binds,arg,on_succ,on_fail)

Ok, I have it. I know what assumption I want to make. Let me stop here for a while so I can have breakfast. I am going to mix things up a bit. I am going to change the scheme I've been using currently."


Sunday 2020-08-02 15:31:49 by SioNisti

stupid info card for no reason

fuck you dxnvic :D)


Sunday 2020-08-02 17:10:09 by Danny Algorithmic

Initial Commit From Danny

Look, papa, I remembered how to commit!

Seriously though, I added a new scene named after myself, some underscored folders, a prefab of a floor tile, along with some other shit, like a Prefab Brush.


Sunday 2020-08-02 20:20:53 by Ivan

Day 37. Multisampling and Diffuse mapping

I started looking in multisampling-based antializing. In the [guide] (https://raytracing.github.io/books/RayTracingInOneWeekend.html#antialiasing), Shirley suggested using ~100 samples per pixel on our 400x225 screen. I quickly discovered that the numbers tend to explode: even on our tiny resolution, 90,000 pixels quickly become 9,000,000 samples. This both tanks the performance and destroys our memory (since we're keeping the rays in the memory for performance reasons).

While this is an interesting problem to solve, I'm starting to understand where do all the teraflops go nowadays in the "RTX- enabled" cards. I'm not even hitting "half-HD", 720p! Of course, I'm sure my math is janky and my structs are bloated... Still, it's pretty clear why we preferred raster triangle rendering for so long. To render my 90k pixel scene I'm using almost 5 gigs of memory! And it's only to store the rays!

A cool bug I encountered while implementing multisampling. It was produced from incorrect calculation of the ray index. It's achieved by mutiplying the x index (Y * Width + X) by the sample index

I still don't have enough profiling power to be able to safely say "this thing eats most of my performance power", or "that thing might be smaller" or something. On the other hand, I'm not really that concerned about it. Fun thing about Sparrow, is that it allows me to follow exercises like this, and then simply jump off this module to a next one, while bringing over the pieces I enjoyed (like the yesterday's random number generator, vector3 library or a camera system I've been slowly bulding).

Oh, I also implemented another random generator from the [same library] (https://raw.githubusercontent.com/mattiasgustavsson/libs/main/rnd.h)

Lastly, I finally moved away from drawing normals to something more interesting: diffuse lighting! I did however encounter some weird bug which I'm not exactly sure what's it's caused by. Maybe because I prenormalize the ray direction? Will need to experiment more with it.

![Another cool bug I encountered while implementing diffuse lighting. This one is a bit more frustrating.] (media/day37/diffuse_bug.png)


Sunday 2020-08-02 20:31:58 by Jacques Lucke

Particles: new Age Reached Event, Kill Particle and Random Float node

The hardcoded age limit is now gone. The behavior can be implemented with an Age Reached Event and Kill Particle node. Other utility nodes to handle age limits of particles can be added later. Adding an Age Limit attribute to particles on birth will be useful for some effects, e.g. when you want to control the color or size of a particle over its life time.

The Random Float node takes a seed currently. Different nodes will produce different values even with the same seed. However, the same node will generate the same random number for the same seed every time. The "Hash" of a particle can be used as seed. Later, we'd want to have more modes in the node to make it more user friendly. Modes could be: Per Particle, Per Time, Per Particle Per Time, Per Node Instance, ... Also a Random Vector node will be useful, as it currently has to be build using three Random Float nodes.


Sunday 2020-08-02 21:07:26 by frick-nedrickson

Add a stupid death message scene

Okay, so in the last commit I laid out a gameplan for how I want to address features in the immediate near term.

I immediately ignored this. I was listening to music and got inspired to make dumb 3D text that changes color and bounces in time with some music. It was a very dumb idea but I couldn't let it go and I really wanted to try it. My idea was that, when the player lost because all their units died, the music would play and the 3D 'you lost' message would appear and bounce around with the music. And no, dying isn't implemented, my brain is just running WAY AHEAD.

I created a model for the stupid text, but I haven't added music yet. or death. I did, however, have to learn how to use Godot's shadering language. I just used the Visual component, which was a little rougher than I thought since all the tutorials were for the coding alternative; the two did not correspond 1:1 as much as I would've hoped. The result is... eh. I think I might be able to do something better with a world-triplanar gradient texture...


Sunday 2020-08-02 23:25:41 by ChrisANG

Complete more of the Half Dragon Fem quest.

Implement Candle Trees -Plant type -Humanoid torsos and heads -Create swarms of flaming spheres to blow you up

Implement Switch Traps -Monsters don't trigger them. -Should difficult to impossible to destroy. -Have case-specific effects. --The only implemented case is oppening any artifact doors on a level for fem half dragon nobles.

Implement Painting Fragment entry method -Invoke outside the quest to enter the quest. -The quest departure portal will try to return you to the level you left from. --I forsee no balance problems with this at all. -Created instead of a portal when the branch placement function is called.

Implement magic breath/resistance for half dragons. -Handling is complete but only female half dragon nobles can actually roll it.

Upper quest levels spawn wolves, candle trees, and dogs instead of normal monsters.

Male half dragons get human/vampire quest


< 2020-08-02 >