Skip to content

Latest commit

 

History

History
488 lines (316 loc) · 27 KB

2021-09-19.md

File metadata and controls

488 lines (316 loc) · 27 KB

< 2021-09-19 >

2,166,763 events, 1,304,555 push events, 1,736,375 commit messages, 93,827,125 characters

Sunday 2021-09-19 00:09:46 by Linus Torvalds

pipe: avoid unnecessary EPOLLET wakeups under normal loads

commit 3b844826b6c6affa80755254da322b017358a2f4 upstream.

I had forgotten just how sensitive hackbench is to extra pipe wakeups, and commit 3a34b13a88ca ("pipe: make pipe writes always wake up readers") ended up causing a quite noticeable regression on larger machines.

Now, hackbench isn't necessarily a hugely meaningful benchmark, and it's not clear that this matters in real life all that much, but as Mel points out, it's used often enough when comparing kernels and so the performance regression shows up like a sore thumb.

It's easy enough to fix at least for the common cases where pipes are used purely for data transfer, and you never have any exciting poll usage at all. So set a special 'poll_usage' flag when there is polling activity, and make the ugly "EPOLLET has crazy legacy expectations" semantics explicit to only that case.

I would love to limit it to just the broken EPOLLET case, but the pipe code can't see the difference between epoll and regular select/poll, so any non-read/write waiting will trigger the extra wakeup behavior. That is sufficient for at least the hackbench case.

Apart from making the odd extra wakeup cases more explicitly about EPOLLET, this also makes the extra wakeup be at the end of the pipe write, not at the first write chunk. That is actually much saner semantics (as much as you can call any of the legacy edge-triggered expectations for EPOLLET "sane") since it means that you know the wakeup will happen once the write is done, rather than possibly in the middle of one.

[ For stable people: I'm putting a "Fixes" tag on this, but I leave it up to you to decide whether you actually want to backport it or not. It likely has no impact outside of synthetic benchmarks - Linus ]

Link: https://lore.kernel.org/lkml/20210802024945.GA8372@xsang-OptiPlex-9020/ Fixes: 3a34b13a88ca ("pipe: make pipe writes always wake up readers") Reported-by: kernel test robot oliver.sang@intel.com Tested-by: Sandeep Patil sspatil@android.com Tested-by: Mel Gorman mgorman@techsingularity.net Signed-off-by: Linus Torvalds torvalds@linux-foundation.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org


Sunday 2021-09-19 01:27:15 by zbostock56

Merge branch 'main' of https://github.com/zbostock56/Pictopass Fuck you


Sunday 2021-09-19 03:21:25 by Michael-Burke

Fuck you and fuck you and FUCK EVERYONE I hate PS1


Sunday 2021-09-19 08:47:13 by Ævar Arnfjörð Bjarmason

wrapper.c: add x{un,}setenv(), and use xsetenv() in environment.c

Add fatal wrappers for setenv() and unsetenv(). In d7ac12b25d3 (Add set_git_dir() function, 2007-08-01) we started checking its return value, and since 48988c4d0c3 (set_git_dir: die when setenv() fails, 2018-03-30) we've had set_git_dir_1() die if we couldn't set it.

Let's provide a wrapper for both, this will be useful in many other places, a subsequent patch will make another use of xsetenv().

The checking of the return value here is over-eager according to setenv(3) and POSIX. It's documented as returning just -1 or 0, so perhaps we should be checking -1 explicitly.

Let's just instead die on any non-zero, if our C library is so broken as to return something else than -1 on error (and perhaps not set errno?) the worst we'll do is die with a nonsensical errno value, but we'll want to die in either case.

We could make these return "void" (as far as I can tell there's no other x*() wrappers that needed to make that decision before), i.e. our "return 0" is only to indicate that we didn't error, which we would have died on. Let's return "int" instead to be consistent with the C library function signatures, including for any future code that expects a pointer to a setenv()-like function.

I think it would be OK skip the NULL check of the "name" here for the calls to die_errno(). Almost all of our setenv() callers are taking a constant string hardcoded in the source as the first argument, and for the rest we can probably assume they've done the NULL check themselves. Even if they didn't, modern C libraries are forgiving about it (e.g. glibc formatting it as "(null)"), on those that aren't, well, we were about to die anyway. But let's include the check anyway for good measure.

  1. https://pubs.opengroup.org/onlinepubs/009604499/functions/setenv.html

Signed-off-by: Ævar Arnfjörð Bjarmason avarab@gmail.com


Sunday 2021-09-19 12:04:25 by Aidan Hall

neocities scrapper

I wrote this to find the page a fake Covid-19 vaccine passport web site hosted by neocites (Still waiting for a response from them). It loops through the search pages and looks for the target URL. The site has been reported to the ASD (Australian Signals Directorate). If you are thinking of creating an Australian fake Covid-19 vaccination certificate website please know I'll find and report you. Don't fuck around, just get the jab for yourself and people around you. The vaccine isn't an invasion of your rights, it's an obligation of living in a productive society. If we know which page has the site listed we can then go and find the site statics including: The time it was first uploaded The time it was last updated Traffic stats about the site including total requests and unique requests


Sunday 2021-09-19 12:14:53 by Hcay

Max:

  • competitive sports: stay clean changed to chicken & broccoli; +15 health from +5
  • Streamer: hell yeah -> POG!; Now this option +5 Mood from 0
  • tech support does not seem legit: no sprite -> telemarketer (should have added before dont know why it disappeared)
  • clone_evil import settings changed, reverted the "asked to clone your master" card sprite scale
  • asked to build a machine/to power the machine/test an experimental: -> no sprite -> evil_scientist
  • you are the last one left.../Alzhemier's/An angry racoon/There is some rustling/What do you do/What epic Quest/ : I didn't change anything really

Sunday 2021-09-19 15:02:23 by Jacob

pain, suffering even

i hope i didnt just fuck everything up


Sunday 2021-09-19 16:11:20 by Marko Grdinić

"9:25am. I am just chilling. Any mail? Nope.

Let me finish this and I'll resume the book.

9:55am. Let me start. It is time to get some learning done. I've been having fun designing the next run, but it is not yet the time to commit to it. I'll want to embrace probabilistic programming properly. I'll do it all properly this time.

10:20am. One problem that has been bugging me is how to get stochastic policies even with MCTS. I think that policy stochasticity comes from uncertainty in the value estimates. In that case, I should get that naturally by sampling the action values.

10:25am. Forget winning at poker for the time being. For some reason the toy game is a lot harder than it seems at first glance.

But black hole of the future, the technological Singularity still beckons to me. I do not want to be an observer drawn into it. I want to be the actor to bring it about. The responsibility I took upon myself is to be honest with my beliefs reflect them in my actions in reality.

It can't be helped that I am so weak. It is not for the lack of effort.

Did I make a mistake spending so much time making a ML library and a language? Did I make a mistake not going with probabilistic programming from the start? Am I going to miss the new hardware wave due to not having money to access it? Am I really not going to make an agent that is viable for real world use?

10:25am. Even if everything I had done was a mistake, I can still win if I correct my course and do the right thing from here on out. So that is what I will do. I still have time in my life for a single victory. I am not on my last leg here.

Forget Spiral for the time being. Since Python is so slow I have no choice but to pick Julia if I want to do simulations together with ML.

Maybe I'll get a chance to make use of Spiral for AI chips, maybe not. If I had power I could have won in my chosen way and I would not have trouble making things work the way I wanted. But because I could not make this most essential step of winning everything is up to luck and always floundering on the edge of abyss.

I have no choice, but to keep putting in the effort in hope of getting away from such a precarious position.

10:30am. Let me continue with the book. If I am going to read a single prob theory book in my life, this one is not a bad pick.

10:55am. 131/758. It feels like the sum and the product rules are never going to be natural to me. Well, I'll get it at some point.

11:30am. 145/758. Almost done with chapter 4.

Yeah, I should leave the past behind. Spiral was the easy part. Programming languages are easy. For AI, I am going to have to steal and pillage left and right. My ego lead me to the creation of Spiral, but I've done AI directly for maybe 1.5 years only. And I've been mislead and deceived constantly.

Right now I might not have gained anything too concrete, but I can clearly see how CFR for example relates to probabilistic reasoning. Had I know more probability theory, that is at an intuitive level, it is likely I could have derived it myself based on that understanding.

This cliches it.

The Bayesians are on the right side. The reason why I hid such a hard limit in my development is because I've been studying the wrong thing - deep learning and RL, instead of probabilistic programming and probability theory.

I need to reforge my foundation from the ground up and change my ways of thinking.

11:40am. https://www.cantorsparadise.com/why-probability-theory-is-hard-af838f053882

Let me finish the chapter and I'll read this.

Honestly, that probability theory can be used as logic is really groundbreaking for me. I am all about making use of logic, so being able to extend my basic toolset and strengthen my foundation would be the single most positive development I could make.

https://www.youtube.com/playlist?list=PL9v9IXDsJkktefQzX39wC2YG07vw7DsQ_

Oh, there is a series of lectures based on the book by Jaynes.

152/768. Let me stop here near the start of chapter 5.

In 1982, Kahnemann, Slovic and Tversky published “Judgement under uncertainty: Heuristics and biases” and shattered humanity’s collective self-delusion that we had any functional intuition for even the most rudimentary problems in probability theory. This work has seen a renaissance in popularity since the publication of Kahnemann’s rather more accessible “Thinking fast and slow”.

I keep hearing things about Kahnemann. I'll check out his work at some point. Let me read that article and then I'll have breakfast.

I'll finish chapter 5 after that, and then I'll go through the Gen tutorials.

12:50pm. Let me resume.

1:20pm. 162/768.

We see that divergence of opinions is readily explained by probability theory as logic, and that it is to be expected when persons have widely different prior information. But wherewas the error in the reasoning that led us to conjecture (5.20)? We committed a subtle form of the mind projection fallacy by supposing that the relation ‘D supports S’ is an absolute property of the propositions D and S. We need to recognize the relativity of it; whether D does or does not support S depends on our prior information. The same D that supports S for one person may refute it for another. As soon as we recognize this, then we no longer expect anything like (5.20) to hold in general. This error is very common; we shall see another example of it in Section 5.7.

Kahneman and Tversky (1972) claimed that we are not Bayesians, because in psycho�logical tests people often commit violations of Bayesian principles. However, this claim is seen differently in view of what we have just noted. We suggest that people are reasoning according to a more sophisticated version of Bayesian inference than they had in mind.

2:15pm.

This example illustrates what we have noted before in Chapter 1; that familiar problems of everyday life may be more complicated than scientific problems, where we are often reasoning about carefully controlled situations. The most familiar problems may be so complicated – just because the result depends on so many unknown and uncontrolled factors – that a full Bayesian analysis, although correct in principle, is out of the question in practice. The cost of the computation is far more than we could hope to win on the horse.

Then we are necessarily in the realm of approximation techniques; but, since we cannot apply Bayes’ theorem exactly, need we still consider it at all? Yes, because Bayes’ theorem remains the normative principle telling us what we should aim for. Without it, we have nothing to guide our choices and no criterion for judging their success.

It also illustrates what we shall find repeatedly in later chapters: that generations of workers in this field have not comprehended the fact that Bayes’ theorem is a valid theorem, required by elementary desiderata of rationality and consistency, and have made unbeliev�ably persistent attempts to replace it by all kinds of intuitive ad hockeries. Of course, we expect that any sincere intuitive effort will capture bits of the truth; yet all of these dozens of attempts have proved on analysis to be satisfactory only in those cases where they agree with Bayes’ theorem after all.

We are at a loss, however, to understand what motivates these anti-Bayesian efforts, because we can see nothing unsatisfactory about Bayes’ theorem, either in its theoretical foundations, its intuitive rationale, or its pragmatic results.

When I took the PGM course, I was raring to go into deep learning and wanted to see what exists as an alternative. The professor just rambled on and on about arcane stuff that had no relevance on anything I wanted to do. Maybe if the course was about variational inference and probabilistic programming instead of graph models things would have gone differently.

Maybe if she hammered that probability theory is an extension of logic, things would have sunk more deeply, but as it is that course did more harm than good. I spent a full month going through it, but I barely gained anything out of it. I did the programming exercises, but did not understand them. I was actually disgusted by the course by the end of it.

The main problem that zero effort to relate Bayesian inference to what is going on in deep learning and RL was made. So it was the Bayesian stuff that seemed like an ad-hoc thing to me. But now it is obvious that it is deep learning and RL that are ad hoc things.

My job for the next few years will be in fact to relate them to probability theory.

Right now I can see how CFR relates. There will be more where that comes from. I need to grasp nesting properly. I need to go beyond the Bayesian rules and reimagine them as a part of a type system. It is good that probaiblity theory is an extension of logic, but a step forward would be to figure out what would be an extension of type theory.

Probabilities are not the same as regular types.

You can interpret P(X) as some type, but I feel that things are way too open ended this way.

The writer has devoted some 40 years to the analysis of thousands of separate problems by Bayes’ theorem, and is still being impressed by the beautiful and important results it gives us, often in a few lines, and far beyond what those ad hockeries can produce. We have yet to find a case where it yields an unsatisfactory result (although the result is sometimes surprising at first glance, and it requires some meditation to educate our intuition and see that it is correct after all)

Needless to say, the cases where we are at first surprised are just the ones where Bayes’ theorem is most valuable to us; because those are the cases where intuitive ad hockeries would never have found the result. Comparing Bayesian analysis with the ad hoc methods which saturate the literature, whenever there is any disagreement in the final conclusions, we have found it easy to exhibit the defect of the ad hockery, just as the analysis of Chapter 2 led us to expect, and as we saw in the above example.

Sigh. Why is the field of ML so shit? Why did I have to suffer defeat twice? Why am I constantly being led astray?

2:40pm. 179/758. Let me stop here. Those are 4 chapters down. I guess this book will be my goto work related time waster.

Next up is the Gen tutorial.

# load a dataset
using RDatasets
iris = dataset("datasets", "iris");

# load the StatsPlots recipes (for DataFrames) available via:
# Pkg.add("StatsPlots")
using StatsPlots

# Scatter plot with some custom settings
@df iris scatter(
    :SepalLength,
    :SepalWidth,
    group = :Species,
    title = "My awesome plot",
    xlabel = "Length",
    ylabel = "Width",
    m = (0.5, [:cross :hex :star7], 12),
    bg = RGB(0.2, 0.2, 0.2)
)

The plots here work nice. I am going to have to get familiar with the plots package.

2:50pm. Focus me, focus. Forget the ML sub.

Right now, my problem is that I don't know how to translate the Gen examples, and I am not sure I care either.

Let me print out the data first.

It is really annoying that I did not get PyPlots to work. That would have been an ideal solution.

    ax = gca()
    ax[:set_xlim]((xmin, xmax))
    ax[:set_ylim]((xmin, xmax))

What is this supposed to be?

https://www.math.purdue.edu/~allen450/Plotting-Tutorial.html

Pros:

  • Tons of functionality
  • 2D and 3D
  • Mature library
  • Well supported in Plots.jl

Cons:

  • Uses python
  • Dependencies frequently cause setup issues
  • Inconsistent output depending on Matplotlib version

Yeah, that cons is what I am running into.

2:55pm. Let me go through that plotting tutorial.

3pm. Oh, this tutorial is very nice. I can select the PyPlot as a backend within Plots.

3:10pm. I find if funny how PyPlot is raising warnings on every example.

3:20pm. This is good, but I do not understand how to stack multiple plots on the same page.

Oh, I can scroll between them with page up and down.

Great.

3:35pm. https://github.com/nassarhuda/JuliaTutorials/blob/master/plotting.ipynb

Ok these are enough examples to tide over my curiosity. Let me go back to gen.

function test_plot()
    show(scatter(rand(10)))
    return nothing
end
test_plot()

I can't get the plot to show up from inside the function.

https://discourse.julialang.org/t/plot-inside-a-function/31297

function test_plot()
    display(scatter(rand(10)))
    return nothing
end
test_plot()

This works nicely.

3:45pm.

function render_trace(trace; show_data=true)

    # Pull out xs from the trace
    xs = get_args(trace)[1]

    xmin = minimum(xs)
    xmax = maximum(xs)
    if show_data
        ys = [trace[(:y, i)] for i=1:length(xs)]

        # Plot the data set
        scatter(xs, ys, c=:black)
    end

    # Pull out slope and intercept from the trace
    slope = trace[:slope]
    intercept = trace[:intercept]

    # Draw the line
    display(plot!([xmin, xmax], slope *  [xmin, xmax] .+ intercept, color="red", alpha=0.5))
    # ax = gca()
    # ax[:set_xlim]((xmin, xmax))
    # ax[:set_ylim]((xmin, xmax))
end;

render_trace(trace)

This works. I am not sure what those 3 lines are supposed to be doing, but it does not matter.

https://docs.juliaplots.org/latest/layouts/

Oh, it is possible to have subplots.

4:20pm. Taking a break. Let me read the docs while I have this ice cream.

5pm. https://www.gen.dev/tutorials/intro-to-modeling/Introduction%20to%20Modeling%20in%20Gen

I do not really feel like dealing with the non-working plotting code right, but I am running the examples.

5:25pm. Damn it, I do not feel like it anymore. I should be trying out the interval example, but I do not give a damn. I spent my creative budget for the day on the PT book.

This is so boring.

I'll take a look at the rest of the tutorials tomorrow and then start putting things into action. I should use Gen and try it out on some RL task.

Whatever the case, I should be working towards porting my old stuff on Julia and putting the plan for the poker agent into action.

5:30pm. I really should make the time to go through the rest of the PT book. This is something I should have some familiarity with.

Yeah, it is fine if I spend my next couple of days going through the book. Going into it without full readiness is not my cup of tea. I need to overcome the boredom. Sure it is boring now because I am passively and inefficiently absorbing the information, but much like it has been the case with Hinton's course years down the road, I will know this material by heart eventually.

5:35pm. It is so annoying. I just can't deal with the world right now. I've failed at the second run, have to pick up Julia, have to pick up probability theory, have to pick up probabilistic programming and then I have a great big pile of work with bringing in my old stuff. I am at my lowest point right now.

I want a month just so I can deal with all of this in peace and quiet. I do not want any responsibilities. I want to believe that once I get this done, that I'll have the agent.

I'll have to apply myself.

https://juliareinforcementlearning.org/

This seems like a start in RL.

https://github.com/mkschleg/RLTutorial.jl

5:45pm. Does Gen have any tutorials on VI? That is what I am looking for right now. My boredom level is reaching its limit.

https://github.com/probcomp/GenExamples.jl/search?q=variational

Nope, there aren't any examples.

5:55pm. I need to come up with a plan of what I want to do.

I know what I want to implement for poker now. And none of that actually needs probabilistic programming. It is just a change in the approach that spurned me forward.

One thing I am going to need is Julia. I am going to be doing simulations and I cannot bear the 1,000x hit in performance that I get even with Cython. I made the wrong choice when I picked Python.

If has Flux which should suffice my DL needs.

I've gone over Gen tutorials, but I really do not need anything it offers me. I need VI. Turing has it. Do I want to use Turing?

6pm. I need to get familiar with what VI actually is. For that I should take a look at the Pyro tutorials.

The relevant info is all spread out. The reality is that if a library is good at one thing, it won't be good at another.

For some reason whenever I think of probabilistic programming, I always get the sense it would be a really good fit for discrete optimization kinds of tasks. It really generalizes some of the things I did during those courses.

6:05pm. But is besides the point. if I try studying things at random I'll run out of willpower soon.

The main takeaway from September is that my attitude towards ML is completely wrong and that I am vastly overvaluing the capability of deep nets.

I want to use them to guide some other procedure such as MCTS, and VI fits that kind of framework very well. I need to work towards mastering that techinque.

Then it is decided.

Tomorrow I'll bury myself in Pyro tutorials. That is probably the best source imaginable for studying variational inference. I'll master that and implement whatever I need in my own library when the time comes.

Right now I do not need it, but in order to pay my respects to prob programming I'll make this effort.

After I've come to an understanding of it, I'll try my new approach on poker.

6:10pm. Let me close here for the day."


Sunday 2021-09-19 16:29:21 by Joshua Byron

hate hate hate my life

nothing works this is stupid


Sunday 2021-09-19 20:40:47 by MilkyNail (MariaMod)

Add files via upload

  • Fixed the exit link for the "jerk off classmate" scene
  • Fixed the problem with a bikini at the Beach. Also, now you can go to the town wearing it (from the Beach)
  • Modified the brother's and sister's schedules. It removed a couple of old related bugs (like an always-at-home brother)
  • Now, if you are pregnant and you know this, the system will uncheck options "Take fertility pill" and "Take sterility pill" every morning
  • Removed another pop-up error window in the "sitting on dad's lap" final scene
  • Fixed some variables with missing identifiers (which caused red line errors)
  • Removed the fifth porn magazine (that doesn't appear) from the brother's room
  • Now wet wipes and sterility pills are showing in the old version and resets if any error appears
  • Added an NSFW scene by Melo! When looking for troubles in the Night Club, one man can molest you roughly. Warning, this scene is a bit too rough, but NOT non-consensual, so you can't avoid it by turning off the non-consensual setting
  • Fixed the sissy brother perk error. Also, now it requires less corruption (20 yours and 20 brother's), and I changed the related article in the Help menu

Sunday 2021-09-19 23:13:52 by mcfry

Add lower spirit thresholds and start 2s tick timer when drinking

Added lower spirit thresholds to get rid of some of the issues with Blessing of Wisdom and other similar buffs. Blessing of wisdom has its own tick and was restarting the 2s tick timer. Also made the 5s tick timer end early if the player is drinking; this is critical for players who want to use the timer to 'tick drink' like myself. Tick drinking is running and starting to drink right before the tick, so you can move and drink at the same time.


< 2021-09-19 >