{"id":23228642,"url":"https://github.com/kelreeeeey/numerical_from_book_to_code","last_synced_at":"2025-04-05T18:25:55.165Z","repository":{"id":268365326,"uuid":"904118961","full_name":"kelreeeeey/numerical_from_book_to_code","owner":"kelreeeeey","description":"Numerical Thingy from book to code, Calculus, Physics and allthat - written in C and Python","archived":false,"fork":false,"pushed_at":"2025-03-12T14:58:53.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T15:39:32.711Z","etag":null,"topics":["c","calculus","learning-by-doing","physics","python"],"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/kelreeeeey.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":"2024-12-16T09:38:12.000Z","updated_at":"2025-03-12T14:58:56.000Z","dependencies_parsed_at":"2025-02-11T15:48:06.845Z","dependency_job_id":"0a96e37a-da18-4ef7-8fe8-f2dd4c6a21c2","html_url":"https://github.com/kelreeeeey/numerical_from_book_to_code","commit_stats":null,"previous_names":["kelreeeeey/numerical_from_book_to_code"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelreeeeey%2Fnumerical_from_book_to_code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelreeeeey%2Fnumerical_from_book_to_code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelreeeeey%2Fnumerical_from_book_to_code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelreeeeey%2Fnumerical_from_book_to_code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelreeeeey","download_url":"https://codeload.github.com/kelreeeeey/numerical_from_book_to_code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247380609,"owners_count":20929751,"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":["c","calculus","learning-by-doing","physics","python"],"created_at":"2024-12-19T01:14:33.915Z","updated_at":"2025-04-05T18:25:55.138Z","avatar_url":"https://github.com/kelreeeeey.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numerical Thingy _from book to code_, Calculus, Physics and allthat - (mainly) written in C, Python and other language i locked my eyes into.\n\nI decide to learn C by solving Calculus and Physics problem\nfound in any book, mainly from what i got in class(es) as undergrad.\nGeophysics student\n\nSo please bare with the _MeEsSy_ C code. Also a disclaimer, i will make a\nbunch of typo, it is just me bad at typing, i'm working on it.\n\nsource: \n- [2020 - Calculus II - After Mid Term]( https://drive.google.com/drive/folders/1mBOdVSwoBwY-C8VFbK0Sj1ZoNFnRjppd?usp=drive_link )\n\u003e**NOTE**: The source currently in private mode, i'll make the public one ASAP\n\n## How i approach this thing.\n\n### Background\n1. i need to:\n- Learn C\n- Being able to integrate C and my mother language Python as she's being so slow for some reason.\n- it is just fun to learn new language, especially when you was so traumatized by C++ back then.\n- also some bash scripting to make life more easy.\n\n2. As i implicityly said before, i'm coming from python, so the c codes written would be smelled like a snake :)\n\n### Now get to my point\n\nhere's how i write the code\n1. Read some book\n2. look up for the problems\n3. try to solve it using pencil and papers\n4. code the problem and solution in C\n5. ofc compile and check the results\n6. write a wrapper for python\n\n## How to, idk, use it?\n\nall of the code that are written in C and Zig are located in `source/` directory. per 28/12/2014, i've wrote these:\n\n```raw\n  Dec 27 21:55 area_within_interval.c\n  Dec 27 21:54 area_within_interval.h\n  Dec 28 04:05 area_within_interval.zig\n  Dec 27 22:59 example_area_within_interval.c\n  Dec 28 02:00 function_as_parameter.zig\n  Dec 27 20:51 problem_set_4_1.c\n  Dec 27 21:36 problemsetA_13_21.c\n```\nmost of c codes above were my initial attempt on learning C throught calculus material i learned in Uni.\n\nThe zig code [area_within_interval.zig](source/area_within_interval.zig) is my first attempt to re-write the [area_within_interval.c](source/area_within_interval.c) and [area_within_interval.h] in Zig.\n\n### To run it?.. (im sorry im just a rookie)\n\ni'm on Windows, here's the prereqs.:\n\n- im using gcc from [StrawberryPerl 5.40](https://strawberryperl.com/) but i'm pretty sure y'all can use gcc from MINGW or Cygwin or clang too.\n\n- im using [ Zig version 0.14.0-dev.2293+6d781e095 ](https://ziglang.org/download/)\n\n- im using [python 3.10](https://www.python.org/downloads/release/python-3100/)\n\n    - python dependency, install it using y'all fav package manager.\n\n        - [cffi==1.17.0](https://cffi.readthedocs.io/en/latest/whatsnew.html#v1-17-0)\n\nThe python code are wrapped by the `cffi` from either directly from c scripts and headers, or from the\nshared objects.\n\n\n#### The C scripts\n\nThe `build_source.sh` will compile the C scripts to executables located in `bins/` sub-dir\nand shared objects (later for python usage) located in `shared_objects/` sub-dir\n\nThe script also empties the `bins/` and `shared_objects` before produces new executables and shared objects.\n\nfrom root directory, make the bash script `build_source.sh` executable.\n\n```bash\nchmod u+x build_source.sh\n```\n\n\u003eNOTE: for now, i just use script instead of make/cmake, but let see where it will get me to\n\nthen, just run the `build_source.sh` by run one of the following command on y'all shell\n\n```\n$ ./build_source.sh\n$ .\\build_source.sh\nbash build_source.sh\n```\n\n#### The Zig scripts\n\nfrom root directory just `zig run source/zig_script.zig`\n\n#### The Python scripts\n\nAll of python codes are wrapped by the `cffi` and separated in modules based on the problem\nfrom specified materials located in `materials/non_codings/` sub-dir\n\nsee `main.py` for example. y'all can play with it.\n\nrun the main.py as a regular python script:\n\n```\npython main.py # if you on Windows\npython3 main.py # if you on MacOS or Linux\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelreeeeey%2Fnumerical_from_book_to_code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelreeeeey%2Fnumerical_from_book_to_code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelreeeeey%2Fnumerical_from_book_to_code/lists"}