{"id":20160152,"url":"https://github.com/trizen/sidef","last_synced_at":"2025-04-05T14:04:56.450Z","repository":{"id":7750217,"uuid":"9117636","full_name":"trizen/sidef","owner":"trizen","description":"A modern object-oriented programming language implemented in Perl.","archived":false,"fork":false,"pushed_at":"2025-03-08T14:03:04.000Z","size":13900,"stargazers_count":116,"open_issues_count":5,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T13:05:50.924Z","etag":null,"topics":["object-oriented","perl","programming-language","sidef","transpiler"],"latest_commit_sha":null,"homepage":"https://tio.run/#sidef","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trizen.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.paypal.me/trizen"}},"created_at":"2013-03-30T15:18:22.000Z","updated_at":"2025-03-13T23:17:30.000Z","dependencies_parsed_at":"2024-04-10T15:33:04.098Z","dependency_job_id":"13212120-8dab-4565-8f6f-819e9b140be2","html_url":"https://github.com/trizen/sidef","commit_stats":{"total_commits":3880,"total_committers":6,"mean_commits":646.6666666666666,"dds":"0.36726804123711343","last_synced_commit":"d2759930c2a9586698509ca4b83c2d8b4052e78a"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trizen%2Fsidef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trizen%2Fsidef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trizen%2Fsidef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trizen%2Fsidef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trizen","download_url":"https://codeload.github.com/trizen/sidef/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345850,"owners_count":20924102,"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":["object-oriented","perl","programming-language","sidef","transpiler"],"created_at":"2024-11-14T00:12:29.407Z","updated_at":"2025-04-05T14:04:56.422Z","avatar_url":"https://github.com/trizen.png","language":"Perl","funding_links":["https://www.paypal.me/trizen"],"categories":[],"sub_categories":[],"readme":"# The Sidef Programming Language\n\nSidef is a modern, high-level programming language designed for versatile general-purpose applications, drawing inspiration from the principles of Ruby, Raku, and Julia.\n\n```\n            **   **         ****   *           *********   *********\n          * * ** * *        ****   **          ** ** **    ** ** **\n           **   **          ****   ***         *********   *  *  *\n  **        **        **    ****   *  *        ******      ******\n* * *     * * *     * * *   ****   ** **       ** **       ** **\n **        **        **     ****   ******      ******      *  *\n       **   **              ****   *  *  *     *********   ***\n     * * ** * *             ****   ** ** **    ** ** **    **\n      **   **               ****   *********   *********   *\n```\n\n- Key features of Sidef include:\n\n  - Object-oriented programming\n  - Functional programming\n  - Functional pattern matching\n  - Optional lazy evaluation\n  - Multiple dispatch\n  - Lexical scoping\n  - Lexical closures\n  - Keyword arguments\n  - Regular expressions\n  - Seamless integration with Perl modules\n  - Optional dynamic type checking\n  - Robust support for big integers, rationals, floats, and complex numbers\n\n### Resources\n\n- [Beginner's Tutorial](https://codeberg.org/trizen/sidef/src/branch/master/TUTORIAL.md) ([PDF](https://github.com/trizen/sidef/releases/download/24.11/sidef-tutorial.pdf))\n- [Number Theory Tutorial](https://codeberg.org/trizen/sidef/src/branch/master/NUMBER_THEORY_TUTORIAL.md) ([PDF](https://github.com/trizen/sidef/releases/download/24.11/sidef-number-theory.pdf))\n- RosettaCode: [Sidef](https://rosettacode.org/wiki/Sidef)\n- Gitbook: [Sidef-lang](https://trizen.gitbook.io/sidef-lang/) ([legacy](https://trizen.gitbooks.io/sidef-lang)) ([PDF](https://github.com/trizen/sidef/releases/download/24.11/sidef-book.pdf))\n\n### Questions \u0026 Answers\n\nFor assistance or inquiries regarding Sidef, please visit the dedicated [discussion forum](https://github.com/trizen/sidef/discussions/categories/q-a).\n\n## EXAMPLES\n\n### The [Y combinator](https://en.wikipedia.org/wiki/Fixed-point_combinator#Fixed-point_combinators_in_lambda_calculus):\n```ruby\nvar y = -\u003e(f) {-\u003e(g) {g(g)}(-\u003e(g) { f(-\u003e(*args) {g(g)(args...)})})}\n\nvar fac = -\u003e(f) { -\u003e(n) { n \u003c 2 ? 1 : (n * f(n-1)) } }\nsay 10.of { |i| y(fac)(i) }     #=\u003e [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880]\n\nvar fib = -\u003e(f) { -\u003e(n) { n \u003c 2 ? n : (f(n-2) + f(n-1)) } }\nsay 10.of { |i| y(fib)(i) }     #=\u003e [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n```\n\n### ASCII generation of the [Sierpinski triangle](https://en.wikipedia.org/wiki/Sierpinski_triangle):\n```ruby\nfunc sierpinski_triangle(n) {\n    var triangle = ['*']\n    { |i|\n        var sp = (' ' * 2**i)\n        triangle = (triangle.map {|x| sp + x + sp} +\n                    triangle.map {|x| x + ' ' + x})\n    } * n\n    triangle.join(\"\\n\")\n}\n\nsay sierpinski_triangle(4)\n```\nOutput:\n```text\n               *\n              * *\n             *   *\n            * * * *\n           *       *\n          * *     * *\n         *   *   *   *\n        * * * * * * * *\n       *               *\n      * *             * *\n     *   *           *   *\n    * * * *         * * * *\n   *       *       *       *\n  * *     * *     * *     * *\n *   *   *   *   *   *   *   *\n* * * * * * * * * * * * * * * *\n```\n\n### ASCII generation of the [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set):\n```ruby\nfunc mandelbrot(z, r=20) {\n    var c = z\n    r.times {\n        z = (z*z + c)\n        return true if (z.abs \u003e 2)\n    }\n    return false\n}\n\nfor y in (1 `downto` -1 `by` 0.05) {\n    for x in (-2 `upto` 0.5 `by` 0.0315) {\n        print(mandelbrot(Complex(x, y)) ? ' ' : '#')\n    }\n    print \"\\n\"\n}\n```\nOutput:\n```text\n\n                                                            #\n                                                        #  ###  #\n                                                        ########\n                                                       #########\n                                                         ######\n                                             ##    ## ############  #\n                                              ### ###################      #\n                                              #############################\n                                              ############################\n                                          ################################\n                                           ################################\n                                         #################################### #\n                          #     #        ###################################\n                          ###########    ###################################\n                           ###########   #####################################\n                         ############## ####################################\n                        ####################################################\n                     ######################################################\n#########################################################################\n                     ######################################################\n                        ####################################################\n                         ############## ####################################\n                           ###########   #####################################\n                          ###########    ###################################\n                          #     #        ###################################\n                                         #################################### #\n                                           ################################\n                                          ################################\n                                              ############################\n                                              #############################\n                                              ### ###################      #\n                                             ##    ## ############  #\n                                                         ######\n                                                       #########\n                                                        ########\n                                                        #  ###  #\n                                                            #\n\n```\n\n### Additional Examples\n   * To explore further examples, kindly refer to: [https://github.com/trizen/sidef-scripts](https://github.com/trizen/sidef-scripts)\n\n### INTERACTIVE MODE\n\n![sidef](https://user-images.githubusercontent.com/614513/39590990-123bd3ea-4f0b-11e8-9717-abc0ec48622e.png)\n\n### TRY IT ONLINE\n\n* [https://tio.run/#sidef](https://tio.run/#sidef)\n\n### AVAILABILITY\n\n* **CPAN**: https://metacpan.org/release/Sidef\n* **PKGS**: https://pkgs.org/download/perl-Sidef\n* **Arch Linux**: https://aur.archlinux.org/packages/sidef/\n* **Slackware**: https://slackbuilds.org/repository/15.0/perl/perl-Sidef/\n\n### LICENSE AND COPYRIGHT\n\n* Copyright (C) 2013-2025 Daniel Șuteu, Ioana Fălcușan\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the *Artistic License (2.0)*. You may obtain a copy\nof the full license at:\n\n[https://www.perlfoundation.org/artistic-license-20.html](https://www.perlfoundation.org/artistic-license-20.html)\n\nAny use, modification, and distribution of the Standard or Modified\nVersions is governed by this Artistic License. By using, modifying or\ndistributing the Package, you accept this license. Do not use, modify,\nor distribute the Package, if you do not accept this license.\n\nIf your Modified Version has been derived from a Modified Version made\nby someone other than you, you are nevertheless required to ensure that\nyour Modified Version complies with the requirements of this license.\n\nThis license does not grant you the right to use any trademark, service\nmark, tradename, or logo of the Copyright Holder.\n\nThis license includes the non-exclusive, worldwide, free-of-charge\npatent license to make, have made, use, offer to sell, sell, import and\notherwise transfer the Package with respect to any patent claims\nlicensable by the Copyright Holder that are necessarily infringed by the\nPackage. If you institute patent litigation (including a cross-claim or\ncounterclaim) against any party alleging that the Package constitutes\ndirect or contributory patent infringement, then this Artistic License\nto you shall terminate on the date that such litigation is filed.\n\nDisclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER\nAND CONTRIBUTORS \"AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY\nYOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR\nCONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR\nCONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,\nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrizen%2Fsidef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrizen%2Fsidef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrizen%2Fsidef/lists"}