{"id":21890790,"url":"https://github.com/chantastic/til","last_synced_at":"2025-10-04T11:09:10.541Z","repository":{"id":141974633,"uuid":"102160457","full_name":"chantastic/til","owner":"chantastic","description":"stuff i just learned","archived":false,"fork":false,"pushed_at":"2017-09-02T00:14:40.000Z","size":1,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T03:11:33.559Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/chantastic.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":"2017-09-01T23:37:10.000Z","updated_at":"2019-06-25T14:15:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"6913a0a3-9677-4ec3-b73b-fea3fbf25300","html_url":"https://github.com/chantastic/til","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chantastic/til","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Ftil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Ftil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Ftil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Ftil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chantastic","download_url":"https://codeload.github.com/chantastic/til/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chantastic%2Ftil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278302555,"owners_count":25964523,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-11-28T12:16:49.553Z","updated_at":"2025-10-04T11:09:10.524Z","avatar_url":"https://github.com/chantastic.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# til\nstuff i just learned\n\n## 2017.09.01\n\n**In Ocaml/Reason, every `files` is a `module`.**\n\nSay I have `schoole.re` and it looks like this:\n\n```\n/* school.re */\ntype profession = Teacher | Director;\n\nlet person1 = Teacher;\nlet getProfession person =\u003e\n  switch person {\n  | Teacher =\u003e \"A teacher\"\n  | Director =\u003e \"A director\"\n  };\n```\n\nWithout import/export statements, the above is wrapped as a module `School` and accessible throughout my project.\n\nConsiquently, Ocaml/Reason allows nested modules.\n\n```\n/* school.re */\ntype profession = Teacher | Director;\n\nlet person1 = Teacher;\nlet getProfession person =\u003e\n  switch person {\n  | Teacher =\u003e \"A teacher\"\n  | Director =\u003e \"A director\"\n  };\n\nmodule GPA {...};\nmodule Records = {...};\nmodule Rooms = {...};\n```\n\nThese are accessible through the `School` module like so: `School.GPA`\n\n#### My initial reaction\nAs a n00b, this is super weird. It feels unscalable.\n\nHowever, as a fan of flat organization patterns, I'm cautiously excited.\n\n\n#### References\n[Reason on Modules](https://reasonml.github.io/guide/language/module)  \n[What's in a language, Cheng Lou](https://www.youtube.com/watch?v=24S5u_4gx7w)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchantastic%2Ftil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchantastic%2Ftil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchantastic%2Ftil/lists"}