GithubHelp home page GithubHelp logo

thi-ng / blog Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 0.0 51.74 MB

Current blog posts and consolidated historical articles from various other blog platforms used previously

Home Page: https://thi.ng/blog

License: Creative Commons Attribution Share Alike 4.0 International

TypeScript 100.00%
blog clojure clojurescript typescript webgl zig

blog's People

Contributors

postspectacular avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

2019 transducers Part 2

Hi,
I've been meaning to read this article, finally did, and it was full of insights.
I discovered a few minor issues.

the resulting array as a comment:

// Replicate Array.map()
transduce(mul10, push(), null, [1, 2, 3, 4]);
// [10, 20, 30, 40]

same here:

// overlaps can be achieved via optional step size
tx.transduce(tx.partition(3, 1), tx.push(), tx.range(10));
// [
//   [0, 1, 2],
//   [1, 2, 3],
//   [2, 3, 4],
//   [3, 4, 5],
//   [4, 5, 6],
//   [5, 6, 7],
//   [6, 7, 8],
//   [7, 8, 9],
// ]

update converge condition from 1e-3 to 1:

// leaky integrator which stops when difference between
// prev/curr goes below 1
[
    ...tx.converge(
        (a, b) => Math.abs(a - b) < 1,
        tx.iterate((x) => x + (100 - x) * 0.5, 0)
    ),
];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.