{"id":19219353,"url":"https://github.com/look/lazy-numerical-analysis","last_synced_at":"2026-05-08T16:54:28.764Z","repository":{"id":66441563,"uuid":"91149823","full_name":"look/lazy-numerical-analysis","owner":"look","description":"Example code for a blog post","archived":false,"fork":false,"pushed_at":"2017-05-24T05:10:23.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T13:44:21.141Z","etag":null,"topics":["haskell","numerical-analysis","ruby"],"latest_commit_sha":null,"homepage":"http://www.recursion.org/2017/5/24/exploring-infinite-sequences","language":"Ruby","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/look.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":"2017-05-13T04:43:40.000Z","updated_at":"2017-06-20T17:38:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"9333ee5d-2d25-4adb-bbce-768c2380e0f1","html_url":"https://github.com/look/lazy-numerical-analysis","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/look%2Flazy-numerical-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/look%2Flazy-numerical-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/look%2Flazy-numerical-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/look%2Flazy-numerical-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/look","download_url":"https://codeload.github.com/look/lazy-numerical-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292391,"owners_count":19778311,"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":["haskell","numerical-analysis","ruby"],"created_at":"2024-11-09T14:30:56.334Z","updated_at":"2026-05-08T16:54:23.721Z","avatar_url":"https://github.com/look.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lazy Numerical Analysis\n\nThis takes Haskell code by [John Hughes](https://en.wikipedia.org/wiki/John_Hughes_(computer_scientist)) and translates it to Ruby to play around with using infinite sequences in an eagerly evaluated language. It is the companion code for a [blog post on using infinite sequences in Haskell and Ruby](http://www.recursion.org/2017/5/24/exploring-infinite-sequences).\n\n## Running the code\n\nFor Ruby, you need Ruby 2.0 or greater:\n\n```\n$ irb\nrequire_relative 'numerical_analysis'\nsqrt 1000\n# =\u003e 31.622776601684336\n```\n\nI used Stack to install Haskell. Then you can run:\n\n```\n$ stack ghci\n:load numerical_analysis.hs\n*Main\u003e sqrt 1000\n31.622776601684336\n*Main\u003e deriv (**2) 5\n10.00006103515625\n```\n\n## Futher reading\n\n* [Why Functional Programming Matters](https://www.csee.umbc.edu/courses/331/fall10/resources/papers/whyfp.pdf)\n* [Modular Code and Lazy Evaluation in Haskell](https://hackhands.com/modular-code-lazy-evaluation-haskell/)\n* [Infinite Sequences in Ruby](https://rossta.net/blog/infinite-sequences-in-ruby.html)\n* [Exploring infinite sequences](http://www.recursion.org/2017/5/24/exploring-infinite-sequences)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flook%2Flazy-numerical-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flook%2Flazy-numerical-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flook%2Flazy-numerical-analysis/lists"}