{"id":14966011,"url":"https://github.com/seanpm2001/learn-raku","last_synced_at":"2025-04-09T15:39:13.050Z","repository":{"id":134858065,"uuid":"481006263","full_name":"seanpm2001/Learn-Raku","owner":"seanpm2001","description":"A repository for showcasing my knowledge of the Raku programming language, and continuing to learn the language.","archived":false,"fork":false,"pushed_at":"2022-04-19T23:45:12.000Z","size":276,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"Learn-Raku","last_synced_at":"2025-04-04T16:19:19.781Z","etag":null,"topics":["article","collection","gpl3","gplv3","learn","learn-raku","learn-raku-lang","learn-raku-language","md","perl6","programming","raku","raku-collection","raku-lang","raku-language","seanpm2001","seanpm2001-education","seanpm2001-life-archive","txt"],"latest_commit_sha":null,"homepage":"https://github.com/seanpm2001/Learn/","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanpm2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYINGL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-12T23:37:43.000Z","updated_at":"2022-11-07T02:43:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b8093b7-2e35-4eab-b76b-0ccba2b7aa2d","html_url":"https://github.com/seanpm2001/Learn-Raku","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"ec4b1a3fc37c06d773bef7c5f73aca8e3eefa147"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"seanpm2001/Git-Template_V8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Raku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Raku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Raku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Raku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanpm2001","download_url":"https://codeload.github.com/seanpm2001/Learn-Raku/tar.gz/refs/heads/Learn-Raku","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248059222,"owners_count":21040905,"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":["article","collection","gpl3","gplv3","learn","learn-raku","learn-raku-lang","learn-raku-language","md","perl6","programming","raku","raku-collection","raku-lang","raku-language","seanpm2001","seanpm2001-education","seanpm2001-life-archive","txt"],"created_at":"2024-09-24T13:35:41.577Z","updated_at":"2025-04-09T15:39:13.013Z","avatar_url":"https://github.com/seanpm2001.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n***\n\n![/Camelia.svg](/Camelia.svg)\n\n### Learning Raku\n\nI am not too experienced with the Raku programming language at the moment. This document will go over my knowledge of the Raku language so far.\n\nThis document used version 6.d of the Raku programming language. The version will be listed with each example.\n\n#### Comments in Raku\n\nComments in Raku are similar to languages lika Perl, Python, Shell, etc.\n\n```raku\n# This is a single line comment\n# Raku doesn't support multi-line comments as far as I know\n```\n\nThis example works with every version of Raku\n\n#### Break keyword in Raku\n\nRaku supports the `break` keyword:\n\n```raku\nbreak\n```\n\nTo this day, I am still not entirely sure what the `break` keyword does, but most languages support it.\n\n#### Hello World in Raku\n\nA hello world program in Raku is written like so:\n\n```raku\nsay \"Hello World\"\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\nAlternatively, since this is a Perl family language:\n\n##### JARH program\n\n```raku\n# JARH program (Just Another Raku Hacker)\nsay \"Just Another Raku Hacker...\"\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\n#### My keyword in Raku\n\nRaku uses the `my` keyword for defining variables.\n\n##### Integers in Raku\n\nUsing the `my` keyword, a Raku integer is defined like so:\n\n```raku\nmy Int $x = 2;\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\nHowever, defining the integer like this is optional, and can be simplified to:\n\n```raku\nmy $x = 2;\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\n##### Strings in Raku\n\nUsing the `my` keyword, a Raku string is defined like so:\n\n```raku\nmy Str $s = \"A Raku string...\";\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\nHowever, defining the string like this is optional, and can be simplified to:\n\n```raku\nmy $s = \"A Raku string...\";\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\n#### Classes in Raku\n\nRaku supports OOP (Object Oriented Programming) and along with it, classes. A Raku class is defined like so:\n\n```raku\nclass myRakuClass {\n\tsay \"Welcome to my Raku Class\"\n}\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\n#### Factorials in Raku\n\nFactorials in Raku are defined using the `fact` keyword. The keyword `sub` seems to be mandatory. They are written like so:\n\n```raku\nsub fact (UInt $n --\u003e UInt) {\n\treturn 1 if $n == 0;\n\treturn $n * fact($n-1);\n}\n```\n\nThis example works with every version of Raku\n\n_/!\\ This example has not been tested yet, and may not work_\n\n#### Source\n\nThe majority of my Raku knowledge comes from self-experimentation, and Wikipedia.\n\n#### Other knowledge of Raku\n\n1. Raku is a curly bracket and semicolon language\n\n2. Raku has a syntax similar to Perl, see more below (goto 4)\n\n3. Raku uses the `*.raku` file extension\n\n4. Raku was originally known as Perl 6, but the developers of Perl decided to split it off into its own separate language, due to how much change there was.\n\n5. Raku is a programming language by Larry Wall\n\n6. Raku is a language recognized by GitHub, although GitHub also recognizes `perl 6` as a separate programming language alongside Raku, but not officially anymore.\n\n7. Raku is an open source programming language\n\n8. No other knowledge of Raku at the moment.\n\n***\n\n**File version:** `1 (2022, Tuesday, April 19th at 4:44 pm PST)`\n\n***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanpm2001%2Flearn-raku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanpm2001%2Flearn-raku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanpm2001%2Flearn-raku/lists"}