Blog

  • macos-netflix

    Netflix wrapper for macOS

    A very simple proof-of-concept app for a WKWebView based app to allow viewing Netflix outside the browser on macOS. The goal is to somewhat allow a picture-in-picture style browsing and watching experience. There’s a bunch of similar apps on the Mac App Store, but this one is mine, and the idea is to keep it pretty lightweight (no majorly additive features).

    Screenshot displaying the Netflix interface

    Installation Instructions

    Direct Download

    Go to the page for the latest release and download the zipped app. You want the file labelled something akin to “Netflix.zip”, and not the ones labelled “source code”.

    Unzip the app, and drag it into your Applications folder. If you accidentally downloaded the source code, you’ll be quite confused, so go back a step and download the other zip file.

    That’s all there is. Run and enjoy.

    Homebrew

    If you have Homebrew installed, try running the following in your terminal:

    brew install --cask jellybeansoup-netflix

    Alternative Icons

    The Icons folder contains alternative icons that may be used with the app. After downloading, you can apply the icon of your choice by right clicking on the installed app in Finder, clicking Get Info, and dragging it into the icon well at the top of the window.

    Replacing the app icon

    Legal

    Copyright © 2020 Daniel Farrelly. Released under the BSD license.

    App icon template is from the Bjango Templates repository, which are released under the BSD License, and are copyright © Bjango and Marc Edwards.

    This project is not associated with, affiliated with, or endorsed by Netflix, Inc. A Netflix subscription is required to use this app. Please visit Netflix.com to verify that service is available in your country.

    Visit original content creator repository https://github.com/jellybeansoup/macos-netflix
  • macos-netflix

    Netflix wrapper for macOS

    A very simple proof-of-concept app for a WKWebView based app to allow viewing Netflix outside the browser on macOS. The goal is to somewhat allow a picture-in-picture style browsing and watching experience. There’s a bunch of similar apps on the Mac App Store, but this one is mine, and the idea is to keep it pretty lightweight (no majorly additive features).

    Screenshot displaying the Netflix interface

    Installation Instructions

    Direct Download

    Go to the page for the latest release and download the zipped app. You want the file labelled something akin to “Netflix.zip”, and not the ones labelled “source code”.

    Unzip the app, and drag it into your Applications folder. If you accidentally downloaded the source code, you’ll be quite confused, so go back a step and download the other zip file.

    That’s all there is. Run and enjoy.

    Homebrew

    If you have Homebrew installed, try running the following in your terminal:

    brew install --cask jellybeansoup-netflix

    Alternative Icons

    The Icons folder contains alternative icons that may be used with the app. After downloading, you can apply the icon of your choice by right clicking on the installed app in Finder, clicking Get Info, and dragging it into the icon well at the top of the window.

    Replacing the app icon

    Legal

    Copyright © 2020 Daniel Farrelly. Released under the BSD license.

    App icon template is from the Bjango Templates repository, which are released under the BSD License, and are copyright © Bjango and Marc Edwards.

    This project is not associated with, affiliated with, or endorsed by Netflix, Inc. A Netflix subscription is required to use this app. Please visit Netflix.com to verify that service is available in your country.

    Visit original content creator repository https://github.com/jellybeansoup/macos-netflix
  • efcore-samples

    Entity Framework Core providers sample

    ★ Put a star if the repository was useful ★

    The repository was created as a demonstration of working with various database providers using ORM Entity Framework Core

    Providers

    Learn more about supported database providers for Entity Framework Core

    Configuring migrations

    1. After opening terminal (command line), install dotnet ef tool (if it is not already installed) by entering the following command:
      dotnet tool install --global dotnet-ef

    2. Make sure that correct connection string is entered in the appsettings.json file (learn more about connection strings)

    3. From terminal (command line) go to samples directory

    4. Command to add migration:

    dotnet ef migrations add `Name` --project `Project` --startup-project `StartupProject` --context `Context`
    1. Command to update a database:
    dotnet ef database update --project `Project` --startup-project `StartupProject` --context `Context`
    1. Command to remove migration:
    dotnet ef migrations remove --project `Project` --startup-project `StartupProject` --context `Context`

    Learn more about dotnet ef commands and parameters

    Reference for migration commands:

    Name – The name of the migration.
    For example: Initial

    Project – Relative path to the project folder of the target project. Default value is the current folder.
    For example: EFCoreSample.Persistence.Sqlite

    StartupProject – Relative path to the project folder of the startup project. Default value is the current folder.
    For example: EFCoreSample.Api

    Context – The name of the DbContext class to generate. If the DbContext is only one, then the attribute is not required.
    For example: ApplicationDbContext

    Connection strings

    All connection strings must be located in the appsettings.json file (learn more about connection strings)

    Connection string examples:

    • MySQL
    server=localhost;database=EFCoreSample;user=user;password=password

    more MySQL examples here

    • Oracle
    User Id=user;Password=password;Data Source=localhost:5432/EFCoreSample

    more Oracle examples here

    • PostgreSQL
    Host=localhost;Port=5432;Database=EFCoreSample;Username=postgres;Password=password

    more PostgreSQL examples here

    • SQLite
    Data Source=EFCoreSample.db

    more SQLite examples here

    • MS SQL Server
    Server=(localdb)\\\\mssqllocaldb;Database=EFCoreSample;Trusted_Connection=True;

    more MS SQL Server examples here

    • MS Access
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=EFCoreSample.accdb;Persist Security Info=False

    more MS Access examples here

    Pay attention

    In this example, the EFCoreSample.Api project is connected to all database providers at once, which is basically impossible in a real project:
    one project cannot contain multiple providers, the code given is just an EXAMPLE of how to initialize a context using different providers

    Visit original content creator repository
    https://github.com/dkolzenov/efcore-samples

  • twinkle-zhwikiquote

    Twinkle

    Twinkle是维基人用于快速执行常见维护工作(如提交删除候选及清理破坏)的JavaScript库和应用程式。

    它构建于已被许多维基百科脚本和编辑工具使用的morebits.js库之上。

    查看中文维基百科上的Wikipedia:Twinkle以获取更多信息。

    AzaToth是本工具和morebits.js库的的最初作者和维护者。

    此代码库的结构

    • morebits.js:Twinkle和许多其他脚本使用的中央库,包含与MediaWiki API进行交互、显示表单和对话框、生成状态日志及执行其他有用工作的代码。这当中大部分代码都不是Twinkle特有的。
    • morebits.cssmorebits.js所附带的样式表。在Modern皮肤中应用的一些样式是Twinkle特有的,或许这些应该被放进twinkle.css里。
    • sync.pl:用来更新维基上小工具、或用维基上的修改更新此代码库的Perl脚本。参见下方的完整文档。
    • twinkle.js:通用的Twinkle特有代码,大部分用于处理参数设置和在UI中显示Twinkle。此外,这个文件包含了Twinkle的默认参数。
    • modules:包含了单个Twinkle模块。相关说明可在头部注释或Twinkle文档中找到。模块twinkleconfig.js用于提供Twinkle参数设置

    其他没有提到的文件大概已经过时了。

    更新Wikipedia上的脚本

    有两种方式将Twinkle脚本上传到维基百科或其他地方。

    手工拼接

    此处的指引已过时,请勿使用否则你很可能搞坏东西。

    要生成拼接后的Twinkle脚本,请使用以下bash命令:

    awk 'FNR==1{print ""}{print}' twinkle.js modules/*.js > alltwinkle.js
    

    然后就可以把alltwinkle.js上传到MediaWiki:Gadget-Twinkle.js。这并未包含morebits.jsmorebits.css,它们需要被分开上传。

    如果morebits.js和/或morebits.css需要更新,它们应当被同步到MediaWiki:Gadget-morebits.jsMediaWiki:Gadget-morebits.css

    MediaWiki:Gadgets-definition应当包含这一行:

    * Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,mediawiki.RegExp,mediawiki.Title,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|morebits.js|morebits.css|Twinkle.js|friendlyshared.js|friendlytag.js|friendlytalkback.js|twinklearv.js|twinklebatchdelete.js|twinklebatchundelete.js|twinkleblock.js|twinkleclose.js|twinkleconfig.js|twinklecopyvio.js|twinkledelimages.js|twinklediff.js|twinklefluff.js|twinkleimage.js|twinkleprotect.js|twinklespeedy.js|twinkleunlink.js|twinklewarn.js|twinklexfd.js
    

    使用sync.pl同步

    存在一个名为sync.pl的同步脚本,可用于向维基百科上拉取和推送文件。

    这个程序依赖于Perl 5.10和模块Git::RepositoryMediaWiki::Bot,可轻易用App::cpanminus安装:

    cpanm --sudo install Git::Repository MediaWiki::Bot
    

    注意:在一些系统上,您可能需要安装附加的模块如File::SlurpGetopt::Long::Descriptive和其他依赖。建议您通过系统的包管理工具安装这些(如apt-get install libgetopt-long-descriptive-perl),但您也可以通过cpanm来安装。

    在运行这个程序时,您可以在命令行中使用--username--password参数提供您的凭据,但更推荐将它们保存到~/.mwbotrc的文件中,采用以下格式:

    username => "Username",
    password => "password",
    base     => "User::Username"
    

    其中basepullpush文件时的wiki路径前缀。如果你不指定base参数,文件将会被推到MediaWiki名字空间。

    留意您的工作目录不需要是干净的;亦可以stashcommit您的修改。

    pull用户Foobar的修改(如User:Foobar/morebits.js),做:

    ./sync.pl --base User:Foobar --pull morebits.js
    

    push您的修改到Foobar的wiki页,做:

    ./sync.pl --base User:Foobar --push morebits.js
    

    也有一deploy命令来部署所有Twinkle文件。

    ./sync.pl --deploy twinkle.js
    make deploy
    

    请留意,要同步到一个自定义的维基,您也需要指定–lang和–family参数。比如,要同步文件到test.wmflabs.org,您应当指定--lang=test --family=wmflabs。如果您希望使用make deploy来部署所有文件,您也可能需要将相关参数通过Makefile传递给脚本,如:

    make ARGS="--lang=test --family=wmflabs" deploy
    

    编辑摘要会包含分支和上次提交的SHA。

    格式指引

    虽然旧的代码有许多不同且不一致的格式,但我们已经决定要在代码中使用更为一致的格式。

    jQuery Core Style Guideline是我们在此之后使用的格式指引。

    无需多言,例外也是存在的。这主要和括号旁的空白有关:旧Twinkle代码看起来像if ( condition ) {,但新代码一般会用if (condition) {。惯例是跟随周围代码的样式。

    Visit original content creator repository
    https://github.com/xiplus-mediawiki-programs/twinkle-zhwikiquote

  • painter-shader-api

    Adobe I/O Documentation Template

    This is a site template built with the Adobe I/O Theme.

    View the demo running on Github Pages.

    Where to ask for help

    The slack channel #adobeio-onsite-onboarding is our main point of contact for help. Feel free to join the channel and ask any questions.

    How to develop

    For local development, simply use :

    $ yarn install
    $ yarn dev

    For the developer documentation, read the following sections on how to:

    For more in-depth instructions.

    How to test

    • To run the configured linters locally (requires Docker):

      yarn lint

      NOTE If you cannot use Docker, you can install the linters separately. In .github/super-linter.env, see which linters are enabled, and find the tools being used for linting in Supported Linters.

    • To check internal links locally

      yarn test:links
    • To build and preview locally:

      yarn start

    How to deploy

    For any team that wishes to deploy to the developer.adobe.com and developer-stage.adobe.com websites, they must be in contact with the dev-site team. Teams will be given a path that will follow the pattern developer.adobe.com/{product}/. This will allow doc developers to setup their subpaths to look something like:

    developer.adobe.com/{product}/docs
    developer.adobe.com/{product}/community
    developer.adobe.com/{product}/community/code_of_conduct
    developer.adobe.com/{product}/community/contribute
    

    Launching a deploy

    You can deploy using the GitHub actions deploy workflow see deploy instructions.

    Visit original content creator repository
    https://github.com/AdobeDocs/painter-shader-api

  • sopekocko

    Sopekocko

    Projet 6 du parcours développeur web d’OpenClassrooms : Construisez une API sécurisée pour une application
    d’avis gastronomiques

    🎯 Objectifs attendus

    • L’API doit utiliser des pratiques de code sécurisées
    • Les données personnelles des utilisateurs doivent impérativement être protégées, que ce soit côté API ou côté base de données grâce à des méthodes de masquage
    • L’authentification doit être renforcée sur les routes requises
    • L’API doit respecter le RGPD et les standards OWASP
    • 2 types de droits administrateur à la base de données doivent être définis : un accès
      pour supprimer ou modifier des tables, et un accès pour éditer le contenu de la base de données
    • La base de données utilisée devra être MongoDB
    • Toutes les erreurs de la base de données doivent être signalées grâce à Mongoose
    • L’API doit parfaitement fonctionner avec le frontend
    • Les adresses emails de la base de données doivent être uniques
    • Toutes les routes relatives à la sauce doivent exiger une demande authentifiée par token

    ✅ Compétences évaluées

    • Implémenter un modèle logique de données conformément à la réglementation
    • Mettre en œuvre des opérations CRUD de manière sécurisée
    • Stocker des données de manière sécurisée

    🚀 Installation backend

    Installer nodejs et npm sur votre machine en local. Après, se positionner sur le dossier backend à partir du projet.

    > cd backend
    

    Ensuite, installer les composants du projet.

    > npm install
    

    Enfin, lancer le projet avec nodemon serve

    > nodemon serve
    

    Le serveur sera accessible sur http://localhost:3000 par défaut.

    🚀 Installation frontend

    Le projet a été généré avec Angular CLI version 7.0.2.
    Pour le faire fonctionner, installer node-sass à part.
    Après, se positionner sur le dossier frontend à partir du projet.

    > cd frontend
    

    Ensuite, installer les composants du projet.

    > npm install
    

    Enfin, démarrer ng serve pour avoir accès au serveur de développement. Rendez-vous sur http://localhost:4200/.

    > ng serve
    

    Visit original content creator repository
    https://github.com/natho19/sopekocko

  • loan-defaults-prediction

    Loan Defaults Prediction

    About this Project

    Loans are a major source of revenue for banks, however, these are associated with high risk. A lot of the times, banks end up lending bad loans if the borrower defaults on the loan repayment. This may cause the banks to incur huge losses, potential Bankruptcy or even a global economic slowdown, as we have seen in the past (The 2007 – 2008 Financial Crisis).

    The aim of this project is to help banks mitigate this issue by providing a highly reliable and efficient Machine Learning solution that can help determine if any new borrower is likely to default or not.

    About the data

    The dataset has been taken from Kaggle, titled Loan Default Dataset. It consists of past data on loan borrowers and contains a lot of features such as borrower’s income, gender, loan purpose, rate of interest, term, etc.

    Project Organization

    The repository is structured in the following hierarchy:

    ├── LICENSE
    ├── Makefile           <- Makefile with commands like `make data` or `make train`
    ├── README.md          <- The top-level README for developers using this project
    ├── data
    │   ├── interim        <- Intermediate data that has been transformed
    │   ├── processed      <- The final, canonical data sets for modeling
    │   └── raw            <- The original, immutable data dump
    │
    ├── docs               <- A default Sphinx project; see sphinx-doc.org for details
    │
    ├── models             <- Trained and serialized models
    │
    ├── notebooks          <- Jupyter notebooks
    │
    ├── references         <- Data dictionaries, manuals, and all other explanatory materials
    │
    ├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc
    │   └── figures        <- Generated graphics and figures to be used in reporting
    │
    ├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
    │                         generated with `pip freeze > requirements.txt`
    │
    ├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
    ├── src                <- Source code for use in this project
    │   ├── __init__.py    <- Makes src a Python module
    │   │
    │   ├── pre-processing <- Scripts to download or generate data
    │   │   └── data_cleaning.py
    │   │
    │   ├── features       <- Scripts to turn raw data into features for modeling
    │   │   └── feature_engineering.py
    |   |   └── train_test_split.py
    │   │
    │   ├── train         <- Scripts to train models and then use trained models to make
    │   │   │                 predictions
    │   │   ├── predict_model.py
    │   │   └── train_model.py
    |   |   └── random_forest.py
    |   |   └── gradient_boosting_machine.py
    |   |   └── adaboost.py
    |   |   └── support_vector_machine.py
    |   |   └── stacking_ensemble.py
    │   │
    │   └── visualization  <- Scripts to create exploratory and results oriented visualizations
    │       └── visualize.py
    │
    └── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io
    

    Setting up the environment

    $ git clone git@github.com:adharshvenkat/loan-defaults-prediction.git
    $ cd loan-defaults-prediction/
    $ docker build -t loan-defaults-prediction .
    

    Deploying the ML pipeline

    Running the container:

    $ docker run -it loan-defaults-prediction
    

    Deploying the pre-processing pipeline:

    $ cd home/loan-defaults-prediction/
    $ bash pre_processing.sh
    

    Deploying the training & evaluation pipeline:

    $ bash modeling.sh
    

    Visit original content creator repository
    https://github.com/adharshvenkat/loan-defaults-prediction

  • lidar_IMU_calib-modified

    Visit original content creator repository
    https://github.com/KennyWGH/lidar_IMU_calib-modified

  • Nona

    Nona : Lazy Programming Language with Dependent Types

    Build Status Documentation Status

    Experimental Nano with dependent types
    Latest version: Nona-0.8.6

       __________________________
      / ___  / ___  / ___  / _  |
     / /  / / /__/ / /  / / __  |
    /_/  /_/______/_/  /_/_/ |__|     by Comcx
    
    

    NOTE! Codes in /src are out-of-date
    EXE file which is fresh can be used directly

    Getting Started!

    Nona only support Windows 64bits and Linux 64bits platform right now.

    Jump to the directory where Nona-x.x.exe lies,  
    (cond 
        (use-windows 
          (input command: '.\Nona-0.8.6.exe' or just double click the EXE file))
        (use-linux
          (input command: '.\Nona-0.8.6-linux')))
    


    Incomplete Intro

    • Expression :=

      Format Explanation
      Variable Single variable
      (Fun params) Lambda application
      (: Expr type) Type signature
      (= (bindings) Expr) Bindings
      (=o (pattern) Expr) Recursive bindings
      (=: (bindings) Expr) Inductive families
      (if Expr Expr Expr) Conditional
      (\ (params) Expr) Lambda abstraction
      (-> (: a t) b) Dependent function space

    • Declaration :=

      • (= pattern Expression)
      • (=o pattern Expression)
      • (=: var Type)
      • (: Expr Type)

    • Preluded terms:

      Terms Explanation
      (0 1 2 ..) with type Int
      (+ – * /) for Integers
      “_” with type String
      (true false) with type Bool
      (Int Bool String Symbol IO) which is Set
      (, fst snd) for tuples !note moved to lib right now!!
      :: () list for lists
      print to print


    • REPL use

      • Global environment:
        You can:
        type in (= <pattern> <expression>) to add definition to global environment;
        type in (=o <pattern> <expression>) to add recursive definition to global environment;
        type in (=: <variable> <type>) to construct new types to global environment.

      • Commands:
        version to show current version
        (quit) to quit repl
        (help) to ask for help
        (type <expr>) to show type info
        (na <file>) to load defs
        (no <file>) to load *.no files

    Features

    • Lexical scope mangement
    • Purely functional
    • Inductive family
    • Dependent type system
    • Type inference with unification
    • Church numeral can be built(refer to lib/Prelude.na)
    • First class record and typeclass
    • String == (List Symbol)

    Examples

    (Module Test ( -- The test file
    
    
    -- Ploymorphism & Dependent types
    (= (: id (-> (: a Set) a a)) (\ (a x) x))
    (= (: .  (-> (: a Set) (: b Set) (: c Set) (-> b c) (-> a b) (-> a c))) 
        (\ (a b c f g x) (f (g x))))
    (= (: weird (-> (: x Int) (if (== x 0) Int Bool) String))
        (\ (x a) "OK"))
    
    
    -- Boolean functions
    (= (not b)   (if b false true))
    (= (and (: a Bool) (: b Bool)) (if a b false))
    (= (or  a b) (if a true b))
    (= (xor a b) (if (and (or a b) (not (and a b))) true false))
    
    
    -- Inductive dependent sum pair
    (=: Sum (-> (: A Set) (: B (-> A Set)) Set))
    (=: ,   (-> (: A Set) (: B (-> A Set)) (: a A) (: b (B a)) (Sum A B)))
    
    -- Recursion
    (=o ((: fact (-> Int Int)) n)
      (if (== n 0) 1 (* n (fact (- n 1)))))
    
    (: foldl-Int (-> (: b Set) (-> b Int b) b (List Int) b))
    (=o (foldl-Int b h x xs)
        (if (== (head Int xs) 0) x
          (foldl-Int b h (h x (head Int xs)) (tail Int xs))))
    
    (: circle (-> (: a Set) a Int (List a)))
    (=o (circle a x n)
      (if (== n 0) (() a) (:: a x (circle a x (- n 1)))))
    
    (=o ((: ^ (-> Int Int Int)) x n)
      (if (== n 0) 1 (* x (^ x (- n 1)))))
    
    
    ))--------- end of Test ---------((
    
    
    

    Drawbacks

    • Not support weak normal head form(WNHF), not completely lazy…
    • Lack support of pattern matching for dependent types
    Visit original content creator repository https://github.com/Comcx/Nona
  • Nona

    Nona : Lazy Programming Language with Dependent Types

    Build Status
    Documentation Status

    Experimental Nano with dependent types
    Latest version: Nona-0.8.6

       __________________________
      / ___  / ___  / ___  / _  |
     / /  / / /__/ / /  / / __  |
    /_/  /_/______/_/  /_/_/ |__|     by Comcx
    
    

    NOTE!
    Codes in /src are out-of-date
    EXE file which is fresh can be used directly

    Getting Started!

    Nona only support Windows 64bits and Linux 64bits platform right now.

    Jump to the directory where Nona-x.x.exe lies,  
    (cond 
        (use-windows 
          (input command: '.\Nona-0.8.6.exe' or just double click the EXE file))
        (use-linux
          (input command: '.\Nona-0.8.6-linux')))
    

    Incomplete Intro

    • Expression :=

      Format Explanation
      Variable Single variable
      (Fun params) Lambda application
      (: Expr type) Type signature
      (= (bindings) Expr) Bindings
      (=o (pattern) Expr) Recursive bindings
      (=: (bindings) Expr) Inductive families
      (if Expr Expr Expr) Conditional
      (\ (params) Expr) Lambda abstraction
      (-> (: a t) b) Dependent function space


    • Declaration :=

      • (= pattern Expression)
      • (=o pattern Expression)
      • (=: var Type)
      • (: Expr Type)

    • Preluded terms:

      Terms Explanation
      (0 1 2 ..) with type Int
      (+ – * /) for Integers
      “_” with type String
      (true false) with type Bool
      (Int Bool String Symbol IO) which is Set
      (, fst snd) for tuples !note moved to lib right now!!
      :: () list for lists
      print to print

    • REPL use

      • Global environment:
        You can:
        type in (= <pattern> <expression>) to add definition to global environment;
        type in (=o <pattern> <expression>) to add recursive definition to global environment;
        type in (=: <variable> <type>) to construct new types to global environment.

      • Commands:
        version to show current version
        (quit) to quit repl
        (help) to ask for help
        (type <expr>) to show type info
        (na <file>) to load defs
        (no <file>) to load *.no files

    Features

    • Lexical scope mangement
    • Purely functional
    • Inductive family
    • Dependent type system
    • Type inference with unification
    • Church numeral can be built(refer to lib/Prelude.na)
    • First class record and typeclass
    • String == (List Symbol)

    Examples

    (Module Test ( -- The test file
    
    
    -- Ploymorphism & Dependent types
    (= (: id (-> (: a Set) a a)) (\ (a x) x))
    (= (: .  (-> (: a Set) (: b Set) (: c Set) (-> b c) (-> a b) (-> a c))) 
        (\ (a b c f g x) (f (g x))))
    (= (: weird (-> (: x Int) (if (== x 0) Int Bool) String))
        (\ (x a) "OK"))
    
    
    -- Boolean functions
    (= (not b)   (if b false true))
    (= (and (: a Bool) (: b Bool)) (if a b false))
    (= (or  a b) (if a true b))
    (= (xor a b) (if (and (or a b) (not (and a b))) true false))
    
    
    -- Inductive dependent sum pair
    (=: Sum (-> (: A Set) (: B (-> A Set)) Set))
    (=: ,   (-> (: A Set) (: B (-> A Set)) (: a A) (: b (B a)) (Sum A B)))
    
    -- Recursion
    (=o ((: fact (-> Int Int)) n)
      (if (== n 0) 1 (* n (fact (- n 1)))))
    
    (: foldl-Int (-> (: b Set) (-> b Int b) b (List Int) b))
    (=o (foldl-Int b h x xs)
        (if (== (head Int xs) 0) x
          (foldl-Int b h (h x (head Int xs)) (tail Int xs))))
    
    (: circle (-> (: a Set) a Int (List a)))
    (=o (circle a x n)
      (if (== n 0) (() a) (:: a x (circle a x (- n 1)))))
    
    (=o ((: ^ (-> Int Int Int)) x n)
      (if (== n 0) 1 (* x (^ x (- n 1)))))
    
    
    ))--------- end of Test ---------((
    
    
    

    Drawbacks

    • Not support weak normal head form(WNHF), not completely lazy…
    • Lack support of pattern matching for dependent types

    Visit original content creator repository
    https://github.com/Comcx/Nona