{"id":14966169,"url":"https://github.com/sqrtneginf/rosettacode-raku-smoke","last_synced_at":"2025-08-18T23:05:37.180Z","repository":{"id":37635787,"uuid":"134468809","full_name":"SqrtNegInf/Rosettacode-Raku-Smoke","owner":"SqrtNegInf","description":"Smoke testing Raku (formerly Perl 6) Rosettacode tasks","archived":false,"fork":false,"pushed_at":"2024-12-30T02:50:24.000Z","size":53446,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-02T11:49:10.495Z","etag":null,"topics":["perl6","raku","rosettacode","smoke-testing"],"latest_commit_sha":null,"homepage":"","language":"Raku","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/SqrtNegInf.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":"2018-05-22T19:56:55.000Z","updated_at":"2024-12-30T02:50:27.000Z","dependencies_parsed_at":"2023-09-24T02:26:49.454Z","dependency_job_id":"d49d5022-f83e-4455-8759-6269c5dea3ce","html_url":"https://github.com/SqrtNegInf/Rosettacode-Raku-Smoke","commit_stats":{"total_commits":18239,"total_committers":2,"mean_commits":9119.5,"dds":"0.000054827567300796964","last_synced_commit":"7a25eed8e0ebff1a904a76679e895168f5dd6c16"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SqrtNegInf/Rosettacode-Raku-Smoke","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FRosettacode-Raku-Smoke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FRosettacode-Raku-Smoke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FRosettacode-Raku-Smoke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FRosettacode-Raku-Smoke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SqrtNegInf","download_url":"https://codeload.github.com/SqrtNegInf/Rosettacode-Raku-Smoke/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FRosettacode-Raku-Smoke/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271073387,"owners_count":24694538,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["perl6","raku","rosettacode","smoke-testing"],"created_at":"2024-09-24T13:35:57.304Z","updated_at":"2025-08-18T23:05:37.154Z","avatar_url":"https://github.com/SqrtNegInf.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smoke testing Raku Rosettacode tasks\n\nThis space intentionally left blank.\n\n## Back-story\n\nI was at The Perl Conference when the coffee mugs were thrown and the idea of \nwhat was to become Raku was born. Sounded great to me. I checked up on the\nnews about the language from time to time, being patient, knowing that Rome 2.0 \nwasn't built in a day...\n\nTime passed. \nRFC's rained from the sky.\n\nTime passed. \nChildren were born. \n\nTime passed. \nHair turned gray.\n\nTime passed. \nEmpires rose and fell.\n\nTime... (you get the idea)\n\nThe whole time I kept plugging away with Perl 5, and happy to be doing so, but with the \ndream of merging the **Perl Way** with enhancements drawn from *APL*...\n\nBut at the end of 2015 with the 6.c release looking like it really was going to happen, \nI decided to put some effort into learning the current state of Perl 6 (as it was then called) via the examples on Rosetta Code.\nAnd one of the first tasks I looked at was **broken**. O the horror! Checked the docs, saw the problem, thought:\nI can fix that!  Have kept pulling the thread on that sweater for many years...\n\n## Smoking is Good (for Raku)\n\nPrecisely because of the very long gestation and continued evolution of Raku, \ntasks on Rosetta-Code were really susceptible to bit-rot. \nFor example, some guy named\n[Tim](http://rosettacode.org/wiki/User:TimToady) found out \nthat his very own \n[Forest fire](http://rosettacode.org/wiki/Forest_fire) \ncode was broken the day before he was off to a conference\nwhere he wanted to demonstrate it. Oops. *Someone* had to do *something*.\n\nDaily testing results have been saved since 2016-09-01, at which point just under 600\ntasks were in the system.  The task count now approaches 1400.  For each\ntask the `stdout` (and any `stderr`) are saved and tested against expected output \n\nBoth MoarVM and JVM backends are being tested.  MoarVM is sync'd to `moar-blead` daily, JVM much \nless often (pretty much just once a year).  Fewer tasks work with JVM.  A couple dozen crash, and it's hard to get JVM to \nwork with modules (in particular, tasks that produce image output are affected by this).\n\nReal Soon Now I will put up a pretty front-end, but for now you can view\ntask status report in \n[glorious mono-chrome ASCII](meta/task.txt) (very suitable for grepping).\n\n## Timeline\n\nWork began (though I didn't know it at the time) just before the *Christmas* release\nin late 2015. A lot of tasks worked as-is, but a wide variety of small changes were needed (turns out \ndebugging is a pretty good way to learn a language).   Many of the initial fixes were handling fallout \nfrom the GLR (**Great List Refactor**), where the 'fix' was a single `|`, but the trick was \nfinding out where it was needed...\n\nThere were also Niecza-specific solutions, which were retired.\n\nNow substantially complete, 99+% of the time tasks \"just work\",\naside from necessary under-the-hood upgrades like hash-key randomization.\n\n## Tools\n\nUsing a small set of Perl 5 programs I wrote, which are [here](./bin).\n\nWhy are these written in Perl 5 not Raku?  In my defense, when I first started I didn't\nknow Raku that well. Plus, Raku wasn't always working 100%, so the tools might not have been\nreliable.\n\n## To-Do\n\nInclude testing of Javascript backend.\n\nCurrently daily testing is on macOS (two OS's) and Linux (Ubuntu), could expand to Windows?\n\n## MTYEWTKATLORST\n##### (more than you ever wanted to know about the logistics of Raku smoke testing)\n\n### Header\n\nI keep track of the status of each task with custom header inserted right after\nthe hash-bang line, e.g.:  \n\n```\n#!/usr/bin/env raku\n#u# http://rosettacode.org/wiki/Take_notes_on_the_command_line\n#c# 2016-05-18 \u003cRC\n#m# MOAR: OK\n#j#  JVM: OK\n#p# RC prep: cp ref/take-notes.base run/take-notes.txt\n#i# RC cli: \"new note 1\"\n#f# RC file: take-notes.txt\n```\n\nURL on Rosetta-Code\n```\n#u# http://rosettacode.org/wiki/Take_notes_on_the_command_line\n```\n\nChange dates / status where\n* \u003cRC - read from Rosetta-Code\n* \u0026gt;RC - written to Rosetta-Code\n* \u003c\u003eRC - read \u0026 written \n```\n#c# 2016-05-18 \u003cRC\n```\n\nStatus of MoarVM backend, 'OK' or 'BROKEN'\n```\n#m# OK\n```\n\nStatus of JVM backend, 'OK' or 'BROKEN'\n```\n#j# OK\n```\n\nprepare to run - mostly moving files into place\n```\n#r# RC prep: cp ref/take-notes.base run/take-notes.txt\n```\n\nMeta-tag, such as 'interactive', 'graphical', 'nocode', 'trivial', 'toodamnslow', 'runs forever'\n```\n#t# skiptest\n```\n\ncommand-line input (single item)\n```\n#i# RC cli: \"new note 1\"\n```\n\nSome programs require more interaction with the user while running,\nthis allows multiple lines of text to be piped in\n```\n#=# RC pipe: 1\\n2\\n3\n```\n\nWhen it is not practical to have a self-contained test, capture\noutput to a file, and test for differences with\n`diff ref/\u003cfn\u003e run/\u003cfn\u003e`\n```\n#f# RC file: take-notes.txt\n```\n\nNotes to self\n```\n#n# blah blah blah woof woof\n```\n\n### Footer\n\nAfter downloading, I modify the task to capture program output\n\n`@res` - results from program\n\n`$ref` - reference output\n\nThe simplest tests then are just:\n```\n@res.join(\"\\n\"), chomp $ref;\n```\n\n### Random-ness, random-less...\n\nIf the task involves `.rand`, `.pick`, `.roll` or any other sort of randomness, I set\na fixed seed, e.g. `srand 123456`, to get consistent output for testing. \nMoarVM and JVM differ in the random sequence they emit, \nso separate results must be tested for each.\n\nBut it turns out that this is not enough...\n\nThe optimizer sometimes juggles the code in such a way that the results still change, with new Raku \nreleases, with interactive terminal runs vs. cron-initiated jobs, and quite possibly with the\nphase of the moon. To handle this I've made several types of changes:\n\n* entirely removed randomness (when it wasn't crucial to the task at hand)\n* hard-coded the 'random' values\n* mimic-ed the native random calls with a simple, but *stable*, pseudo-random generator\n* passed `--optimize=0` to Raku\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqrtneginf%2Frosettacode-raku-smoke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqrtneginf%2Frosettacode-raku-smoke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqrtneginf%2Frosettacode-raku-smoke/lists"}