diff options
author | Eduardo Julian | 2019-06-18 23:19:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-06-18 23:19:23 -0400 |
commit | 75e6f7ad181d398b818367fdc5e86b1542d1bc0a (patch) | |
tree | d0ea084f2d9f35876d4ab383d3830445588ee323 | |
parent | 4bf2dce01f51a5b0be76a587f877d1227c3982ae (diff) |
Implemented "hole" typing.
-rw-r--r-- | commands | 4 | ||||
-rw-r--r-- | documentation/research/database.md | 5 | ||||
-rw-r--r-- | documentation/research/game_programming.md | 1 | ||||
-rw-r--r-- | documentation/research/math.md | 1 | ||||
-rw-r--r-- | documentation/research/operating_system.md | 1 | ||||
-rw-r--r-- | documentation/research/paradigm/probabilistic_programming.md | 6 | ||||
-rw-r--r-- | documentation/research/text_editor & ide.md | 1 | ||||
-rw-r--r-- | documentation/research/web_framework.md | 1 | ||||
-rw-r--r-- | lux-mode/lux-mode.el | 2 | ||||
-rw-r--r-- | stdlib/source/lux/type.lux | 21 |
10 files changed, 36 insertions, 7 deletions
@@ -48,7 +48,7 @@ cd ~/lux/lux-scheme/ && lein clean cd ~/lux/lux-js/ && lein_2_7_1 lux auto build cd ~/lux/lux-js/ && lein clean && lein_2_7_1 lux auto build # Try - cd ~/lux/lux-js/ && java -jar target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux + cd ~/lux/lux-js/ && time java -jar target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux # Python compiler # Test @@ -120,5 +120,5 @@ cd ~/lux/new-luxc/ && lein clean && lein_2_7_1 lux auto build cd ~/lux/new-luxc/ && java -jar target/program.jar repl --source ~/lux/stdlib/source --target ~/lux/stdlib/target # Build -cd ~/lux/new-luxc/ && java -jar target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux +cd ~/lux/new-luxc/ && time java -jar target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux diff --git a/documentation/research/database.md b/documentation/research/database.md index 9d3210e71..21a7d54c0 100644 --- a/documentation/research/database.md +++ b/documentation/research/database.md @@ -252,6 +252,11 @@ 1. https://www.tadviewer.com/ +# Privacy + +1. https://blog.acolyer.org/2019/06/17/towards-multiverse-databases/ +1. [Towards Multiverse Databases](https://people.csail.mit.edu/malte/pub/papers/2019-hotos-multiversedb.pdf) + # Security 1. [The ZombieLoad Pragmatist: Tips for Surviving in a Post-Meltdown World](https://www.scylladb.com/2019/05/17/the-zombieload-pragmatist/) diff --git a/documentation/research/game_programming.md b/documentation/research/game_programming.md index 5a3f00682..de74e10f2 100644 --- a/documentation/research/game_programming.md +++ b/documentation/research/game_programming.md @@ -96,6 +96,7 @@ 1. https://www.babylonjs.com/ 1. https://github.com/lettier/3d-game-shaders-for-beginners 1. [What good are hundreds of lights without hundreds of shadows?](https://worldoffries.wordpress.com/2019/03/26/what-good-is-hundreds-of-lights-with-out-hundreds-of-shadows/) +1. [Ray Tracing with Metal](https://developer.apple.com/videos/play/wwdc2019/613/) # Idea diff --git a/documentation/research/math.md b/documentation/research/math.md index 458d4d1f1..2db883058 100644 --- a/documentation/research/math.md +++ b/documentation/research/math.md @@ -21,6 +21,7 @@ # Polynomials +1. https://brainbomb.org/0-1-efficient-metholds-for-evaluting-polynomials/ 1. https://en.wikipedia.org/wiki/Horner%27s_method # Chaos Theory diff --git a/documentation/research/operating_system.md b/documentation/research/operating_system.md index b9e457951..2ae4828bf 100644 --- a/documentation/research/operating_system.md +++ b/documentation/research/operating_system.md @@ -169,6 +169,7 @@ # Shared libraries | Dynamic Loading +1. https://amir.rachum.com/blog/2016/09/17/shared-libraries/ 1. https://www.kix.in/2008/06/19/an-alternative-to-shared-libraries/ 1. https://www.akkadia.org/drepper/no_static_linking.html 1. https://amir.rachum.com/blog/2016/09/17/shared-libraries/ diff --git a/documentation/research/paradigm/probabilistic_programming.md b/documentation/research/paradigm/probabilistic_programming.md index 46302cf93..4a6fd830a 100644 --- a/documentation/research/paradigm/probabilistic_programming.md +++ b/documentation/research/paradigm/probabilistic_programming.md @@ -1,3 +1,8 @@ +# Ranked Programming + +1. [Ranked Programming](https://github.com/tjitze/ranked-programming/blob/master/documentation/ranked_programming.pdf) +1. https://github.com/tjitze/ranked-programming + # Inference 1. [Probabilistic Programming with Programmable Inference](https://people.csail.mit.edu/rinard/paper/pldi18.pdf) @@ -5,6 +10,7 @@ # Reference +1. [End-User Probabilistic Programming (DRAFT)](https://www.cs.uoregon.edu/research/summerschool/summer19/lecture_notes/DRAFT___Probabilistic_Programming_for_End_Users.pdf) 1. http://willcrichton.net/notes/probabilistic-programming-under-the-hood/ 1. [Ask HN: What companies are using probabilistic programming?](https://news.ycombinator.com/item?id=17220861) 1. https://www-forbes-com.cdn.ampproject.org/v/s/www.forbes.com/sites/quora/2018/05/18/even-the-most-advanced-computer-programmers-have-probably-never-heard-of-this-concept/amp/?amp_js_v=a1&_gsa=1#amp_tf=From%20%251%24s&share=https%3A%2F%2Fwww.forbes.com%2Fsites%2Fquora%2F2018%2F05%2F18%2Feven-the-most-advanced-computer-programmers-have-probably-never-heard-of-this-concept%2Famp%2F%23amp_tf%3DFrom%2520%25251%2524s&share=https%3A%2F%2Fwww.forbes.com%2Fsites%2Fquora%2F2018%2F05%2F18%2Feven-the-most-advanced-computer-programmers-have-probably-never-heard-of-this-concept%2F&share=https%3A%2F%2Fwww.forbes.com%2Fsites%2Fquora%2F2018%2F05%2F18%2Feven-the-most-advanced-computer-programmers-have-probably-never-heard-of-this-concept%2F diff --git a/documentation/research/text_editor & ide.md b/documentation/research/text_editor & ide.md index c1cdde62b..433644c7a 100644 --- a/documentation/research/text_editor & ide.md +++ b/documentation/research/text_editor & ide.md @@ -42,6 +42,7 @@ # Reference +1. [Why ContentEditable is Terrible](https://medium.engineering/why-contenteditable-is-terrible-122d8a40e480) 1. [Broot: A better way to navigate directories](https://github.com/Canop/broot) 1. https://www.simplethread.com/editor-plugins-belong-in-lock-file/ 1. [How to Design an IDE-Friendly Language with Peter Gromov @donnerpeter](https://www.youtube.com/watch?v=lubc8udiP_8) diff --git a/documentation/research/web_framework.md b/documentation/research/web_framework.md index 4abba9b5e..9ee78130c 100644 --- a/documentation/research/web_framework.md +++ b/documentation/research/web_framework.md @@ -100,6 +100,7 @@ # Styling +1. https://every-layout.dev/ 1. https://github.com/diegohaz/reuse 1. https://wiki.csswg.org/ideas/mistakes 1. https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index 09ab08da5..8f66e2717 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -245,7 +245,7 @@ Called by `imenu--generic-function'." (control//contract (altRE "pre" "post")) ;; Type (type//syntax (altRE "|" "&" "->" "All" "Ex" "Rec" "primitive" "\\$" "type")) - (type//checking (altRE ":" ":coerce" ":~" ":assume" ":of" ":cast" ":share" ":by-example")) + (type//checking (altRE ":" ":coerce" ":~" ":assume" ":of" ":cast" ":share" ":by-example" ":hole")) (type//abstract (altRE "abstract:" ":abstraction" ":representation" ":transmutation" "\\^:representation")) (type//unit (altRE "unit:" "scale:")) (type//poly (altRE "poly:" "derived:")) diff --git a/stdlib/source/lux/type.lux b/stdlib/source/lux/type.lux index fd02c1497..15f284d10 100644 --- a/stdlib/source/lux/type.lux +++ b/stdlib/source/lux/type.lux @@ -4,9 +4,10 @@ [equivalence (#+ Equivalence)] [monad (#+ Monad do)]] [control + ["." function] + ["." exception (#+ exception:)] ["p" parser - ["s" code (#+ Parser)]] - ["." function]] + ["s" code (#+ Parser)]]] [data ["." text ("#@." monoid equivalence)] ["." name ("#@." equivalence codec)] @@ -357,8 +358,9 @@ [cursor macro.cursor valueT (macro.find-type valueN) #let [_ (log! ($_ text@compose - ":log!" " @ " (.cursor-description cursor) text.new-line - (name@encode valueN) " : " (..to-text valueT) text.new-line))]] + (name@encode (name-of ..:log!)) " @ " (.cursor-description cursor) text.new-line + "Value: " (name@encode valueN) text.new-line + " Type: " (..to-text valueT) text.new-line))]] (wrap (list (code.identifier valueN)))) (#.Right valueC) @@ -413,3 +415,14 @@ (~ (get@ #expression exemplar))} {(~ extraction) (:assume [])})))))) + +(exception: #export (hole-type {location Cursor} {type Type}) + (exception.report + ["Location" (.cursor-description location)] + ["Type" (..to-text type)])) + +(syntax: #export (:hole) + (do @ + [cursor macro.cursor + expectedT macro.expected-type] + (macro.fail (exception.construct ..hole-type [cursor expectedT])))) |