Skip to content

Instantly share code, notes, and snippets.

@kp666
kp666 / a-preface.md
Created January 2, 2024 10:15 — forked from Hirrolot/a-preface.md
A complete implementation of the positive supercompiler from "A Roadmap to Metacomputation by Supercompilation" by Gluck & Sorensen

Supercompilation is a deep program transformation technique due to V. F. Turchin, a prominent computer scientist, cybernetician, physicist, and Soviet dissident. He described the concept as follows [^supercompiler-concept]:

A supercompiler is a program transformer of a certain type. The usual way of thinking about program transformation is in terms of some set of rules which preserve the functional meaning of the program, and a step-by-step application of these rules to the initial program. ... The concept of a supercompiler is a product of cybernetic thinking. A program is seen as a machine. To make sense of it, one must observe its operation. So a supercompiler does not transform the program by steps; it controls and observes (SUPERvises) the running of the machine that is represented by the program; let us call this machine M1. In observing the operation of

Purpose

A primary goal of all the conferences and user groups that refer to this Code of Conduct is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status and religion (or lack thereof).

This Code of Conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.

We invite all those who participate in our events to help us create safe and positive experiences for everyone.

Open [Source/Culture/Tech] Citizenship

A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.

@kp666
kp666 / inflation.js
Last active February 25, 2021 01:34
// Compound interest
// Compound interest increases as a certain percentage
// of the principal each year. This gives us the formula
const compoundInterest = ({principal, ratePercentage, time}) => {
return principal * ((1 + ratePercentage/100) ** time);
};
const initialAmount =({finalAmount,ratePercentage, time })=> {
return finalAmount/((1 + ratePercentage/100) ** time);
require 'ox'
xml = %{
<top name="sample">
<middle name="second">
<bottom name="third">Rock \u266A bottom</bottom>
</middle>
</top>
}
require 'ox'
xml = %{
<top name="sample">
<middle name="second">
<bottom name="third">Rock \u0003 bottom</bottom>
</middle>
</top>
}
udp://public.popcorn-tracker.org:6969/announce
http://104.28.1.30:8080/announce
http://104.28.16.69/announce
http://107.150.14.110:6969/announce
http://109.121.134.121:1337/announce
udp://public.popcorn-tracker.org:6969/announce
http://104.28.1.30:8080/announce
http://104.28.16.69/announce
http://107.150.14.110:6969/announce
http://109.121.134.121:1337/announce
@kp666
kp666 / sample.js
Created December 27, 2019 17:09
sample.js
app.post('/login', function (req, res, next) {
passport.use(new GoogleStrategy({
clientID: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
callbackURL: "http://localhost:3000/auth/google/dashboard",
userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo"
},
function(accessToken, refreshToken, profile, cb) {
if(profile._json.hd === "nitc.ac.in"){
User.findOrCreate({ googleId: profile.id ,displayName:profile.displayName,email:profile.emails[0].value}, function (err, user) {
app.post('/login', function (req, res, next) {
passport.use(new GoogleStrategy({
clientID: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
callbackURL: "http://localhost:3000/auth/google/dashboard",
userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo"
},
function(accessToken, refreshToken, profile, cb) {
if(profile._json.hd === "nitc.ac.in"){
User.findOrCreate({ googleId: profile.id ,displayName:profile.displayName,email:profile.emails[0].value}, function (err, user) {

Keybase proof

I hereby claim:

  • I am kp666 on github.
  • I am kp666 (https://keybase.io/kp666) on keybase.
  • I have a public key ASBhjlhuJvSrL9eBqSeOCrswCVQP_YaR4wZSkXyJw9z4AQo

To claim this, I am signing this object: