Skip to content

Commit

Permalink
Got rid of lifted and coverage'.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Dec 25, 2023
1 parent 4a55157 commit e1f2abb
Show file tree
Hide file tree
Showing 19 changed files with 472 additions and 361 deletions.
1 change: 1 addition & 0 deletions documentation/bookmark/business/advice.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [What I Wish Someone Had Told Me](https://blog.samaltman.com/what-i-wish-someone-had-told-me)
0. [Build a business, not an audience](https://jakobgreenfeld.com/build_an_audience)
0. [Paul Graham 101](https://www.jaakkoj.com/blog/graham)

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [CRDTs Turned Inside Out](https://interjectedfuture.com/crdts-turned-inside-out/)
0. [Trade-offs between Different CRDTs](https://interjectedfuture.com/trade-offs-between-different-crdts/)
0. [A Framework for Convergence](https://vlcn.io/articles/crdt-substrate)
0. [You might not need a CRDT](https://driftingin.space/posts/you-might-not-need-a-crdt)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/hardware/display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Flicker - a spherical display](https://www.youtube.com/watch?v=DpEewUsl8mg)

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Reference

0. [Puppy: A Publicly Verifiable Watermarking Protocol](https://arxiv.org/abs/2312.09125)
0. [How to Write Recipes That Are Harder to Steal](https://diannej.com/2014/how-to-write-recipes-that-are-harder-to-steal/)
0. [Exactly the Wrong AI Copyrightability Case: Creativity Machine guy assumed away the debate and lost](https://writing.kemitchell.com/2023/08/19/Exactly-Wrong-AI-Copyright)
0. [The Grotesque Legacy of Music as Property](https://www.youtube.com/watch?v=MAFUdIZnI5o)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/load_balancing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Load is not what you should balance: Introducing Prequal](https://arxiv.org/abs/2312.10172)

Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
["[2][0]" signature (.only Signature)]]
[encoding
["[1][0]" unsigned (.only U2 U4)]]
["[1][0]" constant (.only Class Value)
["[1][0]" constant (.only Value)
[utf8 (.only UTF8)]
[class (.only Class)]
["[2][0]" pool (.only Pool Resource) (.use "[1]#[0]" monad)]]]
["[0]" /
["[1][0]" constant (.only Constant)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
["n" natural]]]]]
["[0]" //
["//[1]" ///
[constant (.only Class)]
["[1][0]" index (.only Index)]
[constant
[class (.only Class)]]
[bytecode
["[1][0]" address (.only Address)]]
[encoding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
[registry (.only Register)]]]
["/[1]" //
["[1][0]" index (.only Index)]
["[1][0]" constant (.only Class Reference)]
["[1][0]" constant (.only Reference)
[class (.only Class)]]
[encoding
["[1][0]" unsigned (.only U1 U2 U4)]
["[1][0]" signed (.only S1 S2 S4)]]
Expand Down
11 changes: 6 additions & 5 deletions stdlib/source/library/lux/meta/compiler/target/jvm/class.lux
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
[category (.only Inheritance)]
["[2][0]" signature (.only Signature)]]
["[1][0]" constant (.only Constant)
["[0]" class]
["[2][0]" pool (.only Pool Resource)]]])

(every .public Class
Expand All @@ -45,9 +46,9 @@
#major_version Major
#constant_pool Pool
#modifier (Modifier Class)
#this (Index //constant.Class)
#super (Index //constant.Class)
#interfaces (Sequence (Index //constant.Class))
#this (Index class.Class)
#super (Index class.Class)
#interfaces (Sequence (Index class.Class))
#fields (Sequence Field)
#methods (Sequence Method)
#attributes (Sequence Attribute)])))
Expand Down Expand Up @@ -84,11 +85,11 @@

(the (install_classes this super interfaces)
(-> Internal Internal (List Internal)
(Resource [(Index //constant.Class) (Index //constant.Class) (Sequence (Index //constant.Class))]))
(Resource [(Index class.Class) (Index class.Class) (Sequence (Index class.Class))]))
(do [! //pool.monad]
[@this (//pool.class this)
@super (//pool.class super)
@interfaces (is (Resource (Sequence (Index //constant.Class)))
@interfaces (is (Resource (Sequence (Index class.Class)))
(monad.mix ! (function (_ interface @interfaces)
(do !
[@interface (//pool.class interface)]
Expand Down
30 changes: 4 additions & 26 deletions stdlib/source/library/lux/meta/compiler/target/jvm/constant.lux
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
["[0]" /
["[1][0]" tag]
["[1][0]" utf8 (.only UTF8)]
["[0]" class (.only Class)]
["/[1]" //
["[1][0]" index (.only Index)]
[type
Expand All @@ -40,29 +41,6 @@
[encoding
["[1][0]" unsigned]]]])

(nominal.every .public Class
(Index UTF8)

(the .public index
(-> Class (Index UTF8))
(|>> nominal.representation))

(the .public class
(-> (Index UTF8) Class)
(|>> nominal.abstraction))

(the .public class_equivalence
(Equivalence Class)
(of equivalence.functor each
..index
//index.equivalence))

(the class_injection
(Injection Class)
(|>> nominal.representation
//index.injection))
)

(import java/lang/Float
"[1]::[0]"
("static" floatToRawIntBits "manual" [float] int))
Expand Down Expand Up @@ -192,7 +170,7 @@
[#Long (..value_equivalence integer.equivalence)]
[#Float (..value_equivalence float_equivalence)]
[#Double (..value_equivalence decimal.equivalence)]
[#Class ..class_equivalence]
[#Class class.equivalence]
[#String (..value_equivalence //index.equivalence)]
[#Field ..reference_equivalence]
[#Method ..reference_equivalence]
Expand All @@ -209,7 +187,7 @@
... ... #Double
... (..value_equivalence decimal.equivalence)
... ... #Class
... ..class_equivalence
... class.equivalence
... ... #String
... (..value_equivalence //index.equivalence)
... ... #Field
Expand All @@ -233,7 +211,7 @@
[#Float /tag.float ..float_injection]
[#Long /tag.long ..long_injection]
[#Double /tag.double ..double_injection]
[#Class /tag.class ..class_injection]
[#Class /tag.class class.as_binary]
[#String /tag.string ..string_injection]
[#Field /tag.field ..reference_injection]
[#Method /tag.method ..reference_injection]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.using
[library
[lux (.except)
[abstract
["[0]" equivalence (.only Equivalence)]]
[data
[binary
[\\injection (.only Injection)]]]
[meta
[type
["[0]" nominal]]]]]
[//
[utf8 (.only UTF8)]
[//
["[0]" index (.only Index)]]])

(nominal.every .public Class
(Index UTF8)

(the .public index
(-> Class
(Index UTF8))
(|>> nominal.representation))

(the .public class
(-> (Index UTF8)
Class)
(|>> nominal.abstraction))

(the .public equivalence
(Equivalence Class)
(of equivalence.functor each
..index
index.equivalence))

(alias [=]
..equivalence)

(the .public as_binary
(Injection Class)
(|>> nominal.representation
index.injection))
)
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
[macro
["[0]" expansion]
["[0]" template]]]]]
["[0]" // (.only String Class Integer Float Long Double Constant Name_And_Type Reference)
["[0]" // (.only String Integer Float Long Double Constant Name_And_Type Reference)
[utf8 (.only UTF8)]
["[0]" class (.only Class)]
[//
["[1][0]" index (.only Index)]
[encoding
Expand Down Expand Up @@ -174,8 +175,8 @@
(-> Internal (Resource (Index Class)))
(<| (/|do %)
(/|each % @name (utf8 (//name.read name)))
(let [value (//.class @name)])
(!add % //.#Class //.class_equivalence value)))
(let [value (class.class @name)])
(!add % //.#Class class.equivalence value)))

(the .public (descriptor value)
(for_any (_ kind)
Expand Down
16 changes: 0 additions & 16 deletions stdlib/source/library/lux/test/property.lux
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@
Test)
(random#in (//.test message condition)))

(the .public (lifted message random)
(-> Text (Random Bit)
Test)
(do random.monad
[it random]
(test message it)))

(the pcg_32_magic_inc
(hex "FEDCBA9876543210"))

Expand Down Expand Up @@ -251,15 +244,6 @@
condition <code>.any])
(in (list (` (of random.monad (,' in) (//.coverage (, coverage) (, condition))))))))

(the .public coverage'
(syntax.macro (_ [coverage <code>.any
condition <code>.any])
(macro.with_symbols ['verdict]
(in (list (` (do random.monad
[(, 'verdict) (, condition)]
((,' in) (//.coverage (, coverage)
(, 'verdict))))))))))

(the .public for
(syntax.macro (_ [coverage <code>.any
test <code>.any])
Expand Down
Loading

0 comments on commit e1f2abb

Please sign in to comment.