{"id":24614106,"url":"https://github.com/quintenstr/calculatorelm","last_synced_at":"2025-03-18T17:45:20.590Z","repository":{"id":274036877,"uuid":"921710771","full_name":"QuintenStr/CalculatorElm","owner":"QuintenStr","description":"Functionally programmed calculator app in the browser with Elm. Custom parser for mathematical equations (no built in support from Elm). Based on iOS UI.","archived":false,"fork":false,"pushed_at":"2025-01-24T13:21:52.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T14:23:04.535Z","etag":null,"topics":["calculator","calculator-app","elm","elm-lang","parser"],"latest_commit_sha":null,"homepage":"","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuintenStr.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-24T13:21:51.000Z","updated_at":"2025-01-24T13:25:13.000Z","dependencies_parsed_at":"2025-01-24T14:23:11.525Z","dependency_job_id":"f676528a-af9e-4a2e-ad34-e4a8885b02a6","html_url":"https://github.com/QuintenStr/CalculatorElm","commit_stats":null,"previous_names":["quintenstr/calculatorelm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintenStr%2FCalculatorElm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintenStr%2FCalculatorElm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintenStr%2FCalculatorElm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuintenStr%2FCalculatorElm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuintenStr","download_url":"https://codeload.github.com/QuintenStr/CalculatorElm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244273043,"owners_count":20426842,"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":["calculator","calculator-app","elm","elm-lang","parser"],"created_at":"2025-01-24T21:15:02.830Z","updated_at":"2025-03-18T17:45:20.565Z","avatar_url":"https://github.com/QuintenStr.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elm Calculator 🧮\n\n## Project Overview\n\nThis project was developed as a university assignment to explore Domain-Specific Languages (DSLs) by creating a parser in Elm for mathematical equations. Unlike JavaScript, Elm doesn't provide direct string-to-calculation conversion, making this an intriguing challenge.\n\n## Features\n\n### Calculator Functionality\n- Interactive UI with clickable buttons and displays\n- Input and output displays\n\n### Advanced Calculation Capabilities\n- Basic operations: Addition, Subtraction, Multiplication, Division\n- Negation support\n- Multiple number base input support:\n  - Hexadecimal (e.g., `0xA+5`)\n  - Octal (e.g., `0o10+2`)\n  - Binary (e.g., `0b101+3`)\n  - Decimal (standard input)\n\n### Error Handling\n- Prevents impossible states\n- Handles division by zero\n- Displays error messages for invalid operations\n\n### Advanced Parsing\n- Parentheses and grouping support: `( )`, `[ ]`, `{ }`\n- Respects mathematical precedence of different grouping symbols\n- Outputs always in decimal\n\n### Input Methods\n- Keyboard input recommended for special characters\n- Allowed characters: `0-9`, `+-*/`, `enter`, `c`, `backspace`\n- Special character input (x, o, b, A-F) via keyboard only\n\n## Design Inspiration\nDesign based on the iOS calculator app. All credit to their design team.\n\n## Testing\n\n### Running Tests\n```bash\nelm-test\n```\n\n### Test Results\n```\nCompiling \u003e Starting tests\n\nelm-test 0.19.1-revision12\n--------------------------\n\nRunning 24 tests. To reproduce these results, run: elm-test --fuzz 100 --seed 38497853693389\n\nTEST RUN PASSED\n\nDuration: 176 ms\nPassed:   24\nFailed:   0\n```\n\n## Getting Started\n\n### Launch the Project\nCompile Elm code to JavaScript first\n```\nelm make src/Main.elm --output=calc.js\n```\nLaunch development environment\n```bash\nelm reactor\n```\nThen navigate to: `http://localhost:8000/index.html`\n\n## Development Notes\n- AI-generated tests supplemented manual testing to make sure each possibility is correctly parsed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquintenstr%2Fcalculatorelm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquintenstr%2Fcalculatorelm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquintenstr%2Fcalculatorelm/lists"}