Skip to content

Commit

Permalink
Added shape & source HTML attribute values.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Jul 10, 2023
1 parent 84fce4d commit babdc2d
Show file tree
Hide file tree
Showing 39 changed files with 335 additions and 20 deletions.
4 changes: 4 additions & 0 deletions documentation/bookmark/3d_reconstruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Direct Voxel Grid Optimization: Super-fast Convergence for Radiance Fields Reconstruction](https://sunset1995.github.io/dvgo/)

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

0. [Code property graph](https://en.wikipedia.org/wiki/Code_property_graph)
0. [AnalysisTools](https://analysis-tools.dev/)
0. [](https://github.com/analysis-tools-dev/static-analysis)
0. [SARIF: The Static Analysis Results Interchange Format](https://sarifweb.azurewebsites.net/)
0. [Souffle: Logic Defined Static Analysis.](https://souffle-lang.github.io/index.html)
0. [Fusing Industry and Academia at GitHub (Experience Report)](https://arxiv.org/abs/2206.09206)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/business/brand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Building personal and organizational prestige](https://lethain.com/building-prestige/)

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

0. [MicroFounder: We're building startups as solo developers](https://microfounder.com/)

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

0. [Business Model Canvas](https://en.wikipedia.org/wiki/Business_Model_Canvas)
0. [Hardware/Software Business Models](https://www.atomsandbits.io/p/hardware-software-business-models?s=r)
0. [Reciprocity as a Business Model: What motivates people to pay for services they receive?](https://briefthoughts.substack.com/p/reciprocity-as-a-business-model?s=r)

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

0. [Process mining](https://en.wikipedia.org/wiki/Process_mining)

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

1. [Ring - Cache interface as a programming language integration](https://ring-cache.readthedocs.io/en/stable/)
1. https://github.com/eko/gocache
0. [Cache me if you can: A Look at Common Caching Strategies, and how CQRS can Replace the Need in the First Place](https://medium.com/ssense-tech/cache-me-if-you-can-a-look-at-common-caching-strategies-and-how-cqrs-can-replace-the-need-in-the-65ec2b76e9e)
0. [Ring - Cache interface as a programming language integration](https://ring-cache.readthedocs.io/en/stable/)
0. https://github.com/eko/gocache

4 changes: 0 additions & 4 deletions documentation/bookmark/category_theory.md

This file was deleted.

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

1. [HaikuVM](http://haiku-vm.sourceforge.net/)
0. [The Blech language](https://www.blech-lang.org/)
0. [Toit is a modern high-level language designed specifically for microcontrollers](https://toitlang.org/)
0. [HaikuVM](http://haiku-vm.sourceforge.net/)

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

0. [Zero Allocation JSON Logger](https://github.com/rs/zerolog)

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

0. [Structurae: Data structures for high-performance JavaScript applications.](https://github.com/zandaqo/structurae)
0. [Just in Time Datastructures](https://github.com/UBOdin/jitd)
0. [6.851: Advanced Data Structures (Spring'21)](https://courses.csail.mit.edu/6.851/spring21/)
0. [An Efficient Representation for Sparse Sets](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.30.7319&rep=rep1&type=pdf)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/database/finance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [TigerBeetle: The world’s fastest financial accounting database](https://tigerbeetle.com/)

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

0. [Pixels, Process & Prototypes: UI Design for Engineers](https://www.uidesignforengineers.com/)
0. [Design Graveyard](https://gwern.net/design-graveyard)
0. https://modalzmodalzmodalz.com/
0. [The Power of Defaults](https://www.nngroup.com/articles/the-power-of-defaults/)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/design/ui__user_interface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [eight golden rules of user interface design](https://mail.gnome.org/archives/gnome-gui-list/1998-November/msg00074.html)

2 changes: 1 addition & 1 deletion documentation/bookmark/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

# Reference

0. []()
0. [Towards a theory of quality in documentation](https://diataxis.fr/quality/)
0. [The Ultimate Guide to Writing Online](https://perell.com/essay/the-ultimate-guide-to-writing-online/)
0. [Typst: Compose papers faster](https://typst.app/)
0. [Mintlify Writer](https://www.mintlify.com/writer)
Expand Down
2 changes: 1 addition & 1 deletion documentation/bookmark/email.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reference

0. []()
0. [Email vs Capitalism, or, Why We Can't Have Nice Things - Dylan Beattie - NDC Oslo 2023](https://www.youtube.com/watch?v=mrGfahzt-4Q)
0. [Falsehoods programmers believe about email](https://beesbuzz.biz/code/439-Falsehoods-programmers-believe-about-email)
0. [email is bad](https://emailisbad.com/)

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

0. [Tutorial on Category Theory: Part 1 – Pure and Classical](https://www.youtube.com/watch?v=6eWn9nG5d7o)
0. [Tutorial on Category Theory: Part 2 – Applied](https://www.youtube.com/watch?v=eIjPxaFbEeg)
0. [Seven Sketches in Compositionality: An Invitation to Applied Category Theory](https://arxiv.org/abs/1803.05316)
0. [Compiling to Categories](http://conal.net/papers/compiling-to-categories/compiling-to-categories.pdf)

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

0. [Bezier Triangles](https://blog.demofox.org/2019/12/07/bezier-triangles/)
0. [Simplifying Bézier paths](https://raphlinus.github.io/curves/2023/04/18/bezpath-simplify.html)
0. [Analytic flattening of quadratic Bézier offsets.](https://dragostis.github.io/posts/analytic-quad-offset/)
0. [The Continuity of Splines](https://www.youtube.com/watch?v=jvPPXbo87ds)
Expand Down
4 changes: 4 additions & 0 deletions documentation/bookmark/memory_management/view_propagation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference

0. [Scopes: a retargetable programming language & infrastructure](https://sr.ht/~duangle/scopes/)

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

0. [From Macros to Reusable Generative Programming](https://cs.brown.edu/~sk/Publications/Papers/Published/kfd-macro-to-gen-prog/)
0. [Composable and Compilable Macros: You Want it When?](https://www-old.cs.utah.edu/plt/publications/macromod.pdf)
0. [Notes on Refactoring Exponential Macros in Common Lisp](https://arxiv.org/abs/2305.02991)
0. [Fortifying Macros](https://www2.ccs.neu.edu/racket/pubs/icfp10-cf.pdf)

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

0. [Composing for Chinese Instruments](https://www.youtube.com/watch?v=2xPQNF5NMH4)

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

0. [ægraphs: Acyclic E-graphs for Efficient Optimization in a Production Compiler](https://vimeo.com/843540328)
0. [Rewrite rules](https://downloads.haskell.org/~ghc/7.0.3/docs/html/users_guide/rewrite-rules.html)
0. https://twitter.com/ChrisRackauckas/status/1477274812460449793
0. [Automated Code Optimization with E-Graphs](https://arxiv.org/abs/2112.14714)
Expand Down
5 changes: 5 additions & 0 deletions documentation/bookmark/programming/extensibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reference

0. [Monoids, scope, and extensibility](http://www.rntz.net/post/2014-06-27-monoids-scope-extensibility.html)
0. [moxy: Language with monoidally extensible syntax](https://github.com/rntz/moxy)

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

0. [From Macros to Reusable Generative Programming](https://cs.brown.edu/~sk/Publications/Papers/Published/kfd-macro-to-gen-prog/)

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

0. [Spiral: Functional language with intensional polymorphism and first-class staging](https://github.com/mrakgr/The-Spiral-Language)

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

0. [Repetition compulsion](https://en.wikipedia.org/wiki/Repetition_compulsion)

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

0. [Politeness theory](https://en.wikipedia.org/wiki/Politeness_theory)

1 change: 1 addition & 0 deletions documentation/bookmark/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@

# Reference

0. [Living Off Trusted Sites (LOTS) Project](https://lots-project.com/)
0. [The immutable laws of security](https://learn.microsoft.com/en-us/security/compass/ten-laws-of-security)
0. [Suricata: the leading independent open source threat detection engine](https://suricata.io/)
0. [CS 253 Web Security](https://web.stanford.edu/class/cs253/)
Expand Down
12 changes: 12 additions & 0 deletions documentation/bookmark/state_machine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Reference

0. [Automata via Macros](https://cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macros/)
0. [Robust React User Interfaces with Finite State Machines](https://css-tricks.com/robust-react-user-interfaces-with-finite-state-machines/)
0. [Robust Engineering: User Interfaces You Can Trust with State Machines](https://www.infoq.com/articles/robust-user-interfaces-with-state-machines/)
0. [Restate Your UI: Using State Machines to Simplify User Interface Development](https://www.cognitect.com/blog/2017/5/22/restate-your-ui-using-state-machines-to-simplify-user-interface-development)
0. [Composing UIs with Finite State Machines](https://carloscuesta.me/blog/composing-uis-with-finite-state-machines)
0. [Tackling UI complexity with State Machines](https://medium.com/@carloslfu/tackling-ui-complexity-with-state-machines-b3f1eb6d1a97)
0. [Modeling UI State Using A Finite State Machine](https://xiaoyunyang.github.io/post/modeling-ui-state-using-a-finite-state-machine/)
0. [SMACC vs Behavior Trees](https://smacc.dev/smacc-vs-behavior-trees/)
0. [Analysis of Recursive State Machines](https://patricegodefroid.github.io/public_psfiles/toplas2005.pdf)

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

0. [Introduction to Behavior Trees](https://www.youtube.com/playlist?list=PLFQdM4LOGDr_vYJuo8YTRcmv3FrwczdKg)
0. [Behavior Trees or Finite State Machines](https://opsive.com/support/documentation/behavior-designer/behavior-trees-or-finite-state-machines/)
0. [BehaviorTree.CPP](https://www.behaviortree.dev/)

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

0. [Statecharts in User Interfaces](https://statecharts.dev/use-case-statecharts-in-user-interfaces.html)
0. [State Chart XML (SCXML): State Machine Notation for Control Abstraction](https://www.w3.org/TR/scxml/)
0. [STATECHARTS: A VISUAL FORMALISM FOR COMPLEX SYSTEMS](https://dubroy.com/refs/Statecharts_a_visual_formalism_for_complex_systems.pdf)
0. [Welcome to the world of Statecharts](https://statecharts.dev/)
0. [Zag: UI components powered by Finite State Machines](https://zagjs.com/)
0. [f-of-xstate: Tools for operating on xstate state machines as data](https://github.com/simplystated/f-of-xstate)
0. [Simply Stated](https://www.simplystated.dev/)
0. [XState: State machines and statecharts for the modern web](https://github.com/statelyai/xstate)
Expand Down
1 change: 1 addition & 0 deletions documentation/bookmark/tool/text_editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@

## General

0. [Rich Text Editing is a Layouting Problem: Why powerful rich-text editors implement a layout engine](https://docs.google.com/document/d/e/2PACX-1vSJg7ZunK4wgLM3Sgee2Rjn6xd4shpQKer5zaSFK8RWtYjopzgAeQT7H_gbnZ9m9j2nLleY3pyOw_N3/pub)
0. [Stack graphs: Name resolution at scale](https://dcreager.net/publications/016-stack-graphs/stack-graphs.pdf)
0. [Combobulate: Structured Movement and Editing with Tree-Sitter](https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter)
0. [Bridging the Gap between Textual and Projectional Editors](https://tomassetti.me/textual-and-projectional-editors-a-gap/)
Expand Down
3 changes: 2 additions & 1 deletion documentation/bookmark/type_theory/refinement.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Reference

1. [Refinement Kinds: Type-safe Programming with Practical Type-level Computation (Extended Version)](https://arxiv.org/abs/1908.00441)
0. [Ante: A low-level functional language](https://antelang.org/)
0. [Refinement Kinds: Type-safe Programming with Practical Type-level Computation (Extended Version)](https://arxiv.org/abs/1908.00441)

81 changes: 75 additions & 6 deletions stdlib/source/library/lux/math/number/frac.lux
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@
(the smallest_exponent
(..log/2 ..smallest))

(the reciprocal
(template (_ <it>)
[(../ <it>
+1.0)]))

(the .public (bits it)
(-> Frac
I64)
Expand All @@ -731,12 +736,11 @@
..negative_infinity_bits

(..= +0.0 it)
(let [reciprocal (../ it +1.0)]
(if (..= positive_infinity reciprocal)
... Positive zero
..positive_zero_bits
... Negative zero
..negative_zero_bits))
(if (..= positive_infinity (reciprocal it))
... Positive zero
..positive_zero_bits
... Negative zero
..negative_zero_bits)

... else
(let [sign_bit (if (..< +0.0 it)
Expand Down Expand Up @@ -970,3 +974,68 @@
(alias [base_08] ..octal)
(alias [base_10] ..decimal)
(alias [base_16] ..hex)

... https://en.wikipedia.org/wiki/Trigonometric_functions
(alias [sine]
..sin)

(alias [co_sine]
..cos)

(alias [tangent]
..tan)

(every .public Angle
Frac)

(with_template [<name> <reciprocal>]
[(the .public <name>
(-> Angle
Frac)
(|>> <reciprocal>
..reciprocal))]

[secant co_sine]
[co_secant sine]
[co_tangent tangent]
)

(with_template [<name> <reciprocal>]
[(the .public <name>
(-> Angle
Frac)
(|>> ..reciprocal
<reciprocal>))]

[arc_secant ..acos]
[arc_co_secant ..asin]
[arc_co_tangent ..atan]
)

(alias [sec]
..secant)

(alias [csc]
..co_secant)

(alias [cot]
..co_tangent)

(alias [asec]
..arc_secant)

(alias [acsc]
..arc_co_secant)

(alias [acot]
..arc_co_tangent)

... https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
(alias [arc_sine]
..asin)

(alias [arc_co_sine]
..acos)

(alias [arc_tangent]
..atan)
10 changes: 6 additions & 4 deletions stdlib/source/library/lux/web/html.lux
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
[world
[net (.only URL)]]]]
[/
["[0]" tag]]
["[0]" tag]
[attribute
["[0]" shape]]]
[//
["[0]" css
["[0]" selector]
Expand Down Expand Up @@ -327,9 +329,9 @@
["coords" (<format> shape)]
attributes)))]

[rectangle "rect" Rectangle ..%rectangle]
[circle "circle" Circle ..%circle]
[polygon "poly" Polygon ..%polygon]
[rectangle shape.rectangle Rectangle ..%rectangle]
[circle shape.circle Circle ..%circle]
[polygon shape.polygon Polygon ..%polygon]
)

(the (area attributes shape)
Expand Down
28 changes: 28 additions & 0 deletions stdlib/source/library/lux/web/html/attribute/shape.lux
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
... 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/.

(.require
[library
[lux (.except)
[data
["[0]" text]]
[meta
[macro
["[0]" template]]]]])

... https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area#attributes
(every .public Shape
Text)

(with_template [<name>]
[(the .public <name>
Shape
(|> (template.text [<name>])
(text.replaced "rectangle" "rect")
(text.replaced "polygon" "poly")))]

[rectangle]
[circle]
[polygon]
[default]
)
Loading

0 comments on commit babdc2d

Please sign in to comment.