diff --git a/content/contact.org b/content/contact.org new file mode 100644 index 0000000..ef32557 --- /dev/null +++ b/content/contact.org @@ -0,0 +1,18 @@ +#+TITLE: Contact Information +#+DATE: <2022-09-17 Sat> +#+TAGS: contact + +* Email + +~humanoidsandvichdispenser@gmail.com~ + +Encrypt with [[https://sandvich.xyz/sandvich.gpg][GPG key]] \\ +~curl https://sandvich.xyz/sandvich.gpg | gpg --import~ \\ +~1643 9496 7ED2 8385 A5FE DBCD 9A39 BE37 E602 B22D~ + +All emails from me will be signed with my GPG key. + +* Discord/Matrix + +Discord: ~pyro from csgo#6740~ \\ +Matrix: ~@humanoidsandvichdispenser:matrix.org~ diff --git a/content/posts/discord-sucks.org b/content/posts/discord-sucks.org new file mode 100644 index 0000000..07dedf0 --- /dev/null +++ b/content/posts/discord-sucks.org @@ -0,0 +1,20 @@ +#+TITLE: Discord Sucks +#+DATE: <2022-09-17 Sat> +#+DRAFT: true + +I've been a long-time Discord user, but over the years, I have come to realize that Discord sucks. + +* No end-to-end encryption + +This is a huge security flaw that allows anyone who gets access to Discord's servers to read your private messages. Discord does not have any end-to-end encryption and neither will they consider implementing it in the future. This actually becomes more important over the past few years as Discord shifts its focus from gamers to general users. What used to be an app to keep gaming communities connected has now become a platform for any type of online chat. + +* Not decentralized + +When you create a server, you're not actually starting up a private instance of Discord where you and your friends can privately communicate. + +* You sound like a schizo. + +Ok + +* What should I use instead? + diff --git a/content/posts/everyone-should-learn-c.org b/content/posts/everyone-should-learn-c.org index 3daba03..b591c8e 100644 --- a/content/posts/everyone-should-learn-c.org +++ b/content/posts/everyone-should-learn-c.org @@ -45,25 +45,26 @@ If something ever goes wrong in the middle of your code, it's easier to see what * You will understand what abstractions do -Higher-level languages do a good job at abstracting this information from you that you do not have to worry about it. +Higher-level languages do a good job at abstracting information from you that you do not have to worry about it. One of the most common abstractions in higher level languages you will see is memory allocation. -One of the most common abstractions in higher level languages you will see is memory allocation. +C gives you the tools to manually allocate data on the heap. Using these tools can give you a better understanding on how stack and heap memory works. -The way you learn arrays in higher level languages is that they store an ordered list of objects that you can index by an integer. Indices typically start at 0 because it just is. +Higher level languages like Java and C# have garbage collectors that automatically free memory. This makes your life significantly easier. No more dangling pointers, and handling memory is much safer. But it can make it more difficult to understand what is going on under the hood. + +A good example of something abstracted away from higher level languages is the concept of an array. In a higher level language, an array is an object that has a size property and bounds checking. High school computer science classes will teach you it's only a data type to store a list of other data. #+begin_src python array = [ None ] * 4 -# THIS LANGUAGE IS NOT WHOLESOME POGGERS WHY DOES YOUR CRINGE LANGUAGE START AT ZERO array[0] = 2 array[1] = 30 array[2] = 4 array[3] = 8 #+end_src -In C, an array is just a bunch of data allocated in memory next to each other. +In C, an array is just a bunch of data allocated in memory next to each other. They are contiguous blocks of memory that can be accessed with pointer arithmetic. There is no bounds checking, and you have to keep track of the size of the array yourself. -Index notation in C is short for a pointer to an address with an offset. The reason why indices start at 0 is because it's 0 addresses away from the first element. +Index notation in C is short for a pointer with an offset. The reason why indices start at 0 is because it's 0 addresses away from the first element. #+begin_src c int main() { @@ -95,7 +96,9 @@ int main() { The index operator is only simply another way of writing pointer arithmetic. -Higher level languages hide this from you. They won't show you how memory is laid out in a program. +Higher level languages hide this from you. They won't show you how memory is laid out in a program, and they won't show you why an array is a reference type. They just give you an easy way to use an array. + +In C, you have to understand how memory is laid out, and you have to understand how an array is just a contiguous block of memory. This understanding will help you when you need to use a lower level language, or when you need to understand how a higher level language works. * You will understand what you write @@ -142,7 +145,7 @@ But ~velcuz~ and ~funny~ are reference types, so the addresses they are pointing You will also notice that ~velcuz.val~ is equal to ~weeb.val~, and since they are both ~int~, they are compared by value. -If you were starting to learn, it seems to be confusing because there isn't really a way to distinguish a value and a reference. +If you were starting to learn C#, it seems to be confusing because there isn't really a way to distinguish a value and a reference. Here's the same example but in C. @@ -181,10 +184,12 @@ int main() { C, however, distinguishes values and references with pointers and reference operations. It lets you understand how values and references are compared. The nature of pointers and references are become a lot more obvious, whereas in C#, it just appears to be more theoretical. +C shows you that when you compare two reference types in a higher level language, all you're really doing is comparing if they point to the same object, just like how you compare two pointers to an object on the heap. + * Conclusion Although you will not write everything in C, it is good to have a fundamental knowledge in C as it gives you an idea of how your computer and how your favorite language works. -It would be easier to teach a student C as it gives them the practical concepts of programming rather than theoretical concepts and paradigms. Just like in math, it is far easier to understand it if you are able to understand proofs rather than simply memorizing equations. +It would be easier to teach a student C as it gives them the practical concepts of programming rather than logical concepts and paradigms. Just like in math, it is far easier to understand it if you are able to understand proofs rather than simply memorizing equations. Unlike other languages, C is a rather simple language compared to the abstracted high-level languages they commonly teach in high school (and sometimes college) computer science courses. diff --git a/content/tools/memory-quiz-practice.org b/content/tools/memory-quiz-practice.org new file mode 100644 index 0000000..0c7172a --- /dev/null +++ b/content/tools/memory-quiz-practice.org @@ -0,0 +1,17 @@ +#+TITLE: Memory Quiz Practice + +I heckin LOOOVE memory quizzes! + +If there is an issue or something is not working, please describe your issue in [[https://github.com/humanoidsandvichdispenser/memory-quiz][the GitHub repository]]. + +Otherwise, you can describe your issue in: + +- Comments section below +- ~humanoidsandvichdispenser@gmail.com~, [[/sandvich.gpg][GPG key]] +- ~pyro from csgo#6740~ + +#+begin_export html +
Vue app is loading. If it does not load, please enable JavaScript.
+ +#+end_export diff --git a/layouts/index.html b/layouts/index.html index 6b1528e..59352c6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -23,10 +23,10 @@ -
-

Recent Posts

-
- {{ partial "post-list.html" .Site.RegularPages }} +

Tools

+ {{ partial "post-list.html" (where .Site.RegularPages "Section" "tools") }} +

Recent Posts

+ {{ partial "post-list.html" (where .Site.RegularPages "Section" "posts") }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 19daac6..d15289b 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,6 +1,8 @@ diff --git a/static/css/main.css b/static/css/main.css index 5183b60..6545768 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -100,7 +100,7 @@ p { } a { - color: var(--fg1); + color: var(--accent); transition-duration: 200ms; } diff --git a/static/css/post-list.css b/static/css/post-list.css index c899b5a..0136173 100644 --- a/static/css/post-list.css +++ b/static/css/post-list.css @@ -24,3 +24,7 @@ div.post-list { color: var(--fg3); font-family: var(--monospace); } + +a.post-item { + color: var(--fg1); +}