{"id":13423817,"url":"https://github.com/rhysd/Dachs","last_synced_at":"2025-03-15T17:32:22.480Z","repository":{"id":15132489,"uuid":"17859667","full_name":"rhysd/Dachs","owner":"rhysd","description":"Dachs; A Doggy :dog: Programming Language","archived":false,"fork":false,"pushed_at":"2019-09-14T05:06:18.000Z","size":2525,"stargazers_count":84,"open_issues_count":1,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-02T11:58:40.889Z","etag":null,"topics":["compiler","cpp","dog","go","inu","language","llvm","programming-language"],"latest_commit_sha":null,"homepage":"","language":"C++","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/rhysd.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}},"created_at":"2014-03-18T09:06:15.000Z","updated_at":"2024-02-05T16:20:10.000Z","dependencies_parsed_at":"2022-09-09T17:20:20.393Z","dependency_job_id":null,"html_url":"https://github.com/rhysd/Dachs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2FDachs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2FDachs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2FDachs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhysd%2FDachs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhysd","download_url":"https://codeload.github.com/rhysd/Dachs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243767311,"owners_count":20344904,"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":["compiler","cpp","dog","go","inu","language","llvm","programming-language"],"created_at":"2024-07-31T00:00:43.138Z","updated_at":"2025-03-15T17:32:22.471Z","avatar_url":"https://github.com/rhysd.png","language":"C++","readme":"\u003cimg src=\"https://github.com/rhysd/Dachs/blob/master/misc/dachs-logo.png?raw=true\" width=\"350\" alt=\"Dachs Programming Language\"/\u003e\n\n**Now new version is being developed in ['next' directory](./next). It will replace current C++ implementation.**\n\nDachs is a general-purpose programming language designed to be enjoyable, statically-typed and dog-friendly. Dachs is intended to be used for efficient applications and tools development, not for system programming.\n\nGoals :dog2:\n- Light to write (inspired by Ruby)\n- Strongly and statically typed\n- Native code efficiency\n- OOP\n- Immutability-aware\n- Familiar with functional features\n- Dog-friendly\n\n\u003cpre\u003e\n\u003ci\u003e# If 'var' is specified, the argument is copied and passed by value\u003c/i\u003e\n\u003ci\u003e# then mutable.  Otherwise, the argument is passed by reference then\u003c/i\u003e\n\u003ci\u003e# immutable. Variable definition has the same rule as this.\u003c/i\u003e\n\u003ci\u003e# Type of arguments and returned value are deduced automatically.\u003c/i\u003e\n\n\u003ci\u003e# If you want to specify the type of argument, you can use ':'.\u003c/i\u003e\n\u003ci\u003e# e.g.\u003c/i\u003e\n\u003ci\u003e#   func step_to(var first : float, last : float, block) : ()\u003c/i\u003e\n\n\u003cb\u003efunc\u003c/b\u003e step_to(\u003cb\u003evar\u003c/b\u003e first, last, block)\n    \u003cb\u003efor\u003c/b\u003e first \u0026lt;= last\n        block(first)\n        first += 1\n    \u003cb\u003eend\u003c/b\u003e\n\u003cb\u003eend\u003c/b\u003e\n\n\u003ci\u003e# UFCS is implemented.\u003c/i\u003e\n\u003ci\u003e# '1.step_to n' is equivalent to 'step_to(1, n)'\u003c/i\u003e\n\n\u003ci\u003e# Dachs has a block inspired from Ruby.\u003c/i\u003e\n\u003ci\u003e# do-end block is passed to the last argument of callee as lambda object.\u003c/i\u003e\n\u003ci\u003e# Here, 'block' variable is captured into do-end block.\u003c/i\u003e\n\n\u003cb\u003efunc\u003c/b\u003e fizzbuzz(n, block)\n    1.step_to n \u003cb\u003edo\u003c/b\u003e |i|\n        \u003cb\u003ecase\u003c/b\u003e\n        \u003cb\u003ewhen\u003c/b\u003e i % 15 == 0\n            block(\"fizzbuzz\")\n        \u003cb\u003ewhen\u003c/b\u003e i %  3 == 0\n            block(\"fizz\")\n        \u003cb\u003ewhen\u003c/b\u003e i %  5 == 0\n            block(\"buzz\")\n        \u003cb\u003eelse\u003c/b\u003e\n            block(i)\n        \u003cb\u003eend\u003c/b\u003e\n    \u003cb\u003eend\u003c/b\u003e\n\u003cb\u003eend\u003c/b\u003e\n\n\u003cb\u003efunc\u003c/b\u003e main\n    fizzbuzz 100 \u003cb\u003edo\u003c/b\u003e |i|\n        println(i)\n    \u003cb\u003eend\u003c/b\u003e\n\u003cb\u003eend\u003c/b\u003e\n\n\u003ci\u003e# Array and tuple are available as container.\u003c/i\u003e\n\u003ci\u003e# (dictionary will come.)\u003c/i\u003e\n\u003c/pre\u003e\n\n\u003c!--\n# If 'var' is specified, the argument is copied and passed by value\n# then mutable.  Otherwise, the argument is passed by reference then\n# immutable. Variable definition has the same rule as this.\n# Type of arguments and returned value are deduced automatically.\n\n# If you want to specify the type of argument, you can use ':'.\n# e.g.\u003c/i\u003e\n#   func step_to(var first : float, last : float, block) : ()\n\nfunc step_to(var first, last, block)\n    for first \u003c= last\n        block(first)\n        first += 1\n    end\nend\n\n# UFCS is implemented.\n# '1.step_to n' is equivalent to 'step_to(1, n)'\n\n# Dachs has a block inspired from Ruby.\n# do-end block is passed to the last argument of callee as lambda object.\n# Here, 'block' variable is captured into do-end block.\n\nfunc fizzbuzz(n, block)\n    1.step_to n do |i|\n        case\n        when i % 15 == 0\n            block(\"fizzbuzz\")\n        when i %  3 == 0\n            block(\"fizz\")\n        when i %  5 == 0\n            block(\"buzz\")\n        else\n            block(i)\n        end\n    end\nend\n\nfunc main\n    fizzbuzz 100 do |i|\n        println(i)\n    end\nend\n\n# Array and tuple are available as container.\n# (dictionary will come.)\n--\u003e\n\n## Progress Report\n\n- [x] Basic literals\n- [x] Basic expressions\n- [x] Basic statements\n- [x] Basic strong type check\n- [x] Functions\n- [x] Operator functions\n- [x] Overload resolution\n- [x] Simple return type and variable type deduction\n- [ ] Type inference\n- [x] UFCS\n- [x] Class\n- [x] Lambda\n- [x] Block\n- [ ] Variadic arguments\n- [ ] Module\n- [x] GC\n- [x] Tests\n- [x] CMakeLists.txt\n- [x] Travis-CI\n- [ ] Option parser\n- [ ] Allocator customization\n- [ ] Introduce [OvenToBoost](https://github.com/faithandbrave/OvenToBoost)\n\nThis software is disributed under [The MIT License](http://opensource.org/licenses/MIT) if not specified in a source file.\n\n    Copyright (c) 2014-2015 rhysd\n\nThis software uses [Boost C++ Libraries](http://www.boost.org/), which is licensed by [The Boost License](http://www.boost.org/users/license.html).\n\n\u003e Boost Software License - Version 1.0 - August 17th, 2003\n\nThis software uses [LLVM](http://llvm.org/), which is licensed by [University of Illinois/NCSA Open Source License](http://opensource.org/licenses/UoI-NCSA.php).\n\n\u003e Copyright (c) 2003-2014 University of Illinois at Urbana-Champaign\n","funding_links":[],"categories":["C++","Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2FDachs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhysd%2FDachs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhysd%2FDachs/lists"}