Giter Club home page Giter Club logo

pure.lexicals's Introduction

pure project 🧫

🧫 implement all by nothing but only lexical closure . 🧬

____

你要像一个主人一样去展开和安排一切,而不是自作聪明地以为只需要像个奴隶一样来被安排被展开这样来面对这一切。
这就是这一项目的全部意义了。

You should do unfold do scheme for everything like a manager of the world, not think yourself clever to be managed to be setted up just like a slave and thing that is enough just face to everything in this world like that.
That's the only point of this, this project or you can say this work, a work of mine.

...
父性位虚 故虚唯之
Vater (The place of the Law) is Real Nothing, Then it shows like WHOLE THING JUST AS A NATURED LIER and THEN IT'S REALLY NOTHING AGAIN ... SO Only The (La) Pure Thing (Nothing) shall be there (la vater) AND IS BETTER THAN ANY & EVERY FXXKING THING !!!

Docs

Intro

This is a theoretical verification in Functional Programming studies.

The only one necessary thing of a language for this pure project is a lexical closure feature, means it bind its free variables by the lexical scoping, not the dynamic scoping, and this also called closure or function closure. That means there is a first-classed function means all function is valve and it will pick all the symbol where it be defined which is needed by it-self. With out such thing, all of this projec shall not works.

And with such feature, we can make these things:

  • Laziness -- without lexical closure feature, then we'll must get the laziness just from a language design and implementation.
  • Currying -- if we don't have the closure feature, then we cannot do any currying things that means no (elegant) pipe then I shall give up this pure project at its begin.
  • Tuple -- we can get numbers of values and let them applies one by one onto a picker, and then we just give a specific picker to get the specific value we've just given in.
  • Iterator -- we have the tuple now and an iterator (or List or Sequence) is just a special 2 length tuple whith a value as the head and a closure as the tail which can just get the next such tuple. (and you can do almost everything with it such as you can just simply take a Iterator <Tuple <...>> as a Table <...> ...)
  • Pipeline -- a simple pipe is just a λxf.fx while we're all in currying style and a Y(λgxf.g(fx)) could be a yard that always can give a closure to its next parameter, and with such thing we can just play pure functional programming with out any OO Method grammar to make the nesting callings be listing callings (like pipeline (x) (f) (f) (f) ... (sys.out)).

And, with these things, we can do almost (maybe full) things about the compute works, and just with clear, clean, and declarative code expressions.

Thanks for

  • CS3110 from Cornell University
  • ISMISM courses by Liu Si Mo also called Wei Ming Zi
  • Lacanian Psychoanalysis theory from the Lacanianists
  • Dialectic or Logic method from Georg Wilhelm Friedrich Hegel, Karl Marx and the Leninists
  • Lambda Calculate from Alonzo Church and Currying theory
  • Lexical Closure feature that provide this project almost
  • The Functional Programming For The Rest of Us | defmacro which told me the CPS Programming
  • Rain World game which give me some idea for the names

Implementations

Further Reading

pure.lexicals's People

Contributors

yhm-amber avatar yii-iiy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

yhm-amber

pure.lexicals's Issues

迭代器

Iter 为 Seq 和 List 的界面,后两者都为 Lazy ,一个必然有终结一个必然没有,迭代器则是可以通过 take 把 前者转为后者。

设计变更为这样。

TS 尾递归优化

把 List 也变成 lacking 的。如何?

ref: https://cs3110.github.io/textbook/chapters/ds/sequence.html

无非是多一个 Done ,相对于迭代器。迭代器则是没有 Done 。仅此而已。

迭代器的方法自成,列表的方法则全都依赖折叠。

以及,列表有 reduce 而迭代器没有。迭代器也没有普通的折叠,而是类似于 scan 的。

列表的 reduce 基于列表的折叠,迭代器的 scan 基于迭代器的折叠。这里的两种基于形式不同。

SHOW and Surplus

对 Pair 增加 Show ,可以考虑用对象或者其他。正式的各种 tuple 也是。迭代器也是,迭代器直接把 TAKE 改成 SHOW , take 有新的含义,相对于 rest 。

Java works ...

To fix the generic val unsupported

final var birds = 
new Object() 
{
	<A> Function<A,A> idiot () { return (Function<A,A>) (a -> a) ;}
} ;

birds.idiot().apply(7) ; // 7

method is value.

and, iife, also can use this.

sugg recs

pure.ts/readme.md
pure.ts/pure.ts
pure.ts/teach.md

links

https://en.wikipedia.org/wiki/Combinatory_logic "Combinatory logic"
https://zh.wikipedia.org/wiki/%E7%BB%84%E5%90%88%E5%AD%90%E9%80%BB%E8%BE%91 "组合子逻辑"

https://en.wikipedia.org/wiki/Kolmogorov_complexity "Kolmogorov complexity"
https://zh.wikipedia.org/wiki/%E6%9F%AF%E6%B0%8F%E5%A4%8D%E6%9D%82%E6%80%A7 "柯氏复杂性"
https://homepages.cwi.nl/~paulv/kolmogorov.html "An Introduction to Kolmogorov Complexity and Its Applications (柯尔莫戈罗夫复杂性及其应用简介: https://mitpressbookstore.mit.edu/book/{9780387339986,9781489984456,9783030112974}, https://www.amazon.com/Introduction-Kolmogorov-Complexity-Applications-Monographs/dp/{0387940537,0387948686,0387339981,1489984453,3030112977}/, https://link.springer.com/book/10.1007/{978-1-4757-2606-0,978-0-387-49820-1,978-3-030-11298-1}) (描述复杂性 ISBN:9787030059642)"

https://en.wikipedia.org/wiki/Condensed_matter_physics "Condensed matter physics"
https://zh.wikipedia.org/wiki/%E5%87%9D%E8%81%9A%E6%80%81%E7%89%A9%E7%90%86%E5%AD%A6 "凝聚态物理学"

https://en.wikipedia.org/wiki/Andrey_Kolmogorov "Andrey Kolmogorov (Андрей Колмогоров)"
https://zh.wikipedia.org/wiki/%E5%AE%89%E5%BE%B7%E7%83%88%C2%B7%E6%9F%AF%E7%88%BE%E8%8E%AB%E5%93%A5%E6%B4%9B%E5%A4%AB "安德雷·柯尔莫哥洛夫 (Андрей Колмогоров)"

https://tromp.github.io/cl/lazy-k.html "Lazy K | tromp cl"
https://tromp.github.io/cl/diagrams.html "Lambda Diagrams | tromp cl"

https://arxiv.org/pdf/1503.09060.pdf "A Tutorial Introduction to the Lambda Calculus | Raul Rojas"
https://tromp.github.io/cl/LC.pdf "Functional Bits: Lambda Calculus based Algorithmic Information Theory | tromp cl"

https://en.wikipedia.org/wiki/De_Bruijn_index "De Bruijn index (De Bruijn indices)"
https://en.wikipedia.org/wiki/De_Bruijn_indices "De Bruijn indices (De Bruijn index)"

https://tromp.github.io/cl/Binary_lambda_calculus.html "Binary Lambda Calculus | tromp cl"
https://gist.github.com/tromp/86b3184f852f65bfb814e3ab0987d861 "Binary Lambda Calculus"

https://en.wikipedia.org/wiki/Binary_lambda_calculus "Binary lambda calculus (Binary combinatory logic)"
https://en.wikipedia.org/wiki/Binary_combinatory_logic "Binary combinatory logic (Binary lambda calculus)"

https://en.wikipedia.org/wiki/De_Bruijn_notation "De Bruijn notation"
https://en.wikipedia.org/wiki/De_Bruijn_sequence "de Bruijn sequence"

https://jgeisler0303.github.io/deBruijnDecode/ "de Bruijn Sequence Generator"
https://debruijnsequence.org/ ""
https://chessprogramming.wikispaces.com/De+Bruijn+sequence ""
https://oeis.org/A166315 "A166315 Lexicographically earliest binary de Bruijn sequences, B(2,n)."

https://tromp.github.io/cl/cl.html "John's Lambda Calculus and Combinatory Logic Playground | tromp cl"
https://github.com/tromp/tromp.github.io.git "(Languages: HTML 85.9%, Roff 11.9%, Rust 1.1%, Haskell 0.4%, C 0.3%, PostScript 0.1%, Other 0.3%) John Tromp homepage"

https://tromp.github.io/cl/lispnycTalk/lispnyc.html "Binary Lambda Calculus: The Smallest Program Language | tromp cl"

https://github.com/polux/lambda-diagrams.git "(Apache-2.0) (Languages: Haskell 100.0%) Animations of lambda term reduction sequences // lambda 项约简序列的动画"
https://www.youtube.com/watch?v=0ZKIuKgiikM&list=PLi8_XqluS5xc7GL-bgVrxpA2Uww6nK0gV&index=7 "Prime Number Sieve in Lambda Calculus | YouTube"

https://tromp.github.io/ "John Tromp"
https://tromp.github.io/orimaze.html "OriMaze: a block moving puzzle and maze in one! | John Tromp"
https://tromp.github.io/pearls.html "Programming Pearls | John Tromp"
https://tromp.github.io/go/legal.html "Number of legal Go positions | John Tromp"

https://github.com/tromp/AIT.git "(Languages: Haskell 37.6%, HTML 30.9%, TeX 17.7%, C 8.3%, Agda 1.8%, JavaScript 0.8%, Other 2.9%) Algorithmic Information Theory, using Binary Lambda Calculus // 算法信息论,使用二进制 Lambda 演算"

https://github.com/ioccc-src/winner/blob/master/2012/tromp/tromp.orig.c "(found by: https://www.ioccc.org/years.html)"
https://www.ioccc.org/2012/tromp/hint.html "Most functional"

https://stackoverflow.com/questions/22676975/simple-lambda-calculus-dsl-using-gadts-in-ocaml "Simple lambda calculus DSL using GADTs in OCaml // 在 OCaml 中使用 GADT 的简单 lambda 演算 DSL"

https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations "Lotka–Volterra equations"
https://zh.wikipedia.org/wiki/%E6%B4%9B%E7%89%B9%E5%8D%A1-%E6%B2%83%E7%88%BE%E6%B3%B0%E6%8B%89%E6%96%B9%E7%A8%8B "洛特卡-沃尔泰拉方程"

https://en.wikipedia.org/wiki/Kolmogorov_axioms "Kolmogorov axioms (Probability axioms)"
https://zh.wikipedia.org/wiki/%E6%A9%9F%E7%8E%87%E5%85%AC%E8%A8%AD "概率公理 (柯尔莫哥洛夫公理)"

https://en.wikipedia.org/wiki/Intuitive_statistics "Intuitive statistics (folk statistics)"

https://en.wikipedia.org/wiki/Combinatorics "Combinatorics"
https://zh.wikipedia.org/wiki/%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6 "组合数学"

https://home.nvg.org/~oerjan/esoteric/ "Esoteric programming languages"

pair 的部分

可以做一个小写的 record ,接收一个 tuple 再接收一个 f 然后应用这个 f 的前两个参数。

这样就可以删掉那些花括号的部分了。包括 pair 。

可以再加一个文档什么的来介绍一下这个 record 函数与(貌似是)解包的能力的对应:先简单例子,再贴数列那个,作为复杂例。一个用于讲解,一个用于证明可用场景(就叫可用场景例)。

搞一个 bind 函数

,但是是普通那种,连续 bind 需要有 pipeline ,所以这个也可以作为 pipe 相对于 dot 的等价性变换的例。

Docs and Notes

Docs is 101 articles, notes is more things.

How about ?

pure pure

对象风格的就挪到 couple 里头,然后 pure 里头的 yard 要 alias 一个 line 的名但是是小写了,并增加一个它这个函数的类型限制(yard 的构造函数不删)

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.