diff options
Diffstat (limited to 'comp/lucas-standen-NEA/writeup/coverpage.ps')
-rw-r--r-- | comp/lucas-standen-NEA/writeup/coverpage.ps | 391 |
1 files changed, 217 insertions, 174 deletions
diff --git a/comp/lucas-standen-NEA/writeup/coverpage.ps b/comp/lucas-standen-NEA/writeup/coverpage.ps index 8f8bbfa..6e032c1 100644 --- a/comp/lucas-standen-NEA/writeup/coverpage.ps +++ b/comp/lucas-standen-NEA/writeup/coverpage.ps @@ -1,6 +1,6 @@ %!PS-Adobe-3.0 %%Creator: groff version 1.23.0 -%%CreationDate: Thu May 16 13:47:28 2024 +%%CreationDate: Tue May 21 15:38:13 2024 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman @@ -52487,244 +52487,287 @@ BP /F0 10/Times-Roman@0 SF(-13-)297.67 48 Q(u32 - unsigned inte)111 84 Q (ger of size 32 bits)-.15 E(i64 - signed inte)111 108 Q (ger of size 64 bits)-.15 E(u64 - unsigned inte)111 132 Q -(ger of size 64 bits)-.15 E(char - single ascii code)111 156 Q/F1 10 -/Times-Bold@0 SF 2.5(3.1.1.2. Adv)111 192 R(anced types)-.1 E F0 -(function - a function that can be used)111 207.6 Q -(struct - initializer for an object)111 231.6 Q -(obj - instance of a struct)111 255.6 Q 1.005(generic - should be a)111 -279.6 R -.2(vo)-.2 G 1.005(ided, remo).2 F -.15(ve)-.15 G 3.505(sc).15 G +(ger of size 64 bits)-.15 E(char - single ascii code)111 156 Q +(\215oat - standard C \215oat)111 180 Q/F1 10/Times-Bold@0 SF 2.5 +(3.1.1.2. Adv)111 216 R(anced types)-.1 E F0 +(function - a function that can be used)111 231.6 Q +(struct - initializer for an object)111 255.6 Q +(obj - instance of a struct)111 279.6 Q 1.005(generic - should be a)111 +303.6 R -.2(vo)-.2 G 1.005(ided, remo).2 F -.15(ve)-.15 G 3.505(sc).15 G 1.005(hecks for data types when inputting v)-3.505 F 1.005 -(alues to functions)-.25 F(will cause man)111 291.6 Q 2.5(yr)-.15 G +(alues to functions)-.25 F(will cause man)111 315.6 Q 2.5(yr)-.15 G (untime errors, ho)-2.5 E(we)-.25 E -.15(ve)-.25 G 2.5(rw).15 G (hen absolutely needed it is useful.)-2.5 E .008 -(err - error type, can be gi)111 315.6 R -.15(ve)-.25 G 2.507(nt).15 G +(err - error type, can be gi)111 339.6 R -.15(ve)-.25 G 2.507(nt).15 G 2.507(ot)-2.507 G .007(erminate function to bring do)-2.507 F .007 (wn the program, or ha)-.25 F .307 -.15(ve i)-.2 H .007(nfo dra).15 F -(wn)-.15 E(on the error)111 327.6 Q(.)-.55 E F1 2.5(3.1.1.3. Arrays)111 -363.6 R F0(Arrays can be sho)111 379.2 Q 2.5(wl)-.25 G(ik)-2.5 E 2.5(es) --.1 G(o:)-2.5 E(x:type[])111 403.2 Q -.4(Wi)111 427.2 S +(wn)-.15 E(on the error)111 351.6 Q(.)-.55 E F1 2.5(3.1.1.3. Arrays)111 +387.6 R F0(Arrays can be sho)111 403.2 Q 2.5(wl)-.25 G(ik)-2.5 E 2.5(es) +-.1 G(o:)-2.5 E(x:type[])111 427.2 Q -.4(Wi)111 451.2 S (th x being the v).4 E(ariable name, type being the type of v)-.25 E (ariable, and [] sho)-.25 E(wing its an array)-.25 E -(All arrays are dynamic, represented by a link)111 451.2 Q -(ed list on the back end.)-.1 E F1 2.5(3.1.1.3.1. Strings)111 475.2 R F0 -(Strings, lik)111 490.8 Q 2.5(ei)-.1 G 2.5(nCa)-2.5 G -(re arrays of chars)-2.5 E F1 2.5(3.1.2. Built)111 526.8 R(in functions) -2.5 E 2.5(3.1.2.1. defun)111 550.8 R F0 -(\(defun a:type b:type returntype)111 566.4 Q(...)131 578.4 Q(...)131 -590.4 Q(\))111 614.4 Q .397(Returns a function that tak)111 638.4 R +(All arrays are dynamic, represented by a link)111 475.2 Q +(ed list on the back end.)-.1 E F1 2.5(3.1.1.3.1. Strings)111 499.2 R F0 +(Strings, lik)111 514.8 Q 2.5(ei)-.1 G 2.5(nCa)-2.5 G +(re arrays of chars)-2.5 E F1 2.5(3.1.2. Built)111 550.8 R(in functions) +2.5 E 2.5(3.1.2.1. defun)111 574.8 R F0 +(\(defun a:type b:type returntype)111 590.4 Q(...)131 602.4 Q(...)131 +614.4 Q(\))111 638.4 Q .397(Returns a function that tak)111 662.4 R 2.897(eAa)-.1 G .397(nd B as an ar)-2.897 F .397(gument \(\214x)-.18 F .397(ed types\), and returns a v)-.15 F .398(alue of return-)-.25 F -(type.)111 650.4 Q F1 2.5(3.1.2.1.1. Err)111 674.4 R(ors)-.18 E F0 -(Can syntax error)111 690 Q(.)-.55 E F1 2.5(3.1.2.2. let)111 726 R 0 Cg -EP +(type.)111 674.4 Q F1 2.5(3.1.2.1.1. Err)111 698.4 R(ors)-.18 E F0 +(Can syntax error)111 714 Q(.)-.55 E 0 Cg EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF(-14-)297.67 48 Q(\(let x:type v)111 84 Q(alue\)) --.25 E/F1 10/Times-Bold@0 SF 2.5(3.1.2.2.1. Err)111 108 R(ors)-.18 E F0 -(Can syntax error)111 123.6 Q(.)-.55 E -(Creates constant x of type type to v)111 147.6 Q(alue.)-.25 E F1 2.5 -(3.1.2.3. set)111 183.6 R F0(\(set x:type v)111 199.2 Q(alue\))-.25 E -(Creates/recreates the v)111 223.2 Q(ariable v)-.25 E(alue of x to v) --.25 E(alue.)-.25 E F1 2.5(3.1.2.3.1. Err)111 247.2 R(ors)-.18 E F0 -(Can syntax error)111 262.8 Q(.)-.55 E F1 2.5(3.1.2.4. if/elif/else)111 -298.8 R F0(\(if condition function\))111 314.4 Q -(\(elif condition function\))111 338.4 Q(\(else function\))111 362.4 Q -(Ex)111 398.4 Q(ecutes the function pro)-.15 E -(vided if the condition is true.)-.15 E(Elif w)111 422.4 Q +/F0 10/Times-Roman@0 SF(-14-)297.67 48 Q/F1 10/Times-Bold@0 SF 2.5 +(3.1.2.2. let)111 84 R F0(\(let x:type v)111 99.6 Q(alue\))-.25 E F1 2.5 +(3.1.2.2.1. Err)111 123.6 R(ors)-.18 E F0(Can syntax error)111 139.2 Q +(.)-.55 E(Creates constant x of type type to v)111 163.2 Q(alue.)-.25 E +F1 2.5(3.1.2.3. set)111 199.2 R F0(\(set x:type v)111 214.8 Q(alue\)) +-.25 E(Creates/recreates the v)111 238.8 Q(ariable v)-.25 E +(alue of x to v)-.25 E(alue.)-.25 E F1 2.5(3.1.2.3.1. Err)111 262.8 R +(ors)-.18 E F0(Can syntax error)111 278.4 Q(.)-.55 E F1 2.5 +(3.1.2.4. if/elif/else)111 314.4 R F0(\(if condition function\))111 330 +Q(\(elif condition function\))111 354 Q(\(else function\))111 378 Q(Ex) +111 414 Q(ecutes the function pro)-.15 E +(vided if the condition is true.)-.15 E(Elif w)111 438 Q (orks the same, e)-.1 E(xcept only if the pre)-.15 E -(vious if statement is f)-.25 E(alse.)-.1 E(Else e)111 446.4 Q -.15(xe) +(vious if statement is f)-.25 E(alse.)-.1 E(Else e)111 462 Q -.15(xe) -.15 G(cutes only if all pre).15 E(vious statements were f)-.25 E(alse.) --.1 E F1 2.5(3.1.2.4.1. Err)111 470.4 R(ors)-.18 E F0(Can syntax error) -111 486 Q(.)-.55 E F1 2.5(3.1.2.5. f)111 522 R(or)-.25 E F0 -(\(for i \(condition\) function\))111 537.6 Q +-.1 E F1 2.5(3.1.2.4.1. Err)111 486 R(ors)-.18 E F0(Can syntax error)111 +501.6 Q(.)-.55 E F1 2.5(3.1.2.5. f)111 537.6 R(or)-.25 E F0 +(\(for i \(condition\) function\))111 553.2 Q (Runs the function while the condition is true, and increments i e)111 -561.6 Q -.15(ve)-.25 G(ry time the function is called.).15 E F1 2.5 -(3.1.2.5.1. Err)111 585.6 R(ors)-.18 E F0(Can syntax error)111 601.2 Q -(.)-.55 E F1 2.5(3.1.2.6. while)111 649.2 R F0 -(\(while condition function\))111 664.8 Q -(Runs the function if the condition is true, k)111 688.8 Q +577.2 Q -.15(ve)-.25 G(ry time the function is called.).15 E F1 2.5 +(3.1.2.5.1. Err)111 601.2 R(ors)-.18 E F0(Can syntax error)111 616.8 Q +(.)-.55 E F1 2.5(3.1.2.6. while)111 664.8 R F0 +(\(while condition function\))111 680.4 Q +(Runs the function if the condition is true, k)111 704.4 Q (eeps running until it is f)-.1 E(alse.)-.1 E F1 2.5(3.1.2.6.1. Err)111 -712.8 R(ors)-.18 E F0(Can syntax error)111 728.4 Q(.)-.55 E 0 Cg EP +728.4 R(ors)-.18 E 0 Cg EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF(-15-)297.67 48 Q/F1 10/Times-Bold@0 SF 2.5 -(3.1.2.7. symbol)111 84 R F0 +/F0 10/Times-Roman@0 SF(-15-)297.67 48 Q(Can syntax error)111 84 Q(.) +-.55 E/F1 10/Times-Bold@0 SF 2.5(3.1.2.7. symbol)111 120 R F0 (\(symbol a:type b:type c:type returntype name:char[] elf:char[]\))111 -99.6 Q .764(Returns a function that tak)111 123.6 R .764(es ar)-.1 F +135.6 Q .764(Returns a function that tak)111 159.6 R .764(es ar)-.1 F .764(guments A, B, C \(of \214x)-.18 F .763 (ed types\), the name of the function, and)-.15 F -(the \214le path of the elf.)111 135.6 Q F1 2.5(3.1.2.7.1. Err)111 159.6 -R(ors)-.18 E F0(Can syntax error)111 175.2 Q(.)-.55 E(Can thro)111 199.2 +(the \214le path of the elf.)111 171.6 Q F1 2.5(3.1.2.7.1. Err)111 195.6 +R(ors)-.18 E F0(Can syntax error)111 211.2 Q(.)-.55 E(Can thro)111 235.2 Q 2.5(wo)-.25 G(ther errors, via returning an err type.)-2.5 E F1 2.5 -(3.1.2.8. struct)111 235.2 R F0(\(struct)111 250.8 Q(_a:type)131 262.8 Q -(b:type)131 274.8 Q(c:type)131 286.8 Q(\))111 310.8 Q .557 -(Returns a struct \(a class\) that can ha)111 334.8 R .857 -.15(ve a d) +(3.1.2.8. struct)111 271.2 R F0(\(struct)111 286.8 Q(_a:type)131 298.8 Q +(b:type)131 310.8 Q(c:type)131 322.8 Q(\))111 346.8 Q .557 +(Returns a struct \(a class\) that can ha)111 370.8 R .857 -.15(ve a d) -.2 H(ef).15 E .557(ault v)-.1 F .557(alue, the def)-.25 F .558(ault v) -.1 F .558(alue can be set using an un-)-.25 F .923 -(derscore in front of the v)111 346.8 R .923(ariable name. A def)-.25 F +(derscore in front of the v)111 382.8 R .923(ariable name. A def)-.25 F .923(ault v)-.1 F .923(ariable will be returned if you use the struct) --.25 F(without specifying a v)111 358.8 Q(alue.)-.25 E -(Use let to assign it a name:)111 382.8 Q(\(let a:struct \(struct)111 -406.8 Q(...)131 418.8 Q(...)131 430.8 Q(...)131 442.8 Q(\))131 454.8 Q -(\))111 478.8 Q(Then to instantiate the struct use the follo)111 502.8 Q -(wing:)-.25 E(\(let a:obj struct\))111 526.8 Q(The struct ar)111 550.8 Q +-.25 F(without specifying a v)111 394.8 Q(alue.)-.25 E +(Use let to assign it a name:)111 418.8 Q(\(let a:struct \(struct)111 +442.8 Q(...)131 454.8 Q(...)131 466.8 Q(...)131 478.8 Q(\))131 490.8 Q +(\))111 514.8 Q(Then to instantiate the struct use the follo)111 538.8 Q +(wing:)-.25 E(\(let a:obj struct\))111 562.8 Q(The struct ar)111 586.8 Q (gument needs to ha)-.18 E .3 -.15(ve b)-.2 H(een set prior).15 E(.)-.55 -E 1.6 -.8(To r)111 574.8 T(ead from the struct use this:).8 E -(\(if \(= a.num b)111 598.8 Q(.num\) .... \))-.4 E(Or if you ha)111 -622.8 Q .3 -.15(ve s)-.2 H(et a def).15 E(ault v)-.1 E -(alue you can use the follo)-.25 E(wing:)-.25 E(\(if \(= a b)111 646.8 Q -(.num\) .... \))-.4 E F1 2.5(3.1.2.8.1. Err)111 670.8 R(ors)-.18 E F0 -(Can syntax error)111 686.4 Q(.)-.55 E F1 2.5(3.1.2.9. Arithmetic)111 -722.4 R(operations)2.5 E 0 Cg EP +E 1.6 -.8(To r)111 610.8 T(ead from the struct use this:).8 E +(\(if \(= a.num b)111 634.8 Q(.num\) .... \))-.4 E(Or if you ha)111 +658.8 Q .3 -.15(ve s)-.2 H(et a def).15 E(ault v)-.1 E +(alue you can use the follo)-.25 E(wing:)-.25 E(\(if \(= a b)111 682.8 Q +(.num\) .... \))-.4 E F1 2.5(3.1.2.8.1. Err)111 706.8 R(ors)-.18 E F0 +(Can syntax error)111 722.4 Q(.)-.55 E 0 Cg EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF(-16-)297.67 48 Q(Simple operations)111 84 Q -(\(+ a b\) returns a + b)111 108 Q(\(- a b\) returns a - b)111 132 Q -(\(* a b\) returns a * b)111 156 Q(\(/ a b\) returns a / b)111 180 Q/F1 -10/Times-Bold@0 SF 2.5(3.1.2.10. Comparison)111 216 R F0 -(All return true or f)111 231.6 Q(alse)-.1 E(\(= a b\) returns if a = b) -111 255.6 Q(\(!= a b\) returns if a != b)111 279.6 Q -(\(> a b\) returns if a > b)111 303.6 Q(\(< a b\) returns if a < b)111 -327.6 Q(\(=> a b\) returns if a => b)111 351.6 Q -(\(=< a b\) returns if a =< b)111 375.6 Q F1 2.5(3.1.2.10.1. Err)111 -399.6 R(ors)-.18 E F0(Can syntax error)111 415.2 Q(.)-.55 E F1 2.5 -(3.1.2.11. cast)111 451.2 R F0(\(cast a:generic type:char[]\))111 466.8 -Q(returns a b)111 490.8 Q(ut cast to data type type, which is a string.) --.2 E F1 2.5(3.1.2.11.1. Err)111 514.8 R(ors)-.18 E F0(Can syntax error) -111 530.4 Q(.)-.55 E(Can thro)111 554.4 Q 2.5(we)-.25 G(rrors, via err) --2.5 E 2.5(,i)-.4 G 2.5(fv)-2.5 G(alue can')-2.75 E 2.5(tb)-.18 G 2.5 -(ec)-2.5 G(ast to a gi)-2.5 E -.15(ve)-.25 G 2.5(nt).15 G(ype.)-2.5 E F1 -2.5(3.1.2.12. typeof)111 590.4 R F0(\(typeof a:generic\))111 606 Q -(returns in a string the type that v)111 630 Q(ariable A is.)-.25 E F1 -2.5(3.1.2.12.1. Err)111 654 R(ors)-.18 E F0(Can syntax error)111 669.6 Q -(.)-.55 E F1 2.5(3.1.2.13. terminate)111 705.6 R F0 -(\(terminate error:error\))111 721.2 Q 0 Cg EP +/F0 10/Times-Roman@0 SF(-16-)297.67 48 Q/F1 10/Times-Bold@0 SF 2.5 +(3.1.2.9. Arithmetic)111 84 R(operations)2.5 E F0(Simple operations)111 +99.6 Q(\(+ a b\) returns a + b)111 123.6 Q(\(- a b\) returns a - b)111 +147.6 Q(\(* a b\) returns a * b)111 171.6 Q(\(/ a b\) returns a / b)111 +195.6 Q F1 2.5(3.1.2.10. Comparison)111 231.6 R F0(All return true or f) +111 247.2 Q(alse)-.1 E(\(= a b\) returns if a = b)111 271.2 Q +(\(!= a b\) returns if a != b)111 295.2 Q(\(> a b\) returns if a > b)111 +319.2 Q(\(< a b\) returns if a < b)111 343.2 Q +(\(=> a b\) returns if a => b)111 367.2 Q(\(=< a b\) returns if a =< b) +111 391.2 Q F1 2.5(3.1.2.10.1. Err)111 415.2 R(ors)-.18 E F0 +(Can syntax error)111 430.8 Q(.)-.55 E F1 2.5(3.1.2.11. cast)111 466.8 R +F0(\(cast a:generic type:char[]\))111 482.4 Q(returns a b)111 506.4 Q +(ut cast to data type type, which is a string.)-.2 E F1 2.5 +(3.1.2.11.1. Err)111 530.4 R(ors)-.18 E F0(Can syntax error)111 546 Q(.) +-.55 E(Can thro)111 570 Q 2.5(we)-.25 G(rrors, via err)-2.5 E 2.5(,i)-.4 +G 2.5(fv)-2.5 G(alue can')-2.75 E 2.5(tb)-.18 G 2.5(ec)-2.5 G +(ast to a gi)-2.5 E -.15(ve)-.25 G 2.5(nt).15 G(ype.)-2.5 E F1 2.5 +(3.1.2.12. typeof)111 606 R F0(\(typeof a:generic\))111 621.6 Q +(returns in a string the type that v)111 645.6 Q(ariable A is.)-.25 E F1 +2.5(3.1.2.12.1. Err)111 669.6 R(ors)-.18 E F0(Can syntax error)111 685.2 +Q(.)-.55 E F1 2.5(3.1.2.13. terminate)111 721.2 R 0 Cg EP %%Page: 17 17 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF(-17-)297.67 48 Q -(Kills the program at the current point, frees all related memory)111 84 -Q 2.5(,p)-.65 G(rints error info stored in error)-2.5 E(.)-.55 E/F1 10 -/Times-Bold@0 SF 2.5(3.1.2.13.1. Err)111 108 R(ors)-.18 E F0 -(Can syntax error)111 123.6 Q(.)-.55 E F1 2.5(3.1.2.14. r)111 159.6 R -(etur)-.18 E(n)-.15 E F0(\(return a:type\))111 175.2 Q(Must be used in \ +/F0 10/Times-Roman@0 SF(-17-)297.67 48 Q(\(terminate error:error\))111 +84 Q(Kills the program at the current point, frees all related memory) +111 108 Q 2.5(,p)-.65 G(rints error info stored in error)-2.5 E(.)-.55 E +/F1 10/Times-Bold@0 SF 2.5(3.1.2.13.1. Err)111 132 R(ors)-.18 E F0 +(Can syntax error)111 147.6 Q(.)-.55 E F1 2.5(3.1.2.14. r)111 183.6 R +(etur)-.18 E(n)-.15 E F0(\(return a:type\))111 199.2 Q(Must be used in \ defun, returns "a" from the function, "a" must be of the functions retu\ -rn type.)111 199.2 Q F1 2.5(3.1.2.14.1. Err)111 223.2 R(ors)-.18 E F0 -(Can syntax error)111 238.8 Q(.)-.55 E(Can thro)111 262.8 Q 2.5(we)-.25 -G(rrors via err)-2.5 E(.)-.55 E F1 2.5(3.2. Questionnair)111 286.8 R 2.5 -(e2f)-.18 G(or Rayn M)-2.75 E 2.5(3.3. Pr)111 322.8 R -(ogramming language and libraries)-.18 E F0 .34 -(As mentioned before Zipp)111 338.4 R 2.84(yw)-.1 G .34 +rn type.)111 223.2 Q F1 2.5(3.1.2.14.1. Err)111 247.2 R(ors)-.18 E F0 +(Can syntax error)111 262.8 Q(.)-.55 E(Can thro)111 286.8 Q 2.5(we)-.25 +G(rrors via err)-2.5 E(.)-.55 E F1 2.5(3.2. Questionnair)111 310.8 R 2.5 +(e2f)-.18 G(or Rayn M)-2.75 E 2.5(3.3. What)111 346.8 R(language do y) +2.5 E(ou use to mak)-.25 E 2.5(eap)-.1 G -.18(ro)-2.5 G +(gramming language).18 E F0 .34(As mentioned before Zipp)111 362.4 R +2.84(yw)-.1 G .34 (ill be written in C, with some parts being written in Zipp)-2.84 F 2.84 -(yi)-.1 G 2.84(tself. I)-2.84 F(will try and k)111 350.4 Q +(yi)-.1 G 2.84(tself. I)-2.84 F(will try and k)111 374.4 Q (eep most dependencies/libraries to a minimal to mak)-.1 E 2.5(et)-.1 G -(he project easier to manage.)-2.5 E F1 2.5(3.3.1. Libraries)111 386.4 R -F0(The libraries I will use are the follo)111 402 Q(wing:)-.25 E 2.5(Cs) -111 426 S(tdlib)-2.5 E 2.5(Cu)111 450 S(nistd)-2.5 E 2.5(Ce)111 474 S -(rrno)-2.5 E(Unix de)111 498 Q(vice \214les)-.25 E(Zipp)111 522 Q 2.5 -(ys)-.1 G(trings)-2.5 E(Zipp)111 546 Q 2.5(yg)-.1 G(raphs)-2.5 E(Zipp) -111 570 Q 2.5(ys)-.1 G(orts)-2.5 E -(Addition libraries \(may not be implemented\):)111 594 Q(Raylib)111 618 -Q 2.5(Cs)111 642 S(ock)-2.5 E(ets + Zipp)-.1 E 2.5(ys)-.1 G(ock)-2.5 E -(ets)-.1 E F1 2.5(3.3.2. Modularization)111 678 R F0 2.062 -.8(To m)111 -693.6 T(ak).8 E 2.962(et)-.1 G .462 -(he project more manageable I will split it into man)-2.962 F 2.961 -(yC\214)-.15 G .461(les, this is to k)-2.961 F .461(eep it from be-)-.1 -F(coming impossible to edit code.)111 705.6 Q -(The \214le layout looks as follo)111 729.6 Q(ws:)-.25 E 0 Cg EP +(he project easier to manage.)-2.5 E F1 2.5(3.3.1. What)111 410.4 R +(is C?)2.5 E F0 3.027(Cw)111 426 S .527 +(as made by Dennis Ritchie, in 1972 at A)-3.127 F(T&T')-1.11 E 3.026(sb) +-.55 G .526(ell labs. It w)-3.026 F .526(as designed to mak)-.1 F 3.026 +(ep)-.1 G(rogram-)-3.026 E .067(ming lo)111 438 R 2.567(wl)-.25 G -2.15 +-.25(ev e)-2.567 H 2.567(ls).25 G .067(ystems f)-2.567 F .067 +(ar easier than it had been before. It w)-.1 F .068 +(as used to create the unix operating)-.1 F .65(system which w)111 450 R +.65(ould go on to inspire most modern operating systems in some w)-.1 F +(ay)-.1 E 3.15(.\()-.65 G .65(macos still)-3.15 F +(has code from the original release of C+unix\).)111 462 Q .377 +(The language quickly caught on outside of bell labs after more a)111 +486 R -.25(va)-.2 G .378(ilable releases of unix arri).25 F -.15(ve)-.25 +G(d).15 E .102(such as bsd 4.4, sun os and GNU. It w)111 498 R .102 +(as found to be able to do all the things that you could do in)-.1 F +(ASM ho)111 510 Q(we)-.25 E -.15(ve)-.25 G 2.5(rw).15 G(ith f)-2.5 E +(ar less a headache.)-.1 E F1 2.5(3.3.2. Wh)111 546 R 2.5(yi)-.15 G 2.5 +(sC)-2.5 G(?)-2.5 E F0 .469(As mentioned C can do an)111 561.6 R .469 +(ything that ASM can do, meaning it is lightning f)-.15 F .469 +(ast and can tak)-.1 F 2.969(ea)-.1 G(d-)-2.969 E -.25(va)111 573.6 S +.345(ntage of direct memory access. This allo).25 F .345(ws you to mak) +-.25 F 2.845(ev)-.1 G .345(ery f)-2.995 F .345(ast lightweight e)-.1 F +-.15(xe)-.15 G .345(cutables that).15 F .239(can ri)111 585.6 R -.25(va) +-.25 G 2.739(lt).25 G .239(he performance of handwritten ASM \(often be\ +ating it if you enable compiler optimisa-)-2.739 F .159 +(tions\). It is this that mak)111 597.6 R .159 +(es C the perfect language for an)-.1 F 2.659(ya)-.15 G .158 +(nd all programming languages, where)-2.659 F(speed is k)111 609.6 Q +-.15(ey)-.1 G 2.5(,a)-.5 G(nd allfeatures need to be a)-2.5 E -.25(va) +-.2 G(ilable are present.).25 E F1 2.5(3.3.3. Ho)111 645.6 R 2.5(wi)-.1 +G 2.5(sC)-2.5 G(?)-2.5 E F0 3.214(Ci)111 661.2 S 3.214(sc)-3.214 G .714 +(ompiled to ASM, the main compilers a)-3.214 F -.25(va)-.2 G .715 +(ilable are clang, gcc and MSVC, I will be using).25 F +(gcc as it is generally standard in linux en)111 673.2 Q(vironments.)-.4 +E(Man)111 697.2 Q 2.709(yb)-.15 G .209(uild systems are a)-2.909 F -.25 +(va)-.2 G .209(ilable for C, the main ones being cmak).25 F 2.709(ea)-.1 +G .209(nd gnu mak)-2.709 F .208(e. Both of them)-.1 F(ha)111 709.2 Q +.851 -.15(ve t)-.2 H .551 +(he goal of putting the compiling process in one command. Cmak).15 F +3.052(ei)-.1 G 3.052(sc)-3.052 G .552(ross platform \(sorta)-3.052 F +(windo)111 721.2 Q(ws doesn')-.25 E 2.5(tw)-.18 G(ork well b)-2.6 E +(ut it does w)-.2 E(ork\).)-.1 E 0 Cg EP %%Page: 18 18 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF(-18-)297.67 48 Q(Mak)121 84 Q(e\214le)-.1 E(ads) -121 96 Q(Mak)131 108 Q(e\214le)-.1 E(ast)131 120 Q(Mak)141 132 Q -(e\214le)-.1 E(ast.c)141 144 Q(ast.h)141 156 Q(types.c)141 168 Q -(types.h)141 180 Q(dict)131 192 Q(Mak)143.5 204 Q(e\214le)-.1 E(dict.c) -143.5 216 Q(dict.h)143.5 228 Q(dicttest.c)143.5 240 Q(ll)131 252 Q(Mak) -143.5 264 Q(e\214le)-.1 E(ll.c)143.5 276 Q(ll.h)143.5 288 Q(lltest.c) -143.5 300 Q -.15(exe)121 312 S(cution).15 E(Mak)131 324 Q(e\214le)-.1 E --.15(exe)131 336 S(c.c).15 E -.15(exe)131 348 S(c.h).15 E(types.c)131 -360 Q(types.h)131 372 Q(libs)121 384 Q(Mak)131 396 Q(e\214le)-.1 E -(graphs)131 408 Q(graphs.zp)141 420 Q(y)-.1 E(io)131 432 Q(io.zp)141 444 -Q(y)-.1 E(stdlib)131 456 Q(Mak)141 468 Q(e\214le)-.1 E(stdlib)141 480 Q -(.c)-.4 E(stdlib)141 492 Q(.zp)-.4 E(y)-.1 E(string)131 504 Q(string.zp) -141 516 Q(y)-.1 E(proto)131 528 Q(ast)141 540 Q(Mak)151 552 Q(e\214le) --.1 E(ast.c)151 564 Q(astg.c)151 576 Q(astg.h)151 588 Q(tok)121 600 Q -(enizer)-.1 E(Mak)131 612 Q(e\214le)-.1 E(parser)131 624 Q(.c)-.55 E -(parser)131 636 Q(.h)-.55 E(tok)131 648 Q(enizer)-.1 E(.c)-.55 E(tok)131 -660 Q(enizer)-.1 E(.h)-.55 E(types.c)131 672 Q(types.h)131 684 Q(zp)121 -696 Q(y)-.1 E(Mak)131 708 Q(e\214le)-.1 E(zp)131 720 Q -.65(y.)-.1 G(c) -.65 E 0 Cg EP +/F0 10/Times-Roman@0 SF(-18-)297.67 48 Q/F1 10/Times-Bold@0 SF 2.5 +(3.3.4. Libraries)111 84 R F0(The libraries I will use are the follo)111 +99.6 Q(wing:)-.25 E 2.5(Cs)111 123.6 S(tdlib)-2.5 E 2.5(Cu)111 147.6 S +(nistd)-2.5 E 2.5(Ce)111 171.6 S(rrno)-2.5 E(Unix de)111 195.6 Q +(vice \214les)-.25 E(Zipp)111 219.6 Q 2.5(ys)-.1 G(trings)-2.5 E(Zipp) +111 243.6 Q 2.5(yg)-.1 G(raphs)-2.5 E(Zipp)111 267.6 Q 2.5(ys)-.1 G +(orts)-2.5 E(Addition libraries \(may not be implemented\):)111 291.6 Q +(Raylib)111 315.6 Q 2.5(Cs)111 339.6 S(ock)-2.5 E(ets + Zipp)-.1 E 2.5 +(ys)-.1 G(ock)-2.5 E(ets)-.1 E F1 2.5(3.3.5. Modularization)111 375.6 R +F0 2.062 -.8(To m)111 391.2 T(ak).8 E 2.962(et)-.1 G .462 +(he project more manageable I will split it into man)-2.962 F 2.961 +(yC\214)-.15 G .461(les, this is to k)-2.961 F .461(eep it from be-)-.1 +F(coming impossible to edit code.)111 403.2 Q +(The \214le layout looks as follo)111 427.2 Q(ws:)-.25 E(Mak)121 451.2 Q +(e\214le)-.1 E(ads)121 463.2 Q(Mak)131 475.2 Q(e\214le)-.1 E(ast)131 +487.2 Q(Mak)141 499.2 Q(e\214le)-.1 E(ast.c)141 511.2 Q(ast.h)141 523.2 +Q(types.c)141 535.2 Q(types.h)141 547.2 Q(dict)131 559.2 Q(Mak)143.5 +571.2 Q(e\214le)-.1 E(dict.c)143.5 583.2 Q(dict.h)143.5 595.2 Q +(dicttest.c)143.5 607.2 Q(ll)131 619.2 Q(Mak)143.5 631.2 Q(e\214le)-.1 E +(ll.c)143.5 643.2 Q(ll.h)143.5 655.2 Q(lltest.c)143.5 667.2 Q -.15(exe) +121 679.2 S(cution).15 E(Mak)131 691.2 Q(e\214le)-.1 E -.15(exe)131 +703.2 S(c.c).15 E -.15(exe)131 715.2 S(c.h).15 E(types.c)131 727.2 Q 0 +Cg EP %%Page: 19 19 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF(-19-)297.67 48 Q(zp)131 84 Q(ycheck.c)-.1 E(zp) -121 96 Q(ycheck)-.1 E(Mak)131 108 Q(e\214le)-.1 E(errors.c)131 120 Q -(errors.h)131 132 Q(zp)131 144 Q(ycheck.c)-.1 E(zp)131 156 Q(ycheck.h) --.1 E(zp)121 168 Q(ypkg)-.1 E(deps.zp)131 180 Q(y)-.1 E(do)131 192 Q -(wnload.zp)-.25 E(y)-.1 E(zp)131 204 Q(ypkg.zp)-.1 E(y)-.1 E .712 -(As you can see this is split up o)111 228 R -.15(ve)-.15 G 3.212(ra).15 +/F0 10/Times-Roman@0 SF(-19-)297.67 48 Q(types.h)131 84 Q(libs)121 96 Q +(Mak)131 108 Q(e\214le)-.1 E(graphs)131 120 Q(graphs.zp)141 132 Q(y)-.1 +E(io)131 144 Q(io.zp)141 156 Q(y)-.1 E(stdlib)131 168 Q(Mak)141 180 Q +(e\214le)-.1 E(stdlib)141 192 Q(.c)-.4 E(stdlib)141 204 Q(.zp)-.4 E(y) +-.1 E(string)131 216 Q(string.zp)141 228 Q(y)-.1 E(proto)131 240 Q(ast) +141 252 Q(Mak)151 264 Q(e\214le)-.1 E(ast.c)151 276 Q(astg.c)151 288 Q +(astg.h)151 300 Q(tok)121 312 Q(enizer)-.1 E(Mak)131 324 Q(e\214le)-.1 E +(parser)131 336 Q(.c)-.55 E(parser)131 348 Q(.h)-.55 E(tok)131 360 Q +(enizer)-.1 E(.c)-.55 E(tok)131 372 Q(enizer)-.1 E(.h)-.55 E(types.c)131 +384 Q(types.h)131 396 Q(zp)121 408 Q(y)-.1 E(Mak)131 420 Q(e\214le)-.1 E +(zp)131 432 Q -.65(y.)-.1 G(c).65 E(zp)131 444 Q(ycheck.c)-.1 E(zp)121 +456 Q(ycheck)-.1 E(Mak)131 468 Q(e\214le)-.1 E(errors.c)131 480 Q +(errors.h)131 492 Q(zp)131 504 Q(ycheck.c)-.1 E(zp)131 516 Q(ycheck.h) +-.1 E(zp)121 528 Q(ypkg)-.1 E(deps.zp)131 540 Q(y)-.1 E(do)131 552 Q +(wnload.zp)-.25 E(y)-.1 E(zp)131 564 Q(ypkg.zp)-.1 E(y)-.1 E .712 +(As you can see this is split up o)111 588 R -.15(ve)-.15 G 3.212(ra).15 G .713(round 40 \214les and 16 folders, each \214le should not go o) --3.212 F -.15(ve)-.15 G(r).15 E(~500 lines of code. This is to k)111 240 +-3.212 F -.15(ve)-.15 G(r).15 E(~500 lines of code. This is to k)111 600 Q(eep e)-.1 E -.15(ve)-.25 G(rything as easy to manage as possible.).15 -E .562(This le)111 264 R -.15(ve)-.25 G 3.062(lo).15 G 3.062(fm)-3.062 G +E .562(This le)111 624 R -.15(ve)-.25 G 3.062(lo).15 G 3.062(fm)-3.062 G .562(odularization in needed for the de)-3.062 F -.15(ve)-.25 G .562 (lopment of Zipp).15 F 3.062(ya)-.1 G 3.062(sw)-3.062 G .562 -(ithout it, \214les will be-)-3.062 F(come a mess that can')111 276 Q +(ithout it, \214les will be-)-3.062 F(come a mess that can')111 636 Q 2.5(tb)-.18 G 2.5(ew)-2.5 G(ork)-2.6 E(ed with.)-.1 E .041(All .c \214l\ es will be compiled into .o \214les, then the .o \214les can be link)111 -300 R .042(ed with the \214nal zp)-.1 F -.65(y.)-.1 G 2.542(ct).65 G -2.542(og)-2.542 G(en-)-2.542 E(erate the \214nal e)111 312 Q -.15(xe) --.15 G(cutable.).15 E/F1 10/Times-Bold@0 SF 2.5(3.3.3. Build)111 360 R -(system)2.5 E F0 1.221(The entire project is being b)111 375.6 R 1.221 -(uild with GNU mak)-.2 F 3.721<658c>-.1 G 1.22(les, each folder that b) --3.721 F 1.22(uilds something will)-.2 F(ha)111 387.6 Q 1.003 -.15(ve i) --.2 H .703(ts o).15 F .703(wn mak)-.25 F .704(e\214le. This will mean t\ -he entire project can be compiled with a single mak)-.1 F 3.204(ei)-.1 G -(n)-3.204 E(the root folder of the project.)111 399.6 Q(Example of mak) -111 423.6 Q(e:)-.1 E(mak)111 447.6 Q 2.5(e-)-.1 G(j2)-2.5 E(This will b) -111 471.6 Q(uild all \214les speci\214ed by 'Mak)-.2 E -(e\214le' with 2 threads.)-.1 E .34(The project should be b)111 495.6 R -.34(uild with gcc, and ld. It should be b)-.2 F .34(uild with the -O3 b) --.2 F .34(uild \215ag to ensure)-.2 F(the program runs as f)111 507.6 Q +660 R .042(ed with the \214nal zp)-.1 F -.65(y.)-.1 G 2.542(ct).65 G +2.542(og)-2.542 G(en-)-2.542 E(erate the \214nal e)111 672 Q -.15(xe) +-.15 G(cutable.).15 E/F1 10/Times-Bold@0 SF 2.5(3.3.5.1. Build)111 720 R +(system)2.5 E 0 Cg EP +%%Page: 20 20 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Roman@0 SF(-20-)297.67 48 Q 1.221 +(The entire project is being b)111 84 R 1.221(uild with GNU mak)-.2 F +3.721<658c>-.1 G 1.22(les, each folder that b)-3.721 F 1.22 +(uilds something will)-.2 F(ha)111 96 Q 1.003 -.15(ve i)-.2 H .703(ts o) +.15 F .703(wn mak)-.25 F .704(e\214le. This will mean the entire projec\ +t can be compiled with a single mak)-.1 F 3.204(ei)-.1 G(n)-3.204 E +(the root folder of the project.)111 108 Q(Example of mak)111 132 Q(e:) +-.1 E(mak)111 156 Q 2.5(e-)-.1 G(j2)-2.5 E(This will b)111 180 Q +(uild all \214les speci\214ed by 'Mak)-.2 E(e\214le' with 2 threads.)-.1 +E .34(The project should be b)111 204 R .34 +(uild with gcc, and ld. It should be b)-.2 F .34(uild with the -O3 b)-.2 +F .34(uild \215ag to ensure)-.2 F(the program runs as f)111 216 Q (ast as possible. -O3 forces the compiler to b)-.1 E (uild with optimizations.)-.2 E(When the project is \214nished, I will \ -try compiling with clang and tcc, to compare performance.)111 531.6 Q F1 -2.5(3.3.4. T)111 567.6 R(ime table)-.18 E F0 .174 -(The \214rst step is to tackle the interpreter)111 583.2 R 2.674(,s)-.4 +try compiling with clang and tcc, to compare performance.)111 240 Q/F1 +10/Times-Bold@0 SF 2.5(3.4. T)111 276 R(ime table)-.18 E F0 .174 +(The \214rst step is to tackle the interpreter)111 291.6 R 2.674(,s)-.4 G 2.674(ot)-2.674 G .174(he zp)-2.674 F -.65(y.)-.1 G 2.674<638c>.65 G .174(le needs to be \214nished. The tok)-2.674 F(enizer)-.1 E 2.674(,e) -.4 G -.15(xe)-2.824 G(-).15 E .598(cution, and libs folders need to be\ - \214nished, after this point you should be able to e)111 595.2 R -.15 -(xe)-.15 G .597(cute Zipp).15 F(y)-.1 E(code ho)111 607.2 Q(we)-.25 E + \214nished, after this point you should be able to e)111 303.6 R -.15 +(xe)-.15 G .597(cute Zipp).15 F(y)-.1 E(code ho)111 315.6 Q(we)-.25 E -.15(ve)-.25 G 2.5(rn).15 G(ot syntax check it or get error handling.) --2.5 E .124(The ne)111 631.2 R .124(xt step is zp)-.15 F .125 +-2.5 E .124(The ne)111 339.6 R .124(xt step is zp)-.15 F .125 (ycheck, the syntax and error handler)-.1 F 2.625(,t)-.4 G .125 -(his should be ran before code is shipped)-2.625 F(to the user)111 643.2 +(his should be ran before code is shipped)-2.625 F(to the user)111 351.6 Q 2.5(.I)-.55 G 2.5(tc)-2.5 G(an reuse a lot of code from the tok)-2.5 E -(enizer and e)-.1 E -.15(xe)-.15 G(cution steps.).15 E .744 -(Finally i need to mak)111 667.2 R 3.244(ez)-.1 G -.1(py)-3.244 G .743 +(enizer and e)-.1 E -.15(xe)-.15 G(cution steps.).15 E .716 +(Finally I need to mak)111 375.6 R 3.216(ez)-.1 G -.1(py)-3.216 G .716 (pkg, this should be easy as most of it can be written in Zipp).1 F -2.043 -.65(y, a)-.1 H .743(nd a).65 F(fe)111 679.2 Q 2.5(wb)-.25 G +2.016 -.65(y, a)-.1 H .716(nd a).65 F(fe)111 387.6 Q 2.5(wb)-.25 G (its can be written in bash. It should be a good test to ho)-2.5 E 2.5 (wZ)-.25 G(ipp)-2.5 E 2.5(yc)-.1 G(an be written.)-2.5 E(If time allo) -111 703.2 Q(ws it is at this point that I will write a Raylib library) --.25 E(.)-.65 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-20-)297.67 48 Q/F1 10/Times-Bold@0 SF 2.5(4. T) -111 84 R(echnical Solution)-.92 E 2.5(5. T)111 108 R(esting)-.92 E 2.5 -(6. Ev)111 132 R(aluation)-.1 E 0 Cg EP +111 411.6 Q(ws it is at this point that I will write a Raylib library a\ +nd a unix/C sock)-.25 E(ets library)-.1 E(.)-.65 E F1 2.5(4. T)111 447.6 +R(echnical Solution)-.92 E 2.5(5. T)111 471.6 R(esting)-.92 E 2.5(6. Ev) +111 495.6 R(aluation)-.1 E 0 Cg EP %%Trailer end %%EOF |