Skip to content

Latest commit

 

History

History
402 lines (260 loc) · 22.3 KB

2020-09-20.md

File metadata and controls

402 lines (260 loc) · 22.3 KB

< 2020-09-20 >

2,074,218 events, 1,279,604 push events, 1,645,721 commit messages, 83,568,291 characters

Sunday 2020-09-20 02:13:28 by Rida Dzhaafar

Removed evil mode (for good this time).

Note to self:

I love vim keybindings, but I like consistent user interfaces more. Evil mode requires way too much tweaking. Learning the default emacs keybindings (as painful as it was) really paid off. So long, dear friend.


Sunday 2020-09-20 04:37:48 by Brendan Khoury

Updated readme

Inspiration

We were inspired by the funny but useless DesktopGoose application. DesktopGoose places a goose on the screen which preforms random actions, pulling open notes, memes, moving the cursor etc. We also set out to solve a common problem: Getting distracted while coding.

What it does

Octofocus creates an Octocat in the bottom right corner of the users screen. Whenever the Octocat detects the user is not staying on task, it gets angry, steals the cursor, and moves the cursor to the minimize button on the current window.

How we built it

OctoFocus was written in C# as a mod for DesktopGoose.

To detect whether the user was on task or not, we did the following. We defined a set of applications/websites to be productive and another set to be unproductive. From there, we compared the title of the active window to the sets. If the title is productive, then the Octocat becomes happy. If the title is unproductive and the user stays on the application for more than 15 seconds, the AI controlling the Octocat switches to angry which follows the cursor, grabs it and places it on the minimize button.

Challenges we ran into

It took us a while to understand the API because it had almost no documentation. One of our members also didn't know any C#. Another issue surrounded the rotation of Octocat. Whenever we tried to rotate the bitmap, an orange halo would form around the sprite. After a couple hours of debugging, we decided to move on and finish the project.

Accomplishments that we're proud of

We are proud of how we were able to figure out the API despite it not being very clear. We also are proud of our idea as it is a fairly unique take to keeping users on task.

What we learned

We learned a lot about C# and understanding how to use an API without documentation.

What's next for OctoFocus

In the future, OctoFocus could be expanded to include more animations and emotions. Rewarding users for being on task, giving words of encouragement, etc. It would be funny if the Octocat would drag windows around the more a user stays off task. Finally, implementing a config file for identifying which applications are productive/unproductive.


Sunday 2020-09-20 07:33:08 by GLAdOS

Ncurses support has begun

After 10 god damn years, i finally got unicode characters to display properly. By not following any of the stupid fucking asnwers i found.


Sunday 2020-09-20 08:24:46 by Marko Grdinić

"8:35pm. https://palladiummag.com/2020/09/17/palladium-podcast-42-how-war-drives-technological-progress/

Although power exerts itself in many different forms: wealth, persuasion, force, religion, social orders, ultimately the structure of governments and states is most heavily influenced by force. The ability to project physical power and a state's will to accomplish goals, and using this he creates a pair of axis for analysing the forms of governments which you see in history, which are actually dependent on the weapons systems which are dominant in those eras. So the thesis is - you don't see governments in history promoting themselves using the best weapons system. You actually see the best weapons system of an era bringing into being forms of government which are best suited to build it.

1:19h in and this insight by Quigley is pretty interesting. I am going to listen to the suggestion to read the first chapter.

8:50pm. The interview towards the end is actually quite interesting, much more so than at the beginning. He suggests the following book and recommends at least the first chapter.

http://www.carrollquigley.net/pdf/Weapons%20Systems%20and%20Political%20Stability.pdf

The counter example to Rome, a large state with good offensive weapons for taking fortifications and lots of roads for projecting force over distance was when those roads went away, and when castled became ubiquitous - what did you see? A huge collapse in size of states.

Then on that other axis as you've mentioned - specialist and amateur is the axis of how many people does it take to actually equip an army and for the state to use force. And when you see the need for lots of men, either to hold a spear like in democratic Greece or to hold a rifle in the 19th century, you see the need to have very democratic states with direct democracy because a vote that counts how many people believe one thing or another is actually a great representation of power.

This is great insight.

But of the ways nuclear weapons affected out world and affected the structure of governments and affected our lives is that the best way to build them and maintain them and operate them is with a manageurial bureaucracy. You need a large civil service that knows how to build these things and then knows how to take care of them and makes sure that they are used under the right circumstance, and makes sure that the use of them is messaged correctly. And you want the derisking of your bureaucracy to do a lot of that.

9:55pm. Right now I am reading the book. Here is an interesting quote from it.

The ideological factor in power relationships, which I have called persuasion, operates through a process which is frequently misunderstood. It does not consist of an effort to get someone else to adopt our point of view or to believe something they had not previously believed, but rather consist of showing them that their existing beliefs require them that they should do what we want.

10pm. Now he talks about animals respecting the prescripting right of property.

11:10pm. I suppose reading this book beats reading Reverend Insanity. Here is another juicy quote.

In this connection it is revealing that the ideological appeal for allegiance in the last two thousand years of Europe's history (and, indeed, in most of mankind's earlier history) made almost no effort to reach or attract the peasants, who were, throughout history down to the nineteenth century, not only the most numerous class in society but were also, of course, the economic support of the power structure. This failure to make ideological appeal to the most numerous and most necessary group in the community was a consequence of the facts of power which are being discussed in this book.

Whatever the number of the tilers of the soil or the indispensable nature of their contribution to the community, their power has always been insignificant, except in the few, relatively brief periods when they have been of military importance to the community. Except for the period about 4000 B.C. and for a few centuries in Roman history and an even briefer in some areas of Greek history, the peasantry has played almost no role in military life and, accordingly almost no role in political life of the communities which have made history.

This military or geopolitical incapacity of the tilers of the soil, so glaringly evident under feudalism or the Thirty Years War, was a function of the distribution of weapons and of military organization, and is a remarkable example of the weakness of economic necessity in contrast with the role of force in any society. As we'll see, the rise of in political significance of the peasants and the farmers in the nineteenth century, a rise which never took them to the dominant position, was a consequence of changes of weapons, a fact almost unmentioned by the historians of the modern period.

A similar neglect of peasants has existed in most of history, but on a gigantic scale, in Asia and in Africa, and, above all in China, as we shall see.

11:30pm. 59/1064. This is just so good.

Weapons systems not only influence the size of power areas; they also influence the quality of life within that area. The most significant factor here is concerned with whether a weapons system is "amateur" in character or is "specialist." By "amateur" I mean weapons which are cheap to obtain and easy to use, while by "specialist" weapons I mean those which are expensive to obtain and difficult to use. Both of those criteria can be defined more narrowly. A weapons system is "cheap" if it can be obtained by the savings of an ordinary man in the community over no more than a year. A weapons system is "easy to use" if such an ordinary mean can become adept in its use in a training period measured in weeks or months. By this criteria the period about 1880 was the golden age of amateur weapons, for at that time the best weapons in the world were probably the Winchester rifle and the Colt revolver. Both could be bought by the ordinary man for not much more than a hundred dollars, and, in the United States at least, most men could obtain a hundred dollars in the course of an year. Moreover, any man could learn how to use these two weapons in a period of days or weeks. Thus about 1880 the ordinary citizens of the United States could obtain the best weapons available at that time, and no government could obtain any better weapons. In such a situation, in which most or many men can get the best weapons, men are relatively equal in power and no minority can easily force a majority to yield to its rule. Thus there is a tendency, in such a period, for the appearance of the political equality and majority rule (or at least for the rule by the large group which can obtain weapons). Such amateur weapons have been dominant only rarely in history, most notably in Athens and in fifth century B.C. and in Rome shortly after that time. At those two periods also, there was a tendency towards political democracy.

On the other hand, on many occasions in the past, the best available weapons have been so expensive that only a few persons in a society have been able to obtain them, and usually, at such times, the weapons available have been difficult to use so that long periods of training were necessary to use them effectively. About 1100 A.D. in Europe, there were two "supreme" weapons, the medieval knight and the medieval castle. Both of these, especially the castle were so expensive that not one man in a hundred could afford them, and they could be used effectively only with years of training. The same thing was true about 1200 B.C. when horse drawn chariots and stone castles, as at Homeric Troy, were the dominant weapons. And now a similar situation had been developing over the last few decades, so that today the most effective weapons, such as jet planes, armored vehicles, mobile artillery, and even nuclear weapons are so expensive that only governments rather than individuals can afford them, and some of them cannot be afforded by many governments.

The training period for the use of such weapons is measured in years rather than in months, although in the United States, as a survival from 1880 we still try to man an army equipped with such weapons by drafting men for two years. This is just another example of the failure of the 20th century to recognize the passing of the 19th century and of our persistence in retaining patterns which grew up in the previous period into the present where they are largely not applicable.

In any such period of specialist weapons, which can be obtained and used by a small minority of the population, there is a tendency for the government which can command such forces to become increasingly authoritarian.

11:55pm. This is what I am doing at this time. I really need to remember to link this in tomorrow's entry otherwise it will be a huge waste.

9/20/2020

10:20am. Today I am up somewhat earlier. Let me chill for a while now that I am done tying up some loose ends.

Let me do my morning reading, I will have breakfast, and then I will start. Forget starting right away. Though I will try to make the morning break shorter. I should aim to start at 12pm today."


Sunday 2020-09-20 09:07:42 by Wafelack

Adding wastebasket to del output and permise to put rs or rust where the fuck you want


Sunday 2020-09-20 10:05:26 by KFZ

Updated the (UN)License

do whatever the fuck you want


Sunday 2020-09-20 12:19:26 by Marko Grdinić

"12:25pm. Done with breakfast. I am almost ready to start. Just a bit more...

12:35pm. Ok, it is time to start. Forget Black Company for a while. Today I am in a good mood. Last night I went to bed late, but I had pretty deep sleep so I am quite rested today.

  1. Default values
  2. Statement generalization
  3. Type applies
  4. Macro types
  5. Join point types
  6. Function types

Let me put up these bullet points. I need to think of what exactly do I want to do regarding annotations.

Ok, default values and statement generalization has been taken care of. Type applies I do not need to do anything else...

Actually, let me introduce type application.

| RawTypeApply of Range * RawExpr * RawTExpr

I want this bit of extra efficiency during partial evaluation.

Er, no wait. I am adding it to the wrong AST.

        | RawApply(r,a,b) ->
            match f a, f b with
            | ERecord a, ESymbolCreate(_,b) ->
                match Map.tryFind b a with
                | Some x -> x
                | None -> raise (PrepassException [r,RecordIndexFailed b])
            | a,EType(_,b) -> ETypeApply(r,a,b)
            | a,b -> EApply(r,a,b)

Let me do it like this.

12:50pm. You know, I meant to allow attaching function types during partial evaluation, but instead how about I make that functionality specific to the prepass? Let me do it like that. I'll free up partial evaluation as much as I can.

1pm.

        | RawAnnot(_,RawFun(_,a),t) ->
            match compile_pattern None a with
            | EFun(r,a,b,c,_) -> EFun(r,a,b,c,Some (ty env t))
            | _ -> failwith "Compiler error: RawFun should result in a function."

This takes care of function annotations. I've really been thinking what to do if a function that has an annotation encounters an annotation that does not match it, but with this decision the way annotations work will be straightforward.

Annotations for the sake of closure conversion can now exist only in one place.

1:05pm. Focus me, stop daydreaming.

Now only join points are left.

...Hmmm...

let rec insert_annot a = function
    | RawJoinPoint(r,b) -> RawJoinPoint(r,insert_annot a b)
    | b -> RawAnnot(range_of_expr b +. range_of_texpr a,b,a)

Yeah, I am going to change the way join points work. Rather than having an annotation on the inside, I am going to make it so that is require an annotation on the outside. Then I am going to make it a part of the node during prepass.

Forget this scheme where I fold it in during parsing.

let inline annotated_body sep exp ty =
    pipe2 (opt (skip_op ":" >>. ty))
        (skip_op sep .>>. opt exp)
        (fun a (r,b) ->
            let b = match b with Some b -> b | None -> RawMissingBody r
            match a with
            | Some a -> RawAnnot(range_of_expr b +. range_of_texpr a,b,a)
            | None -> b)

This should be like so.

Let also check out the operators to make sure it does not do any folding.

        pipe2 (tdop Int32.MinValue)
            (opt (skip_op ":" >>. root_type_annot))
            (fun a -> function Some b -> RawAnnot(range_of_expr a +. range_of_texpr b,a,b) | _ -> a)
            d

It is straightforward. Ok.

In fill I am already putting the join point annotations on the outside. What I need to do is just do a bit extra during the prepass.

1:20pm.

| RawReal(r,a) -> EReal(r,term env a)

What is this doing here? Out.

| EJoinPoint of Range * FreeVars * E * T option

Let me put the free vars into the join point.

Let me remove RawInline. I will leave EInline in though. The way I will evaluate clauses the pattern compilation will be different than before.

| EPatternMemo of E // Acts as a temporary join point during the prepass.

Let me make it this.

| EPrototypeApply of Id * T

Hmmm, this of all things should have Range.

1:35pm. Ok, now things are great. I got rid of inline.

Let me take a short break here.

1:50pm. Let me resume.

        | RawMacro(r,a) ->
            let a = a |> List.map (function
                | RawMacroText(r,a) -> MText a
                | RawMacroTermVar(r,a) -> MTerm(f a)
                | RawMacroTypeVar(r,a) -> MType(ty env a)
                )
            EMacro(r,a)

Ah, I forgot the macro. Let me deal with this.

        | RawMacro -> failwith "Compiler error: The macro's annotation should have been added during `fill`."
        | RawAnnot(_,RawMacro(r,a),b) ->
            let a = a |> List.map (function
                | RawMacroText(r,a) -> MText a
                | RawMacroTermVar(r,a) -> MTerm(f a)
                | RawMacroTypeVar(r,a) -> MType(ty env a)
                )
            EMacro(r,a,ty env b)

This is good. With this the annotations have been taken care of.

2:05pm. I am thinking.

| EPatternMemo of Range * E // Acts as a temporary join point during the prepass.

I won't need this this time around. Last time I really did need RawInline, but now I am going to evaluate the clause body before I do the compilation so it won't be necessary.

The reason why I can do this right now, but could not last time is because the non-disjointedness rules. I'll also do a little pass to add all the variables to the environment beforehand.

2:05pm. With the current scheme in mind, it really brings into perspective how messed up the pattern compilation was last time. I really went out of my way to make it as expressive as possible, but I really should not have.

2:10pm. I have a different mindset now.

One thing I am seriously considering right now is getting rid of active patterns.

They were useful in v0.09 where most of the time I used them like...

inl f (!dyn x) = ...

dyn was the most common use case.

Now I have a special operator for that.

inl f (~x) = ...

One consideration for removing it right at the outset is that at some point it would allow me to do active patterns better than they are now.

https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/active-patterns

I actually like how F# does active patterns. What I have in Spiral was useful, but it is too simplistic.

Yeah, let me get rid of them.

Before that, let me commit here. I feel just a tad unsure about getting rid of the previously done work on them, and now that I've dealt with annotations, this is a good time to save."


Sunday 2020-09-20 12:41:17 by Marko Grdinić

"```fs | PatActive of Range * RawExpr * Pattern


Let me get rid of this.

This will definitely simplify the language.

```fs
            | PatActive(r,a,b) ->
                let w,z = fresh_var(),fresh_var()
                unify r z (TyFun(s, w))
                term env z a
                f w b

Hmmm, I could have done this like...

            | PatActive(r,a,b) ->
                let w = fresh_var()
                term env (TyFun(s, w)) a
                f w b

Well, it does not matter. Let me get rid of it.

2:25pm. Good. This will simplify the language a bit.

And it will open the door to doing it properly at some point should I feel like it.

2:35pm. Let me take a break since I've already started it.

The next thing on the list is definitely pattern and typecase compilation. I should be able to do both of those today.

At this point the prepass is perfectly set up. I should take some time to think about pattern compilation before I start.

2:40pm. This is really wonderful. Yeah, this is how life should be.

Programming wise, all the hardship is behind me and now I just have to put in a token effort to get something of great value. The past me really did he best, and it will soon be time that I get the benefit of that. I'll also get to show off as a bonus.

Let me take some time off from the screen."


Sunday 2020-09-20 17:16:10 by mudkipz5

SOUNDASDNOAJNSAJFS

Fuckin Oxygen's got sound and shit now yo And you know when you're running out of boost ANd like... ...I think that's about it actually idk you'll figure it out probably


Sunday 2020-09-20 21:01:19 by Fuglore

m-o-s-s, until i fucken' die

why cant i be like that dude, with the silverface, i just wanna live my life at my own fuckin' pace

  • made mosconi punks have unique effects

  • removed some garbage code from copbase

  • made punk rage stats eviler


< 2020-09-20 >