{"id":26862195,"url":"https://github.com/mashingan/nim-etc","last_synced_at":"2025-05-06T20:26:42.421Z","repository":{"id":80051345,"uuid":"81290459","full_name":"mashingan/nim-etc","owner":"mashingan","description":"Various Nim snippets collection","archived":false,"fork":false,"pushed_at":"2024-05-09T15:11:10.000Z","size":278,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T02:35:33.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nim","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/mashingan.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-02-08T05:16:27.000Z","updated_at":"2025-01-25T00:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"95e66f15-1360-4d93-aad6-ebb8557f18ed","html_url":"https://github.com/mashingan/nim-etc","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/mashingan%2Fnim-etc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashingan%2Fnim-etc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashingan%2Fnim-etc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashingan%2Fnim-etc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mashingan","download_url":"https://codeload.github.com/mashingan/nim-etc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252763278,"owners_count":21800457,"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":[],"created_at":"2025-03-31T02:35:37.157Z","updated_at":"2025-05-06T20:26:42.378Z","avatar_url":"https://github.com/mashingan.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nim-Etc\nVarious Nim snippets collection\n\n## setjmp_examples\nThis folder consists all example which taken from [Setjmp.h](https://en.wikipedia.org/wiki/Setjmp.h) page.  \nNote that for ``cooperative.nim`` example, it would give ``segfault`` if it's compiled with x86-64 processor. If it's compiled to i386/x86, it will run cooperatively between ``mainTask`` and ``childTask``.\n\n## armyfactions\nThis a solved problem about finding and calculating army faction within given map.  \nThe input is given in the file and the very first line shows how much test case should be done. While the two subsequents line show the row and column of the map.  \nAfter that, there are several lines which draws the map.\nEach army faction is labeled with lower case ascii, each plain is labeled with ``.`` and mountain is ``#`` . A faction said controlling a region if within closed space only that faction is there. If there's another faction within that space/region, it's said that region is contested. If a faction found another with the same faction, it's allied faction and should controlling the same region.  \nThe task was to write any regions each faction had controlled without writing any contested region. Lastly, write the total contested region within that map.  \nThe solution using 2 macro to illustrate on Nim ability to control how coders to code whichever they like. In short, coders are able to create any DSL they want accordingly.  \nAlso, the solution illustrates on DFS (deep-first search) to walk the map from any faction.  \nCompile with ``-d:release`` to avoid stack overflow because of DFS while walking the map.\n\n## UDP Server\nA simple example of UDP server in Nim. Using module ``net``. Done to answer problem in forum https://forum.nim-lang.org/t/3074\n\n## crud_web\nSimple Web CRUD (only Create and Read though) using sqlite DB which should\nbe applicative to other kind of DB.\n\n## js-visitor\nAn example from [Dennis' page \"What special about Nim?\"](https://hookrace.net/blog/what-is-special-about-nim/)\nwhich illustrate Nim flexibility compiled to JavaScript\n\n## jester-0.4.1-example\nThe same example with [crud_web](#crud_web) which adapted to newer Jester's\nversion and using Nim 0.19.0 which initialize `string` and `seq` to not `nil`\n\n## downloadmanga\nVarious implementation of webscraping and getting the file in the page.  \nThe detail can be found [here](./downloadmanga/readme.md).\n\n## front-end-karax\nExperiment with [Karax](https://github.com/pragmagic/karax).  \nAdditional information can be read [here](./front-end-karax/readme.md)\n\n## poolclient\nThis example shows on how to the pooled client together with its simple\nserver implementation.\n\n## rosettacode\nThis is rosettacode tasks collection implementations in Nim.\nSeveral copied from existing implementation but mainly a new implemented task\nfor Nim in rosettacode.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmashingan%2Fnim-etc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmashingan%2Fnim-etc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmashingan%2Fnim-etc/lists"}