Commit Graph

554 Commits

Author SHA1 Message Date
Arya Irani
7bcbd48807 fix off-by-one in Sequence.at 2018-09-04 10:06:16 -04:00
Arya Irani
5726f681a2 eliminate some view operations because:
java.lang.UnsupportedOperationException: TraversableView.Builder.result
	at scala.collection.TraversableView$NoBuilder.result(TraversableView.scala:27)
	at scala.collection.TraversableView$NoBuilder.result(TraversableView.scala:24)
	at scala.collection.IndexedSeqOptimized.zip(IndexedSeqOptimized.scala:90)
	at scala.collection.IndexedSeqOptimized.zip$(IndexedSeqOptimized.scala:80)
	at scala.collection.mutable.IndexedSeqView$AbstractTransformed.zip(IndexedSeqView.scala:46)
	at org.unisonweb.BuiltinTypes$.org$unisonweb$BuiltinTypes$$$anonfun$dataConstructorish$4(BuiltinTypes.scala:126)
2018-08-16 11:09:27 -04:00
Paul Chiusano
392693f1a2 Added Sequence.{++, drop, at} 2018-08-02 16:08:56 -04:00
Paul Chiusano
a222a46353 fix scala tests to for new Foo.+ (vs +_Foo) syntax for qualified operators, also reduced test sizes for Sequence a bit so they don't take forever 2018-07-30 09:30:13 -04:00
Paul Phillips
1080eec0a7 Make 'sbt test' run the tests. 2018-07-22 12:21:36 -07:00
Arya Irani
7ddd0c11d7 all better 2018-07-08 23:48:45 -04:00
Arya Irani
a91b6c81a8 no more stack allocations for Stream
`fp_s` and `fppp_s` accept a function returning `EnvTo[Foo]`.
The environment is passed to the resulting `EnvTo[Foo]` before
encoding the `Foo` as normal.
2018-07-07 17:49:59 -04:00
Arya Irani
74ab0637de eliminate some tupling/untupling 2018-07-07 15:58:38 -04:00
Arya Irani
b78de6f83d remove unused code 2018-07-07 15:21:12 -04:00
Arya Irani
dcbe3cc4d8 seems to have largely fixed itself in my sleep
the typedecl parser for builtins seems to work fine
fixed prettyprinting of tuples
fixed logic error in OptionalTC.isEmpty
added tuple.u and unfold.u tests
2018-07-07 13:00:39 -04:00
Arya Irani
ea3b4291b5 wip/failing attempt to implement Stream.unfold, which requires an Option type
Somehow I broke Pair, or something to do with Pair wrapped in Option?
2018-07-06 23:58:12 -04:00
Arya Irani
a4ef66e645 bugfix and tests for Stream.flatMap 2018-07-05 23:10:30 -04:00
Arya Irani
1f556f0bb1 add tests for Stream.takeWhile/dropWhile/zipWith
untested: flatMap/constant (doesnt terminate)
2018-07-05 13:22:45 -04:00
Arya Irani
510e0c07aa add Stream.sum/append 2018-07-04 22:42:20 -04:00
Arya Irani
3063e7e57f add more Stream builtins and thread env through (see more...)
added `fs_p`, `fpps_p`, etc and the `StackDecode` typeclass, which describes how
  to decode a value which needs access to a stack.

builtin function adapter helper naming convention guide:
`u` = unison unboxed
`b` = Scala Boolean as unboxed booleana
`l` = Scala Long as unboxed int64
`n` = Scala Int as unboxed uint64
`d` = Scala Double as unboxed float
`p` = "polymorphic", some generic type not known to be unboxed
`s` = "stack decode", some input parameter requiring access to the runtime stack to be decoded
`z` = laZy, a result type for which the decompiled form has to be recorded with each operation, as opposed to being derived from a Value.

`p` is used when a function accepts a an `Env => Stream` that will not be consumed
`s` is used when a function accepts a `Stream` (no `Env`) that will be consumed
`z` is used when a function returns a `Stream`

add pretty printing for `Tuple` and `Sequence`
2018-07-04 21:32:56 -04:00
Arya Irani
e05752740c thread env through with StackDecode TC 2018-07-03 12:24:17 -04:00
Arya Irani
ddac74edb8 updates to end-to-end on scala side 2018-07-03 12:22:19 -04:00
Arya Irani
ac0d21a4af
Merge pull request #213 from unisonweb/topic/streamwork-more
end of streams for now
2018-07-02 11:57:23 -04:00
Arya Irani
c332f1dade Merge branch 'master' into topic/streamwork-more 2018-07-01 14:31:47 -04:00
Arya Irani
724e93e1c8 boost HOF stack size and un-minify stream test 2018-06-29 18:44:57 -04:00
Arya Irani
0243bf4009 reduce test latency by not forking new jvm outside of benchmarks
this also affects the working directory of the test jvms
2018-06-29 18:01:54 -04:00
Arya Irani
593c7a6631 testing up the tests 2018-06-29 17:57:58 -04:00
Arya Irani
1d0f546a53 comments 2018-06-29 17:09:51 -04:00
Arya Irani
cd04013e70 Merge branch 'topic/file-compilation-tests' into topic/streamwork-more
# Conflicts:
#	runtime-jvm/main/src/main/scala/Builtins.scala
#	runtime-jvm/main/src/main/scala/util/Stream.scala
2018-06-29 16:45:57 -04:00
Arya Irani
63aaae8f40 bump sbt and have travis update paulp/sbt-extras 2018-06-29 16:38:58 -04:00
Arya Irani
e2b34660a9 add Stream.fromUInt64 2018-06-29 16:18:11 -04:00
Arya Irani
f9c5035277 implement/test flatMap and relax type constraints on filter/choose functions 2018-06-29 16:18:11 -04:00
Arya Irani
21935173d3 runtime FileCompilationTests 2018-06-29 15:42:59 -04:00
Arya Irani
ae6a878116
Merge pull request #210 from unisonweb/yak/scala-2.12.6
update to scala 2.12.6 and fix deprecation errors
2018-06-29 10:19:13 -04:00
Arya Irani
1544e2e6b6 add implicit Encode[Value] (Value was being encoded as External) 2018-06-29 09:49:56 -04:00
Arya Irani
ed21697652 update to scala 2.12.6 and fix deprecation errors 2018-06-27 18:21:58 -04:00
Arya Irani
763bd3a750 disgust
- revert scalaVersion from 2.12.6 to 2.12.4 because `1.0 until ...` is deprecated in 2.12.6
  - recommended workaround is to use BigDecimal ranges, but this shallow fix caused a ClassCastException

- revert sbt to 0.13.17 because unlike local sbt, Travis CI's sbt doesn't know how to self-upgrade to 1.1.x

- add implicit syntax for `Int => UInt64` ; our existing `Int => Term` implicit produces `Int64`.
2018-06-27 12:48:14 -04:00
Arya Irani
bd509fabc6
Merge pull request #206 from unisonweb/topic/sbt-1.1.x
bump sbt version to 1.1.2, restoring incremental compilation
2018-06-27 10:18:57 -04:00
Arya Irani
9fff4b8ae2
Merge pull request #204 from unisonweb/topic/pretty-print-text
add pretty-printing for Text nodes
2018-06-27 10:17:00 -04:00
Arya Irani
2c3b00657f fix runtime result type of Sequence.size 2018-06-25 19:47:50 -04:00
Arya Irani
dc4b8054ad bump sbt version to 1.1.2, restoring incremental compilation
removed sbt-onejar plugin as it isn't yet compatible
https://github.com/sbt/sbt-onejar/issues/35

and updated development.markdown
2018-06-25 19:13:05 -04:00
Arya Irani
28d1352d20 add pretty-printing for Text nodes 2018-06-25 18:55:38 -04:00
Arya Irani
54ff946e0f Fix runtime result type of Text.size 2018-06-25 18:14:04 -04:00
Paul Chiusano
c061c465ec update names of types to match Haskell side 2018-06-24 23:29:04 -04:00
Arya Irani
c42f0e6474
Merge pull request #198 from unisonweb/topic/one-jar
add überjar generation to runtime-jvm project for running without sbt
2018-06-18 11:20:17 -04:00
Arya Irani
1f508b869e
Merge pull request #197 from unisonweb/topic/scala-base58
use base58 for pretty-printing hashes
2018-06-18 11:04:33 -04:00
Arya Irani
1f13ca2a02 add überjar generation to runtime-jvm project for running without sbt 2018-06-17 14:32:08 -04:00
Arya Irani
4c2ed1960e use base58 for pretty-printing hashes 2018-06-17 14:30:06 -04:00
Paul Chiusano
80e71a987a
Merge pull request #190 from unisonweb/topic/varlong-arrays
use VarLong for lengths and backref Pos
2018-06-15 10:32:30 -05:00
Arya Irani
4b6de9c97f add todos re 32-bit length limitations 2018-06-12 14:36:00 -04:00
Paul Chiusano
a6aa61fd4f
Merge pull request #189 from unisonweb/topic/move-output-type
move outputType from `Lambda` to primitive `Computation`s
2018-06-12 09:47:53 -05:00
Arya Irani
5b601a4248 update codecs to use VarInt encoding for Text and Array lengths
Note that the max sizes for these on the JVM are <= 31 bits
2018-06-11 18:54:39 -04:00
Arya Irani
dcd15f8c73 use VarInt encoding for backrefs and sequence lengths 2018-06-11 18:19:22 -04:00
Arya Irani
8a7ec4f50f I don't think I need these here anymore for C2Us.
I think the "boxed" element of the stream (the `UnboxedType`) will be read as needed,
instead of relying on `Result.boxed`
2018-06-10 19:56:45 -04:00
Arya Irani
e7db5d98ec print command-line usage in runtime bootstrap 2018-06-10 19:31:02 -04:00