Skip to content

Latest commit

 

History

History
536 lines (395 loc) · 25.3 KB

2020-12-04.md

File metadata and controls

536 lines (395 loc) · 25.3 KB

< 2020-12-04 >

2,776,010 events, 1,419,592 push events, 2,203,746 commit messages, 159,471,967 characters

Friday 2020-12-04 02:11:12 by Eugene L

Switched to using USB serial for debugging.

I was needing one or two more pins, to avoid having to use multiplexers. For some reason pin PB3 doesn't work on my Blue Pill boards (might be a bad batch or maybe I'm doing something wrong).

Also, I don't know if there's a way to make serial communication one way (so that it uses a single wire). During my tests I wasn't able to reliably use the other pin for buttons/encoders even if my program was never trying to read from serial.

It might be possible to save one pin that goes to LCD since we're never reading from the LCD. However, I'm using native SPI capabilities of STM32 and I don't know how to make it not use one of the MOSI/MISO pins.

I hate using USB serial because serial monitor apps tend to hang and stop accepting messages when the board resets. It's so ridiculous! But I wasn't able to find a nice serial monitor that doesn't have this problem.

I also changed encoder pins to correspond to how I ended up soldering the wires to encoders. In future I wouldn't recommend to just panel-mount the encoders and then solder stranded wires to them while they're inside of the enclosure. It's very frustrating and inconvenient. In future I'd prefer to solder encoders directly to a special board (can probably even be stripboard/perfboard), while they're panel-mounted


Friday 2020-12-04 03:42:44 by VenkatNan

i am running on an average of 5 hrs of sleep, and i have to wake up early to get my blood sucked out by a tube, i think doing css will make me go insane so i'm going to bed now


Friday 2020-12-04 07:26:57 by Arknir

Update Elliott.json

Fixed some run-on sentences and minor errors in grammar. Let me know if you have any questions for any of my edits (ping me @Arknir on discord). You do not need to accept all of the changes. Very good work! Comments on some changes: Line 23: Changed "couldn't" to "cannot". "Couldn't" is in the past tense, but Elliot seems to be speaking in the present tense. "Cannot" would seem better for this situation. The wording for "anything happening to you" seems okay, but you could add "bad" or "the thought of anything bad happening to you" Line 26: Changed "by Demetrius and Robin's home" to "mountain lake" for simplicity

Suggestions for edits by Arknir (has not been implemented, needs approval!): Line 13: "It isn't the most beautiful one, but hey, still cool." ---> "Not my best catch, but it's still a keeper." Line 19: "I wonder, how can a place that's so thriving also be so peaceful?" ---> "I wonder... how can a place that's thriving with so much life be so peaceful?" Line 21: "You've started a fire in me that will not die," ---> "You've ignited a flame within me that will not burn out," Line 23: "I'm not sure what monsters we’ll face today, and I cannot bear anything happening to you!$2" ---> I'm not sure what monsters we’ll face today, and I cannot bear the thought of anything bad happening to you!$2", Line 31: "Most of all, a real community, which is desperately lacking in so much of our modern world!" ---> "Most important of all, a loving community built on trust and friendships... Something that most places in our world desperately lack."


Friday 2020-12-04 08:05:45 by Joe V

Well it works, and I want to fight Mr. Python himself.

Using PyQt and PyQtGraph https://pypi.org/project/PyQt5/ http://www.pyqtgraph.org/

I managed to get it drawing some can data. It isn't expandable to more bytes. I slacked off, and that's on me. I wanted to have something to show though. This is an ABSOLUTE bodge job that is held together with duct tape and force of will. It isn't fast enough for live data, but it's faster than matplotlib. I think. Maybe. Everything is chaos. I want to burn my code in a fire. Scrolling is awful. I hate multithreading, I hate python, and this is a mess.

BUT IT DOES KINDA GRAPH. AND IT MOVES.


Friday 2020-12-04 10:26:51 by creepyAtwell

Day4

This was more difficult as expected. I thought this would take under 1 hour but I forgot the fucking "break;" at the end of each case. God fucking damn it.


Friday 2020-12-04 12:56:47 by dskprt

diefu8a89tui89uior4tw3aqw34htjruoy589ai7w34hv8u57gv4fpiojewrt90u4rjwe09ru3i249i8r5uj3458i6byjdiiof some body once tol me th e world was gonna ropll me i iant th shaprest tool in the shed and she was looking kinda dumb with her ifnger and her thumb in the shape of an l o her forehead well the years start coming and they dont stop coming fed to the rules and i hit the ground running didnt make sense not to live for fun your brain gets smart but your head gets dumb so much to do so much to see so whats wrong iwth takjing the back streets you will never know if you dont go youll never shine if you dont glow hey now youre an all star get your game on go play hey now youre rock star get the show on get paid and all that glitters is gold only shooting stars break the mold its a cool oplace and they say it gets colder youre bundled up now wait til you get older but the meteor men beg to differ judging by the hole in the satellite picture the ice we skate is getting pretty thin the waters getting warm so you might as well swim my worls on fire how about yours that the way i like and i never get bored hey now youre an all star get your game on go play hey now youre a rock star get the show on get paid and all that glitters is gold only shooting stars break the mold

everyones counting on me to cheer them up and give them lots of energy i hope that i can help them study for their test ill work hard to support them and always try my best its so much fun to help out in the dormitory and be asuper moe and generic loli i wanna do something for you oniichan said i gasped and said what are we going to do on the bed oh no oh no pomf pomf kimochi whats this sticky stuff on me they play with me until i smell like salty coins and milk morning everyone today we will have lots of fun uguu am i cute in my favorite swimsuit pomf pomf wanna stay and play the pop up pirate game stop stop touching me its making me fell all funny niichan i love you but please stop smelling my patsu yay yay play with me ah ah you make me happy everyday pomf everytime is pomf theres just no way that thing will fit ill endure it pomf pomf kimochi whats this sticky stuff on me they play with me until i smell like salty coins and milk morning everyone today we will have lots of fun UWAHN UWAHN IT'S REALLY TOUGH NOT TO CLENCH UP MY BUTT POMF POMF WAY WAY WAY POMF POMF POMF WAY POMF WAY POMF POMF TWIST TWIST TWIST BOOM BOOM TWIST BOOM TWIST BOOM TWIST BOOM TWIST POMF POMF WAY WAY WAY POMF POMF POMF WAY POMF WAY POMF POMF TWIST TWIST TWIST BOOM BOOM TWIST BOOM TWIST BOOM TWIST BOOM TWIST


Friday 2020-12-04 14:19:39 by Jebaitedneko

fuck you realme

i'm not even gonna bother. should still boot / init anyways and this is just to know whether this cursed source even boots in the first place


Friday 2020-12-04 15:00:46 by Marko Grdinić

"11:05am. I seem to be getting up later and later. But it is fine.

Yesterday I found my focus - I need to make libraries. To be a good programmer, I just cannot rely on doing everything from scratch. In order to surmount obstacles I need to be able to reuse my past work. And in order to actually have past work, I need to actually make it first.

This is where I will acquire real power.

Today I won't have trouble focusing on the work at hand. What I will do is handle those errors.

11:15am. Well, let me chill for a while first. I'll do the breakfast and then chores.

12:50pm. Done with breakfast. Let me do the chores next. After that I'll focus solely on dealing with the printing.

1:25pm. Done with chores.

Let me turn off the router. And now...

                            // TODO: peval throws exceptions on type errors.
                            let (a,_),b = PartEval.Main.peval {prototypes_instances=prototypes_instances; nominals=nominals} main
                            Ok(Codegen.Fsharp.codegen b a),s

I have to deal with this somehow.

exception CodegenError of string
exception CodegenErrorWithPos of Trace * string

This is codegen.

type Trace = Range list
exception TypeError of Trace * string
//type Range = { uri : string; range : Config.VSCRange }
type Range = VSCTypes.VSCRange // TODO: Include uris during the prepass.

1:30pm. This last bit is a good suggestion.

1:45pm. Had to take a break. Let me resume.

//type Range = { uri : string; range : Config.VSCRange }
type Range = VSCTypes.VSCRange // TODO: Include uris during the prepass.

Yes...I see no alternative to getting busy with this.

Let me uncomment the thing and then I will make whatever modifications are needed.

type Range = { path : string; range : VSCRange }

Let me do it like this.

2:05pm. Phew, done plugging in the path into the prepass.

Now let me get rid of the red elsewhere.

let x, files = multi_file_run on_res on_res top_env_empty prepass id Prepass.union Prepass.in_module package_id top_env files

I'll have to modify the multi_file_run so it passes in the path.

2:10pm. Done.

The thing compiles, but that just means there are no type errors. I am not handling the peval or codegen exceptions yet.

And I have no way of printing the errors just yet.

2:20pm. Right now I am thinking where do I want to put the lines. I am going to have to make a server, a special one, just before the tokenizer.

modules : Map<string, TokRes * ParserRes Promise * ModuleStream>

This is the ideal place to put the lines. It would allow me to access that data for the sake of printing the traces.

let module' error is_top_down =
    let rec loop (tokenizer : TokenizerStream, parser : ParserStream) =
        {new ModuleStream with
            member _.Run(req) =
                let a,tok = tokenizer.Run(req)
                let b,par = parser.Run(a)
                let b = b >>-* fun x -> error x.parser_errors; x
                a, b, loop (tok, par)
                }
    loop (tokenizer, parser is_top_down)

I'll plug something in here...

let tokenizer =
    let rec loop (lines, errors, blocks) = {new TokenizerStream with
        member t.Run req =
            let replace edit =
                let lines, errors = Tokenize.replace lines errors edit
                let blocks = block_separate lines blocks edit
                lines, errors, blocks

            let next (_,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,[],[])

Let me change this a little.

| DocumentAll text -> replace {|from=0; nearTo=lines.Length; lines=text|} |> next

I'll assume the text in document all is already split into lines.

let liner =
    let rec loop lines =
        {new LinerStream with
            member t.Run req =
                let replace (edit : SpiEdit) = PersistentVector.replace edit.from edit.nearTo edit.lines lines
                let next lines = lines, loop lines
                match req with
                | DocumentAll text -> replace {|from=0; nearTo=lines.Length; lines=text|} |> next
                | DocumentEdit edit -> replace edit |> next
            }
    loop PersistentVector.empty

This stream should do fine.

2:35pm. Focus me. Let me plug this in.

type ModuleStream = abstract member Run : TokReq -> string PersistentVector * TokRes * ParserRes Promise * ModuleStream
let module' error is_top_down =
    let rec loop (liner : LinerStream, tokenizer : TokenizerStream, parser : ParserStream) =
        {new ModuleStream with
            member _.Run(req) =
                let lines,lin = liner.Run(req)
                let a,tok = tokenizer.Run(req)
                let b,par = parser.Run(a)
                let b = b >>-* fun x -> error x.parser_errors; x
                lines, a, b, loop (lin, tok, par)
                }
    loop (liner, tokenizer, parser is_top_down)

Plugged this thing in.

2:45pm. Made adjustments everywhere. Now I have everything I need to print the trace in SupervisorState.

2:50pm. Let me take a short break here.

After that I'll dig out the show trace functions from the previous compiler.

3:10pm. Let me resume.

let show_trace (settings: SpiralCompilerSettings) (trace: Trace, message) =
    let m = Dictionary(HashIdentity.Reference)
    let filter_set = HashSet(settings.filter_list,HashIdentity.Structural)
    let error = System.Text.StringBuilder(1024)
    let x =
        List.toArray trace
        |> Array.filter (fun {module_={name=x}} -> filter_set.Contains x = false)
    if x.Length > 0 then
        x.[0..(min x.Length settings.trace_length - 1 |> max 0)]
        |> Array.rev
        |> Array.iter (show_position m error)
    error.AppendLine message |> ignore
    error.ToString()

This is from the previous compiler.

let show_position m (strb: StringBuilder) {module_={name=name; code=code}; line=line; column=col} =
    let er_code = Utils.memoize m Utils.lines code |> fun x -> x.[line - 1]

    strb
        .AppendLine(sprintf "Error trace on line: %i, column: %i in module %s." line col name)
        .AppendLine(er_code)
        .Append(' ', col - 1)
        .AppendLine "^"
    |> ignore

3:15pm. Focus me. Let me just do this.

I'll do the errors and then I am essentially done.

    type BuildResult =
        | BuildOk of string
        | BuildErrorTrace of string
        | BuildFatalError of string

Let me intro this type.

3:25pm.

    type BuildResult =
        | BuildOk of string
        | BuildErrorTrace of string
        | BuildFatalError of string
    let build_file (s : SupervisorState) module_target =
        match inputs s module_target with
        | Ok x ->
            let a,prepass_stream = s.prepass_stream.Run(x)
            let s = {s with prepass_stream=prepass_stream}
            match a with
            | Some x ->
                x >>- fun x ->
                    if x.has_errors then BuildFatalError("There are type errors in at least one module.")
                    else
                        match Map.tryFind "main" x.term with
                        | Some main ->
                            let top_env = package_to_top x
                            let prototypes_instances = Dictionary(top_env.prototypes_instances)
                            let nominals =
                                let t = HashConsing.HashConsTable()
                                let d = Dictionary()
                                top_env.nominals |> Map.iter (fun k v -> d.Add(k, t.Add {|v with id=k|}))
                                d
                            try let (a,_),b = PartEval.Main.peval {prototypes_instances=prototypes_instances; nominals=nominals} main
                                BuildOk(Codegen.Fsharp.codegen b a)
                            with
                                | :? PartEval.Main.TypeError as e -> BuildErrorTrace(show_trace e.Data0 e.Data1)
                                | :? Codegen.Fsharp.CodegenError as e -> BuildFatalError(e.Data0)
                                | :? Codegen.Fsharp.CodegenErrorWithPos as e -> BuildFatalError(show_trace e.Data0 e.Data1)
                        | None -> BuildFatalError(sprintf "Cannot find the main function in module. Path: %s" module_target)
            | None -> Job.result (BuildFatalError(sprintf "Cannot find the target module. Path: %s" module_target))
            >>- fun x -> x,s
        | Error x -> Job.result (BuildFatalError x,s)

This should be good. I am yet to actually implement show_trace though. So that is what I should do next. Let me also pass s into it.

3:30pm. Focus me. Let me just do this.

    let show_trace (s : SupervisorState) (l : PartEval.Main.Trace) (msg : string) =
        failwith ""

This is a good start. Now let me follow through.

3:40pm.

    let trace_print_length = 5
    let show_trace (s : SupervisorState) (x : PartEval.Main.Trace) (msg : string) =
        let error = System.Text.StringBuilder(1024)
        let x =
            let rec loop l i = function
                | x :: x' when i > 0 -> loop (x :: l) (i-1) x'
                | _ -> l
            loop [] trace_print_length x
        List.iter (show_position error) x
        error.AppendLine msg |> ignore
        error.ToString()

Let me do show_position next and I am done.

3:50pm.

    let show_position (s : SupervisorState) (strb: Text.StringBuilder) (x : PartEval.Prepass.Range) =
        let line = (fst x.range).line
        let col = (fst x.range).character
        let er_code = s.modules.[x.path] |> fun ((x,_,_),_) -> x.[line]

        strb
            .AppendLine(sprintf "Error trace on line: %i, column: %i in module: %s." (line+1) (col+1) x.path)
            .AppendLine(er_code)
            .Append(' ', col)
            .AppendLine "^"
        |> ignore

    let trace_print_length = 5
    let show_trace s (x : PartEval.Main.Trace) (msg : string) =
        let error = Text.StringBuilder(1024)
        let x =
            let rec loop l i = function
                | x :: x' when i > 0 -> loop (x :: l) (i-1) x'
                | _ -> l
            loop [] trace_print_length x
        List.iter (show_position s error) x
        error.AppendLine msg |> ignore
        error.ToString()

I am not sure if the VSCRange is 0 based, but I probably is. This is no time for self doubt.

If it is not I'll find out quickly enough.

3:55pm. Now that I've done this let me take a break.

4pm. Let me commit here. I am thinking about the next step. The next step would be to put the BuildFile request in the supervisor and then make use of this right?"


Friday 2020-12-04 17:31:38 by flyingfishfusealt

new progress

Life is pain, that bitch left a hole in my psyche that all my spirit drains from.


Friday 2020-12-04 18:46:34 by NewsTools

Created Text For URL [www.dispatchlive.co.za/news/2020-12-04-jilted-lover-allegedly-kills-girlfriend-injures-sister-in-law/]


Friday 2020-12-04 19:01:04 by Rebecca Witinok-Huber

I've started to organize the ses dataset. I'm not trying to join it with the larimer tigris census data by the fips codes, however, I'm struggling because the fips are different. Do either of you know where the Denver example that Brooke was talking about in class on Wednesday is? The issue that our datasets don't have coords, so we'll need to match the fips to the cities and then get lat lon from a different dataset.

Thoughts? Suggestions?


Friday 2020-12-04 19:07:09 by ayekat

MPD: Use Pulseaudio via TCP - harder than it should be

It's actually quite simple:

  • Pulseaudio has the ability to listen for audio streams on a TCP socket (with module-native-protocol-tcp), on port 4713.
  • MPD has the ability to stream audio to Pulseaudio via TCP.

So essentially, we only need to write $XDG_CONFIG_HOME/pulse/default.pa that loads the desired module, and configure mpd to stream to the PA TCP socket, right?

Unfortunately, Pulseaudio does not respect XDG_CONFIG_HOME for reading configuration files (it does so only for the runtime and state files, but ironically not the configuration); it simply searches for a hardcoded ~/.config/pulse/ there.

I believe this is a bug, but who actually fucking knows these days...

So! As a workaround, I could create a dummy ~/.config, with a symlink to my default.pa, but that's ugly. As a less ugly workaround (quite fortunately, actually), I can explicitly tell Pulseaudio which default.pa to use, via PULSE_SCRIPT (hence the additional change in ~/.pam_environment).

And last (and rather least), since we previously ignored the entirety of $XDG_CONFIG_HOME/pulse, we need to adapt the .gitignore file(s) there a bit, too.

phew

In any case, now I can finally use MPD for multi-user setups :-)


Friday 2020-12-04 21:24:41 by Nikita Voloboev

analytics art generative-art books startups cli azure aws-lambda computer-graphics computer-vision image-processing computer-science parsing bitcoin data-science blockchain ethereum postgresql sqlite design-inspiration fonts framer icons rpcs economy fpga hardware knowledge-graphs success macOS pytorch machine-learning ml-models graph-neural-networks category-theory geometry linear-algebra math music-artists music-production networking nlp github-actions github kubernetes ios other quantum-computing cpp go-libraries haskell-libraries react-components react-hooks vue julia-libraries kotlin-libraries lua nim-libraries nim ocaml-libraries ocaml python-libraries rust-libraries rust swift-libraries swift typescript-libraries zig programming protocol-buffers regex serialization research-papers research cryptography dreaming text-editors vim-plugins vs-code-extensions video deno static-sites markdown


Friday 2020-12-04 21:49:50 by wimax-grapl

Add CDK tests to CI; add a test that all pipelines start with the deployment name (#467)

  • I tried but theres a stack overflow

DOESNT WORK but s close stupid region shit

Oh need to make jest ts aware

oh cant ignore js

god this sucks. CfnAlarm vs Alarm

TEST WORKS COOL

  • Revert some unneeded changes

Friday 2020-12-04 22:03:59 by RennKat

Added upcming events

Ran into some trouble where I almost deleted a whole 12 hours of work. My recovery might have messed somethings up, so if we see any weird issues, taht might be the cause. Sorry in advance!


Friday 2020-12-04 23:32:17 by swoerpel

HOLY FUCK I FIGURED OUT THIS RIDICULOUS BUG FINALLY. The text blocks were jumping by just a bit every time you open the map text component, and it took me forever to figure out that on init the getRectBounds of the boundary element im doing the view child with does not initially return the right value because the entire page has not been rendered therefore for a split second the size of the boundary is a bit smaller causing the origin of the text to change. of course once the page renders the correcty value is calcluated and the block was jumping to the right origin. I figured out that instead of calling boundingRect on the viewchild reference, I could just directly reference the element style width and it will initially be the correct value. its a bit hacky to cut off the px and type cast to a number, but considering this is a multi day bug finally solved (havent even been able to reimplement alignment since the refactor) it is for sure okay. Oward with hooking up text size again


< 2020-12-04 >