Skip to content

Commit

Permalink
Added ticker symbol and ticker tape abstractions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Feb 5, 2024
1 parent 24e91cd commit 69a1d02
Show file tree
Hide file tree
Showing 84 changed files with 361 additions and 566 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Reference

0. [Lists of Open Problems](https://amathr.org/problems/)
0. [The L-functions and modular forms database (LMFDB)](https://www.lmfdb.org/)

# Logarithm

0. []()
0. [Logarithm: The Complete Guide (Theory & Applications)](https://mathvault.ca/logarithm-theory/)

# Ball arithmetic
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [Combinatory Logic](https://combinatorylogic.com/)
0. [A correct-by-construction conversion from lambda calculus to combinatory logic](https://www.cambridge.org/core/journals/journal-of-functional-programming/article/correctbyconstruction-conversion-from-lambda-calculus-to-combinatory-logic/B2A7BCF12A7A5D52B294C78A6F04191F)
0. [YOW! Lambda Jam 2018 - Edward Kmett - Combinators Revisited](https://www.youtube.com/watch?v=zhj_tUMwTe0)
0. [Combinatory Logic in Programming](https://doc.lagout.org/science/0_Computer%20Science/2_Algorithms/Combinatory%20Logic%20in%20Programming.pdf)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions documentation/bookmark/recommendation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [RecBole: A unified, comprehensive and efficient recommendation library](https://recbole.io/)

2 changes: 1 addition & 1 deletion lux-jvm/source/program.lux
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
[meta
[archive (.only Archive)]
["[0]" context]
["[0]" cli]z
["[0]" cli]
["[0]" packager
["[1]" jvm]]]
[language
Expand Down
54 changes: 27 additions & 27 deletions stdlib/source/library/lux.lux
Original file line number Diff line number Diff line change
Expand Up @@ -5887,16 +5887,38 @@
{#Right [lux (its #eval lux)]})]
(eval type code)))

(every .public Target
Text)

(with_template [<name> <value>]
[(the .public <name>
Target
<value>)]

... Available.
[js "JavaScript"]
[jvm "JVM"]
[lua "Lua"]
[python "Python"]
[ruby "Ruby"]
... Not available yet.
[c++ "C++"]
[common_lisp "Common Lisp"]
[php "PHP"]
[r "R"]
[scheme "Scheme"]
)

(the .public for
(let [target (is (Meta Text)
(let [target (is (Meta Target)
(function (_ compiler)
{#Right [compiler (its [#info #target] compiler)]}))
platform_name (is (-> Code
(Meta Text))
(Meta Target))
(function (_ it)
(do meta#monad
[it (eval Text it)]
(in (as Text it)))))
[it (eval Target it)]
(in (as Target it)))))
target_pick (is (-> Text (List [Code Code]) (Maybe Code)
(Meta (List Code)))
(function (target_pick target options default)
Expand Down Expand Up @@ -5927,28 +5949,6 @@
{.#None}
(failure ..wrong_syntax)))))

(every .public Target
Text)

(with_template [<name> <value>]
[(the .public <name>
Target
<value>)]

... Available.
[js "JavaScript"]
[jvm "JVM"]
[lua "Lua"]
[python "Python"]
[ruby "Ruby"]
[c++ "C++"]
... Not available yet.
[common_lisp "Common Lisp"]
[php "PHP"]
[r "R"]
[scheme "Scheme"]
)

(the .public using
(let [refer_code (is (-> Text Text (List Referral)
Code)
Expand Down Expand Up @@ -6238,7 +6238,7 @@
[entity
(ability entity)]))

(the .public (able ability entity)
(the .public (can ability entity)
(for_any (_ ability of)
(-> (ability of) of
(Can ability of)))
Expand Down
27 changes: 17 additions & 10 deletions stdlib/source/library/lux/control/io.lux
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
[type
["[0]" nominal]]]]])

(nominal.every .public (IO a)
(-> Any a)
(the Computation
(template.macro (_ of)
[(-> Any
of)]))

(the .public io'
(for_any (_ a) (-> (-> Any a) (IO a)))
(nominal.every .public (IO of)
(Computation of)

(the .public as_io
(for_any (_ of)
(-> (Computation of)
(IO of)))
(|>> nominal.abstraction))

(the !io
Expand All @@ -33,20 +40,20 @@
computation)))]))

(the value'
(template.macro (value' io)
(template.macro (_ io)
... creatio ex nihilo
[((nominal.representation io) [])]))

(the .public io
(syntax.macro (_ [computation <code>.any])
(with_symbols [g!func g!arg]
(in (list (` (..io' (function ((, g!func) (, g!arg))
(, computation)))))))))
(in (list (` (..as_io (function ((, g!func) (, g!arg))
(, computation)))))))))

(the .public value
(for_any (_ a)
(-> (IO a)
a))
(for_any (_ of)
(-> (IO of)
of))
(|>> ..value'))

(the .public functor
Expand Down
95 changes: 55 additions & 40 deletions stdlib/source/library/lux/control/lazy.lux
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,27 @@
["[0]" code
["<[1]>" \\projection]]
[macro (.only with_symbols)
["[0]" syntax]]
["[0]" syntax]
["[0]" template]]
[type (.only sharing)
["[0]" nominal]]]]])

(nominal.every .public (Lazy a)
(-> [] a)
(the Computation
(template.macro (_ of)
[(-> Any
of)]))

(the .public (lazy' generator)
(for_any (_ a) (-> (-> [] a) (Lazy a)))
(let [cache (atom.atom (sharing [a]
(is (-> [] a)
(nominal.every .public (Lazy of)
(Computation of)

(the .public (as_lazy generator)
(for_any (_ of)
(-> (Computation of)
(Lazy of)))
(let [cache (atom.atom (sharing [of]
(is (Computation of)
generator)
(is (Maybe a)
(is (Maybe of)
{.#None})))]
(nominal.abstraction
(function (_ _)
Expand All @@ -44,40 +52,47 @@
(io.value (atom.compare_and_swap! _ {.#Some value} cache))
value)))))))

(the .public (value lazy)
(for_any (_ a) (-> (Lazy a) a))
((nominal.representation lazy) [])))
(the value'
(template.macro (_ ,it)
[((nominal.representation ,it) [])]))

(the .public value
(for_any (_ of)
(-> (Lazy of)
of))
(|>> ..value'))

(the .public lazy
(syntax.macro (_ [expression <code>.any])
(with_symbols [g!_]
(in (list (` (..lazy' (function ((, g!_) (, g!_)) (, expression)))))))))
(the .public lazy
(syntax.macro (_ [expression <code>.any])
(with_symbols [g!_]
(in (list (` (..as_lazy (function ((, g!_) (, g!_)) (, expression)))))))))

(the .public (equivalence (open "_#[0]"))
(for_any (_ a)
(-> (Equivalence a)
(Equivalence (Lazy a))))
(implementation
(the (= left right)
(_#= (..value left)
(..value right)))))
(the .public (equivalence (open "_#[0]"))
(for_any (_ of)
(-> (Equivalence of)
(Equivalence (Lazy of))))
(implementation
(the (= left right)
(_#= (..value' left)
(..value' right)))))

(the .public functor
(Functor Lazy)
(implementation
(the (each f fa)
(lazy (f (value fa))))))
(the .public functor
(Functor Lazy)
(implementation
(the (each f fa)
(lazy (f (..value' fa))))))

(the .public apply
(Apply Lazy)
(implementation
(the functor ..functor)
(the (on fa ff)
(lazy ((value ff) (value fa))))))
(the .public apply
(Apply Lazy)
(implementation
(the functor ..functor)
(the (on fa ff)
(lazy ((..value' ff) (..value' fa))))))

(the .public monad
(Monad Lazy)
(implementation
(the functor ..functor)
(the in (|>> lazy))
(the conjoint ..value)))
(the .public monad
(Monad Lazy)
(implementation
(the functor ..functor)
(the in (|>> lazy))
(the conjoint ..value)))
)
4 changes: 2 additions & 2 deletions stdlib/source/library/lux/math/random.lux
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@
(for_any (_ seed of)
(-> (PRNG seed) seed (Random of seed)
[(Can PRNG seed) of]))
(state.value (able prng seed)
(state.value (can prng seed)
it))

(the .public (prng update return)
(for_any (_ seed)
(-> (-> seed seed) (-> seed I64)
(PRNG seed)))
(function (ability seed)
[(able ability (update seed))
[(can ability (update seed))
(return seed)]))

(every .public PCG_32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
[synthesis.#Reference]
[synthesis.#Extension]))

(synthesis.let @ register input body)
(//when.let! statement expression archive [register input body])

(synthesis.when @ it)
(<| (,, (template.with [,synthesis ,translation]
[(when (,synthesis it)
Expand All @@ -154,9 +157,6 @@
(synthesis.exec @ it)
(//when.exec! statement expression archive it)

(synthesis.let @ let)
(//when.let! statement expression archive let)

(synthesis.scope @ scope)
(//loop.scope! statement expression archive scope)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,6 @@
[1 _])
body

[2 [@ {synthesis.#Control {synthesis.#Branch {synthesis.#Let [2 _] (synthesis.tuple @ (list _ hidden))}}}]]
hidden

[_ [@ {synthesis.#Control {synthesis.#Branch {synthesis.#When _ path}}}]]
(loop (again [path (is Path path)])
(when path
Expand Down Expand Up @@ -931,10 +928,6 @@
{synthesis.#Exec (without_fake_parameter before)
(without_fake_parameter after)}

{synthesis.#Let [register value] body}
{synthesis.#Let [(-- register) (without_fake_parameter value)]
(without_fake_parameter body)}

{synthesis.#Its members record}
{synthesis.#Its members
(without_fake_parameter record)}
Expand Down Expand Up @@ -1072,9 +1065,6 @@
(synthesis.exec @ [this that])
(synthesis.exec @ [(again this) (again that)])

(synthesis.let @ [[register inputS] outputS])
(synthesis.let @ [[register (again inputS)] (again outputS)])

(synthesis.its @ [path recordS])
(synthesis.its @ [path (again recordS)])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
[synthesis.#Reference]
[synthesis.#Extension]))

(synthesis.let @ register input body)
(//when.let! statement expression archive [register input body])

(synthesis.when @ it)
(<| (,, (template.with [,synthesis ,translation]
[(when (,synthesis it)
Expand All @@ -108,9 +111,6 @@
(synthesis.exec @ it)
(//when.exec! statement expression archive it)

(synthesis.let @ let)
(//when.let! statement expression archive let)

(synthesis.scope @ scope)
(do phase.monad
[[inits scope!] (//loop.scope! statement expression archive false scope)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
[synthesis.#Reference]
[synthesis.#Extension]))

(synthesis.let @ register input body)
(//when.let! statement expression archive [register input body])

(synthesis.when @ it)
(<| (,, (template.with [,synthesis ,translation]
[(when (,synthesis it)
Expand All @@ -108,7 +111,6 @@
(<translator> statement expression archive value)]

[synthesis.exec //when.exec!]
[synthesis.let //when.let!]
[synthesis.scope //loop.scope!]
[synthesis.again //loop.again!]))

Expand Down
Loading

0 comments on commit 69a1d02

Please sign in to comment.