Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
813 commits
Select commit Hold shift + click to select a range
20702a6
And another
alexandergunnarson Oct 22, 2018
dc83c76
And another
alexandergunnarson Oct 22, 2018
c9d7eba
Fixed a test so quickly
alexandergunnarson Oct 22, 2018
768d39f
Another test passes!
alexandergunnarson Oct 22, 2018
d8fb078
All tests from Reagent pass!
alexandergunnarson Oct 22, 2018
94fb221
Fulfill todo
alexandergunnarson Oct 22, 2018
ea9ffff
Add note to data.reactive
alexandergunnarson Oct 22, 2018
9f8185b
Make some naming/functionality clearer
alexandergunnarson Oct 22, 2018
3927240
Add some notes and fix compilation
alexandergunnarson Oct 22, 2018
ffbc313
Remove `watchesArr`
alexandergunnarson Oct 22, 2018
e765ac7
Add some optimization notes
alexandergunnarson Oct 22, 2018
3e6cd2e
Add some notes about reactive types
alexandergunnarson Oct 22, 2018
f62c6f1
A little more of a comment
alexandergunnarson Oct 22, 2018
33f6251
Add some hashing macros
alexandergunnarson Oct 23, 2018
16688a2
Some brief notes
alexandergunnarson Oct 23, 2018
e8ef7f2
Add `norx-deref`
alexandergunnarson Oct 23, 2018
90187e2
Fix `parse-impls` to not overwrite
alexandergunnarson Oct 23, 2018
19a295b
Fix prefer-method for print-method
alexandergunnarson Oct 23, 2018
7b73666
Add `t/rx`
alexandergunnarson Oct 23, 2018
9a99e06
Every `t/` now accommodates reactive types
alexandergunnarson Oct 24, 2018
6c5cef0
Fix some compilation and tests
alexandergunnarson Oct 24, 2018
f203fa2
Further implement reactivity
alexandergunnarson Oct 24, 2018
5680d67
Change some names to reflect true status of thread-(un)safety
alexandergunnarson Oct 24, 2018
5d94690
Add some notes about reactive recompilation
alexandergunnarson Oct 24, 2018
f097c73
Think out more of reactive recompilation
alexandergunnarson Oct 24, 2018
9d984e4
Reactive fn extensions outline is done!
alexandergunnarson Oct 27, 2018
a1ce7ea
It seems rx overloads should be all prepped to work!
alexandergunnarson Oct 27, 2018
eebc844
Extract quantum.untyped.core.data.vector
alexandergunnarson Oct 28, 2018
92b9c52
Remove notions of atomicity from reactive types
alexandergunnarson Oct 30, 2018
3e2ff9a
Add `uc/run!` rather than `each`
alexandergunnarson Oct 30, 2018
0e0334b
Add `add-interceptor!`
alexandergunnarson Oct 30, 2018
1024ae6
Clarify docstring
alexandergunnarson Oct 30, 2018
654ea19
Flesh out more of the reactive types skeleton
alexandergunnarson Oct 30, 2018
84e6573
`reduce-2` arg order changed
alexandergunnarson Nov 2, 2018
14359d5
`seq-or-2`, `seq-and-2`
alexandergunnarson Nov 2, 2018
73be6f0
Add note
alexandergunnarson Nov 2, 2018
804ae1c
Add optimization to `t/compare`
alexandergunnarson Nov 2, 2018
bd2b90d
Correct `t/rx` and `t/fnt?`
alexandergunnarson Nov 2, 2018
7552e16
For rx type, simplify some logic and fix printing
alexandergunnarson Nov 2, 2018
0849b0f
Add arg syms basis analysis
alexandergunnarson Nov 2, 2018
7837545
Update some test notions
alexandergunnarson Nov 2, 2018
a0a2eb1
Breaking change: 1st pass in implementing reactivity for `t/defn`
alexandergunnarson Nov 2, 2018
6764573
Ensure interceptors are called correctly
alexandergunnarson Nov 2, 2018
f038708
Fix some logic issues
alexandergunnarson Nov 2, 2018
8fa0696
`reduce-2` `on-different-count` should have different arity
alexandergunnarson Nov 2, 2018
e9e50e6
Pass `opts` and `fn|type` correctly
alexandergunnarson Nov 2, 2018
e6b079f
Return correct value after interceptors are applied
alexandergunnarson Nov 2, 2018
8faf0a3
Fix some compilation and output `overload-types` when `:test`
alexandergunnarson Nov 2, 2018
84f6b94
First test passes with reactive types overhaul :D
alexandergunnarson Nov 2, 2018
f52b9b2
Another test bites the dust!
alexandergunnarson Nov 2, 2018
62ce040
Another test passes!
alexandergunnarson Nov 3, 2018
767efe1
Another test passes!
alexandergunnarson Nov 3, 2018
40022ab
Another test passes!
alexandergunnarson Nov 3, 2018
5ac38c0
And another!
alexandergunnarson Nov 3, 2018
2db16c4
And another
alexandergunnarson Nov 3, 2018
2c83769
`t/none?` is now `t/<>` all except `t/U`; `rx-type?`
alexandergunnarson Nov 3, 2018
5b5ada8
Add note on reactivity in analyzer
alexandergunnarson Nov 3, 2018
430ee8f
Ensure interceptors capture as well
alexandergunnarson Nov 3, 2018
fc3ed7b
Finish up empty set comparison
alexandergunnarson Nov 3, 2018
126599d
Fix `defnt` compilation issue in non-test mode
alexandergunnarson Nov 3, 2018
dc4107b
Remove reflection
alexandergunnarson Nov 3, 2018
9025486
`defmeta`
alexandergunnarson Nov 3, 2018
00888a6
Other tests pass; use `defmeta`
alexandergunnarson Nov 3, 2018
5fbe90e
Correctly split reactive types
alexandergunnarson Nov 3, 2018
602912e
Finish up accounting for reactive types in `t/defn`
alexandergunnarson Nov 4, 2018
4198b8b
Fixed some bugs and first test passes!
alexandergunnarson Nov 4, 2018
24040c3
A number of tests pass
alexandergunnarson Nov 4, 2018
b79fefa
Another test passes
alexandergunnarson Nov 4, 2018
e206850
Another test passes!
alexandergunnarson Nov 4, 2018
50d0c36
Another test passes
alexandergunnarson Nov 4, 2018
5ad5557
Fix a few errors in `extend-defn!`
alexandergunnarson Nov 4, 2018
548deca
The first `extend-defn!` test passes :D
alexandergunnarson Nov 4, 2018
62c8d8d
New test passes
alexandergunnarson Nov 4, 2018
0538eeb
Correct input type sorting
alexandergunnarson Nov 6, 2018
ce2779a
Complex dependent type test passes!
alexandergunnarson Nov 6, 2018
4400ac0
Ensure single-split reactive types get norx-derefed
alexandergunnarson Nov 7, 2018
c768bb1
Add more to tests
alexandergunnarson Nov 7, 2018
6b183a0
Fix spec
alexandergunnarson Nov 7, 2018
bfff9a3
Support `t/defn` declaration
alexandergunnarson Nov 7, 2018
e6b313a
Ensure per-overload types decls are interned in the correct ns
alexandergunnarson Nov 7, 2018
b5aa626
Fix comparison for expressions
alexandergunnarson Nov 7, 2018
9f8e401
Remove instrumentation from certain fns
alexandergunnarson Nov 7, 2018
10e5ec5
Ensure `output-type-norx` is included with declaration
alexandergunnarson Nov 7, 2018
c9dcd82
Can pass non-form output types; also better meta check for forms
alexandergunnarson Nov 7, 2018
57c8614
Better handling of fn output types and runtime checks
alexandergunnarson Nov 7, 2018
22353d8
Fix some compilation
alexandergunnarson Nov 7, 2018
d713c6e
Add some more bug reports
alexandergunnarson Nov 7, 2018
0437dd4
Better report errors in `t/defn`
alexandergunnarson Nov 7, 2018
0d3f0b9
Update todos as reactive types are pretty much done!
alexandergunnarson Nov 7, 2018
ea9bc0a
Add better `(input|output)-type` handling; fix fundamental `type>clas…
alexandergunnarson Nov 8, 2018
ba8f37e
`dedupe`+`dedupe-by`
alexandergunnarson Nov 8, 2018
4f1a4ad
`t/meta-or` to the rescue
alexandergunnarson Nov 8, 2018
e21b82e
Fix compossibility
alexandergunnarson Nov 8, 2018
289ba21
Add todo
alexandergunnarson Nov 8, 2018
e373d92
Add test and a related fix for rx output types
alexandergunnarson Nov 8, 2018
60782eb
input-type and output-type should respect non-splitting
alexandergunnarson Nov 8, 2018
959a460
Fix overload splitting with `t/(in|out)put-type`
alexandergunnarson Nov 8, 2018
20fdcc5
Analyze built-in sets and vectors
alexandergunnarson Nov 8, 2018
1575e6f
More correctly compare two ProtocolTypes
alexandergunnarson Nov 9, 2018
051ca46
Ensure protocol and class types are comparable
alexandergunnarson Nov 9, 2018
4f037b5
Ensure safer exception printing and remove `t/none?` from split meta-or
alexandergunnarson Nov 9, 2018
01fe1eb
`type>classes` for protocol types
alexandergunnarson Nov 9, 2018
6f83b26
Fulfill one todo and spawn another
alexandergunnarson Nov 9, 2018
9957ad3
Add better `find-spec`
alexandergunnarson Nov 9, 2018
07ba3a4
`min` and `max` should be good to go
alexandergunnarson Nov 9, 2018
62204a9
`t/ftype` should not require an output type
alexandergunnarson Nov 9, 2018
882e778
Think more about todos
alexandergunnarson Nov 9, 2018
7222cf2
`inline` is now first type system priority
alexandergunnarson Nov 9, 2018
9326559
Finish updating todos for now
alexandergunnarson Nov 9, 2018
8d5eb60
First pass at direct dispatch seems to work!
alexandergunnarson Nov 10, 2018
2e4b76a
Fix direct dispatch bug
alexandergunnarson Nov 10, 2018
ae6b197
`inline` appears to work!!
alexandergunnarson Nov 10, 2018
9484611
A few inline tests
alexandergunnarson Nov 10, 2018
66b5be0
Fix type sorting
alexandergunnarson Nov 10, 2018
a724d41
Disambiguate
alexandergunnarson Nov 10, 2018
d30b540
Add overload to `>form`
alexandergunnarson Nov 10, 2018
9737011
Update todos
alexandergunnarson Nov 10, 2018
8e8a7fc
Fix method not being implemented
alexandergunnarson Nov 10, 2018
2f63aed
Fix some errors with inline; not too many left!
alexandergunnarson Nov 10, 2018
d293f87
`cond-let` -> `ifs-let`
alexandergunnarson Nov 11, 2018
0c70e6b
Ensure ns is configurable when analyzing; fix inline analysis
alexandergunnarson Nov 11, 2018
cccbcff
Ensure field access form is not botched
alexandergunnarson Nov 12, 2018
b0e1b39
Add `sort!`, `sort-by!`
alexandergunnarson Nov 12, 2018
d571705
`check-comparator-transitivity`
alexandergunnarson Nov 12, 2018
e912864
Fix compilation
alexandergunnarson Nov 12, 2018
91b3f39
Fix overload types sort
alexandergunnarson Nov 12, 2018
79317e8
Add effects queue; not yet done
alexandergunnarson Nov 12, 2018
0bb9400
Rollbacks actually work correctly now!
alexandergunnarson Nov 13, 2018
fb6bba8
More success!
alexandergunnarson Nov 13, 2018
ff2ccf9
Begin quantum.core.fn work
alexandergunnarson Nov 13, 2018
c89cce3
project-base.clj now handles proto-REPL
alexandergunnarson Nov 13, 2018
d96cb10
Add `proto-repl` to project-base.clj
alexandergunnarson Nov 15, 2018
8b0e487
Add `*<>|macro`
alexandergunnarson Nov 15, 2018
350cd03
Add `AnonFn` and some additions for `t/fn`
alexandergunnarson Nov 15, 2018
92eb7de
Begin to add some things to `fn`
alexandergunnarson Nov 15, 2018
7518c38
Begin to flesh out first test for `t/fn`
alexandergunnarson Nov 15, 2018
42c0598
Introduce named types for efficiency and clarity
alexandergunnarson Nov 16, 2018
089cd6f
`t/dotyped` and `t/def`
alexandergunnarson Nov 16, 2018
38d401b
Fulfill todo
alexandergunnarson Nov 16, 2018
544f391
Support printed types
alexandergunnarson Nov 16, 2018
c363cb5
First test re-passes!
alexandergunnarson Nov 16, 2018
c03481d
Flesh out `-edn` overloads
alexandergunnarson Nov 16, 2018
7e7cadd
`maybe-look-up-type-from-class` to save memory
alexandergunnarson Nov 16, 2018
d823a06
Clear up fn-name vs. name on `t/ftype`
alexandergunnarson Nov 16, 2018
9ba7b37
Don't auto-collapse symbols
alexandergunnarson Nov 16, 2018
041627a
Compare MetaType with everything else
alexandergunnarson Nov 16, 2018
9cb26b9
Transition metadata to `MetaType`
alexandergunnarson Nov 16, 2018
56f9ecb
Elaborate on avoiding var indirection
alexandergunnarson Nov 16, 2018
fbdabe1
Fix `all-values?` in analysis
alexandergunnarson Nov 16, 2018
423efd3
Add `>form` overloads for primitives
alexandergunnarson Nov 16, 2018
dadbf46
`compare|class+finite`
alexandergunnarson Nov 16, 2018
d3ca162
Add `clj-java-decompiler`
alexandergunnarson Nov 16, 2018
121462b
`t/def` documentation enhancement
alexandergunnarson Nov 16, 2018
c52079e
Begin to add primitive data readers
alexandergunnarson Nov 16, 2018
173501b
All primitives are now supported in analysis / form emission
alexandergunnarson Nov 16, 2018
0b25fba
Overhaul type comparisons
alexandergunnarson Nov 17, 2018
c1e64c7
`ex-info` -> constructor in data.primitive
alexandergunnarson Nov 17, 2018
545908d
Add named types in tests
alexandergunnarson Nov 17, 2018
48e78fb
Begin to fix comparisons
alexandergunnarson Nov 17, 2018
5efc9ac
Trace out complete comparisons via `comparison-combinations`
alexandergunnarson Nov 17, 2018
8771a7b
Continue to refine comparison tests for or+and
alexandergunnarson Nov 17, 2018
2683ad0
`compare|or+and` improved slightly
alexandergunnarson Nov 17, 2018
80b60f3
Add to error data
alexandergunnarson Nov 18, 2018
b539151
Fix >form error
alexandergunnarson Nov 18, 2018
0220b46
Reorder
alexandergunnarson Nov 18, 2018
65b7eaa
Implement all readers
alexandergunnarson Nov 18, 2018
57d46d3
Add `declare` for direct dispatch overloads
alexandergunnarson Nov 18, 2018
fb4a1b9
Add todo
alexandergunnarson Nov 18, 2018
945c346
Fix some bugs
alexandergunnarson Nov 18, 2018
b54161f
Some cleanups
alexandergunnarson Nov 18, 2018
5fe1fd5
`t/def-`
alexandergunnarson Nov 18, 2018
c2c43a3
Compare `t/ftype`s with each other
alexandergunnarson Nov 18, 2018
5fc27ef
Fix comparison between ftypes
alexandergunnarson Nov 18, 2018
8dbe232
Fix compilation
alexandergunnarson Nov 18, 2018
53519fe
Fix occasional type error
alexandergunnarson Nov 18, 2018
af4c63b
Add `group-deep-by-into`, `shuffle!`, `sort|insertion!`
alexandergunnarson Nov 18, 2018
465fadb
`check-comparator` overhaul
alexandergunnarson Nov 18, 2018
3993ef1
Fix critical hashing issue
alexandergunnarson Nov 18, 2018
5428c76
`sort-by|insertion!`
alexandergunnarson Nov 18, 2018
e7fb8dc
Move CLJS `MutableHashMap` to untyped
alexandergunnarson Nov 18, 2018
776b9ee
Add arity to `alist-conj!`
alexandergunnarson Nov 18, 2018
246719d
Add `test|group-deep-by-into`
alexandergunnarson Nov 18, 2018
622a6f1
Fix overload types sorting
alexandergunnarson Nov 18, 2018
7b76264
Fix compilation
alexandergunnarson Nov 19, 2018
26bb213
`case-val`
alexandergunnarson Nov 19, 2018
66f9054
`t/-` now handles `meta-or`
alexandergunnarson Nov 19, 2018
2f48c03
Overhaul logical type comparisons
alexandergunnarson Nov 19, 2018
717da01
Leave unboxing of `t/def`s to todos
alexandergunnarson Nov 19, 2018
51eb166
Continue to refine data.numeric
alexandergunnarson Nov 19, 2018
c5e3703
Attempt to compress some data.numeric fns
alexandergunnarson Nov 19, 2018
d6c8f18
ftypes are now `t/compare`able (mostly)
alexandergunnarson Nov 19, 2018
fd3de7b
Anonymous `t/ftype`s are about to get support
alexandergunnarson Nov 19, 2018
f6b6890
Ensure input types do not overlap
alexandergunnarson Nov 19, 2018
2a50c21
Ensure decompiler works
alexandergunnarson Nov 20, 2018
6a350ad
*<>|sized|macro
alexandergunnarson Nov 20, 2018
aea39fc
Dispatch getting better fleshed out
alexandergunnarson Nov 20, 2018
ae3b8ad
`t/fn` test/example is actually more straightforward than expected
alexandergunnarson Nov 20, 2018
eaaa735
Continue to refine `t/fn` example and todos
alexandergunnarson Nov 20, 2018
a89f9c2
Continue anon fn work
alexandergunnarson Nov 21, 2018
3788fba
Continue with anon fn work
alexandergunnarson Nov 21, 2018
ef86b54
Fix compilation
alexandergunnarson Nov 21, 2018
7dcd63c
Add note for `TypedFn`
alexandergunnarson Nov 21, 2018
d53cc95
`csym`; more fn work
alexandergunnarson Nov 21, 2018
5cf1a28
Finish up this part of fn test
alexandergunnarson Nov 21, 2018
b076df7
Better spacing
alexandergunnarson Nov 22, 2018
e627631
Remove `declare`
alexandergunnarson Nov 22, 2018
9923134
input-type -> input; output-type -> output
alexandergunnarson Nov 28, 2018
1943e7e
Try to set up the outlines of `comp` and `aritoid`... phew
alexandergunnarson Nov 28, 2018
eb1496a
Clear up contract satisfaction / growth+breakage notes
alexandergunnarson Nov 28, 2018
286405b
Some more notes
alexandergunnarson Nov 28, 2018
b18978e
Add one case of a contract-satisfactory fn
alexandergunnarson Nov 28, 2018
c9b065f
Trying to fix input-fn specificity problem
alexandergunnarson Nov 28, 2018
962d9fd
Maybe inner expansion is the secret
alexandergunnarson Nov 29, 2018
8933f34
More notes on inner expansion
alexandergunnarson Nov 29, 2018
9239c9e
Provide next example
alexandergunnarson Nov 29, 2018
113b536
Demo of how to inner-expand `(transduce (map|transducer inc) conj [1 …
alexandergunnarson Nov 29, 2018
0bc819a
Add note on dynamism
alexandergunnarson Nov 29, 2018
09af8cd
Start in on `t/fn` analysis
alexandergunnarson Nov 30, 2018
ded2c2d
Add `TypedDefnNode` and `ExtendTypedDefnNode`
alexandergunnarson Dec 1, 2018
7738b88
t/tfn? -> t/fnt?
alexandergunnarson Dec 1, 2018
ffb0394
analyzer now hooks in to analying typed macros
alexandergunnarson Dec 1, 2018
2609bff
Restruture typed macro impls to use `uana/analyze`
alexandergunnarson Dec 1, 2018
c5665dd
Fix bug and log a different bug
alexandergunnarson Dec 1, 2018
f33deb4
`>array`
alexandergunnarson Dec 1, 2018
f7caea8
Add a few more notes
alexandergunnarson Dec 1, 2018
2449cd3
Clean up untyped.core.data.array
alexandergunnarson Dec 1, 2018
f4d448b
Remove `quantum.test.core.macros.defnt`
alexandergunnarson Dec 1, 2018
17a0281
Now `t/defn` uses `TypedFn` format
alexandergunnarson Dec 1, 2018
d508bb7
First test passes with new `TypedFn`-based impl!
alexandergunnarson Dec 1, 2018
56681d1
Begin to work on second test
alexandergunnarson Dec 1, 2018
6ec3156
Prevent stack overflow with dotyped
alexandergunnarson Dec 1, 2018
97b6445
Better non-expansion
alexandergunnarson Dec 1, 2018
b4bec75
Another test passes!
alexandergunnarson Dec 3, 2018
84a3658
Begin to analyze `t/fn`s
alexandergunnarson Dec 5, 2018
03dbc04
t/fn analysis is well on its way
alexandergunnarson Dec 5, 2018
c0b96f9
Closer in making test work
alexandergunnarson Dec 5, 2018
1bbfda4
First time t/fn has compiled!!
alexandergunnarson Dec 5, 2018
94d4c7b
`t/fn` actually works as expected!!
alexandergunnarson Dec 6, 2018
d9c1823
`equinumerous?`
alexandergunnarson Dec 17, 2018
6f358fc
Compilation
alexandergunnarson Dec 17, 2018
f16d1dc
Add Mapbox link
alexandergunnarson Dec 17, 2018
c79ebbf
Making `test|fn` work
alexandergunnarson Dec 17, 2018
28ce8ab
The code is now equivalent!
alexandergunnarson Dec 17, 2018
414e0ba
Tests pass! :D
alexandergunnarson Dec 17, 2018
69a1cbf
Update voltdb.sql
alexandergunnarson Jan 17, 2019
c54b71d
Excise Datomic; add VoltDB
alexandergunnarson Jan 17, 2019
b119858
Went through this
alexandergunnarson Jan 17, 2019
192fb91
Create voltdb.cljc
alexandergunnarson Jan 17, 2019
fa7efbd
Start back work on tests
alexandergunnarson Jan 17, 2019
abfafe8
Put todos elsewhere
alexandergunnarson Jan 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ pom.xml.asc
.lein-repl-history

*.class
*.extract-native-dependencies
*.swp
*.swo
399 changes: 222 additions & 177 deletions benchmarks/jvm.clj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ dependencies:
- sudo apt-get update
# Shouldn't use `ppa:ubuntu-toolchain-r/test` : http://askubuntu.com/questions/777803/apt-relocation-error-version-glibcxx-3-4-21-not-defined-in-file-libstdc-so-6
# install the g++ version OpenCL needs
- wget -c http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1~16.04.4_amd64.deb && sudo dpkg -i gcc-5-base_5.4.0-6ubuntu1~16.04.4_amd64.deb && rm gcc-5-base_5.4.0-6ubuntu1~16.04.4_amd64.deb
- wget -c http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb && sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb && rm libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb
- wget -c http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1~16.04.9_amd64.deb && sudo dpkg -i gcc-5-base_5.4.0-6ubuntu1~16.04.9_amd64.deb && rm gcc-5-base_5.4.0-6ubuntu1~16.04.9_amd64.deb
- wget -c http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.9_amd64.deb && sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.9_amd64.deb && rm libstdc++6_5.4.0-6ubuntu1~16.04.9_amd64.deb
- sudo printf '\nLD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH\n' >> /home/ubuntu/.bashrc
- strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI_1.3.8 # version required by OpenCL; fail-fast
# various necessary utils
Expand Down
1 change: 1 addition & 0 deletions doc/cljc/quantum/_performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

https://github.com/druid-io/druid/issues/3892 (Move from `ByteBuffer` to `Memory`)
- Yahoo's `Memory` submodule of `DataSketches` is faster than `ByteBuffer` (!)
- https://github.com/DataSketches/memory/tree/master/src/main/java/com/yahoo/memory

## quantum.net.http

Expand Down
54 changes: 53 additions & 1 deletion doc/cljc/quantum/core/defnt.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class NumberLessThan7 {
public final Number x;

public NumberLessThan7 (Number x_) {
if (lessThan(x_, 7)) {// imagine here a `lessThan` function that worked on any two numbers
if (lessThan(x_, 7)) {// imagine here a `lessThan` function that worked on any two `Number`s
x = x_;
} else {
throw new Exception("Number must be less than 7");
Expand Down Expand Up @@ -228,3 +228,55 @@ Output constraints:

Unlike most static languages, a `nil` value is not considered as having a type
except that of nil.

## Why type inference is not a great idea

Take the below code:

```clojure
(defnt transduce
([ f ?, xs ?] (transduce identity f xs))
([xf ?, f ?, xs ?] (transduce xf f (f) xs))
([xf ?, f ?, init ?, xs ?]
(let [f' (xf f)] (f' (reduce f' init xs)))))
```

- For the `f` in the 1-arity overload:
- Inferred from `(transduce identity f xs)`
- The `f` in the 3-arity overload is then inferred:
- We know that `xf` can be called on `f`, so `xf` must be at least a 1-arity `t/callable?` on `f`
- We know that `f'` can be called on `(reduce f' init xs)`, so `xf` must be at least a 1-arity `t/callable?` on `f`
- Other than that we don't really have any information about `f`
- For the `f` in the 2-arity overload:
- We know that `f` can be called with no arguments, so it must be at least a 0-arity `t/callable?`
- We know that it can be passed to `(transduce xf f (f) xs)`
- We tried to infer the `f` in the 3-arity but it can't be known

It is infeasible to do inferences in the general case for the following reasons:
- The code will be complex and greatly increase time it takes to get any value out of `defnt`
- The code will likely have high computational complexity even if some impressive algorithm comes out of it
- **Even if the code could do it instantly, it would still be a maintenance issue to try to mentally work out for each inference what that ends up being. Labels help quite a lot.**

I think the best approach is not inference, but rather being able to at least do:
- Input/output specs that rely on the input/output specs of other spec'ed fns
- Conditional specs

Thus the code turns into:

```clojure
(def rf? "Reducing function"
(t/fn [ {:doc "seed arity"}]
[:_ {:doc "completing arity"}]
[:_ :_ {:doc "reducing arity"}]))

(def xf? "Transforming function"
(t/fn [rf? :> rf?]))

(defnt transduce
([ f rf?, xs t/reducible?] (transduce identity f xs))
([xf xf?, f rf?, xs t/reducible?] (transduce xf f (f) xs))
([xf xf?, f rf?, init _ xs t/reducible?]
(let [f' (xf f)] (f' (reduce f' init xs)))))
```

which is much, much nicer because it's much better documented, much more clear what each input and output does, and just overall much easier to follow and reason about, without introducing a meaningful increase in code size, and certainly without adding unnecessary information.
13 changes: 9 additions & 4 deletions doc/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
## Symbols

- `->`+ : constructor
: 'convert to'
- +`->` : 'convert from'
: 'convert to' ; TODO phase out
; `>`+ : 'convert to'
- +`->` : 'convert from' ; TODO phase out
- +`>` : 'convert from'
- <A>`=>`<B> : map from <A> to <B> ; TODO phase out
- <A>`->`<B> : map from <A> to <B>
- `<`+ : calculate/compute (of functions) — as if to "take off the chan" of computed vals
- <A>`:`<B> : specificity relationship; <A> of type <B>
- <A>`:`<B> : specificity relationship; <A> of type <B> ; TODO phase out
- <A>`|`<B> : specificity relationship; <A> of type <B>
- +`?` : predicate
- `?`+ : 'maybe' — if null, return null, otherwise do something
- +`*` : 'variant' — as ambiguous as it sounds
- +`*` : 'variant' — as ambiguous as it sounds ; TODO phase out
: 'relaxed' — in the context of numerics
- +`'` : 'strict' — esp. if numeric
: 'prime'/'next'
Expand Down
87 changes: 87 additions & 0 deletions doc/voltdb.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
-- ~/voltdb-community-8.3.3/bin/voltdb start --http=8081
-- ./bin/voltdb/sqlcmd

-- TODO performance-test this against Datomic! Generate a bunch of random data till it gets big

drop table entities;

-- TODO add a `tinyint` column for datatype for more efficient indexing
create table entities (
-- time (transaction ID/instant; must be increasing; can be in nanos)
-- first for display purposes
t bigint not null,
-- entity ID
e bigint not null,
-- attribute
a varchar(128) not null,
-- value (serialized)
-- TODO change back to varbinary; just varchar for interactive testing
v varchar
);

-- technically true as you should never assert the same thing in the same transaction
-- create unique index eavt on entities (e, a, v, t)

-- Idea from https://docs.datomic.com/on-prem/indexes.html
-- TODO only index non- byte arrays
create index eavt on entities (e, a, v, t);
create index aevt on entities (a, e, v, t);
create index avet on entities (a, v, e, t);
create index vaet on entities (v, a, e, t);

-- This is in order to do time-based iteration
create index t on entities (t);

-- TODO is this wise? It seems the best partitioning but might not be
partition table entities on column e;

-- Multiple insert in one clause is not supported
insert into entities (t, e, a, v) values (0, -9223372036854775807, 'db|attribute' , 'db|attribute');
insert into entities (t, e, a, v) values (0, -9223372036854775807, 'db|doc' , 'Marker for an attribute name');
insert into entities (t, e, a, v) values (0, -9223372036854775806, 'db|attribute' , 'db|doc');
insert into entities (t, e, a, v) values (0, -9223372036854775806, 'db|doc' , 'Attribute whose value supplies documentation');
insert into entities (t, e, a, v) values (0, -9223372036854775805, 'db|attribute' , 'my|attribute');
insert into entities (t, e, a, v) values (0, -9223372036854775805, 'db|doc' , 'Documentation for my attribute');

insert into entities (t, e, a, v) values (1, -9223372036854775804, 'my|attribute' , 'A value for my attribute. Yay!');

insert into entities (t, e, a, v) values (2, -9223372036854775803, 'db|attribute' , 'my|indexed-attribute');

-- Be careful to sanitize the names — shouldn't include `hash` in the name unless intentional
create index my_BAR_indexed_attribute__evt on entities (e, v, t) where a = 'db|attribute';
create index my_BAR_indexed_attribute__vet on entities (v, e, t) where a = 'db|attribute';

insert into entities (t, e, a, v) values (3, -9223372036854775803, 'my|indexed-attribute', 'A value for my indexed attribute. Woohoo!');

-- next entity ID
select max(e) + 1 from entities;

-- (BigInteger. (.getBytes "my-value!!")) -> "my-value!!"
-- (String. (.toByteArray (BigInteger. "516973278578607596577057"))) -> "my-value!!"

-- Having a view of the DB at a point in time really is as trivial as `where t <= my_timestamp`



-- [:find (count ?customer) . :in $ ?organization :where
-- [?concert :concert/organization ?organization]
-- [?booking :booking/concert ?concert]
-- [?booking :booking/customer ?customer]]--

-- TODO make sure revisions (changes in value of an identity across time) are addressed here
select customer.e
from s as concert,
entities as booking,
entities as customer
where ( concert.a = "concert/organization"
and concert.v = "the-organization")
or ( booking.a = "booking/concert"
and booking.v = concert.e)
or ( booking.a = "booking/customer"
and booking.v = customer.e);

-- This is probably as much effort as the type system. I think we should do it only when we start to
-- scale, and only if it proves to have performance gains that Datomic can't match. We should code
-- to the Datomic interface though. Plus if we preserve all the data in datom format, it's about the
-- easiest thing to migrate (in theory). Perhaps we should do it either way — having source code we
-- can configure and edit will be really helpful.
Loading