{"action":"created","comment":{"url":"https://api.github.com/repos/HotCL/P4-HCL/pulls/comments/170529825","pull_request_review_id":99226188,"id":170529825,"diff_hunk":"@@ -75,18 +135,102 @@ \\section{Existing languages}\n The VM includes many of the features that have made the Java VM (JVM) popular such as object-oriented programming, automatic dynamic memory allocation, and garbage collection.\n It comes packaged with native classes such as Object, System, and PrintStream.\n \n-The downsides of using NanoVM instead of the Arduino language is, as stated on the official website of NanoVM\\footnote{http://www.harbaum.org/till/nanovm/index.shtml} that the VM's interpreter doesn't perform as well as C compiled to AVR code, and it reserves some of the RAM used for applications to run the VM.\n-NanoVM also has to be installed on the CPU's flash memory, which will overwrite the bootloader.\n+The following is a short description of the basic Java syntax. Snippets \\ref{lis:javaExample} and \\ref{lis:javaPrinter} showcase the syntax.\n+\n+The program is started by calling the \\texttt{main} function (snippet \\ref{lis:javaExample}, line 5).\n+\n+All statements are finished with a semi-colon.\n+\n+In Java all variables and functions must be declared inside a class, and each class must be declared in a file for itself.\n+\n+\\textit{Class fields} and methods are declared identically to how variables are declared in Arduino C++, except each field variable is prefixed with an optional access modifier (snippet \\ref{lis:javaExample}, lines 3, 5).\n+Variables can be made into class variables (called so because the variables belong to the class instead of instances of the class) with the \\texttt{static} keyword before the name in the declaration.\n+The same can be done to methods.\n+\n+\\textit{Comments} are written exactly like in C and C++.\n \n-A typical program written in Java is set up like this:\n-\\begin{lstlisting}[language=Java,label=lis:javaExample,caption=An example program written in Java,firstnumber=1]\n+\\begin{lstlisting}[language=Java,label=lis:javaExample,caption=An example program written in Java.,firstnumber=1]\n public class HelloWorld {\n-\tpublic static void main(String[] args) {\n-\t\tSystem.out.println(\"Hello World!\");\n+\n+\tprivate static Printer printer = new printer(); //Class variable\n+\t\n+\tpublic static void main(String[] args) { //Program start\n+\t\tprinter.print(\"Hello World!\");\n+\t}\n+\t\n+}\n+\\end{lstlisting}\n+\n+\\begin{lstlisting}[language=Java,label=lis:javaPrinter,caption=Printer class with one method written in Java.,firstnumber=1]\n+public class Printer {\n+\tpublic void print(String str) { //Instance method\n+\t\tSystem.out.println(str);\n \t}\n }\n \\end{lstlisting}\n \n+The downsides of using NanoVM instead of Arduino C++ is, as stated on the official website of NanoVM\\footnote{http://www.harbaum.org/till/nanovm/index.shtml} that the VM's interpreter doesn't perform as well as C compiled to AVR code, and it reserves some of the RAM used for applications to run the VM.\n+NanoVM also has to be installed on the CPU's flash memory, which will overwrite the bootloader.\n+\n+\\textbf{Juniper} is a functional programming language designed specifically for the Arduino.\n+The intention behind creating Juniper was to provide a higher level language than Arduino C++, which at the same time was more suited for programming electronic devices\\cite{JuniperTutorial}.\n+\n+The following is a description of the basic syntax of Juniper. Figure \\ref{lis:juniperExample} showcases the syntax.\n+\n+\\textit{Variables} are declared using the \\texttt{let} keyword followed by a name, an equal sign, and an expression (line 4).\n+Variables are by default immutable, ie. they can't be assigned another value after declaration, but they can be made mutable by inserting the \\texttt{mutable} keyword before the name in their declaration.","path":"report/2.Analysis/ArduinoLanguagesCtrl.tex","position":213,"original_position":213,"commit_id":"e6ee825c6261de262934f89ea84993a122cfa4c3","original_commit_id":"e6ee825c6261de262934f89ea84993a122cfa4c3","user":{"login":"Abildgaard96","id":22011139,"avatar_url":"https://avatars0.githubusercontent.com/u/22011139?v=4","gravatar_id":"","url":"https://api.github.com/users/Abildgaard96","html_url":"https://github.com/Abildgaard96","followers_url":"https://api.github.com/users/Abildgaard96/followers","following_url":"https://api.github.com/users/Abildgaard96/following{/other_user}","gists_url":"https://api.github.com/users/Abildgaard96/gists{/gist_id}","starred_url":"https://api.github.com/users/Abildgaard96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abildgaard96/subscriptions","organizations_url":"https://api.github.com/users/Abildgaard96/orgs","repos_url":"https://api.github.com/users/Abildgaard96/repos","events_url":"https://api.github.com/users/Abildgaard96/events{/privacy}","received_events_url":"https://api.github.com/users/Abildgaard96/received_events","type":"User","site_admin":false},"body":"ie. is not an abbreviation, i.e. is dough ","created_at":"2018-02-26T09:13:34Z","updated_at":"2018-02-26T09:13:34Z","html_url":"https://github.com/HotCL/P4-HCL/pull/16#discussion_r170529825","pull_request_url":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/HotCL/P4-HCL/pulls/comments/170529825"},"html":{"href":"https://github.com/HotCL/P4-HCL/pull/16#discussion_r170529825"},"pull_request":{"href":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16","id":171254717,"html_url":"https://github.com/HotCL/P4-HCL/pull/16","diff_url":"https://github.com/HotCL/P4-HCL/pull/16.diff","patch_url":"https://github.com/HotCL/P4-HCL/pull/16.patch","issue_url":"https://api.github.com/repos/HotCL/P4-HCL/issues/16","number":16,"state":"open","locked":false,"title":"HCLANG 33 rewrote section 2.3 to be more substantial & added content","user":{"login":"Lambcreek","id":22813746,"avatar_url":"https://avatars2.githubusercontent.com/u/22813746?v=4","gravatar_id":"","url":"https://api.github.com/users/Lambcreek","html_url":"https://github.com/Lambcreek","followers_url":"https://api.github.com/users/Lambcreek/followers","following_url":"https://api.github.com/users/Lambcreek/following{/other_user}","gists_url":"https://api.github.com/users/Lambcreek/gists{/gist_id}","starred_url":"https://api.github.com/users/Lambcreek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lambcreek/subscriptions","organizations_url":"https://api.github.com/users/Lambcreek/orgs","repos_url":"https://api.github.com/users/Lambcreek/repos","events_url":"https://api.github.com/users/Lambcreek/events{/privacy}","received_events_url":"https://api.github.com/users/Lambcreek/received_events","type":"User","site_admin":false},"body":"### Description\r\nRewrote large parts of section 2.3 in the report, most significantly the part about Arduino C++ and added descriptions of more languages\r\n\r\n\r\n### Changelog\r\n - Rewrote the section to be more substantial\r\n - Added descriptions of Juniper and ArduinoBlocks languages\r\n - Added a folder for images in 2.Analysis (and an image of ArduinoBlocks)\r\n\r\n### Issues solved \r\n - HCLANG-33\r\n\r\n## FOR REVIEWER [Do not remove]\r\nA small checklist of things to note when you are doing a review. Make sure these things apply before going into master.\r\n - Did the PR actually fix the issue\r\n - Comment anything that doesn't make sense or anything you want clarified. Many comments are always ok\r\n - Make sure this is ready for exams if this is going into master\r\n - It's always a good idea having another reviewer look at a PR as well, if it's major. get a buddy.\r\n\r\n### Regarding code [if applicable]\r\n- Check [coding conventions](https://kotlinlang.org/docs/reference/coding-conventions.html)\r\n- Are public methods documented? \r\n- Are there testcases for new features / methods?\r\n- Have you tried running the source and tested things that cannot be test-cased?\r\n\r\n### Regarding Report [if applicable]\r\n- Does each line have a linechange in the sourcecode?\r\n- Does sentences make sense?\r\n- Did you do spellchecking?\r\n- Citations?\r\n","created_at":"2018-02-25T22:12:26Z","updated_at":"2018-02-26T09:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cdd0a2f50d1f6480117c00a21f074ecea5fdadfc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16/commits","review_comments_url":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16/comments","review_comment_url":"https://api.github.com/repos/HotCL/P4-HCL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HotCL/P4-HCL/issues/16/comments","statuses_url":"https://api.github.com/repos/HotCL/P4-HCL/statuses/e6ee825c6261de262934f89ea84993a122cfa4c3","head":{"label":"HotCL:HCLANG-33-add-juniper-and-arduinoblocks-to-analysis","ref":"HCLANG-33-add-juniper-and-arduinoblocks-to-analysis","sha":"e6ee825c6261de262934f89ea84993a122cfa4c3","user":{"login":"HotCL","id":36265232,"avatar_url":"https://avatars3.githubusercontent.com/u/36265232?v=4","gravatar_id":"","url":"https://api.github.com/users/HotCL","html_url":"https://github.com/HotCL","followers_url":"https://api.github.com/users/HotCL/followers","following_url":"https://api.github.com/users/HotCL/following{/other_user}","gists_url":"https://api.github.com/users/HotCL/gists{/gist_id}","starred_url":"https://api.github.com/users/HotCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HotCL/subscriptions","organizations_url":"https://api.github.com/users/HotCL/orgs","repos_url":"https://api.github.com/users/HotCL/repos","events_url":"https://api.github.com/users/HotCL/events{/privacy}","received_events_url":"https://api.github.com/users/HotCL/received_events","type":"Organization","site_admin":false},"repo":{"id":120297748,"name":"P4-HCL","full_name":"HotCL/P4-HCL","owner":{"login":"HotCL","id":36265232,"avatar_url":"https://avatars3.githubusercontent.com/u/36265232?v=4","gravatar_id":"","url":"https://api.github.com/users/HotCL","html_url":"https://github.com/HotCL","followers_url":"https://api.github.com/users/HotCL/followers","following_url":"https://api.github.com/users/HotCL/following{/other_user}","gists_url":"https://api.github.com/users/HotCL/gists{/gist_id}","starred_url":"https://api.github.com/users/HotCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HotCL/subscriptions","organizations_url":"https://api.github.com/users/HotCL/orgs","repos_url":"https://api.github.com/users/HotCL/repos","events_url":"https://api.github.com/users/HotCL/events{/privacy}","received_events_url":"https://api.github.com/users/HotCL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HotCL/P4-HCL","description":"P4 project on university: HCL Compiled Language.","fork":false,"url":"https://api.github.com/repos/HotCL/P4-HCL","forks_url":"https://api.github.com/repos/HotCL/P4-HCL/forks","keys_url":"https://api.github.com/repos/HotCL/P4-HCL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HotCL/P4-HCL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HotCL/P4-HCL/teams","hooks_url":"https://api.github.com/repos/HotCL/P4-HCL/hooks","issue_events_url":"https://api.github.com/repos/HotCL/P4-HCL/issues/events{/number}","events_url":"https://api.github.com/repos/HotCL/P4-HCL/events","assignees_url":"https://api.github.com/repos/HotCL/P4-HCL/assignees{/user}","branches_url":"https://api.github.com/repos/HotCL/P4-HCL/branches{/branch}","tags_url":"https://api.github.com/repos/HotCL/P4-HCL/tags","blobs_url":"https://api.github.com/repos/HotCL/P4-HCL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HotCL/P4-HCL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HotCL/P4-HCL/git/refs{/sha}","trees_url":"https://api.github.com/repos/HotCL/P4-HCL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HotCL/P4-HCL/statuses/{sha}","languages_url":"https://api.github.com/repos/HotCL/P4-HCL/languages","stargazers_url":"https://api.github.com/repos/HotCL/P4-HCL/stargazers","contributors_url":"https://api.github.com/repos/HotCL/P4-HCL/contributors","subscribers_url":"https://api.github.com/repos/HotCL/P4-HCL/subscribers","subscription_url":"https://api.github.com/repos/HotCL/P4-HCL/subscription","commits_url":"https://api.github.com/repos/HotCL/P4-HCL/commits{/sha}","git_commits_url":"https://api.github.com/repos/HotCL/P4-HCL/git/commits{/sha}","comments_url":"https://api.github.com/repos/HotCL/P4-HCL/comments{/number}","issue_comment_url":"https://api.github.com/repos/HotCL/P4-HCL/issues/comments{/number}","contents_url":"https://api.github.com/repos/HotCL/P4-HCL/contents/{+path}","compare_url":"https://api.github.com/repos/HotCL/P4-HCL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HotCL/P4-HCL/merges","archive_url":"https://api.github.com/repos/HotCL/P4-HCL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HotCL/P4-HCL/downloads","issues_url":"https://api.github.com/repos/HotCL/P4-HCL/issues{/number}","pulls_url":"https://api.github.com/repos/HotCL/P4-HCL/pulls{/number}","milestones_url":"https://api.github.com/repos/HotCL/P4-HCL/milestones{/number}","notifications_url":"https://api.github.com/repos/HotCL/P4-HCL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HotCL/P4-HCL/labels{/name}","releases_url":"https://api.github.com/repos/HotCL/P4-HCL/releases{/id}","deployments_url":"https://api.github.com/repos/HotCL/P4-HCL/deployments","created_at":"2018-02-05T11:46:59Z","updated_at":"2018-02-17T07:27:23Z","pushed_at":"2018-02-25T22:17:20Z","git_url":"git://github.com/HotCL/P4-HCL.git","ssh_url":"git@github.com:HotCL/P4-HCL.git","clone_url":"https://github.com/HotCL/P4-HCL.git","svn_url":"https://github.com/HotCL/P4-HCL","homepage":"http://hcl.codes","size":814,"stargazers_count":2,"watchers_count":2,"language":"TeX","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"HotCL:master","ref":"master","sha":"b3bdb40c3c9e7936f7a32a81dc89fc054d9bf36c","user":{"login":"HotCL","id":36265232,"avatar_url":"https://avatars3.githubusercontent.com/u/36265232?v=4","gravatar_id":"","url":"https://api.github.com/users/HotCL","html_url":"https://github.com/HotCL","followers_url":"https://api.github.com/users/HotCL/followers","following_url":"https://api.github.com/users/HotCL/following{/other_user}","gists_url":"https://api.github.com/users/HotCL/gists{/gist_id}","starred_url":"https://api.github.com/users/HotCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HotCL/subscriptions","organizations_url":"https://api.github.com/users/HotCL/orgs","repos_url":"https://api.github.com/users/HotCL/repos","events_url":"https://api.github.com/users/HotCL/events{/privacy}","received_events_url":"https://api.github.com/users/HotCL/received_events","type":"Organization","site_admin":false},"repo":{"id":120297748,"name":"P4-HCL","full_name":"HotCL/P4-HCL","owner":{"login":"HotCL","id":36265232,"avatar_url":"https://avatars3.githubusercontent.com/u/36265232?v=4","gravatar_id":"","url":"https://api.github.com/users/HotCL","html_url":"https://github.com/HotCL","followers_url":"https://api.github.com/users/HotCL/followers","following_url":"https://api.github.com/users/HotCL/following{/other_user}","gists_url":"https://api.github.com/users/HotCL/gists{/gist_id}","starred_url":"https://api.github.com/users/HotCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HotCL/subscriptions","organizations_url":"https://api.github.com/users/HotCL/orgs","repos_url":"https://api.github.com/users/HotCL/repos","events_url":"https://api.github.com/users/HotCL/events{/privacy}","received_events_url":"https://api.github.com/users/HotCL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HotCL/P4-HCL","description":"P4 project on university: HCL Compiled Language.","fork":false,"url":"https://api.github.com/repos/HotCL/P4-HCL","forks_url":"https://api.github.com/repos/HotCL/P4-HCL/forks","keys_url":"https://api.github.com/repos/HotCL/P4-HCL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HotCL/P4-HCL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HotCL/P4-HCL/teams","hooks_url":"https://api.github.com/repos/HotCL/P4-HCL/hooks","issue_events_url":"https://api.github.com/repos/HotCL/P4-HCL/issues/events{/number}","events_url":"https://api.github.com/repos/HotCL/P4-HCL/events","assignees_url":"https://api.github.com/repos/HotCL/P4-HCL/assignees{/user}","branches_url":"https://api.github.com/repos/HotCL/P4-HCL/branches{/branch}","tags_url":"https://api.github.com/repos/HotCL/P4-HCL/tags","blobs_url":"https://api.github.com/repos/HotCL/P4-HCL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HotCL/P4-HCL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HotCL/P4-HCL/git/refs{/sha}","trees_url":"https://api.github.com/repos/HotCL/P4-HCL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HotCL/P4-HCL/statuses/{sha}","languages_url":"https://api.github.com/repos/HotCL/P4-HCL/languages","stargazers_url":"https://api.github.com/repos/HotCL/P4-HCL/stargazers","contributors_url":"https://api.github.com/repos/HotCL/P4-HCL/contributors","subscribers_url":"https://api.github.com/repos/HotCL/P4-HCL/subscribers","subscription_url":"https://api.github.com/repos/HotCL/P4-HCL/subscription","commits_url":"https://api.github.com/repos/HotCL/P4-HCL/commits{/sha}","git_commits_url":"https://api.github.com/repos/HotCL/P4-HCL/git/commits{/sha}","comments_url":"https://api.github.com/repos/HotCL/P4-HCL/comments{/number}","issue_comment_url":"https://api.github.com/repos/HotCL/P4-HCL/issues/comments{/number}","contents_url":"https://api.github.com/repos/HotCL/P4-HCL/contents/{+path}","compare_url":"https://api.github.com/repos/HotCL/P4-HCL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HotCL/P4-HCL/merges","archive_url":"https://api.github.com/repos/HotCL/P4-HCL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HotCL/P4-HCL/downloads","issues_url":"https://api.github.com/repos/HotCL/P4-HCL/issues{/number}","pulls_url":"https://api.github.com/repos/HotCL/P4-HCL/pulls{/number}","milestones_url":"https://api.github.com/repos/HotCL/P4-HCL/milestones{/number}","notifications_url":"https://api.github.com/repos/HotCL/P4-HCL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HotCL/P4-HCL/labels{/name}","releases_url":"https://api.github.com/repos/HotCL/P4-HCL/releases{/id}","deployments_url":"https://api.github.com/repos/HotCL/P4-HCL/deployments","created_at":"2018-02-05T11:46:59Z","updated_at":"2018-02-17T07:27:23Z","pushed_at":"2018-02-25T22:17:20Z","git_url":"git://github.com/HotCL/P4-HCL.git","ssh_url":"git@github.com:HotCL/P4-HCL.git","clone_url":"https://github.com/HotCL/P4-HCL.git","svn_url":"https://github.com/HotCL/P4-HCL","homepage":"http://hcl.codes","size":814,"stargazers_count":2,"watchers_count":2,"language":"TeX","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16"},"html":{"href":"https://github.com/HotCL/P4-HCL/pull/16"},"issue":{"href":"https://api.github.com/repos/HotCL/P4-HCL/issues/16"},"comments":{"href":"https://api.github.com/repos/HotCL/P4-HCL/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/HotCL/P4-HCL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HotCL/P4-HCL/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/HotCL/P4-HCL/statuses/e6ee825c6261de262934f89ea84993a122cfa4c3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Abildgaard96"}}