summaryrefslogtreecommitdiff
path: root/posts
diff options
context:
space:
mode:
Diffstat (limited to 'posts')
-rw-r--r--posts/.dir-locals.el1
-rw-r--r--posts/Writeups for Dennis Yurichev's Reverse Engineering Challenges (#2-#11)/challenges-re-writeups-1.org42
2 files changed, 12 insertions, 31 deletions
diff --git a/posts/.dir-locals.el b/posts/.dir-locals.el
index c7de0d6..4a56f9d 100644
--- a/posts/.dir-locals.el
+++ b/posts/.dir-locals.el
@@ -1,5 +1,6 @@
((org-mode . ((org-html-doctype . "xhtml5")
(org-html-html5-fancy . t)
+ (org-html-with-latex . 'verbatim)
(org-export-with-toc . nil)
(org-export-with-section-numbers . nil)
(org-export-with-sub-superscripts . nil)
diff --git a/posts/Writeups for Dennis Yurichev's Reverse Engineering Challenges (#2-#11)/challenges-re-writeups-1.org b/posts/Writeups for Dennis Yurichev's Reverse Engineering Challenges (#2-#11)/challenges-re-writeups-1.org
index bb8f54d..6ea207c 100644
--- a/posts/Writeups for Dennis Yurichev's Reverse Engineering Challenges (#2-#11)/challenges-re-writeups-1.org
+++ b/posts/Writeups for Dennis Yurichev's Reverse Engineering Challenges (#2-#11)/challenges-re-writeups-1.org
@@ -223,10 +223,10 @@ f(31) = 27
#+END_SRC
There's a pattern of exponential growth here -- every result occurs twice as
-frequently as the previous result. Mathematically, this is $31 - [log_2(n)]$
-where the brackets represent the Greatest Integer Function ($f(x)$ returning the
-largest integer less than or equal to $x$). This can be verified by comparing
-the result of =f= to the following function for some test values:
+frequently as the previous result. Mathematically, this is \(31 - [log_2(n)]\)
+where the brackets represent the Greatest Integer Function (\(f(x)\) returning
+the largest integer less than or equal to \(x\)). This can be verified by
+comparing the result of =f= to the following function for some test values:
#+BEGIN_SRC c :hl_lines 0
int my_f(unsigned n)
@@ -961,9 +961,9 @@ f 8 10
12 8 18
#+END_SRC
-It would seem that this is some sort of "least multiple of $b$ such that $b < a$
-given that $b$ is a power of two, but I feel as though I'm grasping at straws
-here.
+It would seem that this is some sort of "least multiple of \(b\) such that \(b <
+a\) given that \(b\) is a power of two, but I feel as though I'm grasping at
+straws here.
As a Gentoo user, I have the Linux source tree checked out at =/usr/src/linux=,
and because the hint mentions low-level programming, I decided to create a
@@ -1222,9 +1222,9 @@ realization that =helper= worked with hexadecimal digits got me started on ideas
for what =f= might do.
On the topic of =helper=, the reason I was able to pick out that it's checking for
-hexadecimal digits was realizing that $a - 48 \leq 9$ is equivalent to $a \leq
-49 + 9$. The comparison is otherwise pretty unclear. And I suspect that the =-33=
-is related to how ASCII is encoded.
+hexadecimal digits was realizing that \(a - 48 \leq 9\) is equivalent to \(a
+\leq 49 + 9\). The comparison is otherwise pretty unclear. And I suspect that
+the =-33= is related to how ASCII is encoded.
The control flow for =f= is pretty intimidating with its 8 labels. When it came
time to look at =f=, I drew out a rudimentary control flow graph on paper --
@@ -1234,25 +1234,5 @@ the graph), which are conditionals (branches), and which labels are related
(linear relationships).
#+BEGIN_EXPORT html
-<script type="text/x-mathjax-config">
-MathJax.Hub.Config({
- displayAlign: "center",
- displayIndent: "0em",
-
- "HTML-CSS": { scale: 100,
- linebreaks: { automatic: "false" },
- webFont: "TeX"
- },
- SVG: {scale: 100,
- linebreaks: { automatic: "false" },
- font: "TeX"},
- NativeMML: {scale: 100},
- TeX: { equationNumbers: {autoNumber: "AMS"},
- MultLineWidth: "85%",
- TagSide: "right",
- TagIndent: ".8em"
- }
-});
-</script>
-<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML"></script>
#+END_EXPORT