Skip to content

Commit

Permalink
1 fix for the tests and 1 fix for the compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Nov 20, 2024
1 parent 02aa5b3 commit 233406b
Show file tree
Hide file tree
Showing 72 changed files with 813 additions and 768 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [Never Buy a Stock Photo Again: How to Create Stunning Images with Midjourney AI](https://blog.temaki.ai/how-to-create-photography-midjourney/)
0. [Solo: Launch your website and business](https://soloist.ai/)
0. [gencraft: The world's most powerful AI photo and art generation engine](https://gencraft.com/)
0. [SalesGPT - Your Context-Aware AI Sales Assistant](https://github.com/filip-michalsky/SalesGPT)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/business/growth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [My 9 Favorite Growth Frameworks](https://www.elenaverna.com/p/my-9-favorite-growth-frameworks)

1 change: 1 addition & 0 deletions documentation/bookmark/compilation/target/rust.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [Java Bindings for Rust: A Comprehensive Guide](https://akilmohideen.github.io/java-rust-bindings-manual/)
0. [Rust compiler-as-a-library](https://xy2.dev/blog/hacking-rustc/)
0. [Actually Portable Executables with Rust and Cosmopolitan Libc](https://ahgamut.github.io/2022/07/27/ape-rust-example/)
0. [Rust's Rules Are Made to Be Broken](https://blog.warp.dev/rules-are-made-to-be-broken/)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reference

0. []()
0. [Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations](https://youtu.be/mr5xkf6zSzk)
0. [How to animate multiplayer cursors](https://liveblocks.io/blog/how-to-animate-multiplayer-cursors)
0. [Lottie](https://lottiefiles.com/what-is-lottie)
0. https://easings.net/
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/design/ux__user_experience.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Laws of UX: a collection of best practices that designers can consider when building user interfaces](https://lawsofux.com/)

4 changes: 4 additions & 0 deletions documentation/bookmark/economics/capitalism.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [The biggest problem with capitalism? Not enough capitalists](https://fortune.com/2020/11/21/capitalism-entrepreneurship-economic-inequality-us-bureaucracy/)

1 change: 1 addition & 0 deletions documentation/bookmark/falsehood.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# List

0. [Falsehoods Programmers believe about DOIs](https://pardalotus.tech/posts/2024-10-02-falsehoods-programmers-believe-about-dois/)
0. [More falsehoods programmers believe about time; “wisdom of the crowd” edition](https://infiniteundo.com/post/25509354022/more-falsehoods-programmers-believe-about-time)
0. [Falsehoods programmers believe about prices](https://gist.github.com/rgs/6509585)

5 changes: 5 additions & 0 deletions documentation/bookmark/food/cooking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reference

0. [Cooklang – Recipe Markup Language](https://cooklang.org/)
0. [Why Recipe Standard is Important](https://cooklang.org/blog/04-why-recipe-standard/)

1 change: 1 addition & 0 deletions documentation/bookmark/law.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [PlainSite: The world's complexity in plain sight](https://www.plainsite.org/)
0. [Even lawyers don’t like legalese](https://news.mit.edu/2023/new-study-lawyers-legalese-0529)
0. [OpenFisca: The most widely adopted free and open-source engine to write rules as code](https://openfisca.org/en/)
0. [Poor writing, not specialized concepts, drives processing difficulty in legal language](https://www.sciencedirect.com/science/article/pii/S0010027722000580)
Expand Down
5 changes: 5 additions & 0 deletions documentation/bookmark/mathematics/number/quaternion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reference

0. [Quaternions to Homogeneous Points, Lines, and Planes](https://youtu.be/dSe7eg8Dj98)
0. [Math in Game Development Summit: A Visual Guide to Quaternions and Dual Quaternions](https://youtu.be/en2QcehKJd8)

1 change: 1 addition & 0 deletions documentation/bookmark/open_source.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [a16z Podcast | An Open Source Business Model That Works](https://youtu.be/y93sPJ0XYKQ)
0. [Collective Code Construction Contract](https://rfc.zeromq.org/spec/42/)
0. [Source Code Is Not Enough: The fine print in FOSS promises](https://fuzzypixelz.com/blog/source-code-is-not-enough/)
0. [StarTrack](https://github.com/seladb/StarTrack-js)
Expand Down
1 change: 1 addition & 0 deletions documentation/bookmark/open_source/funding.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [Drips: a decentralized toolkit for rewarding open source projects within your ecosystem](https://www.drips.network/)
0. [Sustain: Holding a space for conversations about sustaining Open Source](https://sustainoss.org/)
0. [Awesome OSS Monetization v1.1](https://github.com/PayDevs/awesome-oss-monetization)
0. [The Reality of Depending on True Fans](https://kk.org/thetechnium/the-reality-of/)
Expand Down
1 change: 1 addition & 0 deletions documentation/bookmark/physics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Reference

0. [Assumptions of Physics](https://assumptionsofphysics.org/)
0. [Physics heresy: Projectiles don’t actually make parabolas](https://bigthink.com/starts-with-a-bang/projectiles-dont-make-parabolas/)

2 changes: 2 additions & 0 deletions documentation/bookmark/science.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Reference

0. [ResearchHub](https://www.researchhub.com/)
0. [35 - The Network State Conference 2023 - Patrick Joyce - Research Hub](https://youtu.be/5ysl02t6l30)
0. [Invisible College](https://invisible.college/)
0. [Beware the Man of Many Studies: Low-quality literatures mean meta-analyses are frequently worse than single studies](https://cremieux.substack.com/p/beware-the-man-of-many-studies)

1 change: 1 addition & 0 deletions documentation/bookmark/security/privacy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [Privacy4Cars](https://privacy4cars.com/)
0. [Invidious: Invidious is an open source alternative front-end to YouTube](https://invidious.io/)
0. [Freetube is the best way to watch YouTube: Customize YouTube to work exactly the way you want it to](https://www.popsci.com/diy/youtube-alternative-freetube/)
0. [NO2DIGITALID](https://bigbrotherwatch.org.uk/campaigns/no2digitalid/)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/society/dating.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [The Lean Dating Manifesto](https://pixelmetry.com/2019/11/29/lean-dating-manifesto/)

4 changes: 4 additions & 0 deletions documentation/bookmark/type_theory/blindness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Algebraic blindness](https://github.com/quchen/articles/blob/master/algebraic-blindness.md)

1 change: 1 addition & 0 deletions documentation/bookmark/writing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Reference

0. [Chiastic structure](https://en.wikipedia.org/wiki/Chiastic_structure)
0. [The Punctuation Guide](https://www.thepunctuationguide.com/)

5 changes: 3 additions & 2 deletions stdlib/source/library/lux.lux
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@

(.def# general
(.is# Quality
0b)
..universal)
..public)

(.def# special
(.is# Quality
(..not ..abstraction))
..existential)
..public)

(.def# Natural
Expand Down Expand Up @@ -5887,6 +5887,7 @@
{#Left ..wrong_syntax})))

(the Eval
... TODO: Use the currently-commented definition.
... (.type# "eval")
(type (-> ..Type ..Code
(Meta Any))))
Expand Down
54 changes: 24 additions & 30 deletions stdlib/source/library/lux/compiler/language/lux/analysis.lux
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,17 @@
..equivalence)

(template.with [<name> <tag>]
[(the .public <name>
(template.macro (<name> provenance content)
[{<tag> provenance content}]))]
[(template.the .public (<name> provenance content)
[{<tag> provenance content}])]

[[when ..#When]])
[[when @type.#When]])

(the .public unit
(template.macro (unit provenance)
[{@type.#Simple provenance {@type.#Simple_Unit}}]))
(template.the .public (unit provenance)
[{@type.#Simple provenance {@type.#Simple_Unit}}])

(template.with [<name> <tag>]
[(the .public <name>
(template.macro (<name> provenance value)
[{@type.#Simple provenance {<tag> value}}]))]
[(template.the .public (<name> provenance value)
[{@type.#Simple provenance {<tag> value}}])]

[[bit @type.#Simple_Bit]
[natural @type.#Simple_Natural]
Expand All @@ -146,14 +143,13 @@
(every .public (Reification c)
[c (List c)])

(the .public coercion
(template.macro (_ @ value)
[(|> 1
{@type.#Local}
{@type.#Variable_Reference}
{@type.#Reference @}
{@type.#Abstraction @ (list)}
{@type.#Application @ value})]))
(template.the .public (coercion @ value)
[(|> 1
{@type.#Local}
{@type.#Variable_Reference}
{@type.#Reference @}
{@type.#Abstraction @ (list)}
{@type.#Application @ value})])

(the .public (reified [abstraction inputs])
(-> (Reification Term)
Expand All @@ -177,12 +173,10 @@
[abstraction inputs])))

(template.with [<name> <tag>]
[(the .public <name>
(syntax.macro (_ [provenance ?list.any
content ?list.any])
(pure (list (` (.<| {@type.#Reference (, provenance)}
<tag>
(, content)))))))]
[(template.the .public (<name> ,provenance ,content)
[(.<| {@type.#Reference ,provenance}
<tag>
,content)])]

[[variable {@type.#Variable_Reference}]
[constant {@type.#Constant_Reference}]
Expand All @@ -191,11 +185,10 @@
[foreign reference.foreign]])

(template.with [<name> <tag>]
[(the .public <name>
(template.macro (<name> provenance content)
[(.<| {@type.#Complex provenance}
{<tag>}
content)]))]
[(template.the .public (<name> provenance content)
[(.<| {@type.#Complex provenance}
{<tag>}
content)])]

[[variant @type.#Complex_Variant]
[tuple @type.#Complex_Tuple]])
Expand Down Expand Up @@ -327,7 +320,8 @@
(the .public seed
(Operation Natural)
(function (_ lux)
{try.#Success [lux (its @type.#seed lux)]}))
{try.#Success [(revised @type.#seed ++ lux)
(its @type.#seed lux)]}))

(the (located provenance)
(-> Provenance
Expand Down
12 changes: 5 additions & 7 deletions stdlib/source/library/lux/compiler/language/lux/phase.lux
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,15 @@

(the .public (update transform)
(for_any (_ state)
(-> (-> state state)
(-> (Change state)
(Operation state Any)))
(function (_ state)
{try.#Success [(transform state) []]}))

(the .public (localized get set transform)
(for_any (_ state state' it)
(-> (-> state state') (-> state' state state) (-> state' state')
(-> (Operation state it)
(Operation state it))))
(-> (-> state state') (-> state' (Change state)) (Change state')
(Change (Operation state it))))
(function (_ operation)
(function (_ state)
(let [old (get state)]
Expand All @@ -200,9 +199,8 @@

(the .public (temporary transform)
(for_any (_ state it)
(-> (-> state state)
(-> (Operation state it)
(Operation state it))))
(-> (Change state)
(Change (Operation state it))))
(function (_ operation)
(function (_ state)
(when (operation (transform state))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
(monad.let phase.monad
[_ (typeA.inference @type.Natural)
@ analysis.provenance]
(pure (analysis.natural @ (++ (.universe#))))))]))
(pure (analysis.natural @ (n.% 10 (++ (.universe#)))))))]))

(the when
Handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@
["[0]" translation (.only)
["[0]" script]]
[///
[reference
[register (.only Register)]]
[meta
[archive (.only Output Archive)
["[0]" registry (.only Registry)]
["[0]" unit]]]]]])
["[0]" unit]]]
["@[0]" type (.only Register)]]]])

(every .public Anchor
[Register Text])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
["[0]" translation (.only)
["[0]" script]]
["//[1]" /// (.only)
[reference
[register (.only Register)]]
[meta
[archive (.only Output Archive)
["[0]" registry (.only Registry)]
["[0]" unit]]]]]])
["[0]" unit]]]
["@[0]" type (.only Register)]]]])

(every .public Anchor
[Register Label])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
["[0]" synthesis]
["[1][0]" translation]
[///
[reference
[register (.only Register)]]
[meta
[archive (.only Output Archive)
["[0]" registry (.only Registry)]
["[0]" unit]]]]]])
["[0]" unit]]]
["@[0]" type (.only Register)]]]])

(every .public Anchor
Register)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
["[0]" phase (.use "[1]#[0]" monad)]
["[0]" translation]
[///
["[0]" reference (.only Reference)
[register (.only Register)]
["[0]" variable (.only Variable)]]
[meta
[archive (.only Archive)
["[0]" unit]]]]])
["[0]" unit]]]
["@[0]" type (.only Register Variable Reference)]]])

(the .public (artifact [module artifact])
(-> unit.ID Text)
Expand Down Expand Up @@ -59,19 +57,19 @@
(-> (System expression)
Variable expression))
(when variable
{variable.#Local register}
{@type.#Local register}
(..local system register)

{variable.#Foreign register}
{@type.#Foreign register}
(..foreign system register)))

(the .public (reference system archive reference)
(for_any (_ anchor expression declaration)
(-> (System expression) Archive Reference
(translation.Operation anchor expression declaration expression)))
(when reference
{reference.#Constant value}
{@type.#Constant_Reference value}
(..constant system archive value)

{reference.#Variable value}
{@type.#Variable_Reference value}
(phase#pure (..variable system value))))
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
["[0]" translation (.only)
["[0]" script]]
[///
[reference
[register (.only Register)]]
[meta
[archive (.only Output Archive)
["[0]" unit]
["[0]" registry (.only Registry)]]]]]])
["[0]" registry (.only Registry)]]]
["@[0]" type (.only Register)]]]])

(every .public Anchor
Register)
Expand Down
17 changes: 8 additions & 9 deletions stdlib/source/library/lux/data/format/json.lux
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@
[Number Decimal]
[String Text]])

(every .public JSON
(Rec JSON
(Variant
{#Null Null}
{#Boolean Boolean}
{#Number Number}
{#String String}
{#Array (List JSON)}
{#Object (Dictionary String JSON)})))
(every .public (JSON _)
(Variant
{#Null Null}
{#Boolean Boolean}
{#Number Number}
{#String String}
{#Array (List (JSON _))}
{#Object (Dictionary String (JSON _))}))

(template.with [<name> <type>]
[(every .public <name>
Expand Down
Loading

0 comments on commit 233406b

Please sign in to comment.