{"id":24658587,"url":"https://github.com/theow03/lakecompilerv1","last_synced_at":"2026-05-18T01:04:55.747Z","repository":{"id":157323972,"uuid":"618618251","full_name":"TheoW03/LakeCompilerV1","owner":"TheoW03","description":"Strongly typed procedural programming language ","archived":false,"fork":false,"pushed_at":"2024-01-27T23:33:48.000Z","size":385,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T05:12:55.762Z","etag":null,"topics":["asm","compiler-design","cpp","llvm","programminglanguages"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheoW03.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T21:51:22.000Z","updated_at":"2024-06-18T00:28:59.000Z","dependencies_parsed_at":"2023-09-30T20:22:24.971Z","dependency_job_id":"de6f1386-572a-4760-af75-9ef496b331f6","html_url":"https://github.com/TheoW03/LakeCompilerV1","commit_stats":null,"previous_names":["theow03/mipstrans32","theow03/lake","theow03/lacus","theow03/lakecompilerv1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoW03%2FLakeCompilerV1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoW03%2FLakeCompilerV1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoW03%2FLakeCompilerV1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheoW03%2FLakeCompilerV1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheoW03","download_url":"https://codeload.github.com/TheoW03/LakeCompilerV1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739958,"owners_count":20501992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asm","compiler-design","cpp","llvm","programminglanguages"],"created_at":"2025-01-26T01:38:18.140Z","updated_at":"2026-05-18T01:04:55.722Z","avatar_url":"https://github.com/TheoW03.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lacus\n\na strongly typed, procedual, compiled programming language. \nright now MIPS 32 Assembly and LLVM\n\nsyntax was strongly inspired by rust, Ada and C\n\nwhy i choose the name,\nlacus is latin for lake, and I chose lake to honor my favorite enby-coded character in Animation. I cant name it lake\nbecause lean4 has a build system with the name of lake. \n\n\n# Langauge definition\n\n\n```C++\n//% -\u003e mod\n//* -\u003e multiply\n// / -\u003e divison\n// +,- -\u003e addition and subtraction\n\n// \u003c, \u003e greater than less than\n// \u003e= \u003c=, GTE, LTE\n//  /= not equal\nfn main(args: string) returns int { //this is how you call the main method (this is how you do comments), returns for return\n    const float pi = 3.1415; // floats\n    int random_var = 100; //integer\n    bool turringComplete = true; //i think lol \n    random_var = (int)(pi + random_var * ((pi + random_var) % 2)/10); \n    //if statemnets\n    if(random_var == 100){\n        print(\"%d\", random_var);\n    }else if(random_var == 200){\n        random_var = random_var + 1;\n        print(\"%d\", random_var);\n    }else{\n        random_var = 0;\n        print(\"%d\", random_var);\n    }\n    //loops \n    while random_var \u003c 1000 do random_var = random_var + 1;\n    for(int i = 0; i \u003c 10; step i, 1) -\u003e  print(\"%d\",i); \n    for(int i = 10; i \u003e 0; step i, -1) -\u003e  print(\"%d\",i); //step is \"i++\" in C. (step VAR, NUM)\n    print(\"%f\",random_var); // %f -\u003e float %d -\u003e integer. this is a temp system until I add something better :3\n    exit(1); //exit\n    return 0;\n    \n}\nfn f(x: int) : int -\u003e x + 1; //new feature i been thinking of. for a while \u003e:3\n```\n\n\n# CLI commands\n\n1st arg is the file name\n\n-d : runs a demo of this dir, the file is test.txt and the out file is MIPSTarget/MipsTargetASM/out.s\n\n-token : outputs the token list\n\n-o ``file``:  output file if none specified its going to be MipsTarget/MipsTargetASM/out.s\n\n-m: specify MIPS 32 target\n\n-l: specify LLVM target (coming soon)\n\n-v : version (coming soon)\n\n# Build Instructions\n\nif you have linux as your primary OS\n\nuse the ``./setUpCMake.sh`` script to setup the CMake code. \n\nand from then on \n\n``./build.sh`` to build your code. the exe name should be called \"output\" \n\n``./clean.sh`` to clean all the objs and exe.   \n\n\nelse just create a build dir and do \n\n``cmake ..``\n\n\n# Run Compilation\n\n\u003cb\u003eMIPS\u003c/b\u003e\n\nif you dont have a MIPS CPU on hand just do this\n\n1. install QTSpim\nhttps://spimsimulator.sourceforge.net/\n\n---\n\n2. the if you didnt specify a file name. its out.s the location is MipsTarget/MipsTargetASM\n---\n\n3. locate file in QTSPim by going to file-\u003eReinitialize and load file\n\n---\n\n4. Before running, I recomend pressing clear registers, and then run\n\n----\n\u003cbr\u003e\n\n\n\u003cb\u003eLLVM\u003c/b\u003e\n\nWARNING: this is in the very early stages of development so there is a huge version discrepancy between MIPS32 target and the LLVM target\n\nLLVM IR version is 14.0.0 (the best OS to run this on is Ubuntu linux)\n\nand the generated LLVM IR files are located in out/out.ll\n\nhow to run LLVM IR code\n\n```Sh\nllc out/out.ll\nclang out/out.s\n./a.out\n\n```\n\n\n# Test Programs\n\nTry some test programs. using the MIPS32 target\n\n\u003ca href=https://github.com/TheoW03/Lake/tree/master/TestPrograms\u003eTest programs\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheow03%2Flakecompilerv1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheow03%2Flakecompilerv1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheow03%2Flakecompilerv1/lists"}