diff --git a/404.html b/404.html new file mode 100644 index 0000000..f8414f0 --- /dev/null +++ b/404.html @@ -0,0 +1,3 @@ + +404 Not Found +

404 Not Found

diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..8694d4d --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +soulware.us \ No newline at end of file diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..859c5b1 --- /dev/null +++ b/about/index.html @@ -0,0 +1,61 @@ + + + + + + + soulware.us + + + + + + + + +
+

+ about me +

+

+

hey! i'm sam, i go by "soulware" in most corners of the web (that i can get the username), and "qsa" in still other parts. here are some things about me

+

i love computer science. it's really fun to solve problems and understand the tech we use daily inside and out. i've been especially interested in compilers and type theory lately. i'm also a big fan of reverse engineering and decompilation projects

+

i really like playing, analyzing, and making games. some of them are on itch.io and github. i also love speedrunning but so far i've been more of a spectator. i have one submitted run on speedrun.com and have completed the game DUET as fast as possible on iOS. i've also dabbled in speedrunning both "Seedling" and "The End is Nigh".

+

i also like listening to music a lot. my last.fm is here. at the moment i'm enjoying digital hardcore, breakcore, general dnb stuff, "ethereal" music, and various rap genres. some of my favorite artists right now are Machine Girl, miya lowe/evaboy, Sudan Archives, pink siifu, Grouper, Death Grips, Bladee (generally drain gang), Lauren Bousfield, and The Garden.

+

wow! here's an image of albums made in the 2020s that i really like:

+ + +

here's some websites where i consume media! i use backloggd to journal games i play. that site is mainly ripped from letterboxd which is what i use to track movies and (some) tv shows.

+

last updated 9 Dec 2022

+ +
+ + diff --git a/blog/first/index.html b/blog/first/index.html new file mode 100644 index 0000000..2c867e9 --- /dev/null +++ b/blog/first/index.html @@ -0,0 +1,55 @@ + + + + + + + soulware.us + + + + + + + + +
+

+ hello world! +

+

2021-04-01

+

first blog post to get this site started.

+ +

I set this site up with zola, which is a pretty nice static site generator.

+ +
+ + diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..4d61b4f --- /dev/null +++ b/blog/index.html @@ -0,0 +1,73 @@ + + + + + + + soulware.us + + + + + + + + +
+
+

+ blog posts +

+
+
+ +
+
+ + diff --git a/blog/test/index.html b/blog/test/index.html new file mode 100644 index 0000000..a4337bc --- /dev/null +++ b/blog/test/index.html @@ -0,0 +1,59 @@ + + + + + + + soulware.us + + + + + + + + +
+

+ hello new world +

+

2022-12-09

+

another blog post! finally.

+ +

along with this post comes a general overhaul of the site's content as i move it towards something i appreciate on a personal level. after looking at a lot of really cool personal sites i decided it would be no fun if my own website was just a bland reflection of who i am.

+

i'm still trying to figure out how to fracture myself across this wonderful internet. at the moment i'm planning to use this as a kind of "devlog", both as motivation for myself to complete things (by documenting what i do) and to share information with the rest of the world. i might at some point soon add a tagging system. my plan is to post media analysis stuff to a tumblr which i am also setting up but i might as well just post it here too, if i can...

+

will also be documenting my projects here soon, in their very own little tab on the side. need to get a handle on which ones are good enough, as well as start and finish a few, since they are quite scattered at the moment.

+

i also have some WIP blogposts. i'll probably be putting up my minecraft server setup guide. there's plenty of information on this i'm sure, but it really should be easy to get something up running and sustainable, and you can do it all from the CLI! this guide is as much for myself as for anyone else, but after trying to follow it i've noticed it's a bit lacking..

+

planning to have some other cool stuff to show off or talk about by the end of this year so stay tuned. :-)

+ +
+ + diff --git a/color/dark.css b/color/dark.css new file mode 100644 index 0000000..575a485 --- /dev/null +++ b/color/dark.css @@ -0,0 +1 @@ +:root{--background: #282c34;--foreground: #bbc2cf;--border-color: rgba(255, 255, 255, 0.3);--link-color: rgb(81, 175, 239);--link-visited: rgb(105, 158, 160);--link-hover: rgb(211, 134, 155);--link-active: rgb(177, 98, 134);--accent: rgb(142, 192, 124);--accent-visited: #7e9872} \ No newline at end of file diff --git a/color/light.css b/color/light.css new file mode 100644 index 0000000..da1e30c --- /dev/null +++ b/color/light.css @@ -0,0 +1 @@ +:root{--background: #282828;--foreground: #ebdbb2;--border-color: rgba(255, 255, 255, .1);--link-color: rgb(129, 162, 190);--link-visited: rgb(84, 150, 153)} \ No newline at end of file diff --git a/fonts/FiraCode-Bold.woff b/fonts/FiraCode-Bold.woff new file mode 100644 index 0000000..dd7abb6 Binary files /dev/null and b/fonts/FiraCode-Bold.woff differ diff --git a/fonts/FiraCode-Regular.woff b/fonts/FiraCode-Regular.woff new file mode 100644 index 0000000..5e4106f Binary files /dev/null and b/fonts/FiraCode-Regular.woff differ diff --git a/images/topsters2020-2022.png b/images/topsters2020-2022.png new file mode 100644 index 0000000..b006947 Binary files /dev/null and b/images/topsters2020-2022.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..ab8df75 --- /dev/null +++ b/index.html @@ -0,0 +1,77 @@ + + + + + + + soulware.us + + + + + + + + +
+

+ sam (soulware) +

+

+ studying computer science and mathematics at Northeastern University +

+ + + +
+
+

+ hello new world +

+
+

another blog post! finally.

+ +
+ +
+
+

+ hello world! +

+
+

first blog post to get this site started.

+ +
+ + +
+ + diff --git a/math/index.html b/math/index.html new file mode 100644 index 0000000..4537d58 --- /dev/null +++ b/math/index.html @@ -0,0 +1,272 @@ + + + + + + + + +

Super Magic Box

+

+ Put in a value for D to compute its Super Magic Box: + +

+ + + + + + + + + + + + + + + + + + + + + + +
+ + n + +
+ + + + A + n + + = + + a + + n + + 1 + + + + C + + n + + 1 + + + + + A + + n + + 1 + + + + +
+ + + + C + n + + = + ( + D + + + A + n + 2 + + ) + / + + C + + n + + 1 + + + + +
+ + + + a + n + + = + + + ( + + A + n + + + + + a + 0 + + ) + / + + C + n + + + + + +
+ + + + p + n + + = + + a + n + + + p + + n + + 1 + + + + + + p + + n + + 2 + + + + +
+ + + + q + n + + = + + a + n + + + q + + n + + 1 + + + + + + q + + n + + 2 + + + + +
+ + + + p + n + 2 + + + D + + q + n + 2 + + + +
+

+ The fundamental unit in + + + + [ + + D + + ] + + + is + + + a + + + b + + D + + , with norm N +

+

+ A factorization of D is given + by + + + g + c + d + ( + p + + + C + , + D + ) + = + d + + D + = + d + * + + ( + p + + + C + ) + + + +

+ + diff --git a/processed_images/topsters2020-2022.c512c423d7967f87.png b/processed_images/topsters2020-2022.c512c423d7967f87.png new file mode 100644 index 0000000..48863f8 Binary files /dev/null and b/processed_images/topsters2020-2022.c512c423d7967f87.png differ diff --git a/resume/index.html b/resume/index.html new file mode 100644 index 0000000..c258564 --- /dev/null +++ b/resume/index.html @@ -0,0 +1,53 @@ + + + + + + + soulware.us + + + + + + + + +
+

+ resume +

+

+

currently working on this. if you need my resume feel free to contact me.

+ +
+ + diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..24c0d9b --- /dev/null +++ b/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: +Allow: / +Sitemap: https://soulware.us/sitemap.xml diff --git a/scripts/smb.js b/scripts/smb.js new file mode 100644 index 0000000..b104cf3 --- /dev/null +++ b/scripts/smb.js @@ -0,0 +1,184 @@ +// algorithm for smb: +// n = -2 (so, 0 index for array of pn, qn) +// p = 0, q = 1 +// n = -1 (so, 1 index for array of pn, qn) +// p = 1, 1 = 0 +// n = 0 (so, 0 index for An and Cn) -> A = 0, C = 1 +// then, algorithm on loop: +// a[n] = Math.floor((A[n] + a0) / C[n]) +// p[n + 2] = a[n] (term just computed) * p[n + 1] + p[n] +// q[n + 2] = a[n] (term just computed) * q[n + 1] + q[n] +// A[n + 1] = a[n] * C[n] - A[n] +// C[n + 1] = (D - A[n]^2) / C[n] + +let smbTable = { + table: document.getElementById("smb"), + n: document.getElementById("smb-n"), + A: document.getElementById("smb-An"), + C: document.getElementById("smb-Cn"), + a: document.getElementById("smb-an"), + p: document.getElementById("smb-pn"), + q: document.getElementById("smb-qn"), + pell: document.getElementById("smb-pell"), +}; + +let fundDvalues = document.getElementsByClassName("smb-fund-D-value"); +let fundAvalue = document.getElementById("smb-fund-a-value"); +let fundBvalue = document.getElementById("smb-fund-b-value"); +let fundNormValue = document.getElementById("smb-fund-norm-value"); + +let factpValue = document.getElementById("smb-fact-p-value"); +let factCValue = document.getElementById("smb-fact-C-value"); +let factdvalues = document.getElementsByClassName("smb-fact-d-value"); +let factOtherValue = document.getElementById("smb-fact-other-value"); + +let gcd = function (x, y) { + let a = Math.max(x, y); + let b = Math.min(x, y); + while (b != 0) { + let temp = a; + a = b; + b = temp % b; + } + return a; +}; + +let smb = function (D, maxIteration = 1000) { + let p = [0, 1]; + let q = [1, 0]; + let A = [0]; + let C = [1]; + let a = [Math.floor(Math.sqrt(D))]; + let pell = []; + + let n = 0; + let found = false; + while (!found) { + p[n + 2] = a[n] * p[n + 1] + p[n]; + q[n + 2] = a[n] * q[n + 1] + q[n]; + pell[n] = p[n + 2] * p[n + 2] - D * q[n + 2] * q[n + 2]; + A[n + 1] = a[n] * C[n] - A[n]; + C[n + 1] = (D - A[n + 1] * A[n + 1]) / C[n]; + a[n + 1] = Math.floor((A[n + 1] + a[0]) / C[n + 1]); + found = n > 0 && C[n] === 1; + n++; + if (n > maxIteration) { + break; + } + console.log(C[n]); + } + + // finish off the row that we ended on + if (found) { + p[n + 2] = a[n] * p[n + 1] + p[n]; + q[n + 2] = a[n] * q[n + 1] + q[n]; + pell[n] = p[n + 2] * p[n + 2] - D * q[n + 2] * q[n + 2]; + } + + return { + n: n, + p: p, + q: q, + A: A, + C: C, + a: a, + pell: pell, + }; +}; + +let clearTable = function () { + let rows = smbTable.table.rows; + for (let i = 0; i < rows.length; i++) { + let cellCount = rows[i].cells.length; + for (let j = 1; j < cellCount; j++) { + rows[i].deleteCell(1); + } + } +}; + +let populate = function (D) { + // clear all rows except for the first, which describe the equation + clearTable(); + if (D === " " || Math.sqrt(D) % 1 === 0 || D <= 0) { + console.log("D must be a positive, squarefree integer."); + return; + } + + let superMagicBox = smb(D); + + for (let n = -2; n < 0; n++) { + let nCol = smbTable.n.insertCell(); + nCol.innerHTML = n; + let ACol = smbTable.A.insertCell(); + ACol.innerHTML = ""; + let CCol = smbTable.C.insertCell(); + CCol.innerHTML = ""; + let aCol = smbTable.a.insertCell(); + aCol.innerHTML = ""; + let pCol = smbTable.p.insertCell(); + pCol.innerHTML = superMagicBox.p[n + 2]; + let qCol = smbTable.q.insertCell(); + qCol.innerHTML = superMagicBox.q[n + 2]; + let pellCol = smbTable.pell.insertCell(); + pellCol.innerHTML = ""; + } + + // then we can just insert everything based on a proper index + for (let n = 0; n < superMagicBox.n; n++) { + let nCol = smbTable.n.insertCell(); + nCol.innerHTML = n; + let ACol = smbTable.A.insertCell(); + ACol.innerHTML = superMagicBox.A[n]; + let CCol = smbTable.C.insertCell(); + CCol.innerHTML = superMagicBox.C[n]; + let aCol = smbTable.a.insertCell(); + aCol.innerHTML = superMagicBox.a[n]; + let pCol = smbTable.p.insertCell(); + pCol.innerHTML = superMagicBox.p[n + 2]; + let qCol = smbTable.q.insertCell(); + qCol.innerHTML = superMagicBox.q[n + 2]; + let pellCol = smbTable.pell.insertCell(); + pellCol.innerHTML = superMagicBox.pell[n]; + } + + // List what the fundamental value is. + for (let i = 0; i < fundDvalues.length; i++) { + fundDvalues[i].innerHTML = D; + } + let a = superMagicBox.p[superMagicBox.n]; + let b = superMagicBox.q[superMagicBox.n]; + fundAvalue.innerHTML = superMagicBox.p[superMagicBox.n]; + fundBvalue.innerHTML = superMagicBox.q[superMagicBox.n]; + fundNormValue.innerHTML = a * a - D * b * b; + + let factorizationFound = false; + for (let n = 1; n < superMagicBox.C.length; n++) { + let candidate = superMagicBox.C[n]; + if ( + Math.sqrt(candidate) % 1 === 0 && + (n - 1) % 2 === 1 && + !factorizationFound + ) { + factorizationFound = true; + let p = superMagicBox.p[n + 1]; + let candidateRoot = Math.sqrt(candidate); + let d = gcd(p + candidateRoot, D); + let otherFactor = D / d; + factpValue.innerHTML = p; + factCValue.innerHTML = candidateRoot; + for (let i = 0; i < factdvalues.length; i++) { + factdvalues[i].innerHTML = d; + } + factOtherValue.innerHTML = "" + otherFactor + ""; + break; + } + } + // TODO: maybe do somthing here if we don't find a factor. not sure if necessary +}; + +let dForm = document.getElementById("input-D"); +if (window.addEventListener) { + dForm.addEventListener("keyup", () => populate(dForm.value), false); +} else if (window.attachEvent) { + dForm.attachEvent("onkeyup", () => populate(dForm.value)); +} diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..1973ef8 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,26 @@ + + + + https://soulware.us/ + + + https://soulware.us/about/ + + + https://soulware.us/blog/ + + + https://soulware.us/blog/first/ + 2021-04-01 + + + https://soulware.us/blog/test/ + 2022-12-09 + + + https://soulware.us/math/ + + + https://soulware.us/resume/ + + diff --git a/smb.css b/smb.css new file mode 100644 index 0000000..42da45e --- /dev/null +++ b/smb.css @@ -0,0 +1 @@ +input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}table{border-collapse:collapse;border:2px solid #000;letter-spacing:1px}td{border:1px solid #000;padding:4px 8px;justify-content:center}table td:first-child{position:sticky;left:0;background:#fff;z-index:1} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..b6fdc5c --- /dev/null +++ b/style.css @@ -0,0 +1 @@ +#navbar{position:fixed;display:flex;top:0;bottom:0;left:0;width:10rem;color:#fbf1c7}nav li{list-style:none;line-height:2em}nav a{text-decoration:none;color:var(--foreground)}nav a:hover,nav a:visited:hover{color:var(--link-hover);text-decoration:underline}nav a:visited{color:var(--link-visited)}nav a:active{color:var(--link-active)}@font-face{font-display:swap;font-family:"Fira Code";font-style:normal;font-weight:400;src:url("fonts/FiraCode-Regular.woff") format("woff")}@font-face{font-display:swap;font-family:"Fira Code";font-style:normal;font-weight:800;src:url("fonts/FiraCode-Bold.woff") format("woff")}body{font-family:verdana,sans-serif;font-size:1rem;line-height:1.4;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiasing;background:var(--background);color:var(--foreground)}main{max-width:45rem;padding:2rem;margin:auto}main p{padding-bottom:1rem}main a{color:var(--link-color)}main a:visited{color:var(--link-visited)}main li{margin:0 0 10px 0}main article:not(:last-of-type){border-bottom:1px solid var(--border-color)}@media only screen and (max-device-width: 736px){main{padding:0rem}}.container{display:flex;justify-content:space-between}.post-preview{display:flex;flex-direction:column}.post-preview p{margin-top:.5rem}.post-title{color:var(--accent);position:relative;font-size:1.5rem;margin-bottom:.25rem}.post-title a{color:inherit;text-underline-position:under}.post-title a:visited{color:var(--accent-visited)}.post-excerpt{margin-top:0rem} \ No newline at end of file