Commit graph

58 commits

Author SHA1 Message Date
Jeff Evans
0ddebad851 Adding new subseq-pred-fn macro to create the new form of predicate
function (taking the previous and current item), to preserve backward
compatibility (still allowing predicate functions that only take the
current item).  This macro also takes in a get-truthy-fn as its first
argument, which is a function that marks whether that item in the
sequence should be included in a subsequence.  This is necessary
because the predicate function can now be of any arbitrary form, so
we cannot make any assumption about how the user intends for that
result to be interpreted as a "filter".

Adding SubseqsDynamicPredFn, which works the same as SrangeEndFn, to support backward compatibility

Adding wrapper to take a predicate on [prev current] and turn it into a predicate also taking the current index as the first param

Creating transducer to combine this with the user-supplied predicate function

Adding tests for select and transform

TODO: figure out how to make predicate function handle an open-ended subsequence (ex: end marker not yet seen)
2020-09-25 13:51:24 -05:00
Nathan Marz
6e7d772755 update codox 2019-10-13 23:04:36 -04:00
Nathan Marz
86f8412ee4 update deploy 2019-10-13 22:56:04 -04:00
Peter Nagy (NPE)
fe1deb5195 use criterium for benchmarks, output JVM and clojure version 2018-12-13 12:54:28 +01:00
nathanmarz
8764a4b2b6 fix throw-illegal in cljs code 2018-12-03 14:29:58 -05:00
nathanmarz
d4887c2090 fix issue with walker caused by change in cljs 1.10 2018-03-22 15:43:53 -04:00
nathanmarz
70d9fef5cc improve subselect fix 2017-12-21 23:28:00 -05:00
Mayank Jain
10e80e47ca Switch to node-js build engine for cljs tests 2017-03-11 23:02:12 +05:30
Mayank Jain
4695c96998 Add cljs tests to travis
* Add lein-doo plugin to run cljs tests. This is the new recommended
  approach.
* Update project.clj to add cljsbuild config
* Update .travis.yml file to run cljs tests as well.
* Also to speed up travis builds add ~/.m2 dir in cache

To run do:
$ lein do javac, doo phantom test-build once

Note that you'll need phantomjs installed for above to work.
2017-03-11 02:31:10 +05:30
nathanmarz
6b080a2575 update test.check to 0.9.0 2017-03-10 12:32:02 -05:00
Nathan Marz
6b3ea32799 update versions of clj and cljs for tests, new repl script for cljs 2016-10-14 09:52:55 -04:00
Nathan Marz
2e85cedcc4 merge macros namespace into core com.rpl.specter namespace 2016-09-05 07:48:05 -04:00
Nathan Marz
18791c6b82 inline caching working for cljs, all tests passing 2016-09-03 19:58:10 -04:00
Nathan Marz
ac3f604211 reformat code with parinfer 2016-08-11 10:13:27 -04:00
Nathan Marz
74f38d93a9 switch from cljx to cljc 2016-08-06 10:40:45 -04:00
Nathan Marz
f9e6b621a9 upgrade to clojure 1.7.0 for reducers 2016-06-09 23:19:12 -04:00
Nathan Marz
b0d8fe700c update doc gen 2016-06-09 09:24:05 -04:00
Nathan Marz
4565a7e7d6 fail cljs build on any warnings, eliminate warning about com.rpl.specter.transient namespace by renaming to transients 2016-06-09 08:06:17 -04:00
Nathan Marz
82321d7370 isolate desired operations to test in transient benchmarks and make the comparisons work on identical data, add transient namespace for doc generation 2016-06-08 06:02:41 -04:00
Nathan Marz
c28245b420 add protocols ns to api docs 2016-06-07 14:40:31 -04:00
Nathan Marz
5b949f9a52 update build to target clojure 1.6 during tests 2016-06-06 07:58:29 -04:00
Nathan Marz
2d3902f478 huge speedup to if-path when condition is a single statically known function, big optimization for all transforms that don't use value collection by using identical? instead of empty? 2016-06-04 20:49:57 -04:00
Nathan Marz
f2865615bd fix source links for api docs 2016-06-02 12:17:02 -04:00
Nathan Marz
d85f21722b set up to generate html api docs 2016-06-02 11:59:19 -04:00
Nathan Marz
52740d56ac add :notpath metadata for pathedfn args that should not be interpreted as paths during inline factoring/caching, fixed transformed to operate appropriately in inline factoring when transform-fn is anonymous or local, drop support for cljs below v1.7.10 2016-06-02 02:42:18 -04:00
Nathan Marz
bb5fcbe7b3 bootstrap compatibility changes 2016-05-28 19:00:58 -04:00
Nathan Marz
b8bcfd6054 change how macroexpansion is done during inline caching so that nested &env are correctly computed. Allows for inline caching to occur nested inside an inline caching expression 2016-05-24 17:01:17 -04:00
Nathan Marz
ac8119dbbe inline caching for cljs working in repl tests, tests not working for cljs yet 2016-05-23 09:23:14 -04:00
Nathan Marz
d3a462aa06 initial impl working for basic use cases 2016-05-20 16:57:53 -04:00
Nathan Marz
dd906aad95 change clojure/cljs dependencies to provided 2016-02-26 09:17:40 -05:00
Nathan Marz
41f42e20a1 fixed inadvertant reflection in protocol paths, replace object-array in jvm impl with faster impl 2015-12-16 00:53:50 -05:00
Nathan Marz
8d977296d7 make alias for deploying 2015-10-10 12:32:32 -04:00
Josh Tilles
61f5a0a09a Adapt the test instructions to cljx.
The alias is taken from [the cljx README](20ec61792b (installation)).
2015-10-09 15:08:08 -04:00
Josh Tilles
9e215b638e Support Clojure 1.6 by adopting cljx.
Fixes nathanmarz/specter#16.
Resolves nathanmarz/specter#18.
2015-10-09 14:55:10 -04:00
Nathan Marz
71b3f6e462 remove lein-cljsbuild since not used at all 2015-06-30 21:09:54 -04:00
Nathan Marz
784fb9fb8d add clojurescript dep and update clojure dep to 1.7.0, fix cljsbuild definition 2015-06-30 19:53:17 -04:00
Nathan Marz
b85f761ff9 upgrade to latest version of test.check, for unkonwn reason couldn't use generator name max-size and had to rename to limit-size 2015-06-30 17:08:05 -04:00
Pietro F. Menna
6416826374 Changed directory structure for test directory to be the same as for src 2015-06-26 13:35:18 -04:00
Pietro F. Menna
c1cb056f4e Fixed warning message during 'lein test' because of the hooks 2015-06-25 09:43:59 -04:00
Pietro F. Menna
2404445827 Added cljsbuild support 2015-06-24 18:37:58 -04:00
Pietro F. Menna
3b3bace828 Testing 2015-06-24 14:28:33 -04:00
Nathan Marz
eb11d3771a diassociate version from project.clj so can be used for other modules 2015-06-22 14:37:16 -04:00
Nathan Marz
6590995bf6 0.5.4 2015-06-19 14:13:31 -04:00
Nathan Marz
2299bcc58b 0.5.3 2015-06-18 00:56:17 -04:00
Nathan Marz
6ba23bc438 0.5.2 2015-06-01 14:22:44 -04:00
Nathan Marz
86a3aee11d 0.5.1 2015-05-31 08:50:21 -04:00
Nathan Marz
1f504e95b4 0.5.0 2015-05-11 15:19:47 -04:00
Nathan Marz
e052ee06a8 removed plugin 2015-05-10 18:39:09 -04:00
Nathan Marz
47aee4d000 broken implementation of skipping protocols 2015-05-10 02:12:06 -04:00
Nathan Marz
729e75c836 0.1.0 2015-04-19 13:46:00 -04:00