Skip to content

Latest commit

 

History

History
620 lines (446 loc) · 29.2 KB

2020-11-08.md

File metadata and controls

620 lines (446 loc) · 29.2 KB

< 2020-11-08 >

2,114,783 events, 1,322,403 push events, 1,781,906 commit messages, 91,920,088 characters

Sunday 2020-11-08 03:48:22 by GoshdarnitGithub

Gosh. Fucking. Darn it.

Map tweaks, AI fuckery, some behind the scenes stuff to make shit load properly


Sunday 2020-11-08 04:22:21 by Neslon-Poggers

Hi my name is Carmen Winstead. I'm 17 years old. I am very similar to you... Did I mention to you that I'm dead. A few years ago a group of girls pushed me down a sewer hole to try and embarrass me. When I didn't come back up the police came. The girls said that I had fell and everyone believed them. The police found my body in the sewer. I had a broken neck and my face was torn off. Send this message to 15 people after you read the whole message if you value your life! A boy called David received this message. He just laughed and deleted it. When he was in the shower he heard laughing... MY LAUGHTER! He got really scared, rushed to his phone to repost this message... But he was too late. The next morning his mum entered his bedroom and all she found was a message written in his blood saying, "You will never have him back!" No one has found his body yet... because he is with me!... Send this to 15 people in the next 5 minutes if you don't want your fate to be the same as David's. Your time starts... NOW! The story is true you can research it on google


Sunday 2020-11-08 04:31:07 by kevans

imgact_binmisc: limit the extent of match on incoming entries

imgact_binmisc matches magic/mask from imgp->image_header, which is only a single page in size mapped from the first page of an image. One can specify an interpreter that matches on, e.g., --offset 4096 --size 256 to read up to 256 bytes past the mapped first page.

The limitation is that we cannot specify a magic string that exceeds a single page, and we can't allow offset + size to exceed a single page either. A static assert has been added in case someone finds it useful to try and expand the size, but it does seem a little unlikely.

While this looks kind of exploitable at a sideways squinty-glance, there are a couple of mitigating factors:

1.) imgact_binmisc is not enabled by default, 2.) entries may only be added by the superuser, 3.) trying to exploit this information to read what's mapped past the end would be worse than a root canal or some other relatably painful experience, and 4.) there's no way one could pull this off without it being completely obvious.

The first page is mapped out of an sf_buf, the implementation of which (or lack thereof) depends on your platform.

MFC after: 1 week

git-svn-id: svn+ssh://svn.freebsd.org/base/head@367477 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f


Sunday 2020-11-08 06:24:45 by Marcus Boyd

Abandoning direct methods, going to fluent api to create circle.

Holy fucking shit I can not get these edges to behave. They go backwards, they go backwards when the circle is created in the opposite direction, they go backwards when the gp_Ax2 is changed, then one edge actually consists of two disconnected edges. I give up.


Sunday 2020-11-08 07:19:47 by foggynight

Change repo from land-of-lisp to books

This repo will be repurposed to store my notes and exercises for all my books as opposed to being specifically for "Land of Lisp". The repo will be renamed from "land-of-lisp" to "books".

Separate to this, I unfortunately did not take any notes when I first went through K&R, but I did all the exercises. These exercises are currently in their own repo, and I will be leaving them there.

My plan is to go through the first edition of K&R, which I may be receiving as a christmas gift from my girlfriend. :) I will be taking notes through that reading as well as redoing the exercises. Comparing them with my solutions from what was nearly half a year ago now.

I currently own the 2nd edition and that is the source of the exercise questions in the K&R repo. I will be copying them over when I'm working through the 1st edition, can't wait.

As an additional note, I plan on taking less thorough notes in the future. These notes are mainly intended to document what I've learned and help me remember it. But taking as many notes as I did in the 3rd chapter of "Land of Lisp" is far too time consuming. I will be trying out different strategies.


Sunday 2020-11-08 10:14:50 by Alexander Nicholi

update to 1.2.1, fix /etc catastrophe (fuck you dave)


Sunday 2020-11-08 13:03:55 by devildefu

Fix and support some clipboard managers

fuck you copyq


Sunday 2020-11-08 17:50:11 by Marko Grdinić

"11:05am. It is true that I went to bed quite late, but my sleep was shitty as well, so this is the late awakening.

11:45am. Done with breakfast. Let me go do the chores. I want to get this out of the way so I have an clear segment to program ahead of me.

1:50pm. Assuming the weather holds, I should be able to deal with the chores completely in the next week. Let me cool down a little before I start.

I am thinking.

Actually, the stream servers are the easy part. It is everything else that is giving me trouble.

3:15pm. I am still thinking.

3:20pm. Originally I had envisioned starting multiple concurrent jobs and using a mechanism similar to C#'s cancellation tokens to abort when a new input comes into the supervisor, but that is too difficult.

Aborting jobs is too difficult!

I just can't handle all of that shit.

I will make the supervisor - the only eager part of the whole pipeline single threaded. Anything else is just too difficult.

This is not to say that packages won't be capable of being compiled concurrently. That will be easy, the prepass or the supervisor just has to start from the end and that will happen naturally.

3:30pm. Damn it, I feel so distacted.

I keep wondering about Baldur's Gate combat mechanics on the side while thinking about the supervisor.

Thanks to the thinking I've done today, I think that if I restrict my ambition to having a single threaded supervisor, I think I have everything I need to deal with it. If I started now, I think I could finish it all under a week, and probably in the next few days.

With Baldur's Gate, I am nearly done with my solo mage run - I only need to kill Sarevok and I am done, but on review I am not happy with my play. I've been doing it for who knows how long, but I still do not precisely understand the combat mechanics. I haven't quite scratched the itch that I need to master the game.

If only I could figure out the exact rules of the end of round, I could do really precise kitting. If only there was a mod that allowed me proper pauses even out of combat. If I could make my moves precise, I could master the game completely. And that would be enough to satisfy me and leave it behind. I'd be able to say that I trully exceded my kid self.

3:40pm. So what is it going to be?

I really need to leave BG for later. I am going to make a resolution. I'll take a break from playing the game and spend some time mastering it after I close for the day. I'll find some ways to introspect character readiness. If I could get a precise indicator that would catapult the power of my characters. Not that I've been doing bad so far.

I'll leave BG for later. Enough of that nonsense.

3:45pm. The damn compilation pipeline. It sure has been kicking my ass.

I think a single threaded supervisor should be fine. GUI frameworks do well enough with that.

There is no need to make thing more complex than they need to be. The last month has been my lack of competence on full display.

3:55pm. Let me take a break. I do not really feel like starting programming right now.

https://forums.beamdog.com/discussion/58062/anybody-else-uses-end-of-round-auto-pause/p2

Apparently, a round is six seconds when it comes to spell and effects duration. However, when it matters most, ie, in combat, it's NOT six seconds. According to one of the game developers "[a round] is not a period, it's an event" (WTF?!!!). You can see the full discussion here, but I warn you, it poses even more questions and essentially provides no answers. For some reason the developers seem reluctant to clarify this problem.

I understood that the characters rounds weren't timed together, but I just didn't realize that I could cast and make at least one attack and then cast again in the same amount of time that I could cast and then cast again. Now that I know that I may play some of the more intricate battles differently with certain characters. It isn't that big of a change but there are definitely times I can recall gesturing angrily at the screen "Cast already!!!". I won't do that any more.

Yeah, I want to read this. I saw this happen automatically and it always confused me.

4:15pm. Ok, enough. I'll have to figure out through my own experimentation. Forget this for the time being. I have some theories.

What I should do now is make my determination and simply go forward.

For simplicity I've made tokenizer, parser and typechecker into streams, but for the supervisor I will just make its state and the functions that change it.

I won't make it a real server as doing that wrecks everything.

4:20pm. Right now I am wondering whether I should have gone with that approach instead of with streams for the big 3, but nevermind that.

...

        let replace edit =
            let lines, errors = Tokenize.replace lines errors edit
            let blocks = block_separate lines blocks edit
            lines, errors, blocks
let parse is_top_down (s : (LineTokens * ParsedBlock) list) (x : Block list) =
    let dict = Dictionary(HashIdentity.Reference)
    List.iter (fun (a,b) -> dict.Add(a,b.parsed)) s
    List.map (fun x -> x.block, {
        parsed = Utils.memoize dict (block_init is_top_down) x.block
        offset = x.offset
        }) x

let bundle (tok : TokRes) (s : (_ * ParsedBlock) list) =
    let bundles, parser_errors = block_bundle s
    {bundles = bundles; parser_errors = parser_errors; tokenizer_errors = tok.errors}

Actually I did sort of take that approach with these helpers.

let parser is_top_down =
    let rec loop (s : (LineTokens * ParsedBlock) list) = Parser(job_thunk_with (fun req ->
        let s = parse is_top_down s req.blocks
        bundle req s, loop s
        ))
    loop []

I mean the parser is just this, and the tokenizer is not particularly more complex.

I will just make the top level functions for the supervisor and then make use of them in the server. I could also make it a stream.

Let me just start this.

Here is what I will aim for today. Just make the functions to deal with tokenizers and parsers in the new supervisor. That is what I will aim for.

Than I'll deal with project files. Then the actual interleaved compilation itself.

This won't be too hard.

What you couldn't do in a month becomes easy to do in a day when you have clear vision.

4:30pm. This compilation pipeline is trully such a hard challenge. It is literally going to turn me into a NEET unless I can surmount it. My rules are to do a little bit of work every day even if I can't do it all.

Let me do this. What I am going to do in the next hour will be pitiful, but it will at least serve as the ice breaker.

4:35pm.

type TypecheckerStream = Typechecker of (Bundle list -> (Infer.InferResult * TypecheckerStream) Stream)
let typechecker package_id module_id top_env =
    let rec tc s_old = Typechecker(fun bundles ->
        let rec loop s (bs : Bundle list) = promise_thunk (fun () ->
            match bs with
            | b :: bs ->
                match PersistentVector.tryNth (PersistentVector.length s) s_old with
                | Some (b', r, _ as old) when b = b'-> Cons((r,tc s_old),loop (PersistentVector.conj old s) bs)
                | _ ->
                    let env = match PersistentVector.tryLast s with Some(_,_,top_env) -> top_env | _ -> top_env
                    let r = Infer.infer package_id module_id env (bundle_top b)
                    let s = PersistentVector.conj (b,r,Infer.union r.top_env_additions env) s
                    Cons((r,tc s),loop s bs)
            | [] -> Nil
            )
        loop PersistentVector.empty bundles
        )
    tc PersistentVector.empty

What I did here was brilliant, but if it turns out to be too restrictive I will in fact separate the state from this function and instead of making typechecking a stream, I will use a function that takes in the state and returns the output along with the new state. The stream of those that is.

Seriously, I am a fool. It took me like a month in this new regime to discover simplicity again. What I have in mind right now are programming fundamentals. Did I have to spend such a large chunk of time to find this?

I can't help it. Inspiration comes from within. It is dependent on exercise and experience. I can't help, but to need to go through the motions even if it hindsight looks like such a horrendous waste of time.

I spent some much time thinking about channels, ivars, mvars, their uses, the right way to organize everything, and now I am getting rid of all of that and replacing the whole thing with a chain of promises + diffing.

How ridiculous this is.

I did all this thinking, only to realize that the vast majority of the ideas I had were too complicated and need to be disposed. I did all this thinking only to realize that most of my ambitions were too much - I'd be better off not trying to maximize concurrency. The supervisor will be the most stark example of that.

4:50pm.

type SupervisorState = {
    tokenizer : Map<string, TokenizerStream>
    parser : Map<string, ParserStream>
    }

Let me just do this. The feeling is good.

4:55pm.

type SupervisorState = {
    tokenizer : Map<string, TokenizerStream>
    parser : Map<string, ParserStream>
    }

type ClientReq =
    //| ProjectFileOpen of {|uri : string; spiprojText : string|}
    //| ProjectFileChange of {|uri : string; spiprojText : string|}
    //| ProjectFileDelete of {|uri : string|}
    //| ProjectFileLinks of {|uri : string|}
    //| ProjectCodeActionExecute of {|uri : string; action : ProjectCodeAction|}
    //| ProjectCodeActions of {|uri : string|}
    | FileOpen of {|uri : string; spiText : string|}
    | FileChanged of {|uri : string; spiEdit : SpiEdit|}
    //| FileTokenRange of {|uri : string; range : VSCRange|}
    //| HoverAt of {|uri : string; pos : VSCPos|}
    //| BuildFile of {|uri : string|}

type ClientErrorsRes =
    | FatalError of string
    | PackageErrors of {|uri : string; errors : RString []|}
    | TokenizerErrors of {|uri : string; errors : RString []|}
    | ParserErrors of {|uri : string; errors : RString []|}
    | TypeErrors of {|uri : string; errors : RString list|}

This will be the target. The simplest as it can get. I will rebuild my understanding of concurrent processing from scratch.

5pm. These uri's I am going to eventually have to change to actual paths. Right now things are ridiculous. I am going to have to refactor all of this.

But for now, let me focus on the supervisor.

5:10pm.

let file_open (s : SupervisorState) uri spiText =
    let (Tokenizer t) = Map.findOrDefault uri tokenizer s.tokenizer
    let (Parser p) = Map.findOrDefault uri (parser (Path.GetExtension(uri) = ".spi")) s.parser
    t (DocumentAll spiText) >>= fun (tr,t) ->
    p tr >>- fun (pr,p) ->
    pr, {s with tokenizer=Map.add uri t s.tokenizer; parser=Map.add uri p s.parser}

Er remind me again, just where is the semantic info supposed to be? I'll leave this for later. Let me do the next function.

let file_op (s : SupervisorState) uri req =
    let (Tokenizer t) = Map.findOrDefault uri tokenizer s.tokenizer
    let (Parser p) = Map.findOrDefault uri (parser (Path.GetExtension(uri) = ".spi")) s.parser
    t req >>= fun (tr,t) ->
    p tr >>- fun (pr,p) ->
    pr, {s with tokenizer=Map.add uri t s.tokenizer; parser=Map.add uri p s.parser}

Less is more.

5:15pm. I'll later make req a list. First of all, where is the hover info?

let block_init is_top_down (block : LineTokens) =
    // ...
    semantic_updates_apply block semantic_updates, BlockParsing.parse env

Am I just throwing the first part of the tuple away?

let bundle (tok : TokRes) (s : (_ * ParsedBlock) list) =
    let bundles, parser_errors = block_bundle s
    {bundles = bundles; parser_errors = parser_errors; tokenizer_errors = tok.errors}

Ah, yes, I am throwing it away here.

5:35pm.

    let line_tokens = List.fold (fun s (_,x) -> PersistentVector.append s (fst x.parsed)) PersistentVector.empty l
    line_tokens, Seq.toList bundle, Seq.toList errors

I am just going to do it it likes this in block_bundle.

let bundle (tok : TokRes) (s : (_ * ParsedBlock) list) =
    let line_tokens,bundles, parser_errors = block_bundle s
    {line_tokens = line_tokens; bundles = bundles; parser_errors = parser_errors; tokenizer_errors = tok.errors}

Now I have everything I need in the parser result.

let file_op (s : SupervisorState) uri req =
    let (Tokenizer t) = Map.findOrDefault uri tokenizer s.tokenizer
    let (Parser p) = Map.findOrDefault uri (parser (Path.GetExtension(uri) = ".spi")) s.parser
    t req >>= fun (tr,t) ->
    p tr >>- fun (pr,p) ->
    pr, {s with tokenizer=Map.add uri t s.tokenizer; parser=Map.add uri p s.parser}

Now this can stand. Not precisely though...

Yeah, I screwed up with the streams.

type SupervisorState = {
    tokenizer : Map<string, TokenizerStream>
    parser : Map<string, ParserStream>
    }

What I need in this map are promises for tokenizer state. This I will be able to compose. What I have now is no good.

Let me refactor this. Once more. Once and the final time.

let tokenizer =
    let rec loop (lines, errors, blocks) = Tokenizer(job_thunk_with (fun req ->
        let replace edit =
            let lines, errors = Tokenize.replace lines errors edit
            let blocks = block_separate lines blocks edit
            lines, errors, blocks

        let next (lines,errors,blocks as x) = {blocks=blocks; errors=errors}, loop x
        match req with
        | DocumentAll text -> replace {|from=0; nearTo=lines.Length; lines=Utils.lines text|} |> next
        | DocumentEdit edit -> replace edit |> next
        ))
    loop (PersistentVector.singleton PersistentVector.empty ,[],[])

I made my resolve to take this apart if it turns out to be too restrictive. Let me do it.

5:50pm.

type TokenizerState = { lines : LineTokens; errors : RString list; blocks : Block list }
let tokenizer_state_def = { lines = PersistentVector.singleton PersistentVector.empty; errors = []; blocks = [] }
let replace (s : TokenizerState) edit =
    let lines, errors = Tokenize.replace s.lines s.errors edit
    let blocks = block_separate lines s.blocks edit
    {lines=lines; errors=errors; blocks=blocks}
let tokenizer (s : TokenizerState) = function
    | DocumentAll text -> replace s {|from=0; nearTo=s.lines.Length; lines=Utils.lines text|}
    | DocumentEdit edit -> replace s edit

So much for streams.

Let me do the same thing for the parser.

6:10pm. Done with lunch. Let me deal with the parser.

6:40pm.

type ParserState = {
    is_top_down : bool
    blocks : (LineTokens * ParsedBlock) list
    }

let parse (s : ParserState) (x : Block list) =
    let dict = Dictionary(HashIdentity.Reference)
    List.iter (fun (a,b) -> dict.Add(a,b.parsed)) s.blocks
    let blocks =
        List.map (fun x -> x.block, {
            parsed = Utils.memoize dict (block_init s.is_top_down) x.block
            offset = x.offset
            }) x
    {s with blocks = blocks}

let bundle (tok : TokRes) (s : ParserState) =
    let lines, bundles, parser_errors = block_bundle s.blocks
    {lines = lines; bundles = bundles; parser_errors = parser_errors; tokenizer_errors = tok.errors}, s

let parser (s : ParserState) req = bundle req (parse s req.blocks)

Had to do some chores on the side, but I finally managed deal with this.

type ParserStream = Parser of (TokRes -> (ParserRes * ParserStream) Job)

Though I could have stuck with streams. In hindsight, the real problem is that Job inside. What I should have do is...

type ParserStream = Parser of (TokRes -> (ParserRes * ParserStream))

Had I done this, I could have made use of ParserStream Promises in the supervisor.

Well, it does not matter. It is more uniform like this.

let parser (s : ParserState) (req : TokRes) =
    let s = parse s req.blocks
    let lines, bundles, parser_errors = block_bundle s.blocks
    {lines = lines; bundles = bundles; parser_errors = parser_errors; tokenizer_errors = req.errors}, s

Let me inline bundle. I can afford to have a bit more in the parser function itself.

6:45pm.

type TypecheckerStream = Typechecker of (Bundle list -> (Infer.InferResult * TypecheckerStream) Stream)
let typechecker package_id module_id top_env =
    let rec tc s_old = Typechecker(fun bundles ->
        let rec loop s (bs : Bundle list) = promise_thunk (fun () ->
            match bs with
            | b :: bs ->
                match PersistentVector.tryNth (PersistentVector.length s) s_old with
                | Some (b', r, _ as old) when b = b'-> Cons((r,tc s_old),loop (PersistentVector.conj old s) bs)
                | _ ->
                    let env = match PersistentVector.tryLast s with Some(_,_,top_env) -> top_env | _ -> top_env
                    let r = Infer.infer package_id module_id env (bundle_top b)
                    let s = PersistentVector.conj (b,r,Infer.union r.top_env_additions env) s
                    Cons((r,tc s),loop s bs)
            | [] -> Nil
            )
        loop PersistentVector.empty bundles
        )
    tc PersistentVector.empty

I'll leave this thing for tomorrow. This came out just so well with streams. Depending on how successful I am in redesigning this, I might go back to streams in the tokenizer and the parser.

6:50pm. Let me close here."


Sunday 2020-11-08 18:10:01 by MilkyNail (MariaMod)

Add files via upload

  • Added a scene "Mother's Toy", made by WetWorksStories. You can find the link to it in the parents' bedroom, every day, between 9 and 15 hours, with a 25% chance. It is a huge scene, and I almost didn't change it. Oh, yeah, you should have more than 30 points of Corruption to see it all
  • Improved granddad's chance to run into you at the Farm
  • Fixed endlessly adding Ralf's collar. Plus, now you put it on when you receive it
  • Finally, added the ability to see who is the father of your baby. It's a bit rough yet..
  • And Rachel wrote the first scenes for that system. If your baby's father is your own dad (o-la-la), you have a 66% chance to see the Happy acceptance and 33% chance to see the disappointment in his eyes - Bad reaction
  • Added another Dream scene by Rachael - Robbery Gone Wrong
  • Worked on some basic passages like Stats or StoryAuthor. Removed "current clothes check" passage from Stats
  • Added "Back" links to Stats, Smartphone, Help, and Character Info menus. Mobile players asked me to do this. Okay, here you are
  • Worked on some interactions with parents, fixed a couple of silent errors (like wrong clothes reaction)
  • Added a picture of the cave (Cave Dream, the one with wolves), made by MidJuChan

Sunday 2020-11-08 19:42:44 by JP Simard

Remove Xcode project & Drop Carthage Support

Xcode has supported Swift Package Manager projects natively since Xcode 11, which has been out for over a year, where you can use Xcode by having it open the Package.swift manifest rather than a .xcodeproj or .xcworkspace.

I've been primarily developing SwiftLint in Xcode using this approach for over a year, and despite a few nitpicks I have, it's been a joy to use.

So I'd like to completely remove the Xcode project along with things that support it:

  • SwiftLint.xcworkspace/SwiftLint.xcodeproj: Neither of these are needed if we use xed . or xed Package.swift to develop SwiftLint in Xcode.

  • Cartfile/Cartfile.private/Cartfile.resolved/.gitmodules/Carthage/: These were used to manage dependencies as git submodules for use in the Xcode workspace, but that's no longer necessary if Xcode delegates to SwiftPM to manage dependencies for us.

  • Some scripts can be simplified, cleaned up or even completely removed.

  • Reduce duplication: Rather than update dependencies or files in multiples places, there will only be the package manifest and the Podfile

  • Reduce merge conflicts: This hasn't been too bad, but it's occasionally a pain when trying to land old PRs

  • Reduce development overhead: No need to manually make sure that files in the Xcode project are sorted alphabetically

  • Reduce clone time: No need to run git submodules update --init --recursive anymore

I think this breaks Carthage users that pull in SwiftLintFramework as a dependency in a Cartfile.

However I can't find any references to SwiftLintFramework in any Cartfile files on GitHub so this doesn't appear to be worth continuing to maintain.

Resolves realm/SwiftLint#3412


Sunday 2020-11-08 21:51:22 by foggynight

Change repo name from land-of-lisp to books

This repo will be repurposed to store notes and exercises for all my books as opposed to being specifically for "Land of Lisp". The repo will be renamed from "land-of-lisp" to "books".

Separate to this, I unfortunately did not take any notes when I first went through K&R, but I did all the exercises. These exercises are currently in their own repo, and I will be leaving them there.

My plan is to go through the first edition of K&R, which I may be receiving as a christmas gift from my girlfriend. :) I will be taking notes through that reading as well as redoing the exercises; comparing them with my solutions from what was nearly half a year ago now.

I currently own the 2nd edition and that is the source of the exercise questions in the K&R repo. I will be copying my original solutions over while I'm working through the 1st edition, can't wait.

I plan on taking less thorough notes in the future. These notes are intended to document what I've learned and to help me remember it. But taking as many notes as I did in the 3rd chapter of "Land of Lisp" is far too time consuming. I will be trying out different strategies.


Sunday 2020-11-08 22:10:53 by realfantacoke

Added Say command This allows you to write messages, even if they start with your Client Prefix

  • Useful for proofs, that you aren't that kind of damn evil cheater boii, that they think you are.

Signed-off-by: realfantacoke [email protected]


Sunday 2020-11-08 23:09:32 by David B

ws error: connect ECONNREFUSED 127.0.0.1:8900

The Rust version requires access to port 8900. You'll get the error: "ws error: connect ECONNREFUSED 127.0.0.1:8900" if you run the rust version and the port forwarding is not set up. For completeness and to make the helloworld experience as error-free and troubleshoot-free as possible, I think we should add the port forwarding command to the installation instructions.


< 2020-11-08 >